View Single Post
Old 3rd April 2007, 19:16   #1  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Port of MPlayer Yadif deinterlace filter (C-Plugin)

I do not like deinterlace but i try lo learn C-plugin creation again
As an exercise I ported MPlayer Yadif (Yet Another DeInterlacing Filter).
http://www.mplayerhq.hu
http://guru.multimedia.cx/deinterlacing-filters/

It is well MMX assembler opimized but with GNU GCC inline compiler.
Assembler porting is hard task. That is why I use Avisynth C plugin interface and MinGW.

But I have an another question. How to create Avisynth C plugins with Microsoft compiler?
Generaly it does not produce correct function name avisynth_c_plugin_init@4.
MSVC (6,7,8) produces underscored _avisynth_c_plugin_init@4 instead,
and it is not possible to use LoadCPlugin command.
I use avisynth_c.h file from Avisynth 2.5.7 distrib.

The only workaround I found is to use yadif.def file for link:

LIBRARY yadif.dll
EXPORTS
avisynth_c_plugin_init@4=_avisynth_c_plugin_init@4


This way I produce yadif.dll with both _avisynth_c_plugin_init@4 and avisynth_c_plugin_init@4 functions.
Is it the only way (besides hex editing of DLL)?
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.

Last edited by Fizick; 5th April 2007 at 19:47.
Fizick is offline   Reply With Quote