SDKNecessaries

You must have some compatible development tool

  • Historically there were Microsoft Visual C/C++ 9 (2008), 10 (2010), 11 (2012), 12 (2013) and 14 (2017) versions.

  • Presently the latest one is Microsoft Visual C++ 2019 (v15) Community Edition is free for open source development. (free download (web version is fine); )

  • Intel ICL Compiler v10.1 or newer

  • LLVM 9 and up, or clang-cl integrated into Visual Studio

  • Gnu C++ 9.0

Notes

  • Free registration is mandatory to use Community Edition versions

Our aim is that sources can be built with all these compilers. And since we are in 2020, c++17 conformity is also a nice-to-have feature. Though AviSynth+ itself requires c++17, plugins are not obeyed to use it.

You also need in Microsoft Platform SDK (if it is not included with compiler)

For MS VC++ 2008 or more recent it is included in the compiler (?) (and it is called Windows PSK).

For some very special plugins (GPU) you might need the DirectX SDK (when compiling AviSynth itself you will need it).

Finally, you must include the main header file ‘avisynth.h’

You can get it with this FilterSDK, download with AviSynth source code, or take from some plugin source package. There are several versions of this header file from various AviSynth versions.

Header file avisynth.h from v1.0.x to v2.0.x have AVISYNTH_INTERFACE_VERSION = 1. Plugins compiled with them will not be (natively) compatible with AviSynth 2.5.x.

Header file avisynth.h from v2.5.0 to v2.5.5 have AVISYNTH_INTERFACE_VERSION = 2. Plugins compiled with them will (generally) work in AviSynth v2.5.0 to v2.5.7 (and above). But avisynth.h files from versions v2.5.0 - v2.5.5 (and betas) are not identical. We recommend to use avisynth.h from versions 2.5.5 or later. Previous versions of avisynth.h are obsolete and have some bugs.

Header file avisynth.h from v2.5.6 to v2.5.8 are almost identical and have AVISYNTH_INTERFACE_VERSION = 3. Plugins compliled with them will work in v2.5.6 and up, and v2.5.5 and below if you do not use new interface features and do not call env->CheckVersion function.

AviSynth version 2.6 and Avisynth+ versions up to 3.5.1 are using currently AVISYNTH_INTERFACE_VERSION = 6. Plugins compiled with AviSynth v2.5.x header will work in AviSynth 2.6.x and specific (without script array support) Avisynth+ versions.

Avisynth+ version (though a bit late) changed version to AVISYNTH_INTERFACE_VERSION = 7.

From AviSynth+ version 3.6.0 new interface functions arrived along with frame properties support AVISYNTH_INTERFACE_VERSION = 8.

Generally good start is to take some similar plugin source code as a draft for improving or own development. Attention: there are many old plugins source code packages with older avisynth.h included. Simply replace it by new one.

Compiling options

On Windows plugin CPP source code must be compiled as Win32 or x64 DLL (multi-threaded (MT) or multi-threaded DLL (MD)) without MFC. Latter is recommended in general and requires the actual Microsoft Visual C++ redistributables.

Note that GCC and the other builds cannot be mixed due to the different ABI.

Of course, use Release build with optimization. Typical compiler switches are /MT /O2 and /dll /nologo for linker

See step by step compiling instructions.

Other compilers

Since v2.5.7, AviSynth includes an updated version of Kevin Atkinson’s AviSynth C API you can use to create “C-Plugins” with compilers such as GNU C++, Visual Basic and Delphi.

You can NOT use the C++ API with compilers like GNU C++ to create plugins, because of binary incompatibilities.

There is also Pascal conversion of avisynth_c.h by Myrsloik

Some info about Using in Visual Basic

PureBasic port of the Avisynth C Interface by Inc

There is also AvsFilterNet wrapper for Avisynth in .NET (any .NET language) by SAPikachu, see discussion


Back to FilterSDK

$Date: 2020/04/22 06:08:10 $