<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.avisynth.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Unreal666</id>
	<title>Avisynth wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.avisynth.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Unreal666"/>
	<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php/Special:Contributions/Unreal666"/>
	<updated>2026-08-24T15:34:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Filter_SDK/avs2yuv&amp;diff=2904</id>
		<title>Filter SDK/avs2yuv</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Filter_SDK/avs2yuv&amp;diff=2904"/>
		<updated>2014-01-05T08:47:59Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: Added &amp;#039;FilterSDK&amp;#039; Category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;avs2yuv reads a script and outputs raw video (YUV or RGB). It&#039;s a stripped down version of the famous avs2yuv.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s avs2yuv.cpp:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;Windows.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;avisynth.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 #define MY_VERSION &amp;quot;Avs2YUV 0.24&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 const AVS_Linkage *AVS_linkage = 0;&lt;br /&gt;
 &lt;br /&gt;
 int __cdecl main(int argc, const char* argv[])&lt;br /&gt;
 {&lt;br /&gt;
 const char* infile = NULL;&lt;br /&gt;
 const char* outfile = NULL;&lt;br /&gt;
 FILE* out_fh;&lt;br /&gt;
 	&lt;br /&gt;
 if (!strcmp(argv[1], &amp;quot;-h&amp;quot;)) {&lt;br /&gt;
    fprintf(stderr, MY_VERSION &amp;quot;\n&amp;quot;&lt;br /&gt;
            &amp;quot;Usage: avs2yuv.exe in.avs out.raw\n&amp;quot;);&lt;br /&gt;
    return 2;&lt;br /&gt;
 } else {&lt;br /&gt;
    infile = argv[1];&lt;br /&gt;
    outfile = argv[2];&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 try {&lt;br /&gt;
    char* colorformat;&lt;br /&gt;
    typedef IScriptEnvironment* (__stdcall *DLLFUNC)(int);&lt;br /&gt;
    IScriptEnvironment* env;&lt;br /&gt;
    HMODULE avsdll = LoadLibrary(&amp;quot;avisynth.dll&amp;quot;);&lt;br /&gt;
    if (!avsdll) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;failed to load avisynth.dll\n&amp;quot;);&lt;br /&gt;
       return 2;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    DLLFUNC CreateEnv = (DLLFUNC)GetProcAddress(avsdll, &amp;quot;CreateScriptEnvironment&amp;quot;);&lt;br /&gt;
    if (!CreateEnv) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;failed to load CreateScriptEnvironment()\n&amp;quot;);&lt;br /&gt;
       FreeLibrary(avsdll);&lt;br /&gt;
       return 1;&lt;br /&gt;
    }&lt;br /&gt;
 	&lt;br /&gt;
    env = CreateEnv(AVISYNTH_INTERFACE_VERSION);&lt;br /&gt;
    env-&amp;gt;CheckVersion(5); // todo - only useful for plugins - find another way to check AviSynth version&lt;br /&gt;
    AVS_linkage = env-&amp;gt;GetAVSLinkage();&lt;br /&gt;
    AVSValue arg(infile);&lt;br /&gt;
    AVSValue res = env-&amp;gt;Invoke(&amp;quot;Import&amp;quot;, AVSValue(&amp;amp;arg, 1));&lt;br /&gt;
    if (!res.IsClip()) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;Error: &#039;%s&#039; didn&#039;t return a video clip.\n&amp;quot;, infile);&lt;br /&gt;
       FreeLibrary(avsdll);&lt;br /&gt;
       return 1;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    PClip clip = res.AsClip();&lt;br /&gt;
    VideoInfo vi = clip-&amp;gt;GetVideoInfo();&lt;br /&gt;
 	&lt;br /&gt;
    fprintf(stderr, &amp;quot; %s:\n&amp;quot;, infile);&lt;br /&gt;
    fprintf(stderr, &amp;quot; %dx%d,\n&amp;quot;, vi.width, vi.height);&lt;br /&gt;
    fprintf(stderr, &amp;quot; %d/%d fps,\n&amp;quot;, vi.fps_numerator, vi.fps_denominator);&lt;br /&gt;
    fprintf(stderr, &amp;quot; %d frames,\n&amp;quot;, vi.num_frames);&lt;br /&gt;
    if (vi.IsYUV()) {&lt;br /&gt;
       colorformat = &amp;quot;YUV&amp;quot;;&lt;br /&gt;
    } else {&lt;br /&gt;
       colorformat = &amp;quot;RGB&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    fprintf(stderr, &amp;quot; %s color format&amp;quot;, colorformat);&lt;br /&gt;
 &lt;br /&gt;
    out_fh = fopen(outfile, &amp;quot;wb&amp;quot;);&lt;br /&gt;
    if (!out_fh) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;fopen(\&amp;quot;%s\&amp;quot;) failed&amp;quot;, outfile);&lt;br /&gt;
       FreeLibrary(avsdll);&lt;br /&gt;
       return 1;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    static const int planes[] = {PLANAR_Y, PLANAR_U, PLANAR_V};&lt;br /&gt;
 &lt;br /&gt;
    for (int frm = 0; frm &amp;lt; vi.num_frames; ++frm) {&lt;br /&gt;
       PVideoFrame f = clip-&amp;gt;GetFrame(frm, env);&lt;br /&gt;
 &lt;br /&gt;
       int wrote = 0;&lt;br /&gt;
 &lt;br /&gt;
       for (int p=0; p&amp;lt;3; p++) { // for interleaved formats only the first plane (being the whole frame) is written&lt;br /&gt;
          int height = f-&amp;gt;GetHeight(planes[p]);&lt;br /&gt;
          int rowsize = f-&amp;gt;GetRowSize(planes[p]);&lt;br /&gt;
          int pitch = f-&amp;gt;GetPitch(planes[p]);&lt;br /&gt;
          const BYTE* data = f-&amp;gt;GetReadPtr(planes[p]);&lt;br /&gt;
          for (int y=0; y&amp;lt;height; y++) {&lt;br /&gt;
             wrote += fwrite(data, 1, rowsize, out_fh);&lt;br /&gt;
             data += pitch;&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    env-&amp;gt;DeleteScriptEnvironment();&lt;br /&gt;
    FreeLibrary(avsdll);&lt;br /&gt;
 &lt;br /&gt;
 } catch(AvisynthError err) {&lt;br /&gt;
    fprintf(stderr, &amp;quot;\nAvisynth error:\n%s\n&amp;quot;, err.msg);&lt;br /&gt;
    return 1;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 AVS_linkage = 0;&lt;br /&gt;
 fclose(out_fh);&lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Compile this file into an EXE named avs2yuv.exe. See [[Filter_SDK/Compiling_instructions|compiling instructions]]. Now open the command line and go to the folder where avs2yuv.exe and your script (called example.avs here) are located. Our script:&lt;br /&gt;
&lt;br /&gt;
 ColorBars()&lt;br /&gt;
 ConvertToYV12()&lt;br /&gt;
 Trim(0,4)&lt;br /&gt;
 Showframenumber()&lt;br /&gt;
&lt;br /&gt;
Type the following on the command line (the name of the output clip can be arbitrary in our application):&lt;br /&gt;
&lt;br /&gt;
 avs2yuv.exe example.avs output.raw&lt;br /&gt;
&lt;br /&gt;
So the output file will contain five frames of YV12 data (640x480). The raw stream can be played with [http://www.yuvtoolkit.com/ YUVtoolkit] for example. You can also import it in AviSynth using the plugin RawSource.&lt;br /&gt;
&lt;br /&gt;
=== Line by line breakdown ===&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a line-by-line breakdown of avs2yuv.cpp.&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The header stdio.h contains objects like [http://www.cplusplus.com/reference/cstdio/stderr/ stderr] (a pointer to a FILE object) and functions like [http://www.cplusplus.com/reference/cstdio/fprintf/ fprintf] and [http://www.cplusplus.com/reference/cstdio/fopen/ fopen]. Those will be used later on.&lt;br /&gt;
&lt;br /&gt;
The standard error stream (&#039;&#039;stderr&#039;&#039;) is the default destination for error messages and other diagnostic warnings. Like stdout, it is usually also directed by default to the text console (generally, on the screen).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fprintf&#039;&#039; writes formatted data to stream.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;fopen&#039;&#039; opens the file whose name is specified in the parameter filename and associates it with a stream that can be identified in future operations by the FILE pointer returned.&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;Windows.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;avisynth.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This header declares all the classes and miscellaneous constants that you might need when accessing avisynth.dll.&lt;br /&gt;
&lt;br /&gt;
 #define MY_VERSION &amp;quot;Avs2YUV 0.24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Defines the version number which will be printed (using the &amp;quot;-h&amp;quot; option) later on.&lt;br /&gt;
&lt;br /&gt;
 const AVS_Linkage *AVS_linkage = 0;&lt;br /&gt;
&lt;br /&gt;
This declares and initializes the server pointers static storage [[Filter_SDK/AVS_Linkage|AVS_Linkage]].&lt;br /&gt;
&lt;br /&gt;
 int __cdecl main(int argc, const char* argv[])&lt;br /&gt;
&lt;br /&gt;
argv and argc are how command line arguments are passed to main() in C and C++ (you can name them the way you want to). argc will be the number of strings pointed to by the array argv. This will be one plus the number of arguments, with the first one being the name of the application. Thus when using the command line &amp;quot;avs2yuv.exe in.avs out.raw&amp;quot; we have argv[0]=&amp;quot;avs2yuv.exe&amp;quot;, argv[1]=&amp;quot;in.avs&amp;quot;, argv[2]=&amp;quot;out.raw&amp;quot; and argc=2.&lt;br /&gt;
&lt;br /&gt;
 const char* infile = NULL;&lt;br /&gt;
 const char* outfile = NULL;&lt;br /&gt;
&lt;br /&gt;
initialize infile and outfile as null pointers by setting them to [http://www.cplusplus.com/reference/cstddef/NULL/ NULL]. We could have set them to 0 too since that&#039;s the same in C/C++.&lt;br /&gt;
&lt;br /&gt;
 FILE* out_fh;&lt;br /&gt;
&lt;br /&gt;
out_fh is declared as a pointer to a [http://www.cplusplus.com/reference/cstdio/FILE/ FILE object].&lt;br /&gt;
 	&lt;br /&gt;
 if (!strcmp(argv[1], &amp;quot;-h&amp;quot;)) {&lt;br /&gt;
    fprintf(stderr, MY_VERSION &amp;quot;\n&amp;quot;&lt;br /&gt;
            &amp;quot;Usage: avs2yuv.exe in.avs out.raw\n&amp;quot;);&lt;br /&gt;
    return 2;&lt;br /&gt;
&lt;br /&gt;
When using the command line &amp;quot;avs2yuv.exe -h&amp;quot; it will print to the console how the application should be used (&#039;h&#039; from help). The [http://www.cplusplus.com/doc/tutorial/functions/ return] terminates the function main() (and thus the application). returning 0 means that your program executed without errors and returning a different int means it executed with errors.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Avs2YUV 0.24&amp;quot; (followed by an enter)&lt;br /&gt;
&amp;quot;Usage: avs2yuv.exe in.avs out.raw&amp;quot; (followed by an enter)&lt;br /&gt;
&lt;br /&gt;
 } else {&lt;br /&gt;
    infile = argv[1];&lt;br /&gt;
    outfile = argv[2];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
When the second argument (argv[1]) is not &#039;-h&#039; it will set infile to the name of the input file (being argv[1]) and outfile to the name of the output file (being argv[2]).&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
    char* colorformat;&lt;br /&gt;
    IScriptEnvironment* env;&lt;br /&gt;
&lt;br /&gt;
env returns a pointer to the [[Cplusplus_API#IScriptEnvironment|IScriptEnvironment]] interface.&lt;br /&gt;
&lt;br /&gt;
    HMODULE avsdll = LoadLibrary(&amp;quot;avisynth.dll&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
[http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx LoadLibrary] loads the specified module (which is avisynth.dll here) into the address space of the process (the process being avs2yuv.exe here). When successful avsdll will be the handle to the module, else it will be NULL.&lt;br /&gt;
&lt;br /&gt;
    if (!avsdll) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;failed to load avisynth.dll\n&amp;quot;);&lt;br /&gt;
       return 2;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
When avsdll is NULL (thus 0), !avsdll evaluates to one, and the error &amp;quot;failed to load avisynth.dll&amp;quot; is printed to the console.&lt;br /&gt;
&lt;br /&gt;
    typedef IScriptEnvironment* (__stdcall *DLLFUNC)(int);&lt;br /&gt;
    DLLFUNC CreateEnv = (DLLFUNC)GetProcAddress(avsdll, &amp;quot;CreateScriptEnvironment&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
[[Cplusplus_API#CreateScriptEnvironment|CreateScriptEnvironment]] is exported by avisynth.dll and it is a pointer to the [[Cplusplus_API#IScriptEnvironment|IScriptEnvironment]] interface. [http://msdn.microsoft.com/en-us/library/windows/desktop/ms683212%28v=vs.85%29.aspx GetProcAddress] will retrieve the address of the exported function (when failing it will return NULL).&lt;br /&gt;
&lt;br /&gt;
In order to do so you must declare a function pointer (called &#039;DLLFUNC&#039; here) with *exactly* the same prototype as the function it is supposed to represent. This is done in the first line (note that [[Cplusplus_API#CreateScriptEnvironment|CreateScriptEnvironment]] has one parameter of type &#039;int&#039;)&lt;br /&gt;
&lt;br /&gt;
    typedef IScriptEnvironment* (__stdcall *DLLFUNC)(int);&lt;br /&gt;
&lt;br /&gt;
The [http://www.cplusplus.com/doc/tutorial/other_data_types/ typedef declaration] is used to construct shorter or more meaningful names (like &#039;DLLFUNC&#039; here) for types that are already defined (like &#039;IScriptEnvironment*&#039; here).&lt;br /&gt;
&lt;br /&gt;
In the second line the value of GetProcAddress is cast to the correct function pointer type.&lt;br /&gt;
&lt;br /&gt;
    ... = (DLLFUNC)GetProcAddress(...);&lt;br /&gt;
&lt;br /&gt;
We could also have used&lt;br /&gt;
&lt;br /&gt;
    IScriptEnvironment* (__stdcall *CreateEnv)(int) = NULL;&lt;br /&gt;
    CreateEnv = (IScriptEnvironment* (__stdcall *)(int))GetProcAddress(avsdll, &amp;quot;CreateScriptEnvironment&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
or shorter and less readable&lt;br /&gt;
&lt;br /&gt;
    IScriptEnvironment* (__stdcall *CreateEnv)(int) = (IScriptEnvironment* (__stdcall *)(int))GetProcAddress(avsdll, &amp;quot;CreateScriptEnvironment&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    if (!CreateEnv) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;failed to load CreateScriptEnvironment()\n&amp;quot;);&lt;br /&gt;
       FreeLibrary(avsdll);&lt;br /&gt;
       return 1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
When CreateEnv is NULL (so GetProcAddress failed to retrieve the exported function) an error is written to the console. [http://msdn.microsoft.com/en-us/library/windows/desktop/ms683152%28v=vs.85%29.aspx FreeLibrary] frees the module from your memory.&lt;br /&gt;
&lt;br /&gt;
    env = CreateEnv(AVISYNTH_INTERFACE_VERSION);&lt;br /&gt;
&lt;br /&gt;
This creates the script environment. Its members can be accessed by [[Cplusplus_API#IScriptEnvironment|env-&amp;gt;...]].&lt;br /&gt;
&lt;br /&gt;
    env-&amp;gt;CheckVersion(5);&lt;br /&gt;
&lt;br /&gt;
// todo - only useful for plugins - find another way to check AviSynth version (it now simply quits when an old avisynth.dll is loaded)&lt;br /&gt;
&lt;br /&gt;
    AVS_linkage = env-&amp;gt;GetAVSLinkage();&lt;br /&gt;
&lt;br /&gt;
This gets the server pointers static storage [[Filter_SDK/AVS_Linkage|AVS_Linkage]].&lt;br /&gt;
&lt;br /&gt;
    AVSValue arg(infile);&lt;br /&gt;
    AVSValue res = env-&amp;gt;Invoke(&amp;quot;Import&amp;quot;, AVSValue(&amp;amp;arg, 1));&lt;br /&gt;
&lt;br /&gt;
This calls the [[Import]] function on the input file infile. So the script is loaded.&lt;br /&gt;
&lt;br /&gt;
    if (!res.IsClip()) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;Error: &#039;%s&#039; didn&#039;t return a video clip.\n&amp;quot;, infile);&lt;br /&gt;
       FreeLibrary(avsdll);&lt;br /&gt;
       return 1;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
If the return value of the script is not a clip an error is written to the console.&lt;br /&gt;
&lt;br /&gt;
    PClip clip = res.AsClip();&lt;br /&gt;
&lt;br /&gt;
todo - check whether it has video (it can be an audio only clip) - clip.HasVideo() ???&lt;br /&gt;
&lt;br /&gt;
    VideoInfo vi = clip-&amp;gt;GetVideoInfo();&lt;br /&gt;
 &lt;br /&gt;
[[Cplusplus_API#GetVideoInfo|GetVideoInfo]] returns a [[Cplusplus_API/VideoInfo|VideoInfo]] structure of the clip.&lt;br /&gt;
&lt;br /&gt;
    fprintf(stderr, &amp;quot; %s:\n&amp;quot;, infile);&lt;br /&gt;
    fprintf(stderr, &amp;quot; %dx%d,\n&amp;quot;, vi.width, vi.height);&lt;br /&gt;
    fprintf(stderr, &amp;quot; %d/%d fps,\n&amp;quot;, vi.fps_numerator, vi.fps_denominator);&lt;br /&gt;
    fprintf(stderr, &amp;quot; %d frames,\n&amp;quot;, vi.num_frames);&lt;br /&gt;
    if (vi.IsYUV()) {&lt;br /&gt;
       colorformat = &amp;quot;YUV&amp;quot;;&lt;br /&gt;
    } else {&lt;br /&gt;
       colorformat = &amp;quot;RGB&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    fprintf(stderr, &amp;quot; %s color format&amp;quot;, colorformat);&lt;br /&gt;
 &lt;br /&gt;
Some information about the clip is written to the console.&lt;br /&gt;
&lt;br /&gt;
    out_fh = fopen(outfile, &amp;quot;wb&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Creates an empty binary file and opens it for writing.&lt;br /&gt;
&lt;br /&gt;
    if (!out_fh) {&lt;br /&gt;
       fprintf(stderr, &amp;quot;fopen(\&amp;quot;%s\&amp;quot;) failed&amp;quot;, outfile);&lt;br /&gt;
       FreeLibrary(avsdll);&lt;br /&gt;
       return 1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
When failing (thus when out_fh is NULL) an error is written to the console.&lt;br /&gt;
&lt;br /&gt;
    static const int planes[] = {PLANAR_Y, PLANAR_U, PLANAR_V};&lt;br /&gt;
&lt;br /&gt;
x&lt;br /&gt;
&lt;br /&gt;
    for (int frm = 0; frm &amp;lt; vi.num_frames; ++frm) {&lt;br /&gt;
&lt;br /&gt;
Start with frame zero (and run through all of them).&lt;br /&gt;
&lt;br /&gt;
       PVideoFrame f = clip-&amp;gt;GetFrame(frm, env);&lt;br /&gt;
  	&lt;br /&gt;
       int wrote = 0;&lt;br /&gt;
 &lt;br /&gt;
       for (int p=0; p&amp;lt;3; p++) { // for interleaved formats only the first plane (being the whole frame) is written&lt;br /&gt;
          int height = f-&amp;gt;GetHeight(planes[p]);&lt;br /&gt;
          int rowsize = f-&amp;gt;GetRowSize(planes[p]);&lt;br /&gt;
          int pitch = f-&amp;gt;GetPitch(planes[p]);&lt;br /&gt;
          const BYTE* data = f-&amp;gt;GetReadPtr(planes[p]);&lt;br /&gt;
          for (int y=0; y&amp;lt;height; y++) {&lt;br /&gt;
             wrote += fwrite(data, 1, rowsize, out_fh);&lt;br /&gt;
             data += pitch;&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    env-&amp;gt;DeleteScriptEnvironment();&lt;br /&gt;
    FreeLibrary(avsdll);&lt;br /&gt;
 &lt;br /&gt;
 } catch(AvisynthError err) {&lt;br /&gt;
    fprintf(stderr, &amp;quot;\nAvisynth error:\n%s\n&amp;quot;, err.msg);&lt;br /&gt;
    return 1;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 AVS_linkage = 0;&lt;br /&gt;
 fclose(out_fh);&lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
todo - static and dynamic linking (see above) - http://msdn.microsoft.com/en-us/library/windows/desktop/ms685090%28v=vs.85%29.aspx&lt;br /&gt;
http://msdn.microsoft.com/en-us/library/d14wsce5.aspx&lt;br /&gt;
&lt;br /&gt;
[[Category:FilterSDK]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Internal_functions/Numeric_functions&amp;diff=2903</id>
		<title>Internal functions/Numeric functions</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Internal_functions/Numeric_functions&amp;diff=2903"/>
		<updated>2014-01-05T02:10:53Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Numeric functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Numeric functions ==&lt;br /&gt;
&lt;br /&gt;
They provide common mathematical operations on numeric variables.&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Max|v2.58|Max(float, float [, ...])}}&lt;br /&gt;
: Returns the maximum value of a set of numbers.&lt;br /&gt;
: If all the values are of type Int, the result is an Int. If any of the values are of type Float, the result is a Float.&lt;br /&gt;
: This may cause an unexpected result when an Int value greater than 16777216 is mixed with Float values.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Max (1, 2) = 2&lt;br /&gt;
 Max (5, 3.0, 2) = 5.0&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Min|v2.58|Min(float, float [, ...])}}&lt;br /&gt;
: Returns the minimum value of a set of numbers.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Min (1, 2) = 1&lt;br /&gt;
 Min (5, 3.0, 2) = 2.0&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|MulDiv|v2.56|MulDiv(int, int, int)}}&lt;br /&gt;
: Multiplies two ints (m, n) and divides the product by a third (d) in a single operation, with 64 bit intermediate result. The actual equation used is &amp;lt;tt&amp;gt; (m * n + d / 2) / d &amp;lt;/tt&amp;gt;.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 MulDiv (1, 1, 2) = 1&lt;br /&gt;
 MulDiv (2, 3, 2) = 3&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Floor||Floor(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round down on any fractional amount).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Floor(1.2) = 1&lt;br /&gt;
 Floor(1.6) = 1&lt;br /&gt;
 Floor(-1.2) = -2&lt;br /&gt;
 Floor(-1.6) = -2&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Ceil||Ceil(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round up on any fractional amount).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Ceil(1.2) = 2&lt;br /&gt;
 Ceil(1.6) = 2&lt;br /&gt;
 Ceil(-1.2) = -1&lt;br /&gt;
 Ceil(-1.6) = -1&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Round||Round(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round off to nearest integer).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Round(1.2) = 1&lt;br /&gt;
 Round(1.6) = 2&lt;br /&gt;
 Round(-1.2) = -1&lt;br /&gt;
 Round(-1.6) = -2&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Int|v2.07|Int(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round towards zero).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Int(1.2) = 1&lt;br /&gt;
 Int(1.6) = 1&lt;br /&gt;
 Int(-1.2) = -1&lt;br /&gt;
 Int(-1.6) = -1&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Float|v2.07|Float(int)}}&lt;br /&gt;
: Converts int to single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value. Integer values that require more than 24-bits to be represented will have their lower 8-bits truncated yielding unexpected values.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Float(4) = 4.0&lt;br /&gt;
 Float(4) / 3 = 1.333 (while 4 / 3 = 1 , due to integer division)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Sin|v2|Sin(float)}}&lt;br /&gt;
: Returns the sine of the argument (assumes it is radians).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Sin(Pi()/4) = 0.707&lt;br /&gt;
 Sin(Pi()/2) = 1.0&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Cos|v2|Cos(float)}}&lt;br /&gt;
: Returns the cosine of the argument (assumes it is radians).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Cos(Pi()/4) = 0.707&lt;br /&gt;
 Cos(Pi()/2) = 0.0&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Tan|v2.60|Tan(float)}}&lt;br /&gt;
: Returns the tangent of the argument (assumes it is radians).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Tan(Pi()/4) = 1.0&lt;br /&gt;
 Tan(Pi()/2) = not defined&lt;br /&gt;
: 32 bit ieee floats do not have sufficient resolution to exactly represent&lt;br /&gt;
: pi/2 so AviSynth returns a large positive number for the value slightly less&lt;br /&gt;
: than pi/2 and a large negative value for the next possible value which is&lt;br /&gt;
: slightly greater than pi/2.&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Asin|v2.60|Asin(float)}}&lt;br /&gt;
: Returns the inverse of the sine of the argument (output is radians).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Asin(0.707) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Asin(1.0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Acos|v2.60|Acos(float)}}&lt;br /&gt;
: Returns the inverse of the cosine of the argument (output is in radians).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Acos(0.707) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Acos(0.0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Atan|v2.60|Atan(float)}}&lt;br /&gt;
: Returns the inverse of the tangent of the argument (output is in radians).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Atan(0.707) = 0.6154085176&lt;br /&gt;
 Atan(1.0) = 0.7853981634 (~ Pi/4)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Atan2|v2.60|Atan2(float, float)}}&lt;br /&gt;
: Returns the angle between the positive x-axis of a plane and the point given by the coordinates (x, y) on it (output is in radians). See [http://en.wikipedia.org/wiki/Atan2 wikipedia] for more information.&lt;br /&gt;
: y is the first argument and x is the second argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Atan2(1.0, 0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
 Atan2(1.0, 1.0) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Atan2(−1.0, −1.0) = -2.356194490 (~ −3Pi/4)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Sinh|v2.60|Sinh(float)}}&lt;br /&gt;
: Returns the hyperbolic sine of the argument. See [http://en.wikipedia.org/wiki/Hyperbolic_function wikipedia] for more information.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Sinh(2.0) = 3.626860408&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Cosh|v2.60|Cosh(float)}}&lt;br /&gt;
: Returns the hyperbolic cosine of the argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Cosh(2.0) = 3.762195691&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Tanh|v2.60|Tanh(float)}}&lt;br /&gt;
: Returns the hyperbolic tangent of the argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Tanh(2.0) = 0.9640275801&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Fmod|v2.60|Fmod(float, float)}}&lt;br /&gt;
: Returns the modulo of the argument. Output is float.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Fmod(3.5, 0.5) = 0 (since 3.5 - 7*0.5 = 0)&lt;br /&gt;
 Fmod(3.5, 1.0) = 0.5 (since 3.5 - 3*1.0 = 0.5)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Pi|v2|Pi()}}&lt;br /&gt;
: Returns the value of the &amp;quot;pi&amp;quot; constant (the ratio of a circle&#039;s circumference to its diameter).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 d = Pi()    # d == 3.141592653&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Tau|v2.60|Tau()}}&lt;br /&gt;
: Returns the value of the &amp;quot;tau&amp;quot; constant (the ratio of a circle&#039;s circumference to its radius). See [http://en.wikipedia.org/wiki/Tau_(2π) Tau_(2Π)] for more information.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 d = Tau()   # d == 6.283186&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Exp|v2|Exp(float)}}&lt;br /&gt;
: Returns the natural (base-e) exponent of the argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Exp(1) = 2.7182818&lt;br /&gt;
 Exp(0) = 1.0&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Log|v2|Log(float)}}&lt;br /&gt;
: Returns the natural (base-e) logarithm of the argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Log(1) = 0.0&lt;br /&gt;
 Log(10) = 2.30259&lt;br /&gt;
 Log(Exp(1)) = 1.0&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Log10|v2.60|Log10(float)}}&lt;br /&gt;
: Returns the common logarithm of the argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Log10(1.0) = 0&lt;br /&gt;
 Log10(10.0) = 1.0&lt;br /&gt;
 Log10(2.0) = 0.3010299957&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Pow|v2|Pow(float base, float power)}}&lt;br /&gt;
: Returns &amp;quot;base&amp;quot; raised to the power indicated by the second argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Pow(2, 3) = 8&lt;br /&gt;
 Pow(3, 2) = 9&lt;br /&gt;
 Pow(3.45, 1.75) = 8.7334&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Sqrt|v2|Sqrt(float)}}&lt;br /&gt;
: Returns the square root of the argument.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Sqrt(1) = 1.0&lt;br /&gt;
 Sqrt(2) = 1.4142&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Abs|v2.07|Abs(float or int)}}&lt;br /&gt;
: Returns the absolute value of its argument (returns float for float, integer for integer).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Abs(-3.8) = 3.8&lt;br /&gt;
 Abs(-4) = 4&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Sign|v2.07|Sign(float)}}&lt;br /&gt;
: Returns the sign of the value passed as argument (1, 0 or -1).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Sign(-3.5) = -1&lt;br /&gt;
 Sign(3.5) = 1&lt;br /&gt;
 Sign(0) = 0&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Frac|v2.07|Frac(float)}}&lt;br /&gt;
: Returns the fractional portion of the value provided.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Frac(3.7) = 0.7&lt;br /&gt;
 Frac(-1.8) = -0.8&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Rand|v2.07|Rand([int max] [, bool scale] [, bool seed])}}&lt;br /&gt;
: Returns a random integer value. All parameters are optional. &lt;br /&gt;
:* &#039;&#039;max&#039;&#039; sets the maximum value+1 (default 32768) and can be set negative for negative results. It operates either in scaled or modulus mode (default &#039;&#039;scale&#039;&#039;=true only if abs(max) &amp;gt; 32768, false otherwise). &lt;br /&gt;
:* Scaled mode (&#039;&#039;scale&#039;&#039;=true) scales the internal random number generator value to the maximum value, while modulus mode (&#039;&#039;scale&#039;&#039;=false) uses the remainder from an integer divide of the random generator value by the maximum. I found modulus mode is best for smaller maximums. &lt;br /&gt;
:* Using &#039;&#039;seed=true&#039;&#039; seeds the random number generator with the current time. &#039;&#039;seed&#039;&#039; defaults to false and probably isn&#039;t necessary, although it&#039;s there just in case. &lt;br /&gt;
: Typically, this function would be used with the Select function for random clips. &lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Select(Rand(5), clip1, clip2, clip3, clip4, clip5)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Spline|v2.51|Spline(float X, x1, y1, x2, y2, .... [, bool cubic])}}&lt;br /&gt;
: Interpolates the Y value at point X using the control points x1/y1, ... There have to be at least 2 x/y-pairs. The interpolation can be cubic (the result is a spline) or linear (the result is a polygon). Default is cubic.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Spline(5, 0, 0, 10, 10, 20, 0, false) = 5&lt;br /&gt;
 Spline(5, 0, 0, 10, 10, 20, 0, true) = 7&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|ContinuedNumerator|v2.60|ContinuedNumerator(float, int limit)}}&lt;br /&gt;
* {{ScriptFunction|ContinuedNumerator|v2.60|ContinuedNumerator(int, int, int limit)}}&lt;br /&gt;
* {{ScriptFunction|ContinuedDenominator|v2.60|ContinuedDenominator(float, int limit)}}&lt;br /&gt;
* {{ScriptFunction|ContinuedDenominator|v2.60|ContinuedDenominator(int, int, int limit)}}&lt;br /&gt;
: The rational pair (ContinuedNumerator,ContinuedDenominator) returned has the smallest possible denominator such that the absolute error is less than 1/limit. More information can be found on [http://en.wikipedia.org/wiki/Continued_fraction wikipedia].&lt;br /&gt;
: If &#039;&#039;limit&#039;&#039; is not specified in the Float case the rational pair returned is to the limit of the single precision floating point value. Thus (float)((double)Num/(double)Den) == V.&lt;br /&gt;
: In the Int case if &#039;&#039;limit&#039;&#039; is not specified then the normalized original values will be returned, i.e. reduced by the GCD.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 ContinuedNumerator(PI(), limit=5000]) = 355&lt;br /&gt;
 ContinuedDenominator(PI(), limit=5000) = 113&lt;br /&gt;
 &lt;br /&gt;
 ContinuedNumerator(PI(), limit=50]) = 22&lt;br /&gt;
 ContinuedDenominator(PI(), limit=50) = 7&lt;br /&gt;
 &lt;br /&gt;
 ContinuedNumerator(355, 113, limit=50]) = 22&lt;br /&gt;
 ContinuedDenominator(355, 113, limit=50) = 7 &lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitAnd|v2.60|BitAnd(int, int)}}&lt;br /&gt;
: The functions: BitAnd, BitNot, BitOr and BitXor, etc, are bitwise operators. This means that their arguments (being integers) are converted to binary numbers, the operation is performed on their bits, and the resulting binary number is converted back again.&lt;br /&gt;
: BitAnd returns the bitwise AND (sets bit to 1 if both bits are 1 and sets bit to 0 otherwise).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 BitAnd(5, 6) = 4 # since 5 = 101, 6 = 110, and 101&amp;amp;110 = 100&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitNot|v2.60|BitNot(int)}}&lt;br /&gt;
: Returns the bit-inversion (sets bit to 1 if bit is 0 and vice-versa).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 BitNOT(5) = -6 # since 5 = 101, and ~101 = 1111 1111 1111 1111 1111 1111 1111 1010 = -6&lt;br /&gt;
: Note: 1111 1111 1111 1111 1111 1111 1111 1010 = (2^32-1)-2^0-2^2 = 2^32-(1+2^0+2^2) =(signed) -(1+2^0+2^2) = -6&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitOr|v2.60|BitOr(int, int)}}&lt;br /&gt;
: Returns the bitwise inclusive OR (sets bit to 1 if one of the bits (or both) is 1 and sets bit to 0 otherwise).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 BitOr(5, 6) = 7 # since 5 = 101, 6 = 110, and 101|110 = 111&lt;br /&gt;
 BitOr(4, 2) = 6 # since 4 = 100, 2 = 010, and 100|010 = 110&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitXor|v2.60|BitXor(int, int)}}&lt;br /&gt;
: Returns the bitwise exclusive OR (sets bit to 1 if exactly one of the bits is 1 and sets bit to 0 otherwise).&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 BitXor(5, 6) = 3 # since 5 = 101, 6 = 110, and 101^110 = 011&lt;br /&gt;
 BitXor(4, 2) = 6 # since 4 = 100, 2 = 010, and 100^010 = 110&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitLShift|v2.60|BitLShift(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitShl|v2.60|BitShl(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitSal|v2.60|BitSal(int, int)}}&lt;br /&gt;
: Shift the bits of a number to the left.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Shifts the bits of the number 5 two bits to the left:&lt;br /&gt;
 BitLShift(5, 2) = 20 (since 101 &amp;lt;&amp;lt; 2 = 10100)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitRShiftL|v2.60|BitRShiftL(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitRShiftU|v2.60|BitRShiftU(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitShr|v2.60|BitShr(int, int)}}&lt;br /&gt;
: Shift the bits of an unsigned integer to the right. (Logical, zero fill, Right Shift)&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Shifts the bits of the number -42 one bit to the right, treating it as unsigned:&lt;br /&gt;
 BitRShiftL(-42, 1) = 2147483627 (since 1111 1111 1111 1111 1111 1111 1101 0110 &amp;gt;&amp;gt; 1 = 0111 1111 1111 1111 1111 1111 1110 1011)&lt;br /&gt;
: Note: -42 = -(1+2^0+2^3+2^5) = (unsigned) (2^32-1)-(2^0+2^3+2^5) = 1111 1111 1111 1111 1111 1111 1101 0110&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitRShiftA|v2.60|BitRShiftA(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitRShiftS|v2.60|BitRShiftS(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitSar|v2.60|BitSar(int, int)}}&lt;br /&gt;
: Shift the bits of an integer to the right. (Arithmetic, Sign bit fill, Right Shift)&lt;br /&gt;
: Examples:&lt;br /&gt;
 Shifts the bits of the number -42 one bit to the right, treating it as signed:&lt;br /&gt;
 BitRShiftA(-42, 1) = -21 (since 1111 1111 1111 1111 1111 1111 1101 0110 &amp;gt;&amp;gt; 1 = 1111 1111 1111 1111 1111 1111 1110 1011)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitLRotate|v2.60|BitLRotate(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitRol|v2.60|BitRol(int, int)}}&lt;br /&gt;
: Rotates the bits of an integer to the left by the number of bits specified in the second operand. For each rotation specified, the high order bit that exits from the left of the operand returns at the right to become the new low order bit.&lt;br /&gt;
: Examples:&lt;br /&gt;
 Rotates the bits of the number -2147483642 one bit to the left:&lt;br /&gt;
 BitLRotate(-2147483642, 1) = 13 (since 10000000000000000000000000000110 ROL 1 = 00000000000000000000000000001101)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitRRotate|v2.60|BitRRotateL(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitRor|v2.60|BitRor(int, int)}}&lt;br /&gt;
: Rotates the bits of an integer to the right by the number of bits specified in the second operand. For each rotation specified, the low order bit that exits from the right of the operand returns at the left to become the new high order bit.&lt;br /&gt;
: Examples:&lt;br /&gt;
 Rotates the bits of the number 13 one bit to the right:&lt;br /&gt;
 BitRRotate(13, 1) = -2147483642 (since 00000000000000000000000000001101 ROR 1 = 10000000000000000000000000000110)&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitTest|v2.60|BitTest(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitTst|v2.60|BitTst(int, int)}}&lt;br /&gt;
: Tests a single bit (that is, it returns true if its state is one, else it returns false). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
: Examples:&lt;br /&gt;
 Check the state of the fourth bit:&lt;br /&gt;
 BitTest(3, 4) = False&lt;br /&gt;
 BitTest(19, 4) = True&lt;br /&gt;
 &lt;br /&gt;
 Check the state of the sign bit:&lt;br /&gt;
 BitTest(-1, 31) = True&lt;br /&gt;
 BitTest(2147483647, 31) = False&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitSet|v2.60|BitSet(int, int)}}&lt;br /&gt;
: Sets a single bit to one (so it sets its state to one). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
: Examples:&lt;br /&gt;
 Set the state of the fourth bit to one:&lt;br /&gt;
 BitSet(3, 4) = 19&lt;br /&gt;
 BitSet(19, 4) = 19&lt;br /&gt;
&lt;br /&gt;
 Set the state of the sign bit to one:&lt;br /&gt;
 BitSet(-1, 31) = -1&lt;br /&gt;
 BitSet(2147483647, 31) = -1&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitClear|v2.60|BitClear(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitClr|v2.60|BitClr(int, int)}}&lt;br /&gt;
: Sets a single bit to zero (so it sets its state to zero). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
: Examples:&lt;br /&gt;
 Clear the bits of the number 5&lt;br /&gt;
 BitClear(5, 0) = 4 (first bit is set to zero)&lt;br /&gt;
 BitClear(5, 1) = 5 (second bit is already zero)&lt;br /&gt;
 BitClear(5, 2) = 1 (third bit is set to zero)&lt;br /&gt;
 BitClear(5, 3) = 5 (fourth bit is already zero)&lt;br /&gt;
 &lt;br /&gt;
 Clear the state of the sign bit:&lt;br /&gt;
 BitClear(-1, 31) = 2147483647&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|BitChange|v2.60|BitChange(int, int)}}&lt;br /&gt;
* {{ScriptFunction|BitChg|v2.60|BitChg(int, int)}}&lt;br /&gt;
: Sets a single bit to its complement (so it changes the state of a single bit; 1 becomes 0 and vice versa). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero). The sign bit is bit 31.&lt;br /&gt;
: Examples:&lt;br /&gt;
 Change the state of the a bit of the number 5:&lt;br /&gt;
 BitChange(5, 0) = 4 (first bit is set to zero)&lt;br /&gt;
 BitChange(5, 1) = 7 (second bit is set to one)&lt;br /&gt;
 BitChange(5, 2) = 1 (third bit is set to zero)&lt;br /&gt;
 BitChange(5, 3) = 13 (fourth bit is set to one)&lt;br /&gt;
 &lt;br /&gt;
 Change the state of the sign bit:&lt;br /&gt;
 BitChange(-1, 31) = 2147483647&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[Internal functions]].&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Basics]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2902</id>
		<title>Changelist 26</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2902"/>
		<updated>2014-01-04T17:58:03Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Changes from 2.6.0 Alpha 2 to 2.6.0 CVS ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* Added Eval(clip, string name, string) alias for oop processing of argument.&lt;br /&gt;
* DirectShowSource support non-standard pixel types &amp;quot;YV24&amp;quot; and &amp;quot;YV16&amp;quot;.&lt;br /&gt;
* Info: Audio only clip now creates its own canvas video.&lt;br /&gt;
* AviSource: Include packed/padded processing and -ve biHeight logic for compressed input.&lt;br /&gt;
* Add Script Functions :- BitLRotate, BitRRotate, BitChange, BitClear, BitSet, BitTest and their asm aliases.&lt;br /&gt;
* Add WeaveRows (blit cost) and WeaveColumns (slow) frame combining filters.&lt;br /&gt;
* Add AudioDuration() [as float seconds], IsY8(), IsYV411() &amp;amp; PixelType() [as a string] script functions.&lt;br /&gt;
* Add Echo and Preroll filters.&lt;br /&gt;
* Add IScriptEnvironment::GetAVSLinkage() and DLLExport AVS_linkage for host usage of avisynth.dll.&lt;br /&gt;
* DirectShowSource, 2.6 plugin, support pixel types &amp;quot;AYUV&amp;quot; as YV24, &amp;quot;Y41P&amp;quot; and &amp;quot;Y411&amp;quot; as YV411.&lt;br /&gt;
* AviSource: Add Full and Auto pseudo pixel_types. Full is all supported. Auto is YV12, YUY2, RGB32, RGB24 &amp;amp; Y8.&lt;br /&gt;
* Add &amp;quot;AudioLengthS&amp;quot;, &amp;quot;Ord&amp;quot; &amp;amp; &amp;quot;FillStr&amp;quot; script functions.&lt;br /&gt;
* Add AudioTrim(clip, float, float) audio priority trimming, args in fractional seconds.&lt;br /&gt;
* Add Trim(M, Length=N[, Pad=False]) and Trim(M, End=N[, Pad=False]) function overloads for explicit Trimming. Length=0 means zero frame clip. End=0 means end at frame 0.&lt;br /&gt;
* Add SeparateRows (zero cost) and SeparateColumns (slow) frame slashing filters.&lt;br /&gt;
* Add Script Functions :- Acos, Asin, Atan, Atan2, Cosh, Sinh, Tanh, Fmod, Log10, BitLShift, BitRShiftS, BitRShiftU and Hex.&lt;br /&gt;
* Add &amp;quot;ConditionalSelect&amp;quot;,&amp;quot;csc+[show]b&amp;quot; runtime filter.&lt;br /&gt;
* Add dither option to Levels, RGBAdjust &amp;amp; Tweak.&lt;br /&gt;
* Add BitAnd(), BitNot(), BitOr() &amp;amp; BitXor() script functions.&lt;br /&gt;
* Add StrCmp() &amp;amp; StrCmpI() script functions.&lt;br /&gt;
* Add YV24 support for Limiter show option.&lt;br /&gt;
* Add &amp;quot;Global OPT_dwChannelMask={int}&amp;quot;&lt;br /&gt;
* Add 0x0063F speaker mask for 7.1 WAVE_FORMAT_EXTENSIBLE.&lt;br /&gt;
* Add .dll DelayLoad exception texts to crash message formatter.&lt;br /&gt;
* ImageWriter, add support for printf formating of filename string, default is (&amp;quot;%06d.%s&amp;quot;, n, ext);&lt;br /&gt;
* Add avs_get_error(AVS_ScriptEnvironment*); to avisynth_c interface.&lt;br /&gt;
* Catch and save AvisynthError text in more avisynth_c entry points, for kemuri-_9.&lt;br /&gt;
* Add ScriptName(), ScriptFile(), ScriptDir() functions (WarpEnterprises).&lt;br /&gt;
* Add SkewRows filter.&lt;br /&gt;
* Histogram, Levels mode, Improve colour of chroma legends.&lt;br /&gt;
* ConditionalFilter, teach about string results.&lt;br /&gt;
* Add some more &amp;quot;Add/Remove Software&amp;quot; registry keys to the Installer (XhmikosR).&lt;br /&gt;
* AviSource: Support both packed and DWORD padded raw planar input like with DSS.&lt;br /&gt;
* Add IScriptEnvironment::ApplyMessage()&lt;br /&gt;
* Add ImageSourceAnim (Wilbert)&lt;br /&gt;
* Support user upgrade to 178 DevIL.dll (They need to manage CRT dependancies).&lt;br /&gt;
* ImageSource: palette and compressed bmp images load correctly now (issue 894702) [need 178 DevIL.dll]&lt;br /&gt;
* ImageSource: support for other formats like: gif, exr, jp2, psd, hdr [need 178 DevIL.dll]&lt;br /&gt;
* Add YV24 mode to ColorBars.&lt;br /&gt;
* Add ColorBarsHD based on arib_std_b28.&lt;br /&gt;
* C-api usability enhancements from kemuri9 [Work in progress!]&lt;br /&gt;
* Add Undefined(), AudioLengthLo(), AudioLengthHi(), IsYV16() &amp;amp; IsYV24() script functions&lt;br /&gt;
* Allow newlines (and hence comments) before &#039;{&#039; -- Gavino&lt;br /&gt;
* Added IScriptEnvironment::DeleteScriptEnvironment()&lt;br /&gt;
* Added Histogram, population clamp % factor for &amp;quot;Levels&amp;quot; mode,&lt;br /&gt;
* Histogram, revert &amp;quot;Stereo&amp;quot; mode to YV12, Add &amp;quot;StereoY8&amp;quot; mode,&lt;br /&gt;
* AviSource: Support fourcc &amp;quot;GREY&amp;quot; as Y8&lt;br /&gt;
* Add &amp;quot;Global OPT_AVIPadScanlines=True&amp;quot; option for DWORD aligned planar padding&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed frame range clamping in ComparePlane (ultim).&lt;br /&gt;
* Fixed posible leak with realloc in ConditionalReader (ultim).&lt;br /&gt;
* Fixed posible double free in text-overlay (ultim).&lt;br /&gt;
* Fixed RGB32 to Y8 pixel right shift from 4th pixel on (Robert Martens).&lt;br /&gt;
* Fixed Overlay YV24 Image444 leak.&lt;br /&gt;
* Fixed AVISource &amp;quot;AUTO&amp;quot; and &amp;quot;FULL&amp;quot; handling.&lt;br /&gt;
* Fixed ImageSource handling of missing ebmp files.&lt;br /&gt;
* Fixed DirectShowSource incorrect byte order for unpacking of pixel type &amp;quot;AYUV&amp;quot;.&lt;br /&gt;
* Fixed HexValue parsing values greater than 7FFFFFFF, now as unsigned hex.&lt;br /&gt;
* Fixed ConditionalReader memory overrun parsing bools.&lt;br /&gt;
* Fixed ResampleAudio NOP test to compare vi.num_audio_samples, not sample rate.&lt;br /&gt;
* Fixed YV24 -&amp;gt; RGB24 overrun cleanup for widths%16 == 5.&lt;br /&gt;
* Fixed RGB24 AddBorders with right=0.&lt;br /&gt;
* Fixed conditional_functions error message names (Wilbert).&lt;br /&gt;
* Fixed Audio cache ac_expected_next regression.&lt;br /&gt;
* Fixed ImageSource deal with add 1 to IL_NUM_IMAGES bug (Wilbert)&lt;br /&gt;
* Fixed Overlay YV24 V plane conversion.&lt;br /&gt;
* Fixed Overlay YV24 mode with shared input clip, needed a MakeWritable.&lt;br /&gt;
* Fixed ImageReader upside down TIFF in 178 DevIL. (Wilbert)&lt;br /&gt;
* Fixed SaveString &#039;string+string&#039; bug when total length is 4096*K-1, K is +int.&lt;br /&gt;
* Fixed SincResize misuse of &amp;quot;int abs(int)&amp;quot; (Gavino). Fix Lanczos and Blackman sinc use of float == 0.0, use small limit &amp;quot;&amp;gt; 0.000001&amp;quot;.&lt;br /&gt;
* Fixed Classic mode legend drawing for planar right limit and yuy2 centre line.&lt;br /&gt;
* Fixed possible MT race. Use &amp;quot;env-&amp;gt;ManageCache(MC_IncVFBRefcount, ...)&amp;quot; in ProtectVFB.&lt;br /&gt;
* Fixed SwapYToUV output image size bug for 3 clip case.&lt;br /&gt;
* Fixed Crop limit tests for RGB.&lt;br /&gt;
* Fixed Overlay yellow tint on rec601 RGB import conversion.&lt;br /&gt;
* Fixed YtoUV() output image size bug for 3 clip case.&lt;br /&gt;
* Fixed ConvertToPlanar chroma alignment.&lt;br /&gt;
* Fixed Levels (RGB) change use of PixelClip(x) to min(max(x, 0), 255).&lt;br /&gt;
* Fixed SwapYtoUV yuy2 crash (StainlessS).&lt;br /&gt;
* Fixed Overlay saturate UV in add and subtract mode.&lt;br /&gt;
* Fixed Info.h range protect display characters (StainlessS).&lt;br /&gt;
* Fixed AviSource packed planar import chroma offsets.&lt;br /&gt;
* Fixed AviSource NULL GetWritePtr() failure due to premature setting of last_frame.&lt;br /&gt;
* Fixed Mask rounding in greyscale calcs (Wilbert), minor refactor.&lt;br /&gt;
* Fixed SelectRangeEvery audio snafu (Gavino).&lt;br /&gt;
* Fixed LoadPlugin, SaveString of result string.&lt;br /&gt;
* Fixed LoadPlugin, use _vsnprintf.&lt;br /&gt;
* Fixed LoadVirtualdubPlugin, don&#039;t add vdub filter to chain on load failure.&lt;br /&gt;
* Fixed rounding in RGB HResize (JoshyD) (affects all resizers)&lt;br /&gt;
* Fixed error message name in the filter VerticalReduceBy2&lt;br /&gt;
* Fixed SeparateFields() with variable parity input clip (Wilbert)&lt;br /&gt;
* Fixed AviSource, cannot cast__int64* to long*, it does not work!&lt;br /&gt;
* Fixed ConditionalReader: Don&#039;t allow out of range &amp;quot;Range&amp;quot; to overwrite edge values&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* Cache auto increase span on sparse misses.&lt;br /&gt;
* Cache prevent inactive instances returning VFB early and spoiling active instances hit rate (LaTo).&lt;br /&gt;
* ConvertToPlanarGeneric explicit add Cache before chroma rescaler.&lt;br /&gt;
* Overlay minor refactor YV12 -&amp;gt; 444 chroma&lt;br /&gt;
* Speedup ConvertToMono(), minor refactor MixAudio().&lt;br /&gt;
* Change StackVertical/Horizontal to interative instead of recursive, 2^N performace increase for 3 and more clips, i.e. 1 blit total instead of blit(blit(blit(...&lt;br /&gt;
* RGBtoY8 Dynamic ASM code, suport for RGB24.&lt;br /&gt;
* YV24backtoYUY2 Dynamic ASM code.&lt;br /&gt;
* UtoY8, VtoY8 abuse subframe, zero cost.&lt;br /&gt;
* YV24&amp;lt;-&amp;gt;RGB Add SSE2 and SSSE3 code paths, get rid of wide_enough.&lt;br /&gt;
* ConvertToYUY2 Add SSE2, MMX restore full speed on platforms with poor ooox.&lt;br /&gt;
* ConvertAudio, manage tempbuffer and floatbuffer independently.&lt;br /&gt;
* ConvertAudio, prefer SSE2 over 3DNow for super AMD cores.&lt;br /&gt;
* Info.h, full refactor, a good example of &amp;quot;Never look down&amp;quot;, thx StainlessS&lt;br /&gt;
* DoubleWeaveFrames, If A not writable, try to write to B, else make new frame&lt;br /&gt;
* Histogram, fix GetFrame/NewVideoFrame call order&lt;br /&gt;
* HResizer, interleave code +4% faster&lt;br /&gt;
* YtoUV() Abuse Subframe to snatch the Y plane / UV planes, Derestrict destination colorformat autogeneration.&lt;br /&gt;
* ImageSource: Improve thread interlock code&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* Replace _strdup with SaveString in AddFunction (Thanks Gavino)&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* Import: Increase full path buffer to MAX_PATH*4 for multi char code pages like CP932 (Chikuzen).&lt;br /&gt;
* Throw error when output number of frames will exceed MAXINT.&lt;br /&gt;
* BlankClip: Supply useful defaults for new Audio/Video when using a Video/Audio only template clip.&lt;br /&gt;
* BlankClip: Use duration from Audio only template as default length for new clip.&lt;br /&gt;
* Define new IClip::SetCacheHints cachehint constants.&lt;br /&gt;
* Force int call arguments to user script function float params to be explicit floats.&lt;br /&gt;
* Splice pass CacheHints through to both children in + and ++ mode.&lt;br /&gt;
* WriteFileStart/End save current_frame and set Last.&lt;br /&gt;
* ConditionalReader do not ignore syntax errors in input file.&lt;br /&gt;
* ImageSourceAnim Pad/Crop images to match first frame (Wilbert)&lt;br /&gt;
* ImageSource Add version to messages (Wilbert)&lt;br /&gt;
* Initial 2.6 API entry point linkage.&lt;br /&gt;
* Use Invoke for graph tail, enhance non-clip output error reporting.&lt;br /&gt;
* PopContext when inner block Asserts/throws (maxxon).&lt;br /&gt;
* Remove duplicate definitions (Wilbert)&lt;br /&gt;
* Enhance non-clip output error reporting.&lt;br /&gt;
* Explicitly specify calling sequence as __cdecl for Avisynth softwire routines, (was the compiler default)&lt;br /&gt;
* Use env-&amp;gt;Invoke(&amp;quot;Cache&amp;quot;, ...) everywhere instead of Cache::Create_Cache(), allows for Cache to be overloaded by a plugin.&lt;br /&gt;
* ConvertToYUY2 Change from 0-1-1 kernel to 1-2-1 kernel.&lt;br /&gt;
* Tweak make Interp same units as minSat and maxSat.&lt;br /&gt;
* Check HKEY_CURRENT_USER for PluginDir first. (henktiggelaar)&lt;br /&gt;
* Make forced, -ve, planar alignment of chroma planes match subsampling.&lt;br /&gt;
* Enforce planar alignment restrictions.&lt;br /&gt;
* C-api: Remove func sub-struct from AVS_Library struct&lt;br /&gt;
* Add error code to plugin load failure message&lt;br /&gt;
* Make default planar AVI output packed.&lt;br /&gt;
* WriteFile() now supports unlimited number of unlimited strings. (was 16 by 254 byte strings).&lt;br /&gt;
* ConvertToRGB*, make C++ code sample chroma the same as the MMX code i.e. use both pixels.&lt;br /&gt;
* ConvertToRGB*, use YV24 path for planar, complain when options are present for YUY2.&lt;br /&gt;
* ConvertToYUY2, use YV16 path for planar, complain when options are present for RGB&lt;br /&gt;
** see: http://forum.doom9.org/showthread.php?p=1378381#post1378381&lt;br /&gt;
* Thread safe code, part 2.&lt;br /&gt;
* Correct IClip baked documentation&lt;br /&gt;
* Fix at_exit executon order&lt;br /&gt;
* Passify compilation error/warnings (XhmikosR)&lt;br /&gt;
* for, const, extern and ansi patches for VC2008 (SEt)&lt;br /&gt;
* Disable OPT_RELS_LOGGING option&lt;br /&gt;
* Change implicit Last parsing for argless, bracketless calls to match bracketed cases. (Gavino) [not documented yet ???]&lt;br /&gt;
* DirectShowSource: Support last minute format renegotiation thru IPin::QueryAccept() &amp;amp; Validate the size of the provided directshow buffer.&lt;br /&gt;
* Remove non ascii chars from comments.&lt;br /&gt;
* Add core stubs for DirectShowSource, TCPServer &amp;amp; TCPSource, report when plugins are missing.&lt;br /&gt;
* Add note for original source downloads - SoundTouch&lt;br /&gt;
* Add more lineage history to Info()&lt;br /&gt;
* Move convertaudio, alignplanar, fillborder &amp;amp; MIN/MAX_INT definitions.&lt;br /&gt;
* Run AtExit before dismantling world.&lt;br /&gt;
* Change setcachehints definition from void to int. Test IClip version &amp;gt;= 5.&lt;br /&gt;
* Move PixelClip definition to avisynth.cpp&lt;br /&gt;
* SubTitle, etc, make X &amp;amp; Y options float (0.125 pixel granularity).&lt;br /&gt;
* ShowSMPTE() supports all integer FPS and multiplies of drop frame FPS.&lt;br /&gt;
* SubTitle, stop overwriting string constants (Gavino).&lt;br /&gt;
* SubTitle, improve pixel registration (Gavino).&lt;br /&gt;
* Make Info() CPU display hierarchical.&lt;br /&gt;
* Thread safe code, part 1.&lt;br /&gt;
&lt;br /&gt;
== Changes from 2.5 series to 2.6.0 Alpha 2 ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* Added support for argument passing and EAX return value to SoftwireHelper.&lt;br /&gt;
* Added &amp;quot;Global OPT_VDubPlanarHack=True&amp;quot; to flip YV24 and YV16 chroma planes for old VDub&#039;s.&lt;br /&gt;
* Added ContinuedDenominator/ContinuedNumerator(f[]i[limit]i) script functions.&lt;br /&gt;
* Tweak: fix MaskPointResizing + put back Dividee ISSE code (use sse=true, can&#039;t use all settings in that case).&lt;br /&gt;
* Added ChromaInPlacement, ChromaOutPlacement and ChromaResample options to planar colour conversions.&lt;br /&gt;
* Added MaskHS.&lt;br /&gt;
* Minor tweaks to get ready for VC8.&lt;br /&gt;
* Add Y8 for DevIL, planarize EBMP.&lt;br /&gt;
* Planar support for many filters.&lt;br /&gt;
* Added Info() time indicator on audio length and video (current frame &amp;amp; total). (2.5.8)&lt;br /&gt;
* Added UtoY8 and VtoY8.&lt;br /&gt;
* Added more info to Info(). (2.5.8)&lt;br /&gt;
* ColorYUV: Added all adjustment parameters as conditional variables &amp;quot;coloryuv_SETTING&amp;quot;. Enable by setting conditional=true.&lt;br /&gt;
* ConditionalReader: Added support for type String.&lt;br /&gt;
* ConditionalReader: Added offset keyword to offset all frame numbers after the keyword.&lt;br /&gt;
* Added SincResize() with optional taps parameter (default is 4).&lt;br /&gt;
* Added Custom band setting to SuperEQ to allow all 16 bands to be set from script. Usage: SuperEQ(clip,band1, band2, band3....) values are dB in float.&lt;br /&gt;
* Added fast 0-1-0 kernel for YV24 to ConvertBacktoYUY2().&lt;br /&gt;
* Added formats: YV24, YV16, Y8, YV411.&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed MonoToStereo with stereo sources.&lt;br /&gt;
* Fixed MergeChannels with only 1 input clip.&lt;br /&gt;
* Fixed support for negative height DIB format AVI&#039;s. (Oops still not quite right yet)&lt;br /&gt;
* Fixed Audio cache crashes.&lt;br /&gt;
* Fixed resize with YV411 missing code.&lt;br /&gt;
* Fixed ConditionalReader rounding with integer Interpolation.&lt;br /&gt;
* Fixed Softwire SSE2 bugs.&lt;br /&gt;
* Fixed SSSE3 CPU detection.&lt;br /&gt;
* Fixed SSSE3, SSE4.1 &amp;amp; SSE4.2 detection.&lt;br /&gt;
* Fixed Fastwire encoding of instructions that are &amp;gt;2 opcodes (SSSE3+4).&lt;br /&gt;
* Fixed _RPT5() macro for debug builds&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* SuperEQ: Improve channel unpacking/packing code.&lt;br /&gt;
* H-Resize: Use SSE4.1 (movntdqa) loads for use once memory access.&lt;br /&gt;
* H-Resize: Added SSE2 horizontal unpacker.&lt;br /&gt;
* Resize: Use SSE3 (lddqu) loads for unaligned memory access.&lt;br /&gt;
* Added ultra fast vertical PointResizer (64 pixel/cycle).&lt;br /&gt;
* Added dynamic SSSE3 vertical resizer (16 pixel/cycle) ~ twice as fast as old MMX.&lt;br /&gt;
* Added dynamic SSE2 vertical resizer (16 pixel/cycle).&lt;br /&gt;
* Added dynamic MMX vertical resizer (8 pixel/cycle).&lt;br /&gt;
* Added SSSE3 version for RGB&amp;lt;-&amp;gt;YV24 conversions.&lt;br /&gt;
* Added dynamic compiled MMX/iSSE for RGB&amp;lt;-&amp;gt;YV24 conversions. Speed is approx 200% of C-code.&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* SoftwireHelper: explicit hardware exception handling.&lt;br /&gt;
* Resize: Moved GetResampleFunction into Resamplefunction, to allow overrides.&lt;br /&gt;
* Resampler: Removed dead stlf code.&lt;br /&gt;
* Updated Soundtouch to 1.31 (2.5.8)&lt;br /&gt;
* Put dynamic matrix conversion into separate file.&lt;br /&gt;
* Moved chroma subsampling to image_type section.&lt;br /&gt;
* Added specific error reporting when requesting chromasubsampling with Y8.&lt;br /&gt;
* Split up merge and plane Swappers.&lt;br /&gt;
* Split up Plane transfers into separate classes.&lt;br /&gt;
* Added automatic destination colorspace detection on planar YtoUV.&lt;br /&gt;
* Took out greyscale and RGB32&amp;lt;-&amp;gt;RGB24 from convert.cpp and placed them in separate files.&lt;br /&gt;
* All code assuming UVwidth = Ywidth/2 and similar should be gone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelist]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2901</id>
		<title>Changelist 26</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2901"/>
		<updated>2014-01-04T17:57:36Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Optimizations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Changes from 2.6.0 Alpha 2 to 2.6.0 CVS ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* Added Eval(clip, string name, string) alias for oop processing of argument.&lt;br /&gt;
* DirectShowSource support non-standard pixel types &amp;quot;YV24&amp;quot; and &amp;quot;YV16&amp;quot;.&lt;br /&gt;
* Info: Audio only clip now creates its own canvas video.&lt;br /&gt;
* AviSource: Include packed/padded processing and -ve biHeight logic for compressed input.&lt;br /&gt;
* Add Script Functions :- BitLRotate, BitRRotate, BitChange, BitClear, BitSet, BitTest and their asm aliases.&lt;br /&gt;
* Add WeaveRows (blit cost) and WeaveColumns (slow) frame combining filters.&lt;br /&gt;
* Add AudioDuration() [as float seconds], IsY8(), IsYV411() &amp;amp; PixelType() [as a string] script functions.&lt;br /&gt;
* Add Echo and Preroll filters.&lt;br /&gt;
* Add IScriptEnvironment::GetAVSLinkage() and DLLExport AVS_linkage for host usage of avisynth.dll.&lt;br /&gt;
* DirectShowSource, 2.6 plugin, support pixel types &amp;quot;AYUV&amp;quot; as YV24, &amp;quot;Y41P&amp;quot; and &amp;quot;Y411&amp;quot; as YV411.&lt;br /&gt;
* AviSource: Add Full and Auto pseudo pixel_types. Full is all supported. Auto is YV12, YUY2, RGB32, RGB24 &amp;amp; Y8.&lt;br /&gt;
* Add &amp;quot;AudioLengthS&amp;quot;, &amp;quot;Ord&amp;quot; &amp;amp; &amp;quot;FillStr&amp;quot; script functions.&lt;br /&gt;
* Add AudioTrim(clip, float, float) audio priority trimming, args in fractional seconds.&lt;br /&gt;
* Add Trim(M, Length=N[, Pad=False]) and Trim(M, End=N[, Pad=False]) function overloads for explicit Trimming. Length=0 means zero frame clip. End=0 means end at frame 0.&lt;br /&gt;
* Add SeparateRows (zero cost) and SeparateColumns (slow) frame slashing filters.&lt;br /&gt;
* Add Script Functions :- Acos, Asin, Atan, Atan2, Cosh, Sinh, Tanh, Fmod, Log10, BitLShift, BitRShiftS, BitRShiftU and Hex.&lt;br /&gt;
* Add &amp;quot;ConditionalSelect&amp;quot;,&amp;quot;csc+[show]b&amp;quot; runtime filter.&lt;br /&gt;
* Add dither option to Levels, RGBAdjust &amp;amp; Tweak.&lt;br /&gt;
* Add BitAnd(), BitNot(), BitOr() &amp;amp; BitXor() script functions.&lt;br /&gt;
* Add StrCmp() &amp;amp; StrCmpI() script functions.&lt;br /&gt;
* Add YV24 support for Limiter show option.&lt;br /&gt;
* Add &amp;quot;Global OPT_dwChannelMask={int}&amp;quot;&lt;br /&gt;
* Add 0x0063F speaker mask for 7.1 WAVE_FORMAT_EXTENSIBLE.&lt;br /&gt;
* Add .dll DelayLoad exception texts to crash message formatter.&lt;br /&gt;
* ImageWriter, add support for printf formating of filename string, default is (&amp;quot;%06d.%s&amp;quot;, n, ext);&lt;br /&gt;
* Add avs_get_error(AVS_ScriptEnvironment*); to avisynth_c interface.&lt;br /&gt;
* Catch and save AvisynthError text in more avisynth_c entry points, for kemuri-_9.&lt;br /&gt;
* Add ScriptName(), ScriptFile(), ScriptDir() functions (WarpEnterprises).&lt;br /&gt;
* Add SkewRows filter.&lt;br /&gt;
* Histogram, Levels mode, Improve colour of chroma legends.&lt;br /&gt;
* ConditionalFilter, teach about string results.&lt;br /&gt;
* Add some more &amp;quot;Add/Remove Software&amp;quot; registry keys to the Installer (XhmikosR).&lt;br /&gt;
* AviSource: Support both packed and DWORD padded raw planar input like with DSS.&lt;br /&gt;
* Add IScriptEnvironment::ApplyMessage()&lt;br /&gt;
* Add ImageSourceAnim (Wilbert)&lt;br /&gt;
* Support user upgrade to 178 DevIL.dll (They need to manage CRT dependancies).&lt;br /&gt;
* ImageSource: palette and compressed bmp images load correctly now (issue 894702) [need 178 DevIL.dll]&lt;br /&gt;
* ImageSource: support for other formats like: gif, exr, jp2, psd, hdr [need 178 DevIL.dll]&lt;br /&gt;
* Add YV24 mode to ColorBars.&lt;br /&gt;
* Add ColorBarsHD based on arib_std_b28.&lt;br /&gt;
* C-api usability enhancements from kemuri9 [Work in progress!]&lt;br /&gt;
* Add Undefined(), AudioLengthLo(), AudioLengthHi(), IsYV16() &amp;amp; IsYV24() script functions&lt;br /&gt;
* Allow newlines (and hence comments) before &#039;{&#039; -- Gavino&lt;br /&gt;
* Added IScriptEnvironment::DeleteScriptEnvironment()&lt;br /&gt;
* Added Histogram, population clamp % factor for &amp;quot;Levels&amp;quot; mode,&lt;br /&gt;
* Histogram, revert &amp;quot;Stereo&amp;quot; mode to YV12, Add &amp;quot;StereoY8&amp;quot; mode,&lt;br /&gt;
* AviSource: Support fourcc &amp;quot;GREY&amp;quot; as Y8&lt;br /&gt;
* Add &amp;quot;Global OPT_AVIPadScanlines=True&amp;quot; option for DWORD aligned planar padding&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed frame range clamping in ComparePlane (ultim).&lt;br /&gt;
* Fixed posible leak with realloc in ConditionalReader (ultim).&lt;br /&gt;
* Fixed posible double free in text-overlay (ultim).&lt;br /&gt;
* Fixed RGB32 to Y8 pixel right shift from 4th pixel on (Robert Martens).&lt;br /&gt;
* Fixed Overlay YV24 Image444 leak.&lt;br /&gt;
* Fixed AVISource &amp;quot;AUTO&amp;quot; and &amp;quot;FULL&amp;quot; handling.&lt;br /&gt;
* Fixed ImageSource handling of missing ebmp files.&lt;br /&gt;
* Fixed DirectShowSource incorrect byte order for unpacking of pixel type &amp;quot;AYUV&amp;quot;.&lt;br /&gt;
* Fixed HexValue parsing values greater than 7FFFFFFF, now as unsigned hex.&lt;br /&gt;
* Fixed ConditionalReader memory overrun parsing bools.&lt;br /&gt;
* Fixed ResampleAudio NOP test to compare vi.num_audio_samples, not sample rate.&lt;br /&gt;
* Fixed YV24 -&amp;gt; RGB24 overrun cleanup for widths%16 == 5.&lt;br /&gt;
* Fixed RGB24 AddBorders with right=0.&lt;br /&gt;
* Fixed conditional_functions error message names (Wilbert).&lt;br /&gt;
* Fixed Audio cache ac_expected_next regression.&lt;br /&gt;
* Fixed ImageSource deal with add 1 to IL_NUM_IMAGES bug (Wilbert)&lt;br /&gt;
* Fixed Overlay YV24 V plane conversion.&lt;br /&gt;
* Fixed Overlay YV24 mode with shared input clip, needed a MakeWritable.&lt;br /&gt;
* Fixed ImageReader upside down TIFF in 178 DevIL. (Wilbert)&lt;br /&gt;
* Fixed SaveString &#039;string+string&#039; bug when total length is 4096*K-1, K is +int.&lt;br /&gt;
* Fixed SincResize misuse of &amp;quot;int abs(int)&amp;quot; (Gavino). Fix Lanczos and Blackman sinc use of float == 0.0, use small limit &amp;quot;&amp;gt; 0.000001&amp;quot;.&lt;br /&gt;
* Fixed Classic mode legend drawing for planar right limit and yuy2 centre line.&lt;br /&gt;
* Fixed possible MT race. Use &amp;quot;env-&amp;gt;ManageCache(MC_IncVFBRefcount, ...)&amp;quot; in ProtectVFB.&lt;br /&gt;
* Fixed SwapYToUV output image size bug for 3 clip case.&lt;br /&gt;
* Fixed Crop limit tests for RGB.&lt;br /&gt;
* Fixed Overlay yellow tint on rec601 RGB import conversion.&lt;br /&gt;
* Fixed YtoUV() output image size bug for 3 clip case.&lt;br /&gt;
* Fixed ConvertToPlanar chroma alignment.&lt;br /&gt;
* Fixed Levels (RGB) change use of PixelClip(x) to min(max(x, 0), 255).&lt;br /&gt;
* Fixed SwapYtoUV yuy2 crash (StainlessS).&lt;br /&gt;
* Fixed Overlay saturate UV in add and subtract mode.&lt;br /&gt;
* Fixed Info.h range protect display characters (StainlessS).&lt;br /&gt;
* Fixed AviSource packed planar import chroma offsets.&lt;br /&gt;
* Fixed AviSource NULL GetWritePtr() failure due to premature setting of last_frame.&lt;br /&gt;
* Fixed Mask rounding in greyscale calcs (Wilbert), minor refactor.&lt;br /&gt;
* Fixed SelectRangeEvery audio snafu (Gavino).&lt;br /&gt;
* Fixed LoadPlugin, SaveString of result string.&lt;br /&gt;
* Fixed LoadPlugin, use _vsnprintf.&lt;br /&gt;
* Fixed LoadVirtualdubPlugin, don&#039;t add vdub filter to chain on load failure.&lt;br /&gt;
* Fixed rounding in RGB HResize (JoshyD) (affects all resizers)&lt;br /&gt;
* Fixed error message name in the filter VerticalReduceBy2&lt;br /&gt;
* Fixed SeparateFields() with variable parity input clip (Wilbert)&lt;br /&gt;
* Fixed AviSource, cannot cast__int64* to long*, it does not work!&lt;br /&gt;
* Fixed ConditionalReader: Don&#039;t allow out of range &amp;quot;Range&amp;quot; to overwrite edge values&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* Cache auto increase span on sparse misses.&lt;br /&gt;
* Cache prevent inactive instances returning VFB early and spoiling active instances hit rate (LaTo).&lt;br /&gt;
* ConvertToPlanarGeneric explicit add Cache before chroma rescaler.&lt;br /&gt;
* Overlay minor refactor YV12 -&amp;gt; 444 chroma&lt;br /&gt;
* Speedup ConvertToMono(), minor refactor MixAudio().&lt;br /&gt;
* Change StackVertical/Horizontal to interative instead of recursive, 2^N performace increase for 3 and more clips, i.e. 1 blit total instead of blit(blit(blit(...&lt;br /&gt;
* RGBtoY8 Dynamic ASM code, suport for RGB24.&lt;br /&gt;
* YV24backtoYUY2 Dynamic ASM code.&lt;br /&gt;
* UtoY8, VtoY8 abuse subframe, zero cost.&lt;br /&gt;
* YV24&amp;lt;-&amp;gt;RGB Add SSE2 and SSSE3 code paths, get rid of wide_enough.&lt;br /&gt;
* ConvertToYUY2 Add SSE2, MMX restore full speed on platforms with poor ooox.&lt;br /&gt;
* ConvertAudio, manage tempbuffer and floatbuffer independently.&lt;br /&gt;
* ConvertAudio, prefer SSE2 over 3DNow for super AMD cores.&lt;br /&gt;
* Info.h, full refactor, a good example of &amp;quot;Never look down&amp;quot;, thx StainlessS&lt;br /&gt;
* DoubleWeaveFrames, If A not writable, try to write to B, else make new frame&lt;br /&gt;
* Histogram, fix GetFrame/NewVideoFrame call order&lt;br /&gt;
* HResizer, interleave code +4% faster&lt;br /&gt;
* YtoUV() Abuse Subframe to snatch the Y plane / UV planes, Derestrict destination colorformat autogeneration.&lt;br /&gt;
* ImageSource: Improve thread interlock code&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* Replace _strdup with SaveString in AddFunction (Thanks Gavino)&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* BlankClip: Supply useful defaults for new Audio/Video when using a Video/Audio only template clip.&lt;br /&gt;
* BlankClip: Use duration from Audio only template as default length for new clip.&lt;br /&gt;
* Define new IClip::SetCacheHints cachehint constants.&lt;br /&gt;
* Force int call arguments to user script function float params to be explicit floats.&lt;br /&gt;
* Splice pass CacheHints through to both children in + and ++ mode.&lt;br /&gt;
* WriteFileStart/End save current_frame and set Last.&lt;br /&gt;
* ConditionalReader do not ignore syntax errors in input file.&lt;br /&gt;
* ImageSourceAnim Pad/Crop images to match first frame (Wilbert)&lt;br /&gt;
* ImageSource Add version to messages (Wilbert)&lt;br /&gt;
* Initial 2.6 API entry point linkage.&lt;br /&gt;
* Use Invoke for graph tail, enhance non-clip output error reporting.&lt;br /&gt;
* PopContext when inner block Asserts/throws (maxxon).&lt;br /&gt;
* Remove duplicate definitions (Wilbert)&lt;br /&gt;
* Enhance non-clip output error reporting.&lt;br /&gt;
* Explicitly specify calling sequence as __cdecl for Avisynth softwire routines, (was the compiler default)&lt;br /&gt;
* Use env-&amp;gt;Invoke(&amp;quot;Cache&amp;quot;, ...) everywhere instead of Cache::Create_Cache(), allows for Cache to be overloaded by a plugin.&lt;br /&gt;
* ConvertToYUY2 Change from 0-1-1 kernel to 1-2-1 kernel.&lt;br /&gt;
* Tweak make Interp same units as minSat and maxSat.&lt;br /&gt;
* Check HKEY_CURRENT_USER for PluginDir first. (henktiggelaar)&lt;br /&gt;
* Make forced, -ve, planar alignment of chroma planes match subsampling.&lt;br /&gt;
* Enforce planar alignment restrictions.&lt;br /&gt;
* C-api: Remove func sub-struct from AVS_Library struct&lt;br /&gt;
* Add error code to plugin load failure message&lt;br /&gt;
* Make default planar AVI output packed.&lt;br /&gt;
* WriteFile() now supports unlimited number of unlimited strings. (was 16 by 254 byte strings).&lt;br /&gt;
* ConvertToRGB*, make C++ code sample chroma the same as the MMX code i.e. use both pixels.&lt;br /&gt;
* ConvertToRGB*, use YV24 path for planar, complain when options are present for YUY2.&lt;br /&gt;
* ConvertToYUY2, use YV16 path for planar, complain when options are present for RGB&lt;br /&gt;
** see: http://forum.doom9.org/showthread.php?p=1378381#post1378381&lt;br /&gt;
* Thread safe code, part 2.&lt;br /&gt;
* Correct IClip baked documentation&lt;br /&gt;
* Fix at_exit executon order&lt;br /&gt;
* Passify compilation error/warnings (XhmikosR)&lt;br /&gt;
* for, const, extern and ansi patches for VC2008 (SEt)&lt;br /&gt;
* Disable OPT_RELS_LOGGING option&lt;br /&gt;
* Change implicit Last parsing for argless, bracketless calls to match bracketed cases. (Gavino) [not documented yet ???]&lt;br /&gt;
* DirectShowSource: Support last minute format renegotiation thru IPin::QueryAccept() &amp;amp; Validate the size of the provided directshow buffer.&lt;br /&gt;
* Remove non ascii chars from comments.&lt;br /&gt;
* Add core stubs for DirectShowSource, TCPServer &amp;amp; TCPSource, report when plugins are missing.&lt;br /&gt;
* Add note for original source downloads - SoundTouch&lt;br /&gt;
* Add more lineage history to Info()&lt;br /&gt;
* Move convertaudio, alignplanar, fillborder &amp;amp; MIN/MAX_INT definitions.&lt;br /&gt;
* Run AtExit before dismantling world.&lt;br /&gt;
* Change setcachehints definition from void to int. Test IClip version &amp;gt;= 5.&lt;br /&gt;
* Move PixelClip definition to avisynth.cpp&lt;br /&gt;
* SubTitle, etc, make X &amp;amp; Y options float (0.125 pixel granularity).&lt;br /&gt;
* ShowSMPTE() supports all integer FPS and multiplies of drop frame FPS.&lt;br /&gt;
* SubTitle, stop overwriting string constants (Gavino).&lt;br /&gt;
* SubTitle, improve pixel registration (Gavino).&lt;br /&gt;
* Make Info() CPU display hierarchical.&lt;br /&gt;
* Thread safe code, part 1.&lt;br /&gt;
&lt;br /&gt;
== Changes from 2.5 series to 2.6.0 Alpha 2 ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* Added support for argument passing and EAX return value to SoftwireHelper.&lt;br /&gt;
* Added &amp;quot;Global OPT_VDubPlanarHack=True&amp;quot; to flip YV24 and YV16 chroma planes for old VDub&#039;s.&lt;br /&gt;
* Added ContinuedDenominator/ContinuedNumerator(f[]i[limit]i) script functions.&lt;br /&gt;
* Tweak: fix MaskPointResizing + put back Dividee ISSE code (use sse=true, can&#039;t use all settings in that case).&lt;br /&gt;
* Added ChromaInPlacement, ChromaOutPlacement and ChromaResample options to planar colour conversions.&lt;br /&gt;
* Added MaskHS.&lt;br /&gt;
* Minor tweaks to get ready for VC8.&lt;br /&gt;
* Add Y8 for DevIL, planarize EBMP.&lt;br /&gt;
* Planar support for many filters.&lt;br /&gt;
* Added Info() time indicator on audio length and video (current frame &amp;amp; total). (2.5.8)&lt;br /&gt;
* Added UtoY8 and VtoY8.&lt;br /&gt;
* Added more info to Info(). (2.5.8)&lt;br /&gt;
* ColorYUV: Added all adjustment parameters as conditional variables &amp;quot;coloryuv_SETTING&amp;quot;. Enable by setting conditional=true.&lt;br /&gt;
* ConditionalReader: Added support for type String.&lt;br /&gt;
* ConditionalReader: Added offset keyword to offset all frame numbers after the keyword.&lt;br /&gt;
* Added SincResize() with optional taps parameter (default is 4).&lt;br /&gt;
* Added Custom band setting to SuperEQ to allow all 16 bands to be set from script. Usage: SuperEQ(clip,band1, band2, band3....) values are dB in float.&lt;br /&gt;
* Added fast 0-1-0 kernel for YV24 to ConvertBacktoYUY2().&lt;br /&gt;
* Added formats: YV24, YV16, Y8, YV411.&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed MonoToStereo with stereo sources.&lt;br /&gt;
* Fixed MergeChannels with only 1 input clip.&lt;br /&gt;
* Fixed support for negative height DIB format AVI&#039;s. (Oops still not quite right yet)&lt;br /&gt;
* Fixed Audio cache crashes.&lt;br /&gt;
* Fixed resize with YV411 missing code.&lt;br /&gt;
* Fixed ConditionalReader rounding with integer Interpolation.&lt;br /&gt;
* Fixed Softwire SSE2 bugs.&lt;br /&gt;
* Fixed SSSE3 CPU detection.&lt;br /&gt;
* Fixed SSSE3, SSE4.1 &amp;amp; SSE4.2 detection.&lt;br /&gt;
* Fixed Fastwire encoding of instructions that are &amp;gt;2 opcodes (SSSE3+4).&lt;br /&gt;
* Fixed _RPT5() macro for debug builds&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* SuperEQ: Improve channel unpacking/packing code.&lt;br /&gt;
* H-Resize: Use SSE4.1 (movntdqa) loads for use once memory access.&lt;br /&gt;
* H-Resize: Added SSE2 horizontal unpacker.&lt;br /&gt;
* Resize: Use SSE3 (lddqu) loads for unaligned memory access.&lt;br /&gt;
* Added ultra fast vertical PointResizer (64 pixel/cycle).&lt;br /&gt;
* Added dynamic SSSE3 vertical resizer (16 pixel/cycle) ~ twice as fast as old MMX.&lt;br /&gt;
* Added dynamic SSE2 vertical resizer (16 pixel/cycle).&lt;br /&gt;
* Added dynamic MMX vertical resizer (8 pixel/cycle).&lt;br /&gt;
* Added SSSE3 version for RGB&amp;lt;-&amp;gt;YV24 conversions.&lt;br /&gt;
* Added dynamic compiled MMX/iSSE for RGB&amp;lt;-&amp;gt;YV24 conversions. Speed is approx 200% of C-code.&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* SoftwireHelper: explicit hardware exception handling.&lt;br /&gt;
* Resize: Moved GetResampleFunction into Resamplefunction, to allow overrides.&lt;br /&gt;
* Resampler: Removed dead stlf code.&lt;br /&gt;
* Updated Soundtouch to 1.31 (2.5.8)&lt;br /&gt;
* Put dynamic matrix conversion into separate file.&lt;br /&gt;
* Moved chroma subsampling to image_type section.&lt;br /&gt;
* Added specific error reporting when requesting chromasubsampling with Y8.&lt;br /&gt;
* Split up merge and plane Swappers.&lt;br /&gt;
* Split up Plane transfers into separate classes.&lt;br /&gt;
* Added automatic destination colorspace detection on planar YtoUV.&lt;br /&gt;
* Took out greyscale and RGB32&amp;lt;-&amp;gt;RGB24 from convert.cpp and placed them in separate files.&lt;br /&gt;
* All code assuming UVwidth = Ywidth/2 and similar should be gone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelist]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2900</id>
		<title>Changelist 26</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2900"/>
		<updated>2014-01-04T17:54:46Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Additions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Changes from 2.6.0 Alpha 2 to 2.6.0 CVS ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* Added Eval(clip, string name, string) alias for oop processing of argument.&lt;br /&gt;
* DirectShowSource support non-standard pixel types &amp;quot;YV24&amp;quot; and &amp;quot;YV16&amp;quot;.&lt;br /&gt;
* Info: Audio only clip now creates its own canvas video.&lt;br /&gt;
* AviSource: Include packed/padded processing and -ve biHeight logic for compressed input.&lt;br /&gt;
* Add Script Functions :- BitLRotate, BitRRotate, BitChange, BitClear, BitSet, BitTest and their asm aliases.&lt;br /&gt;
* Add WeaveRows (blit cost) and WeaveColumns (slow) frame combining filters.&lt;br /&gt;
* Add AudioDuration() [as float seconds], IsY8(), IsYV411() &amp;amp; PixelType() [as a string] script functions.&lt;br /&gt;
* Add Echo and Preroll filters.&lt;br /&gt;
* Add IScriptEnvironment::GetAVSLinkage() and DLLExport AVS_linkage for host usage of avisynth.dll.&lt;br /&gt;
* DirectShowSource, 2.6 plugin, support pixel types &amp;quot;AYUV&amp;quot; as YV24, &amp;quot;Y41P&amp;quot; and &amp;quot;Y411&amp;quot; as YV411.&lt;br /&gt;
* AviSource: Add Full and Auto pseudo pixel_types. Full is all supported. Auto is YV12, YUY2, RGB32, RGB24 &amp;amp; Y8.&lt;br /&gt;
* Add &amp;quot;AudioLengthS&amp;quot;, &amp;quot;Ord&amp;quot; &amp;amp; &amp;quot;FillStr&amp;quot; script functions.&lt;br /&gt;
* Add AudioTrim(clip, float, float) audio priority trimming, args in fractional seconds.&lt;br /&gt;
* Add Trim(M, Length=N[, Pad=False]) and Trim(M, End=N[, Pad=False]) function overloads for explicit Trimming. Length=0 means zero frame clip. End=0 means end at frame 0.&lt;br /&gt;
* Add SeparateRows (zero cost) and SeparateColumns (slow) frame slashing filters.&lt;br /&gt;
* Add Script Functions :- Acos, Asin, Atan, Atan2, Cosh, Sinh, Tanh, Fmod, Log10, BitLShift, BitRShiftS, BitRShiftU and Hex.&lt;br /&gt;
* Add &amp;quot;ConditionalSelect&amp;quot;,&amp;quot;csc+[show]b&amp;quot; runtime filter.&lt;br /&gt;
* Add dither option to Levels, RGBAdjust &amp;amp; Tweak.&lt;br /&gt;
* Add BitAnd(), BitNot(), BitOr() &amp;amp; BitXor() script functions.&lt;br /&gt;
* Add StrCmp() &amp;amp; StrCmpI() script functions.&lt;br /&gt;
* Add YV24 support for Limiter show option.&lt;br /&gt;
* Add &amp;quot;Global OPT_dwChannelMask={int}&amp;quot;&lt;br /&gt;
* Add 0x0063F speaker mask for 7.1 WAVE_FORMAT_EXTENSIBLE.&lt;br /&gt;
* Add .dll DelayLoad exception texts to crash message formatter.&lt;br /&gt;
* ImageWriter, add support for printf formating of filename string, default is (&amp;quot;%06d.%s&amp;quot;, n, ext);&lt;br /&gt;
* Add avs_get_error(AVS_ScriptEnvironment*); to avisynth_c interface.&lt;br /&gt;
* Catch and save AvisynthError text in more avisynth_c entry points, for kemuri-_9.&lt;br /&gt;
* Add ScriptName(), ScriptFile(), ScriptDir() functions (WarpEnterprises).&lt;br /&gt;
* Add SkewRows filter.&lt;br /&gt;
* Histogram, Levels mode, Improve colour of chroma legends.&lt;br /&gt;
* ConditionalFilter, teach about string results.&lt;br /&gt;
* Add some more &amp;quot;Add/Remove Software&amp;quot; registry keys to the Installer (XhmikosR).&lt;br /&gt;
* AviSource: Support both packed and DWORD padded raw planar input like with DSS.&lt;br /&gt;
* Add IScriptEnvironment::ApplyMessage()&lt;br /&gt;
* Add ImageSourceAnim (Wilbert)&lt;br /&gt;
* Support user upgrade to 178 DevIL.dll (They need to manage CRT dependancies).&lt;br /&gt;
* ImageSource: palette and compressed bmp images load correctly now (issue 894702) [need 178 DevIL.dll]&lt;br /&gt;
* ImageSource: support for other formats like: gif, exr, jp2, psd, hdr [need 178 DevIL.dll]&lt;br /&gt;
* Add YV24 mode to ColorBars.&lt;br /&gt;
* Add ColorBarsHD based on arib_std_b28.&lt;br /&gt;
* C-api usability enhancements from kemuri9 [Work in progress!]&lt;br /&gt;
* Add Undefined(), AudioLengthLo(), AudioLengthHi(), IsYV16() &amp;amp; IsYV24() script functions&lt;br /&gt;
* Allow newlines (and hence comments) before &#039;{&#039; -- Gavino&lt;br /&gt;
* Added IScriptEnvironment::DeleteScriptEnvironment()&lt;br /&gt;
* Added Histogram, population clamp % factor for &amp;quot;Levels&amp;quot; mode,&lt;br /&gt;
* Histogram, revert &amp;quot;Stereo&amp;quot; mode to YV12, Add &amp;quot;StereoY8&amp;quot; mode,&lt;br /&gt;
* AviSource: Support fourcc &amp;quot;GREY&amp;quot; as Y8&lt;br /&gt;
* Add &amp;quot;Global OPT_AVIPadScanlines=True&amp;quot; option for DWORD aligned planar padding&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed frame range clamping in ComparePlane (ultim).&lt;br /&gt;
* Fixed posible leak with realloc in ConditionalReader (ultim).&lt;br /&gt;
* Fixed posible double free in text-overlay (ultim).&lt;br /&gt;
* Fixed RGB32 to Y8 pixel right shift from 4th pixel on (Robert Martens).&lt;br /&gt;
* Fixed Overlay YV24 Image444 leak.&lt;br /&gt;
* Fixed AVISource &amp;quot;AUTO&amp;quot; and &amp;quot;FULL&amp;quot; handling.&lt;br /&gt;
* Fixed ImageSource handling of missing ebmp files.&lt;br /&gt;
* Fixed DirectShowSource incorrect byte order for unpacking of pixel type &amp;quot;AYUV&amp;quot;.&lt;br /&gt;
* Fixed HexValue parsing values greater than 7FFFFFFF, now as unsigned hex.&lt;br /&gt;
* Fixed ConditionalReader memory overrun parsing bools.&lt;br /&gt;
* Fixed ResampleAudio NOP test to compare vi.num_audio_samples, not sample rate.&lt;br /&gt;
* Fixed YV24 -&amp;gt; RGB24 overrun cleanup for widths%16 == 5.&lt;br /&gt;
* Fixed RGB24 AddBorders with right=0.&lt;br /&gt;
* Fixed conditional_functions error message names (Wilbert).&lt;br /&gt;
* Fixed Audio cache ac_expected_next regression.&lt;br /&gt;
* Fixed ImageSource deal with add 1 to IL_NUM_IMAGES bug (Wilbert)&lt;br /&gt;
* Fixed Overlay YV24 V plane conversion.&lt;br /&gt;
* Fixed Overlay YV24 mode with shared input clip, needed a MakeWritable.&lt;br /&gt;
* Fixed ImageReader upside down TIFF in 178 DevIL. (Wilbert)&lt;br /&gt;
* Fixed SaveString &#039;string+string&#039; bug when total length is 4096*K-1, K is +int.&lt;br /&gt;
* Fixed SincResize misuse of &amp;quot;int abs(int)&amp;quot; (Gavino). Fix Lanczos and Blackman sinc use of float == 0.0, use small limit &amp;quot;&amp;gt; 0.000001&amp;quot;.&lt;br /&gt;
* Fixed Classic mode legend drawing for planar right limit and yuy2 centre line.&lt;br /&gt;
* Fixed possible MT race. Use &amp;quot;env-&amp;gt;ManageCache(MC_IncVFBRefcount, ...)&amp;quot; in ProtectVFB.&lt;br /&gt;
* Fixed SwapYToUV output image size bug for 3 clip case.&lt;br /&gt;
* Fixed Crop limit tests for RGB.&lt;br /&gt;
* Fixed Overlay yellow tint on rec601 RGB import conversion.&lt;br /&gt;
* Fixed YtoUV() output image size bug for 3 clip case.&lt;br /&gt;
* Fixed ConvertToPlanar chroma alignment.&lt;br /&gt;
* Fixed Levels (RGB) change use of PixelClip(x) to min(max(x, 0), 255).&lt;br /&gt;
* Fixed SwapYtoUV yuy2 crash (StainlessS).&lt;br /&gt;
* Fixed Overlay saturate UV in add and subtract mode.&lt;br /&gt;
* Fixed Info.h range protect display characters (StainlessS).&lt;br /&gt;
* Fixed AviSource packed planar import chroma offsets.&lt;br /&gt;
* Fixed AviSource NULL GetWritePtr() failure due to premature setting of last_frame.&lt;br /&gt;
* Fixed Mask rounding in greyscale calcs (Wilbert), minor refactor.&lt;br /&gt;
* Fixed SelectRangeEvery audio snafu (Gavino).&lt;br /&gt;
* Fixed LoadPlugin, SaveString of result string.&lt;br /&gt;
* Fixed LoadPlugin, use _vsnprintf.&lt;br /&gt;
* Fixed LoadVirtualdubPlugin, don&#039;t add vdub filter to chain on load failure.&lt;br /&gt;
* Fixed rounding in RGB HResize (JoshyD) (affects all resizers)&lt;br /&gt;
* Fixed error message name in the filter VerticalReduceBy2&lt;br /&gt;
* Fixed SeparateFields() with variable parity input clip (Wilbert)&lt;br /&gt;
* Fixed AviSource, cannot cast__int64* to long*, it does not work!&lt;br /&gt;
* Fixed ConditionalReader: Don&#039;t allow out of range &amp;quot;Range&amp;quot; to overwrite edge values&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* ConvertToPlanarGeneric explicit add Cache before chroma rescaler.&lt;br /&gt;
* Overlay minor refactor YV12 -&amp;gt; 444 chroma&lt;br /&gt;
* Speedup ConvertToMono(), minor refactor MixAudio().&lt;br /&gt;
* Change StackVertical/Horizontal to interative instead of recursive, 2^N performace increase for 3 and more clips, i.e. 1 blit total instead of blit(blit(blit(...&lt;br /&gt;
* RGBtoY8 Dynamic ASM code, suport for RGB24.&lt;br /&gt;
* YV24backtoYUY2 Dynamic ASM code.&lt;br /&gt;
* UtoY8, VtoY8 abuse subframe, zero cost.&lt;br /&gt;
* YV24&amp;lt;-&amp;gt;RGB Add SSE2 and SSSE3 code paths, get rid of wide_enough.&lt;br /&gt;
* ConvertToYUY2 Add SSE2, MMX restore full speed on platforms with poor ooox.&lt;br /&gt;
* ConvertAudio, manage tempbuffer and floatbuffer independently.&lt;br /&gt;
* ConvertAudio, prefer SSE2 over 3DNow for super AMD cores.&lt;br /&gt;
* Info.h, full refactor, a good example of &amp;quot;Never look down&amp;quot;, thx StainlessS&lt;br /&gt;
* DoubleWeaveFrames, If A not writable, try to write to B, else make new frame&lt;br /&gt;
* Histogram, fix GetFrame/NewVideoFrame call order&lt;br /&gt;
* HResizer, interleave code +4% faster&lt;br /&gt;
* YtoUV() Abuse Subframe to snatch the Y plane / UV planes, Derestrict destination colorformat autogeneration.&lt;br /&gt;
* ImageSource: Improve thread interlock code&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* Replace _strdup with SaveString in AddFunction (Thanks Gavino)&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* BlankClip: Supply useful defaults for new Audio/Video when using a Video/Audio only template clip.&lt;br /&gt;
* BlankClip: Use duration from Audio only template as default length for new clip.&lt;br /&gt;
* Define new IClip::SetCacheHints cachehint constants.&lt;br /&gt;
* Force int call arguments to user script function float params to be explicit floats.&lt;br /&gt;
* Splice pass CacheHints through to both children in + and ++ mode.&lt;br /&gt;
* WriteFileStart/End save current_frame and set Last.&lt;br /&gt;
* ConditionalReader do not ignore syntax errors in input file.&lt;br /&gt;
* ImageSourceAnim Pad/Crop images to match first frame (Wilbert)&lt;br /&gt;
* ImageSource Add version to messages (Wilbert)&lt;br /&gt;
* Initial 2.6 API entry point linkage.&lt;br /&gt;
* Use Invoke for graph tail, enhance non-clip output error reporting.&lt;br /&gt;
* PopContext when inner block Asserts/throws (maxxon).&lt;br /&gt;
* Remove duplicate definitions (Wilbert)&lt;br /&gt;
* Enhance non-clip output error reporting.&lt;br /&gt;
* Explicitly specify calling sequence as __cdecl for Avisynth softwire routines, (was the compiler default)&lt;br /&gt;
* Use env-&amp;gt;Invoke(&amp;quot;Cache&amp;quot;, ...) everywhere instead of Cache::Create_Cache(), allows for Cache to be overloaded by a plugin.&lt;br /&gt;
* ConvertToYUY2 Change from 0-1-1 kernel to 1-2-1 kernel.&lt;br /&gt;
* Tweak make Interp same units as minSat and maxSat.&lt;br /&gt;
* Check HKEY_CURRENT_USER for PluginDir first. (henktiggelaar)&lt;br /&gt;
* Make forced, -ve, planar alignment of chroma planes match subsampling.&lt;br /&gt;
* Enforce planar alignment restrictions.&lt;br /&gt;
* C-api: Remove func sub-struct from AVS_Library struct&lt;br /&gt;
* Add error code to plugin load failure message&lt;br /&gt;
* Make default planar AVI output packed.&lt;br /&gt;
* WriteFile() now supports unlimited number of unlimited strings. (was 16 by 254 byte strings).&lt;br /&gt;
* ConvertToRGB*, make C++ code sample chroma the same as the MMX code i.e. use both pixels.&lt;br /&gt;
* ConvertToRGB*, use YV24 path for planar, complain when options are present for YUY2.&lt;br /&gt;
* ConvertToYUY2, use YV16 path for planar, complain when options are present for RGB&lt;br /&gt;
** see: http://forum.doom9.org/showthread.php?p=1378381#post1378381&lt;br /&gt;
* Thread safe code, part 2.&lt;br /&gt;
* Correct IClip baked documentation&lt;br /&gt;
* Fix at_exit executon order&lt;br /&gt;
* Passify compilation error/warnings (XhmikosR)&lt;br /&gt;
* for, const, extern and ansi patches for VC2008 (SEt)&lt;br /&gt;
* Disable OPT_RELS_LOGGING option&lt;br /&gt;
* Change implicit Last parsing for argless, bracketless calls to match bracketed cases. (Gavino) [not documented yet ???]&lt;br /&gt;
* DirectShowSource: Support last minute format renegotiation thru IPin::QueryAccept() &amp;amp; Validate the size of the provided directshow buffer.&lt;br /&gt;
* Remove non ascii chars from comments.&lt;br /&gt;
* Add core stubs for DirectShowSource, TCPServer &amp;amp; TCPSource, report when plugins are missing.&lt;br /&gt;
* Add note for original source downloads - SoundTouch&lt;br /&gt;
* Add more lineage history to Info()&lt;br /&gt;
* Move convertaudio, alignplanar, fillborder &amp;amp; MIN/MAX_INT definitions.&lt;br /&gt;
* Run AtExit before dismantling world.&lt;br /&gt;
* Change setcachehints definition from void to int. Test IClip version &amp;gt;= 5.&lt;br /&gt;
* Move PixelClip definition to avisynth.cpp&lt;br /&gt;
* SubTitle, etc, make X &amp;amp; Y options float (0.125 pixel granularity).&lt;br /&gt;
* ShowSMPTE() supports all integer FPS and multiplies of drop frame FPS.&lt;br /&gt;
* SubTitle, stop overwriting string constants (Gavino).&lt;br /&gt;
* SubTitle, improve pixel registration (Gavino).&lt;br /&gt;
* Make Info() CPU display hierarchical.&lt;br /&gt;
* Thread safe code, part 1.&lt;br /&gt;
&lt;br /&gt;
== Changes from 2.5 series to 2.6.0 Alpha 2 ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* Added support for argument passing and EAX return value to SoftwireHelper.&lt;br /&gt;
* Added &amp;quot;Global OPT_VDubPlanarHack=True&amp;quot; to flip YV24 and YV16 chroma planes for old VDub&#039;s.&lt;br /&gt;
* Added ContinuedDenominator/ContinuedNumerator(f[]i[limit]i) script functions.&lt;br /&gt;
* Tweak: fix MaskPointResizing + put back Dividee ISSE code (use sse=true, can&#039;t use all settings in that case).&lt;br /&gt;
* Added ChromaInPlacement, ChromaOutPlacement and ChromaResample options to planar colour conversions.&lt;br /&gt;
* Added MaskHS.&lt;br /&gt;
* Minor tweaks to get ready for VC8.&lt;br /&gt;
* Add Y8 for DevIL, planarize EBMP.&lt;br /&gt;
* Planar support for many filters.&lt;br /&gt;
* Added Info() time indicator on audio length and video (current frame &amp;amp; total). (2.5.8)&lt;br /&gt;
* Added UtoY8 and VtoY8.&lt;br /&gt;
* Added more info to Info(). (2.5.8)&lt;br /&gt;
* ColorYUV: Added all adjustment parameters as conditional variables &amp;quot;coloryuv_SETTING&amp;quot;. Enable by setting conditional=true.&lt;br /&gt;
* ConditionalReader: Added support for type String.&lt;br /&gt;
* ConditionalReader: Added offset keyword to offset all frame numbers after the keyword.&lt;br /&gt;
* Added SincResize() with optional taps parameter (default is 4).&lt;br /&gt;
* Added Custom band setting to SuperEQ to allow all 16 bands to be set from script. Usage: SuperEQ(clip,band1, band2, band3....) values are dB in float.&lt;br /&gt;
* Added fast 0-1-0 kernel for YV24 to ConvertBacktoYUY2().&lt;br /&gt;
* Added formats: YV24, YV16, Y8, YV411.&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed MonoToStereo with stereo sources.&lt;br /&gt;
* Fixed MergeChannels with only 1 input clip.&lt;br /&gt;
* Fixed support for negative height DIB format AVI&#039;s. (Oops still not quite right yet)&lt;br /&gt;
* Fixed Audio cache crashes.&lt;br /&gt;
* Fixed resize with YV411 missing code.&lt;br /&gt;
* Fixed ConditionalReader rounding with integer Interpolation.&lt;br /&gt;
* Fixed Softwire SSE2 bugs.&lt;br /&gt;
* Fixed SSSE3 CPU detection.&lt;br /&gt;
* Fixed SSSE3, SSE4.1 &amp;amp; SSE4.2 detection.&lt;br /&gt;
* Fixed Fastwire encoding of instructions that are &amp;gt;2 opcodes (SSSE3+4).&lt;br /&gt;
* Fixed _RPT5() macro for debug builds&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* SuperEQ: Improve channel unpacking/packing code.&lt;br /&gt;
* H-Resize: Use SSE4.1 (movntdqa) loads for use once memory access.&lt;br /&gt;
* H-Resize: Added SSE2 horizontal unpacker.&lt;br /&gt;
* Resize: Use SSE3 (lddqu) loads for unaligned memory access.&lt;br /&gt;
* Added ultra fast vertical PointResizer (64 pixel/cycle).&lt;br /&gt;
* Added dynamic SSSE3 vertical resizer (16 pixel/cycle) ~ twice as fast as old MMX.&lt;br /&gt;
* Added dynamic SSE2 vertical resizer (16 pixel/cycle).&lt;br /&gt;
* Added dynamic MMX vertical resizer (8 pixel/cycle).&lt;br /&gt;
* Added SSSE3 version for RGB&amp;lt;-&amp;gt;YV24 conversions.&lt;br /&gt;
* Added dynamic compiled MMX/iSSE for RGB&amp;lt;-&amp;gt;YV24 conversions. Speed is approx 200% of C-code.&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* SoftwireHelper: explicit hardware exception handling.&lt;br /&gt;
* Resize: Moved GetResampleFunction into Resamplefunction, to allow overrides.&lt;br /&gt;
* Resampler: Removed dead stlf code.&lt;br /&gt;
* Updated Soundtouch to 1.31 (2.5.8)&lt;br /&gt;
* Put dynamic matrix conversion into separate file.&lt;br /&gt;
* Moved chroma subsampling to image_type section.&lt;br /&gt;
* Added specific error reporting when requesting chromasubsampling with Y8.&lt;br /&gt;
* Split up merge and plane Swappers.&lt;br /&gt;
* Split up Plane transfers into separate classes.&lt;br /&gt;
* Added automatic destination colorspace detection on planar YtoUV.&lt;br /&gt;
* Took out greyscale and RGB32&amp;lt;-&amp;gt;RGB24 from convert.cpp and placed them in separate files.&lt;br /&gt;
* All code assuming UVwidth = Ywidth/2 and similar should be gone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelist]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2899</id>
		<title>Changelist 26</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Changelist_26&amp;diff=2899"/>
		<updated>2014-01-04T17:53:55Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Bugfixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Changes from 2.6.0 Alpha 2 to 2.6.0 CVS ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* DirectShowSource support non-standard pixel types &amp;quot;YV24&amp;quot; and &amp;quot;YV16&amp;quot;.&lt;br /&gt;
* Info: Audio only clip now creates its own canvas video.&lt;br /&gt;
* AviSource: Include packed/padded processing and -ve biHeight logic for compressed input.&lt;br /&gt;
* Add Script Functions :- BitLRotate, BitRRotate, BitChange, BitClear, BitSet, BitTest and their asm aliases.&lt;br /&gt;
* Add WeaveRows (blit cost) and WeaveColumns (slow) frame combining filters.&lt;br /&gt;
* Add AudioDuration() [as float seconds], IsY8(), IsYV411() &amp;amp; PixelType() [as a string] script functions.&lt;br /&gt;
* Add Echo and Preroll filters.&lt;br /&gt;
* Add IScriptEnvironment::GetAVSLinkage() and DLLExport AVS_linkage for host usage of avisynth.dll.&lt;br /&gt;
* DirectShowSource, 2.6 plugin, support pixel types &amp;quot;AYUV&amp;quot; as YV24, &amp;quot;Y41P&amp;quot; and &amp;quot;Y411&amp;quot; as YV411.&lt;br /&gt;
* AviSource: Add Full and Auto pseudo pixel_types. Full is all supported. Auto is YV12, YUY2, RGB32, RGB24 &amp;amp; Y8.&lt;br /&gt;
* Add &amp;quot;AudioLengthS&amp;quot;, &amp;quot;Ord&amp;quot; &amp;amp; &amp;quot;FillStr&amp;quot; script functions.&lt;br /&gt;
* Add AudioTrim(clip, float, float) audio priority trimming, args in fractional seconds.&lt;br /&gt;
* Add Trim(M, Length=N[, Pad=False]) and Trim(M, End=N[, Pad=False]) function overloads for explicit Trimming. Length=0 means zero frame clip. End=0 means end at frame 0.&lt;br /&gt;
* Add SeparateRows (zero cost) and SeparateColumns (slow) frame slashing filters.&lt;br /&gt;
* Add Script Functions :- Acos, Asin, Atan, Atan2, Cosh, Sinh, Tanh, Fmod, Log10, BitLShift, BitRShiftS, BitRShiftU and Hex.&lt;br /&gt;
* Add &amp;quot;ConditionalSelect&amp;quot;,&amp;quot;csc+[show]b&amp;quot; runtime filter.&lt;br /&gt;
* Add dither option to Levels, RGBAdjust &amp;amp; Tweak.&lt;br /&gt;
* Add BitAnd(), BitNot(), BitOr() &amp;amp; BitXor() script functions.&lt;br /&gt;
* Add StrCmp() &amp;amp; StrCmpI() script functions.&lt;br /&gt;
* Add YV24 support for Limiter show option.&lt;br /&gt;
* Add &amp;quot;Global OPT_dwChannelMask={int}&amp;quot;&lt;br /&gt;
* Add 0x0063F speaker mask for 7.1 WAVE_FORMAT_EXTENSIBLE.&lt;br /&gt;
* Add .dll DelayLoad exception texts to crash message formatter.&lt;br /&gt;
* ImageWriter, add support for printf formating of filename string, default is (&amp;quot;%06d.%s&amp;quot;, n, ext);&lt;br /&gt;
* Add avs_get_error(AVS_ScriptEnvironment*); to avisynth_c interface.&lt;br /&gt;
* Catch and save AvisynthError text in more avisynth_c entry points, for kemuri-_9.&lt;br /&gt;
* Add ScriptName(), ScriptFile(), ScriptDir() functions (WarpEnterprises).&lt;br /&gt;
* Add SkewRows filter.&lt;br /&gt;
* Histogram, Levels mode, Improve colour of chroma legends.&lt;br /&gt;
* ConditionalFilter, teach about string results.&lt;br /&gt;
* Add some more &amp;quot;Add/Remove Software&amp;quot; registry keys to the Installer (XhmikosR).&lt;br /&gt;
* AviSource: Support both packed and DWORD padded raw planar input like with DSS.&lt;br /&gt;
* Add IScriptEnvironment::ApplyMessage()&lt;br /&gt;
* Add ImageSourceAnim (Wilbert)&lt;br /&gt;
* Support user upgrade to 178 DevIL.dll (They need to manage CRT dependancies).&lt;br /&gt;
* ImageSource: palette and compressed bmp images load correctly now (issue 894702) [need 178 DevIL.dll]&lt;br /&gt;
* ImageSource: support for other formats like: gif, exr, jp2, psd, hdr [need 178 DevIL.dll]&lt;br /&gt;
* Add YV24 mode to ColorBars.&lt;br /&gt;
* Add ColorBarsHD based on arib_std_b28.&lt;br /&gt;
* C-api usability enhancements from kemuri9 [Work in progress!]&lt;br /&gt;
* Add Undefined(), AudioLengthLo(), AudioLengthHi(), IsYV16() &amp;amp; IsYV24() script functions&lt;br /&gt;
* Allow newlines (and hence comments) before &#039;{&#039; -- Gavino&lt;br /&gt;
* Added IScriptEnvironment::DeleteScriptEnvironment()&lt;br /&gt;
* Added Histogram, population clamp % factor for &amp;quot;Levels&amp;quot; mode,&lt;br /&gt;
* Histogram, revert &amp;quot;Stereo&amp;quot; mode to YV12, Add &amp;quot;StereoY8&amp;quot; mode,&lt;br /&gt;
* AviSource: Support fourcc &amp;quot;GREY&amp;quot; as Y8&lt;br /&gt;
* Add &amp;quot;Global OPT_AVIPadScanlines=True&amp;quot; option for DWORD aligned planar padding&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed frame range clamping in ComparePlane (ultim).&lt;br /&gt;
* Fixed posible leak with realloc in ConditionalReader (ultim).&lt;br /&gt;
* Fixed posible double free in text-overlay (ultim).&lt;br /&gt;
* Fixed RGB32 to Y8 pixel right shift from 4th pixel on (Robert Martens).&lt;br /&gt;
* Fixed Overlay YV24 Image444 leak.&lt;br /&gt;
* Fixed AVISource &amp;quot;AUTO&amp;quot; and &amp;quot;FULL&amp;quot; handling.&lt;br /&gt;
* Fixed ImageSource handling of missing ebmp files.&lt;br /&gt;
* Fixed DirectShowSource incorrect byte order for unpacking of pixel type &amp;quot;AYUV&amp;quot;.&lt;br /&gt;
* Fixed HexValue parsing values greater than 7FFFFFFF, now as unsigned hex.&lt;br /&gt;
* Fixed ConditionalReader memory overrun parsing bools.&lt;br /&gt;
* Fixed ResampleAudio NOP test to compare vi.num_audio_samples, not sample rate.&lt;br /&gt;
* Fixed YV24 -&amp;gt; RGB24 overrun cleanup for widths%16 == 5.&lt;br /&gt;
* Fixed RGB24 AddBorders with right=0.&lt;br /&gt;
* Fixed conditional_functions error message names (Wilbert).&lt;br /&gt;
* Fixed Audio cache ac_expected_next regression.&lt;br /&gt;
* Fixed ImageSource deal with add 1 to IL_NUM_IMAGES bug (Wilbert)&lt;br /&gt;
* Fixed Overlay YV24 V plane conversion.&lt;br /&gt;
* Fixed Overlay YV24 mode with shared input clip, needed a MakeWritable.&lt;br /&gt;
* Fixed ImageReader upside down TIFF in 178 DevIL. (Wilbert)&lt;br /&gt;
* Fixed SaveString &#039;string+string&#039; bug when total length is 4096*K-1, K is +int.&lt;br /&gt;
* Fixed SincResize misuse of &amp;quot;int abs(int)&amp;quot; (Gavino). Fix Lanczos and Blackman sinc use of float == 0.0, use small limit &amp;quot;&amp;gt; 0.000001&amp;quot;.&lt;br /&gt;
* Fixed Classic mode legend drawing for planar right limit and yuy2 centre line.&lt;br /&gt;
* Fixed possible MT race. Use &amp;quot;env-&amp;gt;ManageCache(MC_IncVFBRefcount, ...)&amp;quot; in ProtectVFB.&lt;br /&gt;
* Fixed SwapYToUV output image size bug for 3 clip case.&lt;br /&gt;
* Fixed Crop limit tests for RGB.&lt;br /&gt;
* Fixed Overlay yellow tint on rec601 RGB import conversion.&lt;br /&gt;
* Fixed YtoUV() output image size bug for 3 clip case.&lt;br /&gt;
* Fixed ConvertToPlanar chroma alignment.&lt;br /&gt;
* Fixed Levels (RGB) change use of PixelClip(x) to min(max(x, 0), 255).&lt;br /&gt;
* Fixed SwapYtoUV yuy2 crash (StainlessS).&lt;br /&gt;
* Fixed Overlay saturate UV in add and subtract mode.&lt;br /&gt;
* Fixed Info.h range protect display characters (StainlessS).&lt;br /&gt;
* Fixed AviSource packed planar import chroma offsets.&lt;br /&gt;
* Fixed AviSource NULL GetWritePtr() failure due to premature setting of last_frame.&lt;br /&gt;
* Fixed Mask rounding in greyscale calcs (Wilbert), minor refactor.&lt;br /&gt;
* Fixed SelectRangeEvery audio snafu (Gavino).&lt;br /&gt;
* Fixed LoadPlugin, SaveString of result string.&lt;br /&gt;
* Fixed LoadPlugin, use _vsnprintf.&lt;br /&gt;
* Fixed LoadVirtualdubPlugin, don&#039;t add vdub filter to chain on load failure.&lt;br /&gt;
* Fixed rounding in RGB HResize (JoshyD) (affects all resizers)&lt;br /&gt;
* Fixed error message name in the filter VerticalReduceBy2&lt;br /&gt;
* Fixed SeparateFields() with variable parity input clip (Wilbert)&lt;br /&gt;
* Fixed AviSource, cannot cast__int64* to long*, it does not work!&lt;br /&gt;
* Fixed ConditionalReader: Don&#039;t allow out of range &amp;quot;Range&amp;quot; to overwrite edge values&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* ConvertToPlanarGeneric explicit add Cache before chroma rescaler.&lt;br /&gt;
* Overlay minor refactor YV12 -&amp;gt; 444 chroma&lt;br /&gt;
* Speedup ConvertToMono(), minor refactor MixAudio().&lt;br /&gt;
* Change StackVertical/Horizontal to interative instead of recursive, 2^N performace increase for 3 and more clips, i.e. 1 blit total instead of blit(blit(blit(...&lt;br /&gt;
* RGBtoY8 Dynamic ASM code, suport for RGB24.&lt;br /&gt;
* YV24backtoYUY2 Dynamic ASM code.&lt;br /&gt;
* UtoY8, VtoY8 abuse subframe, zero cost.&lt;br /&gt;
* YV24&amp;lt;-&amp;gt;RGB Add SSE2 and SSSE3 code paths, get rid of wide_enough.&lt;br /&gt;
* ConvertToYUY2 Add SSE2, MMX restore full speed on platforms with poor ooox.&lt;br /&gt;
* ConvertAudio, manage tempbuffer and floatbuffer independently.&lt;br /&gt;
* ConvertAudio, prefer SSE2 over 3DNow for super AMD cores.&lt;br /&gt;
* Info.h, full refactor, a good example of &amp;quot;Never look down&amp;quot;, thx StainlessS&lt;br /&gt;
* DoubleWeaveFrames, If A not writable, try to write to B, else make new frame&lt;br /&gt;
* Histogram, fix GetFrame/NewVideoFrame call order&lt;br /&gt;
* HResizer, interleave code +4% faster&lt;br /&gt;
* YtoUV() Abuse Subframe to snatch the Y plane / UV planes, Derestrict destination colorformat autogeneration.&lt;br /&gt;
* ImageSource: Improve thread interlock code&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* Replace _strdup with SaveString in AddFunction (Thanks Gavino)&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* BlankClip: Supply useful defaults for new Audio/Video when using a Video/Audio only template clip.&lt;br /&gt;
* BlankClip: Use duration from Audio only template as default length for new clip.&lt;br /&gt;
* Define new IClip::SetCacheHints cachehint constants.&lt;br /&gt;
* Force int call arguments to user script function float params to be explicit floats.&lt;br /&gt;
* Splice pass CacheHints through to both children in + and ++ mode.&lt;br /&gt;
* WriteFileStart/End save current_frame and set Last.&lt;br /&gt;
* ConditionalReader do not ignore syntax errors in input file.&lt;br /&gt;
* ImageSourceAnim Pad/Crop images to match first frame (Wilbert)&lt;br /&gt;
* ImageSource Add version to messages (Wilbert)&lt;br /&gt;
* Initial 2.6 API entry point linkage.&lt;br /&gt;
* Use Invoke for graph tail, enhance non-clip output error reporting.&lt;br /&gt;
* PopContext when inner block Asserts/throws (maxxon).&lt;br /&gt;
* Remove duplicate definitions (Wilbert)&lt;br /&gt;
* Enhance non-clip output error reporting.&lt;br /&gt;
* Explicitly specify calling sequence as __cdecl for Avisynth softwire routines, (was the compiler default)&lt;br /&gt;
* Use env-&amp;gt;Invoke(&amp;quot;Cache&amp;quot;, ...) everywhere instead of Cache::Create_Cache(), allows for Cache to be overloaded by a plugin.&lt;br /&gt;
* ConvertToYUY2 Change from 0-1-1 kernel to 1-2-1 kernel.&lt;br /&gt;
* Tweak make Interp same units as minSat and maxSat.&lt;br /&gt;
* Check HKEY_CURRENT_USER for PluginDir first. (henktiggelaar)&lt;br /&gt;
* Make forced, -ve, planar alignment of chroma planes match subsampling.&lt;br /&gt;
* Enforce planar alignment restrictions.&lt;br /&gt;
* C-api: Remove func sub-struct from AVS_Library struct&lt;br /&gt;
* Add error code to plugin load failure message&lt;br /&gt;
* Make default planar AVI output packed.&lt;br /&gt;
* WriteFile() now supports unlimited number of unlimited strings. (was 16 by 254 byte strings).&lt;br /&gt;
* ConvertToRGB*, make C++ code sample chroma the same as the MMX code i.e. use both pixels.&lt;br /&gt;
* ConvertToRGB*, use YV24 path for planar, complain when options are present for YUY2.&lt;br /&gt;
* ConvertToYUY2, use YV16 path for planar, complain when options are present for RGB&lt;br /&gt;
** see: http://forum.doom9.org/showthread.php?p=1378381#post1378381&lt;br /&gt;
* Thread safe code, part 2.&lt;br /&gt;
* Correct IClip baked documentation&lt;br /&gt;
* Fix at_exit executon order&lt;br /&gt;
* Passify compilation error/warnings (XhmikosR)&lt;br /&gt;
* for, const, extern and ansi patches for VC2008 (SEt)&lt;br /&gt;
* Disable OPT_RELS_LOGGING option&lt;br /&gt;
* Change implicit Last parsing for argless, bracketless calls to match bracketed cases. (Gavino) [not documented yet ???]&lt;br /&gt;
* DirectShowSource: Support last minute format renegotiation thru IPin::QueryAccept() &amp;amp; Validate the size of the provided directshow buffer.&lt;br /&gt;
* Remove non ascii chars from comments.&lt;br /&gt;
* Add core stubs for DirectShowSource, TCPServer &amp;amp; TCPSource, report when plugins are missing.&lt;br /&gt;
* Add note for original source downloads - SoundTouch&lt;br /&gt;
* Add more lineage history to Info()&lt;br /&gt;
* Move convertaudio, alignplanar, fillborder &amp;amp; MIN/MAX_INT definitions.&lt;br /&gt;
* Run AtExit before dismantling world.&lt;br /&gt;
* Change setcachehints definition from void to int. Test IClip version &amp;gt;= 5.&lt;br /&gt;
* Move PixelClip definition to avisynth.cpp&lt;br /&gt;
* SubTitle, etc, make X &amp;amp; Y options float (0.125 pixel granularity).&lt;br /&gt;
* ShowSMPTE() supports all integer FPS and multiplies of drop frame FPS.&lt;br /&gt;
* SubTitle, stop overwriting string constants (Gavino).&lt;br /&gt;
* SubTitle, improve pixel registration (Gavino).&lt;br /&gt;
* Make Info() CPU display hierarchical.&lt;br /&gt;
* Thread safe code, part 1.&lt;br /&gt;
&lt;br /&gt;
== Changes from 2.5 series to 2.6.0 Alpha 2 ==&lt;br /&gt;
&lt;br /&gt;
=== Additions ===&lt;br /&gt;
* Added support for argument passing and EAX return value to SoftwireHelper.&lt;br /&gt;
* Added &amp;quot;Global OPT_VDubPlanarHack=True&amp;quot; to flip YV24 and YV16 chroma planes for old VDub&#039;s.&lt;br /&gt;
* Added ContinuedDenominator/ContinuedNumerator(f[]i[limit]i) script functions.&lt;br /&gt;
* Tweak: fix MaskPointResizing + put back Dividee ISSE code (use sse=true, can&#039;t use all settings in that case).&lt;br /&gt;
* Added ChromaInPlacement, ChromaOutPlacement and ChromaResample options to planar colour conversions.&lt;br /&gt;
* Added MaskHS.&lt;br /&gt;
* Minor tweaks to get ready for VC8.&lt;br /&gt;
* Add Y8 for DevIL, planarize EBMP.&lt;br /&gt;
* Planar support for many filters.&lt;br /&gt;
* Added Info() time indicator on audio length and video (current frame &amp;amp; total). (2.5.8)&lt;br /&gt;
* Added UtoY8 and VtoY8.&lt;br /&gt;
* Added more info to Info(). (2.5.8)&lt;br /&gt;
* ColorYUV: Added all adjustment parameters as conditional variables &amp;quot;coloryuv_SETTING&amp;quot;. Enable by setting conditional=true.&lt;br /&gt;
* ConditionalReader: Added support for type String.&lt;br /&gt;
* ConditionalReader: Added offset keyword to offset all frame numbers after the keyword.&lt;br /&gt;
* Added SincResize() with optional taps parameter (default is 4).&lt;br /&gt;
* Added Custom band setting to SuperEQ to allow all 16 bands to be set from script. Usage: SuperEQ(clip,band1, band2, band3....) values are dB in float.&lt;br /&gt;
* Added fast 0-1-0 kernel for YV24 to ConvertBacktoYUY2().&lt;br /&gt;
* Added formats: YV24, YV16, Y8, YV411.&lt;br /&gt;
&lt;br /&gt;
=== Bugfixes ===&lt;br /&gt;
* Fixed MonoToStereo with stereo sources.&lt;br /&gt;
* Fixed MergeChannels with only 1 input clip.&lt;br /&gt;
* Fixed support for negative height DIB format AVI&#039;s. (Oops still not quite right yet)&lt;br /&gt;
* Fixed Audio cache crashes.&lt;br /&gt;
* Fixed resize with YV411 missing code.&lt;br /&gt;
* Fixed ConditionalReader rounding with integer Interpolation.&lt;br /&gt;
* Fixed Softwire SSE2 bugs.&lt;br /&gt;
* Fixed SSSE3 CPU detection.&lt;br /&gt;
* Fixed SSSE3, SSE4.1 &amp;amp; SSE4.2 detection.&lt;br /&gt;
* Fixed Fastwire encoding of instructions that are &amp;gt;2 opcodes (SSSE3+4).&lt;br /&gt;
* Fixed _RPT5() macro for debug builds&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
* SuperEQ: Improve channel unpacking/packing code.&lt;br /&gt;
* H-Resize: Use SSE4.1 (movntdqa) loads for use once memory access.&lt;br /&gt;
* H-Resize: Added SSE2 horizontal unpacker.&lt;br /&gt;
* Resize: Use SSE3 (lddqu) loads for unaligned memory access.&lt;br /&gt;
* Added ultra fast vertical PointResizer (64 pixel/cycle).&lt;br /&gt;
* Added dynamic SSSE3 vertical resizer (16 pixel/cycle) ~ twice as fast as old MMX.&lt;br /&gt;
* Added dynamic SSE2 vertical resizer (16 pixel/cycle).&lt;br /&gt;
* Added dynamic MMX vertical resizer (8 pixel/cycle).&lt;br /&gt;
* Added SSSE3 version for RGB&amp;lt;-&amp;gt;YV24 conversions.&lt;br /&gt;
* Added dynamic compiled MMX/iSSE for RGB&amp;lt;-&amp;gt;YV24 conversions. Speed is approx 200% of C-code.&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
* ConditionalReader/WriteFile: Full refactor.&lt;br /&gt;
* SoftwireHelper: explicit hardware exception handling.&lt;br /&gt;
* Resize: Moved GetResampleFunction into Resamplefunction, to allow overrides.&lt;br /&gt;
* Resampler: Removed dead stlf code.&lt;br /&gt;
* Updated Soundtouch to 1.31 (2.5.8)&lt;br /&gt;
* Put dynamic matrix conversion into separate file.&lt;br /&gt;
* Moved chroma subsampling to image_type section.&lt;br /&gt;
* Added specific error reporting when requesting chromasubsampling with Y8.&lt;br /&gt;
* Split up merge and plane Swappers.&lt;br /&gt;
* Split up Plane transfers into separate classes.&lt;br /&gt;
* Added automatic destination colorspace detection on planar YtoUV.&lt;br /&gt;
* Took out greyscale and RGB32&amp;lt;-&amp;gt;RGB24 from convert.cpp and placed them in separate files.&lt;br /&gt;
* All code assuming UVwidth = Ywidth/2 and similar should be gone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelist]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=External_filters&amp;diff=2083</id>
		<title>External filters</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=External_filters&amp;diff=2083"/>
		<updated>2013-08-06T03:22:48Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: Add ExInpaint plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rough classification of filters (in progress).&lt;br /&gt;
&lt;br /&gt;
To make it easier for people to to find what they need here, the list includes both script function filters (see [[Import]]) and plugin filters (see [[Plugins]]).&lt;br /&gt;
&lt;br /&gt;
A list of older plugins (for AviSynth v1.0x/v2.0x) which are still sometimes used can be found [[External_plugins_old|here]].&lt;br /&gt;
&lt;br /&gt;
A large list of filters can be downloaded [http://www.64k.it/andres/dettaglio.php?sez=avisynth here] and [http://www.avisynth.nl/users/warpenterprises/ Warp Enterprises Avisynth Filter Collection]&lt;br /&gt;
&lt;br /&gt;
A list of 64bit compiles can be found [http://yo4kazu.110mb.com/ here] and [http://code.google.com/p/avisynth64/wiki/PluginLinks here].&lt;br /&gt;
&lt;br /&gt;
Most scripts will apply filters in the following order:&lt;br /&gt;
&lt;br /&gt;
# Create an AviSynth clip from a video file.&lt;br /&gt;
# Correct or remove any unwanted features in the video (e.g. dot crawl, field blending or telecine).&lt;br /&gt;
# Denoise the video (optional).&lt;br /&gt;
# Manipulate the video into the desired format (by e.g. changing the size and frame rate). &lt;br /&gt;
&lt;br /&gt;
AviSynth filters have been classified under these four basic tasks, with a fifth category for filters that fall outside this scheme, and a sixth category for filters that process audio only.&lt;br /&gt;
&lt;br /&gt;
== Source Filters ==&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=135855 BassAudio]&lt;br /&gt;
| [http://un4seen.com/bass.html Bass Audio] decoder. Supports wav, aiff, mp3, mp2, mp1, ogg. Support for aac, ac3, alac, ape, cd, flac, midi, mpc, ofr, spx, tta, wma, wv with additional included dll&#039;s. The filter is included in the Behappy package.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://behappy.codeplex.com/ Plugin] [http://yo4kazu.110mb.com/ x64]&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.gyroshot.com/cmvsource.htm CMVSource]&lt;br /&gt;
| Load [http://www.bay12games.com/dwarves/ Dwarf Fortress] CMV and CCMV movies.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=162850 Plugin]&lt;br /&gt;
| {{Author/Robert Martens}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=122598 DGAVCDecode] &lt;br /&gt;
| AVC/H.264 decoder plug-in. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.videohelp.com/tools/DGAVCDec Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DGDecode]] &lt;br /&gt;
| Decode MPEG1/MPEG2 streams from: DVD VOBs, captured transport streams, *.mpg/*.m2v/*.pva files, etc. Use this instead of MPEGDecoder/MPEG2Dec3.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[I420]] &lt;br /&gt;
| [http://neuron2.net/dgmpgdec/dgmpgdec.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=134275 DirectShowSource2]&lt;br /&gt;
| Uses the installed Haali Media Splitter along with its &#039;&#039;avss.dll&#039;&#039; AviSynth plugin. Converts vfr files to cfr in order to support frame-accurate seeking.&lt;br /&gt;
| &lt;br /&gt;
| [http://haali.cs.msu.ru/mkv/ Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [[DVInfo]]&lt;br /&gt;
| Grabs the timestamp and recording date info from a DV-AVI. See [http://forum.doom9.org/showthread.php?t=61688 discussion].&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/#dvinfo Plugin]&lt;br /&gt;
| {{Author/WarpEnterprises}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DVTimeStampEx]]&lt;br /&gt;
| Shows DV timestamp information over a DV clip.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/#dvtimestampex Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [[FFmpegSource]]&lt;br /&gt;
| Decodes all ffmpeg ([http://en.wikipedia.org/wiki/Libavcodec libavcodec]) supported A/V formats with frame accurate seeking in AVI, MKV and MP4. See [http://forum.doom9.org/showthread.php?t=127037 discussion].&lt;br /&gt;
| [[RGB]], [[YUY2]], [[YV12]], [[I420]]&lt;br /&gt;
| [http://code.google.com/p/ffmpegsource Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}, TheFluff, Plorkyeran, others&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=110021 HDVInfo] &lt;br /&gt;
| Grabs the timestamp and recording date info out of a M2T-D2V file&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://strony.aster.pl/paviko/hdvinfo0.93.zip Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=109997 ImageSequence]&lt;br /&gt;
| Load png, jpg, bmp, pcx, tga and gif image sequences using the [http://corona.sourceforge.net/ Corona Image I/O Library]. CoronaSequence/RawSequence.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/#imagesequence Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=135928 Immaavs]&lt;br /&gt;
| ImmaRead uses the ImageMagick libraries to read images. Many formats are supported including animations, multipage files, image sequences and images with different sizes.&lt;br /&gt;
|&lt;br /&gt;
| [http://www.wilbertdijkhof.com/ Plugin]&lt;br /&gt;
| {{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IUF]]&lt;br /&gt;
| Import Uncompressed File. Must be uncompressed! Supported uncompressed Formats: avi, omf(avid), pxr(pixar), mov(24/32bit quicktime), cineon. Can export as well. See [http://forum.doom9.org/showthread.php?t=51227 discussion].&lt;br /&gt;
| [[RGB]]&lt;br /&gt;
| [http://web.archive.org/web/20091016215740/http://geocities.com/hanfrunz/iuf_v1.5.zip Plugin] &lt;br /&gt;
|-&lt;br /&gt;
| [[MPASource]]&lt;br /&gt;
| A mp1/mp2/mp3 audio decoder plugin. See [http://forum.doom9.org/showthread.php?t=41435 discussion]&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/#mpasource Plugin]&lt;br /&gt;
| {{Author/WarpEnterprises}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MPEGDecoder]]&lt;br /&gt;
| Load VOB/MPEG-2 ES,PS,TS/MPEG-1 files directly. (deprecated)&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[MPEG2Dec]]&lt;br /&gt;
| Mpeg2dec is a plugin which lets AviSynth import MPEG2 files. (deprecated)&lt;br /&gt;
| [[RGB]], [[YUY2]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/ Plugin]&lt;br /&gt;
| {{Author/Dividee}} and others&lt;br /&gt;
|-&lt;br /&gt;
| [[MPEG2Dec3]]&lt;br /&gt;
| A MPEG2Dec2.dll modification with deblocking and deringing. Note that the colorspace information of dvd2avi is ignored when using mpeg2dec. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=53164 discussion]. (deprecated)&lt;br /&gt;
| [[RGB]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/ Plugin]&lt;br /&gt;
| {{Author/Marc FD}}, {{Author/Nic}}, {{Author/Tom Barry}}, {{Author/Sh0dan}} and others &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.codeplex.com/NicAudio NicAudio]&lt;br /&gt;
| Audio Plugins for Audio: MPEGAudio/AC3/DTS/LPCM and other uncompressed formats. Formerly known As EvilMPASource. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=89629 discussion].&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.codeplex.com/NicAudio/Release/ProjectReleases.aspx Plugin]&lt;br /&gt;
| {{Author/Nic}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=103931 OmfSource] &lt;br /&gt;
| Opens the AVID OMF file format (video only, and only works with captured files). See [http://forum.doom9.org/showthread.php?t=103931 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.tateu.net/software/ Plugin]&lt;br /&gt;
| {{Author/tateu}}&lt;br /&gt;
|-&lt;br /&gt;
| [[QTSource]]&lt;br /&gt;
| Quicktime Import/Export Filter using an existing installation of Quicktime 6/7. See [http://forum.doom9.org/showthread.php?t=104293 discussion].&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]]&lt;br /&gt;
| [http://www.tateu.net/software/ Plugin]&lt;br /&gt;
| {{Author/tateu}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20120124010957/http://arenafilm.hu/alsog/avisynthr3d/ R3DSource]&lt;br /&gt;
| Redcode RAW source plugin to load R3D clips. See [http://reduser.net/forum/showthread.php?25398 discussion].&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://arenafilm.hu/alsog/avisynthr3d/ Plugin]&lt;br /&gt;
| {{Author/Kertai Gábor}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RawSource]]&lt;br /&gt;
| Loads raw video data directly from files. See the initial [http://forum.doom9.org/showthread.php?t=39798 discussion] and its [http://forum.doom9.org/showthread.php?t=103509 continuation].&lt;br /&gt;
| [[RGB]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/#rawsource Plugin] [https://sites.google.com/site/csghone/audio-video-tools/rawsource_25_dll_20122327.zip Updated with NV12 Support]&lt;br /&gt;
| {{Author/WarpEnterprises}}, {{Author/Wilbert Dijkhof}} and  {{Author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RawSourceMod]]&lt;br /&gt;
| Loads raw video data directly from files. Further modifications (most raw formats, YUV4MPEG2 compatible with latest spec) [http://forum.doom9.org/showthread.php?t=39798 discussion].&lt;br /&gt;
| [[RGB]], [[YUY2]], [[YV12]] (for 2.5/2.6), [[YV24]], [[YV16]], [[YV411]], [[Y8]] (for 2.6)&lt;br /&gt;
| [http://www.mediafire.com/?3bmwyi1lztt4h1j 2.5 plugin] [http://www.mediafire.com/?a6e6bqxbmrt9uge 2.6 plugin]&lt;br /&gt;
[http://www.microsoft.com/download/en/details.aspx?id=8328 msvcr100.dll]&lt;br /&gt;
| Chikuzen&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1403600 Sashimi]&lt;br /&gt;
(function &amp;quot;RawReader&amp;quot;)&lt;br /&gt;
| Loads raw video data directly from files, similarly to RawSource, but also allows for skipping headers, and extra formats (long list to help anyone doing a search):  GREY, Y8, interleaved RGB, BGR (which is RGB24), BGRA (which is RGB32), ARBG, ABGR, RGBA, interleaved YUV (which is YCbCr), YUY2, UYVY, AYUV, planar YUV formats YUV444, YUV422, YUV420 (as YV12), YUV420 (as IMC2), and some raw ImageMagick formats.  Some supports for different bit-depths.  Includes YUVInterleaved.avsi, InterleavedConversions.avsi, and PlanarConversions.avsi.  [http://forum.doom9.org/showthread.php?p=1403600 Discussion].&lt;br /&gt;
| [[RGB]], [[YUY2]], and [[YV12]].&lt;br /&gt;
| [http://sites.google.com/site/ourenthusiasmsasham/soft Plugin with scripts]&lt;br /&gt;
| [http://sites.google.com/site/ourenthusiasmsasham/ PitifulInsect]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Restoration Filters ==&lt;br /&gt;
&lt;br /&gt;
These remove effects or artefacts introduced (deliberately or accidentally) into the source video. Denoisers are classified separately.&lt;br /&gt;
&lt;br /&gt;
=== Anti-[[aliasing]] ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AAA]]&lt;br /&gt;
| Anti-aliasing filter designed for anime. See [http://forum.doom9.org/showthread.php?t=83396 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Soulhunter}}&lt;br /&gt;
|-&lt;br /&gt;
| [[AntiAliasing]]&lt;br /&gt;
| Anti-aliasing script for, well, anti-aliasing. See [http://forum.doom9.org/showthread.php?t=83396 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/SpikeSpiegel}}, {{Author/Didée}}, {{Author/mf}}, {{Author/scharfis brain}} and {{Author/Soulhunter}}&lt;br /&gt;
|-&lt;br /&gt;
| [[AntiAliasRG]]&lt;br /&gt;
| An anti-aliasing script that uses RemoveGrain(SSE3).dll. See [http://forum.doom9.org/showthread.php?t=83396&amp;amp;page=4 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| Bloax&lt;br /&gt;
|-&lt;br /&gt;
| [[DAA]]&lt;br /&gt;
| Anti-aliasing with contra-sharpening. Included in [[AnimeIVTC]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FAA]]&lt;br /&gt;
| Faster Anti-aliasing. See [http://forum.doom9.org/showthread.php?t=83396&amp;amp;page=4].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| list&lt;br /&gt;
|-&lt;br /&gt;
| [[MAA]]&lt;br /&gt;
| Anti-aliasing with edge masking. Included in [[AnimeIVTC]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| martino, Kintaro, thetoof&lt;br /&gt;
|-&lt;br /&gt;
| [[SangNom]]&lt;br /&gt;
| A single field deinterlacer, can also be used for anti-aliasing. See [http://forum.doom9.org/showthread.php?t=69052 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://manao4.free.fr/SangNom.zip Plugin]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SAA]]&lt;br /&gt;
| A simple anti-aliasing script. See [http://forum.doom9.org/showthread.php?t=83396 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Soulhunter}}&lt;br /&gt;
|-&lt;br /&gt;
| SharpAAMCmod&lt;br /&gt;
| High quality MoComped AntiAliasing script, also a line darkener since it uses edge masking to apply tweakable warp sharpening, &amp;quot;normal&amp;quot; sharpening and line darkening with optional temporal stabilization of these edges. Part of [[AnimeIVTC]]. See [http://forum.doom9.org/showthread.php?t=138305] and [http://forum.doom9.org/showthread.php?t=140031]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| thetoof&lt;br /&gt;
|-&lt;br /&gt;
| [[TIsophote]]&lt;br /&gt;
| A level-set (isophote) smoothing filter, see [http://web.missouri.edu/~kes25c/]&lt;br /&gt;
| YV12&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Chroma correction ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[BT709ToBT601]]&lt;br /&gt;
| Convert from BT.709 (HDTV) to BT.601 (SDTV) colorimetry.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20110208133956/http://home.comcast.net/~tombarry970/ Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ChromaShift]]&lt;br /&gt;
| This filter will shift the chrominance information by an even number of pixels, in either horizontal direction. It can also apply an overall vertical shift of the total chrominance information, up or down. It is primarily intended to correct improper colour registration.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB]]&lt;br /&gt;
| [http://www.geocities.com/siwalters_uk/chromashift27.zip Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ChromaShiftSP]]&lt;br /&gt;
| This script can shift chroma in all directions with subpixel accuracy.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/images/ChromaShiftSP.avsi Script]&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorMatrix]]&lt;br /&gt;
| ColorMatrix corrects the colors of MPEG-2 streams. More correctly, many MPEG-2 streams use slightly different coefficients (called Rec.709) for storing the color information than AviSynth&#039;s color conversion routines or the XviD/DivX decoders (called Rec.601) do, with the result that DivX/XviD clips or MPEG-2 clips encoded by TMPGEnc/QuEnc are displayed with slighty off colors. This can be checked by opening the MPEG-2 stream directly in VDubMod. See [http://forum.doom9.org/showthread.php?t=82217 discussion].&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/ColorMatrixv25.zip Plugin]&lt;br /&gt;
| {{Author/Wilbert Dijkhof}}&lt;br /&gt;
{{Author/tritical}} (v2.0+)&lt;br /&gt;
|-&lt;br /&gt;
| [[FixChromaBleeding]]&lt;br /&gt;
| Fixes area of chroma bleeding by shifting the chroma and lowering the saturation in the affected areas.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20091026141730/http://www.geocities.com/alex_j_jordan/chroma.txt Script]&lt;br /&gt;
| {{Author/Alex Jordan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ReInterpolate411]]&lt;br /&gt;
| This is a fast simple filter to correct the improper 4:1:1 =&amp;gt; 4:2:2 conversion that seems to occur with some DV/4:1:1 codes when used with Avisynth. It assumes the odd chroma pixels are duplicates and discards them replacing them with the average of the two horizontally adjacent even chroma pixels. It doesn&#039;t matter whether the clip is interlaced though it must be in YUY2 format for Avisynth 2.5. There are no parameters, and currently no readme file.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ReInterpolate420]]&lt;br /&gt;
| Usually, DV decoders upsample PAL DV (which is YV12) to YUY2 using point sampling. This plugin reinterpolates the original chroma samples.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/reinterpolate420/reinterpolate420_v3.zip Plugin]&lt;br /&gt;
|  {{Author/Wilbert Dijkhof}}&lt;br /&gt;
{{Author/Fizick}} (v3)&lt;br /&gt;
|-&lt;br /&gt;
| [[MoveChroma]]&lt;br /&gt;
| MoveChroma is a simple filter combination that helps in moving chroma back, if it has been displaced.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[FixChromaticAberration]]&lt;br /&gt;
| FixChromaticAberration resizes (and crops) the red/green/blue channels of the image separately. This helps to minimize the colored edges next to the image corners that result from lenses with chromatic aberration.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Debanding ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| AdaptDBMC&lt;br /&gt;
| Luma / Fade / Blue adaptive debanding script. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&amp;amp;t=512 Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=108681 GradFun2DB]&lt;br /&gt;
| DeBanding Filter. See [http://en.wikipedia.org/wiki/Color_banding wikipedia:Color Banding]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://web.archive.org/web/20080905123941/http://soulhunter.chronocrossdev.com/data/gradfun2db.zip Plugin]&lt;br /&gt;
| Prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| GradFunkMirror&lt;br /&gt;
| Script that fixes GradFun2DB&#039;s bug that leaves the first 16 pixels on every border unprocessed. Needs [http://forum.doom9.org/showthread.php?t=108681 GradFun2DB] !&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/images/GradFunkMirror.avsi Script]&lt;br /&gt;
| Alain2, MugFunky&lt;br /&gt;
|-&lt;br /&gt;
| [[GradFun2DBmod]]&lt;br /&gt;
| An advanced debanding script based on GradFun2DB.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=144537 Script]&lt;br /&gt;
| {{Author/LaTo}}&lt;br /&gt;
|-&lt;br /&gt;
| GradFun3&lt;br /&gt;
| This debanding script, part of the [[External_filters#Deepcolor_Filters|Dither]] package, has several gradient smoothing algorithms, including a bilateral filter. It uses an ordered dithering, which has a good resilience to lossy compression.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[Y8]], [[YV411]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1386559 Script]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| flash3kyuu_deband&lt;br /&gt;
| Fast debanding plugin ported from AviUtl.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[YV16]], [[YV24]], [[Y8]], [[YV411]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=161411 Plugin]&lt;br /&gt;
| SAPikachu&lt;br /&gt;
|-&lt;br /&gt;
| LumaDB&lt;br /&gt;
| Fast debanding filter with luma-adaptive grain and mask. Used to process luma only. See [http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&amp;amp;t=668 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.nmm-hd.org/upload/get~3YK_B5TfcyI/LumaDB-0.7.rar Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| LumaDBL&lt;br /&gt;
| Fast debanding filter with luma-adaptive grain and mask. Used to process luma only. Works in 16-bit internally and can also input/output 16-bit. See [http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&amp;amp;t=668 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.nmm-hd.org/upload/get~mQYIS9H6Qas/LumaDBL-0.7.rar Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deblocking ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[BlockKiller]]&lt;br /&gt;
| Deblocking filter, see [http://forum.doom9.org/showthread.php?t=153589].&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| Script&lt;br /&gt;
| Jawed&lt;br /&gt;
|-&lt;br /&gt;
| [[BlockTerminator]]&lt;br /&gt;
| Deblocking filter, see [http://forum.doom9.org/showthread.php?t=111483&amp;amp;page=2].&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/foxyshadis}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeBlock]]&lt;br /&gt;
| Deblocking filter, see [http://avisynth.org.ru/mvtools/deblock.html], [http://neuron2.net/dgmpgdec/DGDecodeManual.html#DeBlock]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/Fizick}} / {{Author/Manao}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Deblock_QED]]&lt;br /&gt;
| &amp;quot;A postprocessed Deblock(): Uses full frequencies of Deblock&#039;s changes on block borders, but DCT-lowpassed changes on block interiours.&amp;quot; Didée See [http://forum.doom9.org/showthread.php?p=944459]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/Deblock_QED_MT2.avs Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FunkyDeBlock]]&lt;br /&gt;
| Deblocking script based on [[DGDecode/BlindPP|BlindPP]] and high/lowpass separation. See [http://forum.doom9.org/showthread.php?t=72431 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| Mug Funky&lt;br /&gt;
|-&lt;br /&gt;
| [[MDeblock]]&lt;br /&gt;
| Plugin for removing block artifacts, see [http://home.arcor.de/kassandro/MDeblock/MDeblock.htm homepage.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://home.arcor.de/kassandro/MDeblock/MDeblock.zip Plugin]&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothD]]&lt;br /&gt;
| Filter to deblock frames while keeping high frequency detail. See [http://forum.doom9.org/showthread.php?s=&amp;amp;postid=566064 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.funknmary.de/bergdichter/projekte/video/SmoothD Plugin]&lt;br /&gt;
| Tobias Bergmann&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothD2]]&lt;br /&gt;
| Deblocking filter.  Rewrite of SmoothD. Faster, better detail preservation, optional chroma deblocking. See [http://forum.doom9.org/showthread.php?t=164800 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [https://sites.google.com/site/jconklin754smoothd2/home Plugin]&lt;br /&gt;
| Jim Conklin&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothDeblock3]]&lt;br /&gt;
| Slow and complex, but produces very good results - especially on severely blocky sources - in a similar manner to TempGaussMC and QTGMC. See [http://forum.doom9.org/showthread.php?t=111526 discussion] and an [http://forum.doom9.org/showthread.php?p=945261#post945261 overall comment].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1553458#post1553458 Script]&lt;br /&gt;
| redfordxx&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dehaloing ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[abcxyz]]&lt;br /&gt;
| Filter to remove halos. See [http://forum.doom9.org/showthread.php?t=144982 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[BlindDeHalo]]&lt;br /&gt;
| Filter to remove edge enhancement artefacts. See [http://forum.doom9.org/showthread.php?threadid=74003 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[BlindDeHalo2]]&lt;br /&gt;
| Filter to remove edge enhancement artefacts. See [http://forum.doom9.org/showthread.php?p=579853#post579853 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[BlindDeHalo3]]&lt;br /&gt;
| Filter to remove edge enhancement artefacts. See [http://forum.doom9.org/showthread.php?p=622289#post622289 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeHalo_alpha]]&lt;br /&gt;
| Very powerful filter to remove edge enhancement artefacts. See [http://forum.doom9.org/showthread.php?p=777956#post777956 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/DeHalo_alpha.avsi Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| Mask_DHA&lt;br /&gt;
| A combination of the best of DeHalo_alpha and BlindDeHalo3, plus a few minor tweaks to the masking. See [http://forum.doom9.org/showthread.php?t=148498 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| &#039;Orum&lt;br /&gt;
|-&lt;br /&gt;
| [[YAHR]]&lt;br /&gt;
| Basic filter with no variables to remove edge enhancement artefacts. See [http://forum.doom9.org/showthread.php?p=1205653#post1205653]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/YAHR.avsi Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deringing &amp;amp; Mosquito Noise ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=636297#post636297 BlindDeRing]&lt;br /&gt;
| Deringing filter.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://chaosking.de/wp-content/uploads/avsfilters/Restoration_Filters/Deringing/BlindDeRing___(2005).7z Plugin]&lt;br /&gt;
| krieger2005&lt;br /&gt;
|-&lt;br /&gt;
| [[HQDering]]&lt;br /&gt;
| Applies deringing by using a smart smoother near edges (where ringing occurs) only. See [http://forum.doom9.org/showthread.php?p=1043583#post1043583 here] and [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=67532 here] for details.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=793930#post793930 Script]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=167582 MosquitoNR]&lt;br /&gt;
| A noise reduction filter designed for mosquito noise, which is often caused by lossy compression.&lt;br /&gt;
| [[Y8]], [[YV411]], [[YV12]], [[YV16]], [[YV24]], [[YUY2]]&lt;br /&gt;
| [http://www.geocities.jp/w_bean17/index.html Plugin]&lt;br /&gt;
| {{Author/b_inary}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deinterlacing ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[Area]]&lt;br /&gt;
| A port of Gunnar Thalin&#039;s VirtualDub filter &amp;quot;Deinterlace - area based&amp;quot; to AviSynth.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/ Plugin]&lt;br /&gt;
| {{Author/Donald Graft}} // {{Author/Gunnar Thalin}}&lt;br /&gt;
|-&lt;br /&gt;
| [[BlendBob]]&lt;br /&gt;
| Filter designed for use after a smart bob; blends every other frame with the closest matching neighbouring frame. See [http://forum.doom9.org/showthread.php?threadid=80289 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://leak.no-ip.org/AviSynth/BlendBob/ Plugin]&lt;br /&gt;
| {{Author/Leak}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DGBob]]&lt;br /&gt;
| This filter splits each field of the source into its own frame and then adaptively creates the missing lines either by interpolating the current field or by using the previous field&#039;s data. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=55598 discussion].&lt;br /&gt;
| [[RGB]], [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://neuron2.net/dgbob/dgbob.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Decomb]]&lt;br /&gt;
| The [[Decomb/FieldDeinterlace|FieldDeinterlace]] filter provides functionality similar to the postprocessing function of [[Decomb/Telecide|Telecide]]. You can use it for pure interlaced streams (that is, those not containing telecined progressive frames). The name refers to the fact that field mode differencing is used.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://neuron2.net/decomb/decombnew.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GreedyHMA]]&lt;br /&gt;
| GreedyHMA is an Avisynth filter that executes DScaler&#039;s Greedy/HM algorithm code to perform pulldown matching, filtering, and video deinterlace. It has pretty much been superceded by Donald Graft&#039;s [[Decomb]] package. However there may be occasions where it sometimes gives preferable results, especially with some bad [[PAL]] clips.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20110208133956/http://home.comcast.net/~tombarry970/ Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IBob]]&lt;br /&gt;
| Interpolating Bob works identically to the Avisynth built-in [[Bob]] filter except that it uses linear interpolation instead of bicubic resizing. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=62142 discussion]. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://kevin.atkinson.dhs.org/ibob/ Plugin]&lt;br /&gt;
| {{Author/Kevin Atkinson}}&lt;br /&gt;
|-&lt;br /&gt;
| [[KernelDeint]]&lt;br /&gt;
| This filter deinterlaces using a kernel approach. It gives greatly improved vertical resolution in deinterlaced areas compared to simple field discarding. Superceded by [[LeakKernelDeint]], see the description below in this table. &lt;br /&gt;
| [[RGB]], [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://neuron2.net/kerneldeint/kerneldeint.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[LeakKernelBob]]&lt;br /&gt;
| This filter does a full framerate deinterlacing, i.e. it turn 50 fields per second into 50 frames per second. Adapted from Scharfis_brain&#039;s script of the same name.&lt;br /&gt;
| [[RGB32]], [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://leak.no-ip.org/AviSynth/LeakKernelDeint/ Plugin]&lt;br /&gt;
| {{Author/Leak}}&lt;br /&gt;
|-&lt;br /&gt;
| [[LeakKernelDeint]]&lt;br /&gt;
| This filter deinterlaces using a kernel approach. It gives greatly improved vertical resolution in deinterlaced areas compared to simple field discarding. Compared to [[KernelDeint]], it is low-level optimized (for speed) and provides some useful new functionality. As the original author of KernelDeint() states, LeakKernelDeint() is the preferred version to use.&lt;br /&gt;
| [[RGB32]], [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://leak.no-ip.org/AviSynth/LeakKernelDeint/ Plugin]&lt;br /&gt;
| {{Author/Leak}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MCBob]]&lt;br /&gt;
| Another approach to motion compensated bobbing. No residual combing, Motion Masking adaptive to local complexity, self adaptive error correction for temporal interpolation, Motion Search between fields of same parity, and spatial Interpolation overweights spatio-temporal interpolation. Is SLOW.&lt;br /&gt;
&lt;br /&gt;
* MCBob + EEDI2 [http://forum.doom9.org/showthread.php?t=124676#post988224]&lt;br /&gt;
* MCBob + NNEDI [http://forum.doom9.org/showthread.php?t=129953#post1055263]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MVBob]]&lt;br /&gt;
| by scharfis_brain [http://forum.doom9.org/showthread.php?t=84725]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| scharfis_brain&lt;br /&gt;
|-&lt;br /&gt;
| [[QTGMC]]&lt;br /&gt;
| by -Vit- [http://forum.doom9.org/showthread.php?t=156028] A new deinterlacer based on TempGaussMC_beta2. It&#039;s faster and has a presets system for speed/quality selection. There are also several new features including progressive support and noise/grain processing. The script also contains extensive comments to better describe the settings and the workings of the TGMC algorithm.&lt;br /&gt;
| &lt;br /&gt;
| [http://www.mediafire.com/download.php?vx4my32a9fqz8q9 Script]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
| Securebob&lt;br /&gt;
| type=2 or type=3. (part of MVbob) [http://web.archive.org/web/20080924163957/http://home.arcor.de/scharfis_brain/mvbob/]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| scharfis_brain&lt;br /&gt;
|-&lt;br /&gt;
| SecureDeint&lt;br /&gt;
| (part of MVbob) [http://web.archive.org/web/20080924163957/http://home.arcor.de/scharfis_brain/mvbob/]&lt;br /&gt;
| &lt;br /&gt;
| Script (?)&lt;br /&gt;
| scharfis_brain&lt;br /&gt;
|-&lt;br /&gt;
| SmoothDeinterlace&lt;br /&gt;
| by Gunnar Thalin [http://www.guthspot.se/video/AVSPorts/SmoothDeinterlacer/]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/Gunnar Thalin}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TDeint]]&lt;br /&gt;
| TDeint is a bi-directionally, motion adaptive (sharp) deinterlacer. It can also adaptively choose between using per-field and per-pixel motion adaptivity. It can use cubic interpolation, kernel interpolation (with temporal direction switching), or one of two forms of modified ELA interpolation which help to reduce &amp;quot;jaggy&amp;quot; edges in moving areas where interpolation must be used. TDeint also supports user overrides through an input file, and can act as a smart bobber or same frame rate deinterlacer, as well as an IVTC post-processor. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=82264 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/TDeintv11.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Telecide Hints]]&lt;br /&gt;
| The filter process the stats file to get the usual progressive matches and identify VFR sections.&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[TempGaussMC]]&lt;br /&gt;
| Motion-compensated bob deinterlacer, based on temporal gaussian blurring. reduces noise/grain of the source and does NOT leave the original fields unchanged. Output is rich with details and very stable. Is SLOW&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20100903072408/http://home.arcor.de/dhanselmann/_stuff/ Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TomsMoComp]]&lt;br /&gt;
| This filter uses motion compensation and adaptive processing to deinterlace video source (not for NTSC film). See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=37915 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20110208133956/http://home.comcast.net/~tombarry970/ Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Yadif]]&lt;br /&gt;
| Port of YADIF (Yet Another DeInterlacing Filter) from MPlayer by Michael Niedermayer (http://www.mplayerhq.hu). It check pixels of previous, current and next frames to re-create the missed field by some local adaptive method (edge-directed interpolation) and uses spatial check to prevent most artifacts.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.org.ru/yadif/yadif.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Yadifmod]]&lt;br /&gt;
| Modified version of Fizick&#039;s avisynth filter port of yadif from mplayer. This version doesn&#039;t internally generate spatial predictions, but takes them from an external clip. It also is not an Avisynth_C plugin (just a normal one).&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/yadifmod_v1.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TomsBob]]&lt;br /&gt;
| We&#039;ve asked Tom to include a proper 60fps deinterlacer in his wonderful TomsMoComp, but until then you&#039;ll have to make do with TomsBob.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fieldblending and Frameblending removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[c_deblend]] superseded by [[srestore]]&lt;br /&gt;
| Cdeblend is a simple blend replacing function like unblend or removeblend.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| MOmonster&lt;br /&gt;
|-&lt;br /&gt;
| [[Deblend]]&lt;br /&gt;
| See [http://forum.doom9.org/showthread.php?p=760375#post760375 discussion].&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| actionman133&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=157337 ExBlend]&lt;br /&gt;
| ExBlend is a plugin to repair damage caused by blend deinterlacing of telecined clips, which results in a double blend, every five frames, GGGBBGGGBBGGGBB etc where &#039;G&#039; is good and &#039;B&#039; is blend. See [http://forum.doom9.org/showthread.php?t=157337 discussion]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://www.mediafire.com/download/0rxe3675sfr4w9l/ExBlend_25_dll_20100226.zip Plugin]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [[mrestore]] superseded by [[srestore]]&lt;br /&gt;
| Uses conditional frame evaluation to undo standard conversions with blends.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| MOmonster&lt;br /&gt;
|-&lt;br /&gt;
| [http://bossanovaguitar.com/video/RemoveBlend-0.3.html RemoveBlend]&lt;br /&gt;
| This filter is used to remove blended fields/frames. See [http://forum.doom9.org/showthread.php?t=75772 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://bossanovaguitar.com/video/removeblend-0.3.zip Plugin]&lt;br /&gt;
| {{Author/violao}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Restore24]]&lt;br /&gt;
| Restore24 is an AviSynth filter that is able to do the nearly impossible: Restore 24fps FILM out of a fieldblended FILM -&amp;gt; Telecine -&amp;gt; NTSC -&amp;gt; Blendconversion -&amp;gt; PAL - Video. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=75432 discussion].&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| scharfis_brain&lt;br /&gt;
|-&lt;br /&gt;
| [[RestoreFPS]]&lt;br /&gt;
| RestoreFPS reverses the kind of blending generated by [[ConvertFPS]], restoring original framerate. It will work perfectly well on any regular blend pattern.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
| Specials&lt;br /&gt;
| Helps restore video with blended fields/frames using a reference source. See [http://forum.doom9.org/showthread.php?t=165030 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://horman.net/specials.zip Plugin]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Unblend]]&lt;br /&gt;
| Unblend is based on warpenterprise&#039;s deblend algorithm and neuron2&#039;s decimate code, with YV12 support only. The aim is the same of deblend. See [http://forum.doom9.org/showthread.php?t=55019 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/unblend_5F25_dll_2003.zip Plugin]&lt;br /&gt;
| Bach&lt;br /&gt;
|-&lt;br /&gt;
| [[FixBlendIVTC]] superseded by [[srestore]]&lt;br /&gt;
| A blend replacing/frame restoring function for doubleblends caused by blend-deinterlacing of telecined sources.&lt;br /&gt;
| ?&lt;br /&gt;
| Script&lt;br /&gt;
| MOmonster&lt;br /&gt;
|-&lt;br /&gt;
| [[Cdeint]]&lt;br /&gt;
| Restores 24fps FILM out of a fieldblended FILM -&amp;gt; Telecine -&amp;gt; NTSC -&amp;gt; Blendconversion -&amp;gt; PAL - Video (alternative for Restore24).&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Film Damage correction ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[DeScratch]]&lt;br /&gt;
| DeScratch removes vertical scratches from films. Also it can be used for removing of horizontal noise lines such as drop-outs from analog VHS captures (after image rotation). &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.org.ru/descratch/descratch.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeSpot]]&lt;br /&gt;
| This filter is designed to remove temporal noise in the form of dots (spots) and streaks found in some videos. The filter is also useful for restoration (cleaning) of old telecined 8mm (and other) films from spots (from dust) and some stripes (scratches).&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.org.ru/despot/despot.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[deVCR]]&lt;br /&gt;
| deVCR elliminates (to a certain degree) the annoying horizontal lines that keep crawling around your VHS or Beta recorded video. &lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| Ricardo Garcia&lt;br /&gt;
|-&lt;br /&gt;
| Film_Restoring_Frame_Blending&lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| videoFred&lt;br /&gt;
|-&lt;br /&gt;
| Film_Restoring_Frame_Interpolation&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| videoFred&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveDirt]]&lt;br /&gt;
| RemoveDirt is a temporal cleaner for Avisynth 2.5x. It has now become an AVS script function, which involves RestoreMotionBlocks and various filters from the [[RemoveGrain]] package.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UnDot]]&lt;br /&gt;
| UnDot is a simple median filter for removing dots, that is stray orphan pixels and mosquito noise.  It clips each pixel value to stay within min and max of its eight surrounding neigbors. See [http://forum.doom9.org/showthread.php?s=&amp;amp;postid=205442#post205442 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/undot_5F25_dll_20030118.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Frequency Interference removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| DeFreq&lt;br /&gt;
| Defreq uses Fast Fourier Transform method for frequency selecting an removing. See [http://forum.doom9.org/showthread.php?t=82978 discussion].&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/defreq/defreq.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| FanFilter &lt;br /&gt;
| Regular vertical frequency interference is filtered in spatial domain.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB32]], [[RGB24]]&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/FanFilter/FanFilter.html Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IVTC &amp;amp; Decimation ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AnimeIVTC]]&lt;br /&gt;
| What it does:&lt;br /&gt;
* High quality adaptative field matching for hard telecine&lt;br /&gt;
* Bob, remove the blends and decimate back to the desired framerate for DHT/field-blended&lt;br /&gt;
* Creating a VFR clip for hybrid sources&lt;br /&gt;
* Bob the interlaced credits, blend-deinterlacing the background while doing minimal damage on the progressive credits, convert their framerate to match the episode&#039;s and splice them with it OR leave them @ 30p to create a VFR clip&lt;br /&gt;
* Very good combing removal and anti-aliasing functions&lt;br /&gt;
See [http://forum.doom9.org/showthread.php?t=138305]&lt;br /&gt;
&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| thetoof&lt;br /&gt;
|-&lt;br /&gt;
| BruteIVTC&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [http://mf.creations.nl/avs/filters/ Plugin]&lt;br /&gt;
| MarcFD&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=158230 DOCI]&lt;br /&gt;
| Destruction of Chroma Interlacing fixes a problem where you captured pulleddown video in YV12.  In the combed frames, the chroma from two frames has been blended, leading to a ghosting effect when IVTC&#039;d.  This filter reconstructs the chroma exactly and fixes the problem.&lt;br /&gt;
| &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=158230 Script]&lt;br /&gt;
| jmac698&lt;br /&gt;
|-&lt;br /&gt;
| [[FDecimate]]&lt;br /&gt;
| The FDecimate() filter provides extended decimation capabilities not available from [[Decomb/Decimate|Decimate()]]. It can remove frames from a clip to achieve the desired frame rate, while retaining audio/video synchronization. It preferentially removes duplicate frames where possible. (&amp;quot;FDecimate&amp;quot; stands for &amp;quot;Free Decimate&amp;quot;, which implies that the output frame rate may be freely chosen, and is not limited to 1-in-N decimation).&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://neuron2.net/fdecimate/fdecimate.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GreedyHMA]]&lt;br /&gt;
| GreedyHMA is an Avisynth filter that executes DScaler&#039;s Greedy/HM algorithm code to perform pulldown matching, filtering, and video deinterlace. It has pretty much been superseded by Donald Graft&#039;s [[DeComb]] package. However there may be occasions where it sometimes gives preferable results, especially with some bad [[PAL]] clips.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20110208133956/http://home.comcast.net/~tombarry970/ Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| IT&lt;br /&gt;
| Inverse Telecine&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/ Plugin]&lt;br /&gt;
| {{Author/thejam79}} / {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| ivtc_txt60mc&lt;br /&gt;
| Deinterlaces telecined footage with that has been overlayed scrolling text at 60i.&lt;br /&gt;
| &lt;br /&gt;
| [http://doom10.org/index.php?topic=292.msg5499#msg5499 Script]&lt;br /&gt;
| {{Author/cretindesalpes}} aka Firesledge&lt;br /&gt;
|-&lt;br /&gt;
| [[MultiDecimate]]&lt;br /&gt;
| Removes N out of every M frames, taking the frames most similar to their predecessors. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=51901&amp;amp;perpage=20&amp;amp;pagenumber=2 discussion].&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://neuron2.net/multidecimate/multidecimate.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[PFR]]&lt;br /&gt;
| PFR (Progressive Frame Restorer) is an Avisynth filter that attempts to produce progressive frames from a mixed progressive/interlaced/IVTCed source.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://siwalters.net/ Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&lt;br /&gt;
|-&lt;br /&gt;
| ReMatch&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| RePal&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[SmartDecimate]]&lt;br /&gt;
| Smart Decimate removes telecine by combining telecine fields and decimating at the same time, which is different from the traditional approach of matching telecine frames and then removing duplicates. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=60031 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://kevin.atkinson.dhs.org/tel/ Plugin]&lt;br /&gt;
| {{Author/Kevin Atkinson}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Decomb]]&lt;br /&gt;
| The [[Decomb/Telecide|Telecide]] and [[Decomb/Decimate|Decimate]] filters can be combined to implement IVTC.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://neuron2.net/decomb/decombnew.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TIVTC]]&lt;br /&gt;
| A package containing these 7 filters: TFM, TDecimate, MergeHints, FrameDiff, FieldDiff, ShowCombedTIVTC, and RequestLinear. Also contains these 3 conditional functions: IsCombedTIVTC, CFieldDiff, and CFrameDiff. Designed primarily for IVTC operations. [http://forum.doom9.org/showthread.php?t=82264 Discussion]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| TPRIVTC&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[UnComb]]&lt;br /&gt;
| Filter for matching up even and odd fields of properly telecined NTSC or PAL film source video. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=52333 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20110208133956/http://home.comcast.net/~tombarry970/ Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IvtcBlend]]&lt;br /&gt;
| Waka demonstrated an IvtcBlend function that uses the information in the &amp;quot;extra&amp;quot; fields of a telecined source to help combat temporal noise.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Ghost Removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| FixVHSOversharp&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [http://web.archive.org/web/20091026142456/http://www.geocities.com/mrtibsvideo/fixvhsoversharp.html Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| GhostBuster&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [http://kvcd.net/sansgrip/avisynth/Ghostbuster-0.1.zip Plugin]&lt;br /&gt;
| SansGrip&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logo Removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[Shared_functions/DeKafka|DeKafka]]&lt;br /&gt;
| This fairly simple filter washes away those annoying bugs from broadcast clips.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| DeLogo&lt;br /&gt;
| DeLogo Filter for VirtualDub. Removes static elements, e.g. logos or watermarks, from the video stream. It can remove either opaque elements or alpha blended, the latter even without destroying the picture beneath. &lt;br /&gt;
| &lt;br /&gt;
| [http://neuron2.net/delogo132/delogo.html Plugin] &amp;amp; [http://forum.doom9.org/showthread.php?t=119447 Script]&lt;br /&gt;
| Karel Suhajda&lt;br /&gt;
|-&lt;br /&gt;
| [[InpaintFunc]]&lt;br /&gt;
| Script for logo removal using inpainting. Can remove alpha blended or opaque logos with a basic postprocessing to hide artifacts.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| Reuf Toc&lt;br /&gt;
|-&lt;br /&gt;
| [[rm_logo]]&lt;br /&gt;
| Combination of deblending and inpainting to remove logos with adjustable postprocessing to further hide artifacts. See [http://forum.doom9.org/showthread.php?t=134919]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| Spuds &lt;br /&gt;
|-&lt;br /&gt;
| X-Logo&lt;br /&gt;
| X-Logo Avisynth plugin and Virtualdub filter. Removes opaque logos.&lt;br /&gt;
| &lt;br /&gt;
| [http://www.marzocchi.net/Olafsen/pmwiki/pmwiki.php/Software/X-Logo Plugin]&lt;br /&gt;
| Leuf&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Luma Equalisation ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[Antiflicker]]&lt;br /&gt;
| &amp;quot;A quick-and-dirty port of my VirtualDub filter (which sucks, by the way; it was one of my first filters).&amp;quot; &lt;br /&gt;
See [http://forum.doom9.org/showthread.php?p=224573#post224573 discussion.]&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/antiflicker_25_dll_20030304.zip Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/deflicker/deflicker.html DeFlicker]&lt;br /&gt;
| Can remove old film intensity flicker by temporal mean luma smoothing. Can also correct blinding of automatic gain control after flashes.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/deflicker/deflicker04.zip Plugin]&lt;br /&gt;
| Fizick (Alexander G. Balakhnin)&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1326599#post1326599 Dumb Deflicker]&lt;br /&gt;
| Gathers average luma of frames, smoothens that with temporalsoften, and applies the obtained difference to the original input.  It is pretty simple, read &amp;quot;dumb&amp;quot;. See [http://forum.doom9.org/showthread.php?p=1326599#post1326599 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1326599#post1326599 Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/equlines/equlines.html EquLines]&lt;br /&gt;
| Equalizes total luminosity in pairs of even and odd lines. Useful for removing inter-line differences from telecined films.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/equlines/equlines03.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://akuvian.org/src/avisynth/flicker/lmflicker.txt LMFlicker]&lt;br /&gt;
| LMFlicker is intended to reduce flickering in some film/vhs transfers. FieldFade is a similar concept, but applied on a per-field basis, to reduce combing in a video where fades were applied after telecine.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://akuvian.org/src/avisynth/flicker/ Plugin]&lt;br /&gt;
| {{Author/akupenguin}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=159493 Local Deflicker]&lt;br /&gt;
| Deflickers only part of a frame. See [http://forum.doom9.org/showthread.php?t=159493 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=159493 Script]&lt;br /&gt;
| prokhozhijj&lt;br /&gt;
|-&lt;br /&gt;
| [http://home.arcor.de/kassandro/ReduceFlicker/ReduceFlicker.htm ReduceFlicker]&lt;br /&gt;
| Reduces temporal oscillations in clips; should be applied before deinterlacing. Contains ReduceFlicker, ReduceFluctuations, and LockClense. See [http://videoprocessing.11.forumer.com/viewtopic.php?t=24 discussion.] &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://home.arcor.de/kassandro/ReduceFlicker/ReduceFlicker.zip Plugin]&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.zhitenev.com/avisynth/TimeLapseDF/ TimeLapseDF]&lt;br /&gt;
| Designed to remove luminosity flicker in time lapse photography. Unlike most other flicker removal filters, utilizes cumulative distribution function in addition to average frame luminosity. See [http://timescapes.org/phpBB3/viewtopic.php?f=8&amp;amp;t=2410 discussion.] &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://www.zhitenev.com/avisynth/TimeLapseDF/TimeLapseDF.dll 32-Bit Plugin]&lt;br /&gt;
[http://www.zhitenev.com/avisynth/TimeLapseDF/x64/TimeLapseDF64.dll 64-Bit Plugin]&lt;br /&gt;
| {{Author/Denis Zhitenev}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=106898 wdeflicker]&lt;br /&gt;
| Modifies luma of a source clip by refering to a temporally super-smoothed clip. Heights of source and reference clips must match. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=5417&amp;amp;d=1139174468 Plugin]&lt;br /&gt;
| Osmiridium&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Rainbow &amp;amp; Dot Crawl removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| BiFrost&lt;br /&gt;
| Bifrost uses temporal blending to remove or at least reduce the effect of rainbows. See [http://forum.doom9.org/showthread.php?t=74397 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://ivtc.org/avisynth/bifrost-1.1.zip Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}&lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| Dot crawl and rainbow removal.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://www.chiyoclone.net/dl/cc_20040522.lzh Plugin]&lt;br /&gt;
| {{Author/chiyo-clone}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1571520&amp;amp;postcount=20 Checkmate]&lt;br /&gt;
| Spatial and temporal dot crawl removal.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20090218093135/http://mf.creations.nl/avs/filters/checkmate.dll Plugin]&lt;br /&gt;
| {{Author/mf}} / prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| DeCrawl&lt;br /&gt;
| Spatial and temporal dot crawl removal, particularly for animated material.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/decrawl_20060924.zip Plugin]&lt;br /&gt;
| Dan Donovan&lt;br /&gt;
|-&lt;br /&gt;
| DeCross&lt;br /&gt;
| Cross Color Reduction. Also known as rainbows.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://nullinfo.s21.xrea.com/cgi/counter/count.xcg?down=DeCross0002.zip Plugin]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| DeDot&lt;br /&gt;
| Removes dot crawl and may also be useful for rainbows. See [http://forum.doom9.org/showthread.php?t=98219 discussion]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://nullinfo.s21.xrea.com/cgi/counter/count.xcg?down=DeDot_YV12_0002.zip Plugin]&lt;br /&gt;
| {{Author/thejam79}} / {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| DeRainbow&lt;br /&gt;
| It removes rainbows on the clip, without any visible quality loss. See [http://forum.doom9.org/showthread.php?p=398106#post398106 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=398106#post398106 Script]&lt;br /&gt;
| sh0dan&lt;br /&gt;
|-&lt;br /&gt;
| DFMDeRainbow&lt;br /&gt;
| Creates mask to process only edges; rainbows are removed by hitting chroma planes with two passes of FluxSmooth (hence &amp;quot;Double-Flux-Mask&amp;quot;).&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://www.aquilinestudios.org/scripts/DFMDeRainbow-20050128.avsi Script]&lt;br /&gt;
| {{Author/Scintilla}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/guavacomb.htm GuavaComb]&lt;br /&gt;
| Removes dot crawl, rainbows, and some kinds of shimmering. See [http://forum.doom9.org/showthread.php?t=37456 discussion]&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/guavacomb_5F25_dll_20030801.zip Plugin]&lt;br /&gt;
| {{Author/Lindsey Dubb}}&lt;br /&gt;
|-&lt;br /&gt;
| LUTDeCrawl&lt;br /&gt;
| Purely temporal; only targets pixels for dot crawl removal if luma is fluctuating and (optionally) chroma is not.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.aquilinestudios.org/scripts/LUTDeCrawl-20081003.avsi Script]&lt;br /&gt;
| {{Author/Scintilla}}&lt;br /&gt;
|-&lt;br /&gt;
| LUTDeRainbow&lt;br /&gt;
| Purely temporal; only targets pixels for derainbowing if chroma is fluctuating and (optionally) luma is not.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.aquilinestudios.org/scripts/LUTDeRainbow-20081003.avsi Script]&lt;br /&gt;
| {{Author/Scintilla}}&lt;br /&gt;
|-&lt;br /&gt;
| mfRainbow&lt;br /&gt;
| Derainbows in areas of high Y, U and V frequencies, which fluctuate heavily. See discussion [http://forum.doom9.org/showthread.php?t=67578 here] and [http://forum.doom9.org/showthread.php?s=&amp;amp;postid=321859#post321859 here.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20090212071718/http://mf.creations.nl/avs/functions/mfRainbow-v0.31.avs Script]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| Rainbow_Smooth&lt;br /&gt;
| A small spatial derainbow function. It uses [http://web.archive.org/web/20031009215231/http://kurosu.inforezo.org/avs/Smooth/index.html SmoothUV] to smooth out chroma and edge masking to prevent color bleeding.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1025503#post1025503 Script]&lt;br /&gt;
| MOmonster&lt;br /&gt;
|-&lt;br /&gt;
| SmartSSIQ&lt;br /&gt;
| SSIQ can alter the color on the entire picture. So this script first applies SSIQ to the entire picture. Then it locates the edges. Finally, it layers ONLY the de-rainbowed edges onto the original video. See discussion [http://forum.doom9.org/showthread.php?t=98267 here] and [http://forum.doom9.org/showthread.php?p=748304#post748304 here.]&lt;br /&gt;
| [[YV12]], [[RGB32]]&lt;br /&gt;
| Script&lt;br /&gt;
| LB&lt;br /&gt;
|-&lt;br /&gt;
| SSIQ&lt;br /&gt;
| Rainbow remover. A port of the VirtualDub plugin [http://www.doki.ca/filters/ Smart Smoother IQ.]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/ssiq_20070304.zip Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/tcomb.htm TComb]&lt;br /&gt;
| A temporal comb filter (it reduces cross-luminance (rainbowing) and cross-chrominance (dot crawl) artifacts in static areas of the picture).&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://web.missouri.edu/~kes25c/TCombv2B2.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| YARK&lt;br /&gt;
| Yet Another Rainbow Killer. Based on mfRainbow v0.31, chubbyrain2, and various other scripts shown [http://forum.doom9.org/showthread.php?t=141165 here].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://pastebin.com/sfDZ00rx Script]&lt;br /&gt;
| jase99&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stabilization ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[DePan]]&lt;br /&gt;
| Tools for estimation and compensation of global motion (pan) .See [http://avisynth.org.ru/depan/depan.html]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.org.ru/depan/depan.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Stab]]&lt;br /&gt;
| Simple but powerful script to remove small high frequenzy jitter that appears often on old/bad transfers. See [http://forum.doom9.org/showthread.php?p=1222830#post1222830]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| g-force&lt;br /&gt;
|-&lt;br /&gt;
| [http://code.google.com/p/avisynthrestoration/wiki/TBC TBC]&lt;br /&gt;
| Stabilizes horizontal jitter in video from analog VCRs, similar to the function of a Time Base Corrector.(note: will cause SEt&#039;s Avisynth 2.6 MT to stop working)&lt;br /&gt;
|&lt;br /&gt;
| [http://code.google.com/p/avisynthrestoration/downloads/list Script]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[CelStabilize]]&lt;br /&gt;
| Script which holds a fixed background steady.  Doesn&#039;t work well with pans or fades.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| mg262&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Denoisers ==&lt;br /&gt;
[[Denoisers|Strength/Quality of Denoisers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(need subclassification)&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| AdaptiveMedian&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| Atc&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| ColourizeSmooth&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| ConditionalTemporalMedian&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| DCTFun4b&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| DeNoise&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| DNR2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| ExtendedBilateral&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=84636 MedianBlur]&lt;br /&gt;
| Spatial median blur filter with a variable radius&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/tsp/ Plugin]&lt;br /&gt;
| tsp&lt;br /&gt;
|-&lt;br /&gt;
| PixieDustPP &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| SmartSmoother&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| SmootherHiQ&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| SSIQ&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| TNLMeans&lt;br /&gt;
| TNLMeans is an implementation of the NL-means denoising algorithm. See [http://forum.doom9.org/showthread.php?t=111344 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/TNLMeansv103.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| UberSmooth (Bloated)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| UberSmooth (DCTFun)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| UberSmooth (Deen) &lt;br /&gt;
| [http://soulhunter.chronocrossdev.com/#004]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| VariableBlur&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spatial Denoisers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[_2DCleanYUY2]]&lt;br /&gt;
| Averages pixels in a configurable radius around a source pixel that are within a configurable threshold of the central pixel. A port of the VirtualDub plugin [http://neuron2.net/2dcleaner.html 2D Cleaner.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/2dcleanyuy2_5F25_dll_20021225.zip Plugin]&lt;br /&gt;
| {{Author/kiraru2002}}, {{Author/xeon533}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20101001134812/http://home.comcast.net/~tombarry970/Readme_DctFilter.txt DctFilter]&lt;br /&gt;
| An experimental filter that operates on DCT coefficients. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/dctfilter_5F25_dll_20030221.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| eDeen&lt;br /&gt;
| eDeen is a ultra powerfull spatial denoiser for very experienced encoders only.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://ziquash.chez-alice.fr/eDeen%20beta%201.zip Plugin]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20101201051903/http://gpubilateral.sourceforge.net/ GPUBilateral]&lt;br /&gt;
| In short, bilateral filter is a edge-preserving smooth filter. See [http://forum.doom9.org/showthread.php?t=136370 discussion.]&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://sourceforge.net/projects/gpubilateral/files/ Plugin]&lt;br /&gt;
| Sompon Virojanadara    &lt;br /&gt;
|-&lt;br /&gt;
| [http://neuron2.net/msmooth/msmooth.html Msmooth]&lt;br /&gt;
| Masked smoother, designed specifically for anime.&lt;br /&gt;
| [[YV12]], [[RGB32]]&lt;br /&gt;
| [http://neuron2.net/msmooth/msmooth202.zip Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveGrain]]&lt;br /&gt;
| RemoveGrain is a simple and extremely fast spatial denoiser for progressive and interlaced video.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|-&lt;br /&gt;
| TBilateral &lt;br /&gt;
| TBilateral is a spatial smoothing filter that uses the bilateral filtering algorithm.  It does a nice job of smoothing while retaining picture structure.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/TBilateralv0911.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/vague/vaguedenoiser.html VagueDenoiser]&lt;br /&gt;
| This is a Wavelet based Denoiser. Basically, it transforms each frame from the video input into the wavelet domain, using various wavelet filters. Then it applies some filtering to the obtained coefficients. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=56871 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/vaguedenoiser_5F25_dll_20050926.zip Plugin]&lt;br /&gt;
| {{Author/Lefungus}}, {{Author/Kurosu}}, {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| VerticalCleaner&lt;br /&gt;
| Fast vertical cleaner. Parameter information [http://videoprocessing.fr.yuku.com/sreply/651/Can-use-quantile-like-vertical-median-filter here.] Explanation of mode 2 [http://videoprocessing.fr.yuku.com/sreply/649/Can-use-quantile-like-vertical-median-filter here.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://home.arcor.de/kassandro/prerelease/VerticalCleaner.rar Plugin]&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Temporal Denoisers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| CNR2&lt;br /&gt;
| A fast chroma denoiser. Very effective against stationary rainbows and huge analogic chroma activity. Useful to filter VHS/TV caps. See [http://forum.doom9.org/showthread.php?t=78905 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/cnr2_v261.zip Plugin]&lt;br /&gt;
| {{Author/Marc FD}}, {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://kvcd.net/sansgrip/avisynth/FluxSmooth-readme.html Fluxsmooth]&lt;br /&gt;
| Examines each pixel and compares it to the corresponding pixel in the previous and last frame.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://www.videohelp.eu/forum/attachments/avisynth/4d1351428557-sansgrips-avisynth-filters-fluxsmooth-avisynth-sansgriprar Plugin]&lt;br /&gt;
| SansGrip (Ross Thomas), Sh0dan&lt;br /&gt;
|-&lt;br /&gt;
| GrapeSmoother&lt;br /&gt;
| This filter averages out visual noise between frames.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/grapesmoother_5F25_dll_20030801.zip Plugin]&lt;br /&gt;
| {{Author/Lindsey Dubb}}&lt;br /&gt;
|-&lt;br /&gt;
| MVDegrain&lt;br /&gt;
| Strong and effective temporal denoiser. Part of the [http://avisynth.org.ru/mvtools/mvtools2.html MVTools] package.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/mvtools/mvtools2.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| TemporalCleaner&lt;br /&gt;
| &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/temporalcleaner_5F25_dll.zip Plugin]&lt;br /&gt;
| vlad59&lt;br /&gt;
|-&lt;br /&gt;
| TTempSmooth &lt;br /&gt;
| TTempSmooth is a motion adaptive (it only works on stationary parts of the picture), temporal smoothing filter.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/TTempSmoothv094.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Temporal Degrain]]&lt;br /&gt;
| SLOW but very effective at removing most grain from video sources.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spatio-Temporal Denoisers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[Convolution3D]]&lt;br /&gt;
| Convolution3D is a spatio-temporal smoother, it applies a 3D convolution filter to all pixels of consecutive frames. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=38281 discussion].&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://hellninjacommando.com/con3d/ Plugin]&lt;br /&gt;
| {{Author/Vlad59}}&lt;br /&gt;
|-&lt;br /&gt;
| Deen&lt;br /&gt;
| Deen is a set of assembly-optimised denoisers, like various 3d and 2d convolutions.&lt;br /&gt;
|&lt;br /&gt;
| [http://ziquash.chez-alice.fr/ Plugin]&lt;br /&gt;
| [http://ziquash.chez-alice.fr/ MarcFD]&lt;br /&gt;
|-&lt;br /&gt;
| DenoiseMF&lt;br /&gt;
| A fast and accurate denoiser for a Full HD video from a H.264 camera. See [http://forum.doom9.org/showthread.php?t=162603 discussion].&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| rean&lt;br /&gt;
|-&lt;br /&gt;
| [[dfttest]] &lt;br /&gt;
| A 2D/3D frequency domain denoiser. See [http://forum.doom9.org/showthread.php?t=132194 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/dfttestv18.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[dfttestMC]] &lt;br /&gt;
| A script that motion compensates dfttest. See [http://forum.doom9.org/showthread.php?t=147676]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| thewebchat&lt;br /&gt;
|-&lt;br /&gt;
| [[DeGrainMedian]] &lt;br /&gt;
| Two stage Spatio-Temporal Limited Median filter for grain removal. [http://forum.doom9.org/showthread.php?t=80834 See]&lt;br /&gt;
|&lt;br /&gt;
| [http://avisynth.org.ru/degrain/degrainmedian.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DFilter]] &lt;br /&gt;
| A 3D Frequency Domain filter - gives strong denoising and moderate sharpening&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/fft3dfilter/fft3dfilter.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DGPU]] &lt;br /&gt;
| Similar algorithm to FFT3DFilter, but uses graphics hardware for increased speed.&lt;br /&gt;
|&lt;br /&gt;
| [http://avisynth.nl/users/tsp/ Plugin]&lt;br /&gt;
| tsp&lt;br /&gt;
|-&lt;br /&gt;
| FrFun3b&lt;br /&gt;
| Fractal denoising. See [http://forum.doom9.org/showthread.php?t=110200 discussion] &lt;br /&gt;
| YV12&lt;br /&gt;
| [http://web.archive.org/web/20080905123941/http://soulhunter.chronocrossdev.com/data/frfun3b_rev3.zip Plugin]&lt;br /&gt;
| prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| FrFun7&lt;br /&gt;
| Fractal denoising. See [http://forum.doom9.org/showthread.php?t=110200 discussion]&lt;br /&gt;
| YV12&lt;br /&gt;
| [http://web.archive.org/web/20080905123941/http://soulhunter.chronocrossdev.com/data/frfun7_rev6.zip Plugin]&lt;br /&gt;
| prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| HQdn3d &lt;br /&gt;
| see [http://akuvian.org/src/avisynth/hqdn3d/]&lt;br /&gt;
|&lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[MC_Spuds]]&lt;br /&gt;
| Motion compensated noise removal with sharpening. Extremely slow, but extremely effective.&lt;br /&gt;
|  &lt;br /&gt;
| Script&lt;br /&gt;
| Spuds, {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MCTemporalDenoise]]&lt;br /&gt;
| Another high quality motion compensated noise removal script with an accompanying post-processing component (with loads of excess feature such as MC-Post-sharpening, MC-antialiasing, deblock, edgeclean and much more)&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=139766 Script]&lt;br /&gt;
| {{Author/LaTo}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MipSmooth]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| NoMoSmooth&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| PeachSmoother&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/peachsmoother.htm Plugin]&lt;br /&gt;
| {{Author/Lindsey Dubb}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveNoiseMC]]&lt;br /&gt;
| Motion compensated filter for removing noise, larger spots and other dirt. Written as an alternative to the old [[Dust]]. Last update Nov 2006. It uses mvtools v1. Jenyok collected together all RemoveNoise and various filters functions and adapted to MVTools v2.&lt;br /&gt;
| &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=110078 Script]&lt;br /&gt;
| Heini011&lt;br /&gt;
|-&lt;br /&gt;
| RemoveDirtMC&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1485300#post1485300 Script]&lt;br /&gt;
| Nephilis&lt;br /&gt;
|-&lt;br /&gt;
| zzz_denoise&lt;br /&gt;
| Simple wrapper around a combination of dfttest and MDegrain3. Requires the [[External_filters#Deepcolor_Filters|Dither]] package.&lt;br /&gt;
| YV12&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1390594#post1390594 Script]&lt;br /&gt;
| {{Author/cretindesalpes}} &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Adjustment Filters ==&lt;br /&gt;
&lt;br /&gt;
=== Colourspace Conversion ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://neuron2.net/autoyuy2/autoyuy2.html AutoYUY2]&lt;br /&gt;
| This filter is correctly converts YV12 to YUY2 without color bias.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| ConvertToYCgCo&lt;br /&gt;
| Converts to the YCgCo colorspace. See [http://forum.doom9.org/showthread.php?t=161736 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=12748&amp;amp;d=1331769022 Plugin]&lt;br /&gt;
| xv&lt;br /&gt;
|-&lt;br /&gt;
| InterleavedConversions&lt;br /&gt;
| Tools for interleaving and de-interleaving 2, 3, and 4-channel data.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| PitifulInsect&lt;br /&gt;
|-&lt;br /&gt;
| YUY2inRGB&lt;br /&gt;
| A quick filter that stuffs YUY2 into RGB24. See [http://forum.doom9.org/showthread.php?p=639948#post639948 discussion.]&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://trevlac.us/YUY2inRGB.zip Plugin]&lt;br /&gt;
| {{Author/Trevlac}}&lt;br /&gt;
|-&lt;br /&gt;
| YUY2toRGB219&lt;br /&gt;
| Converts YUY2 to studioRGB. With this kind of conversion, luma will not change, meaning no quantization error on luma. See [http://forum.doom9.org/showthread.php?p=639432#post639432 discussion.]&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://trevlac.us/colorCorrection/YUY2toRGB219.zip Plugin] &lt;br /&gt;
| {{Author/Trevlac}}&lt;br /&gt;
|-&lt;br /&gt;
| YV12toRGB24HQ&lt;br /&gt;
| YV12 to RGB24 with dithering.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/yv12torgb24hq_20060301.zip Plugin]&lt;br /&gt;
| prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| PlanarConversions&lt;br /&gt;
| Planar conversion functions for AVISynth.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| PitifulInsect&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Duplicate Frame Detectors ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| Dup &lt;br /&gt;
| a robust duplicate frame detector. a frame that is determined to be close enough to its predecessor to be considered a duplicate will be replaced by a copy of the predecessor. This can significantly reduce the size of encoded clips with virtually no visual effect. provides the capability to replace frames with a blend of all the duplicates, providing a valuable noise reduction. Filter by Donald A. Graft.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://neuron2.net/dup/dupnew.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Dupped]]&lt;br /&gt;
| Another frame duplication function, similar to Dup, but hopefully more accurate. See [http://forum.doom9.org/showthread.php?t=134930]&lt;br /&gt;
| &lt;br /&gt;
| [http://www.randomdestination.com/members/corran/misc/dupped/dupped.avsi Script]&lt;br /&gt;
| Corran&lt;br /&gt;
|-&lt;br /&gt;
| DeDup &lt;br /&gt;
| Remove (drop) duplicate frames in the interest of compression quality and speed. Resulting clip will have a variable frame rate.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://akuvian.org/src/avisynth/dedup/ Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| GetDups &lt;br /&gt;
| Selecting unique duplicate frames from clip, it return frames which have copies only, by one from the series (group). Made for 8mm films.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/getdups/getdups.html Plugin]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=111849 AddGrain]&lt;br /&gt;
| Generates film like grain or other effects (like rain) by adding random noise to clip. Noise can be horizontally or vertically correlated causing streaking. Contains AddGrain &amp;amp; AddGrainC &lt;br /&gt;
| [[Y8]], [[YV411]], [[YV12]], [[YV16]], [[YV24]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://ldesoras.free.fr/src/avs/AddGrainC-1.7.0.7z Plugin]&lt;br /&gt;
| {{Author/Tom Barry}} {{Author/Foxyshadis}}&lt;br /&gt;
{{Author/LaTo}} {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://kvcd.net/sansgrip/avisynth/Blockbuster-readme.html AddNoise/Blockbuster]&lt;br /&gt;
| Makes encoder allocate more bits to darker areas, thus eliminating DCT blocks by decreasing the clips compressibility.&lt;br /&gt;
| &lt;br /&gt;
| [http://kvcd.net/sansgrip/avisynth/Blockbuster-0.7.zip Plugin]&lt;br /&gt;
| Ross Thomas&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=87295 AviShader]&lt;br /&gt;
| generic plugin that uses your 3D card&#039;s hardware to assist with rendering&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://mediafire.com/?xkmatqlcvaoskv5 Plugin]&lt;br /&gt;
| Antitorgo&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=97706 ColorLooks]&lt;br /&gt;
| This plugin is based on Trev&#039;s VDub filter Colorlooks and Donald Graft&#039;s Colorize (well it works a bit similar). I also added some new stuff. The plugin contains the following filters: Technicolor, Colorize, Sepia and Posterize.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://www.geocities.com/wilbertdijkhof/ColorLooks_v13.zip Plugin]&lt;br /&gt;
| {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/EffectsMany/EffectsMany_index.html EffectsMany]&lt;br /&gt;
| Creates 34 types of special &amp;quot;animated&amp;quot; effects. Effects act on the input clip in the range of the frame numbers specified. The Audio is not affected.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/EffectsMany/EffectsMany.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GrainFactory3]]&lt;br /&gt;
| Noise generator that tries to simulate the behavior of silver grain on film. See : [http://forum.doom9.org/showthread.php?t=141303]&lt;br /&gt;
| &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1191292#post1191292 Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GNoise]]&lt;br /&gt;
| Adds random noise to a clip. See [http://forum.doom9.org/showthread.php?p=841700#post841700 duscussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20080905123941/http://soulhunter.chronocrossdev.com/data/gnoise_r5.zip Plugin]&lt;br /&gt;
| {{Author/soulhunter}}&lt;br /&gt;
|-&lt;br /&gt;
| [[HollywoodSQ]]&lt;br /&gt;
| Creates popup album, akin to Hollywood squares TV show&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/HollywoodSq/HollywoodSq.html Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[KenBurnsEffect]]&lt;br /&gt;
| Given clip, zooms, pans &amp;amp; rotates clip. See [http://en.wikipedia.org/wiki/Ken_Burns_Effect wikipedia:Ken Burns Effect]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=135776 Script]&lt;br /&gt;
| mikeytown2&lt;br /&gt;
|-&lt;br /&gt;
| MPlayerNoise&lt;br /&gt;
| Noise Generator ported from MPlayer. See [http://forum.doom9.org/showthread.php?t=84181 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/bergfiltercollection_5F25_dll_20041019.zip Plugin]&lt;br /&gt;
| {{Author/bergi}}&lt;br /&gt;
|-&lt;br /&gt;
| [[NoiseGenerator]]&lt;br /&gt;
| Newer function based off of Blockbuster. Adds random noise to clip.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#noisegenerator Plugin]&lt;br /&gt;
| Shubin&lt;br /&gt;
|-&lt;br /&gt;
| [[Scanlines]]&lt;br /&gt;
| Add Scanlines (black horizontal bars) to a video. see [http://en.wikipedia.org/wiki/Scan_line wikipedia:Scan Line]&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/scanlines_5F25_dll_20031103.zip Plugin]&lt;br /&gt;
| turulo&lt;br /&gt;
|-&lt;br /&gt;
| StaticNoiseC&lt;br /&gt;
| Generates static grain using the Mersenne Twister random number generator. See [http://www.nmm-hd.org/newbbs/viewtopic.php?f=8&amp;amp;t=118&amp;amp;start=20#p772 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.nmm-hd.org/upload/get~YnWFecZw0Uo/StaticNoiseC20110108b.zip Plugin]&lt;br /&gt;
| histamine&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.gyroshot.com/turnstile.htm TurnsTile]&lt;br /&gt;
| Applies mosaic and/or palette effects to a clip.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1483856#post1483856 Plugin]&lt;br /&gt;
| {{Author/Robert Martens}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Field Order ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| PFR&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| ReverseFieldDominance&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [http://www.reocities.com/siwalters_uk/reversefielddominance.html Plugin]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Frame Rate Conversion ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AlterFPS]]&lt;br /&gt;
| AlterFPS can be used to speed up or slow down a video by adding or removing fields. It works like the 3:2 pulldown of NTSC film material, except you can choose your new speed. It can also blend frames for progressive frame results, and blend fields like ConvertFPS.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| [[convert60ito24p]]&lt;br /&gt;
| convert60ito24p converts a 60fps interlaced NTSC Video into a 24fps progressive Video using different blending techniques. discussion.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| FPSDown&lt;br /&gt;
| This filter reduces the framerate of a video by 1/2, by blending odd and even frames together. However, it does this in a smart way such that in case of duplicate frames, it will do the smart thing to remove unnecessary blurring in the output video.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [https://github.com/arkeet/fpsdown Plugin]&lt;br /&gt;
| [https://github.com/arkeet/ arkeet]&lt;br /&gt;
|-&lt;br /&gt;
| [http://neuron2.net/trbarry/Readme_FrameDbl.txt FrameDbl]&lt;br /&gt;
| FrameDbl will generate extra frames to double the frame rate. It does this using a motion compensated approach to interpolating between frames. See [http://forum.doom9.org/showthread.php?t=56036 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/framedbl_5F25_dll_20030621.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.spirton.com/category/interframe/ InterFrame]&lt;br /&gt;
| Give videos higher framerates like newer TVs do. Common names are framedoubling, smooth motion and 60FPS conversion. See [http://forum.doom9.org/showthread.php?t=160226 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.spirton.com/uploads/InterFrame/InterFrame-2.5.0.zip Script]&lt;br /&gt;
|{{Author/SubJunk}}&lt;br /&gt;
|-&lt;br /&gt;
| MotionProtectedFPS (Motion)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| MVFlowFPS(2) (MVTools)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| NTSC tools&lt;br /&gt;
| Automatic NTSC to PAL conversion with 24p, 30p, 60i detection. See [http://forum.doom9.org/showthread.php?t=114054]&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/images/NTSC_tools.avsi Script]&lt;br /&gt;
| Mug Funky&lt;br /&gt;
|-&lt;br /&gt;
| [[SalFPS3]]&lt;br /&gt;
| &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| Mug Funky, {{Author/Didée}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Levels and Chroma ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=167573 AutoGain]&lt;br /&gt;
| A high quality auto-leveling filter. It calculates statistics of clip, averages them temporally to stabilize data and uses them to adjust gain. AutoGain has a smoothing &amp;amp; dithering algorithm to avoid banding issue. Calculations are made in 32bits float to avoid rounding errors and can also input/output 16-bits. AutoGain is internally multithreaded and SSE2 optimized.&lt;br /&gt;
| [[Y8]], [[YV411]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=167573 Plugin]&lt;br /&gt;
| {{Author/LaTo}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.thebattles.net/video/autolevels.html Autolevels]&lt;br /&gt;
| Improvement of the [[ColorYUV]] filter&#039;s autogain feature. It stretches the luma histogram to use the entire specified range, averaging the amount of &amp;quot;gain&amp;quot; over consecutive frames to better handle flashes and to avoid flickering. [http://forum.doom9.org/showthread.php?t=128585 Discuss]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://www.thebattles.net/video/autolevels_0.6_20110109.zip Plugin]&lt;br /&gt;
| {{Author/frustum}} &amp;amp; Theodor Anschütz&lt;br /&gt;
|-&lt;br /&gt;
| AWB&lt;br /&gt;
| Automatic white balance for real world footage, similar to the known function in digital cameras. See [http://forum.doom9.org/showthread.php?t=168062 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=168062 Script]&lt;br /&gt;
| martin53&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=139361 Color Balance]&lt;br /&gt;
| Same tool that is found in Gimp &amp;amp; Cinepaint.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1180090#post1180090 script]&lt;br /&gt;
| Gavino &amp;amp; mikeytown2&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.videohelp.com/forum/archive/nice-results-with-avisynth-color-channel-mixer-t339327.html ChannelMixer]&lt;br /&gt;
| Very similar to the ChannelMixer function found in Photoshop. 9 Adjustments are possible, 3 for each color channel.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| Gustaf Ullberg&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=96308 ColourLike]&lt;br /&gt;
| Makes a clip look like a &#039;reference&#039; clip by adjusting each colour channel.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#colourlike Plugin]&lt;br /&gt;
| {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://expsat.sourceforge.net/ ExpLabo]&lt;br /&gt;
| ExpSat apply a non-linear transformation of saturation, Colorize change the image color dominance in a flexible manner, HLSnoise adds a noise to the image separately to the HLS dimensions. See [http://forum.doom9.org/showthread.php?t=97052 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://sourceforge.net/projects/expsat/ Plugin]&lt;br /&gt;
| brabbudu&lt;br /&gt;
|-&lt;br /&gt;
| [[FlimsYlevels]]&lt;br /&gt;
| Luma adjustment function to give a more &amp;quot;film-ish&amp;quot; look. (Based on {{Author/Didée}}&#039;s [[Ylevels]]).&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| FlimsyFeet &lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=605890#post605890 GiCocu]&lt;br /&gt;
| Use GIMP/Photoshop curve files&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#gicocu Plugin]&lt;br /&gt;
| E-Male&lt;br /&gt;
|-&lt;br /&gt;
| [http://strony.aster.pl/paviko/hdragc.htm HDRAGC]&lt;br /&gt;
| High Dynamic Range Automatic Gain Control - Increase dynamic range of video clips (enhance shadows). It&#039;s &amp;quot;simply&amp;quot; gaining (brightening) dark areas of image without causing blow of highlights. Amount of gain is calculated automatically, but can be influenced by parameters. See [http://forum.doom9.org/showthread.php?t=93571 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://strony.aster.pl/paviko/Hdragc-1.8.7.zip Plugin]&lt;br /&gt;
| paviko&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=161986 HighlightLimiter]&lt;br /&gt;
| &amp;quot;Darkening highlight&amp;quot;. Works well on over exposed clips. It can also be combined with ContrastMask to create HDR effect&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1522100#post1522100 Script]&lt;br /&gt;
| javlak&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/HistogramAdjust/HistogramAdjust.html HistogramAdjust]&lt;br /&gt;
| Adjusts the histogram of a frame by either equalizing it or by matching with histogram of another image, or with given histogram table of values.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1570968#post1570968 Histograms in RGB &amp;amp; CMY]&lt;br /&gt;
| Display level histogram in RGB and CMY, and a histogram for RGB parade. Useful for color corrections.&lt;br /&gt;
| [[YV12]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| Script&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
| [[SGradation]]&lt;br /&gt;
| SGradation is much like a gamma function, but &#039;2nd order&#039;.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothLevels]]&lt;br /&gt;
| Advanced levels adjustment function, with limiting &amp;amp; smoothing parameters.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=137479 Script]&lt;br /&gt;
| {{Author/LaTo}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Tint]]&lt;br /&gt;
| Tints the image toward a specified colour.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=74334 TweakColor]&lt;br /&gt;
| Target specific hue and saturation ranges for hue and saturation adjustments.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/tweakcolor_5F25_dll_20040412.zip Plugin]&lt;br /&gt;
| {{Author/Trevlac}}&lt;br /&gt;
|-&lt;br /&gt;
| Tweak3 &lt;br /&gt;
| Same as [[Tweak]] but with dithering.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20080905123941/http://soulhunter.chronocrossdev.com/data/tweak3.zip Plugin]&lt;br /&gt;
| {{Author/soulhunter}}&lt;br /&gt;
|-&lt;br /&gt;
| WhiteBalance&lt;br /&gt;
| Correct the white balance of a clip with a large degree of control and accuracy over other methods of correcting white balance. See [http://forum.doom9.org/showthread.php?t=106196 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://www.64k.it/andres/data/avisynth/WhiteBalance100.zip Plugin]&lt;br /&gt;
| SomeJoe&lt;br /&gt;
|-&lt;br /&gt;
| [[Ylevels]]&lt;br /&gt;
| A simple replacement for Avisynth&#039;s internal [[Levels]] command, with a few neat differences.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Linedarkening ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| FastLineDarken&lt;br /&gt;
| Line darkening script. See [http://forum.doom9.org/showthread.php?t=82125 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| Vectrangle&lt;br /&gt;
|-&lt;br /&gt;
| FastLineDarkenMOD&lt;br /&gt;
| Line darkening script. See original [http://forum.doom9.org/showthread.php?t=82125 discussion.] Updated [http://forum.doom9.org/showthread.php?p=1060081#post1060081 script.] Additional [http://forum.doom9.org/showthread.php?p=1023638#post1023638 information.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| Vectrangle / {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| LimitedDarken&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[Shared_functions/mfToon|mfToon]]&lt;br /&gt;
| mfToon darkens cartoon edges. In default operation, it performs line darkening, Xsharpening, and warp sharpening. &lt;br /&gt;
See [http://forum.doom9.org/showthread.php?t=53364 discussion.] Additional information [http://forum.doom9.org/showthread.php?t=125128 here] and [http://forum.doom9.org/showthread.php?t=52066 here]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20090212071718/http://mf.creations.nl/avs/functions/mfToon-v0.52.avs Script]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| SuperToon&lt;br /&gt;
| An attempt to optimize/speed up the previous versions of mfToon, vmToon, etc. See [http://forum.doom9.org/showthread.php?t=163987 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=163987 Script]&lt;br /&gt;
| Hadien&lt;br /&gt;
|-&lt;br /&gt;
| [[Toon]]&lt;br /&gt;
| Simple and fast Linedarkener. See [http://forum.doom9.org/showthread.php?t=131454 discussion.] Original Toon [http://forum.doom9.org/showthread.php?p=1022171 discussion] in script form. &lt;br /&gt;
Binary patched Toon-v1.0 to use aWarpSharp2 instead of aWarpSharp: [http://forum.doom9.org/showthread.php?t=147285 Toon-v1.1] &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20090218093135/http://mf.creations.nl/avs/filters/Toon-v1.0.dll Plugin]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| Toon-lite&lt;br /&gt;
| It&#039;s the same as Toon, just without the warpsharp processing. For default strength use &amp;quot;1.0&amp;quot;.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20090218093135/http://mf.creations.nl/avs/filters/Toon-v1.0-lite.dll Plugin]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vmToon]]&lt;br /&gt;
| The successor to mfToon. Darkens lines, thins lines, and does supersampled sharpening all in one, but slow. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/Vmtoon-v0.74.avsi Script]&lt;br /&gt;
| Vectrangle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Resizers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=87602 AutoCrop]&lt;br /&gt;
| Automatically crops black borders ([http://en.wikipedia.org/wiki/Letterbox wikipedia:Letterbox], [http://en.wikipedia.org/wiki/Pillar_box_%28film%29 wikipedia:Pillar box], [http://en.wikipedia.org/wiki/Windowbox_%28film%29 wikipedia:Windowbox]) from a clip. Operates in preview mode (overlays the recommended cropping information) or cropping mode. Can also ensure width and height are multiples of specified numbers.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/autocrop_25_dll_20050103.zip Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| Debilinear&lt;br /&gt;
| This filter is designed to reverse the effects of bilinear upsampling.&lt;br /&gt;
| RGB, YV12&lt;br /&gt;
| [http://rgb.chromashift.org/ Plugin]&lt;br /&gt;
| Prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| EdiUpsizer &lt;br /&gt;
| see [http://bengal.missouri.edu/~kes25c/EDIUpsizer.zip]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| EEDI2 &lt;br /&gt;
| see [http://bengal.missouri.edu/~kes25c/EEDI2v092.zip normal]  [http://foxyshadis.slightlydark.com/random/Eedi2mt.zip Multi-threaded] [http://members.optusnet.com.au/squid_80/EEDI2_imp64.zip Multi-threaded 64-bit]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| FastEDIUpsizer &lt;br /&gt;
| [http://members.optusnet.com.au/squid_80/EEDI2_imp64.zip]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=330319#post330319 HybridResize]&lt;br /&gt;
| Uses Lanczos (sharp) for edges and Bilinear (soft) on the rest of the image.&lt;br /&gt;
| &lt;br /&gt;
| [http://web.archive.org/web/20090423011809/http://mf.creations.nl/avs/functions/HybridResize-0.2.avs Script]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Lanczosplusv3]]&lt;br /&gt;
| Very slow, but high quality resizer. See [http://forum.doom9.org/showthread.php?t=136690]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| *.mp4 guy&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=129953 NNEDI] &lt;br /&gt;
| Neural Network New-Edge Directed Interpolation.&lt;br /&gt;
| &lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/ Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=154674 PointSize]&lt;br /&gt;
| A set of [http://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms pixel art resizers]: Scale2x, Scale3x, LQ2x, LQ3x, LQ4x, HQ2x, HQ3x, HQ4x.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| `Orum&lt;br /&gt;
|-&lt;br /&gt;
| [http://svn.int64.org/viewvc/int64/resamplehq/doc/index.html ResampleHQ] &lt;br /&gt;
| ResampleHQ provides gamma-aware resizing and colorspace conversion.&lt;br /&gt;
| &lt;br /&gt;
| [http://sourceforge.net/projects/int64/files/ResampleHQ/ResampleHQ-v1.zip/download Plugin]&lt;br /&gt;
| Cory Nelson (phrosty [at] gmail.com) (PhrostByte on Doom9&lt;br /&gt;
|-&lt;br /&gt;
| [[ResizeARC]]&lt;br /&gt;
| ResizeARC respects AR as possible maintaining MOD32 resolutions, uses bitrate, bpp and the resize function specified as parameters. Usage:&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=135735 Seamer]&lt;br /&gt;
| Seam Carving/Liquid Rescale for Content-Aware Image Resizing. See [http://en.wikipedia.org/wiki/Seam_carving wikipedia:Seam Carving]&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/Seamer/Seamer.html Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SimpleResize]]&lt;br /&gt;
| Very simple and fast two tap linear interpolation.  It is unfiltered which means it will not soften much.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20110208133956/http://home.comcast.net/~tombarry970/ Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=147117 SplineResize]&lt;br /&gt;
| SplineResize contains two kinds of spline based resizers: The first ones are the (cubic) spline based resizers from Panorama tools: Spline100Resize (using 10 sample points) and Spline144Resize (using 12 sample points) are examples. Other ones are available in AviSynth itself. The second ones are natural cubic splines that use the kernel itself as a spline.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://www.wilbertdijkhof.com/SplineResize_v02.zip Plugin]&lt;br /&gt;
| {{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [[YV12InterlacedReduceBy2]]&lt;br /&gt;
| InterlacedReduceBy2 is a fast Reduce By 2 filter, usefull as a very fast downsize of an interlaced clip. See [http://forum.doom9.org/showthread.php?s=&amp;amp;postid=271863 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20110208133956/http://home.comcast.net/~tombarry970/ Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=49429 Zoom]&lt;br /&gt;
| Zoom, Pan &amp;amp; Rotate Clip. Adds alpha layer to clip.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/zoom_25_dll_20050122.zip Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1111789#post1111789 ZoomBox]&lt;br /&gt;
| Replacement for ResizeKAR. Resizes clip Keeping the Aspect Ratio. Can set Source/Target PAR/DAR, option to zoom in/out in order to hide/show black borders.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Sharpeners ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| aSharp &lt;br /&gt;
| Adaptive sharpening filter. You can use it for high quality sharpening of soft sources. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=38436 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/asharp_5F25_dll_20030118.zip Plugin]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
| aWarpSharp &lt;br /&gt;
| A warp sharpening filter.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/awarpsharp_5F25_dll_20030203.zip Plugin]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
| aWarpSharp2&lt;br /&gt;
| A modern rewrite of aWarpSharp with several bugfixes and optimizations. See [http://forum.doom9.org/showthread.php?t=147285 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.mediafire.com/?7bu46ab33dwex0o Plugin]&lt;br /&gt;
| {{Author/SEt}}&lt;br /&gt;
|-&lt;br /&gt;
| blah &lt;br /&gt;
| A sharpening.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| *.mp4 guy&lt;br /&gt;
|-&lt;br /&gt;
| [[LimitedSharpen]]&lt;br /&gt;
| LimitedSharpen can be used like a traditional sharpener, but producing much less artefacts. It can be used as a replacement for the common &amp;quot;resize(x4)-XSharpen-resize(x1)&amp;quot; combo, with very similar results (perhaps even better) - but at least 2 times faster, since it requires much less oversampling.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[LSFmod]]&lt;br /&gt;
| A LimitedSharpenFaster mod with a lot of new features and optimizations. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=142706 Script]&lt;br /&gt;
| {{Author/LaTo}}&lt;br /&gt;
|-&lt;br /&gt;
| MSharpen&lt;br /&gt;
| This filter implements an unusual concept in spatial sharpening to sharpen important edges without amplifying noise. Although designed specifically for anime, it also works quite well on normal video. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=42839 discussion].&lt;br /&gt;
| [[RGB]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://neuron2.net/msharpen/msharpen.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Super Slow Sharpen]]&lt;br /&gt;
| Very slow, but high quality sharpener. See [http://forum.doom9.org/showthread.php?t=132330]&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| *.mp4 guy&lt;br /&gt;
|-&lt;br /&gt;
| [http://mf.creations.nl/avs/functions/ SSXSharpen]&lt;br /&gt;
| Included in SharpTools. Sharpens the picture using [[supersampling]] techniques.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| TUnsharp&lt;br /&gt;
| TUnsharp is a basic sharpening filter that uses a couple different variations of unsharpmasking and allows for controlled sharpening based on edge magnitude and min/max neighborhood value clipping. The real reason for its existence is that it sports a gui with real time preview. See [http://forum.doom9.org/showthread.php?t=84344 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/tunsharp_5F25_dll_20050524.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UnFilter]]&lt;br /&gt;
| This filter softens/sharpens a clip. It implements horizontal and vertical filters designed to (slightly) reverse previous efforts at softening or edge enhancement that are common (but ugly) in DVD mastering. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=28197&amp;amp;pagenumber=3 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/unfilter_5F25_dll_20030116.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[UnsharpHQ]]&lt;br /&gt;
| A strong and fast unsharp mask with some new features. See [http://forum.doom9.org/showthread.php?t=159637 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.mediafire.com/download.php?mq3k44q2fvusz17 Plugin]&lt;br /&gt;
| list&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| WarpSharp Package&lt;br /&gt;
| Contains these sharpeners: Unsharpmask, WarpSharp, Xsharpen. See [http://wayback.archive.org/web/20081229042741/http://niiyan.net/?WarpSharpPackage description.]&lt;br /&gt;
&lt;br /&gt;
[http://avisynth.nl/users/warpenterprises/files/warpsharppackage_5F25_dll_20031103.zip 2003 Version]&lt;br /&gt;
&lt;br /&gt;
[http://web.archive.org/web/20070504134119/http://seraphy.fam.cx/~seraphy/program/WarpSharp/index.html 2006 Version]&lt;br /&gt;
&lt;br /&gt;
[http://web.archive.org/web/20120212062428/http://vfrmaniac.fushizen.eu/seraphy_mirror/warpsharp/bin/warpsharp_20080325.7z 2008 Version]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/seraphy}}&lt;br /&gt;
|-&lt;br /&gt;
| WarpSharp YV12 &lt;br /&gt;
| Contains WarpSharp &amp;amp; XSharpen. This version of WarpSharp is very fast.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/warpsharp_5F25_dll_20030103.zip Plugin]&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| [[FineSharp]]&lt;br /&gt;
| Small and relatively fast realtime-sharpening function, designed for 1080p, or after scaling 720p -&amp;gt; 1080p during playback (to make 720p look more being like 1080p). See [http://forum.doom9.org/showthread.php?p=1569035#post1569035 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1569035#post1569035 Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blurring ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [https://github.com/chikuzen/BucketMedian BucketMedian]&lt;br /&gt;
| BucketMedian is an implementation of spatial median filter adapting bucket(counting) sort algorithm.&lt;br /&gt;
| [[Y8]], [[YV411]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [https://dl.dropboxusercontent.com/s/bczippngoqy6xbw/BucketMedian-0.3.1.7z Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Variableblur]]&lt;br /&gt;
| Variableblur is a gaussian, binomial or average blur filter with a variable radius(variance).&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/variableblur.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subtitling ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| AssRender&lt;br /&gt;
| Libass-based subtitle renderer. See [http://forum.doom9.org/showthread.php?t=148926 discussion].&lt;br /&gt;
| RGB32, RGB24, YV24, YV12, Y8&lt;br /&gt;
| [http://encodan.srsfckn.biz/assrender/ C Plugin]&lt;br /&gt;
| lachs0r, TheFluff&lt;br /&gt;
|-&lt;br /&gt;
| SubAA&lt;br /&gt;
| Single Subtitle with Anti-aliasing. &lt;br /&gt;
| &lt;br /&gt;
| [http://soulhunter.chronocrossdev.com/data/SSubAA.avs Script]&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/dvutilities_20050717.zip SubtitleEx]&lt;br /&gt;
| Similar to the original [[Subtitle]] function but can do more: apply text to range; effects - bold, underline, italic, center, fading, motion, blur, emboss, etc...; alpha channel.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/subtitleex_25_dll_20040819.zip Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/vsfilter.htm TextSub] (VSFilter)&lt;br /&gt;
| Supported Subtitle Formats: VOBsub (.sub/.idx), SubStation Alpha/Advanced SubStation Alpha (.ssa/.ass), SubRip (.srt), MicroDVD (.sub), SAMI (.smi), PowerDivX (.psb), Universal Subtitle Format (.usf), Structured Subtitle Format (.ssf). See [http://en.wikipedia.org/wiki/VSFilter]&lt;br /&gt;
| &lt;br /&gt;
| [http://sourceforge.net/project/showfiles.php?group_id=205650&amp;amp;package_id=246121&amp;amp;release_id=541232 Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/SubtitleMulti SubtitleMulti]&lt;br /&gt;
| A parameter-compatible Subtitle function which allows the usage of line breaks. (Wilbert: I can&#039;t find the script ...)&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| JLennox&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| VSFilterMod&lt;br /&gt;
| A new VSFilter with more ass tags.&lt;br /&gt;
|&lt;br /&gt;
| Plugin&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Transitions ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[DissolveAGG]]&lt;br /&gt;
| Wipe Transition with a soft edge. See [http://forum.doom9.org/showthread.php?t=118016 discussion]. &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; There exist multiple variants of the script as the result of the interaction between authors in that discussion.&lt;br /&gt;
| &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=900674#post900674 Script (v1)] &lt;br /&gt;
[http://forum.doom9.org/showthread.php?p=1152440#post1152440 Script (v2)] &lt;br /&gt;
[http://forum.doom9.org/showthread.php?p=1152632#post1152632 Script (v3)] &lt;br /&gt;
| {{Author/zemog}}, {{Author/mikeytown2}}, {{Author/Gavino}} and others&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=62277 JDL_MaskTransition]&lt;br /&gt;
| Combines two clips using the specified mask clip.  The audio tracks are blended during the transition. About any transition can be made with this function.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/stickboy/jdl-effects.avsi Script]&lt;br /&gt;
| {{Author/stickboy}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/TransAll/docs/index.html TransAll]&lt;br /&gt;
| Around 150 distinct transitions can be created with this plugin. &lt;br /&gt;
| [[RGB]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/TransAll/TransAll.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition (Albert Gasset)]]&lt;br /&gt;
| Various Wipe and Random Block modes. Has 19 built in patterns or it can use an external file.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#transition Plugin]&lt;br /&gt;
| {{Author/Albert Gasset}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition (shubin)]] &lt;br /&gt;
| Contains 2 modes: circle and line. In circle mode the area has radius R and center xCenter,yCenter. In line mode the line passes through xCenter,yCenter with slope R.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#transition Plugin]&lt;br /&gt;
| {{Author/shubin}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Other Filters ==&lt;br /&gt;
&lt;br /&gt;
=== Debugging/Diagnostic Filters ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| AVInfo&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=165528 AVSMeter]&lt;br /&gt;
| AVSMeter is a CLI (command line interface) tool that &amp;quot;runs&amp;quot; an Avisynth script without any overhead, displays clip info, CPU and memory usage and the minimum, maximum and average frame rates, indicating how fast Avisynth can serve frames to a client application.&lt;br /&gt;
It comes in handy when testing filters to determine their performance and memory requirements.&lt;br /&gt;
|&lt;br /&gt;
| Command line executable&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
| Avisynth Monitor&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| AvsTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[DumpPixelValues]]&lt;br /&gt;
| Samples the colors from selected pixels for every frame in a video source and outputs the data to a text or binary file.&lt;br /&gt;
| RGB32, YUY2&lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| Framenumber&lt;br /&gt;
| Framenumber inserts the framenumber of the current frame (+ offset).&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1467907#post1467907 Glitch Analyzer]&lt;br /&gt;
| Glitch Analyzer generates a diagnostic video, then analyzes the recorded version of it, to detect swapped, dropped, or repeated fields.&lt;br /&gt;
| YUY2,YV12&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1467907#post1467907 Script]&lt;br /&gt;
|-&lt;br /&gt;
| Grid&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[HDColorBars]]&lt;br /&gt;
| A script to create an HD test pattern based on ARIB STD-B28 Rev1.  Can easily be adapted to an SMPTE version.  [http://avisynthrestoration.googlecode.com/files/ARIB-STD-B28.png Image]&lt;br /&gt;
| YV12&lt;br /&gt;
| [[HDColorBars]]&lt;br /&gt;
|-&lt;br /&gt;
| Kronos&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://code.google.com/p/avisynthrestoration/wiki/Measure Measure]&lt;br /&gt;
| Measures luminence of greyscale bars and prints results on-screen.  Can be used to set brightness/contrast in capture settings accurately.&lt;br /&gt;
| YV12&lt;br /&gt;
| [http://code.google.com/p/avisynthrestoration/downloads/list Script]&lt;br /&gt;
|-&lt;br /&gt;
| MonitorFilter&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[PixelInfo]]&lt;br /&gt;
| A GUI-based filter that lets you pick a pixel and gives you color information.&lt;br /&gt;
| RGB32, YUY2&lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowPixelValues]]&lt;br /&gt;
| This filter displays the actual Y U and V (or R G and B) values from pixels within a frame.&lt;br /&gt;
| RGB32, YUY2&lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://code.google.com/p/avisynthrestoration/wiki/Testpatterns Testpatterns]&lt;br /&gt;
| This filter creates a sinewave frequency sweep directly in YV12, useful to measuring video response.&lt;br /&gt;
| YV12&lt;br /&gt;
| [http://code.google.com/p/avisynthrestoration/downloads/list Script]&lt;br /&gt;
|-&lt;br /&gt;
| TMonitor&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| ViewFields/UnViewFields&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[Comptest]]&lt;br /&gt;
| The script Compressibility test can be used for a compressibility test on a clip.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[SeeTheDifference]]&lt;br /&gt;
| SeeTheDifference just makes the difference visible between an encoded and an original videoclip. So you can see what you really &amp;quot;lose&amp;quot; when encoding a video.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/BoxCompare BoxCompare]&lt;br /&gt;
| BoxCompare will let you compare up to 4 clips with simple annotations. It&#039;s basically a wrapper for StackHorizontal/StackVertical.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Export Filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are used to export things from an avs file.&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=135928 Immaavs]&lt;br /&gt;
| ImmaWrite uses the ImageMagick libraries to write images. Many formats are supported including animations and multipage files.&lt;br /&gt;
| &lt;br /&gt;
| [http://www.geocities.com/wilbertdijkhof/ Plugin]&lt;br /&gt;
| {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1073371#post1073371 twriteavi]&lt;br /&gt;
| Serve AVI file to program requesting it as well as write an avi file. Useful for speeding up 2 pass encodes at the cost of hard drive space.&lt;br /&gt;
| &lt;br /&gt;
| [http://members.optusnet.com.au/squid_80/twriteavi.zip Plugin]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Import Filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are used to import filters written for other audio and video packages.&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?threadid=92174 FreeFrame]&lt;br /&gt;
| Allows [http://freeframe.sourceforge.net/ freeframe] filters (mostly effects) to be used directly in avisynth.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/freeframe_25_dll_20050426.zip Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| LoadVFApiPlugin &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Meta-Filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are primarily designed to be used with other filters, to restrict or augment their effect.&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| Motion &lt;br /&gt;
| see [http://avisynth.nl.users/warpenterprises/files/motion_25_dll_20051212.zip]&lt;br /&gt;
|&lt;br /&gt;
| Plugin&lt;br /&gt;
| mg262&lt;br /&gt;
|-&lt;br /&gt;
| [[MT]]&lt;br /&gt;
| MT is a filter that enables other filters to run multithreaded. This should hopefully speed up processing on hyperthreaded/multicore processors or multiprocessor systems. See [http://forum.doom9.org/showthread.php?t=94996]&lt;br /&gt;
| Any&lt;br /&gt;
| Plugin&lt;br /&gt;
| tsp&lt;br /&gt;
|-&lt;br /&gt;
| [[MVTools]] &lt;br /&gt;
| MVTools provides filters for estimation and compensation of objects&#039; motion in video clips. Motion compensation may be used for strong temporal denoising, advanced framerate conversions, image restoration and other tasks. See [http://forum.doom9.org/showthread.php?t=131033]&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.org.ru/mvtools/mvtools2.html Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Multipurpose Filters ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[Camembert]]&lt;br /&gt;
| Camembert provides [[HQDering]]&#039;s functionality with additional background enhancement.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=146632 HybridFuPP]&lt;br /&gt;
| An adaptive processor, allowing picture cleaning and compressibility gain.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/images/HybridFuPP.avsi Script]&lt;br /&gt;
| Fupp&lt;br /&gt;
|-&lt;br /&gt;
| [[Integrated_Image_Processor|iiP]]&lt;br /&gt;
| Integrated Image Processor performs basic denoising and sharpening excluding already hard edges to avoid oversharpening; this should give the best relative compressibility for any level of detail enhancement. Its main purpose is upconversion from DVD resolutions to (pseudo-) HDTV resolutions. It aims at natural sources only. For animated/cartoon content, one is probably better of with [[Shared_functions/mfToon|mfToon]] and [[SharpResize]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| [[SeeSaw]]&lt;br /&gt;
| SeeSaw uses a balance of denoising and sharpening to enhance a clip. The aim is to enhance weak detail without oversharpening or creating jaggies on strong detail, and produce a result that is temporally stable without detail shimmering.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Support filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are primarily designed to augment the creation of custom script-based filters.&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| CheckMask&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[FrameCache]]&lt;br /&gt;
| Frame cache plugin. It helps greatly increase performance, especially in combination with another plugins, like SmoothDeinterlace. Usage FrameCache( [number of frames to remember], (path to log file) ). &lt;br /&gt;
| any&lt;br /&gt;
| johny5 dot coder via gmail&lt;br /&gt;
| {{Author/Evgeny}} &lt;br /&gt;
|-&lt;br /&gt;
| GRunT&lt;br /&gt;
| Extends Avisynth&#039;s [[Runtime_environment|Runtime Environment]], making it easier to use, especially inside script functions.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=139337 Plugin]&lt;br /&gt;
| {{Author/Gavino}}&lt;br /&gt;
|-&lt;br /&gt;
| GScript&lt;br /&gt;
| Extends the Avisynth scripting language to provide additional control-flow constructs: multi-line conditionals (if-then-else blocks), &#039;while&#039; loops and &#039;for&#039; loops.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=147846 Plugin]&lt;br /&gt;
| {{Author/Gavino}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MaskTools]]&lt;br /&gt;
| This plugin provides tools for the creation, enhancement and manipulation of masks for each component (Y, U, V) of the YV12 [[Color_spaces|color space]]. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=67232 discussion]. &lt;br /&gt;
&#039;&#039;&#039;This version is now deprecated, use MaskTools2 instead for new scripts.&#039;&#039;&#039;&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://manao4.free.fr/ Plugin]&lt;br /&gt;
| {{Author/Kurosu}} &lt;br /&gt;
{{Author/Manao}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MaskTools2]]&lt;br /&gt;
| This plugin provides tools for the creation, enhancement and manipulation of masks for each component (Y, U, V) of the YV12 [[Color_spaces|color space]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://manao4.free.fr/ Plugin]&lt;br /&gt;
| {{Author/Manao}}&lt;br /&gt;
|-&lt;br /&gt;
| MergeClips&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[MVTools]]&lt;br /&gt;
| This plugin provides a collection of functions for motion estimation and compensation.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/mvtools/mvtools2.html Plugin]&lt;br /&gt;
| Various&lt;br /&gt;
|-&lt;br /&gt;
| PlaneMinMax&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[ApplyInterlacedFilter]]&lt;br /&gt;
| ApplyInterlacedFilter safely processes interlaced video with spatial and temporal filters.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deepcolor Filters ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| Deep Color Tools&lt;br /&gt;
| This Script provides basic functions to import 10bit video, do color adjustments, and export to 8bit&lt;br /&gt;
| [http://developer.apple.com/quicktime/icefloe/dispatch019.html#v210 V210]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1467907#post1467907 Script]&lt;br /&gt;
| jmac698&lt;br /&gt;
|-&lt;br /&gt;
| Dither&lt;br /&gt;
| Generates video with up to 16 bits per component after denoising and dithers back to 8 bits for storage. Primarily written to smooth fine gradients to remove colorbanding during/after denoising. Can also recover high bitdepth data potentially contained in a noisy clip; dither a high bitdepth picture into a standard YV12; and perform basic operations (masking, curves...) on high bitdepth pictures, as they cannot be manipulated safely with conventional avisynth filters.&lt;br /&gt;
| Planar colorspaces&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1386559 Plugin + scripts]&lt;br /&gt;
| {{Author/cretindesalpes}} &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 3D Filters ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://web.archive.org/web/20110809073332/http://arenafilm.hu/alsog/anaglyph/ Analglyph Filter]&lt;br /&gt;
| This filter produces analglyph video from a stereo pair.  Analglyph is a 3d viewing method which uses colored glasses.  The plugin supports the advanced [http://web.archive.org/web/20130706165544/www.site.uottawa.ca/~edubois/anaglyph/ Dubois] algorithm, which is able to reduce the ghosting effect that is possible in the conversion.&lt;br /&gt;
| RGB24, RGB32, YUY2, YV12&lt;br /&gt;
| [http://arenafilm.hu/alsog/anaglyph/ Plugin]&lt;br /&gt;
| {{Author/Kertai Gábor}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Libraries ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[http://avslib.sourceforge.net/ AVSLib]&lt;br /&gt;
|General purpose toolkit/extension library enhancing AviSynths ability to perform complex linear and non-linear video editing tasks. Includes support for Array containers &amp;amp; operators, debugging tools, math &amp;amp; string functions, filters and many more.&lt;br /&gt;
|&lt;br /&gt;
|[http://sourceforge.net/projects/avslib/ AVSLib]&lt;br /&gt;
|[http://gzarkadas.users.sourceforge.net/ gzarkadas]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Audio Filters ==&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=165703 waveform]&lt;br /&gt;
| Displays audio waveforms superimposed on the video, similar to AudioGraph below but with multi-channel support and consistent support for all colourspaces.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://horman.net/waveform0.2.zip Plugin]&lt;br /&gt;
| David Horman&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/audiograph.htm AudioGraph]&lt;br /&gt;
| Displays the audio waveform superimposed on the video. Intended to help with editing rather than for final output. Useful for finding specific dialog or sound, and for checking A/V sync.&lt;br /&gt;
| [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/audgraph_25_dll_20040318.zip Plugin]&lt;br /&gt;
| {{author/Richard Ling}}&lt;br /&gt;
{{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| BeFa &lt;br /&gt;
| Band Eliminate Filter for Audio&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://niiyan.net/?JapanesePlugins#j0b47027 Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1043099#post1043099 MinMaxAudio]&lt;br /&gt;
| Computes the root mean square, maximal or minimal value over all samples in all channels,or just over all samples in channel, and outputs the value (in decibels) as a string. It&#039;s a conditional audio filter, so the computation is done framewise.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.geocities.com/wilbertdijkhof/MinMaxAudio_v02.zip Plugin]&lt;br /&gt;
| {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=104792 Sox Audio Effect Filter]&lt;br /&gt;
| Use [http://sox.sourceforge.net/ SOX] effects within AviSynth. Most effects are supported, and multiple effects can be stacked after each other.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=761154#post761154 Plugin]&lt;br /&gt;
| {{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| ViewAudio &lt;br /&gt;
| includes two filters: ViewAudio and AudioCache. &lt;br /&gt;
| &lt;br /&gt;
| [http://niiyan.net/?JapanesePlugins#j0b47027 Plugin] [http://yo4kazu.110mb.com/ x64]&lt;br /&gt;
|-&lt;br /&gt;
| [[FindAudioSyncScript]]&lt;br /&gt;
| FindAudioSyncScript helps you to find the appropriate audio delays, if you have desync&#039;ed audio.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| IanB&lt;br /&gt;
|-&lt;br /&gt;
| [[Shared_functions/AddAudio|AddAudio]]&lt;br /&gt;
| An AddAudio function that adds silent audio to a clip. Needed for CCE 2.50 users.&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== As Yet Unclassified ==&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=397426#post397426 Adjust]&lt;br /&gt;
| Generic Y-Channel mapping. Can define a function for the Y Channel.&lt;br /&gt;
| [[YUY2]], [[RGB32]], [[RGB24]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#adjust Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| Anaglypher &lt;br /&gt;
| A plugin for combining stereopairs into single anaglyph image&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://shura.luberetsky.ru/plaginy-dlya-avisynth/anaglypher/ Plugin]&lt;br /&gt;
| [http://shura.luberetsky.ru/ Shura Luberetsky]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=118430 Average]&lt;br /&gt;
| Weighted average of any number of clips (fast). Average(clip clip1, int weight1, ...)&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=118430 Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=45670 BorderControl]&lt;br /&gt;
| Add smeared borders instead of a solid if wanted.&lt;br /&gt;
| &lt;br /&gt;
| [http://www.geocities.com/siwalters_uk/bdrcntrl.html Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=675275#post675275 BeforeAfter]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
|-&lt;br /&gt;
| BeforeAfterDiff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| BeforeAfterLine&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=46506 Call]&lt;br /&gt;
| Call an external program from the script.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#call Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| Chikitown&lt;br /&gt;
| A simple script to do overlay to a video RGBA in AviSynth.&lt;br /&gt;
| &lt;br /&gt;
| Script&lt;br /&gt;
| {{author/Chikitown}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=93990 Colorit]&lt;br /&gt;
| Color a black and white image or recolor a color image.&lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/ColorIt/ColorIt.html Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| CutFrames&lt;br /&gt;
| Cut a range of frames from a single a/v clip. Opposite of Trim with extras.&lt;br /&gt;
| &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=135423 Script]&lt;br /&gt;
|-&lt;br /&gt;
| DCT &lt;br /&gt;
| see [http://avisynth.nl/users/warpenterprises/files/dct_25_dll_20050612.zip]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1444027#post1444027 DDigit]&lt;br /&gt;
| DDigit Plugin Text Rendering Pack for Plugin writers.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=80419 DeBlot]&lt;br /&gt;
| Color Blot Reduction. &lt;br /&gt;
| [[YUY2]],[[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/#deblot Plugin]&lt;br /&gt;
|- &lt;br /&gt;
| [http://avisynth.org.ru/exinpaint/exinpaint.html ExInpaint]&lt;br /&gt;
| Exemplar-Based Image Inpainting - removing large objects from images.. &lt;br /&gt;
| &lt;br /&gt;
| [http://avisynth.org.ru/exinpaint/exinpaint0200.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=55881 FillMargins]&lt;br /&gt;
| Fills the four margins of a video clip with the outer pixels of the unfilled portion. It takes integer 4 parms specifying the size of the left, top, right, and bottom margins.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/fillmargins_25_dll_20030618.zip Plugin]&lt;br /&gt;
|-&lt;br /&gt;
| fftw3&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=150291 FritzPhoto]&lt;br /&gt;
| Use Avisynth to process still images.&lt;br /&gt;
| &lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=150291 FritzPhoto]&lt;br /&gt;
|-&lt;br /&gt;
| GetSystemEnv&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=598958#post598958 GraMaMa]&lt;br /&gt;
| Gradient Mask Maker&lt;br /&gt;
| YV12&lt;br /&gt;
| [http://www.geocities.com/wilbertdijkhof/GraMaMa_v02.zip Plugin]&lt;br /&gt;
| {{author/E-Male}} and {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| LBKiller&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| LTSMC&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| MCNR_simple2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| NeuralNet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| PseudoColor &lt;br /&gt;
| see [http://avisynth.nl/users/warpenterprises/files/pseudocolor_25_dll_20030919.zip]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| Reform &lt;br /&gt;
| see [http://avisynth.nl/users/warpenterprises/files/reform_20060915.ZIP]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| RGBManipulate &lt;br /&gt;
| see [http://avisynth.nl/users/warpenterprises/files/rgbmanipulate_20051011.zip]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| SceneChangeLavc &lt;br /&gt;
| see [http://akuvian.org/src/avisynth/sclavc/]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| SCXvid&lt;br /&gt;
| SCXvid produces first pass xvid logs from avisynth at the equuivalent of the default vfw preset. These logs are primaliy intended to get scenechange information from but could probably be used in some kind of twisted encoding setup too with lossless encoding of the output.&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| SlopeBend&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| [[Soothe]]&lt;br /&gt;
| Lessens the temporal instability and aliasing caused by sharpening, by comparing the original and sharpened clip, leaving a smoother and slightly softer output. &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
| Didée&lt;br /&gt;
|-&lt;br /&gt;
| UnSmooth&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| VinVerse&lt;br /&gt;
| An effective Function against (residual) combing, by Didée. Useful after deinterlaceing.&lt;br /&gt;
| YV12, YUY2&lt;br /&gt;
| [http://bengal.missouri.edu/~kes25c/vinverse.zip Plugin] / [http://forum.doom9.org/showthread.php?p=841641#post841641 Script]&lt;br /&gt;
| Didée (script) / Tritical (plugin)&lt;br /&gt;
|-&lt;br /&gt;
| WaterShed &lt;br /&gt;
| see [http://avisynth.nl/users/warpenterprises/files/watershed_20061105.zip]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
|-&lt;br /&gt;
| TMM &lt;br /&gt;
| see [http://forum.doom9.org/showthread.php?p=980353#post980353]&lt;br /&gt;
| &lt;br /&gt;
| [http://web.missouri.edu/~kes25c/TMMv1.zip Plugin]&lt;br /&gt;
| Tritical&lt;br /&gt;
|-&lt;br /&gt;
| [http://sourceforge.net/projects/avisynthtrackin/ Tracking]&lt;br /&gt;
| demo at [http://www.youtube.com/watch?v=SQ-JtJs7US0 Youtube]. Use computer vision to track objects in the video, and produce ConditionalReader input.&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
| Shlomo Matichin&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Unpremultiply &lt;br /&gt;
| This plugin convert the input RGBA clip from premultiplied alpha to straight matted alpha.&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Usage]]&lt;br /&gt;
[[Category:External_filters]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Trim&amp;diff=484</id>
		<title>Trim</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Trim&amp;diff=484"/>
		<updated>2012-11-12T05:02:17Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Func8Def|&lt;br /&gt;
Trim(clip &#039;&#039;clip&#039;&#039;, int &#039;&#039;first_frame&#039;&#039;, int &#039;&#039;last_frame&#039;&#039; [, bool &#039;&#039;&amp;quot;pad&amp;quot;&#039;&#039;])|&lt;br /&gt;
Trim(clip &#039;&#039;clip&#039;&#039;, int &#039;&#039;first_frame&#039;&#039;, int &#039;&#039;-num_frames&#039;&#039; [, bool &#039;&#039;&amp;quot;pad&amp;quot;&#039;&#039;])|&lt;br /&gt;
Trim(clip, int &#039;&#039;first_frame&#039;&#039;, int &#039;&#039;&amp;quot;end&amp;quot;&#039;&#039; [, bool &#039;&#039;&amp;quot;pad&amp;quot;&#039;&#039;])|&lt;br /&gt;
Trim(clip, int &#039;&#039;first_frame&#039;&#039;, int &#039;&#039;&amp;quot;length&amp;quot;&#039;&#039; [, bool &#039;&#039;&amp;quot;pad&amp;quot;&#039;&#039;])|&lt;br /&gt;
AudioTrim(clip &#039;&#039;clip&#039;&#039;, float &#039;&#039;start_time&#039;&#039;, float &#039;&#039;end_time&#039;&#039;)|&lt;br /&gt;
AudioTrim(clip &#039;&#039;clip&#039;&#039;, float &#039;&#039;start_time&#039;&#039;, float &#039;&#039;-duration&#039;&#039;)|&lt;br /&gt;
AudioTrim(clip, float &#039;&#039;start_time&#039;&#039;, float &#039;&#039;&amp;quot;end&amp;quot;&#039;&#039;)|&lt;br /&gt;
AudioTrim(clip, float &#039;&#039;start_time&#039;&#039;, float &#039;&#039;&amp;quot;length&amp;quot;&#039;&#039;)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Trim trims a video clip so that it includes only the frames &#039;&#039;first_frame&#039;&#039; up to &#039;&#039;last_frame &#039;&#039;(&#039;&#039;first_frame&#039;&#039; and&#039;&#039; last_frame&#039;&#039; are included). The audio is similarly trimmed so that it stays synchronized. Remember AviSynth starts counting at frame 0.&lt;br /&gt;
&lt;br /&gt;
If you set a negative value for &#039;&#039;last_frame&#039;&#039; you get the frames first_frame to first_frame  + (-last_frame - 1) &amp;amp;mdash; that is, a clip starting at first_frame will be (-last_frame) frames long. [[http://forum.doom9.org/showthread.php?p=239941#post239941 doom9]]&lt;br /&gt;
&lt;br /&gt;
Prior to v2.60, to trim an audio-only clip, you may not just set a fake frame rate with [[AssumeFPS]]. Instead, you must make a [[BlankClip]], use [[AudioDub]], trim &#039;&#039;that&#039;&#039;, and then [[KillVideo]]. Otherwise, AviSynth returns an error message &amp;quot;cannot trim if there is no video&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Since v2.60 you can trim the audio using AudioTrim. The &#039;&#039;start_time&#039;&#039;, &#039;&#039;end_time&#039;&#039; and &#039;&#039;duration&#039;&#039; need to be specified in seconds (but can be float). Like Trim it keeps only the audio samples corresponding to &#039;&#039;start_time&#039;&#039; up to &#039;&#039;end_time&#039;&#039;. The target source clip does not need to have a video track. If present the video is similarly trimmed so that it stays synchronized within 1 frame duration.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pad&#039;&#039; (default true) causes the audio stream to be padded to align with the video stream. Otherwise the tail of a short audio stream is left so. When &#039;&#039;last_frame&#039;&#039;=0 and &#039;&#039;pad&#039;&#039;=false the end of the two streams remains independent.&lt;br /&gt;
&lt;br /&gt;
Since v2.60 you can also use AudioTrim/Trim(3, end=7) instead of AudioTrim/Trim(3, 7) and AudioTrim/Trim(3, length=7) instead of AudioTrim/Trim(3, -7). Note, the End and Length explicitly named parameters have no discontinuous boundary values. End=0 means end at frame 0. Length=0 means return a zero length clip. These are most useful in avoiding unexpected boundary conditions in your user functions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Trim(100,0)             # delete the first 100 frames, audio padded&lt;br /&gt;
                         # or trimmed to match the video length.&lt;br /&gt;
 Trim(100,0,false)       # delete the first 100 frames of audio and video,&lt;br /&gt;
                         # the resulting stream lengths remain independent.&lt;br /&gt;
 Trim(100,-100)          # is the same as trim(100,199) ie, start=100, duration=100&lt;br /&gt;
 Trim(100,199,false)     # audio will be trimmed if longer but not&lt;br /&gt;
                         # padded if shorter to frame 199&lt;br /&gt;
 Trim(0,-1)              # returns only the first frame&lt;br /&gt;
 Trim(0,End=0)           #&lt;br /&gt;
 Trim(0,Length=1)        #&lt;br /&gt;
 AudioTrim(1,5.5)        # keeps the audio samples between 1 and 5.5 seconds&lt;br /&gt;
 AudioTrim(1,End=5.5)    #&lt;br /&gt;
 AudioTrim(1,-5.5)       # cuts the first second and keeps the following 5.5 seconds&lt;br /&gt;
 AudioTrim(1,Length=5.5) #&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added AudioTrim. Added length and end parameters.&lt;br /&gt;
|- &lt;br /&gt;
| v2.56&lt;br /&gt;
| Added pad audio.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=DirectShowSource&amp;diff=286</id>
		<title>DirectShowSource</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=DirectShowSource&amp;diff=286"/>
		<updated>2012-11-12T04:30:17Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:FuncDef|DirectShowSource(string &#039;&#039;filename&#039;&#039; [, float &#039;&#039;fps&#039;&#039;, bool &#039;&#039;seek&#039;&#039;, bool &#039;&#039;audio&#039;&#039;, bool &#039;&#039;video&#039;&#039;, bool &#039;&#039;convertfps&#039;&#039;, bool &#039;&#039;seekzero&#039;&#039;, int &#039;&#039;timeout&#039;&#039;, string &#039;&#039;pixel_type&#039;&#039;, int &#039;&#039;framecount&#039;&#039;, string &#039;&#039;logfile&#039;&#039;, int &#039;&#039;logmask&#039;&#039;])}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;filename&#039;&#039;&#039;: DirectShowSource reads the file &#039;&#039;filename&#039;&#039; using MS DirectShow, the same multimedia playback system which Windows Media Player uses. It can read most formats which Media Player can play, including MPEG, MP3, and some [[QuickTime]] files, as well as AVI files that [[AviSource|AVISource]] doesn&#039;t support (like DV type 1, or files using DirectShow-only codecs). Try reading AVI files with AVISource first, and if that doesn&#039;t work then try this filter instead. Since v2.53 there is also support for [[GraphEdit]] (grf) files.&lt;br /&gt;
&lt;br /&gt;
There are some caveats: &lt;br /&gt;
&lt;br /&gt;
# Some decoders (notably MS MPEG-4) will produce upside-down video. You&#039;ll have to use [[Flip|FlipVertical]]. &lt;br /&gt;
# DirectShow video decoders are not required to support frame-accurate seeking. In most cases seeking will work, but on some it might not. &lt;br /&gt;
# DirectShow video decoders are not even required to tell you the frame rate of the incoming video. Most do, but the ASF decoder doesn&#039;t. You have to specify the frame rate using the fps parameter, like this: DirectShowSource(&amp;quot;video.asf&amp;quot;, fps=15). &lt;br /&gt;
# This version automatically detects the Microsoft DV codec and sets it to decode at full (instead of half) resolution. I guess this isn&#039;t a caveat. :-)&lt;br /&gt;
# Also this version attempts to disable any decoder based deinterlacing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;fps&#039;&#039;&#039;: This is sometimes needed to specify the framerate of the video. If the framerate or the number of frames is incorrect (this can happen with asf or mov clips), use this option to force the correct framerate.  For live sources, this is like &amp;quot;max fps&amp;quot; that will be displayed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;seek&#039;&#039;&#039; = true (in v2.53): There is full seeking support (available on most file formats). If problems occur try enabling the &#039;&#039;&#039;seekzero&#039;&#039;&#039; option first, if seeking still cause problems completely disable seeking. With seeking disabled the audio stream returns silence and the video stream the last rendered frame when trying to seek backwards. Note the Avisynth cache may provide limited access to the previous few frames, beyond that the last frame rendered will be returned.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;audio&#039;&#039;&#039; = true (in v2.53): There is audio support in DirectShowSource. DirectShowSource is able to open formats like WAV/DTS/AC3/MP3, provided you can play them in WMP for example (more exact: provided they are rendered correctly in graphedit). The channel ordening is the same as in the [http://www.cs.bath.ac.uk/~jpff/NOS-DREAM/researchdev/wave-ex/wave_ex.html wave-format-extensible format], because the input is always decompressed to WAV. For more information, see also [[GetChannel]]. AviSynth loads 8, 16, 24 and 32 bit int PCM samples, and float PCM format, and any number of channels.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;video&#039;&#039;&#039; = true (in v2.52): When setting it to false, it lets you open the audio only.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;convertfps&#039;&#039;&#039; = false (in v2.56): When setting it to true, it turns variable framerate video (vfr) into constant framerate video (cfr) by adding frames. This is useful when you want to open vfr video (for example mkv, rmvb, mp4, asf or wmv with hybrid video) in AviSynth. It is most useful when the fps parameter is set to the least common multiple of the component vfr rates, e.g. 120 or 119.880.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;seekzero&#039;&#039;&#039; = false (in v2.56): An option to restrict seeking only back to the beginning. It allows limited seeking with unindexed ASF. Seeking forwards is of course done the hard way (by reading all samples).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;timeout&#039;&#039;&#039; = 60000 (in milliseconds; 60000 ms = 1 min) (in v2.56): To set time to wait when DirectShow refuses to render. Positive values return blank frames and/or silence. Negative values cause a runtime AviSynth exception to be thrown.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pixel_type&#039;&#039;&#039; (in v2.56): The pixel type of the resulting clip, it can be &amp;quot;YV12&amp;quot;, &amp;quot;YUY2&amp;quot;, &amp;quot;AYUV&amp;quot;, &amp;quot;Y41P&amp;quot;, &amp;quot;Y411&amp;quot;, &amp;quot;ARGB&amp;quot;, &amp;quot;RGB32&amp;quot;, &amp;quot;RGB24&amp;quot;, &amp;quot;YUV&amp;quot;, &amp;quot;RGB&amp;quot; or &amp;quot;AUTO&amp;quot;. By default, upstream DirectShow filters are free to bid all of their supported media types in the order of their choice. A few DirectShow filters get this wrong. The &#039;&#039;&#039;pixel_type&#039;&#039;&#039; argument limits the acceptable video stream subformats for the IPin negotiation. Note the graph builder may add a format converter to satisfy your request, so make sure the codec in use can actually decode to your chosen format. The M$ format converter is just adequate. The &amp;quot;YUV&amp;quot; and &amp;quot;RGB&amp;quot; pseudo-types restrict the negotiation to all supported YUV or RGB formats respectively. The &amp;quot;AUTO&amp;quot; pseudo-type permits the negotiation to use all relevant formats in the order of preference YV12, YUY2, AYUV, Y41P, Y411, ARGB, RGB32, RGB24. Many DirectShow filters get this wrong, which is why it is not enabled by default. The option exists so you have enough control to encourage the maximum range of filters to serve your media. (See [http://forum.doom9.org/showthread.php?t=143321 discussion].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;framecount&#039;&#039;&#039; (in v2.57): This is sometimes needed to specify the framecount of the video. If the framerate or the number of frames is incorrect (this can happen with asf or mov clips), use this option to force the correct number of frames. If fps is also specified the length of the audio stream is also adjusted.  For live sources, specify a very large number.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;logfile&#039;&#039;&#039; (in v2.57): Use this option to specify the name of a debugging logfile.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;logmask&#039;&#039;&#039; = 35 (in v2.57): When a logfile is specified, use this option to select which information is logged.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| Value&lt;br /&gt;
| Data&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Format Negotiation&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Receive samples&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| GetFrame/GetAudio calls&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Directshow callbacks&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Requests to Directshow&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Errors&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| COM object use count&lt;br /&gt;
|-&lt;br /&gt;
| 128&lt;br /&gt;
| New objects&lt;br /&gt;
|-&lt;br /&gt;
| 256&lt;br /&gt;
| Extra info&lt;br /&gt;
|-&lt;br /&gt;
| 512&lt;br /&gt;
| Wait events&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add the values together of the data you need logged. Specify -1 to log everything. The default, 35, logs Format Negotiation, Received samples and Errors. i.e 1+2+32&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Opens an avi with the first available RGB format (without audio):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 DirectShowSource(&amp;quot;F:\TestStreams\xvid.avi&amp;quot;,fps=25, audio=false, pixel_type=&amp;quot;RGB&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Opens a DV clip with the MS DV decoder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 DirectShowSource(&amp;quot;F:\DVCodecs\Analysis\Ced_dv.avi&amp;quot;) # MS-DV&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Opens a variable framerate mkv as 119.88 by adding frames (ensuring sync):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 DirectShowSource(&amp;quot;F:\Guides\Hybrid\vfr_startrek.mkv&amp;quot;, fps=119.88, convertfps=true)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Opens a realmedia *rmvb clip:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 DirectShowSource(&amp;quot;F:\test.rmvb&amp;quot;, fps=24, convertfps=true)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Opens a GraphEdit file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 V=DirectShowSource(&amp;quot;F:\vid_graph.grf&amp;quot;, audio=False) # video only (audio renderer removed)&lt;br /&gt;
 A=DirectShowSource(&amp;quot;F:\aud_graph.grf&amp;quot;, video=False) # audio only (video renderer removed)&lt;br /&gt;
 AudioDub(V, A)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See below for some audio examples.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting video and audio problems ==&lt;br /&gt;
AviSynth will by default try to open only the media it can open without any problems. If one component cannot be opened it will simply not be added to the output. This will also mean that if there is a problem, you will not see the error. To get the error message to the missing component, use audio=false or video=false and disable the component that is actually working. This way AviSynth will print out the error message of the component that doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
=== The filter graph won&#039;t talk to me ===&lt;br /&gt;
This is a common error that occurs when DirectShow isn&#039;t able to deliver any format that is readable to AviSynth. Try creating a filter graph manually and see if you are able to construct a filter graph that delivers any output AviSynth can open. If not, you might need to download additional DirectShow filters that can deliver correct material.&lt;br /&gt;
&lt;br /&gt;
=== The samplerate is wrong ===&lt;br /&gt;
Some filters might have problems reporting the right samplerate, and then correct this when the file is actually playing. Unfortunately there is no way for AviSynth to correct this once the file has been opened. Use [[AssumeSampleRate]] and set the correct samplerate to fix this problem.&lt;br /&gt;
&lt;br /&gt;
=== My sound is choppy ===&lt;br /&gt;
Unfortunately Directshow is not required to support sample exact seeking. Open the sound another way, or demux your video file and serve it to AviSynth another way. Otherwise you can specify &amp;quot;seekzero = true&amp;quot; or &amp;quot;seek = false&amp;quot; as parameters or use the [[EnsureVBRMP3Sync]] filter to enforce linear access to the Directshow audio stream.&lt;br /&gt;
&lt;br /&gt;
=== My sound is out of sync ===&lt;br /&gt;
This can happen especially with WMV, apparently due to variable frame rate video being returned. Determine what the fps should be and set it explicitly, and also &amp;quot;ConvertFPS&amp;quot; to force it to remain constant. And [[EnsureVBRMP3Sync]] reduces problems with variable rate audio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 DirectShowSource(&amp;quot;video.wmv&amp;quot;, fps=25, ConvertFPS=True)&lt;br /&gt;
 EnsureVBRMP3Sync() &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== My ASF renders start fast and finish slow ===&lt;br /&gt;
Microsoft in their infinite wisdom chose to implement ASF stream timing in the ASF demuxer. As a result it is not possible to strip ASF format files any faster than realtime. This is most apparent when you first start to process the streams, usually after opening the AviSynth script it takes you a while to configure your video editor, all this time the muxer is accumulating credit time. When you then start to process your stream it races away at maximum speed until you catch up to realtime at which point it slows down to the realtime rate of the source material. This feature makes it impossible to use AviSynth to reclock 24fps ASF material up to 25fps for direct PAL playback.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common tasks ==&lt;br /&gt;
This section will describe various tasks that might not be 100% obvious. :)&lt;br /&gt;
&lt;br /&gt;
=== Opening GRF files ===&lt;br /&gt;
&lt;br /&gt;
[[GraphEdit]] GRF-files are automatically detected by a .grf filename extension and directly loaded by DirectShowSource. For AviSynth to be able to connect to it, you must leave a pin open in GraphEdit of a media types that AviSynth is able to connect to. AviSynth will not attempt to disconnect any filters, so it is important that the output type is correct. DirectShowSource only accepts YV12, YUY2, ARGB, RGB32 and RGB24 video formats and 32, 24, 16 and 8 bit PCM and IEEE FLOAT audio formats.&lt;br /&gt;
&lt;br /&gt;
A given GRF-file should only target one of an audio or video stream to avoid confusion when directshowsource attempts the connection to your open pin(s). From version 2.57 this single stream restriction is enforced. &lt;br /&gt;
&lt;br /&gt;
=== Downmixing AC3 to stereo ===&lt;br /&gt;
&lt;br /&gt;
There are essentially two ways to do this. The first is to set the downmixing in the configuration of your AC3 decoder itself, and the second one is to use the external downmixer of &amp;quot;Trombettworks&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
1) Install AC3filter. &lt;br /&gt;
&lt;br /&gt;
a) Open &#039;&#039;&#039;AC3Filter Config&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
On tab &amp;quot;Main&amp;quot; in section &amp;quot;Output format&amp;quot; select &amp;quot;2/0 - stereo&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Nothing else is needed.]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;-OR-&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
b) Open the AC3 file in WMP6.4 and select the file properties. Set the output of AC3Filter on &#039;&#039;&#039;2/0 - stereo&#039;&#039;&#039;. If you want the best possible quality, select PCM Float as Sample format.&lt;br /&gt;
&lt;br /&gt;
{| border=0 cellspacing=0 cellpadding=5&lt;br /&gt;
| [[Image:ac3downmix1a.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:ac3downmix1b.jpg]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Make the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 v = [[Mpeg2Source]](&amp;quot;e:\movie.d2v&amp;quot;)&lt;br /&gt;
 a = DirectShowSource(&amp;quot;e:\Temp\Test2\test.ac3&amp;quot;)&lt;br /&gt;
 [[AudioDub]](v,a)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, open the script in vdub and convert the audio stream to MP3 (of course you can also demux the downmixed WAV stream if needed).&lt;br /&gt;
&lt;br /&gt;
2) Register the directshow filter [http://www.trombettworks.com/directshow.php Channel Downmixer by Trombettworks] (under start -&amp;gt; run):&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;regsvr32 ChannelDownmixer.ax&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Open the AC3 file in WMP6.4 and select the file properties. Set the output of AC3Filter on &#039;&#039;&#039;3/2+SW 5.1 channels&#039;&#039;&#039; (this downmixer can&#039;t handle PCM Float, thus PCM 16 bit is selected here). In the properties of the downmixer, the number of input and output channels should be detected automatically. Check whether this is indeed correct.&lt;br /&gt;
&lt;br /&gt;
{| border=0 cellspacing=0 cellpadding=5&lt;br /&gt;
| [[Image:ac3downmix2a.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:ac3downmix2b.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:ac3downmix2c.jpg]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Make the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 v = Mpeg2Source(&amp;quot;e:\movie.d2v&amp;quot;)&lt;br /&gt;
 a = DirectShowSource(&amp;quot;e:\Temp\Test2\test.ac3&amp;quot;)&lt;br /&gt;
 AudioDub(v,a)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, open the script in vdub and convert the audio stream to MP3 (of course you can also demux the downmixed WAV stream if needed).&lt;br /&gt;
&lt;br /&gt;
For some reason, I can&#039;t get this to work with DTS streams :(&lt;br /&gt;
&lt;br /&gt;
== Windows7 users ==&lt;br /&gt;
&lt;br /&gt;
Windows 7 forces its own DirectShow filters for decoding several audio and video formats. Changing their merits or physically removing those filters doesn&#039;t help. clsid made the tool &amp;quot;[http://forum.doom9.org/showthread.php?t=146910 Win7DSFilterTweaker]&amp;quot; to change the preferred filters. However new decoders need to be added each time so it&#039;s not the perfect solution.&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
| v2.60&lt;br /&gt;
| Added pixel_types &amp;quot;AYUV&amp;quot;, &amp;quot;Y41P&amp;quot;, &amp;quot;Y411&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| v2.57&lt;br /&gt;
| framecount overrides the length of the streams.&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| logfile and logmask specify debug logging.&lt;br /&gt;
|-&lt;br /&gt;
| v2.56&lt;br /&gt;
| convertfps turns vfr into constant cfr by adding frames&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| seekzero restricts seeking to beginning only&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| timeout controls response to recalcitrant graphs&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| pixel_type specifies/restricts output video pixel format&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Haali media splitter also comes with an (unrelated) directshow input plugin [[External_filters|DirectShowSource2]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Media file filters]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Internal_functions/String_functions&amp;diff=703</id>
		<title>Internal functions/String functions</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Internal_functions/String_functions&amp;diff=703"/>
		<updated>2012-11-12T04:14:47Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* String functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== String functions ==&lt;br /&gt;
&lt;br /&gt;
They provide common operations on string variables.&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|LCase|v2.07|LCase(string)}}&lt;br /&gt;
: Returns lower case of string.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 LCase(&amp;quot;AviSynth&amp;quot;) = &amp;quot;avisynth&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|UCase|v2.07|UCase(string)}}&lt;br /&gt;
: Returns upper case of string.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 UCase(&amp;quot;AviSynth&amp;quot;) = &amp;quot;AVISYNTH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|StrLen|v2.07|StrLen(string)}}&lt;br /&gt;
: Returns length of string.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 StrLen(&amp;quot;AviSynth&amp;quot;) = 8&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|RevStr|v2.07|RevStr(string)}}&lt;br /&gt;
: Returns string backwards.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 RevStr(&amp;quot;AviSynth&amp;quot;) = &amp;quot;htnySivA&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|LeftStr|v2.07|LeftStr(string, int)}}&lt;br /&gt;
: Returns first int number of characters.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 LeftStr(&amp;quot;AviSynth&amp;quot;, 3) = &amp;quot;Avi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|RightStr|v2.07|RightStr(string, int)}}&lt;br /&gt;
: Returns last int number of characters.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 RightStr(&amp;quot;AviSynth&amp;quot;, 5) = &amp;quot;Synth&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|MidStr|v2.07|MidStr(string, int pos [, int length])}}&lt;br /&gt;
: Returns substring starting at &#039;&#039;pos&#039;&#039; for optional &#039;&#039;length&#039;&#039; or to end. &#039;&#039;pos&#039;&#039;=1 specifies start.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 MidStr(&amp;quot;AviSynth&amp;quot;, 3, 2) = &amp;quot;iS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|FindStr|v2.07|FindStr(string, substring)}}&lt;br /&gt;
: Returns position of substring within string (note this function is case-sensitive). Returns 0 if substring is not found.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Findstr(&amp;quot;AviSynth&amp;quot;, &amp;quot;Syn&amp;quot;) = 4&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|FillStr|v2.60|FillStr(int [, string])}}&lt;br /&gt;
: Fills a string. When int&amp;gt;1 it concatenates the string int times. String is space by default.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 FillStr(1, &amp;quot;AviSynth&amp;quot;) = &amp;quot;AviSynth&amp;quot;&lt;br /&gt;
 FillStr(2, &amp;quot;AviSynth&amp;quot;) = &amp;quot;AviSynthAviSynth&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|StrCmp|v2.60|StrCmp(string, string)}}&lt;br /&gt;
: Compares two character strings. The comparison is case-sensitive. If the first string is less than the second string, the return value is negative. If it&#039;s greater, the return value is positive. If they are equal, the return value is zero. (The actual value seems to be language dependent so it can&#039;t be relied upon.)&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 StrCmp(&amp;quot;AviSynth&amp;quot;, &amp;quot;AviSynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmp(&amp;quot;AviSynth&amp;quot;, &amp;quot;Avisynth&amp;quot;) != 0 # strings are not equal.&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|StrCmpi|v2.60|StrCmpi(string, string)}}&lt;br /&gt;
: Compares two character strings. The comparison is not case-sensitive. If the first string is less than the second string, the return value is negative. If it&#039;s greater, the return value is positive. If they are equal, the return value is zero. (The actual value seems to be language dependent so it can&#039;t be relied upon.)&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 StrCmpi(&amp;quot;AviSynth&amp;quot;, &amp;quot;AviSynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmpi(&amp;quot;AviSynth&amp;quot;, &amp;quot;Avisynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmpi(&amp;quot;abcz&amp;quot;, &amp;quot;abcdefg&amp;quot;) != 0 # returns the difference betweeen &amp;quot;z&amp;quot; and &amp;quot;d&amp;quot; (which is positive).&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Chr|v2.51|Chr(int)}}&lt;br /&gt;
: Returns the ASCII character. &lt;br /&gt;
: Note that characters above the ASCII character set (ie above 127) are code page dependent and may render different (visual) results in different systems. This has an importance only for user-supplied localised text messages.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Chr(34) returns the quote character&lt;br /&gt;
 Chr(9)  returns the tab   character&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Ord|v2.60|Ord(string)}}&lt;br /&gt;
: Gives the ordinal number of the first character of a string. &lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Ord(&amp;quot;a&amp;quot;) = 97&lt;br /&gt;
 Ord(&amp;quot;AviSynth&amp;quot;) = Ord(&amp;quot;A&amp;quot;) = 65&lt;br /&gt;
 Ord(&amp;quot;§&amp;quot;) = 167&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Time|v2.51|Time(string)}}&lt;br /&gt;
: Returns a string with the current system time formatted as defined by the string.&lt;br /&gt;
: The string may contain any of the codes for output formatting presented below:&lt;br /&gt;
{| border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
 |-&lt;br /&gt;
 ! Code&lt;br /&gt;
 ! Description&lt;br /&gt;
 |-&lt;br /&gt;
 | %a &lt;br /&gt;
%A  &lt;br /&gt;
 | Abbreviated weekday name&lt;br /&gt;
Full weekday name&lt;br /&gt;
 |-&lt;br /&gt;
 | %b  &lt;br /&gt;
%B  &lt;br /&gt;
 | Abbreviated month name&lt;br /&gt;
Full month name&lt;br /&gt;
 |-&lt;br /&gt;
 | %c  &lt;br /&gt;
 | Date and time representation appropriate for locale&lt;br /&gt;
 |-&lt;br /&gt;
 | %d  &lt;br /&gt;
 | Day of month as decimal number (01 ? 31)&lt;br /&gt;
 |-&lt;br /&gt;
 | %H  &lt;br /&gt;
%I  &lt;br /&gt;
 | Hour in 24-hour format (00 ? 23)&lt;br /&gt;
Hour in 12-hour format (01 ? 12)&lt;br /&gt;
 |-&lt;br /&gt;
 | %j  &lt;br /&gt;
 | Day of year as decimal number (001 ? 366)&lt;br /&gt;
 |-&lt;br /&gt;
 | %m  &lt;br /&gt;
 | Month as decimal number (01 ? 12)&lt;br /&gt;
 |-&lt;br /&gt;
 | %M  &lt;br /&gt;
 | Minute as decimal number (00 ? 59)&lt;br /&gt;
 |-&lt;br /&gt;
 | %p  &lt;br /&gt;
 | Current locale?s A.M./P.M. indicator for 12-hour clock&lt;br /&gt;
 |-&lt;br /&gt;
 | %S  &lt;br /&gt;
 | Second as decimal number (00 ? 59)&lt;br /&gt;
 |-&lt;br /&gt;
 | %U  &lt;br /&gt;
 | Week of year as decimal number, with Sunday as first day of week (00 ? 53)&lt;br /&gt;
 |-&lt;br /&gt;
 | %w  &lt;br /&gt;
 | Weekday as decimal number (0 ? 6; Sunday is 0)&lt;br /&gt;
 |-&lt;br /&gt;
 | %W  &lt;br /&gt;
 | Week of year as decimal number, with Monday as first day of week (00 ? 53)&lt;br /&gt;
 |-&lt;br /&gt;
 | %x  &lt;br /&gt;
 | Date representation for current locale&lt;br /&gt;
 |-&lt;br /&gt;
 | %X  &lt;br /&gt;
 | Time representation for current locale&lt;br /&gt;
 |-&lt;br /&gt;
 | %y  &lt;br /&gt;
%Y  &lt;br /&gt;
 | Year without century, as decimal number (00 ? 99)&lt;br /&gt;
Year &#039;&#039;with&#039;&#039; century, as decimal number&lt;br /&gt;
 |-&lt;br /&gt;
 | %z, %Z  &lt;br /&gt;
 | Time-zone name or abbreviation; no characters if time zone is unknown&lt;br /&gt;
 |-&lt;br /&gt;
 | %%  &lt;br /&gt;
 | Percent sign &lt;br /&gt;
 |}&lt;br /&gt;
: The # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows:&lt;br /&gt;
{| border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
 |-&lt;br /&gt;
 ! Code with # flag&lt;br /&gt;
 ! Change in meaning&lt;br /&gt;
 |-&lt;br /&gt;
 | %#a, %#A, %#b, %#B, &lt;br /&gt;
%#p, %#X, %#z, %#Z, %#%&lt;br /&gt;
 | No change; # flag is ignored. &lt;br /&gt;
 |-&lt;br /&gt;
 | %#c &lt;br /&gt;
 | Long date and time representation, appropriate for current locale. For example: &lt;br /&gt;
   ?Tuesday, March 14, 1995, 12:41:29?. &lt;br /&gt;
 |-&lt;br /&gt;
 | %#x &lt;br /&gt;
 | Long date representation, appropriate to current locale. For example: &lt;br /&gt;
   ?Tuesday, March 14, 1995?. &lt;br /&gt;
 |-&lt;br /&gt;
 | %#d, %#H, %#I, %#j, %#m, %#M, &lt;br /&gt;
%#S, %#U, %#w, %#W, %#y, %#Y &lt;br /&gt;
 | Remove leading zeros (if any).&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[Internal functions]].&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Basics]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=User:Fizick/Internal_filters&amp;diff=719</id>
		<title>User:Fizick/Internal filters</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=User:Fizick/Internal_filters&amp;diff=719"/>
		<updated>2012-03-29T12:47:29Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: Undo revision 8309 by Playseo (Talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In AviSynth v2.5 a fourth color format is available besides RGB24, RGB32 and YUY2: [[YV12]]. See [[FAQ_YV12|YV12 FAQ]] for more information. This color format is special, since video is stored as YV12 in many codecs (including MPEG4 and MPEG2 on DVDs). In AviSynth v2.6 several other planar color formats are available: [[YV24]] (YUV 4:4:4), [[YV16]] (YUV 4:2:2), [[YV411]] (YUV: 4:1:1) and [[Y8]] (greyscale). The available (internal) filters are listed here and divided into categories. A short description is added, including the supported color formats (and samples types) for the audio filters).&lt;br /&gt;
&lt;br /&gt;
An alphabetical listing of the filters can be found here [[:Category:Internal_filters]].&lt;br /&gt;
&lt;br /&gt;
=== Media file filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are to read or write media files. Usually they produce a source clips for processing. See debug filters fo non-file source filters.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|- &lt;br /&gt;
| [[AviSource]] / [[AviFileSource]] / [[OpenDMLSource]]&lt;br /&gt;
| Opens an AVI file.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[DirectShowSource]]&lt;br /&gt;
| Opens a filename using [[DirectShow]].&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ImageReader]] / [[ImageSource]]&lt;br /&gt;
| This filter produces a video clip by reading in still images.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ImageWriter]]&lt;br /&gt;
| Writes frames as images to your hard disk.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Import]]&lt;br /&gt;
| Imports an AviSynth script into the current script.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[SegmentedAviSource]] / [[SegmentedDirectShowSource]]&lt;br /&gt;
| This filter automatically loads up to 100 avi files per argument.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[WavSource]]&lt;br /&gt;
| Opens a WAV file or the audio of an AVI file.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[SoundOut]]&lt;br /&gt;
| SoundOut is a GUI driven sound output module for AviSynth (it exports audio to several compressors).&lt;br /&gt;
| All audio.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Color filters ===&lt;br /&gt;
&lt;br /&gt;
These are to change clip color format or adjust frame colors (uniformly or with a mask).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorKeyMask]]&lt;br /&gt;
| Sets the alpha-channel (similar as Mask does) but generates it by comparing the color.&lt;br /&gt;
| RGB32&lt;br /&gt;
|- &lt;br /&gt;
| [[ColorYUV]]&lt;br /&gt;
| Adjusts colors and luma independently.&lt;br /&gt;
| YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertBackToYUY2]]&lt;br /&gt;
| Converts a RGB clip back to YUY2.&lt;br /&gt;
| RGB24, RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToRGB]]&lt;br /&gt;
| Converts to RGB32 unless clip is RGB24.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToRGB24]] / [[ConvertToRGB32]] / [[ConvertToYUY2]] / [[ConvertToY8]] / [[ConvertToYV411]] / [[ConvertToYV12]] / [[ConvertToYV16]] / [[ConvertToYV24]]&lt;br /&gt;
| Converts to RGB24 / RGB32 / YUY2 / Y8 / YV411 / YV12 / YV16 (planar version of YUY2) / YV24 (full YUV).&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[GreyScale]]&lt;br /&gt;
| Converts a video to greyscale.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Invert]]&lt;br /&gt;
| Inverts selected color channels of a video.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 ?&lt;br /&gt;
|-&lt;br /&gt;
| [[Layer]]&lt;br /&gt;
| Layering two videos.&lt;br /&gt;
| RGB32, YUY2&lt;br /&gt;
|-&lt;br /&gt;
| [[Levels]]&lt;br /&gt;
| The Levels filter scales and clamps the blacklevel and whitelevel and adjusts the gamma.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Limiter]]&lt;br /&gt;
| A filter for clipping levels to within CCIR-601 range.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Mask]]&lt;br /&gt;
| Applies an alpha-mask to a clip.&lt;br /&gt;
| RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[MaskHS]]&lt;br /&gt;
| This filter returns a mask (as Y8) of clip using a given hue and saturation range.&lt;br /&gt;
| YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[MergeARGB]] / [[MergeRGB]]&lt;br /&gt;
| This filter makes it possible to select and combine a color channel from each of the input videoclips.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[MergeChroma]] / [[MergeLuma]]&lt;br /&gt;
| This filter makes it possible to merge chroma/luma from a videoclip into another. There is an optional weighing, so a percentage between the two clips can be specified.&lt;br /&gt;
| YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Merge]]&lt;br /&gt;
| This filter makes it possible to merge both luma and chroma from a videoclip into another. There is an optional weighing, so a percentage between the two clips can be specified.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Overlay]]&lt;br /&gt;
| Overlay puts two clips on top of eachother with an optional displacement of the overlaying image, and using different overlay methods. Furthermore opacity can be adjusted for the overlay clip.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ResetMask]]&lt;br /&gt;
| Applies an &amp;quot;all-opaque&amp;quot; alpha-mask to clip.&lt;br /&gt;
| RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[RGBAdjust]]&lt;br /&gt;
| Adjusts each color channel seperately.&lt;br /&gt;
| RGB24, RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowAlpha]] / [[ShowRed]] / [[ShowGreen]] / [[ShowBlue]]&lt;br /&gt;
| Shows the selected channel of an (A)RGB clip.&lt;br /&gt;
| RGB24, RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[SwapUV]]&lt;br /&gt;
| Swaps chroma channels.&lt;br /&gt;
| YUY2, Y8, YV411, YV12, YV16, YV24 ?&lt;br /&gt;
|-&lt;br /&gt;
| [[Subtract]]&lt;br /&gt;
| Produces an output clip in which every pixel is set according to the difference between the corresponding pixels.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16 (?), YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[UToY]] / [[VToY]]&lt;br /&gt;
| Copies chroma U/V plane to Y plane (image is now half as big)&lt;br /&gt;
| YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[UToY8]] / [[VToY8]]&lt;br /&gt;
| Shorthand for UToY.ConvertToY8 / VToY.ConvertToY8.&lt;br /&gt;
| YUY2, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[YToUV]]&lt;br /&gt;
| Puts the luma channels of the two clips as U and V channels. Image is now twice as big, and luma is 50% grey. Use MergeLuma, if you want to add luma values.&lt;br /&gt;
| YUY2, YV12 ?&lt;br /&gt;
|-&lt;br /&gt;
| [[Tweak]]&lt;br /&gt;
| Adjusts the hue, saturation, brightness, and contrast.&lt;br /&gt;
| YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[FixLuminance]]&lt;br /&gt;
| Correct shifting vertical luma offset.&lt;br /&gt;
| YUY2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Geometric filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are to change image size, process borders or make other deformation&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|- &lt;br /&gt;
| [[AddBorders]]&lt;br /&gt;
| Adds black borders around the image.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Crop]]&lt;br /&gt;
| Crops excess pixels off of each frame.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[CropBottom]]&lt;br /&gt;
| Crops excess pixels off of the bottom of each frame.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Letterbox]]&lt;br /&gt;
| Letterbox simply blackens out the top and the bottom and optionally left and right side of each frame.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ReduceBy2]]&lt;br /&gt;
| Reduces the size of each frame by half.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[HorizontalReduceBy2]] / [[VerticalReduceBy2]]&lt;br /&gt;
| Reduces the size of each frame by half horizontally/vertically.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[BicubicResize]] / [[BilinearResize]] / [[GaussResize]] / [[LanczosResize]] / [[Lanczos4Resize]] / [[PointResize]] / [[Spline16Resize]] / [[Spline36Resize]]&lt;br /&gt;
| The resize filters rescale the input video frames to an arbitrary new resolution, using different sampling algorithms.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[FlipHorizontal]] / [[FlipVertical]]&lt;br /&gt;
| Flips the video from left to right/upside-down.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[TurnLeft]] / [[TurnRight]] / [[Turn180]]&lt;br /&gt;
| Rotates the clip 90 degrees counterclock wise / 90 degrees clock wise.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[StackHorizontal]] / [[StackVertical]]&lt;br /&gt;
| Takes two or more video clips and displays them together in left-to-right/up-to-down order.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pixel filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are for image detail (pixel) restoration (like denoising, sharpening).&lt;br /&gt;
Most such filters are implemented as a AviSynth external plugins with various advanced algorithmes of pixel processing.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|- &lt;br /&gt;
| [[Blur]] / [[Sharpen]]&lt;br /&gt;
| This a simple 3x3-kernel blurring/sharpening filter.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[GeneralConvolution]]&lt;br /&gt;
| General 3x3 or 5x5 convolution matrix.&lt;br /&gt;
| RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[SpatialSoften]] / [[TemporalSoften]]&lt;br /&gt;
| Removes noise from a video clip by selectively blending pixels spatially/temporally.&lt;br /&gt;
| YUY2 (SpatialSoften), Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[FixBrokenChromaUpsampling]]&lt;br /&gt;
| The free Canopus DV Codec v1.00 upsamples the chroma channels incorrectly (although newer non-free versions appear to work fine). FixBrokenChromaUpsampling filter compensates for it.&lt;br /&gt;
| YUY2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Timeline editing filters ===&lt;br /&gt;
&lt;br /&gt;
This filters are to arrange frames in a time (clip cutting, splicing and other editing).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[AlignedSplice]] / [[UnalignedSplice]]&lt;br /&gt;
| Joins two or more video clips end to end.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeFPS]] / [[AssumeScaledFPS]] / [[ChangeFPS]] / [[ConvertFPS]]&lt;br /&gt;
| Changes framerates in different ways.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[DeleteFrame]]&lt;br /&gt;
| Deletes a single frame, given as an argument.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Dissolve]]&lt;br /&gt;
| Like [[AlignedSplice]], except that the clips are combined with some overlap.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[DuplicateFrame]]&lt;br /&gt;
| Duplicates a single frame given as an argument.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[FadeIn0]] / [[FadeIn]] / [[FadeIn2]] / [[FadeOut0]] / [[FadeOut]] / [[FadeOut2]] / [[FadeIO0]] / [[FadeIO]] / [[FadeIO2]]&lt;br /&gt;
| Causes the video stream to fade linearly to black at the start or end.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[FreezeFrame]]&lt;br /&gt;
| Replaces all the frames between first-frame and last-frame with a selected frame.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Interleave]]&lt;br /&gt;
| Interleaves frames from several clips on a frame-by-frame basis.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Loop]]&lt;br /&gt;
| Loops the segment from start frame to end frame a given number of times.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Reverse]]&lt;br /&gt;
| This filter makes a clip play in reverse.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[SelectEven]] / [[SelectOdd]]&lt;br /&gt;
| Makes an output video stream using only the even/odd numbered frames.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[SelectEvery]]&lt;br /&gt;
| Selects frames with a fixed period, it is a generalization of [[SelectEven]] and [[SelectOdd]].&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[SelectRangeEvery]]&lt;br /&gt;
| Selects a range of frames with a fixed period.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Trim]]&lt;br /&gt;
| Trims a video clip so that it includes only the frames first-frame through last-frame.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Interlace filters ===&lt;br /&gt;
&lt;br /&gt;
These filters are for treating interlaced video. &lt;br /&gt;
Currently (v2.5x and older versions), AviSynth has no interlaced flag which can be used for interlaced video. There is a field-based flag, but contrary to what you might expect, this flag is not related to interlaced video. In fact, all video (progressive or interlaced) is framebased, unless you use AviSynth filters to change that. There are two filters who turn framebased video into fieldbased video: [[SeparateFields]] and [[AssumeFieldBased]]. More information about field-based video can be found here (...).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeFrameBased]] / [[AssumeFieldBased]]&lt;br /&gt;
| Forces frame-based or field-based material.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeBFF]] / [[AssumeTFF]]&lt;br /&gt;
| Forces field order.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Bob]]&lt;br /&gt;
| Bob takes a clip and bob-deinterlaces it.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ComplementParity]]&lt;br /&gt;
| Changes top fields to bottom fields and vice-versa.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[DoubleWeave]]&lt;br /&gt;
| The filter operates like [[Weave]], except that it produces double the number of frames by combining both the odd and even pairs of fields.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Pulldown]]&lt;br /&gt;
| This filter simply selects two out of every five frames of the source video.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[SeparateFields]]&lt;br /&gt;
| Takes a frame-based clip and splits each frame into its component top and bottom fields.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[SwapFields]]&lt;br /&gt;
| Swaps the two fields in an interlaced frame.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Weave]]&lt;br /&gt;
| Weave takes even pairs of fields from a Fields Separated input video clip and combines them together to produce interlaced frames.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[PeculiarBlend]]&lt;br /&gt;
| This filter blends each frame with the following frame in a peculiar way.&lt;br /&gt;
| YUY2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Audio filters ===&lt;br /&gt;
&lt;br /&gt;
Prior to v2.5 the audio samples are converted to 16 bits when using one of these audio filters. Starting from v2.5 the audio samples will be automatically converted if any filters requires a special type of sample. This means that most filters will accept several types of input, but if a filter doesn&#039;t support the type of sample it is given, it will automatically convert the samples to something it supports. The internal formats supported in each filter is listed in the colorspace column. A specific sample type can be forced by using the [[ConvertAudio]] functions.&lt;br /&gt;
&lt;br /&gt;
If the sample type is float, when AviSynth has to output the data, it will be converted to 16 bit, since float cannot be passed as valid AVI data.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Sample type&lt;br /&gt;
|-&lt;br /&gt;
| [[Amplify]] / [[AmplifydB]]&lt;br /&gt;
| Amplify multiply audio samples by amount.&lt;br /&gt;
| 16Bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeSampleRate]]&lt;br /&gt;
| Adjusts the playback speed of the audio.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[AudioDub]] / [[AudioDubEx]]&lt;br /&gt;
| AudioDub takes the video stream from the first argument and the audio stream from the second argument and combines them. AudioDubEx is similar, but it doesn&#039;t throw an exception if both clips don&#039;t have a video or audio stream.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertAudioTo8bit]] / [[ConvertAudioTo16bit]] / [[ConvertAudioTo24bit]] / [[ConvertAudioTo32bit]] / [[ConvertAudioToFloat]]&lt;br /&gt;
| Converts audio samples to 8/16/24/32/Float bits.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToMono]]&lt;br /&gt;
| Merges all audio channels.&lt;br /&gt;
| 16Bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[DelayAudio]]&lt;br /&gt;
| Delays the audio track by second seconds.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[EnsureVBRMP3Sync]]&lt;br /&gt;
| Corrects out-of-sync mp3-AVI&#039;s, when seeking or trimming.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[GetChannel]] / [[GetLeftChannel]] / [[GetRightChannel]]&lt;br /&gt;
| Returns an audio channel from a clip.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[KillAudio]] / [[KillVideo]]&lt;br /&gt;
| Removes the audio from a clip completely.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[MergeChannels]]&lt;br /&gt;
| Merges channels of two audio clips.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[MixAudio]]&lt;br /&gt;
| Mixes audio from two clips.&lt;br /&gt;
| 16Bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[MonoToStereo]]&lt;br /&gt;
| Converts two mono signals to one stereo signal.&lt;br /&gt;
| 16Bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[Normalize]]&lt;br /&gt;
| Amplifies the entire waveform as much as possible, without clipping.&lt;br /&gt;
| 16Bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[ResampleAudio]]&lt;br /&gt;
| Performs a high-quality change of audio sample rate.&lt;br /&gt;
| 16Bit&lt;br /&gt;
|-&lt;br /&gt;
| [[SuperEQ]]&lt;br /&gt;
| High quality 16 band sound equalizer.&lt;br /&gt;
| Float&lt;br /&gt;
|-&lt;br /&gt;
| [[SSRC]]&lt;br /&gt;
| Very high quality samplerate conversion.&lt;br /&gt;
| Float&lt;br /&gt;
|-&lt;br /&gt;
| [[TimeStretch]]&lt;br /&gt;
| This filter can change speed of the sound without changing the pitch, and change the pitch of a sound without changing the length of a sound.&lt;br /&gt;
| Float&lt;br /&gt;
|-&lt;br /&gt;
| [[Tone]]&lt;br /&gt;
| This will generate sound.&lt;br /&gt;
| Float&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Meta filters ===&lt;br /&gt;
&lt;br /&gt;
These are special filters to control other filters execution.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[Animate]] / [[ApplyRange]]&lt;br /&gt;
| Animate (ApplyRange) is a meta-filter which evaluates its parameter filter with continuously varying (the same) arguments.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 ?&lt;br /&gt;
|-&lt;br /&gt;
| [[ConditionalFilter]] / [[FrameEvaluate]] / [[ScriptClip]] / [[ConditionalReader]]&lt;br /&gt;
| ConditionalFilter returns source1 if some condition is met, otherwise it returns source2. ScriptClip returns the clip which is returned by the function evaluated on every frame.&lt;br /&gt;
| YV12 ?&lt;br /&gt;
|-&lt;br /&gt;
| [[TCPServer]] / [[TCPSource]]&lt;br /&gt;
| This filter will enable you to send clips over your network. You can connect several clients to the same machine.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Debug filters ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=25%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[BlankClip]] / [[Blackness]]&lt;br /&gt;
| This filter produces a solid color, silent video clip of the specified length (in frames).&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorBars]]&lt;br /&gt;
| This filter produces a video clip containing SMPTE color bars scaled to any image size.&lt;br /&gt;
| RGB32, YUY2, YV12&lt;br /&gt;
|-&lt;br /&gt;
| [[Compare]]&lt;br /&gt;
| Compares two clips and prints out information about the differences.&lt;br /&gt;
| RGB24, RGB32, YUY2&lt;br /&gt;
|-&lt;br /&gt;
| [[Histogram]]&lt;br /&gt;
| Adds a histogram.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Info]]&lt;br /&gt;
| Prints out image and sound information.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[MessageClip]]&lt;br /&gt;
| Produces a clip containing a text message.&lt;br /&gt;
| RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowFiveVersions]]&lt;br /&gt;
| Takes five video streams and combines them in a staggered arrangement from left to right.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16 (?), YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowFrameNumber]] / [[ShowSMPTE]]&lt;br /&gt;
| Draws text on every frame indicating what number AviSynth thinks it is.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Subtitle]]&lt;br /&gt;
| Adds a single line of anti-aliased text to a range of frames.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[WriteFile]] / [[WriteFileIf]] / [[WriteFileStart]] / [[WriteFileEnd]]&lt;br /&gt;
| Output to a textfile.&lt;br /&gt;
| RGB24, RGB32, YUY2, Y8, YV411, YV12, YV16, YV24 ?&lt;br /&gt;
|-&lt;br /&gt;
| [[Version]]&lt;br /&gt;
| Generates a video clip with a short version and copyright statement.&lt;br /&gt;
| RGB24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Internal_functions/Conversion_functions&amp;diff=707</id>
		<title>Internal functions/Conversion functions</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Internal_functions/Conversion_functions&amp;diff=707"/>
		<updated>2012-01-10T18:26:06Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: corrected example for Hex ( Hex (&amp;quot;A52A2A&amp;quot;) = 10824234  =&amp;gt;  Hex (10824234) = &amp;quot;A52A2A&amp;quot; )&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Conversion functions ==&lt;br /&gt;
&lt;br /&gt;
These functions convert between different types. There are also some [[Internal_functions/Numeric_functions|numeric functions]] that can be classified in this category, namely: &amp;lt;tt&amp;gt;Ceil, Floor, Float, Int&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Round&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Value|v2.07|Value(string)}}&lt;br /&gt;
: Converts a decimal string to its associated numeric value.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Value (&amp;quot;-2.7&amp;quot;) = -2.7&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|HexValue|v2.07|HexValue(string)}}&lt;br /&gt;
: Converts a hexadecimal string to its associated numeric value. &lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 HexValue (&amp;quot;FF00&amp;quot;) = 65280&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|Hex|v2.60|Hex(int)}}&lt;br /&gt;
: Converts a numerical value to its hexadecimal value. See [[Colors]] for more information on specifying colors.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 Hex (10824234) = &amp;quot;A52A2A&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* {{ScriptFunction|String|v2.07|String(float / int [, string format_string])}}&lt;br /&gt;
: Converts a variable to a string. &lt;br /&gt;
: If the variable is float or integer, it first converts it to a float and then uses format_string to convert the float to a string. The syntax of format_string is as follows:&lt;br /&gt;
: &amp;lt;tt&amp;gt;%[flags][width][.precision]f&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &#039;&#039;width&#039;&#039;: the minimum width (the string is never truncated)&lt;br /&gt;
: &#039;&#039;precision&#039;&#039;: the number of digits printed&lt;br /&gt;
: &#039;&#039;flags&#039;&#039;:&lt;br /&gt;
:: &amp;lt;tt&amp;gt;-  &amp;lt;/tt&amp;gt; left align (instead right align)&lt;br /&gt;
:: &amp;lt;tt&amp;gt;+  &amp;lt;/tt&amp;gt; always print the +/- sign&lt;br /&gt;
:: &amp;lt;tt&amp;gt;0  &amp;lt;/tt&amp;gt; padding with leading zeros&lt;br /&gt;
:: &amp;lt;tt&amp;gt;&#039; &#039;&amp;lt;/tt&amp;gt; print a blank instead of a &amp;quot;+&amp;quot;&lt;br /&gt;
:: &amp;lt;tt&amp;gt;#  &amp;lt;/tt&amp;gt; always print the decimal point&lt;br /&gt;
: You can also put arbitrary text around the format_string as defined above, similar to the C-language &#039;&#039;printf&#039;&#039; function.&lt;br /&gt;
: &#039;&#039;Examples:&#039;&#039;&lt;br /&gt;
 [[Subtitle]]( &amp;quot;Clip height is &amp;quot; + String(last.height) )&lt;br /&gt;
 [[Subtitle]]( String(x, &amp;quot;Value of x is %.3f after AR calc&amp;quot;) )&lt;br /&gt;
 [[Subtitle]]( &amp;quot;Value of x is &amp;quot; + String(x, &amp;quot;%.3f&amp;quot;) + &amp;quot; after AR calc&amp;quot;) ) # same as above&lt;br /&gt;
 String(1.23, &amp;quot;%f&amp;quot;) = &#039;1.23&#039;&lt;br /&gt;
 String(1.23, &amp;quot;%5.1f&amp;quot;) = &#039; 1.2&#039;&lt;br /&gt;
 String(1.23, &amp;quot;%1.3f&amp;quot;) = &#039;1.230&#039;&lt;br /&gt;
 String(24, &amp;quot;%05.0f&amp;quot;) = &#039;00024&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[Internal functions]].&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Basics]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=SoundOut&amp;diff=642</id>
		<title>SoundOut</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=SoundOut&amp;diff=642"/>
		<updated>2011-10-29T04:25:03Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: del of spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SoundOut is a GUI driven sound output module for AviSynth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation and Usage ==&lt;br /&gt;
&lt;br /&gt;
The filter is implemented as a plugin, which currently can be downloaded from [http://forum.doom9.org/showthread.php?t=120025 this Doom9 forum thread].&lt;br /&gt;
It will be included in AviSynth from v2.6 on. &lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;SoundOut.dll&amp;quot; and &amp;quot;libsndfile-1.dll&amp;quot; to your AviSynth plugin directory, usually &amp;quot;c:\program files\avisynth 2.5\plugins&amp;quot;. If you want to have &amp;quot;SoundOut.dll&amp;quot; in another location, you should move &amp;quot;libsndfile-1.dll&amp;quot; to your system32 folder, usually &amp;quot;c:\windows\system32&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Add SoundOut() to your script where you would like to export audio. If you have your video stored in a [[Script_variables|variable]], use SoundOut(variable) to add SoundOut. A GUI should then pop up when you open your script. Here is a simple example of how to use it:&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;myvideo.avi&amp;quot;)&lt;br /&gt;
 SoundOut()&lt;br /&gt;
&lt;br /&gt;
If you need to do some sample processing, i.e. to change the samplerate or otherwise edit your video, you must do it before calling the SoundOut module. Like this:&lt;br /&gt;
&lt;br /&gt;
 AviSource(&amp;quot;myvideo.avi&amp;quot;)&lt;br /&gt;
 [[Amplify|AmplifydB]](3)&lt;br /&gt;
 [[SSRC]](44100)&lt;br /&gt;
 SoundOut()&lt;br /&gt;
&lt;br /&gt;
== Output Modules ==&lt;br /&gt;
&lt;br /&gt;
=== WAV/AIF/CAF ===&lt;br /&gt;
&lt;br /&gt;
This will allow you to export uncompressed audio to the following formats:&lt;br /&gt;
&lt;br /&gt;
* Microsoft WAV format&lt;br /&gt;
* Apple/SGI AIFF format&lt;br /&gt;
* Sun/NeXT AU format&lt;br /&gt;
* RAW PCM data&lt;br /&gt;
* Sonic Foundry&#039;s 64 bit RIFF/WAV (WAVE64)&lt;br /&gt;
* Apple Core Audio File format&lt;br /&gt;
* Microsoft WAV format with Broadcast Wave Format chunk. &lt;br /&gt;
&lt;br /&gt;
Note, that 8 bit samples are NOT supported in the Core Audio File and Sun/NeXT AU format.&lt;br /&gt;
&lt;br /&gt;
=== FLAC ===&lt;br /&gt;
&lt;br /&gt;
This will allow you to export lossless compressed audio FLAC format.&lt;br /&gt;
&lt;br /&gt;
FLAC supports 8, 16 or 24 bit audio. Any other format is internally converted to 24 bit.&lt;br /&gt;
&lt;br /&gt;
=== APE ===&lt;br /&gt;
&lt;br /&gt;
This will allow you to export lossless compressed audio to the Monkey Audio Codec (APE) format. APE does not support input sample sizes that are larger than 2GB. Use only for smaller files.&lt;br /&gt;
&lt;br /&gt;
APE supports 8, 16 or 24 bit audio. Any other format is internally converted to 24 bit.&lt;br /&gt;
&lt;br /&gt;
=== MP2 ===&lt;br /&gt;
&lt;br /&gt;
This will allow you to compress your audio to MPEG 1 Layer 2 (MP2).&lt;br /&gt;
&lt;br /&gt;
TwoLame only supports 16 mono or stereo audio. If you attempt to compress more than two channels, an error will be shown. Any other format than 16 bit integer samples are internally converted to 16 bit.&lt;br /&gt;
=== MP3 ===&lt;br /&gt;
&lt;br /&gt;
This will allow you to compress your audio to MPEG 1 Layer 3 (MP3) using LAME v3.97 encoder.&lt;br /&gt;
&lt;br /&gt;
LAME Supports up to two channels of audio and the following samplerates: 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025 and 8000Hz.&lt;br /&gt;
&lt;br /&gt;
=== AC3 ===&lt;br /&gt;
&lt;br /&gt;
This will allow you to compress your audio to A/52 (AC3). The encoding is done via libaften.&lt;br /&gt;
&lt;br /&gt;
Aften supports 1 to 6 channel audio. Supported samplerates are 48000, 44100 or 32000 samples per second.&lt;br /&gt;
&lt;br /&gt;
Channel mapping is:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
| Number of channels&lt;br /&gt;
| Channel order&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Center&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Left, Right&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Left, Center, Right&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Left, Right, Surround Left, Surround Right&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Left, Center, Right, Surround Left, Surround Right&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Left, Center, Right, Surround Left, Surround Right, LFE&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OGG ===&lt;br /&gt;
&lt;br /&gt;
This will allow you to compress your audio to an Vorbis encoded OGG file. It is possible to give an average bitrate, or do the encode as CBR.&lt;br /&gt;
&lt;br /&gt;
=== WavPack ===&lt;br /&gt;
&lt;br /&gt;
WavPack is a completely open audio compression format providing lossless, high-quality lossy compression mode. Compatible with virtually all PCM audio formats including 8, 16, 24, and 32-bit ints; 32-bit floats; mono, stereo, and multichannel; sampling rates from 6 to 192 kHz (and non-standard rates)&lt;br /&gt;
&lt;br /&gt;
=== Commandline Output ===&lt;br /&gt;
&lt;br /&gt;
This output module will allow you to output to any program that supports input from stdin. This gives you complete control of your encoding, if you have commandline tools for the job.&lt;br /&gt;
&lt;br /&gt;
You can select the format SoundOut should deliver to the application you use. There are three WAV formats and RAW PCM data. This is sent to stdin of the application. The program builds the command line from 4 parts, the executable, command line options before the output file, the output file that is selected, and command line options after the output file name.&lt;br /&gt;
&lt;br /&gt;
There are two ways of specifying the executable. Either give complete path to the executable, or simply enter the executable&#039;s filename, and place it in a subdirectory called SoundOut in your plugin directory.&lt;br /&gt;
&lt;br /&gt;
== Exporting from script ==&lt;br /&gt;
&lt;br /&gt;
It is possible to use SoundOut as an ordinary filter, running inside the script and giving parameters for each output mode. The parameters consists of two things: General Parameters, which can be used for all filters, and filter specific parameters, which gives parameters to the active output module.&lt;br /&gt;
&lt;br /&gt;
The out parameter determines whether the GUI will be shown, if it is properly set, the filter will begin exporting audio as soon as it is started.&lt;br /&gt;
&lt;br /&gt;
If the out parameter is not set, it is still possible to set additional parameters. The defaults will however be retrieved from the registry, but specific parameters override&lt;br /&gt;
&lt;br /&gt;
=== General Parameters ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| output&lt;br /&gt;
| string&lt;br /&gt;
| Select output module to use. Possible values are: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;WAV&amp;quot;, &amp;quot;AC3&amp;quot;, &amp;quot;MP2&amp;quot;, &amp;quot;MP3&amp;quot;, &amp;quot;OGG&amp;quot;, &amp;quot;FLAC&amp;quot;, &amp;quot;MAC&amp;quot;, &amp;quot;WV&amp;quot; and &amp;quot;CMD&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
If none, or an invalid value is given, the ordinary GUI will be shown.&lt;br /&gt;
|-&lt;br /&gt;
| filename&lt;br /&gt;
| string&lt;br /&gt;
| Full path to the output filename, including extension. &amp;lt;br&amp;gt;&lt;br /&gt;
No extra quotes are required. &amp;lt;br&amp;gt;&lt;br /&gt;
If no filename is given a file selector will pop up.&lt;br /&gt;
|-&lt;br /&gt;
| showprogress&lt;br /&gt;
| boolean&lt;br /&gt;
| Show the progress window? Default: true&lt;br /&gt;
|-&lt;br /&gt;
| overwritefile&lt;br /&gt;
| string&lt;br /&gt;
| &amp;quot;Yes&amp;quot;: Always overwrite file. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;No&amp;quot;: Never Overwrite file. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ask&amp;quot;: Ask if file should be overwritten.&lt;br /&gt;
|-&lt;br /&gt;
| autoclose&lt;br /&gt;
| bool&lt;br /&gt;
| Should the progress window close automatically 5 seconds after encoding has finished? &amp;lt;br&amp;gt;&lt;br /&gt;
This will also code the window, even though an error occurred. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false&lt;br /&gt;
|-&lt;br /&gt;
| silentblock&lt;br /&gt;
| bool&lt;br /&gt;
| When processing, enabling this option will return silent samples instead of blocking the requesting application. If disabled, any application requesting audio will be blocking, while sound is being exported &amp;lt;br&amp;gt;&lt;br /&gt;
Default: true&lt;br /&gt;
|-&lt;br /&gt;
| addvideo&lt;br /&gt;
| bool&lt;br /&gt;
| When enabled, this will add video to the current output, if none is present. The video is a black 32x32 pixels at 25fps, with the length of the audio. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: true&lt;br /&gt;
|-&lt;br /&gt;
| wait&lt;br /&gt;
| integer&lt;br /&gt;
| 	How many seconds should the output window be shown, if autoclose is on.&amp;lt;br&amp;gt;&lt;br /&gt;
Default: 5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== WAV/AIF/CAF Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| integer&lt;br /&gt;
| Select WAVE format &amp;lt;br&amp;gt;&lt;br /&gt;
0: Microsoft WAV (default), &amp;lt;br&amp;gt;&lt;br /&gt;
1: WAV with WAVEFORMATEX, &amp;lt;br&amp;gt;&lt;br /&gt;
2: Apple/SGI AIFF, &amp;lt;br&amp;gt;&lt;br /&gt;
3: Sun/NeXT AU, &amp;lt;br&amp;gt;&lt;br /&gt;
4: RAW PCM, &amp;lt;br&amp;gt;&lt;br /&gt;
5: S.F. WAVE64, &amp;lt;br&amp;gt;&lt;br /&gt;
6: Core Audio File, &amp;lt;br&amp;gt;&lt;br /&gt;
7: Broadcast Wave.&lt;br /&gt;
|-&lt;br /&gt;
|format&lt;br /&gt;
|integer&lt;br /&gt;
|Sets the sample format number of bits per sample. &amp;lt;br&amp;gt;&lt;br /&gt;
0: 16bit per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
1: 24bit per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
2: 32bit per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
3: 32bit float per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
Default: Same as input.&lt;br /&gt;
|-&lt;br /&gt;
| peakchunck&lt;br /&gt;
| boolean&lt;br /&gt;
| Add Peak chunk to WAV file? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Audio will be written in the format delivered to the SoundOut plugin. All internal sound formats are supported.&lt;br /&gt;
&lt;br /&gt;
=== FLAC Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| compressionlevel&lt;br /&gt;
| integer&lt;br /&gt;
| Sets the compression level. 1 (fastest) to 8 (slowest) &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== APE Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| compressionlevel&lt;br /&gt;
| integer&lt;br /&gt;
| Sets the compression level. 1 (fastest) to 6 (slowest) &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MP2 Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| bitrate&lt;br /&gt;
| integer&lt;br /&gt;
| Sets Bitrate for CBR or maximum bitrate for VBR. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 192&lt;br /&gt;
|-&lt;br /&gt;
| stereomode&lt;br /&gt;
| integer&lt;br /&gt;
| -1: Automatic (default) &amp;lt;br&amp;gt;&lt;br /&gt;
0: Separate Stereo &amp;lt;br&amp;gt;&lt;br /&gt;
1: Separate Stereo &amp;lt;br&amp;gt;&lt;br /&gt;
2: Joint Stereo &amp;lt;br&amp;gt;&lt;br /&gt;
3: Dual Channel &amp;lt;br&amp;gt;&lt;br /&gt;
4: Mono&lt;br /&gt;
|-&lt;br /&gt;
| psymodel&lt;br /&gt;
| integer&lt;br /&gt;
| -1: Fast &amp;amp; Dumb &amp;lt;br&amp;gt;&lt;br /&gt;
0: Low complexity &amp;lt;br&amp;gt;&lt;br /&gt;
1: ISO PAM 1 &amp;lt;br&amp;gt;&lt;br /&gt;
2: ISO PAM 2 &amp;lt;br&amp;gt;&lt;br /&gt;
3: PAM 1 Rewrite (default) &amp;lt;br&amp;gt;&lt;br /&gt;
4: PAM 2 Rewrite&lt;br /&gt;
|-&lt;br /&gt;
| vbrquality&lt;br /&gt;
| float&lt;br /&gt;
| Sets VBR Quality. Useful range is about -10 to 10. &amp;lt;br&amp;gt;&lt;br /&gt;
Default is 0&lt;br /&gt;
|-&lt;br /&gt;
| vbr&lt;br /&gt;
| boolean&lt;br /&gt;
| Encode as VBR? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| quick&lt;br /&gt;
| boolean&lt;br /&gt;
| Quick Encode? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| dab&lt;br /&gt;
| boolean&lt;br /&gt;
| Add DAB Extensions? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false. &amp;lt;br&amp;gt;&lt;br /&gt;
According to TwoLame documentation this might not be reliable.&lt;br /&gt;
|-&lt;br /&gt;
| crc&lt;br /&gt;
| boolean&lt;br /&gt;
| Add CRC Error checks? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| original&lt;br /&gt;
| boolean&lt;br /&gt;
| Set Original Flag? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| copyright&lt;br /&gt;
| boolean&lt;br /&gt;
| Set Copyright flag? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| emphasis&lt;br /&gt;
| integer&lt;br /&gt;
| Set Emphasis flag. &amp;lt;br&amp;gt;&lt;br /&gt;
0: No Emphasis (default) &amp;lt;br&amp;gt;&lt;br /&gt;
1: 50/15 ms &amp;lt;br&amp;gt;&lt;br /&gt;
3: CCIT J.17&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MP3 Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| mode&lt;br /&gt;
| integer&lt;br /&gt;
| Sets Encoding mode: &amp;lt;br&amp;gt;&lt;br /&gt;
0: VBR (default) &amp;lt;br&amp;gt;&lt;br /&gt;
1: ABR &amp;lt;br&amp;gt;&lt;br /&gt;
2: CBR&lt;br /&gt;
|-&lt;br /&gt;
| vbrpreset&lt;br /&gt;
| integer&lt;br /&gt;
| Sets quality preset, when using VBR mode. &amp;lt;br&amp;gt;&lt;br /&gt;
Standard = 1001 (default), &amp;lt;br&amp;gt;&lt;br /&gt;
extreme = 1002, &amp;lt;br&amp;gt;&lt;br /&gt;
insane = 1003, &amp;lt;br&amp;gt;&lt;br /&gt;
standard_fast = 1004, &amp;lt;br&amp;gt;&lt;br /&gt;
extreme_fast = 1005, &amp;lt;br&amp;gt;&lt;br /&gt;
medium = 1006, &amp;lt;br&amp;gt;&lt;br /&gt;
medium_fast = 1007&lt;br /&gt;
|-&lt;br /&gt;
| abrrate&lt;br /&gt;
| integer&lt;br /&gt;
| Sets Average bitrate for ABR encoding. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 128 &amp;lt;br&amp;gt;&lt;br /&gt;
cbrrate	integer	Sets Bitrate for CBR encoding. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 128&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== AC3 Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| iscbr&lt;br /&gt;
| boolean&lt;br /&gt;
| Encode at Constant Bitrate? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: true.&lt;br /&gt;
|-&lt;br /&gt;
| cbrrate&lt;br /&gt;
| integer&lt;br /&gt;
| Sets Bitrate for CBR or maximum bitrate for VBR. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 384&lt;br /&gt;
|-&lt;br /&gt;
| vbrquality&lt;br /&gt;
| integer&lt;br /&gt;
| VBR Bitrate quality. Values between 1 and 1023 are accepted. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 220.&lt;br /&gt;
|-&lt;br /&gt;
| drc&lt;br /&gt;
| integer&lt;br /&gt;
| Dynamic Range Compression&lt;br /&gt;
0: Film Light &amp;lt;br&amp;gt;&lt;br /&gt;
1: Film Standard &amp;lt;br&amp;gt;&lt;br /&gt;
2: Music Light &amp;lt;br&amp;gt;&lt;br /&gt;
3: Music Standard &amp;lt;br&amp;gt;&lt;br /&gt;
4: Speech &amp;lt;br&amp;gt;&lt;br /&gt;
5: None (default)&lt;br /&gt;
|-&lt;br /&gt;
| acmod&lt;br /&gt;
| integer&lt;br /&gt;
| Set channel mapping. &amp;lt;br&amp;gt;&lt;br /&gt;
0 = 1+1 (Ch1,Ch2) &amp;lt;br&amp;gt;&lt;br /&gt;
1 = 1/0 (C) &amp;lt;br&amp;gt;&lt;br /&gt;
2 = 2/0 (L,R) &amp;lt;br&amp;gt;&lt;br /&gt;
3 = 3/0 (L,R,C) &amp;lt;br&amp;gt;&lt;br /&gt;
4 = 2/1 (L,R,S) &amp;lt;br&amp;gt;&lt;br /&gt;
5 = 3/1 (L,R,C,S) &amp;lt;br&amp;gt;&lt;br /&gt;
6 = 2/2 (L,R,SL,SR) &amp;lt;br&amp;gt;&lt;br /&gt;
7 = 3/2 (L,R,C,SL,SR)&lt;br /&gt;
|-&lt;br /&gt;
| dialognormalization&lt;br /&gt;
| integer&lt;br /&gt;
| Dialog normalization. Values from 0 to 31 are accepted. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 31.&lt;br /&gt;
|-&lt;br /&gt;
| islfe&lt;br /&gt;
| boolean&lt;br /&gt;
| Is there LFE channel present? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false if less than 4 channels, true otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| bandwidthfilter&lt;br /&gt;
| boolean&lt;br /&gt;
| Use the bandwidth low-pass filter? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| lfelowpass&lt;br /&gt;
| boolean&lt;br /&gt;
| Use the LFE low-pass filter. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| dchighpass&lt;br /&gt;
| boolean&lt;br /&gt;
| Use the DC high-pass filter. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| dolbysurround&lt;br /&gt;
| boolean&lt;br /&gt;
| Is the material Dolby Surround encoded? (only applies to stereo sound, otherwise ignored) &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|-&lt;br /&gt;
| blockswitch&lt;br /&gt;
| boolean&lt;br /&gt;
| Selectively use 256-point MDCT? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false (Use only 512-point MDCT).&lt;br /&gt;
|-&lt;br /&gt;
| accuratealloc&lt;br /&gt;
| boolean&lt;br /&gt;
| Do more accurate encoding? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: true.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OGG Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| vbrbitrate&lt;br /&gt;
| integer&lt;br /&gt;
| Selects the average bitrate to encode at. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: 128.&lt;br /&gt;
|-&lt;br /&gt;
| cbr&lt;br /&gt;
| boolean&lt;br /&gt;
| Encode as CBR? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Wavpack Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| compressionlevel&lt;br /&gt;
| integer&lt;br /&gt;
| Sets the compression level. 0(Very Fast) to 5(Extremely Slow)&amp;lt;br&amp;gt;&lt;br /&gt;
Default: 2 (Normal)&lt;br /&gt;
|-&lt;br /&gt;
|format&lt;br /&gt;
|integer&lt;br /&gt;
|Sets the sample format number of bits per sample. &amp;lt;br&amp;gt;&lt;br /&gt;
0: 8bit per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
1: 16bit per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
2: 24bit per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
3: 32bit per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
4: 32bit float per sample,&amp;lt;br&amp;gt;&lt;br /&gt;
Default: Same as input.&lt;br /&gt;
|}&lt;br /&gt;
=== Commandline Output Script Parameters: ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Parameter name&lt;br /&gt;
| Type&lt;br /&gt;
| Values&lt;br /&gt;
|-&lt;br /&gt;
| type&lt;br /&gt;
| integer&lt;br /&gt;
| Select WAVE format. &amp;lt;br&amp;gt;&lt;br /&gt;
0: Microsoft WAV (default), &amp;lt;br&amp;gt;&lt;br /&gt;
1: WAV with WAVEFORMATEX, &amp;lt;br&amp;gt;&lt;br /&gt;
2: RAW PCM, &amp;lt;br&amp;gt;&lt;br /&gt;
3: S.F. WAVE64.&lt;br /&gt;
|-&lt;br /&gt;
| format&lt;br /&gt;
| integer&lt;br /&gt;
| Select Output Bits per sample. &amp;lt;br&amp;gt;&lt;br /&gt;
0: 16 Bit &amp;lt;br&amp;gt;&lt;br /&gt;
1: 24 Bit &amp;lt;br&amp;gt;&lt;br /&gt;
2: 32 Bit &amp;lt;br&amp;gt;&lt;br /&gt;
3: 32 bit float &amp;lt;br&amp;gt;&lt;br /&gt;
Default is same as input.&lt;br /&gt;
|-&lt;br /&gt;
| executable&lt;br /&gt;
| string&lt;br /&gt;
| Executable to use. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: &amp;quot;aften.exe&amp;quot; (without quotes).&lt;br /&gt;
|-&lt;br /&gt;
| prefilename&lt;br /&gt;
| string&lt;br /&gt;
| Parameters that are placed before the output filename. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: &amp;quot;-b 384 -&amp;quot; (without quotes).&lt;br /&gt;
|-&lt;br /&gt;
| postfilename&lt;br /&gt;
| string&lt;br /&gt;
| Parameters that are placed after the output filename. &amp;lt;br&amp;gt;&lt;br /&gt;
Default: &amp;quot;&amp;quot; (without quotes).&lt;br /&gt;
|-&lt;br /&gt;
| showoutput&lt;br /&gt;
| boolean&lt;br /&gt;
| Show the output window? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: true.&lt;br /&gt;
|-&lt;br /&gt;
| nofilename&lt;br /&gt;
| boolean&lt;br /&gt;
| Encode without output filename, and don&#039;t use postfilename? &amp;lt;br&amp;gt;&lt;br /&gt;
Default: false.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
 SoundOut(output = &amp;quot;mp3&amp;quot;, filename=&amp;quot;c:\outputFile.mp3&amp;quot;, autoclose = true, showprogress = true, mode = 2, cbrrate = 192)&lt;br /&gt;
&lt;br /&gt;
Engages mp3 output module with CBR at 192kbit/sec.&lt;br /&gt;
&lt;br /&gt;
== Implementation notes ==&lt;br /&gt;
&lt;br /&gt;
SoundOut is multi-threaded, and uses one thread for requesting audio from the previous filters, and another thread for encoding. The threads are given a &amp;quot;below normal&amp;quot; priority.&lt;br /&gt;
&lt;br /&gt;
Only attempt to run two exports at the same time at your own risk. It is most likely slower and could potentially crash. You can safely export sound while you encode, if your encode does not read audio from AviSynth.&lt;br /&gt;
&lt;br /&gt;
== Changelist ==&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
 | v2.60&lt;br /&gt;
 | Initial Release; based on v1.1.1&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
v1.1.1&lt;br /&gt;
* Downgraded FLAC to v1.2.0, to avoid backwards incompatible 24 bit files.&lt;br /&gt;
* Conversion tune-up.&lt;br /&gt;
* OverWriteFile set to &amp;quot;No&amp;quot; was not respected.&lt;br /&gt;
* Client sample requests shown in GUI.&lt;br /&gt;
&lt;br /&gt;
v1.1.0&lt;br /&gt;
* Added WavPack output module.&lt;br /&gt;
* Added Sample type selection to WAV Output.&lt;br /&gt;
* Updated FLAC to v 1.2.1 - 24 bit/sample seems broken, so only 8 &amp;amp; 16 bit are enabled.&lt;br /&gt;
* Fixed bug in FLAC to enable files larger than 2GB.&lt;br /&gt;
* FLAC now uses the same GUI as other filters.&lt;br /&gt;
* Aften updated.&lt;br /&gt;
* Re-enabled Aften multithreading.&lt;br /&gt;
* Faster 3DNOW! float to 24 bit conversion.&lt;br /&gt;
&lt;br /&gt;
v1.0.3&lt;br /&gt;
* Vorbis, AC3 and MP3 now checks if file can be created.&lt;br /&gt;
* Fixed hang in aften on multiprocessor machines.&lt;br /&gt;
* Added wait parameter, how many seconds should SoundOut wait on autoclose.&lt;br /&gt;
* Avoid lockup if encoder cannot be initialized and set for direct output.&lt;br /&gt;
* Fixed OverwriteFile was not always being respected.&lt;br /&gt;
&lt;br /&gt;
v1.0.2&lt;br /&gt;
* Updated libaften to rev534.&lt;br /&gt;
* Fixed overwriteFile not being recognized in script.&lt;br /&gt;
* Fixed crash if mp2 file could not be opened for writing.&lt;br /&gt;
* Exit blocked, even if filter is (almost) instantly destroyed, if script is set for output.&lt;br /&gt;
* AC3 is now reporting the actual samples encoded (including padding).&lt;br /&gt;
&lt;br /&gt;
v1.0.1&lt;br /&gt;
* Updated libaften to rev. 512.&lt;br /&gt;
* Added overwriteFile=&amp;quot;yes&amp;quot;/&amp;quot;no&amp;quot;/&amp;quot;ask&amp;quot;. Default is Ask.&lt;br /&gt;
&lt;br /&gt;
v1.0.0&lt;br /&gt;
* The application will not exit, as long as an encode window is open.&lt;br /&gt;
* Fixed &amp;quot;nofilename&amp;quot; not being recognized in script.&lt;br /&gt;
* LFE no longer overridden by registry, when using GUI.&lt;br /&gt;
&lt;br /&gt;
v0.9.9&lt;br /&gt;
* Added ReplayGain calculation to Analyze.&lt;br /&gt;
* Parent filters are now blocked, or silent samples are returned, if the filter is currently exporting sound.&lt;br /&gt;
* Video is automatically added, if none is present. (black 32x32 RGB32)&lt;br /&gt;
* Buttons for export are disabled when output window is open.&lt;br /&gt;
* Main window is now minimized when export module is selected.&lt;br /&gt;
* Fixed Analyze bug on 16 bit samples.&lt;br /&gt;
* Fixed WAVEFORMATEXTENSIBLE channel mapping in Commandline Output.&lt;br /&gt;
* AC3 output: LFE option disabled when not relevant.&lt;br /&gt;
* AC3 output: LFE option named properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
v0.9.8&lt;br /&gt;
* Added Analyze option to calculate average, maximum and RMS levels. Only available through GUI.&lt;br /&gt;
* WAVEFORMATEXTENSIBLE in commandline out attempts to set channel maps based on channel number.&lt;br /&gt;
* Fixed thread race issue on very fast encoders.&lt;br /&gt;
* Minor GUI tweaks.&lt;br /&gt;
&lt;br /&gt;
v0.9.7&lt;br /&gt;
* Added channelmapping to AC3 output.&lt;br /&gt;
* Added LFE channel indicator switch to AC3 output.&lt;br /&gt;
* GUI now spawned in a new thread, fixing GUI lockup in foobar2000 and similar.&lt;br /&gt;
* Fixed general thread race issue, where a fast encoder might lead to incomplete output.&lt;br /&gt;
* Fixed WAVE_FORMAT_EXTENSIBLE header without info in CmdLine Output.&lt;br /&gt;
* Fixed &amp;quot;Format&amp;quot; not working on Commandline output.&lt;br /&gt;
* Fixed Filename dialog not appearing.&lt;br /&gt;
* Forced final samplereading to be correct.&lt;br /&gt;
* Removed &amp;quot;private&amp;quot; option from MP2 GUI and script, as there is no way to set it via twolame.&lt;br /&gt;
* Removed DAB Extensions from MP2 GUI, as TwoLame reports it as not functioning.&lt;br /&gt;
&lt;br /&gt;
v0.9.6&lt;br /&gt;
* Added complete script customization.&lt;br /&gt;
* Added possibility to set output file from script.&lt;br /&gt;
* Added window autoclose option to script.&lt;br /&gt;
* Added option to script to disable progress window.&lt;br /&gt;
* GUI creates message handle thread.&lt;br /&gt;
* Settings are now saved to registry if output filter initializes successfully.&lt;br /&gt;
* Updated documentation.&lt;br /&gt;
&lt;br /&gt;
v0.9.5&lt;br /&gt;
* Added Broadcast WAVE out.&lt;br /&gt;
* Fixed OGG Vorbis support.&lt;br /&gt;
* Fixed Text fields not being correctly read.&lt;br /&gt;
* Fixed AC3 settings not being restored properly.&lt;br /&gt;
* Added: MP2 settings are now saved.&lt;br /&gt;
&lt;br /&gt;
v0.9.4&lt;br /&gt;
* Added OGG Vorbis support.&lt;br /&gt;
* Added: Parameters stored (on save) and read to registry.&lt;br /&gt;
* Added: &amp;quot;No filename needed&amp;quot; option in commandline output, to disable output filename prompt.&lt;br /&gt;
* Fixed collision between libaften and libvorbis.&lt;br /&gt;
* Updated libaften to rev 257.&lt;br /&gt;
* Enabled SSE optimizations in libaften.&lt;br /&gt;
* Hopefully fixed issue with commandline executable filename becoming garbled.&lt;br /&gt;
&lt;br /&gt;
v 0.9.3&lt;br /&gt;
* Added Commandline piping output.&lt;br /&gt;
* Added MP3 / LAME output.&lt;br /&gt;
* Fixed AC3 VBR Error sometimes wrongly being displayed.&lt;br /&gt;
* Fixed AC3 DRC Setting not being respected.&lt;br /&gt;
* Various GUI bugfixes.&lt;br /&gt;
&lt;br /&gt;
v 0.9.2&lt;br /&gt;
* Updated AC3 GUI.&lt;br /&gt;
* Fixed crash in WAV output.&lt;br /&gt;
* More stats during conversion.&lt;br /&gt;
&lt;br /&gt;
v 0.9.1&lt;br /&gt;
* Added AC3 Output.&lt;br /&gt;
* Added new parameter handling.&lt;br /&gt;
* Fixed last block not being encoded.&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Media file filters]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=NTSC&amp;diff=929</id>
		<title>NTSC</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=NTSC&amp;diff=929"/>
		<updated>2011-09-14T17:19:56Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: New page: TODO  Category:Glossary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TODO&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=PAL&amp;diff=927</id>
		<title>PAL</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=PAL&amp;diff=927"/>
		<updated>2011-09-14T17:19:06Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: New page: TODO  Category:Glossary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TODO&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Ffdshow&amp;diff=925</id>
		<title>Ffdshow</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Ffdshow&amp;diff=925"/>
		<updated>2011-09-14T15:46:17Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ffdshow is DirectShow and VFW codec for decoding/encoding many video and audio formats, including DivX and XviD movies using libavcodec, xvid and other opensourced libraries with a rich set of postprocessing filters.&lt;br /&gt;
&lt;br /&gt;
* original: http://sourceforge.net/projects/ffdshow&lt;br /&gt;
* latest versions: http://ffdshow-tryout.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=GraphEdit&amp;diff=923</id>
		<title>GraphEdit</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=GraphEdit&amp;diff=923"/>
		<updated>2011-09-14T15:15:48Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;quot;GraphEdit is a visual tool for building and testing filter graphs. It is provided as an executable with the DirectX SDK. With GraphEdit, you can quickly build and test filter graphs to see if they function as you expect. You can even view a filter graph created by an application running in another process.&amp;quot; (Taken from the GraphEdit help file)&lt;br /&gt;
&lt;br /&gt;
A filter in this case is the front end of a codec. GraphEdit lets you visually connect codecs together, allowing you to override default priorities of the codecs. Also allowing access to disabled codecs. GraphEdit was designed for the testing of codecs.&lt;br /&gt;
&lt;br /&gt;
To get the latest version download the [http://www.microsoft.com/downloads/details.aspx?FamilyId=484269E2-3B89-47E3-8EB7-1F2BE6D7123A&amp;amp;displaylang=en Platform SDK], [http://www.videohelp.com/tools/GraphEdit GraphEdit] only. The latest version of GraphEdit is 9.04.78.0000 Build 060303.&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=MakeAVIS&amp;diff=921</id>
		<title>MakeAVIS</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=MakeAVIS&amp;diff=921"/>
		<updated>2011-09-14T14:45:46Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MakeAVIS is an AVI wrapper which is included in [[ffdshow]] ([http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=49964 discussion]). Note that this program was also included in the installation of AviSynth v2.52.&lt;br /&gt;
&lt;br /&gt;
Get updated versions of MakeAvis from [http://forum.doom9.org/showthread.php?t=120465 ffdshow-tryout project]&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Vfapi&amp;diff=919</id>
		<title>Vfapi</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Vfapi&amp;diff=919"/>
		<updated>2011-09-14T14:42:50Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VFAPI is an AVI wrapper. For VFAPI you need to install the [http://www.vcdhelp.com/forum/userguides/87270.php ReadAVS plugin]. Just copy ReadAVS.dll to the VFAPI reader directory and open the reg-file ReadAVS.reg in notepad and change the corresponding path. Save it, and doubleclick on it to merge it with your registry-file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Huffyuv&amp;diff=917</id>
		<title>Huffyuv</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Huffyuv&amp;diff=917"/>
		<updated>2011-09-14T13:23:42Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Huffyuv is a lossless video codec created by BenRG (the original developer of AviSynth), patterned after JPEG-LS. It supports RGB, UYVY, and YUY2.&lt;br /&gt;
&lt;br /&gt;
Its homepage used to be at [http://math.berkeley.edu/~benrg/huffyuv.html] but has disappeared. It is mirrored [http://web.archive.org/web/20020607190222/math.berkeley.edu/~benrg/huffyuv.html here]. Version 2.1.1 (binaries and source) is downloadable at [http://neuron2.net/www.math.berkeley.edu/benrg/huffyuv.html Donald Graft&#039;s mirror].&lt;br /&gt;
&lt;br /&gt;
Latest Huffyuv can be found here: [http://www.doom9.org/index.html?/software2.htm Huffyuv v2.1.1 CCE SP-Patch v0.2.5, released Dec 22, 2003]. Get the file huffyuv_ccesp-patch_025.zip.&lt;br /&gt;
&lt;br /&gt;
Another implementation exists within libavcodec (MPlayer, FFDShow, etc), which extends the format to support YV12.&lt;br /&gt;
&lt;br /&gt;
 [[Category:Glossary]]&lt;br /&gt;
 [[Category:LosslessCodecs]]&lt;br /&gt;
 [[Category:Codecs]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=MPEG-4&amp;diff=915</id>
		<title>MPEG-4</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=MPEG-4&amp;diff=915"/>
		<updated>2011-09-14T13:09:38Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TODO&lt;br /&gt;
&lt;br /&gt;
[[Category:Glossary]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Formal_AviSynth_grammar&amp;diff=761</id>
		<title>Formal AviSynth grammar</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Formal_AviSynth_grammar&amp;diff=761"/>
		<updated>2011-04-10T16:46:02Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* The AviSynth Grammar in EBNF Notation */ spelling: extened -&amp;gt; extended&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This page presents the &#039;&#039;formal grammar&#039;&#039; of the AviSynth script language. This is a dense representation of all the rules of the AviSynth script language. While it probably is of more interest to a developer than to an average user, it is nevertheless an essential piece of documentation for any programming language and it is thus provided here for those more inclined to abstract mathematical reasoning. Have fun! &lt;br /&gt;
&lt;br /&gt;
Before going to the grammar, a few introductory material will be necessary for all those that don&#039;t eat bytes for breakfast. If you are familiar with BNF / EBNF syntax then skip the following section.&lt;br /&gt;
&lt;br /&gt;
== Background Information ==&lt;br /&gt;
&lt;br /&gt;
Formal grammars of programming and scripting languages are typically written in Backus-Naur Form (BNF) or Extended Backus-Naur Form (EBNF) syntax. We have chosen the EBNF syntax because it is easier for human comprehension and thus it is a slightly better selection for documentation purposes. The syntax used here follows the ISO/IEC 14977 Standard, &amp;quot;Extended BNF&amp;quot;. The table below summarizes the notation used (&amp;lt;tt&amp;gt;infix&amp;lt;/tt&amp;gt; means that the operator has left associativity; &amp;lt;tt&amp;gt;postfix&amp;lt;/tt&amp;gt; that it has right associativity).&lt;br /&gt;
&lt;br /&gt;
{|width=85% border=1 cellspacing=2 cellpadding=4&lt;br /&gt;
! Extended BNF&lt;br /&gt;
! Operator&lt;br /&gt;
! Meaning&lt;br /&gt;
! Comment&lt;br /&gt;
|-&lt;br /&gt;
| unquoted words &lt;br /&gt;
| &lt;br /&gt;
| Non-terminal symbol&lt;br /&gt;
| A symbol that is a grouping of low-level symbols (ie not a fundamental one).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;...&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
| Terminal symbol&lt;br /&gt;
| A fundamental (ie not further divisible) symbol of the language.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;...&#039;&lt;br /&gt;
| &lt;br /&gt;
| Terminal symbol&lt;br /&gt;
| Same as above.&lt;br /&gt;
|-&lt;br /&gt;
| (...)&lt;br /&gt;
| &lt;br /&gt;
| Brackets&lt;br /&gt;
| Parentheses just group the symbols inside them in a single (non-terminal) symbol.&lt;br /&gt;
|-&lt;br /&gt;
| [...]&lt;br /&gt;
| &lt;br /&gt;
| Optional symbols&lt;br /&gt;
| The symbols inside square braces are optional (ie they are present either 0 or 1 times)&lt;br /&gt;
|-&lt;br /&gt;
| {...}&lt;br /&gt;
| &lt;br /&gt;
| Symbols repeated &#039;&#039;zero or more&#039;&#039; (ie &amp;gt;= 0) times&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {...}-&lt;br /&gt;
| &lt;br /&gt;
| Symbols repeated &#039;&#039;one or more&#039;&#039; (ie &amp;gt;= 1) times&lt;br /&gt;
| Note that the - immediately &#039;&#039;follows&#039;&#039; the curly braces.&lt;br /&gt;
|-&lt;br /&gt;
| =&lt;br /&gt;
| infix&lt;br /&gt;
| Defining symbol&lt;br /&gt;
| This is the &amp;quot;assignment&amp;quot; operator of EBNF; the left (non-terminal) symbol is (equal to) the right grouping of symbols.&lt;br /&gt;
|-&lt;br /&gt;
| ;&lt;br /&gt;
| postfix&lt;br /&gt;
| Rule terminator&lt;br /&gt;
| This operator signals the end of the (assignment) rule (just like in C ; ends a statement).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| infix&lt;br /&gt;
| Alternative&lt;br /&gt;
| Either one of the alternative terminal or non-terminal symbols (and only one) will be matched.&lt;br /&gt;
|-&lt;br /&gt;
| ,&lt;br /&gt;
| infix&lt;br /&gt;
| Concatenation&lt;br /&gt;
| Symbols on both ends of the , (comma) operator are joined sequentially to form a single (non-terminal) symbol.&lt;br /&gt;
|-&lt;br /&gt;
| -&lt;br /&gt;
| infix&lt;br /&gt;
| Exception&lt;br /&gt;
| The effect is the logical negation of the rule following. For example -&amp;quot;a&amp;quot; becomes  ? all characters not equal to a ?.&lt;br /&gt;
|-&lt;br /&gt;
| *&lt;br /&gt;
| infix&lt;br /&gt;
| Occurences of&lt;br /&gt;
| The effect of this operator is to repeat the symbol to its right {n} times, where n is the value to its left. For example to state that a (fortran) label has exactly 5 characters, one can state: &amp;lt;tt&amp;gt;label = 5 * character;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| (*...*)&lt;br /&gt;
| &lt;br /&gt;
| Comment&lt;br /&gt;
| Arbitrary text documenting something (this is the comment facility of the EBNF language).&lt;br /&gt;
|-&lt;br /&gt;
| ?...?&lt;br /&gt;
| &lt;br /&gt;
| Special sequence&lt;br /&gt;
| Arbitrary text whose interpretation is beyond the scope of the EBNF standard.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
For defining character sequences as terminal symbols one can either use the &amp;quot;string&amp;quot; or &#039;string&#039; facilities of the EBNF language or to use the concatenation operator: character-a , character-b , ..., character-z. However for some repetitive tasks such as enumerating all characters of the alphabet or all numeric digits, etc. it is common to use a range notation of the form &amp;lt;tt&amp;gt;start...end&amp;lt;/tt&amp;gt; as an extension to the standard. We use it also here.&lt;br /&gt;
&lt;br /&gt;
== The AviSynth Grammar in EBNF Notation ==&lt;br /&gt;
&lt;br /&gt;
In the formulation of the AviSynth grammar below, there are certain items that are not considered part of the grammar and thus are considered responsibilities of the tokenizer (to process and strip-off). These are the following:&lt;br /&gt;
* Whitespace.&lt;br /&gt;
* Comments (both single-line and multi-line). &lt;br /&gt;
* Line continuations.&lt;br /&gt;
* The end-of-file condition.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
script =&lt;br /&gt;
            { declaration }-&lt;br /&gt;
            ;&lt;br /&gt;
declaration =&lt;br /&gt;
            statement&lt;br /&gt;
            | function_definition &lt;br /&gt;
            ;&lt;br /&gt;
function_definition =&lt;br /&gt;
            kw_function , identifier , &#039;(&#039; , [ parameters_list ] , &#039;)&#039; , &lt;br /&gt;
            compound_statement&lt;br /&gt;
            ;&lt;br /&gt;
(* optional arguments must come after all positional arguments *)&lt;br /&gt;
parameters_list =&lt;br /&gt;
            arguments , &#039;,&#039; , optional_arguments     (* either both types in order *)&lt;br /&gt;
            | arguments                              (* or only one (any) of them  *)&lt;br /&gt;
            | optional_arguments&lt;br /&gt;
            ;&lt;br /&gt;
arguments =&lt;br /&gt;
            argument , [ { &#039;,&#039; , argument } ]&lt;br /&gt;
            ;&lt;br /&gt;
(* Note: If type_spec is missing, it is implicitly assumed to be: t_val *)&lt;br /&gt;
argument =&lt;br /&gt;
            [ type_spec ] , identifier&lt;br /&gt;
            ;&lt;br /&gt;
optional_arguments =&lt;br /&gt;
            optional_argument , [ { &#039;,&#039; , optional_argument } ]&lt;br /&gt;
            ;&lt;br /&gt;
(* Despite the formulation, the tokenizer does not handle whitespace correctly. *)&lt;br /&gt;
(* Example: an optional argument declared simply &amp;quot;int f&amp;quot; parses without error.  *)&lt;br /&gt;
optional_argument =&lt;br /&gt;
            [ type_spec ] , quote , identifier , quote&lt;br /&gt;
            ;&lt;br /&gt;
type_spec =&lt;br /&gt;
            t_val | t_string | t_bool | t_int | t_float | t_clip&lt;br /&gt;
            ;&lt;br /&gt;
(* This is probably a parser bug (due to C-origin) because there is only one global *)&lt;br /&gt;
(* function table in AviSynth; it should be  &#039;{&#039; , { statement } , &#039;}&#039;  instead and *)&lt;br /&gt;
(* statement definition below would include function_definition. Then, declaration  *)&lt;br /&gt;
(* would be un-needed as a grammar rule and also: script = { statement }- ;         *)&lt;br /&gt;
compound_statement = &lt;br /&gt;
            &#039;{&#039; , { declaration } , &#039;}&#039;&lt;br /&gt;
            ;&lt;br /&gt;
statement =                  (* free-standing compound statements are ?not? allowed *)&lt;br /&gt;
            expression&lt;br /&gt;
            | try_statement&lt;br /&gt;
            | jump_statement&lt;br /&gt;
            ;&lt;br /&gt;
try_statement =&lt;br /&gt;
            kw_try , compound_statement , &lt;br /&gt;
            kw_catch , &#039;(&#039; , [ identifier ] , &#039;)&#039; , compound_statement&lt;br /&gt;
            ;&lt;br /&gt;
jump_statement = &lt;br /&gt;
            kw_return , [ expression ]&lt;br /&gt;
            ;&lt;br /&gt;
(* Although expression has only one subtype, keep as a separate production rule *)&lt;br /&gt;
(* for documentation and for easier update of the grammar if extended at future. *)&lt;br /&gt;
expression =&lt;br /&gt;
            assignment_exp&lt;br /&gt;
            ;&lt;br /&gt;
assignment_exp =&lt;br /&gt;
            conditional_exp&lt;br /&gt;
            | [ kw_global ] , identifier , &#039;=&#039; , assignment_exp&lt;br /&gt;
            ;&lt;br /&gt;
conditional_exp =&lt;br /&gt;
            logical_or_exp&lt;br /&gt;
            | logical_or_exp , &#039;?&#039; , expression , &#039;:&#039; , conditional_exp&lt;br /&gt;
            ;&lt;br /&gt;
logical_or_exp =&lt;br /&gt;
            logical_and_exp&lt;br /&gt;
            | logical_or_exp , &#039;||&#039; , logical_and_exp&lt;br /&gt;
            ;&lt;br /&gt;
logical_and_exp =&lt;br /&gt;
            equality_exp&lt;br /&gt;
            | logical_and_exp , &#039;&amp;amp;&amp;amp;&#039; , equality_exp&lt;br /&gt;
            ;&lt;br /&gt;
equality_exp =&lt;br /&gt;
            relational_exp&lt;br /&gt;
            | equality_exp , equ_binary_operator , relational_exp&lt;br /&gt;
            ;&lt;br /&gt;
equ_binary_operator = &lt;br /&gt;
            &#039;==&#039; | &#039;!=&#039; | &#039;&amp;lt;&amp;gt;&#039;&lt;br /&gt;
            ;&lt;br /&gt;
relational_exp =&lt;br /&gt;
            additive_exp&lt;br /&gt;
            | relational_exp , rel_binary_operator , additive_exp&lt;br /&gt;
            ;&lt;br /&gt;
rel_binary_operator = &lt;br /&gt;
            &#039;&amp;lt;&#039; | &#039;&amp;gt;&#039; | &#039;&amp;lt;=&#039; | &#039;&amp;gt;=&#039;&lt;br /&gt;
            ;&lt;br /&gt;
additive_exp =&lt;br /&gt;
            multiplicative_exp&lt;br /&gt;
            | additive_exp , add_binary_operator , multiplicative_exp&lt;br /&gt;
            ;&lt;br /&gt;
add_binary_operator = &lt;br /&gt;
            &#039;+&#039; | &#039;-&#039; | &#039;++&#039;                               (* ++ is for clips *)&lt;br /&gt;
            ;&lt;br /&gt;
multiplicative_exp = &lt;br /&gt;
            unary_exp&lt;br /&gt;
            | multiplicative_exp , mul_binary_operator , unary_exp&lt;br /&gt;
            ;&lt;br /&gt;
mul_binary_operator = &lt;br /&gt;
            &#039;*&#039; |  &#039;/&#039; |  &#039;%&#039;&lt;br /&gt;
            ;&lt;br /&gt;
unary_exp = &lt;br /&gt;
            [ unary_operator ] , postfix_exp&lt;br /&gt;
            ;&lt;br /&gt;
unary_operator = &lt;br /&gt;
            sign | &#039;!&#039;&lt;br /&gt;
            ;&lt;br /&gt;
(* Because OOP notation simply puts the 1st argument of a function in front of its call *)&lt;br /&gt;
(* it can be chained to all alternatives of primary_exp; therefore this is its place    *)&lt;br /&gt;
postfix_exp = &lt;br /&gt;
            primary_exp&lt;br /&gt;
            | function_call&lt;br /&gt;
            | primary_exp , { &#039;.&#039; , function_call }-       (* the OOP notation *)&lt;br /&gt;
            ;&lt;br /&gt;
function_call =&lt;br /&gt;
            identifier , [ &#039;(&#039; , [ argument_exp_list ] , &#039;)&#039; ]&lt;br /&gt;
            ;&lt;br /&gt;
(* Assignment is allowed only to optional arguments, *)&lt;br /&gt;
(* which must come after all positional arguments    *)&lt;br /&gt;
argument_exp_list = &lt;br /&gt;
            positional_arg_list , &#039;,&#039; , optional_arg_list  (* either both types in order *)&lt;br /&gt;
            | positional_arg_list                          (* or only one (any) of them  *)&lt;br /&gt;
            | optional_arg_list&lt;br /&gt;
            ;&lt;br /&gt;
positional_arg_list = &lt;br /&gt;
            expression&lt;br /&gt;
            | positional_arg_list , &#039;,&#039; , expression&lt;br /&gt;
            ;&lt;br /&gt;
optional_arg_list = &lt;br /&gt;
            identifier , &#039;=&#039; , expression&lt;br /&gt;
            | optional_arg_list , &#039;,&#039; , identifier , &#039;=&#039; , expression&lt;br /&gt;
            ;&lt;br /&gt;
primary_exp =&lt;br /&gt;
            constant&lt;br /&gt;
            | identifier&lt;br /&gt;
            | &#039;(&#039; , expression , &#039;)&#039;&lt;br /&gt;
            ;&lt;br /&gt;
identifier = &lt;br /&gt;
            ( letter | &amp;quot;_&amp;quot; )  , { letter | digit | &amp;quot;_&amp;quot; }&lt;br /&gt;
            ;&lt;br /&gt;
constant = &lt;br /&gt;
            integer_constant | float_constant | boolean_constant | stringliteral&lt;br /&gt;
            ;&lt;br /&gt;
stringliteral = &lt;br /&gt;
            quote , { -quote } , quote | tripleqouote , { -tripleqouote } , tripleqouote&lt;br /&gt;
            ;&lt;br /&gt;
boolean_constant =&lt;br /&gt;
            true | false | yes | no&lt;br /&gt;
            ;&lt;br /&gt;
integer_constant = &lt;br /&gt;
            decimalinteger | hexinteger&lt;br /&gt;
            ;&lt;br /&gt;
float_constant = &lt;br /&gt;
            [ sign ] , ( [ intpart ] , fraction | intpart , &#039;.&#039; )&lt;br /&gt;
            ;&lt;br /&gt;
decimalinteger = &lt;br /&gt;
            [ sign ] , ( nzero_digit , { digit } | &#039;0&#039; )&lt;br /&gt;
            ;&lt;br /&gt;
hexinteger = &lt;br /&gt;
            &amp;quot;$&amp;quot; , { hexdigit }-&lt;br /&gt;
            ;&lt;br /&gt;
fraction = &lt;br /&gt;
            &#039;.&#039; , intpart&lt;br /&gt;
            ;&lt;br /&gt;
intpart = &lt;br /&gt;
            { digit }-&lt;br /&gt;
            ;&lt;br /&gt;
hexdigit = &lt;br /&gt;
            digit | &#039;a&#039;...&#039;f&#039; | &#039;A&#039;...&#039;F&#039; &lt;br /&gt;
            ;&lt;br /&gt;
letter = &lt;br /&gt;
            &#039;a&#039;...&#039;z&#039; | &#039;A&#039;...&#039;Z&#039; &lt;br /&gt;
            ;&lt;br /&gt;
digit = &lt;br /&gt;
            &#039;0&#039; | nzero_digit&lt;br /&gt;
            ;&lt;br /&gt;
nzero_digit =&lt;br /&gt;
            &#039;1&#039;...&#039;9&#039;&lt;br /&gt;
            ;&lt;br /&gt;
sign =&lt;br /&gt;
            &#039;-&#039; | &#039;+&#039;&lt;br /&gt;
            ;&lt;br /&gt;
&lt;br /&gt;
quote       = &#039;&amp;quot;&#039;   ;&lt;br /&gt;
triplequote = &#039;&amp;quot;&amp;quot;&amp;quot;&#039; ;&lt;br /&gt;
&lt;br /&gt;
true        = i_t , i_r , i_u , i_e ;&lt;br /&gt;
false       = i_f , i_a , i_l , i_s , i_e ;&lt;br /&gt;
yes         = i_y , i_e , i_s ;&lt;br /&gt;
no          = i_n , i_o ;&lt;br /&gt;
&lt;br /&gt;
t_val       = i_v , i_a , i_l ;&lt;br /&gt;
t_string    = i_s , i_t , i_r , i_i , i_n , i_g ;&lt;br /&gt;
t_bool      = i_b , i_o , i_o , i_l ;&lt;br /&gt;
t_int       = i_i , i_n , i_t ;&lt;br /&gt;
t_float     = i_f , i_l , i_o , i_a , i_t ;&lt;br /&gt;
t_clip      = i_c , i_l , i_i , i_p ;&lt;br /&gt;
&lt;br /&gt;
kw_function = i_f , i_u , i_n , i_c , i_t , i_i , i_o , i_n ;&lt;br /&gt;
kw_try      = i_t , i_r , i_y ;&lt;br /&gt;
kw_catch    = i_c , i_a , i_t , i_c , i_h ;&lt;br /&gt;
kw_global   = i_g , i_l , i_o , i_b , i_a , i_l ;&lt;br /&gt;
kw_return   = i_r , i_e , i_t , i_u , i_r , i_n ;&lt;br /&gt;
&lt;br /&gt;
i_a = ( &#039;a&#039; | &#039;A&#039; ) ;&lt;br /&gt;
i_b = ( &#039;b&#039; | &#039;B&#039; ) ;&lt;br /&gt;
i_c = ( &#039;c&#039; | &#039;C&#039; ) ;&lt;br /&gt;
i_e = ( &#039;e&#039; | &#039;E&#039; ) ;&lt;br /&gt;
i_f = ( &#039;f&#039; | &#039;F&#039; ) ;&lt;br /&gt;
i_g = ( &#039;g&#039; | &#039;G&#039; ) ;&lt;br /&gt;
i_h = ( &#039;h&#039; | &#039;H&#039; ) ;&lt;br /&gt;
i_i = ( &#039;i&#039; | &#039;I&#039; ) ;&lt;br /&gt;
i_l = ( &#039;l&#039; | &#039;L&#039; ) ;&lt;br /&gt;
i_n = ( &#039;n&#039; | &#039;N&#039; ) ;&lt;br /&gt;
i_o = ( &#039;o&#039; | &#039;O&#039; ) ;&lt;br /&gt;
i_p = ( &#039;p&#039; | &#039;P&#039; ) ;&lt;br /&gt;
i_r = ( &#039;r&#039; | &#039;R&#039; ) ;&lt;br /&gt;
i_s = ( &#039;s&#039; | &#039;S&#039; ) ;&lt;br /&gt;
i_t = ( &#039;t&#039; | &#039;T&#039; ) ;&lt;br /&gt;
i_u = ( &#039;u&#039; | &#039;U&#039; ) ;&lt;br /&gt;
i_v = ( &#039;v&#039; | &#039;V&#039; ) ;&lt;br /&gt;
i_y = ( &#039;y&#039; | &#039;Y&#039; ) ;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
Back to the [[AviSynth Syntax]]&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Reference]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=The_full_AviSynth_grammar&amp;diff=759</id>
		<title>The full AviSynth grammar</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=The_full_AviSynth_grammar&amp;diff=759"/>
		<updated>2011-04-04T10:34:47Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* The Full Avisynth Grammar - For Language Lawyers */ spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
&lt;br /&gt;
From the perspective of the AviSynth interpreter each script is a series of tokens. The general term &amp;lt;tt&amp;gt;token&amp;lt;/tt&amp;gt; corresponds to the basic building element of a script (if we imagine a script as a wall, then the tokens are the bricks). The AviSynth grammar is the set of rules (the recipe) for identifying and grouping tokens into higher-level structures. &lt;br /&gt;
&lt;br /&gt;
We present those rules in the following sections, in a bottom-up fashion (from low-level to higher-level constructs). However, for a reader with a basic understanding of programming that wants a &#039;&#039;quick tour&#039;&#039; of the language another road is possible: start directly with the [[#Expressions and Statements|Expressions and Statements]] section and visit previous sections if a clarification is needed.&lt;br /&gt;
&lt;br /&gt;
== Case == &lt;br /&gt;
&lt;br /&gt;
The very first and maybe most important one rule of the AviSynth grammar is case. &#039;&#039;&#039;AviSynth ignores case&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 aViSouRCe &lt;br /&gt;
&lt;br /&gt;
is just as good as &lt;br /&gt;
&lt;br /&gt;
 AVISource&lt;br /&gt;
&lt;br /&gt;
For the AviSynth Grammar both entries correspond to the &#039;&#039;&#039;same token&#039;&#039;&#039;. Thus, you should always have in mind that capitalisation does not matter when defining your variables and functions; you must always ensure that they are unique in a &#039;&#039;case-insensitive&#039;&#039; manner.&lt;br /&gt;
&lt;br /&gt;
== Whitespace, Line Continuation and Comments ==&lt;br /&gt;
&lt;br /&gt;
The first layer of grammar rules concerns the identification of tokens out of the overall script text. Text that does not belong to a token is commonly referred to as &#039;&#039;whitespace&#039;&#039; in most programming and scripting languages.&lt;br /&gt;
&lt;br /&gt;
=== Whitespace ===&lt;br /&gt;
&lt;br /&gt;
Whitespace in AviSynth language consists of:&lt;br /&gt;
* Space, tab and newline characters (except inside &#039;&#039;string literals&#039;&#039;).&lt;br /&gt;
* The backslash (\) character when it is the &#039;&#039;first or last non-whitespace character in a line&#039;&#039; (and &#039;&#039;not inside a string literal&#039;&#039;).&lt;br /&gt;
* Comments.&lt;br /&gt;
* Anything from the appearance of the &amp;lt;nowiki&amp;gt;__END__&amp;lt;/nowiki&amp;gt; special keyword up to the end of the script file.&lt;br /&gt;
&lt;br /&gt;
=== Backslash ===&lt;br /&gt;
&lt;br /&gt;
The backslash character serves the role of &#039;&#039;line continuation&#039;&#039;. It is used to split a large line of code in multiple ones for better readability of the script when editing, yet serve it to the AviSynth interpreter as a single logical line of code. Line splitting examples (both valid and equal):&lt;br /&gt;
&lt;br /&gt;
 Subtitle(&amp;quot;Hello, World!&amp;quot;, 100, 200, 0, \&lt;br /&gt;
   999999, &amp;quot;Arial&amp;quot;, 24, $00FF00)&lt;br /&gt;
-or-&lt;br /&gt;
 Subtitle(&amp;quot;Hello, World!&amp;quot;, 100, 200, 0,&lt;br /&gt;
   \ 999999, &amp;quot;Arial&amp;quot;, 24, $00FF00)&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments serve the purpose of code documentation. They come in the following flavors:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Standard comments&#039;&#039;: They start with a pound (&#039;&#039;&#039;#&#039;&#039;&#039;) character and extend to the end of the line.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Block comments&#039;&#039; (AviSynth v2.58 and later): They start either with &#039;&#039;&#039;/*&#039;&#039;&#039; or &#039;&#039;&#039;[*&#039;&#039;&#039; and extend until a (closing) &#039;&#039;&#039;*/&#039;&#039;&#039; or &#039;&#039;&#039;*]&#039;&#039;&#039;, respectively, is found downstream the script text. They can span multiple lines and the &#039;&#039;&#039;[*&#039;&#039;&#039; form also supports nested block comments.&lt;br /&gt;
&lt;br /&gt;
Examples of comments:&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;myclip.avi&amp;quot;)    # this is a standard comment&lt;br /&gt;
&lt;br /&gt;
 /* this is a block comment &lt;br /&gt;
 we can write a lot here&lt;br /&gt;
 SubTitle(&amp;quot;Hello, World!&amp;quot;)&lt;br /&gt;
 and also comment out multiple lines of code&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 [* this is a nested block comment&lt;br /&gt;
 [* &lt;br /&gt;
 a meaningful example will follow later :)&lt;br /&gt;
 *]&lt;br /&gt;
 for the time being just experiment *]&lt;br /&gt;
&lt;br /&gt;
The comments mechanism has higher precedence than the backslash. If you comment out a line that ends with \, line continuation will &#039;&#039;&#039;not&#039;&#039;&#039; happen. A quick example from real life (someone did submitted a bug report for this):&lt;br /&gt;
&lt;br /&gt;
 [[ColorBars]]&lt;br /&gt;
 [[ShowFrameNumber]]&lt;br /&gt;
 Trim(0,9) # select some frames  \&lt;br /&gt;
   + Trim(20,29)&lt;br /&gt;
&lt;br /&gt;
The above example does not return frames [0..9,20..29] as the user intended because the &amp;quot;\&amp;quot; is masked by the comment start &amp;quot;#&amp;quot; character before it; thus the line continuation never happens. The comment should go at the last line.&lt;br /&gt;
&lt;br /&gt;
=== The &amp;lt;nowiki&amp;gt;__END__&amp;lt;/nowiki&amp;gt; special keyword ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;nowiki&amp;gt;__END__&amp;lt;/nowiki&amp;gt; special keyword can be used to quickly disable some last commands of the script. Example:&lt;br /&gt;
&lt;br /&gt;
 [[Version]]()&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;__END__&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 [[ReduceBy2]]()&lt;br /&gt;
 Result is not reduced and we can write any text here&lt;br /&gt;
&lt;br /&gt;
== Keywords, Identifiers, Literals and Punctuation ==&lt;br /&gt;
&lt;br /&gt;
The second layer of grammar rules - once whitespace has been handled and tokens have been identified - concerns the categorisation of tokens (that is, finding the &#039;&#039;type&#039;&#039; of the tokens). Tokens generally belong to one of the following categories:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Keywords&#039;&#039;: Tokens with specific, standard meaning for the AviSynth language (ie &#039;&#039;reserved words&#039;&#039;).&lt;br /&gt;
* &#039;&#039;Identifiers&#039;&#039;: Tokens that identify an entity (a variable, a function, etc.).&lt;br /&gt;
* &#039;&#039;Literals&#039;&#039;: Tokens that represent a value (ie a constant quantity).&lt;br /&gt;
* &#039;&#039;Punctuation&#039;&#039;: This generic term comprises all tokens with specific, standard meaning for the AviSynth language that are too short to be considered keywords. They include:&lt;br /&gt;
:* [[Operators]].&lt;br /&gt;
:* Grouping and ordering tokens.&lt;br /&gt;
&lt;br /&gt;
=== Keywords ===&lt;br /&gt;
&lt;br /&gt;
The following are AviSynth language&#039;s keywords. We use here an all lowercase notation, but bear in mind that since AviSynth &#039;&#039;ignores case&#039;&#039;, any equivalent combination of uppercase / lowercase letters counts as a keyword (for example: try, Try, tRy, trY, TRy, TrY, tRY, TRY):&lt;br /&gt;
&lt;br /&gt;
* function : Begins the declaration of a [[User_defined_script_functions|user-defined script function]].&lt;br /&gt;
* global : Modifies a variable, such that it has global scope.&lt;br /&gt;
* return : Returns (the result of the expression on the right) from the enclosing &#039;script block&#039; - usually a function or the main script, but may also be a try or catch block, an Eval string or an Import file.&lt;br /&gt;
* try : Starts the try part of a &amp;lt;tt&amp;gt;try..catch&amp;lt;/tt&amp;gt; block. See [[Control structures]] for details.&lt;br /&gt;
* catch : Starts the catch part of a &amp;lt;tt&amp;gt;try..catch&amp;lt;/tt&amp;gt; block. See [[Control structures]] for details.&lt;br /&gt;
&lt;br /&gt;
The following keyword is a special [[#Identifiers|identifier]] (ie variable):&lt;br /&gt;
&lt;br /&gt;
* last : The special &#039;&#039;last&#039;&#039; variable available on any scope for implicit assignment (see below in [[#Expressions and Statements|Expressions and Statements]] for details).&lt;br /&gt;
&lt;br /&gt;
The following keywords are special [[#Literals|literals]] (ie constants):&lt;br /&gt;
&lt;br /&gt;
* true : Boolean constant denoting a positive truth value (a true statement).&lt;br /&gt;
* false : Boolean constant denoting a negative truth value (a false statement).&lt;br /&gt;
* yes : Same as true.&lt;br /&gt;
* no : Same as false.&lt;br /&gt;
&lt;br /&gt;
The following keywords are used only inside arguments lists of function declarations to declare the &#039;&#039;type&#039;&#039; of arguments:&lt;br /&gt;
&lt;br /&gt;
* clip : The function argument following the keyword is a video clip.&lt;br /&gt;
* int : The function argument following the keyword is an integer.&lt;br /&gt;
* float : The function argument following the keyword is a floating point number.&lt;br /&gt;
* string : The function argument following the keyword is a character string.&lt;br /&gt;
* bool : The function argument following the keyword is a boolean (true/false) variable.&lt;br /&gt;
* val : The function argument following the keyword can be of &#039;&#039;&#039;any&#039;&#039;&#039; type (ie any of the above types).&lt;br /&gt;
&lt;br /&gt;
=== Identifiers ===&lt;br /&gt;
&lt;br /&gt;
Identifiers, as the term suggests, are specific and unique names that you use in your script to refer to distinct entities. In AviSynth language identifiers are used to &#039;&#039;name&#039;&#039; the following types of entities:&lt;br /&gt;
&lt;br /&gt;
* [[Script_variables|Variables]] : A variable is a symbolic placeholder for a value that can be read and changed (as a result of an assignment) many times during script execution.&lt;br /&gt;
* Functions : A function is a piece of code that performs a specific computation and returns its result to the caller.&lt;br /&gt;
&lt;br /&gt;
Thus, whenever you need in your script to refer to a variable or function, either [[Internal_functions|built-in]] or [[User_defined_script_functions|user-defined]] you have to use an identifier. Bear in mind that since AviSynth &#039;&#039;ignores case&#039;&#039;, your identifiers should be unique in a  &#039;&#039;&#039;case-insensitive&#039;&#039;&#039; manner. &lt;br /&gt;
&lt;br /&gt;
For example, the following is probably an error:&lt;br /&gt;
&lt;br /&gt;
 MyClip = [[AviSource]](&amp;quot;clip1.avi&amp;quot;)&lt;br /&gt;
 myclip = AviSource(&amp;quot;clip2.avi&amp;quot;)    # oops! these two lines assign to the *same* variable&lt;br /&gt;
&lt;br /&gt;
while this is correct:&lt;br /&gt;
&lt;br /&gt;
 MyClip = AviSource(&amp;quot;clip1.avi&amp;quot;)&lt;br /&gt;
 YourClip = AviSource(&amp;quot;clip2.avi&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Literals ===&lt;br /&gt;
&lt;br /&gt;
Literals are all the constant (ie specific) values that you use in your scripts. For instance, all the tokens that appear at the right side of the assignment operator (the &amp;quot;=&amp;quot; character) in the examples below are literals:&lt;br /&gt;
&lt;br /&gt;
 a_num = 123&lt;br /&gt;
 another_num = 2.456&lt;br /&gt;
&lt;br /&gt;
 a_string = &amp;quot;this is a string literal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 another_string = &amp;quot;&amp;quot;&amp;quot;this is a multiline&lt;br /&gt;
        string literal. Note that the 2nd line has leading spaces (which are included)&lt;br /&gt;
 while this line has not. Also newlines are included in this type&lt;br /&gt;
        of strings&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 a_boolean = true&lt;br /&gt;
&lt;br /&gt;
As you can see, literals can be of any type (except clips; currently AviSynth does not have clip-type literals). The thing that differentiates them from identifiers is that they are not names that hold a value but bare values. &lt;br /&gt;
&lt;br /&gt;
=== Punctuation ===&lt;br /&gt;
&lt;br /&gt;
As said before, this generic term comprises all tokens with specific, standard meaning for the AviSynth language that are too short to be considered keywords. The tokens that are bundled under this catch-all category are:&lt;br /&gt;
&lt;br /&gt;
* [[Operators|operators]]: Operators apply an operation to one or more entities (and allow to retrieve the result of the operation); this is the reason that they are named that way. &lt;br /&gt;
: In essence operators are mini-functions that are defined in the script grammar with a more user-friendly syntax (for instance, instead of calling &amp;lt;tt&amp;gt;Add(a, b)&amp;lt;/tt&amp;gt; it is easier to write &amp;lt;tt&amp;gt;a + b&amp;lt;/tt&amp;gt;). &lt;br /&gt;
: Due to their significance in the AviSynth language operators are documented in a [[Operators|separate page]]. They are just listed here for completeness:&lt;br /&gt;
:* Assignment: =&lt;br /&gt;
:* Sign and common math operations: + , - , * , / , % , ++ (the last is for clips only)&lt;br /&gt;
:* Comparisons: ==, != , &amp;lt;&amp;gt; , &amp;lt; , &amp;gt; , &amp;lt;= , &amp;gt;= &lt;br /&gt;
:* Boolean operations: ! , &amp;amp;&amp;amp; , || &lt;br /&gt;
:* Ternary operation (if...else): ?:&lt;br /&gt;
&lt;br /&gt;
* Grouping / ordering tokens. These include:&lt;br /&gt;
:* The comma character [&#039;&#039;&#039;,&#039;&#039;&#039;]: For separating arguments in function argument lists only.&lt;br /&gt;
:* The dot character [&#039;&#039;&#039;.&#039;&#039;&#039;]: When successive calls to functions are chained together with the use of the OOP notation.&lt;br /&gt;
:* The parenthesis, opening and closing [&#039;&#039;&#039;()&#039;&#039;&#039;]: For grouping expressions into a single unit. Also for grouping arguments of a function declaration or call.&lt;br /&gt;
:* The (curly) brackets [&#039;&#039;&#039;{}&#039;&#039;&#039;]: For grouping multiple statements in a single &#039;&#039;block&#039;&#039; of code (currently: function bodies and &amp;lt;tt&amp;gt;try...catch&amp;lt;/tt&amp;gt; blocks only).&lt;br /&gt;
&lt;br /&gt;
== Expressions and Statements ==&lt;br /&gt;
&lt;br /&gt;
The third layer of grammar rules - after whitespace has been handled and tokens have been identified and distributed to the available categories (keywords, identifiers, etc.) - concerns the grouping of tokens in higher-level structures of the grammar: expressions and statements. A little terminology is necessary at this point to clarify the difference between them.&lt;br /&gt;
&lt;br /&gt;
* Expressions are groupings of tokens that perform a computation and return a value. They form a distinct part of either a larger enclosing expression or a statement.&lt;br /&gt;
* Statements are the smallest standalone element of an AviSynth script; in other words a statement is a single unit of script code (in the case of AviSynth language, this is typically a line of script code).&lt;br /&gt;
&lt;br /&gt;
Having made this distinction, lets see each one in more detail at the sections that follow.&lt;br /&gt;
&lt;br /&gt;
=== Expressions ===&lt;br /&gt;
&lt;br /&gt;
Expressions are the first step in the creation of the higher-level grammar constructs. They combine tokens in order to &#039;&#039;compute a new value&#039;&#039; from old ones and deliver this new value to either a surrounding expression or directly to an even higher-level construct, ie a statement. &lt;br /&gt;
&lt;br /&gt;
A few examples will help to fully understand the concepts presented above:&lt;br /&gt;
&lt;br /&gt;
 # 10 is a literal; &lt;br /&gt;
 # it is also an expression; a grouping can have just 1 element&lt;br /&gt;
 a = 10&lt;br /&gt;
 &lt;br /&gt;
 # a + 7 is an expression; so is (a + 7) / 5&lt;br /&gt;
 b = (a + 7) / 5&lt;br /&gt;
 &lt;br /&gt;
 # b &amp;gt; 0, 12, 25 are expressions (see 1st line); &lt;br /&gt;
 # [b &amp;gt; 0 ? 12 : 25] is also an expression&lt;br /&gt;
 c = b &amp;gt; 0 ? 12 : 25&lt;br /&gt;
 &lt;br /&gt;
 # BlankClip(...) below is an expression; &lt;br /&gt;
 # so is Trim(...)&lt;br /&gt;
 [[Trim]]([[BlankClip]](width=b, height=c, pixel_type=&amp;quot;[[RGB32]]&amp;quot;), 0, a)&lt;br /&gt;
 &lt;br /&gt;
 # all the above lines of code are statements&lt;br /&gt;
&lt;br /&gt;
Most of the time the result of an expression will be a video clip; however an expression&#039;s result can be of any type supported by the scripting language (clip, int, float, bool, string) and this is how utility functions such as [[Internal_functions|internal script functions]] operate.&lt;br /&gt;
&lt;br /&gt;
Combining all information presented above, we can now see that an AviSynth &#039;&#039;expression&#039;&#039; typically has one of these forms (with square brackets, ([]), we enclose optional elements, with the vertical bar character, (|), we separate alternatives, with the pound character, (#), we enclose comments): &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Literal&#039;&#039;, ie:&lt;br /&gt;
 numeric_constant&lt;br /&gt;
 | string_constant&lt;br /&gt;
 | bool_constant&lt;br /&gt;
&lt;br /&gt;
The value of the &#039;&#039;expression&#039;&#039; is the value of the constant.  &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Identifier&#039;&#039;, ie:&lt;br /&gt;
 variable_name &lt;br /&gt;
 | [[Clip_properties|clip_property]]&lt;br /&gt;
 | function_name                                  # without (args) #&lt;br /&gt;
&lt;br /&gt;
The value of the expression is the value returned by [[Clip_properties|clip properties]] or contained inside [[Script_variables|script variables]] (which must have been previously initialized).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Expression&#039;&#039;, ie:&lt;br /&gt;
 [ + | - | ! ] expression                         # unary operator expression #&lt;br /&gt;
 | ( expression )                                 # expression inside parentheses #&lt;br /&gt;
 | expression-1 operator expression-2             # binary operator expression #&lt;br /&gt;
 | bool_expression ? expression-1 : expression-2  # the ternary operator #&lt;br /&gt;
 | function_name[ ( args ) ]                      # function call #&lt;br /&gt;
 | expression.function_name[ ( args ) ]           # OOP notation #&lt;br /&gt;
&lt;br /&gt;
The value of the expression is either the result of the computation of the sub-expressions or the return value of the function_name call.  &lt;br /&gt;
&lt;br /&gt;
Looking a bit closer at the possible expression alternatives, the following notes can be made:&lt;br /&gt;
* The first three cases show that one can manipulate expressions using all of the usual arithmetic and logical [[operators]] (from C) as you&#039;d expect on ints, floats, vals, and bools.&lt;br /&gt;
:* Strings can be concatenated with &#039;+&#039;.  &lt;br /&gt;
:* The following operators are also defined on video clips: &lt;br /&gt;
   a + b   &lt;br /&gt;
   # is equivalent to:&lt;br /&gt;
   [[Splice|UnalignedSplice]](a, b) &lt;br /&gt;
:: and:&lt;br /&gt;
   a ++ b&lt;br /&gt;
   # is equivalent to:&lt;br /&gt;
   [[Splice|AlignedSplice]](a, b)&lt;br /&gt;
* The fourth case shows that one can execute code conditionally with the ternary operator.&lt;br /&gt;
* The fifth case shows that a function call is, from the grammar&#039;s perspective, a special type of expression.&lt;br /&gt;
* The sixth case shows &#039;&#039;&#039;OOP notation&#039;&#039;&#039;, an alternate syntax for chaining function calls, which is equivalent to:&lt;br /&gt;
   function_name(expression, args)&lt;br /&gt;
&lt;br /&gt;
=== Statements ===&lt;br /&gt;
&lt;br /&gt;
Statements are the smallest standalone element of an AviSynth script/ Statements do not compute a value; &#039;&#039;they are evaluated for their side effects&#039;&#039; (which are most of the time the assignment of a value computed by an expression to a [[Script_variables|variable]]).&lt;br /&gt;
&lt;br /&gt;
Statements are grouped together to form a script. An AviSynth script is simply the aggregate of a number of statements.&lt;br /&gt;
&lt;br /&gt;
All statements in AviSynth scripting language have one of these forms (with square brackets, ([]), we enclose optional elements, with the vertical bar character, (|), we separate alternatives, with the pound character, (#), we enclose comments): &lt;br /&gt;
&lt;br /&gt;
 [ global ] variable_identifier = expression&lt;br /&gt;
 | [ return ] expression&lt;br /&gt;
 | try_catch_block&lt;br /&gt;
 | function_declaration&lt;br /&gt;
&lt;br /&gt;
For each specific type of statement, the following notes can be made:&lt;br /&gt;
&lt;br /&gt;
* In the first case, &#039;&#039;expression&#039;&#039; is evaluated and the result is assigned to an identifier. The identifier can only identify a variable, either local or global (if the optional &amp;lt;tt&amp;gt;global&amp;lt;/tt&amp;gt; keyword is present). That is you can only assign to [[Script_variables|variables]]. Hence the name &#039;&#039;variable_identifier&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
* In the second case, &#039;&#039;expression&#039;&#039; is evaluated and the result is used as follows:&lt;br /&gt;
:* If the &amp;lt;tt&amp;gt;return&amp;lt;/tt&amp;gt; keyword is present or the statement is the last in its script block, it is used as the &amp;quot;return value&amp;quot; of the active script block - that is, either a function or the entire script. In the latter case, the return value is typically the video clip that will be seen by the application which opens the AVS file.&lt;br /&gt;
:* Otherwise, if the result is a clip, it is assigned to the special variable &amp;lt;tt&amp;gt;last&amp;lt;/tt&amp;gt;. If the result is not a clip, it is simply discarded. &lt;br /&gt;
&lt;br /&gt;
The last two cases are the only &#039;&#039;compound statements&#039;&#039; supported by AviSynth script language. They are presented in detail in the section that follows.&lt;br /&gt;
&lt;br /&gt;
=== Compound Statements ===&lt;br /&gt;
&lt;br /&gt;
A compound statement is a block of statements that is considered a single unit of code (ie statement). Thus a compound statement is a multiline statement. As we saw, AviSynth supports two types of compound statements: the &#039;&#039;try_catch_block&#039;&#039; and &#039;&#039;function_declaration&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;try_catch_block&#039;&#039; statement has the following form:&lt;br /&gt;
&lt;br /&gt;
 try {                         # the try part is always executed #&lt;br /&gt;
   [ statement                 # you can put as many statements as you want #&lt;br /&gt;
     ...&lt;br /&gt;
     statement ]               # an empty block is allowed (but not very useful!) #&lt;br /&gt;
 }&lt;br /&gt;
 catch (variable_identifier) { # catch part is executed only if an error occurs in try part #&lt;br /&gt;
   [ statement                 # you can put as many statements as you want #&lt;br /&gt;
     ... &lt;br /&gt;
     statement ]               # an empty block is allowed and causes the error to be ignored #&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
: It implements the &amp;lt;tt&amp;gt;try..catch&amp;lt;/tt&amp;gt; [[Control_structures|control structure]]. See there for details.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;function_declaration&#039;&#039; statement has the following form:&lt;br /&gt;
&lt;br /&gt;
 function identifier( [ argument_list ] )&lt;br /&gt;
 /* from v2.60 you can also put comments here */&lt;br /&gt;
 {&lt;br /&gt;
   [ statement                 # you can put as many statements as you want #&lt;br /&gt;
     ...&lt;br /&gt;
     statement ]               # an empty function is allowed (but not very useful!) #&lt;br /&gt;
 }&lt;br /&gt;
: It declares a [[User_defined_script_functions|user-defined function]] and makes it available for calling to the rest of script code, by using the &#039;&#039;identifier&#039;&#039; as the name of the function to be called.&lt;br /&gt;
&lt;br /&gt;
: The optional &#039;&#039;argument_list&#039;&#039; (yes, you can have functions without arguments) declares the type and name of function&#039;s arguments, as well as whether they are required or are optional. Optional arguments are also called &#039;&#039;named arguments&#039;&#039;, because you can supply them by name in a function call. It has the following form: &lt;br /&gt;
&lt;br /&gt;
 argument-1 , ... , argument-K , optional_argument-K+1 , ... , optional_argument-N&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;argument-i&#039;&#039; (i = 1 to K) and &#039;&#039;optional_argument-j&#039;&#039; (j = K + 1 to N) have the following forms (again, with square brackets, ([]), we enclose optional elements, with the vertical bar character, (|), we separate alternatives, with the pound character, (#), we enclose comments), respectively:&lt;br /&gt;
&lt;br /&gt;
 [ type_keyword ] identifier     # (normal) argument&lt;br /&gt;
 [ type_keyword ] &amp;quot;identifier&amp;quot;   # optional argument    &lt;br /&gt;
&lt;br /&gt;
As you can see, optional arguments distinguish from (normal) arguments in that they are enclosed in double quotation marks. In a function call you can refer to an optional argument as: &#039;&#039;identifier&#039;&#039; = value. You can also refer to in the normal way as if it was a normal, positional argument.&lt;br /&gt;
&lt;br /&gt;
Three more things to note are the following:&lt;br /&gt;
* Once you declare an optional argument, all subsequent arguments &#039;&#039;must&#039;&#039; also be declared optional.&lt;br /&gt;
* If you don&#039;t supply the type of the argument in the declaration (ie one of the type [[#Keywords|keywords]] presented above), the argument is of the &amp;lt;tt&amp;gt;val&amp;lt;/tt&amp;gt; type. That is it can be of any type. Consequently in the body of the function you have to query for its type, if you want your code to be robust.&lt;br /&gt;
* Function declarations can be written in any order and at any point in the script where a statement is allowed, independently of where the functions themselves are called. The presence of the declaration itself does not interfere with the order of script execution or its result. However, the usual convention is to group functions together at the start of the script.&lt;br /&gt;
&lt;br /&gt;
A few examples will help to clarify things:&lt;br /&gt;
&lt;br /&gt;
 function MyFunc1() {                 # a function with no arguments&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function MyFunc2(clip c, int n) {    # a function with two (normal) arguments&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function MyFunc3(clip c, string &amp;quot;text&amp;quot;, bool &amp;quot;invert&amp;quot;) {&lt;br /&gt;
     ...                              # a function with one argument and two optional arguments&lt;br /&gt;
 }                                    # if they are not supplied, it uses some default values&lt;br /&gt;
 &lt;br /&gt;
 function MyFunc4(clip &amp;quot;c&amp;quot;, bool &amp;quot;invert, int &amp;quot;n&amp;quot;) {&lt;br /&gt;
     ...                              # you can declare a function with all arguments optional&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function MyFunc5(clip clp, effect, &amp;quot;text&amp;quot;) {&lt;br /&gt;
     ...                              # a function with two normal and one optional argument&lt;br /&gt;
 }                                    # the last two arguments are of val (ie any) type&lt;br /&gt;
 ...&lt;br /&gt;
 f = MyFunc1()&lt;br /&gt;
 g = MyFunc2([[ColorBars]](), 6)      # all normal arguments *must* be supplied&lt;br /&gt;
 ...&lt;br /&gt;
 h = MyFunc3(g, &amp;quot;some text&amp;quot;, false)   # you can supply optional arguments as if they were normal&lt;br /&gt;
 i = MyFunc3(g)                       # but you can omit them also entirely&lt;br /&gt;
 j = MyFunc3(g, invert=true)          # or you can pass some of them by name&lt;br /&gt;
 ...&lt;br /&gt;
 k = MyFunc4()                        # MyFunc4 will use defaults for all its arguments&lt;br /&gt;
 l = MyFunc4(g, n=12)                 # you can supply some optional arguments as positional&lt;br /&gt;
 ...                                  # and some by name&lt;br /&gt;
 ...&lt;br /&gt;
 m = MyFunc5(g, 25, &amp;quot;test&amp;quot;)           # you can pass any type in the last two arguments of MyFunc5&lt;br /&gt;
 n = MyFunc5(g, &amp;quot;dissolve&amp;quot;, text=m)   # this can be both flexible *AND* dangerous if you don&#039;t check&lt;br /&gt;
 o = MyFunc5(g, g)                    # the type of the arguments; you can of course omit optional ones&lt;br /&gt;
&lt;br /&gt;
== Closing Remarks ==&lt;br /&gt;
&lt;br /&gt;
The set of rules for identifying and grouping tokens into higher-level structures (ie the AviSynth Grammar) ends with statements. An AviSynth script is simply the aggregate of a number of statements. In it you place as many statements as required to do the job. The grammar does not care how you do so. However, there are a couple of things that are worth noting here to make developing scripts easier:&lt;br /&gt;
&lt;br /&gt;
* The return value of the entire script is either (cf. the second case of [[#Statements|Statements]] section above):&lt;br /&gt;
:* The result of a &amp;lt;tt&amp;gt;return expression&amp;lt;/tt&amp;gt; statement anywhere in the main script block (ie not in a function body or inside a &amp;lt;tt&amp;gt;try...catch&amp;lt;/tt&amp;gt; block); all statements below that one will be ignored. As a shorthand, a bare expression as the final statement is treated as if the keyword &#039;&#039;&#039;return&#039;&#039;&#039; was present.&lt;br /&gt;
:* If there is no (explicit or implicit) return, a void value (ie a value of the &#039;undefined&#039; type) is returned. For example, this will happen if the last statement is an assignment.&lt;br /&gt;
&lt;br /&gt;
* AviSynth provides a mechanism to include other scripts inside the current script block: the [[Import]] function. The result of calling Import is the same as if you have typed the entire imported script text at the point of the function call. &lt;br /&gt;
&lt;br /&gt;
* Making self-contained scripts and using [[Import]] to include them in you scripts is a way to organise and &#039;&#039;reuse&#039;&#039; your code (for example, your favorite [[User_defined_script_functions|used-defined functions]]). &lt;br /&gt;
&lt;br /&gt;
== The Full Avisynth Grammar - For Language Lawyers ==&lt;br /&gt;
&lt;br /&gt;
For those readers that prefer a formal definition of the AviSynth script language&#039;s grammar, there is one available (though &#039;&#039;&#039;not&#039;&#039;&#039; &amp;quot;officially-endorsed&amp;quot; at the moment) in [[Formal_AviSynth_grammar|Extended Backus-Naur form]] (or EBNF for short).&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Reference]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Histogram&amp;diff=606</id>
		<title>Histogram</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Histogram&amp;diff=606"/>
		<updated>2011-04-01T12:03:09Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Luma mode */ planar mode -&amp;gt; Available in planar and YUY2 modes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:FuncDef|Histogram(clip &#039;&#039;clip&#039;&#039; [, string &#039;&#039;mode&#039;&#039;] [, float &#039;&#039;factor&#039;&#039;])}}&lt;br /&gt;
&lt;br /&gt;
Adds a luminance histogram to the right side of the clip.&lt;br /&gt;
&lt;br /&gt;
Starting from AviSynth &#039;&#039;&#039;v2.50&#039;&#039;&#039; this filter will also show valid and invalid colors in [[YUV]] mode. Invalid values (below 16 and above 235) will be colored brown/yellow-ish.&lt;br /&gt;
&lt;br /&gt;
Starting in &#039;&#039;&#039;v2.53&#039;&#039;&#039; an optional mode parameter has been added to show additional information of a clip. Mode can be &amp;quot;classic&amp;quot; (default old mode), &amp;quot;levels&amp;quot;, &amp;quot;color&amp;quot;, &amp;quot;luma&amp;quot; (&#039;&#039;&#039;v2.54&#039;&#039;&#039;), &amp;quot;stereo&amp;quot; (&#039;&#039;&#039;v2.54&#039;&#039;&#039;), &amp;quot;stereooverlay&amp;quot; (&#039;&#039;&#039;v2.54&#039;&#039;&#039;), &amp;quot;audiolevels&amp;quot; (&#039;&#039;&#039;v2.58&#039;&#039;&#039;), &amp;quot;color2&amp;quot; (&#039;&#039;&#039;v2.58&#039;&#039;&#039;) and &amp;quot;stereoY8&amp;quot; (&#039;&#039;&#039;v2.60&#039;&#039;&#039;). Since &#039;&#039;&#039;v2.60&#039;&#039;&#039; an optional factor parameter is added which can be used for the mode &amp;quot;levels&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Classic mode ===&lt;br /&gt;
&lt;br /&gt;
[[Image:histogram_classic.jpg]]&lt;br /&gt;
&lt;br /&gt;
This will add a per-line luminance graph (which is actually called a Waveform Monitor) on the right side of the video. the left side of the graph represents luma = 0 and the right side represents luma = 255. The non-valid CCIR-601 ranges are shown in a brown/yellow-ish color, and a greenish line represents Y = 128.&lt;br /&gt;
&lt;br /&gt;
Available in YUV mode.&lt;br /&gt;
&lt;br /&gt;
=== Levels mode ===&lt;br /&gt;
&lt;br /&gt;
[[Image:histogram_modelevels.jpg]]&lt;br /&gt;
&lt;br /&gt;
This mode will display three [[Levels|level]]-graphs on the right side of the video frame (which are called Histograms). This will show the distribution of the Y, U and V components in the current frame.&lt;br /&gt;
&lt;br /&gt;
The top graph displays the luma (Y) distribution of the frame, where the left side represents Y = 0 and the right side represents Y = 255. The valid CCIR601 range has been indicated by a slightly different color and Y = 128 has been marked with a dotted line. The vertical axis shows the number of pixels for a given luma (Y) value. The middle graph displays the U component, and the bottom graph displays the V component.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;factor&amp;quot; option (100.0 by default) specifies the way how the graphs are displayed. It is specified as percentage of the total population (that is number of luma or chroma pixels in a frame). For example, HistoGram(&amp;quot;Levels&amp;quot;, 1.5625) will achieve a 1/64th cap.&lt;br /&gt;
&lt;br /&gt;
Available in all planar modes, except [[Y8]].&lt;br /&gt;
&lt;br /&gt;
=== Color mode ===&lt;br /&gt;
&lt;br /&gt;
[[Image:histogram_modecolor.jpg]]&lt;br /&gt;
&lt;br /&gt;
This mode will display the chroma values (U/V color placement) in a two dimensional graph (which is called a vectorscope) on the right side of the video frame. It can be used to read of the hue and saturation of a clip. At the same time it is a histogram. The whiter a pixel in the vectorscope, the more pixels of the input clip correspond to that pixel (that is the more pixels have this chroma value).&lt;br /&gt;
&lt;br /&gt;
The U component is displayed on the horizontal (X) axis, with the leftmost side being U = 0 and the rightmost side being U = 255. The V component is displayed on the vertical (Y) axis, with the top representing V = 0 and the bottom representing V = 255.&lt;br /&gt;
&lt;br /&gt;
The position of a white pixel in the graph corresponds to the chroma value of a pixel of the input clip. So the graph can be used to read of the hue (color flavor) and the saturation (the dominance of the hue in the color). As the hue of a color changes, it moves around the square. At the center of the square, the saturation is zero, which means that the corresponding pixel has no color. If you increase the amount of a specific color, while leaving the other colors unchanged, the saturation increases, and you move towards the edge of the square.&lt;br /&gt;
&lt;br /&gt;
Available in all planar modes except Y8.&lt;br /&gt;
&lt;br /&gt;
=== Color2 mode ===&lt;br /&gt;
&lt;br /&gt;
[[Image:histogram_modecolor2.jpg]]&lt;br /&gt;
&lt;br /&gt;
This mode will display the pixels in a two dimensional graph (which is called a vectorscope) on the right side of the video frame. It can be used to read of the hue and saturation of a clip.&lt;br /&gt;
&lt;br /&gt;
The U component is displayed on the horizontal (X) axis, with the leftmost side being U = 0 and the rightmost side being U = 255. The V component is displayed on the vertical (Y) axis, with the top representing V = 0 and the bottom representing V = 255. The grey square denotes the valid CCIR-601 range. &lt;br /&gt;
&lt;br /&gt;
The position of a pixel in the graph corresponds to the chroma value of a pixel of the input clip. So the graph can be used to read of the hue (color flavor) and the saturation (the dominance of the hue in the color). As the hue of a color changes, it moves around the circle. At the center of the circle, the saturation is zero, which means that the corresponding pixel has no color. If you increase the amount of a specific color, while leaving the other colors unchanged, the saturation increases, and you move towards the edge of the circle. A color wheel is plotted and divided into six hues (red, yellow, green, cyan, blue and magenta) to help you reading of the hue values. Also every 15 degrees a white dot is plotted.&lt;br /&gt;
&lt;br /&gt;
At U=255, V=128 the hue is zero (which corresponds to blue) and the saturation is maximal, that is, sqrt( (U-128)^2 + (V-128)^2 ) = 127. When turning clock-wise, say 90 degrees, the chroma is given by U=128, V=255 (which corresponds to red). Keeping the hue constant and decreasing the saturation, means that we move from the circle to the center of the vectorscope. Thus the color flavor remains the same (namely red), only it changes slowly to [[GreyScale|greyscale]].  Etc ...&lt;br /&gt;
&lt;br /&gt;
Available in all planar modes except Y8. &lt;br /&gt;
&lt;br /&gt;
=== Luma mode ===&lt;br /&gt;
&lt;br /&gt;
[[Image:histogram_modeluma.jpg]]&lt;br /&gt;
&lt;br /&gt;
This mode will [[Amplify|amplify]] luminance, and display very small luminance variations. This is good for detecting blocking and noise, and can be helpful at adjusting [[Internal_filters|filter]] parameters. In this mode a 1 pixel luminance difference will show as a 16 pixel luminance pixel, thus seriously enhancing small flaws. &lt;br /&gt;
&lt;br /&gt;
Available in planar and YUY2 modes.&lt;br /&gt;
&lt;br /&gt;
=== Stereo, StereoY8 and StereoOverlay mode ===&lt;br /&gt;
&lt;br /&gt;
[[Image:histogram_modestereo.gif]]&lt;br /&gt;
 &lt;br /&gt;
This mode shows a classic stereo graph, from the audio in the clip. Some may know these from recording studios. This can be used to see the left-right and phase distribution of the input signal. StereoOverlay will overlay the graph on top of the original. Each frame will contain only information from the current frame to the beginning of the next frame. The signal is linearly upsampled 8x, to provide clearer visuals. Stereo and StereoY8 won&#039;t overlay the graph on the video, but will just return the graph (in YV12 respectively Y8 format).&lt;br /&gt;
&lt;br /&gt;
This mode requires a stereo signal input and StereoOverlay input is planar only.&lt;br /&gt;
&lt;br /&gt;
=== Audiolevels mode ===&lt;br /&gt;
&lt;br /&gt;
[[Image:histogram_audiolevels.jpg]]&lt;br /&gt;
&lt;br /&gt;
This mode shows the audiolevels for each channel in decibels (multichannel is supported). More accurately it determines:&lt;br /&gt;
&lt;br /&gt;
* the root mean square value of the samples belonging to each frame (let&#039;s say n samples) and converts this value to decibels using the following formula:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;math&amp;gt; RMS = 20 \cdot log_{10}( 1/32768 \cdot \sqrt{ 1/n \cdot \sum_{j=1}^{n} sample(j)^{2}} ) &amp;lt;/math&amp;gt; # for each channel&lt;br /&gt;
&lt;br /&gt;
* the maximum volume of the samples belonging to each frame and converts this value to decibels using the following formula:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;math&amp;gt; max = 20 \cdot log_{10}(max_{j} (sample(j)) / 32768) &amp;lt;/math&amp;gt; # for each channel&lt;br /&gt;
&lt;br /&gt;
The bars corresponding to the root mean square value are green, and to the maximum are blue. The filter is available in planar mode and the audio is converted to 16 bit. Note that for 16 bit audio, the maximal volume could be&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;math&amp;gt; 20 \cdot log_{10}(32768/32768) = 0 \ dB &amp;lt;/math&amp;gt; (since 2^16/2 = 32768)&lt;br /&gt;
&lt;br /&gt;
and the minimal volume&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;math&amp;gt; 20 \cdot log_{10}(1/32768) = - 90.31 \ dB &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Changes ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| v2.60&lt;br /&gt;
| Added StereoY8 mode. Added factor option.&lt;br /&gt;
|-&lt;br /&gt;
| v2.58&lt;br /&gt;
| Added planar support. Color2 and Audiolevels modes added.&lt;br /&gt;
|-&lt;br /&gt;
| v2.56&lt;br /&gt;
| Added invalid colors in YUY2 mode.&lt;br /&gt;
|-&lt;br /&gt;
| v2.56&lt;br /&gt;
| Added dots to mode = &amp;quot;stereo&amp;quot; to show bias/offsets.&lt;br /&gt;
|-&lt;br /&gt;
| v2.53&lt;br /&gt;
| Added different modes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=Block_statements&amp;diff=741</id>
		<title>Block statements</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=Block_statements&amp;diff=741"/>
		<updated>2011-03-30T03:27:13Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* For..Next loop with access to variables in local scope */ succintly -&amp;gt; succinctly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
A first glance at Avisynth documentation leaves the impression that aside from function definitions, block statements are not possible in Avisynth script. However, there are specific features of the language allowing the construction of block statements that have remained unaltered to date and probably will remain so in the future since block statements are very useful in extending the capabilities of the script language.&lt;br /&gt;
&lt;br /&gt;
Indeed, in most programming and scripting languages, block statements are very useful tools for grouping together a set of operations that should be applied together under certain conditions. They are also useful in Avisynth scripts. &lt;br /&gt;
&lt;br /&gt;
Assume, for example, that after an initial processing of your input video file, you want to further process your input differently (for example, apply a different series of [[Internal_filters|filters]] or apply the same set of filters with different order) based on a certain condition calculated during the initial processing, which is coded at the value of Boolean variable &#039;&#039;cond&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Instead of making an ugly series of successive conditional assignments using the conditional (ternary) [[Operators|operator]], &amp;lt;tt&amp;gt;?:&amp;lt;/tt&amp;gt;, as in &#039;&#039;&#039;Example 1&#039;&#039;&#039; below (items in brackets are not needed if you use the implicit &#039;&#039;last&#039;&#039; variable to hold the result):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 1&#039;&#039;&#039;&lt;br /&gt;
 [result_1 = ]cond ? filter1_1 : filter2_1&lt;br /&gt;
 [result_2 = ]cond ? filter1_2 : filter2_2&lt;br /&gt;
 ...&lt;br /&gt;
 [result_n = ]cond ? filter1_n : filter2_n&lt;br /&gt;
&lt;br /&gt;
It would be nice to be able to construct two blocks of filter operations and branch in a single step, as in the (ideal) &#039;&#039;&#039;Example 2&#039;&#039;&#039; below:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 2&#039;&#039;&#039;&lt;br /&gt;
 [result = ] cond ? {&lt;br /&gt;
     filter1_1&lt;br /&gt;
     filter1_2&lt;br /&gt;
     ...&lt;br /&gt;
     filter1_n&lt;br /&gt;
 } : {&lt;br /&gt;
     filter2_1&lt;br /&gt;
     filter2_2&lt;br /&gt;
     ...&lt;br /&gt;
     filter2_n&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Something approaching this construction (and others) &#039;&#039;&#039;is&#039;&#039;&#039; possible; perhaps some constraints may apply, but you will nevertheless be capable of providing more powerful flow control to your scripts. The rest of this section will show you how to implement them using standard Avisynth constructs.&lt;br /&gt;
&lt;br /&gt;
(An alternative, and possibly more user-friendly, approach would be to use the external [http://forum.doom9.org/showthread.php?t=147846 GScript] plugin, which extends the Avisynth scripting language to provide multi-line conditionals (if-then-else blocks), &#039;while&#039; loops and &#039;for&#039; loops.)&lt;br /&gt;
&lt;br /&gt;
=== Features enabling construction of block statements ===&lt;br /&gt;
&lt;br /&gt;
The list below briefly presents the features making possible the creation of block statements in your script. Listed first are the more obvious ones, followed by those that are somewhat more esoteric and require a little digging inside the Avisynth documentation and experimenting with test cases to discover them.&lt;br /&gt;
&lt;br /&gt;
* globals (in particular, variables preceded by the &amp;quot;global&amp;quot; keyword) allow the communication of information between code blocks executing in different context.&lt;br /&gt;
 &lt;br /&gt;
* The conditional operator (condition ? expr_if_true : expr_if_false) can contain an arbitrary number of nested expressions, if grouped by parentheses.&lt;br /&gt;
 &lt;br /&gt;
* Strings can contain double quote (&amp;quot;) characters inside them if they are surrounded by three-double-quotes (&amp;quot;&amp;quot;&amp;quot;).&lt;br /&gt;
*: Thus, the following strings are valid in Avisynth script (note that the 2nd and 3rd ones could be lines in a script):&lt;br /&gt;
** &amp;quot;&amp;quot;&amp;quot;this is a string with &amp;quot; inside it&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
** &amp;quot;&amp;quot;&amp;quot;var = &amp;quot;a string value&amp;quot; &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
** &amp;quot;&amp;quot;&amp;quot;var = &amp;quot;a string value&amp;quot; # this is a comment&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
* There is a script function, [[Internal_functions/Control_functions|Eval()]], that allows the evaluation of strings containing arbitrary script expressions.&lt;br /&gt;
*: Thus, every expression that you can write in a script can be, if stored in a string, passed to Eval. &lt;br /&gt;
*: Eval returns the result of the evaluated expression, ie &#039;&#039;anything&#039;&#039; that can be constructed by such an expression (a clip, a number, a bool, a string).&lt;br /&gt;
*: The evaluation of the string is done in the same context as the call to Eval. Thus, if Eval is called at the script level, the expression is assumed to reference script-level variables or / and globals (globals are allowed everywhere). But if Eval is called inside a user-defined function then the expression is assumed to reference variables local to the function (ie arguments and any locally declared variable)&lt;br /&gt;
 &lt;br /&gt;
* There is a script function, [[Import]](), that allows the evaluation of arbitrary Avisynth scripts.&lt;br /&gt;
*: Thus, any script written in Avisynth script language can be evaluated by Import. Import returns the return value of the script. &lt;br /&gt;
*: Despite the common misbelief that this can only be a clip, it can actually be &#039;&#039;any&#039;&#039; type of variable (a clip, a number, a bool, a string).&lt;br /&gt;
*: Like Eval, the evaluation of the script is done in the same context as the call to Import.&lt;br /&gt;
*: Hence, as a side-effect of the script evaluation any functions and variables declared inside the imported script are accessible from the caller script, from the point of the Import call and afterwards.&lt;br /&gt;
&lt;br /&gt;
* Recursion (ie calling a function from inside that function) can be used for traversing elements of a collection. &lt;br /&gt;
*: Thus, for..next, do..while, do..until loops can be constructed by using recursion.&lt;br /&gt;
&lt;br /&gt;
* Multiline strings, ie strings that contain newlines (the CR/LF pair) inside them, are allowed by the script language.&lt;br /&gt;
&lt;br /&gt;
* Multiline strings are parsed by [[Internal_functions/Control_functions|Eval()]] as if they were scripts.&lt;br /&gt;
*: Thus, each line of a multiline string will be evaluated as if it was a line in a script. &lt;br /&gt;
*: Also, return statements inside the string are allowed (the value of their expression will be the return value of Eval), as well as comments, function calls and in general every feature of the script language.&lt;br /&gt;
&lt;br /&gt;
Consider the following &#039;&#039;&#039;Example 3&#039;&#039;&#039;, of a (useless) script that returns some black frames followed by some white frames:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 c = BlankClip().Trim(0,23)&lt;br /&gt;
 d = BlankClip(color=$ffffff).Trim(0,23)&lt;br /&gt;
 b = true&lt;br /&gt;
 dummy = b ? Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	 k = c       # here comments are allowed!&lt;br /&gt;
	 l = d&lt;br /&gt;
	 return k    # this will be stored in dummy&lt;br /&gt;
	 &amp;quot;&amp;quot;&amp;quot;) : Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	 k = d&lt;br /&gt;
	 l = c&lt;br /&gt;
	 return k    # this will be stored in dummy&lt;br /&gt;
	 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 # variables declared inside a multiline string&lt;br /&gt;
 # are available to the script after calling Eval&lt;br /&gt;
 return k + l&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variables &#039;&#039;k&#039;&#039;, &#039;&#039;l&#039;&#039; are not declared anywhere before the evaluation of the if..else block. However, since Eval evaluates the string at the script-level context, it is as if the statements inside the string were written at the script level. Therefore, after Eval() they are available to the script. A few other interesting things to note are the following:&lt;br /&gt;
&lt;br /&gt;
* The return statement at the end of the selected (by the value of &#039;&#039;b&#039;&#039;) string for evaluation is the value that will be returned to the &#039;&#039;dummy&#039;&#039; variable.&lt;br /&gt;
&lt;br /&gt;
* Contrary to the case of line continuation by backslashes, a multiline string allows comments everywhere that they would be allowed in a script.&lt;br /&gt;
&lt;br /&gt;
== Implementation Guide ==&lt;br /&gt;
&lt;br /&gt;
The features above can be used to construct block statements in various ways. The most common implementation cases are presented in this section, grouped by block statement type.&lt;br /&gt;
&lt;br /&gt;
=== The if..else block statement ===&lt;br /&gt;
&lt;br /&gt;
==== Using Eval() and three-double-quotes quoted strings ==== &lt;br /&gt;
&lt;br /&gt;
This is by far the more flexible implementation, since the flow of text approaches most the &amp;quot;natural&amp;quot; (ie the commonly used in other languages) way of branching code execution. &lt;br /&gt;
&lt;br /&gt;
Using the rather common case illustrated by &#039;&#039;&#039;Example 1&#039;&#039;&#039;, the solution would be (again items in square brackets are optional):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 [result = ] cond ? Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     filter1_1&lt;br /&gt;
     filter1_2&lt;br /&gt;
     ...&lt;br /&gt;
     filter1_n&lt;br /&gt;
   [ return {result of last filter} ]&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;) : Eval(&amp;quot;&amp;quot;&amp;quot; &lt;br /&gt;
     filter2_1&lt;br /&gt;
     filter2_2&lt;br /&gt;
     ...&lt;br /&gt;
     filter2_n&lt;br /&gt;
   [ return {result of last filter} ]&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
In short, you write the code blocks as if Avisynth script would support block statements and then enclose the blocks in three-double-quotes to make them multiline strings, wrap a call to [[Internal_functions/Control_functions|Eval]] around each string and finally assemble Eval calls into a conditional operator statement.&lt;br /&gt;
&lt;br /&gt;
The return statements at the end of each block are needed only if you want to assign a useful value to the &#039;&#039;result&#039;&#039; variable. If you simply want to execute the statements without returning a result, then you can omit the &#039;&#039;return&#039;&#039; statement at the end of each block. &lt;br /&gt;
&lt;br /&gt;
One important thing to note is that the implicit setting of &#039;&#039;last&#039;&#039; continues to work as normal inside the Eval block. If the result of Eval is assigned to a variable, &#039;&#039;last&#039;&#039; will not be updated for the final expression in the block (with or without &#039;&#039;return&#039;&#039;), but it will be (where appropriate) for other statements in the block.&lt;br /&gt;
&lt;br /&gt;
If the block statement produces a result you intend to use, it is clearer to enter a &#039;&#039;return {result}&#039;&#039; line as the last line of each block, but the keyword &#039;&#039;return&#039;&#039; is not strictly necessary.&lt;br /&gt;
&lt;br /&gt;
The following real-case examples illustrate the above:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 5&#039;&#039;&#039;&lt;br /&gt;
In this example, all results are assigned to script variables, so &#039;&#039;last&#039;&#039; is unchanged.&lt;br /&gt;
&lt;br /&gt;
 c = [[AviSource]](...)&lt;br /&gt;
 ...&lt;br /&gt;
 cond = {expr}&lt;br /&gt;
 ...&lt;br /&gt;
 cond ? Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     text = &amp;quot;single double quotes are allowed inside three-double-quotes&amp;quot;&lt;br /&gt;
     pos = FindStr(text, &amp;quot;llo&amp;quot;)   # comments also&lt;br /&gt;
     d = c.[[Subtitle]](LeftStr(text, pos - 1))&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;) : Eval(&amp;quot;&amp;quot;&amp;quot; &lt;br /&gt;
     text = &amp;quot;thus by using three-double-quotes you can write expressions like you do in a script&amp;quot;&lt;br /&gt;
     pos = FindStr(text, &amp;quot;tes&amp;quot;)&lt;br /&gt;
     d = c.SubTitle(MidStr(text, pos + StrLen(&amp;quot;tes&amp;quot;)))&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 return d&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 6&#039;&#039;&#039;&lt;br /&gt;
This example assigns a different clip to d depending on the [[Clip_properties|Framecount]] of a source clip.&lt;br /&gt;
&lt;br /&gt;
 a = AviSource(...)&lt;br /&gt;
 c = [[BlankClip]]().SubTitle(&amp;quot;a test case for an if..else block statement&amp;quot;)&lt;br /&gt;
 d = a.Framecount &amp;gt;= c.Framecount ? Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     a = a.[[BilinearResize]](c.Width, c.Height)&lt;br /&gt;
     c = c.Tweak(hue=120)&lt;br /&gt;
     return [[Overlay]](a, c, opacity=0.5)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;) : Eval(&amp;quot;&amp;quot;&amp;quot; &lt;br /&gt;
     c = c.BilinearResize(a.Width, a.Height)&lt;br /&gt;
     a = a.[[Tweak]](hue=120)&lt;br /&gt;
     return Overlay(c, a, opacity=0.5)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 return d&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 7&#039;&#039;&#039;&lt;br /&gt;
This example is a recode of Example 6 using implicit assignment to the &#039;&#039;last&#039;&#039; special variable. Since the result of the entire Eval() is not assigned to another variable, the implicit assignments to &#039;&#039;last&#039;&#039; on each line of the string (including the &#039;&#039;last line&#039;&#039; of the string) are preserved and thus the desired result is obtained.&lt;br /&gt;
&lt;br /&gt;
 c = BlankClip().SubTitle(&amp;quot;a test case for an if..else block statement&amp;quot;)&lt;br /&gt;
 AviSource(...)&lt;br /&gt;
 last.Framecount &amp;gt;= c.Framecount ? Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     BilinearResize(c.Width, c.Height)&lt;br /&gt;
     c = c.Tweak(hue=120)&lt;br /&gt;
     Overlay(last, c, opacity=0.5)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;) : Eval(&amp;quot;&amp;quot;&amp;quot; &lt;br /&gt;
     c = c.BilinearResize(last.Width, last.Height)&lt;br /&gt;
     Tweak(hue=120)&lt;br /&gt;
     Overlay(c, last, opacity=0.5)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The only disadvantage of the Eval approach is that coding errors inside the string blocks are masked by the [[Internal_functions/Control_functions|Eval()]] call, since the parser actually parses a &#039;&#039;&#039;single line&#039;&#039;&#039; of code:&lt;br /&gt;
&lt;br /&gt;
 [result = ] cond ? Eval(&amp;quot;&amp;quot;&amp;quot;block 1&amp;quot;&amp;quot;&amp;quot;) : Eval(&amp;quot;&amp;quot;&amp;quot;block 2&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Thus, any error(s) inside the blocks will be reported as a single error happening on the above line. You will not be pointed to the exact line of error as in normal script flow. Therefore, you will have to figure out where exactly the error occured, which can be a great debugging pain, especially if you write big blocks.&lt;br /&gt;
&lt;br /&gt;
==== Using separate scripts as blocks and the Import() function ====&lt;br /&gt;
&lt;br /&gt;
Using &#039;&#039;&#039;Example 1&#039;&#039;&#039; as above, the solution would be (again items in square brackets are optional):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 8&#039;&#039;&#039;&lt;br /&gt;
Code of script file &#039;&#039;block1.avs&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 filter1_1&lt;br /&gt;
 filter1_2&lt;br /&gt;
 ...&lt;br /&gt;
 filter1_n&lt;br /&gt;
&lt;br /&gt;
Code of script file &#039;&#039;block2.avs&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 filter2_1&lt;br /&gt;
 filter2_2&lt;br /&gt;
 ...&lt;br /&gt;
 filter2_n&lt;br /&gt;
&lt;br /&gt;
Code of main script where the conditional branch is desired:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 [result = ]cond ? Import(&amp;quot;block1.avs&amp;quot;) : Import(&amp;quot;block2.avs&amp;quot;)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
In short, you create separate scripts for each block and then conditionally import them at the main script. &lt;br /&gt;
&lt;br /&gt;
If you need to pass [[Script_variables|variables]] as &amp;quot;parameters&amp;quot; to the blocks, declare them in your main script and just reference them into the block scripts. The following example demonstrates this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 9&#039;&#039;&#039;&lt;br /&gt;
Code of script file &#039;&#039;block1.avs&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 filter1_1(..., param1, ...)&lt;br /&gt;
 filter1_2(..., param2, ...)&lt;br /&gt;
 ...&lt;br /&gt;
 filter1_n(..., param3, ...)&lt;br /&gt;
&lt;br /&gt;
Code of script file &#039;&#039;block2.avs&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 filter2_1(..., param1, ...)&lt;br /&gt;
 filter2_2(..., param2, ...)&lt;br /&gt;
 ...&lt;br /&gt;
 filter2_n(..., param3, ...)&lt;br /&gt;
&lt;br /&gt;
Code of main script where the conditional branch is desired:&lt;br /&gt;
&lt;br /&gt;
 # variables must be defined *before* importing the block script&lt;br /&gt;
 param1 = ...&lt;br /&gt;
 param2 = ...&lt;br /&gt;
 param3 = ...&lt;br /&gt;
 ...&lt;br /&gt;
 [result = ]cond ? Import(&amp;quot;block1.avs&amp;quot;) : Import(&amp;quot;block2.avs&amp;quot;)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Using [[Import]]() instead of [[Internal_functions/Control_functions|Eval()]] and three-double-quoted multiline strings has some disadvantages: &lt;br /&gt;
&lt;br /&gt;
* There is an administration overhead because instead of one file &#039;&#039;2k + 1&#039;&#039; files have to be maintained (&#039;&#039;k&#039;&#039; = the number of conditional branches in your script).&lt;br /&gt;
* The code has less clarity, in the sense that it does not visually appears as a block statement, neither the communication of parameters is apparent by inspection of the main script.&lt;br /&gt;
&lt;br /&gt;
On the other hand:&lt;br /&gt;
&lt;br /&gt;
* Debugging is not an issue; every error will be reported with accurate line information.&lt;br /&gt;
* You can reuse scripts that you frequently use and build more complex ones by simply importing ready-made components.&lt;br /&gt;
* For large-scale operations where few parameters have to be communicated it is usually a better approach.&lt;br /&gt;
&lt;br /&gt;
One useful general purpose application of this implementation is to prototype, test and debug a block conditional branch and then recode it (by adding the Eval() and three-double-quotes wrapper code and removing the [[Script_variables|global]] keyword before the parameter&#039;s declarations) so that a single script using multiline strings as blocks is created. This workaround compensates for the main disadvantage of the Eval() and three-double-quotes implementation.&lt;br /&gt;
&lt;br /&gt;
==== Using functions (one function for each block) ==== &lt;br /&gt;
&lt;br /&gt;
This is the most &amp;quot;loyal&amp;quot; to the Avisynth script&#039;s [[AviSynth_Syntax|syntax]] approach. Using &#039;&#039;&#039;Example 1&#039;&#039;&#039; as above, the solution would be (again items in square brackets are optional):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 10&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Function block_if_1()&lt;br /&gt;
 {&lt;br /&gt;
     filter1_1&lt;br /&gt;
     filter1_2&lt;br /&gt;
     ...&lt;br /&gt;
     filter1_n&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 Function block_else_1()&lt;br /&gt;
 {&lt;br /&gt;
     filter2_1&lt;br /&gt;
     filter2_2&lt;br /&gt;
     ...&lt;br /&gt;
     filter2_n&lt;br /&gt;
 }&lt;br /&gt;
 ...&lt;br /&gt;
 [result = ]cond ? block_if_1() : block_else_1()&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
In short, you create separate functions for each block and then conditionally call them at the branch point. &lt;br /&gt;
&lt;br /&gt;
If you need to pass variables as &amp;quot;parameters&amp;quot; to the blocks, either declare them &#039;&#039;global&#039;&#039; in your main script and just reference them into the functions or - better - use argument lists at the functions. The following example demonstrates this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 11&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Function block_if_1(arg1, arg2, arg3, ...)&lt;br /&gt;
 {&lt;br /&gt;
     filter1_1(..., arg1, ...)&lt;br /&gt;
     filter1_2(..., arg2, ...)&lt;br /&gt;
     ...&lt;br /&gt;
     filter1_n(..., arg3, ...)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 Function block_else_1(arg1, arg2, arg3, ...)&lt;br /&gt;
 {&lt;br /&gt;
     filter2_1(..., arg1, ...)&lt;br /&gt;
     filter2_2(..., arg2, ...)&lt;br /&gt;
     ...&lt;br /&gt;
     filter2_n(..., arg3, ...)&lt;br /&gt;
 }&lt;br /&gt;
 ...&lt;br /&gt;
 [result = ]cond \&lt;br /&gt;
     ? block_if_1(arg1, arg2, arg3, ...) \&lt;br /&gt;
     : block_else_1(arg1, arg2, arg3, ...)&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Compared to the other two implementations this one has the following disadvantages:&lt;br /&gt;
&lt;br /&gt;
* There is an extra overhead due to the need for supplying function headers and (typically) argument lists.&lt;br /&gt;
* It tends to &amp;quot;pollute&amp;quot; the global namespace, thus having the potential of strange errors due to name conflicts; use a clear naming scheme, as the suggested above. &lt;br /&gt;
&lt;br /&gt;
On the other hand:&lt;br /&gt;
&lt;br /&gt;
* It is &#039;&#039;&#039;portable&#039;&#039;&#039;; it does not depend on any type of hack or specific behavior to work. It is thus guaranteed to continue working in the long term.&lt;br /&gt;
* It does not raise any special debuging difficulties.&lt;br /&gt;
* It has coding clarity.&lt;br /&gt;
&lt;br /&gt;
=== The if..elif..else block statement === &lt;br /&gt;
&lt;br /&gt;
By nesting If..Else block expressions inside the conditional operator, you can create entire if..elseif...else conditional constructs of any level desired to accomodate more complex needs. &lt;br /&gt;
&lt;br /&gt;
A generic example for each if..else implementation presented above is following. Of course, any combination of the three above pure cases is possible.&lt;br /&gt;
&lt;br /&gt;
==== Using Eval() and three-double-quotes quoted strings ==== &lt;br /&gt;
&lt;br /&gt;
The solution would be (again items in square brackets are optional):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 12&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 [result = \]&lt;br /&gt;
     cond_1 ? Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         statement 1_1&lt;br /&gt;
         ...&lt;br /&gt;
         statement 1_n&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;) : [(] \ &lt;br /&gt;
     cond_2 ? Eval(&amp;quot;&amp;quot;&amp;quot; # inner a?b:c enclosed in parentheses for clarity (optional)&lt;br /&gt;
         statement 2_1&lt;br /&gt;
         ...           # since backslash line continuation is used between Eval blocks&lt;br /&gt;
         statement 2_n # place comments only inside the strings&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;) : [(] \ &lt;br /&gt;
     ...&lt;br /&gt;
     cond_n ? Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         statement n_1&lt;br /&gt;
         ...&lt;br /&gt;
         statement n_n&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;) \&lt;br /&gt;
     : Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         statement n+1_1&lt;br /&gt;
         ...&lt;br /&gt;
         statement n+1_n&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;)[...))]  # 1 closing parenthesis for Eval() + n-1 to balance the opening ones (if used)&lt;br /&gt;
&lt;br /&gt;
==== Using separate scripts as blocks and the Import() function ====&lt;br /&gt;
&lt;br /&gt;
The solution would be (again items in square brackets are optional):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 13&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 # here no comments are allowed; every line but the last must end with a \&lt;br /&gt;
 [result = \]&lt;br /&gt;
     cond_1 ? \&lt;br /&gt;
         Import(&amp;quot;block1.avs&amp;quot;) : [(] \&lt;br /&gt;
     cond_2 ? \&lt;br /&gt;
         Import(&amp;quot;block2.avs&amp;quot;) : [(] \&lt;br /&gt;
     ...&lt;br /&gt;
     cond_n ? \&lt;br /&gt;
         Import(&amp;quot;blockn.avs&amp;quot;) \&lt;br /&gt;
     : \&lt;br /&gt;
         Import(&amp;quot;block-else.avs&amp;quot;) \&lt;br /&gt;
     [)...))]  # n-1 closing parentheses to balance the opening ones (if used)&lt;br /&gt;
&lt;br /&gt;
==== Using functions (one function for each block) ==== &lt;br /&gt;
&lt;br /&gt;
The solution would be (again items in square brackets are optional):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 14&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 # here no comments are allowed; every line but the last must end with a \&lt;br /&gt;
 [result = \]&lt;br /&gt;
     cond_1 ? \&lt;br /&gt;
         function_block_1({arguments}) : [(] \&lt;br /&gt;
     cond_2 ? \&lt;br /&gt;
         function_block_2({arguments}) : [(] \&lt;br /&gt;
     ...&lt;br /&gt;
     cond_n ? \&lt;br /&gt;
         function_block_n({arguments}) \&lt;br /&gt;
     : \&lt;br /&gt;
         function_block_else({arguments}) \&lt;br /&gt;
     [)...))]  # n-1 closing parentheses to balance the opening ones (if used)&lt;br /&gt;
&lt;br /&gt;
=== The for..next block statement ===&lt;br /&gt;
&lt;br /&gt;
The problem here is to implement the &amp;lt;tt&amp;gt;for..next&amp;lt;/tt&amp;gt; loop in a way that allows accessing variables in the local scope, so that changes made in local scope variables inside the loop can be accessible by the caller when it is finished. This is the way that the &amp;lt;tt&amp;gt;for..next&amp;lt;/tt&amp;gt; loop works in most programming languages that provide it. In addition, a means for getting out of the loop before is finished (ie breaking out of the loop) should be available.&lt;br /&gt;
&lt;br /&gt;
There is of course the alternative to implement the &amp;lt;tt&amp;gt;for..next&amp;lt;/tt&amp;gt; loop in a way that does not allow access to local variables. This is easier in AviSynth, since then it can be implemented by a function; but it is also less useful. However in many cases it would be appropriate to use such a construct and thus it will be presented here.&lt;br /&gt;
&lt;br /&gt;
==== For..Next loop with access to variables in local scope ====&lt;br /&gt;
&lt;br /&gt;
# Use a &amp;lt;tt&amp;gt;ForNext(start, end, step, blocktext)&amp;lt;/tt&amp;gt; function to create a multiline string (a script) that will unroll the loop in a series of statements and then &lt;br /&gt;
# use Eval() to execute the script in the current scope. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;blocktext&amp;lt;/tt&amp;gt; is a script text, typically a multiline string in triple double quotes, that contains the instructions to be executed in each loop, along with special variables (say ${i} for the loop counter) that are textually replaced by the &amp;lt;tt&amp;gt;ForNext&amp;lt;/tt&amp;gt; function with the current value(s) in each loop. The [http://avslib.sourceforge.net/functions/s/strreplace.html StrReplace()] function is particularly suited for the replacement task.&lt;br /&gt;
&lt;br /&gt;
A little tweak is needed in order to implement the &amp;lt;tt&amp;gt;break&amp;lt;/tt&amp;gt; statement; the unrolled string must be constructed in such a way that when the break flag is set the rest of the code is skipped.&lt;br /&gt;
&lt;br /&gt;
The following proof-of-concept example demonstrates the procedure:&lt;br /&gt;
&lt;br /&gt;
 a = [[AviSource]](&amp;quot;c:\some.avi&amp;quot;)&lt;br /&gt;
 cnt = 12&lt;br /&gt;
 b = a.[[Trim]](0,-4) &lt;br /&gt;
 cond = false&lt;br /&gt;
 &lt;br /&gt;
 # here we would like to do the following&lt;br /&gt;
 # for (i = 0; i &amp;lt; 6; i++) {&lt;br /&gt;
 #    b = b + a.Trim(i*cnt, -4)&lt;br /&gt;
 #    cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
 #    if (cond)&lt;br /&gt;
 #        break&lt;br /&gt;
 # }&lt;br /&gt;
 &lt;br /&gt;
 return b&lt;br /&gt;
&lt;br /&gt;
In order to make this happen in AviSynth, our script with &amp;lt;tt&amp;gt;ForNext&amp;lt;/tt&amp;gt; would look like that:&lt;br /&gt;
&lt;br /&gt;
 a = [[AviSource]](&amp;quot;c:\some.avi&amp;quot;)&lt;br /&gt;
 cnt = 12&lt;br /&gt;
 b = a.[[Trim]](0,-4) &lt;br /&gt;
 block = ForNext(0, 5, 1, &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     b = b + a.Trim(${i}*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     ${break(cond)}&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 void = Eval(block)&lt;br /&gt;
 return b&lt;br /&gt;
&lt;br /&gt;
or more succinctly:&lt;br /&gt;
&lt;br /&gt;
 a = [[AviSource]](&amp;quot;c:\some.avi&amp;quot;)&lt;br /&gt;
 cnt = 12&lt;br /&gt;
 b = a.[[Trim]](0,-4) &lt;br /&gt;
 void = Eval(ForNext(0, 5, 1, &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     b = b + a.Trim(${i}*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     ${break(cond)}&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;))&lt;br /&gt;
 return b&lt;br /&gt;
&lt;br /&gt;
and the output of ForNext with the above arguments should be something like this (the only problem is that string literals cannot be typed inside the block text):&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 __break = false&lt;br /&gt;
 dummy = __break ? NOP : Eval(&amp;quot;&lt;br /&gt;
     b = b + a.Trim(0*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     __break = cond ? true : false&lt;br /&gt;
 &amp;quot;)&lt;br /&gt;
 dummy = __break ? NOP : Eval(&amp;quot;&lt;br /&gt;
     b = b + a.Trim(1*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     __break = cond ? true : false&lt;br /&gt;
 &amp;quot;)&lt;br /&gt;
 dummy = __break ? NOP : Eval(&amp;quot;&lt;br /&gt;
     b = b + a.Trim(2*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     __break = cond ? true : false&lt;br /&gt;
 &amp;quot;)&lt;br /&gt;
 dummy = __break ? NOP : Eval(&amp;quot;&lt;br /&gt;
     b = b + a.Trim(3*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     __break = cond ? true : false&lt;br /&gt;
 &amp;quot;)&lt;br /&gt;
 dummy = __break ? NOP : Eval(&amp;quot;&lt;br /&gt;
     b = b + a.Trim(4*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     __break = cond ? true : false&lt;br /&gt;
 &amp;quot;)&lt;br /&gt;
 dummy = __break ? NOP : Eval(&amp;quot;&lt;br /&gt;
     b = b + a.Trim(5*cnt, -4)&lt;br /&gt;
     cond = b.Framecount() &amp;gt; 20 ? true : false&lt;br /&gt;
     __break = cond ? true : false&lt;br /&gt;
 &amp;quot;)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
TO BE CONTINUED...&lt;br /&gt;
&lt;br /&gt;
==== For..Next loop without access to variables in local scope ====&lt;br /&gt;
&lt;br /&gt;
If we don&#039;t care for accessing variables in the local scope, then the implementation is straightforward: &lt;br /&gt;
&lt;br /&gt;
# Create an [[Arrays|AVSLib array]] with the appropriate loop values.&lt;br /&gt;
# Define needed globals (for example a bool flag to return immediately from the block if true).&lt;br /&gt;
# Pack the block&#039;s code inside a function.&lt;br /&gt;
# Use an [http://avslib.sourceforge.net/tutorials/operators.html array operator] to execute the block for every loop value.&lt;br /&gt;
&lt;br /&gt;
TO BE CONTINUED...&lt;br /&gt;
&lt;br /&gt;
=== The do..while and do..until block statements ===&lt;br /&gt;
&lt;br /&gt;
TODO...&lt;br /&gt;
&lt;br /&gt;
== Deciding which implementation to use ==&lt;br /&gt;
&lt;br /&gt;
To be frank, there is no clear-cut answer to this question; it depends on the purpose that the script will serve, your coding abilities and habits, whether there are ready-made components available and what type are they (scripts, function libraries, etc.) and similar factors.&lt;br /&gt;
&lt;br /&gt;
Thus, only some generic guidelines will be presented here, grouped on the type of block statement&lt;br /&gt;
&lt;br /&gt;
=== The if..else and if..elif..else block statements ===&lt;br /&gt;
&lt;br /&gt;
* For short (up to say 10 lines) blocks, using Eval() and three-double-quotes quoted strings is generally the best solution; it is fast to code and presents a &amp;quot;natural&amp;quot; text flow to the reader (thus it is easy to comprehend).&lt;br /&gt;
&lt;br /&gt;
* For long blocks, using any of the other two implementations is generally better because it is easier to debug. &lt;br /&gt;
&lt;br /&gt;
* If the blocks pre-exist as independent scripts, using [[Import]]() is, obviously, preferred.&lt;br /&gt;
&lt;br /&gt;
* If building a function library, usually an implementation with functions will be easier to maintain and debug. However using [[Internal_functions/Control_functions|Eval]]() for small blocks is still an option to consider, to minimise the risk of namespace clashing with user&#039;s own functions.&lt;br /&gt;
&lt;br /&gt;
=== The for..next block statement ===&lt;br /&gt;
&lt;br /&gt;
TODO...&lt;br /&gt;
&lt;br /&gt;
=== The do..while and do..until block statements ===&lt;br /&gt;
&lt;br /&gt;
TODO...&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[1] http://www.avisynth.org/stickboy/ternary_eval.html&lt;br /&gt;
&lt;br /&gt;
[2] http://forum.doom9.org/showthread.php?t=102929&lt;br /&gt;
&lt;br /&gt;
[3] http://forum.doom9.org/showthread.php?p=732882#post732882&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[Scripting_reference|scripting reference]].&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Reference]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=User_functions&amp;diff=737</id>
		<title>User functions</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=User_functions&amp;diff=737"/>
		<updated>2011-03-22T02:29:02Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* The function body */ recipy -&amp;gt; recipe&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Having read the basics about [[User_defined_script_functions|user-defined script functions]], we can now step forward to examine in detail each function building block and identify rules for effective code development.&lt;br /&gt;
&lt;br /&gt;
== The function declaration (header) ==&lt;br /&gt;
&lt;br /&gt;
The function declaration consists of the keyword &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; followed by the function&#039;s name and a (possibly empty) list of parameters (arguments) enclosed in a pair of parentheses. Its purpose is to declare the function, that is both make its name visible to the running script and state the number and type of the arguments that it expects in subsequent invocations (function calls).&lt;br /&gt;
&lt;br /&gt;
Note that in AviSynth script language the declaration is also a definition; the function body (the code that is executed every time the function is called) must be supplied immediately after.   &lt;br /&gt;
&lt;br /&gt;
=== The function name ===&lt;br /&gt;
&lt;br /&gt;
To name your user function you can pick any name that appropriately describes the purpose of it. You should however avoid naming a function with an already widely used name; the AviSynth script language namespace is flat and thus any such name collision means you (and others) cannot use both functions together. Note also that function names (as everything in AviSynth script language) are case insensitive.&lt;br /&gt;
&lt;br /&gt;
=== The argument list ===&lt;br /&gt;
&lt;br /&gt;
Regarding the possible different kinds of arguments a function can declare, there are two orthogonal to each other categorical divisions:&lt;br /&gt;
# &#039;&#039;&#039;Typed&#039;&#039;&#039; vs &#039;&#039;&#039;variable&#039;&#039;&#039; arguments.&lt;br /&gt;
# &#039;&#039;&#039;Required&#039;&#039;&#039; vs &#039;&#039;&#039;optional&#039;&#039;&#039; arguments.&lt;br /&gt;
&lt;br /&gt;
==== Typed and variable (&amp;lt;tt&amp;gt;val&amp;lt;/tt&amp;gt;) arguments ====&lt;br /&gt;
&lt;br /&gt;
Typed arguments have a fixed type, decided by the specific type prefix (clip, int, float, bool, string) used during function declaration. Whenever a script is calling a function, AviSynth checks the supplied values for all typed arguments to ensure that they are of the proper type; if a discrepancy is found an error condition is triggered. Therefore, typed arguments can always be assumed of being the correct type (but not &#039;value&#039;!) inside the body of the function, simplifying coding.&lt;br /&gt;
&lt;br /&gt;
Variable arguments can accept &#039;&#039;any&#039;&#039; AviSynth type (clip, int, float, bool, string) when the function is called. You can declare a function argument as being variable with either of two ways:&lt;br /&gt;
* specify &amp;lt;tt&amp;gt;val&amp;lt;/tt&amp;gt; as the type of the argument, for example:&lt;br /&gt;
 function myfunc(clip c, val effect) { ... }&lt;br /&gt;
 function myfunc2(clip c, &#039;&#039;&#039;val &amp;quot;action&amp;quot;&#039;&#039;&#039;) { ... }&lt;br /&gt;
* do &#039;&#039;not&#039;&#039; specify a type for the argument, for example:&lt;br /&gt;
 function myfunc(clip c, effect) { ... }&lt;br /&gt;
 function myfunc2(clip c, &#039;&#039;&#039;&amp;quot;action&amp;quot;&#039;&#039;&#039;) { ... }&lt;br /&gt;
As a side effect, whenever you neglet to provide the type of an argument you will get a variable argument. Keep this in mind when you are debugging your scripts.&lt;br /&gt;
&lt;br /&gt;
Variable arguments can also be optional. To do so, you simply enclose the argument in double quotes, as for typed arguments.&lt;br /&gt;
&lt;br /&gt;
Variable arguments are useful in some situations because they provide flexibility and reduce the size of the argument list. However, they have the drawback that your function code has to check the type of each variable argument in order to ensure its validity for the intended operation (for typed arguments, the type check is performed by AviSynth). &lt;br /&gt;
&lt;br /&gt;
==== Required and optional arguments ====&lt;br /&gt;
&lt;br /&gt;
Required arguments must always be supplied when you are calling the function&lt;br /&gt;
&lt;br /&gt;
Optional arguments need not be supplied; they default (if the function is coded correctly) to reasonable initial values.&lt;br /&gt;
&lt;br /&gt;
== The function body ==&lt;br /&gt;
&lt;br /&gt;
The function body contains the bulk of the code that makes up your function. Since they strongly depend on the tasks-on-hand, the contents of the function body are quite arbitrary. However, there are some frequently occuring coding patterns that together form a more or less &amp;quot;standard&amp;quot; recipe for constructing the function body. These are in the usual order of appearance the following:&lt;br /&gt;
&lt;br /&gt;
* Argument validation and setup of local variables.&lt;br /&gt;
* Performance of intermediate computations.&lt;br /&gt;
* Return of final computation outcome to the caller of the function.&lt;br /&gt;
&lt;br /&gt;
We will now look closer on each one in the paragraphs that follow.&lt;br /&gt;
&lt;br /&gt;
=== Argument validation and setup of local variables ===&lt;br /&gt;
&lt;br /&gt;
=== Performance of intermediate computations ===&lt;br /&gt;
&lt;br /&gt;
=== Return of final computation outcome to the caller ===&lt;br /&gt;
&lt;br /&gt;
== Designing and developing user functions ==&lt;br /&gt;
&lt;br /&gt;
=== Defining goals ===&lt;br /&gt;
&lt;br /&gt;
=== Manipulating globals ===&lt;br /&gt;
how to use effectively and safely&lt;br /&gt;
&lt;br /&gt;
=== Recursion  ===&lt;br /&gt;
the only tool to act upon collections&lt;br /&gt;
&lt;br /&gt;
== Tuning performance ==&lt;br /&gt;
&lt;br /&gt;
== Design and coding-style considerations ==&lt;br /&gt;
&lt;br /&gt;
== Organising user defined functions ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[Scripting_reference|scripting reference]].&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Reference]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=The_script_execution_model/Scope_and_lifetime_of_variables&amp;diff=731</id>
		<title>The script execution model/Scope and lifetime of variables</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=The_script_execution_model/Scope_and_lifetime_of_variables&amp;diff=731"/>
		<updated>2011-03-21T07:19:02Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are essentially two scope types in the AviSynth script language:&lt;br /&gt;
&lt;br /&gt;
=== Global scope ===&lt;br /&gt;
&lt;br /&gt;
Every [[Script_variables|variable]] placed in this scope can be freely accessed from any nested block of script code at any level of nesting. That is, you can access a global from the top-level script block, from inside a user [[Script_functions|function]] at any level of recursion, as well as from inside [[Runtime_environment|runtime scripts]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
One important precondition for the above rule to apply is that &#039;&#039;you must not have a local variable with the same name as a global one&#039;&#039;. If you define a local variable with the same name as a global one, then you can no longer get (read) the value of the global variable in that specific local scope.&lt;br /&gt;
This is because AviSynth when given a variable&#039;s name it first searches in the current local scope; only if the search fails the global scope is searched. You can however set (write) the global&#039;s value, since in that case the use of the keyword &amp;lt;tt&amp;gt;global&amp;lt;/tt&amp;gt; distinguishes between a global and a local variable.&lt;br /&gt;
&lt;br /&gt;
=== Local scope ===&lt;br /&gt;
&lt;br /&gt;
Variables placed in this scope can be accessed (read or written) &#039;&#039;only&#039;&#039; from script code within that scope. This allows the isolation of nested local scopes and makes the creation and usage of script functions possible.&lt;br /&gt;
&lt;br /&gt;
The most important local scope is the top-level script scope (the one that is created just before the executing script is parsed and evaluated). All non-global variables defined inside the script-level source code reside there. All the other local scopes are created due to function calls and are nested inside this one.&lt;br /&gt;
&lt;br /&gt;
Nested local scopes result from function or filter calls (plugin writers can create nested scopes through &amp;lt;tt&amp;gt;env-&amp;gt;PushContext()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;env-&amp;gt;PopContext()&amp;lt;/tt&amp;gt;) and can be created at an arbitrary depth. For example, a recursive user function such as the one below:&lt;br /&gt;
&lt;br /&gt;
 function strfill(string s, int count) {&lt;br /&gt;
     return count &amp;gt; 0 ? s + strfill(s, count - 1) : &amp;quot;&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
will result during its evaluation in the creation and subsequent destruction of eleven nested local scopes if called with a value ten for its &amp;lt;tt&amp;gt;count&amp;lt;/tt&amp;gt; argument.&lt;br /&gt;
&lt;br /&gt;
=== Lifetime of variables ===&lt;br /&gt;
&lt;br /&gt;
The lifetime of variables defined at the global and top-level script (local) scope spans from the time of the definition (that is the first statement that assigns a value to them) to the end of frame serving and the unload of &amp;lt;tt&amp;gt;avisynth.dll&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The lifetime of variables defined at nested local scopes spans from the time of the definition in the nested local scope to the end of the nested local scope&#039;s lifetime. Since nested local scopes result from function / filter calls, the nested scope&#039;s lifetime is the lifetime of the function / filter call.&lt;br /&gt;
&lt;br /&gt;
=== A variables scope and lifetime example ===&lt;br /&gt;
&lt;br /&gt;
To clarify the statements of the previous section, the following example demonstrates the scope and lifetime of variables in a moderately complex AviSynth script that also includes runtime scripts.&lt;br /&gt;
&lt;br /&gt;
What the script does is to divide a clip (after some processing tweaks) in 4 equal-sized regions and evaluate the average luma of each region per frame. If this is outside a range defined by two thresholds, the corresponding region is turned to all black (if below) or white (if above) for that frame.&lt;br /&gt;
&lt;br /&gt;
 function Quartile(clip c, int quartile) {&lt;br /&gt;
     [[Internal_functions/Control_functions|Assert]](quartile &amp;gt;= 0 &amp;amp;&amp;amp; quartile &amp;lt;= 3, &amp;quot;Invalid Quartile!&amp;quot;)&lt;br /&gt;
     hw = [[Internal_functions/Numeric_functions|Int]](c.[[Clip_properties|Width]]() / 2)&lt;br /&gt;
     hh = Int(c.[[Clip_properties|Height]]() / 2)&lt;br /&gt;
     return [[Internal_functions/Control_functions|Select]](quartile, \&lt;br /&gt;
         [[Crop]](c, 0, 0, hw, hh), Crop(c, hw, 0, hw, hh), \&lt;br /&gt;
         Crop(c, 0, hh, hw, hh), Crop(c, hw, hh, hw, hh))&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function bracket_luma(clip c, float th1, float th2) {&lt;br /&gt;
     Assert(0 &amp;lt;= th1 &amp;amp;&amp;amp; th1 &amp;lt; th2 &amp;amp;&amp;amp; th2 &amp;lt;= 255, &amp;quot;Invalid thresholds!&amp;quot;)&lt;br /&gt;
     script =  &amp;quot;th1 = &amp;quot; + [[Internal_functions/Conversion_functions|String]](th1) + Chr(13) + Chr(10) + \&lt;br /&gt;
         &amp;quot;th2 = &amp;quot; + String(th2) + &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         avl = [[Internal_functions/Runtime_functions|AverageLuma()]]&lt;br /&gt;
         return avl &amp;lt;= th1 ? last.[[BlankClip]]() : (avl &amp;gt;= th2 ? \&lt;br /&gt;
             last.BlankClip(color=color_white) : last)&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     return [[ScriptClip]](c, script)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 clp = [[AviSource]](&amp;quot;myclip.avi&amp;quot;)&lt;br /&gt;
 clp = [[Tweak]](clp, hue=20, sat=1.1)&lt;br /&gt;
 threshold1 = 12.0&lt;br /&gt;
 threshold2 = 78.0&lt;br /&gt;
 q0 = Quartile(clp, 0).bracket_luma(threshold1, threshold2)&lt;br /&gt;
 q1 = Quartile(clp, 1).bracket_luma(threshold1, threshold2)&lt;br /&gt;
 q2 = Quartile(clp, 2).bracket_luma(threshold1, threshold2)&lt;br /&gt;
 q3 = Quartile(clp, 3).bracket_luma(threshold1, threshold2)&lt;br /&gt;
 [[StackVertical]](StackHorizontal(q0, q1), [[StackHorizontal]](q2, q3))&lt;br /&gt;
 &lt;br /&gt;
The scope and lifetime of all variables in the example script is presented in the following timeline (the &amp;lt;tt&amp;gt;color_white&amp;lt;/tt&amp;gt; global is from the autoloaded .avsi that ships with AviSynth):&lt;br /&gt;
&lt;br /&gt;
 +-- scope --+------- parsing phase ----------------------&amp;gt;+----- frame serving phase -------&amp;gt;+&lt;br /&gt;
 |           |                                                                                |&lt;br /&gt;
 | global    |color_white - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&amp;gt;|&lt;br /&gt;
 +-----------+---------------------------------------------+----------------------------------|&lt;br /&gt;
 | local,    |clp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&amp;gt;|&lt;br /&gt;
 | top-level | threshold1,threshold2- - - - - - - - - - - - - - - - - - - - - - - - - - - - -&amp;gt;|&lt;br /&gt;
 |           |                            q0- -q1- -q2- -q3 - - - - - - - - - - - - - - - - -&amp;gt;|&lt;br /&gt;
 |           |                                             |th1,th2,avl - - - - - - - - - - -&amp;gt;|&lt;br /&gt;
 +-----------+---------------------------------------------+----------------------------------|&lt;br /&gt;
 | local,    |   c,  - - - -&amp;gt;|           |                |&lt;br /&gt;
 | Quartile  |   quartile, -&amp;gt;|           | repeated       |&lt;br /&gt;
 | function  |    hw,hh- - -&amp;gt;|           | three times,   |&lt;br /&gt;
 +-----------+--------------------------&amp;gt;| in immediate -&amp;gt;|&lt;br /&gt;
 | local,    |               |c, - - - -&amp;gt;| succession     |&lt;br /&gt;
 | bracket_l.|               |th1,th2, -&amp;gt;|                |&lt;br /&gt;
 | function  |               | script- -&amp;gt;|                |&lt;br /&gt;
 +-----------+---------------------------------------------+----------------------------------|&lt;br /&gt;
&lt;br /&gt;
=== Code-injecting language facilities and scopes ===&lt;br /&gt;
&lt;br /&gt;
There are certain language constructs (functions, filters and control structures) that allow the injection of code in the script, ie the execution of arbitrary sequences of AviSynth script language [[AviSynth_Syntax|statements]]. &lt;br /&gt;
&lt;br /&gt;
This is a &#039;&#039;very&#039;&#039; useful functionality that allows among other things dynamic code evaluation, the creation of [[Block_statements|block statements]] and [[Arrays|arrays]], the organisation of AviSynth code in libraries, etc. However, there are some subtle issues regarding variables&#039; scope and visibility that can lead to surprises if not fully understood. &lt;br /&gt;
&lt;br /&gt;
==== Import and Eval ====&lt;br /&gt;
&lt;br /&gt;
[[Import]]() and [[Internal_functions/Control_functions|Eval]]() evaluate the passed-in script source code in the context of the current local scope. &lt;br /&gt;
&lt;br /&gt;
This means that variables contained in the top-level scope of the imported script or in the code string passed to Eval() are created inside the current local scope and become available for read/write to the following script source code. For example:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. File &amp;quot;a.avs&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
 x = 12&lt;br /&gt;
 y = 24&lt;br /&gt;
 c = [[BlankClip]](pixel_type=&amp;quot;[[YV12]]&amp;quot;, color=color_orange, width=240, height=180)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. File &amp;quot;b.avs&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
 [[Import]](&amp;quot;a.avs&amp;quot;)&lt;br /&gt;
 [[AviSource]](&amp;quot;myvideo.avi&amp;quot;)&lt;br /&gt;
 [[Levels]](&#039;&#039;&#039;x&#039;&#039;&#039;, 1.0, 255, &#039;&#039;&#039;y&#039;&#039;&#039;, 242)&lt;br /&gt;
 [[Overlay]](&#039;&#039;&#039;c&#039;&#039;&#039;, x=last.Width-320, y=last.Height-240, mode=&amp;quot;chroma&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
In addition, the imported script or the code string passed to Eval() can use previously defined in that scope local variables (as well as globals, of course). For example (the use of multiline triply quoted strings makes easier the writing of [[Block_statements|block statements]]):&lt;br /&gt;
&lt;br /&gt;
 x = 5&lt;br /&gt;
 AviSource(&amp;quot;aclip.avi&amp;quot;)&lt;br /&gt;
 f = [[Clip_properties|Framecount]]()&lt;br /&gt;
 f &amp;lt; 100 ? [[Internal_functions/Control_functions|Eval]](&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     [[Trim]](x, f-2)&lt;br /&gt;
     x = 0&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;) : Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     Trim(x, 15*x + 30)&lt;br /&gt;
     x = 1&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 x == 0 ? [[Invert]]() : [[Subtitle]](String(last.Framecount))&lt;br /&gt;
&lt;br /&gt;
Especially the later is something that you must always keep in mind -mostly for [[Import]]() since the code is not immediately visible; only the filename shows up in the script- because it has the potential to introduce bugs by unexpected overriding of a variable&#039;s value.&lt;br /&gt;
&lt;br /&gt;
Consider, the following example:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. File &amp;quot;mylib.avsi&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
 function preset(int num) { # 0 to 3&lt;br /&gt;
     return [[Internal_functions/Control_functions|Select]](num, AviSource(&amp;quot;...&amp;quot;), AviSource(&amp;quot;...&amp;quot;), AviSource(&amp;quot;...&amp;quot;), AviSource(&amp;quot;...&amp;quot;))&lt;br /&gt;
 }&lt;br /&gt;
 global def_preset = preset(0)&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;2. File &amp;quot;myscript.avs&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
 global def_preset = [[AviSource]](&amp;quot;myfav.avi&amp;quot;)&lt;br /&gt;
 Import(&amp;quot;mylib.avsi&amp;quot;)&lt;br /&gt;
 [[Tweak]](def_preset, hue=20) # oops, using clip from mylib.avsi instead of myscript.avs!&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
The imported script changed a previously defined variable and the results will now be surprising (until of course the bug is discovered).&lt;br /&gt;
&lt;br /&gt;
However, this same feature has a number of interesting possibilities, for example:&lt;br /&gt;
&lt;br /&gt;
* You can define sub-scripts that communicate with the parent script through a defined set of variables.&lt;br /&gt;
* You can create libraries (AviSynth include files) that perform initialisation code based on &amp;quot;environment&amp;quot; variables (the ones you set in the parent script before importing) and / or return status information (through a variable that they set at the global or top-script level code)&lt;br /&gt;
* You can implement [[Block_statements|block statements]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; To test for the existence of input/output variables in the above scenarios try to read their value in a &amp;lt;tt&amp;gt;try..catch&amp;lt;/tt&amp;gt; block; else your script will die hard if for any reason they do not exist.&lt;br /&gt;
&lt;br /&gt;
==== Runtime scripts ====&lt;br /&gt;
&lt;br /&gt;
Local variables inside runtime filters&#039; scripts are &#039;&#039;&#039;always&#039;&#039;&#039; bound to the top-level script local scope; even if the filter calls were made inside a user function. This is because the parsing of runtime scripts is done &#039;&#039;after&#039;&#039; the parsing of the script, at the frame serving phase. At that point  in script execution, nested local scopes have already vanished and only the global and the top-level script local scopes survive.&lt;br /&gt;
&lt;br /&gt;
The same is true for the [[Runtime_environment|special variables]] set by the runtime filters (such as for example &amp;lt;tt&amp;gt;current_frame&amp;lt;/tt&amp;gt;); they are defined at the top-level script local scope.&lt;br /&gt;
&lt;br /&gt;
Some consequences of the above setup are the following:&lt;br /&gt;
&lt;br /&gt;
* You can use top-level script local variables inside the runtime scripts to pass information, just as is customary to do with global ones.&lt;br /&gt;
* You must be careful if you define local variables in your runtime scripts not to clash with local variables in other runtime scripts in the filter chain. This is also true for globals, but globals are typically used for inter-filter communication; use of locals is not so common and thus may be overlooked by script writers.&lt;br /&gt;
* Overriding a variable (either local or global) does not have an effect on the main script, because the evaluation of the main script is done at the parsing phase, before the execution of any runtime script.&lt;br /&gt;
* When examining the way that a variable will be modified by a chain of runtime scripts, you must remember that the evaluation of scripts is done from bottom to top, just like the fetching of frames.&lt;br /&gt;
&lt;br /&gt;
Consider the following example:&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;myclip.avi&amp;quot;)&lt;br /&gt;
 x = 5&lt;br /&gt;
 fc = Framecount()&lt;br /&gt;
 fc &amp;gt; 2x ? [[Trim]](x, fc - x) : Trim(0, fc - x)&lt;br /&gt;
 fc = Framecount()&lt;br /&gt;
 [[ScriptClip]](&amp;quot;&amp;quot;&amp;quot;[[Subtitle]](&amp;quot;and the value of x is : &amp;quot; + String(x))&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 FrameEvaluate(&amp;quot;x = (x % 3 == (fc - x - 1) % 3) ? x + 2 : x - 1&amp;quot;)&lt;br /&gt;
 [[FrameEvaluate]](&amp;quot;x = current_frame&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The assignment &amp;lt;tt&amp;gt;x = 5&amp;lt;/tt&amp;gt; at the main script is used to control trimming of the source clip. &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; is passed as argument in the [[Trim]] filter during the script&#039;s parsing phase. Thus the modifications by the runtime scripts that start at the frame serving phase have no effect on the values passed to Trim. &lt;br /&gt;
&lt;br /&gt;
By the time the first frame is fetched, &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; will have been overwritten by the &amp;lt;tt&amp;gt;x = current_frame&amp;lt;/tt&amp;gt; assignment in the last [[FrameEvaluate]] filter&#039;s runtime script. Thus its value in the script has no effect (in this particular case) on the results of the runtime filter&#039;s processing.&lt;br /&gt;
&lt;br /&gt;
Here, using &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; in all runtime filter scripts does not pose a naming clash problem. &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; is the variable used to communicate state information along the runtime filter chain. However, if we had needed a conditional assignment by frame number and we had accidentally used the following runtime script in place of the last FrameEvaluate line,&lt;br /&gt;
&lt;br /&gt;
 FrameEvaluate(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     fc = 12&lt;br /&gt;
     x = current_frame &amp;lt; fc ? current_frame : fc&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
then there would be a clash with the use of &amp;lt;tt&amp;gt;fc&amp;lt;/tt&amp;gt; in the previous line (the clips framecount would have been overwritten with an unrelated value) and the logic of our processing would be in error.&lt;br /&gt;
&lt;br /&gt;
Similarly, a &#039;&#039;later&#039;&#039; assignment to &amp;lt;tt&amp;gt;fc&amp;lt;/tt&amp;gt; in the &#039;&#039;main&#039;&#039; script would alter the value seen by the runtime script. The point to note is that the value in the run-time script is evaluated at a later point in time, which is after all statements in the main script have been evaluated.&lt;br /&gt;
&lt;br /&gt;
==== The try...catch block ====&lt;br /&gt;
&lt;br /&gt;
This may seem surprising at first, but the &amp;lt;tt&amp;gt;try...catch&amp;lt;/tt&amp;gt; block does inject code in the script (at the scope that contains it). If this code defines new variables, then those variables are available to the code in the section that follows the &amp;lt;tt&amp;gt;try...catch&amp;lt;/tt&amp;gt; block. More specifically, there are two possibilities:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;No error&#039;&#039; occurs inside the &amp;lt;tt&amp;gt;try{...}&amp;lt;/tt&amp;gt; section.&lt;br /&gt;
:# All statements of the code contained in the &amp;lt;tt&amp;gt;try{...}&amp;lt;/tt&amp;gt; section are evaluated and affect the script code that follows.&lt;br /&gt;
* An error &#039;&#039;does&#039;&#039; occur inside the &amp;lt;tt&amp;gt;try{...}&amp;lt;/tt&amp;gt; section.&lt;br /&gt;
:# Statements of the code contained in the &amp;lt;tt&amp;gt;try{...}&amp;lt;/tt&amp;gt; section up to the point of error are evaluated and affect the script code that follows. &lt;br /&gt;
:# All statements of the code contained in the &amp;lt;tt&amp;gt;catch{...}&amp;lt;/tt&amp;gt; section are evaluated and affect the script code that follows. &lt;br /&gt;
:# The variable that is used the &amp;lt;tt&amp;gt;catch{...}&amp;lt;/tt&amp;gt; section to store the error message becomes available to the script code that follows.&lt;br /&gt;
&lt;br /&gt;
The following example code excerpt clarifies the above:&lt;br /&gt;
&lt;br /&gt;
 a = ... # it is assumed that the (missing) code may result in a being either 1 or 0&lt;br /&gt;
 try {&lt;br /&gt;
     y = 3&lt;br /&gt;
     x = 6 / a  # if a == 0 this will lead to an error&lt;br /&gt;
     z = 12&lt;br /&gt;
 }&lt;br /&gt;
 catch (msg) {&lt;br /&gt;
     NOP &lt;br /&gt;
 }&lt;br /&gt;
 ...code that follows...&lt;br /&gt;
&lt;br /&gt;
Now, if &amp;lt;tt&amp;gt;a&amp;lt;/tt&amp;gt; is &#039;&#039;not&#039;&#039; zero at the point the &amp;lt;tt&amp;gt;try...catch&amp;lt;/tt&amp;gt; block is evaluated, then three new local variables in the current scope will be created (&amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;z&amp;lt;/tt&amp;gt;) and be available for use by the code that follows.&lt;br /&gt;
&lt;br /&gt;
If however, &amp;lt;tt&amp;gt;a&amp;lt;/tt&amp;gt; &#039;&#039;is&#039;&#039; zero, then from the three variables in the try section only &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; will be created; in addition, since the catch section will be evaluated, &amp;lt;tt&amp;gt;msg&amp;lt;/tt&amp;gt; will be created. Thus the variables available for use by the code that follows will be &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;msg&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to the [[The_script_execution_model|script execution model]]. &lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Reference]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=The_script_execution_model/Performance_considerations&amp;diff=735</id>
		<title>The script execution model/Performance considerations</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=The_script_execution_model/Performance_considerations&amp;diff=735"/>
		<updated>2011-03-21T03:56:36Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* What not to include in runtime scripts */    circmustances -&amp;gt; circumstance&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section presents some performance-related issues that originate from the way AviSynth scripts are executed; it also provides advice on how to optimise your scripts and AviSynth configuration so that your scripts are parsed and/or encoded faster.&lt;br /&gt;
&lt;br /&gt;
=== Plugin auto-loading ===&lt;br /&gt;
&lt;br /&gt;
An important thing to note is that auto-loading, although a convenient method to have all your favorite filters on hand, &#039;&#039;does&#039;&#039; incur a speed penalty. The penalty is twofold:&lt;br /&gt;
&lt;br /&gt;
# The loading, registering and unloading of plugins takes some time. The parsing of .avsi scripts also takes some time. This time, although small, is paid &#039;&#039;in every&#039;&#039; AviSynth script invocation.&lt;br /&gt;
# The registering of many functions and globals increases the size of internal AviSynth data structures, which in turn increases the seek time to locate a filter / variable during the parsing phase as well as during runtime script parsing.&lt;br /&gt;
&lt;br /&gt;
For small scripts and / or small number of auto-loading plugins the ease of use outweighs the above speed penalty (since there is also a speed penalty in writing a lot of [[LoadPlugin]] calls in every script that needs them). However if you regularly write large and complex scripts and have a large number of plugins / include scripts in your AviSynth plugin folder, you should consider a more granular approach to increase overall script parsing / encoding performance. &lt;br /&gt;
&lt;br /&gt;
For example, you could group [[LoadPlugin]] calls for related plugins in separate .avsi scripts and have a central .avsi script with a config function that loads different .avsi scripts depending on its arguments. Then place in the plugin folder only the central .avsi script and the bare-essential plugins that you use almost every time.&lt;br /&gt;
&lt;br /&gt;
=== Frame caching and the effect on splitting filter graph&#039;s paths ===&lt;br /&gt;
&lt;br /&gt;
In order to improve performance AviSynth places, transparently to script writers, a specialised Cache filter just after each filter. The purpose of the cache is to avoid the computationally expensive generation of a video frame that has recently been created; if the frame is in the cache then it is returned immediately, avoiding a possibly long chain of filter calls.&lt;br /&gt;
&lt;br /&gt;
The presence of the cache gives a speed and memory advantage to filter graphs that split processing paths &#039;&#039;as late as possible&#039;&#039;. In our [[# An example of a filter graph|filter graph example]] above, if instead of:&lt;br /&gt;
&lt;br /&gt;
 ov = AviSource(&amp;quot;clip2.avi&amp;quot;)&lt;br /&gt;
 ov1 = [[Lanczos4Resize]](ov, 280, 210)&lt;br /&gt;
 ov2 = ov1.[[Invert]]()&lt;br /&gt;
&lt;br /&gt;
we had used the following code:&lt;br /&gt;
&lt;br /&gt;
 ov = AviSource(&amp;quot;clip2.avi&amp;quot;)&lt;br /&gt;
 ov2 = ov&lt;br /&gt;
 ov1 = [[Lanczos4Resize]](ov, 280, 210)&lt;br /&gt;
 ov2 = ov2.Lanczos4Resize(280, 210).[[Invert]]()&lt;br /&gt;
&lt;br /&gt;
then the respective part of the filter graph would have been:&lt;br /&gt;
&lt;br /&gt;
                                          ...&lt;br /&gt;
                                           |&lt;br /&gt;
 AviSource(clip2) &amp;lt;--+-- Lanczos4Resize &amp;lt;--+-- Overlay &amp;lt;--+          &lt;br /&gt;
                     |                                    |&lt;br /&gt;
                     +-- Lanczos4Resize &amp;lt;-- Invert &amp;lt;------+-- Overlay (filter graph&#039;s root)&lt;br /&gt;
&lt;br /&gt;
In the latter case we would have one more filter (and cache) in the filter chain and -more importantly- we would have to generate two resized frames for each call by the host application to get a frame instead of one.&lt;br /&gt;
&lt;br /&gt;
Therefore, always try to split processing paths as late as possible; it will make your scripts faster.&lt;br /&gt;
&lt;br /&gt;
=== What &#039;&#039;not&#039;&#039; to include in runtime scripts ===&lt;br /&gt;
&lt;br /&gt;
Although, as said above, runtime scripts are parsed as regular scripts and thus every statement allowed to a regular script is allowed in a runtime script, some statements are not advisable from a performance point of view. &lt;br /&gt;
&lt;br /&gt;
The principal reason is that runtime script parsing occurs in &#039;&#039;every&#039;&#039; frame requested. Therefore, as a rule of thumb, computationally expensive actions should in general be placed outside the runtime environment (in the main script) in order to be executed only once. This practice trades some start-up overhead with savings during frame serving, which in general dominates the overall clip rendering / encoding time; thus it is justified as an optimisation. This is of course to be taken with a grain of salt because there are circumstance where the application needs force the (balanced) use of such statements.&lt;br /&gt;
&lt;br /&gt;
Having said all that, let&#039;s see our not-to-do-in-runtime-scripts list (and some interesting counter-examples):&lt;br /&gt;
&lt;br /&gt;
* The following actions should most of the time be avoided:&lt;br /&gt;
** Importing a script. &lt;br /&gt;
** Loading a plugin.&lt;br /&gt;
** Defining a user function.&lt;br /&gt;
: Issuing them on every frame will slow down (maybe significantly) encoding speed and (subject to implementation details) eat valuable memory. Moreover, this overhead will be borne without returning significant gains. It is in general much better to place them in the main script.&lt;br /&gt;
: See however an example of acceptable use: [http://forum.doom9.org/showthread.php?t=129191 Subtitles from a changing text-file].&lt;br /&gt;
&lt;br /&gt;
* Calling a lot of filters / functions inside the runtime script will slow down your encoding speed. Those filters will be created and destroyed on every frame; thus you pay initialisation/cleanup costs at every frame.&lt;br /&gt;
: If you can, put outside the runtime environment those filter calls not essential for the runtime processing; break the runtime script into more scripts if you have to. For example, instead of doing this:&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;myclip.avi&amp;quot;)&lt;br /&gt;
 total_frames = [[Clip_properties|Framecount]]()&lt;br /&gt;
 [[ScriptClip]](&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     [[Levels]](0, 0.9, 255, 5, 250)&lt;br /&gt;
     total_frames % current_frame &amp;lt; 2 ? [[FlipHorizontal]] : last&lt;br /&gt;
     [[Tweak]](hue=18)&lt;br /&gt;
     [[Subtitle]](&amp;quot;frame: &amp;quot; + String(current_frame), y=320)&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
do this:&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;myclip.avi&amp;quot;)&lt;br /&gt;
 total_frames = [[Clip_properties|Framecount]]()&lt;br /&gt;
 [[Levels]](0, 0.9, 255, 5, 250)&lt;br /&gt;
 [[ConditionalFilter]]([[FlipHorizontal]], last, &amp;quot;total_frames % current_frame&amp;quot;, &amp;quot;&amp;lt;&amp;quot;, &amp;quot;2&amp;quot;)&lt;br /&gt;
 [[Tweak]](hue=18)&lt;br /&gt;
 ScriptClip(&amp;quot;&amp;quot;&amp;quot;[[Subtitle]](&amp;quot;frame: &amp;quot; + String(current_frame), y=320)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
* [[Arrays]], due to their recursive, script-based implementation can be expensive to parse, especially if they host a large number of elements. Using them without paying attention to minimize operations will slow down your encoding speed.&lt;br /&gt;
: See however an example of acceptable use: [http://avslib.sourceforge.net/examples/example-016.html Per frame filtering, exporting specific frame(s)] (note that FrameFilter is a wrapper around [[ScriptClip]]).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to the [[The_script_execution_model|script execution model]]. &lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Reference]]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
	<entry>
		<id>http://www.avisynth.nl/index.php?title=%D0%94%D0%BE%D0%B1%D1%80%D0%BE_%D0%BF%D0%BE%D0%B6%D0%B0%D0%BB%D0%BE%D0%B2%D0%B0%D1%82%D1%8C&amp;diff=2063</id>
		<title>Добро пожаловать</title>
		<link rel="alternate" type="text/html" href="http://www.avisynth.nl/index.php?title=%D0%94%D0%BE%D0%B1%D1%80%D0%BE_%D0%BF%D0%BE%D0%B6%D0%B0%D0%BB%D0%BE%D0%B2%D0%B0%D1%82%D1%8C&amp;diff=2063"/>
		<updated>2011-03-20T19:09:18Z</updated>

		<summary type="html">&lt;p&gt;Unreal666: /* Фильтры, внешние плагины, скриптовые функции и утилиты */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;clear:both; margin-top:-3px; margin-bottom: 1em; font-variant: small-caps; text-align: center; font-size: 105%;&amp;quot;&amp;gt;&amp;lt;!-- These should be fundamental categories --&amp;gt; &lt;br /&gt;
[http://sourceforge.net/project/showfiles.php?group_id=57023 Загрузить] | [[AviSynth FAQ]] | [[Internal filters|Внутренние фильтры]] | [[External filters|Внешние фильтры]] | [http://forum.doom9.org/forumdisplay.php?s=&amp;amp;forumid=33 Doom9 форум] | [http://sourceforge.net/projects/avisynth2/ Страница проекта] | [[Feedback|Обратная связь]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Внимание: данная страница и сайт в целом переведены на русский язык далеко не полностью (то есть вообще не переведены). Имеющаяся команда переводчиков сосредоточила имеющиеся силы на переводе офф-лайновой документации, распространяющейся с дистрибутивом AviSynth (смотри сайт [http://avisynth.org.ru www.avisynth.org.ru]).&lt;br /&gt;
&lt;br /&gt;
Однако вы можете переводить и дополнять статьи Wiki данного сайта самостоятельно (используя переведенные части офф-лайновой документации для единства стиля и терминов), добавляя к английским именам страниц окончание /ru (или создать страницы с русским именем - можно и то и другое с перенаправлением).&lt;br /&gt;
&lt;br /&gt;
== Что такое AviSynth? ==&lt;br /&gt;
&lt;br /&gt;
AviSynth - это мощное средство для пост-обработки видео. Он предоставляет методы для редактирования и обработки видео файлов. AviSynth работает как [[фрэймсервер]], обеспечивая мгновенное редактирования без необходимости временных файлов.&lt;br /&gt;
&lt;br /&gt;
AviSynth сам по себе не имеет графического интерфейса пользователя (GUI), но вместо этого зависит от системы скриптов (сценариев, команд), которая позволяет продвинутое нелинейное редактирование. В то время как на первый взгляд это может показаться утомительным и не-интуитивным, это является замечательно мощным и очень хорошим способом управлять проектами точным, согласованным и воспроизводимым образом. Поскольку текстовые скрипты являются вполне читаемыми (по-английски), проекты естественным образом само-документируются. Язык скриптов прост, но мощен, и из базовых операций могут быть построены весьма сложные фильтры, для разработки богатой палитры полезных и уникальных эффектов.&lt;br /&gt;
&lt;br /&gt;
Заинтересовались? На этом сайте вы можете узнать [[more about AviSynth|больше об AviSynth]], изучить официальное [[Internal filters|руководство по AviSynth]], и просмотреть [[AviSynth FAQ|часто задаваемые вопросы и ответы]]. Или вы можете перейти прямо на [http://sourceforge.net/project/showfiles.php?group_id=57023 страницу загрузки] на [[SourceForge]]. AviSynth - свободно распространяемая программа с открытым кодом.&lt;br /&gt;
&lt;br /&gt;
== Использование ==&lt;br /&gt;
=== Что нового в AviSynth - Начните с малого! ===&lt;br /&gt;
&lt;br /&gt;
* [[first script|Ваш первый скрипт]] - Руководство для начинающих.&lt;br /&gt;
* [[Getting started|С чего начать]] - Краткая инструкция об использовании AviSynth.&lt;br /&gt;
* [[Filter introduction|Обзор фильтров]] - Краткий обзор наиболее часто используемых фильтров AviSynth.&lt;br /&gt;
* [[Script examples|Примеры скриптов]] - Несколько примеров, используемых во всем Мире.&lt;br /&gt;
* Несколько руководств, разъясняющих использование AviSynth:&lt;br /&gt;
** [http://www.doom9.org/capture/postprocessing_avisynth.html Руководство захвата аналогового сигнала]. The AviSynth part of the capture guide is about what filters can be used to enhance the quality of the capture. It discusses things like deinterlacing, denoising, cropping and resizing and color adjustment. Which makes it really useful to learn about some of the capabilities of AviSynth in a schematic way.&lt;br /&gt;
** [http://www.animemusicvideos.org/guides/avtech/avisyntha.html Введение в AviSynth от AnimeMusicVideos.org]. Простая инструкция, описывающая деинтерлизинг, изменение размера и некоторые другие базовые действия.&lt;br /&gt;
** [http://www.animemusicvideos.org/guides/avtech/avspostqual.html Введение в фильтры AviSynth от AnimeMusicVideos.org]. Простая инструкция, описывающая фильтры сглаживания, удаления муара, повышения резкости, управления цветом и некоторых других.&lt;br /&gt;
* [[Troubleshooting|Обнаружение проблем]] в Ваших скриптах и конфигурации.&lt;br /&gt;
&lt;br /&gt;
=== Фильтры, внешние плагины, скриптовые функции и утилиты ===&lt;br /&gt;
&lt;br /&gt;
* [[Internal filters|Внутренние фильтры]] - Официальный список включенных в AviSynth фильтров с описанием, сгруппированный по категориям.&lt;br /&gt;
* [[External filters|Внешние фильтры]] - Документация некоторых скриптовых функций и плагинов для AviSynth версии 2.5x.&lt;br /&gt;
** [[External plugins old|Внешние плагины (устар.)]] - Документация по плагинам AviSynth версий v1.0x/v2.0x (устаревшие плагины, однако некоторые из них по прежнему могут быть использованы).&lt;br /&gt;
* [http://www.avisynth.org/warpenterprises/ Коллекция плагинов AviSynth] собранная WarpEnterprises.&lt;br /&gt;
* [[Shared functions|Общие функции]] - Полезные скриптовые функции.&lt;br /&gt;
* [[Utilities]] - Список GUIs, командных, групповых и других AviSynth-утилит.&lt;br /&gt;
&lt;br /&gt;
=== Синтаксис AviSynth-скрипта ===&lt;br /&gt;
&lt;br /&gt;
* [[AviSynth Syntax|Синтаксис]] - Официальная документация.&lt;br /&gt;
** [[Grammar|Грамматика]] - Грамматика скриптового языка AviSynth. Введение в скриптовый язык AviSynth.&lt;br /&gt;
** [[Script variables|Переменные]] - Как объявлять и использовать их в скриптах.&lt;br /&gt;
** [[Operators|Операторы]] - Допустимые операторы и их приоритет.&lt;br /&gt;
** [[Clip properties|Свойства клипа]] - Функции, возвращающие свойства клипа.&lt;br /&gt;
** [[Control structures|Структуры управления]] - Языковые конструкции управления потоком.&lt;br /&gt;
** [[Internal functions|Встроенные функции]] - Ready-made non-clip функции для использования в скриптах.&lt;br /&gt;
** [[User defined script functions|Определяемые пользователем скриптовые функции]] - Как их объявлять и использовать.&lt;br /&gt;
** [[Plugins|Плагины]] - Как подключать плагины AviSynth, VirtualDub, VFAPI и C-плагины, их автозагрузка и именные предпочтения.&lt;br /&gt;
** [[Runtime environment|Runtime-окружение]] - Скриптовое описание для использования отдельных кадров клипа.&lt;br /&gt;
* [[Scripting reference|Руководство по скриптам]] - Выход за пределы базовых приемов написания скриптов.&lt;br /&gt;
** [[The full AviSynth grammar|Полное руководство по грамматике]] - Полное руководство по использованию AviSynth.&lt;br /&gt;
** [[The script execution model|Модель выполнения скриптов]] - The steps behind the scenes from the script to the final video clip output. The filter graph. Scope and lifetime of variables. Evaluation of runtime scripts.&lt;br /&gt;
** [[User functions|Функции пользователя]] - Как эффективно создавать пользовательские скриптовые функции; как избегать общих ошибок; способы организации ваших функций в коллекции, создание библиотек функций и многое другое.&lt;br /&gt;
** [[Block statements|Блоковые конструкции]] - Технические идиомы для создания блоков AviSynth-скриптов.&lt;br /&gt;
** [[Arrays|Массивы]] - Использование массивов (и соответствующих операторов) для управления наборами данных в один шаг.&lt;br /&gt;
** [[Scripting at runtime|Выполнение скриптов]] - Как раскрыть все возможности runtime фильтров и создавать комплексные скрипты, которые реализуют интересные (и эффективные по быстродействию) эффекты и операции.&lt;br /&gt;
&lt;br /&gt;
=== FAQ, Руководства и дополнительные материалы ===&lt;br /&gt;
&lt;br /&gt;
* [[AviSynth FAQ]] - Ответы на часто задаваемые вопросы.&lt;br /&gt;
* [[Aspect ratios|Пропорции клипов]] - Введение в соотношение сторон клипов (DAR, PAR, SAR), как правильно измененять размер исходных клипов.&lt;br /&gt;
* [[Guides|Руководства]] - Советы по конкретным типам конвертирования и общие задачи.&lt;br /&gt;
* [[Advanced topics|Дополнительные советы]] - Рассказывают о таких вещах как ошибка Chroma Upsampling, преобразование цветов, гибридное видео, компенсация движения и т.д.&lt;br /&gt;
&lt;br /&gt;
== Разработка ==&lt;br /&gt;
&lt;br /&gt;
* Хотите [[get involved|принять участие]]?&lt;br /&gt;
* Официальный [http://sourceforge.net/projects/avisynth2/ SourceForge] проект.&lt;br /&gt;
* О том, [[compile AviSynth|как откомпилировать AviSynth]] и плагины.&lt;br /&gt;
* [[Filter SDK]] - Советы по программированию AviSynth-плагинов.&lt;br /&gt;
* [http://forum.doom9.org/forumdisplay.php?s=&amp;amp;forumid=69 Форум разработчиков].&lt;br /&gt;
* Список [[changelist|последних изменений]].&lt;br /&gt;
* О разработке платформонезависимой [[AviSynth v3]].&lt;br /&gt;
&lt;br /&gt;
== Wiki ==&lt;br /&gt;
&lt;br /&gt;
Добро пожаловать на MediaWiki. Не стесняйтесь в наполнении данного сайта! Нам нужна Ваша помощь в наполнении данного Wiki-сайта. Ознакомьтесь с [http://meta.wikimedia.org/wiki/Помощь:Содержание руководством пользователя] по редактированию данного сайта.&lt;br /&gt;
&lt;br /&gt;
== Авторские права на документацию ==&lt;br /&gt;
&lt;br /&gt;
Права на документацию AviSynth (c) 2002-2007 принадлежат группе разработчиков AviSynth и других людей, сделавших вклад.&lt;br /&gt;
&lt;br /&gt;
С 5 августа 2007 года информация на данном сайте публикуется под лицензией [http://creativecommons.org/licenses/by-sa/3.0/ CreativeCommons Attribution-ShareAlike 3.0 License] (сокращенно &amp;quot;CC BY-SA 3.0&amp;quot;, см. [http://creativecommons.org/licenses/by-sa/3.0/legalcode полные правила лицензирования]). Перевод на русский: http://wiki.ccrussia.org/index.php?title=Attribution-ShareAlike_3.0_Unported_Commons_Deed . Дополнительная информация о правах доступна [[Avisynth:Copyrights|здесь]].&lt;br /&gt;
&lt;br /&gt;
[http://wikipedia.dn.ua Википедия Донбасса]&lt;/div&gt;</summary>
		<author><name>Unreal666</name></author>
	</entry>
</feed>