View Full Version : Avisynth plugins
nachiketa
11th May 2008, 16:52
Apologies for a seemingly dumb question, just started out writing plugins.
I tried compiling the sample avisynth filter Invert.cpp into a DLL, however VirtualDub gives an error saying its not a AviSynth 2.5 plugin. I am using the avisynth.h from the latest release for AVISynth when building the dll, so i am not sure if i need the WarpSharp package as mentioned in the FAQs.
Can someone advise me on where i might be going wrong? I am using MSVC++6.0
Thanks!
I tried compiling the sample avisynth filter Invert.cpp into a DLL, however VirtualDub gives an error saying its not a AviSynth 2.5 plugin.
Will you please post a link to the code you are using ?
if i need the WarpSharp package as mentioned in the FAQs
Not at all! You`re probably using and old format code previous
2.5 versions
Arda
nachiketa
11th May 2008, 17:59
Hi,
Thansk for the reply. I just tried compiling the example program at http://www.neuron2.net/www.math.berkeley.edu/benrg/avisynth-extensions.html
The version i have on my machine is 2.58. I just included the avisynth.h file from FilterSDK directory.
Thanks
Yes, that is the orginal Ben's sample it is not avisynth 2.5 compatible.
Where it says
__declspec(dllexport) const char* __stdcall AvisynthPluginInit
just change by
__declspec(dllexport) const char* __stdcall AvisynthPluginInit2
If I don't forget anything it should work. Anyway be careful nowadays invert
is an internal avisynth function so you could have conflict name problems
I should recommend rename it as something like invert_test or anything you like
to be sure it is your sample is working.
I hope this can be usefull
Arda
nachiketa
11th May 2008, 23:16
Thanks Arda,
I just tried it out, but it still didn't work. Though I'll first make sure that i am not using any other older function calls.
Nachiketa
Wilbert
18th May 2008, 23:10
Try: http://avisynth.org/mediawiki/Filter_SDK/Two-Five_Invert
I'm not sure why the old one is not working with v2.58 (the only change besides the one that ARDA mentioned, is that it requires YV12 input; and the check should actually be added in the source). What errors are you getting?
Finally I had some time to answer you.
First thing to point is that the code of your link if you get to compile with the modificiation I pointed
you works correctly for colorspaces which have just one plane (interleaved).It will not work with
YV12 colorspace cause its main loop is done just once as Wilbert pointed.
If you want to understand better this point browse cvs and see the history of internal invert
and its modifications for new colorspaces.
http://avisynth2.cvs.sourceforge.net/avisynth2/avisynth/src/filters/layer.cpp?sortby=date&view=log
Any way you can compile and test by adding a simple ConvertToYUY2() to your script for instance is needed.
You don't mention if you still have the same error message. If true you must be using and old
avisinth.h as well.
To help you avoid odd things here you have a link with this source workspace and all configurations you need
to compile and get a usabe dll. I name the function invertclip so you can put it in avisynth's plugins directory
and avoid conflict name with internal one.
http://www.iespana.es/Ardaversions/invertclip.7z
Anyway except you have an especial reason to start by studying invert code; I would recommend
start with the examples that Si has posted long ago in the sticky at the beginning of avisynth development.
http://forum.doom9.org/showthread.php?t=48261
If you still have any doubt please feel free to post here.
I hope this can be usefull
ARDA
nachiketa
24th May 2008, 15:59
Thanks Guys,
The new code link seems to be fine. It seems i should have done my homework a little better before starting out :) I guess i can also try looking at some existing filter implementations as well to get a feel for it...
Rgds,
Srinath
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.