Argument is clip only, source clip Planar, Colorbars().ConvertToYV12().Invert(),
dont forget to copy dll to plugins, else will use built-in Invert().
Remove dll afterwards.
Below tells avisynth about the plugin name and args.
Code:
extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env)
{
env->AddFunction("Invert", "c", Create_Invert, 0);
return "Invert plugin";
}
This is (TwoFiveInvert) sample from SDK.
http://avisynth.nl/index.php/Filter_SDK
also in Avisynth 2.6 + SDK compressed helpfile as previously posted (MediaFire in sig).
EDIT: Not TwoFiveInvert, but very similar.
EDIT: This is the bit that does invert (on Y)
Code:
dstpY[x] = srcpY[x] ^ 0xFF;
the '^' is XOR, XOR with $FF makes eg 0->FF and FF->0. (Copying from source, XOR, to Dest)
To call another built-in or external function (you need to know it exists) see Invoke.
http://avisynth.nl/index.php/Cplusplus_API
(Most filters do the hard work themselves and do not call built-in/external filters)