<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://avisynth.nl/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://avisynth.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Martin53</id>
		<title>Avisynth wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Martin53"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Special:Contributions/Martin53"/>
		<updated>2026-04-08T00:46:20Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API</id>
		<title>Filter SDK/Cplusplus API</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API"/>
				<updated>2017-03-11T20:43:35Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* GetVar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The header, avisynth.h, declares all the classes, structures and miscellaneous constants of the C++ API that you might need when writing a plugin. All external plugins should #include it:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;avisynth.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note, sometimes there is a reference to a version number of the plugin api (for example v3, v5 or v6). This refers to the value of [[Filter_SDK/AVISYNTH_INTERFACE_VERSION|AVISYNTH_INTERFACE_VERSION]]. The classes and miscellaneous constants are described below.&lt;br /&gt;
&lt;br /&gt;
= CreateScriptEnvironment =&lt;br /&gt;
&lt;br /&gt;
  IScriptEnvironment* __stdcall CreateScriptEnvironment(int version = AVISYNTH_INTERFACE_VERSION);&lt;br /&gt;
&lt;br /&gt;
AviSynth exports this. It enables you to use AviSynth as a library, without writing an AviSynth script or without going through AVIFile. [todo add link]&lt;br /&gt;
&lt;br /&gt;
= Classes =&lt;br /&gt;
&lt;br /&gt;
== AvisynthError ==&lt;br /&gt;
&lt;br /&gt;
AvisynthError(const char* _msg)&lt;br /&gt;
&lt;br /&gt;
Wrap your code in try/catch statements to enable exception handling. AvisynthError will tell you what's wrong.&lt;br /&gt;
&lt;br /&gt;
 try &lt;br /&gt;
 {	&lt;br /&gt;
   Val = Env-&amp;gt;Invoke(&amp;quot;Import&amp;quot;, Args, 0);&lt;br /&gt;
   Clip = Val.AsClip();&lt;br /&gt;
   VidInfo = Clip-&amp;gt;GetVideoInfo();&lt;br /&gt;
   Frame = Clip-&amp;gt;GetFrame( 1, Env);&lt;br /&gt;
 }&lt;br /&gt;
   catch (AvisynthError err) &lt;br /&gt;
 {&lt;br /&gt;
   printf(&amp;quot;%s\n&amp;quot;, err.msg);&lt;br /&gt;
   return 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== VideoFrameBuffer ==&lt;br /&gt;
&lt;br /&gt;
VideoFrameBuffer (VFB) holds information about a memory block which is used for video data. For efficiency, instances of this class are not deleted when the refcount reaches zero; instead they are stored in a linked list to be reused. The instances are deleted when the corresponding AVS file is closed. Or more accurately, a VideoFrameBuffer once new'd generally is not released until the IScriptEnvironment is deleted, except if SetMemoryMax is exceeded by too much then not in use VideoFrameBuffer's are forcible deleted until SetMemoryMax is satisfied.&lt;br /&gt;
&lt;br /&gt;
== VideoFrame ==&lt;br /&gt;
&lt;br /&gt;
VideoFrame holds a &amp;quot;window&amp;quot; into a VideoFrameBuffer. Operator new is overloaded to recycle class instances. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 src-&amp;gt;GetReadPtr(..)&lt;br /&gt;
&lt;br /&gt;
VideoFrame has the following members: GetPitch, GetRowSize, GetHeight, GetReadPtr, GetWritePtr and IsWritable.&lt;br /&gt;
&lt;br /&gt;
All those filters (except IsWritable) will give you a property (pitch, rowsize, etc ...) of a plane (of the frame it points to). The interleaved formats (BGR(A) or YUY2) consist of one plane, and the planar formats consists of one (Y) or three (YUV) planes. The default plane is just the first plane (which is plane Y for the planar formats).&lt;br /&gt;
&lt;br /&gt;
=== GetPitch ===&lt;br /&gt;
&lt;br /&gt;
  int GetPitch(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pitch&amp;quot; (also called stride) of a frame buffer is the offset (in bytes) from the beginning of one scan line to the beginning of the next. The source and destination buffers won't necessarily have the same pitch. The pitch can vary among frames in a clip, and it can differ from the width of the clip. [todo add link]&lt;br /&gt;
&lt;br /&gt;
The scan line will be padded to a multiple of 8 (if necessary) due to speed reasons, so the pitch will always be a multiple of 8. Image processing is expensive, so SIMD instructions are used to speed tasks up: &amp;lt;br&amp;gt;&lt;br /&gt;
SSE uses 128 bit = 16 byte registers, so 8 YUY2 pixels can be processed the same time. &amp;lt;br&amp;gt;&lt;br /&gt;
AVX uses 256 bit = 32 byte registers, so 16 YUY2 pixels can be processed the same time.&lt;br /&gt;
&lt;br /&gt;
NOTE that the pitch can change anytime, so in most use cases you must request the pitch dynamically.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
GetPitch must be used on every plane (interleaved like YUY2 means 1 plane...) of every PVideoFrame that you want to read or write to. It is the only way to get the size of the Video Buffer (e.g. get the size of PVideoFrame):&lt;br /&gt;
&lt;br /&gt;
 int buffer_size = src-&amp;gt;GetPitch() * src-&amp;gt;GetHeight();  //YUY2, interleaved&lt;br /&gt;
&lt;br /&gt;
This will give you the pitch of the U-plane (it will be zero if the plane doesn't exist):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const int src_pitchUV = src-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
&lt;br /&gt;
=== GetRowSize ===&lt;br /&gt;
&lt;br /&gt;
  int GetRowSize(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetRowSize gives the length of each row in bytes (thus not in pixels). It's usually equal to the pitch or slightly less, but it may be significantly less if the frame in question has been through [[Crop]]. &lt;br /&gt;
This will give you the rowsize of a frame for the interleaved formats, or the rowsize of the Y-plane for the planar formats (being the default plane).&lt;br /&gt;
&lt;br /&gt;
 const int src_width = src-&amp;gt;GetRowSize();&lt;br /&gt;
&lt;br /&gt;
=== GetHeight ===&lt;br /&gt;
&lt;br /&gt;
  int GetHeight(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetHeight gives the height of the plane in pixels.&lt;br /&gt;
&lt;br /&gt;
=== GetReadPtr ===&lt;br /&gt;
&lt;br /&gt;
  const BYTE* GetReadPtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetReadPtr gives you a read pointer to a plane. This will give a read pointer to the default plane:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const unsigned char* srcp = src-&amp;gt;GetReadPtr()&lt;br /&gt;
&lt;br /&gt;
=== GetWritePtr ===&lt;br /&gt;
&lt;br /&gt;
  BYTE* GetWritePtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetWritePtr gives you a write pointer to a plane.&lt;br /&gt;
&lt;br /&gt;
Any buffer you get from NewVideoFrame is guaranteed to be writable (as long as you only assign it to one PVideoFrame). Our filter's dst came from NewVideoFrame, so we can safely call dst-&amp;gt;GetWritePtr(). However, frames you get from other clips via GetFrame may not be writable, in which case GetWritePtr() will return a null pointer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);				&lt;br /&gt;
 unsigned char* dstp = dst-&amp;gt;GetWritePtr();&lt;br /&gt;
&lt;br /&gt;
If you want to write a frame which is not new (the source frame for example), you will have to call MakeWritable first:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 unsigned char* srcp = src-&amp;gt;GetWritePtr(PLANAR_Y);&lt;br /&gt;
&lt;br /&gt;
See IsWritable for more details.&lt;br /&gt;
&lt;br /&gt;
=== IsWritable ===&lt;br /&gt;
&lt;br /&gt;
  bool IsWritable() const;&lt;br /&gt;
&lt;br /&gt;
All frame buffers are readable, but not all are writable. This method can be used to find out if a buffer is writable or not, and there's a MakeWritable callback (described below) to ensure that it is.&lt;br /&gt;
&lt;br /&gt;
The rule about writability is this: A buffer is writable if and only if there is exactly one PVideoFrame pointing to it. In other words, you can only write to a buffer if no one else might be reading it. This rule guarantees that as long as you hold on to a PVideoFrame and don't write to it yourself, that frame will remain unchanged. The only drawback is that you can't have two PVideoFrames pointing to a writable buffer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (src-&amp;gt;IsWritetable()) {...}&lt;br /&gt;
&lt;br /&gt;
== AlignPlanar ==&lt;br /&gt;
&lt;br /&gt;
  AlignPlanar(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
AlignPlanar does nothing, if the pitch of a frame is at least mod16 (16 bytes, being the default frame alignment for luma and chroma). Otherwise it realigns the image, by blitting it to a larger buffer.&lt;br /&gt;
&lt;br /&gt;
Filters can enforce a lower pitch, but they must always apply the AlignPlanar filter after itself, if they intend to return a frame with a lower pitch. VFW delivers a 4 byte alignment for example, so the AlignPlanar filters needs to be applied on all frames when using AviSource.&lt;br /&gt;
&lt;br /&gt;
== FillBorder ==&lt;br /&gt;
&lt;br /&gt;
  FillBorder(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
This function fills up the right side of the picture on planar images with duplicates of the rightmost pixel if the planes are not aligned. That is, if src-&amp;gt;GetRowSize(PLANAR_Y) != src-&amp;gt;GetRowSize(PLANAR_Y_ALIGNED).&lt;br /&gt;
&lt;br /&gt;
== ConvertAudio ==&lt;br /&gt;
&lt;br /&gt;
  ConvertAudio(PClip _clip, int prefered_format);&lt;br /&gt;
&lt;br /&gt;
ConvertAudio converts the sample type of the audio to one of the following sample types: SAMPLE_INT8 (8 bits), SAMPLE_INT16 (16 bits), SAMPLE_INT24 (24 bits), SAMPLE_INT32 (32 bits) or SAMPLE_FLOAT (float).&lt;br /&gt;
&lt;br /&gt;
The following example converts the sample type of the clip child to SAMPLE_INT16 (16 bit) if the input isn’t 16 bit.&lt;br /&gt;
&lt;br /&gt;
 ConvertAudio(child, SAMPLE_INT16);&lt;br /&gt;
&lt;br /&gt;
== IScriptEnvironment ==&lt;br /&gt;
&lt;br /&gt;
AviSynth exports an IScriptEnvironment interface. It enables you to use AviSynth as a library, without writing an AVS script or without going through AVIFile. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 IScriptEnvironment* env&lt;br /&gt;
 env-&amp;gt;Invoke(..)&lt;br /&gt;
&lt;br /&gt;
IScriptEnvironment has the following members: ThrowError, GetCPUFlags, SaveString, Sprintf, VSprintf, Invoke, BitBlt, AtExit, AddFunction, MakeWritable, FunctionExists, GetVar, GetVarDef, SetVar, SetGlobalVar, PushContext, PopContext, NewVideoFrame, CheckVersion, Subframe, SubframePlanar, SetMemoryMax, SetWorkingDir, DeleteScriptEnvironment and ApplyMessage. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== ThrowError ===&lt;br /&gt;
&lt;br /&gt;
  __declspec(noreturn) virtual void __stdcall ThrowError(const char* fmt, ...) = 0;&lt;br /&gt;
&lt;br /&gt;
ThrowError throws an exception (of type AvisynthError). Usually, your error message will end up being displayed on the user's screen in lieu of the video clip they were expecting:&lt;br /&gt;
&lt;br /&gt;
 if (!vi.IsRGB()) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;RGBAdjust requires RGB input&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You can use [http://www.cplusplus.com/reference/cstdio/printf/ format specifiers] to print variables. The additional arguments following fmt are formatted and inserted in the resulting string replacing their respective specifiers:&lt;br /&gt;
&lt;br /&gt;
 if (w[j] &amp;lt; 0.01) {&lt;br /&gt;
  env-&amp;gt;ThrowError(&amp;quot;%s Resizer: [Internal Error] Got Zero Coefficient; j: %d; w[j]: %f&amp;quot;, &amp;quot;Spline&amp;quot;, j, w[j]);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetCPUFlags ===&lt;br /&gt;
&lt;br /&gt;
  virtual long GetCPUFlags();&lt;br /&gt;
&lt;br /&gt;
GetCPUFlags returns the instruction set of your CPU. To find out if you're running for example on a CPU that supports MMX, test:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;GetCPUFlags() &amp;amp; CPUF_MMX&lt;br /&gt;
&lt;br /&gt;
There's a complete list of flags in avisynth.h.&lt;br /&gt;
&lt;br /&gt;
=== SaveString ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* SaveString(const char* s, int length = -1);&lt;br /&gt;
&lt;br /&gt;
This function copies its argument to a safe &amp;quot;permanent&amp;quot; location and returns a pointer to the new location. &lt;br /&gt;
Each ScriptEnvironment instance has a buffer set aside for storing strings, which is expanded as needed. The strings are not deleted until the ScriptEnvironment instance goes away (when the script file is closed, usually). This is usually all the permanence that is needed, since all related filter instances will already be gone by then. &lt;br /&gt;
The returned pointer is not const-qualified, and you're welcome to write to it, as long as you don't stray beyond the bounds of the string.&lt;br /&gt;
&lt;br /&gt;
Example usage (converting a string to upper case):&lt;br /&gt;
&lt;br /&gt;
 AVSValue UCase(AVSValue args, void*, IScriptEnvironment* env) {&lt;br /&gt;
   return _strupr(env-&amp;gt;SaveString(args[0].AsString()));&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Sprintf and VSprintf ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* Sprintf(const char* fmt, ...);&lt;br /&gt;
  virtual char* VSprintf(const char* fmt, char* val);&lt;br /&gt;
&lt;br /&gt;
These store strings away in the same way as SaveString, but they treat their arguments like printf and vprintf. &lt;br /&gt;
Currently there's a size limit of 4096 characters on strings created this way. (The implementation uses _vsnprintf, so you don't need to worry about buffer overrun.) &lt;br /&gt;
&lt;br /&gt;
=== Invoke ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue Invoke(const char* name, const AVSValue args, const char** arg_names=0);&lt;br /&gt;
&lt;br /&gt;
You can use this to call a script function. There are many script functions which can be useful from other filters; for example, the Bob filter uses SeparateFields, and several source filters use UnalignedSplice. Some functions, like Weave, are implemented entirely in terms of other functions. &lt;br /&gt;
If you're calling a function taking exactly one argument, you can simply pass it in the args parameter; Invoke will convert it into an array for you. In order to call a function taking multiple arguments, you will need to create the array yourself; it can be done like this: &lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args,3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
In this case LanczosResize would need to have a parameter-type string like &amp;quot;cii&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Invoking a filter without arguments (for example catching the path of the loaded script with [[Internal_functions/ScriptDir#ScriptDir|ScriptDir]]):&lt;br /&gt;
&lt;br /&gt;
 const char* V = env-&amp;gt;Invoke(&amp;quot;ScriptDir&amp;quot;, AVSValue(0,0)).AsString();&lt;br /&gt;
&lt;br /&gt;
The arg_names parameter can be used to specify named arguments. Named arguments can also be given positionally, if you prefer. For example:&lt;br /&gt;
&lt;br /&gt;
 int size_text = 24;&lt;br /&gt;
 int align = 8;&lt;br /&gt;
 const char *names[] = {NULL, NULL, &amp;quot;align&amp;quot;, &amp;quot;size&amp;quot;, &amp;quot;text_color&amp;quot;};&lt;br /&gt;
 AVSValue avsv[5] = {clip, &amp;quot;text&amp;quot;, align, size_text, 0xFFFF00};&lt;br /&gt;
 clip = env-&amp;gt;Invoke(&amp;quot;Subtitle&amp;quot;, AVSValue(avsv, 5), names).AsClip();&lt;br /&gt;
&lt;br /&gt;
Invoke throws IScriptEnvironment::NotFound if it can't find a matching function prototype. You should be prepared to catch this unless you know that the function exists and will accept the given arguments.&lt;br /&gt;
&lt;br /&gt;
=== BitBlt ===&lt;br /&gt;
&lt;br /&gt;
  virtual void BitBlt(unsigned char* dstp, int dst_pitch, const unsigned char* srcp, int src_pitch, int row_size, int height);&lt;br /&gt;
&lt;br /&gt;
This brilliantly-named function does a line-by-line copy from the source to the destination. It's useful for quite a number of things; the built-in filters DoubleWeave, FlipVertical, AddBorders, PeculiarBlend, StackVertical, StackHorizontal, and ShowFiveVersions all use it to do their dirty work.&lt;br /&gt;
&lt;br /&gt;
In AddBorders it’s to copy the Y-plane from the source to the destination frame (for planar formats):&lt;br /&gt;
&lt;br /&gt;
 const int initial_black = top*dst_pitch + vi.BytesFromPixels(left);&lt;br /&gt;
 if (vi.IsPlanar()) {&lt;br /&gt;
   env-&amp;gt;BitBlt(dstp+initial_black, dst_pitch, srcp, src_pitch, src_row_size, src_height);&lt;br /&gt;
   ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
left is the number of pixels which is added to the left, top the number which is added to the top. So the first source pixel, srcp[0], is copied to its new location dstp[x], and so on. The remaining bytes are zeroed and can be refilled later on.&lt;br /&gt;
&lt;br /&gt;
=== AtExit ===&lt;br /&gt;
&lt;br /&gt;
  virtual void AtExit(ShutdownFunc function, void* user_data);&lt;br /&gt;
&lt;br /&gt;
When IScriptEnvironment is deleted on script close the AtExit functions get run. When you register the function you can optionally provide some user data. When the function is finally called this data will be provided as the argument to the procedure.&lt;br /&gt;
&lt;br /&gt;
The example below (thanks to tsp) loads a library and automatically unloads it (by using AtExit) after the script is closed. It can be useful when your plugin depends on a library and you want to load the library in your script (the plugin fft3dfilter.dll depends on the library fftw3.dll for example):&lt;br /&gt;
&lt;br /&gt;
 void __cdecl UnloadDll(void* hinst, IScriptEnvironment* env) {&lt;br /&gt;
   if (hinst)&lt;br /&gt;
     FreeLibrary(static_cast&amp;lt;HMODULE&amp;gt;(hinst)); &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 AVSValue __cdecl LoadDll(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   HMODULE hinst = 0;&lt;br /&gt;
   hinst = LoadLibrary(args[0].AsString()); // loads a library&lt;br /&gt;
   env-&amp;gt;AtExit(UnloadDll, hinst); // calls UnloadDll to unload the library upon script exit&lt;br /&gt;
   return hinst!=NULL;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== AddFunction ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data) = 0; &lt;br /&gt;
&lt;br /&gt;
The main purpose of the AvisynthPluginInit2 (or AvisynthPluginInit3) function is to call env-&amp;gt;AddFunction.&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;AddFunction(&amp;quot;Sepia&amp;quot;, &amp;quot;c[color]i[mode]s&amp;quot;, Create_Sepia, 0);&lt;br /&gt;
&lt;br /&gt;
AddFunction is called to let Avisynth know of the existence of our filter. It just registers a function with Avisynth's internal function table. This function takes four arguments: the name of the new script function; the parameter-type string; the C++ function implementing the script function; and the user_data cookie.&lt;br /&gt;
&lt;br /&gt;
The added function is of type AVSValue and can therefore return any AVSValue. Here are a few options how to return from the &amp;quot;added&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
 AVSValue __cdecl  returnSomething(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   &lt;br /&gt;
   char *strlit = &amp;quot;AnyOldName&amp;quot;;&lt;br /&gt;
   int len = strlen(strlit);&lt;br /&gt;
   char *s = new char[len+1];&lt;br /&gt;
   if (s==NULL)&lt;br /&gt;
     env-&amp;gt;ThrowError(&amp;quot;Cannot allocate string mem&amp;quot;);&lt;br /&gt;
   strcpy(s, strlit);                              // duplicate&lt;br /&gt;
   char *e = s+len;                                // point at null&lt;br /&gt;
   // make safe copy of string (memory is freed on Avisynth closure)&lt;br /&gt;
   AVSValue ret = env-&amp;gt;SaveString(s,e-s);          // e-s is text len only (excl null) {SaveString uses memcpy)&lt;br /&gt;
   // AVSValue ret = env-&amp;gt;SaveString(s);           // alternative, Avisynth uses strlen to ascertain length&lt;br /&gt;
   delete []s;                                     // delete our temp s buffer&lt;br /&gt;
   return ret;                                     // return saved string as AVSValue&lt;br /&gt;
   // return strlit;                               // alternative to MOST of above code char* converted to AVSValue.&lt;br /&gt;
   // return &amp;quot;AnyOldName&amp;quot;;                         // alternative to ALL of above code char* converted to AVSValue.&lt;br /&gt;
   // String literals are read only and at constant address and so need not be saved.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== MakeWritable ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall MakeWritable(PVideoFrame* pvf) = 0;&lt;br /&gt;
&lt;br /&gt;
MakeWritable only copies the active part of the frame to a completely new frame with a default pitch. You need this to recieve a valid write pointer to an existing frame. &lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
&lt;br /&gt;
=== FunctionExists ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall FunctionExists(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
FunctionExists returns true if the specified filter exists, otherwise returns false: &lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;FunctionExists(&amp;quot;Import&amp;quot;)) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Yes, the IMPORT function exist.&amp;quot;);&lt;br /&gt;
 } else {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;No, the IMPORT function don't exist.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVar(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVar can be used to access AviSynth variables. It will throw an error if the variable doesn't exist.&lt;br /&gt;
&lt;br /&gt;
Internal and external (plugin) functions are, for example, exported as AviSynth variables:&lt;br /&gt;
&lt;br /&gt;
* $InternalFunctions$ Should contain a string consisting of function names of all internal functions.&lt;br /&gt;
* $InternalFunctions!Functionname!Param$ Should contain all parameters for each internal function.&lt;br /&gt;
* $PluginFunctions$ Should contain a string of all plugins in your autoloading plugin folder.&lt;br /&gt;
* $Plugin!Functionname!Param$ Should contain all parameters.&lt;br /&gt;
&lt;br /&gt;
Use env-&amp;gt;GetVar() to access them. This example returns a string consisting of all parameters of ConvertToYV12:&lt;br /&gt;
&lt;br /&gt;
 const char* plugin_dir;&lt;br /&gt;
 plugin_dir = env-&amp;gt;GetVar(&amp;quot;$Plugin!ConverttoYV12!Param$&amp;quot;).AsString();&lt;br /&gt;
&lt;br /&gt;
This example returns the plugin folder which is used to autoload your plugins (and returns an error if it’s not set):&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
   const char* plugin_dir;&lt;br /&gt;
   plugin_dir = env-&amp;gt;GetVar(&amp;quot;$PluginDir$&amp;quot;).AsString();&lt;br /&gt;
   env-&amp;gt;ThrowError(plugin_dir);&lt;br /&gt;
 } catch(...) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Plugin directory not set.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you are making a conditional filter you can use it to get the current framenumber:&lt;br /&gt;
&lt;br /&gt;
 // Get current frame number&lt;br /&gt;
 AVSValue cf = env-&amp;gt;GetVar(&amp;quot;current_frame&amp;quot;);&lt;br /&gt;
 if (!cf.IsInt())&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;MinMaxAudio: This filter can only be used within ConditionalFilter&amp;quot;);&lt;br /&gt;
 int n = cf.AsInt();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
NEVER catch an AviSynth exception inside a plugin and continue normal execution afterwards, see [[AviSynth%2B#AviSynth_Plugin_Writing_Tips]]&lt;br /&gt;
&lt;br /&gt;
=== GetVarDef, v6 ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVarDef(const char* name, const AVSValue&amp;amp; def=AVSValue()) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVarDef can be used to access AviSynth variables. It will return 'def' if the variable doesn't exist (instead of throwing an error):&lt;br /&gt;
&lt;br /&gt;
  int error;&lt;br /&gt;
  AVSValue ret1 = env-&amp;gt;GetVarDef(&amp;quot;VarUnknown&amp;quot;, AVSValue(-1)); // returns -1 when 'VarUnknown' doesn't exist&lt;br /&gt;
  AVSValue ret2 = env-&amp;gt;GetVarDef(&amp;quot;VarUnknown&amp;quot;, AVSValue(-2)); // returns -2 when 'VarUnknown' doesn't exist&lt;br /&gt;
  if (ret1 != ret2)&lt;br /&gt;
    env-&amp;gt;ThrowError(&amp;quot;Plugin: The variable 'VarUnknown' doesn't exist!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Note: One call with a proper default setting is sufficient when either a variable's content or else a default value is needed.&lt;br /&gt;
&lt;br /&gt;
=== SetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
It will return true if the variable was created and filled with the given value. It will return false in case the variable was already there and we just updated its value.&lt;br /&gt;
&lt;br /&gt;
SetVar can be used to set or create AviSynth variables. The created variables are only visible in the local scope, e.g. script functions have a new scope.&lt;br /&gt;
&lt;br /&gt;
This example sets the autoloading plugin folder to &amp;quot;C:\\&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;SetVar(&amp;quot;$PluginDir$&amp;quot;, AVSValue(&amp;quot;C:\\&amp;quot;))) {&lt;br /&gt;
   //variable was created&lt;br /&gt;
 } else {&lt;br /&gt;
   //variable was already existing and updated&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This example sets variables in GetFrame which can be accessed later on in a script within the conditional environment:&lt;br /&gt;
&lt;br /&gt;
 // saves the blue value of a pixel&lt;br /&gt;
 int BlueValue;&lt;br /&gt;
 BlueValue = srcp[x];&lt;br /&gt;
 env-&amp;gt;SetVar(&amp;quot;BlueValue&amp;quot;, AVSValue(BlueValue));&lt;br /&gt;
&lt;br /&gt;
=== SetGlobalVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetGlobalVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
SetGlobalVar can be used to create or set AviSynth variables that are visible within global scope. It is possible that a single filter may want to use SetVar in order to exchange signals to possible other instances of itself.&lt;br /&gt;
&lt;br /&gt;
There are at least 4 different components that make use of Set(Global)Var functions:&lt;br /&gt;
* the core itself&lt;br /&gt;
* the user within the avs script&lt;br /&gt;
* filters/plugins&lt;br /&gt;
* a custom application that invoked the environment&lt;br /&gt;
&lt;br /&gt;
All of above may have their own requirements for the SetVar function. Some may want to be visible globally, others may not.&lt;br /&gt;
&lt;br /&gt;
=== PushContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PushContext(int level=0) = 0;&lt;br /&gt;
&lt;br /&gt;
// TODO - see (also similar functions) http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== PopContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContext() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== PopContextGlobal ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContextGlobal() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== NewVideoFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall NewVideoFrame(const VideoInfo&amp;amp; vi, int align=FRAME_ALIGN) = 0; // default align is 16&lt;br /&gt;
&lt;br /&gt;
The NewVideoFrame callback allocates space for a video frame of the supplied size. (In this case it will hold our filter's output.) The frame buffer is uninitialized raw memory (except that in the debug build it gets filled with the repeating byte pattern 0A 11 0C A7 ED, which is easy to recognize because it looks like &amp;quot;ALLOCATED&amp;quot;). &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;vi&amp;quot; is a protected member of GenericVideoFilter. It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this structure to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
The following example creates a new VideoInfo structure and creates a new video frame from it:&lt;br /&gt;
&lt;br /&gt;
  VideoInfo vi;&lt;br /&gt;
  PVideoFrame frame;&lt;br /&gt;
  memset(&amp;amp;vi, 0, sizeof(VideoInfo));&lt;br /&gt;
  vi.width = 640;&lt;br /&gt;
  vi.height = 480;&lt;br /&gt;
  vi.fps_numerator = 30000;&lt;br /&gt;
  vi.fps_denominator = 1001;&lt;br /&gt;
  vi.num_frames = 107892;   // 1 hour&lt;br /&gt;
  vi.pixel_type = VideoInfo::CS_BGR32;&lt;br /&gt;
  vi.sample_type = SAMPLE_FLOAT;&lt;br /&gt;
  vi.nchannels = 2;&lt;br /&gt;
  vi.audio_samples_per_second = 48000;&lt;br /&gt;
  vi.num_audio_samples = vi.AudioSamplesFromFrames(vi.num_frames);&lt;br /&gt;
  frame = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
=== CheckVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall CheckVersion(int version = AVISYNTH_INTERFACE_VERSION) = 0;&lt;br /&gt;
&lt;br /&gt;
CheckVersion checks the interface version (avisynth.h). It throws an error if ‘version’ is bigger than the used interface version. The following interface versions are in use:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), 5 (v2.6.0a1-v2.6.0a5), or 6 (v2.6.0) [version 4 doesn’t exist].&lt;br /&gt;
&lt;br /&gt;
This example will throw an error if v2.5x or an older AviSynth version is being used:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;CheckVersion(5)&lt;br /&gt;
&lt;br /&gt;
This can be used in a plugin, for example, if it needs at least a certain interface version for it to work.&lt;br /&gt;
&lt;br /&gt;
=== Subframe ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall Subframe(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height) = 0;&lt;br /&gt;
&lt;br /&gt;
Subframe (for interleaved formats) extracts a part of a video frame. For planar formats use SubframePlanar. For examples see SubframePlanar.&lt;br /&gt;
&lt;br /&gt;
=== SubframePlanar ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall SubframePlanar(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV) = 0;&lt;br /&gt;
&lt;br /&gt;
SubframePlanar (for planar formats) extracts a part of a video frame. The example below returns the first field of a frame:&lt;br /&gt;
&lt;br /&gt;
 vi.height &amp;gt;&amp;gt;= 1; // sets new height in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_width = frame-&amp;gt;GetRowSize(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, 2*frame_pitch, frame_width, frame_height&amp;gt;&amp;gt;1, 0, 0, 2*frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies the first row of pixels and moves on to the third row (by moving the offset by ‘2*frame_pitch’). After frame_height/2 it stops reading.&lt;br /&gt;
&lt;br /&gt;
The following example keeps the left 100 pixels of a clip (it leaves the height unaltered) and throws away the rest:&lt;br /&gt;
&lt;br /&gt;
 vi.width = 100; // sets new width in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, frame_pitch, 100, frame_height, 0, 0, frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies 100 pixels and moves on to the next row (by moving the offset by ‘frame_pitch’).&lt;br /&gt;
&lt;br /&gt;
You need to check somewhere that the source frames is more than 100 pixels wide, otherwise throw an error.&lt;br /&gt;
&lt;br /&gt;
=== SetMemoryMax ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetMemoryMax(int mem) = 0;&lt;br /&gt;
&lt;br /&gt;
There is a builtin cache automatically inserted in between all filters. You can use SetmemoryMax to increase the size.&lt;br /&gt;
&lt;br /&gt;
SetMemoryMax only sets the size of the frame buffer cache. It is independent of any other memory allocation. Memory usage due to the frame cache should ramp up pretty quickly to the limited value and stay there. Setting a lower SetMemoryMax value will make more memory available for other purposes and provide less cache buffer frames. It is pointless having more buffers available than are needed by the scripts temporal requirements. If each and every frame generated at each and every stage of a script is only ever used once then the cache is entirely useless. By definition a cache is only useful if a generated element is needed a second or subsequent time.&lt;br /&gt;
&lt;br /&gt;
=== SetWorkingDir ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetWorkingDir(const char * newdir) = 0;&lt;br /&gt;
&lt;br /&gt;
Sets the default directory for AviSynth.&lt;br /&gt;
&lt;br /&gt;
=== DeleteScriptEnvironment, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall DeleteScriptEnvironment() = 0;&lt;br /&gt;
&lt;br /&gt;
Provides a method to delete the ScriptEnvironment which is created with CreateScriptEnvironment.&lt;br /&gt;
&lt;br /&gt;
=== ApplyMessage, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void _stdcall ApplyMessage(PVideoFrame* frame, const VideoInfo&amp;amp; vi, const char* message, int size, int textcolor, int halocolor, int bgcolor) = 0;&lt;br /&gt;
&lt;br /&gt;
ApplyMessage writes text on a frame. For example:&lt;br /&gt;
&lt;br /&gt;
 char BUF[256];&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 sprintf(BUF, &amp;quot;Filter: Frame %d is processed.&amp;quot;, n);&lt;br /&gt;
 env-&amp;gt;ApplyMessage(&amp;amp;src, vi, BUF, vi.width/4, 0xf0f080, 0, 0);&lt;br /&gt;
&lt;br /&gt;
=== GetAVSLinkage , v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual const AVS_Linkage* const __stdcall GetAVSLinkage() = 0;&lt;br /&gt;
&lt;br /&gt;
Returns the [[Filter_SDK/AVS_Linkage|AVSLinkage]].&lt;br /&gt;
&lt;br /&gt;
todo: how and when to use that ...&lt;br /&gt;
&lt;br /&gt;
==  PVideoFrame ==&lt;br /&gt;
&lt;br /&gt;
PVideoFrame is a smart pointer to VideoFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to frame ‘n’ from child:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;child&amp;quot; is a protected member of GenericVideoFilter, of type PClip. It contains the clip that was passed to the constructor. For our filter to produce frame n we need the corresponding frame of the input. If you need a different frame from the input, all you have to do is pass a different frame number to child-&amp;gt;GetFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to a new created VideoFrame from vi (which is a VideoInfo structure):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;vi&amp;quot; is another protected member of GenericVideoFilter (the only other member, actually). It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this struct to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
== IClip ==&lt;br /&gt;
&lt;br /&gt;
An Avisynth filter is simply a C++ class implementing the IClip interface. IClip has four pure virtual methods: GetVideoInfo, GetFrame, GetParity, and GetAudio. &lt;br /&gt;
The class GenericVideoFilter is a simple do-nothing filter defined in avisynth.h. It derives from IClip and implements all four methods. Most filters can inherit from GenericVideoFilter rather than directly from IClip; this saves you from having to implement methods that you don't care about, like GetAudio. &lt;br /&gt;
&lt;br /&gt;
IClip has the following members: GetVersion, GetFrame, GetParity, GetAudio, SetCacheHints and GetVideoInfo. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== GetVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall GetVersion() { return AVISYNTH_INTERFACE_VERSION; }&lt;br /&gt;
&lt;br /&gt;
GetVersion returns the interface version of the loaded avisynth.dll:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), or 6 (v2.6.0) [version 4 doesn’t exist, version 5 refers to the alpha versions of v2.6.0 so you won't need that one].&lt;br /&gt;
&lt;br /&gt;
=== GetFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
GetFrame returns a video frame. In this example, the even frames (0, 2, 4, ...) of ‘child’ are returned:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(2*n, env);&lt;br /&gt;
&lt;br /&gt;
You should do all the GetFrame() calls BEFORE you get any pointers and start manipulating any data.&lt;br /&gt;
&lt;br /&gt;
=== GetParity ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall GetParity(int n) = 0;&lt;br /&gt;
&lt;br /&gt;
GetParity returns the field parity if the clip is field-based, otherwise it returns the parity of first field of a frame. In other words, it distinguishes between top field first (TFF) and bottom field first (BFF). When it returns true, it means that this frame should be considered TFF, otherwise it should be considered BFF.&lt;br /&gt;
&lt;br /&gt;
=== GetAudio ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
Audio processing is handled through the GetAudio method. You must fill in the buffer with count samples beginning at the sample start. A sample may vary from one to four bytes, depending on whether the audio is 8, 16, 24 or 32-bit (float is also 32-bit). The flag vi.SampleType() will tell you this. &lt;br /&gt;
&lt;br /&gt;
If you cannot do your audio processing in-place, you must allocate your own buffer for the source audio using new or malloc.&lt;br /&gt;
&lt;br /&gt;
In this example, the audio of frame ‘n’ is returned (in the buffer ‘samples’):&lt;br /&gt;
&lt;br /&gt;
 VideoInfo vi = child-&amp;gt;GetVideoInfo();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const __int64 start = vi.AudioSamplesFromFrames(n);&lt;br /&gt;
 const __int64 count = vi.AudioSamplesFromFrames(1);&lt;br /&gt;
 SFLOAT* samples = new SFLOAT[count*vi.AudioChannels()];&lt;br /&gt;
 child-&amp;gt;GetAudio(samples, max(0,start), count, env);&lt;br /&gt;
&lt;br /&gt;
=== SetCacheHints ===&lt;br /&gt;
&lt;br /&gt;
  void __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
//  int __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
&lt;br /&gt;
SetCacheHints should be used in filters that request multiple frames from any single PClip source per input GetFrame call. frame_range is maximal 21.&lt;br /&gt;
&lt;br /&gt;
The possible values of cachehints are:&lt;br /&gt;
&lt;br /&gt;
 CACHE_NOTHING=0  // Filter requested no caching.&lt;br /&gt;
 CACHE_RANGE=1  // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
 CACHE_ALL=2  // This is default operation, a simple LRU cache.&lt;br /&gt;
 CACHE_AUDIO=3  // Audio caching.&lt;br /&gt;
 CACHE_AUDIO_NONE=4  // Filter requested no audio caching.&lt;br /&gt;
 CACHE_AUDIO_AUTO=5  // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
&lt;br /&gt;
When caching video frames (cachehints=0, 1, 2), frame_range is the radius around the current frame. When caching audio samples (cachehints=3, 4, 5), the value 0 creates a default buffer of 64kb and positive values allocate frame_range bytes for the cache.&lt;br /&gt;
&lt;br /&gt;
E.g. If you have a single PClip source, i.e. child and you get asked for frame 100 and you in turn then ask for frames 98, 99, 100, 101 and 102 then you need to call CACHE_RANGE with frame_range set to 3:&lt;br /&gt;
&lt;br /&gt;
 child-&amp;gt;SetCacheHints(CACHE_RANGE, 3);&lt;br /&gt;
&lt;br /&gt;
Frames outside the specified radius are candidate for normal LRU caching.&lt;br /&gt;
&lt;br /&gt;
// TODO - describe input and output for v5&lt;br /&gt;
// http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== GetVideoInfo ===&lt;br /&gt;
&lt;br /&gt;
  virtual const VideoInfo&amp;amp; __stdcall GetVideoInfo() = 0;&lt;br /&gt;
&lt;br /&gt;
GetVideoInfo returns a [[Filter_SDK/Cplusplus_API/VideoInfo|VideoInfo]] structure.&lt;br /&gt;
&lt;br /&gt;
== PClip ==&lt;br /&gt;
&lt;br /&gt;
PClip is a smart pointer to an IClip, and IClip is a generic abstract class.. It maintains a reference count on the IClip object and automagically deletes it when the last PClip referencing it goes away. For obvious reasons, you should always use PClip rather than IClip* to refer to clips. &lt;br /&gt;
&lt;br /&gt;
Like a genuine pointer, a PClip is only four bytes long, so you can pass it around by value. Also like a pointer, a PClip can be assigned a null value (0), which is often useful as a sentinel. Unlike a pointer, &lt;br /&gt;
&lt;br /&gt;
PClip is initialized to 0 by default. &lt;br /&gt;
&lt;br /&gt;
You'll need to make sure your class doesn't contain any circular PClip references, or any PClips sitting in dynamically allocated memory that you forget to delete. Other than that, you don't have to worry about the reference-counting machinery. &lt;br /&gt;
&lt;br /&gt;
AviSynth filters have a standardized output channel via IClip, but (unlike VirtualDub filters) no standardized input channel. Each filter is responsible for obtaining its own source material -- usually (as in this case) from another clip, but sometimes from several different clips, or from a file. &lt;br /&gt;
&lt;br /&gt;
The clip functionality must be provided by some concrete subclass of IClip which implements the functions GetFrame(), etc. So you cannot create a PClip without having an appropriate IClip subclass. For most filters, the GenericVideoFilter class provides the basis for this, but 'source' filters (which is basically what you have) do not have a parent clip and so GenericVideoFilter is not appropriate.&lt;br /&gt;
&lt;br /&gt;
== AVSValue ==&lt;br /&gt;
&lt;br /&gt;
Inside Avisynth, the value of a (script) variable is represented by an instance of the class AVSValue. Such objects have a one-character type field which denotes the script language type of the value:&lt;br /&gt;
* 'a' for an array of AVSValues&lt;br /&gt;
* 'b' for boolean&lt;br /&gt;
* 'c' for clip&lt;br /&gt;
* 'f' for float (IEEE single precision (32-bit) floating point)&lt;br /&gt;
* 'i' for int (32-bit signed integer)&lt;br /&gt;
* 's' for string&lt;br /&gt;
* 'v' for void&lt;br /&gt;
&lt;br /&gt;
A variable of type AVSValue, if simply declared and not initialised, will have its type set to 'v' by the AVSValue constructor, meaning void (or 'undefined'), and not just left as random garbage.&lt;br /&gt;
&lt;br /&gt;
A numeric script variable is either an integer or an float. The latter will be the case if the value of the numeric variable contains a dot (so for example the variable x = '10.' will be parsed as float since its value contains a dot).&lt;br /&gt;
&lt;br /&gt;
You can test which type a variable is with the methods (return true or false):&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''true condition'''&lt;br /&gt;
| '''false condition'''&lt;br /&gt;
|-&lt;br /&gt;
| IsArray()&lt;br /&gt;
| variable is an array&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsBool()&lt;br /&gt;
| variable is true or false&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsClip()&lt;br /&gt;
| variable is a clip&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsFloat()&lt;br /&gt;
| variable is float or int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsInt()&lt;br /&gt;
| variable is int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsString()&lt;br /&gt;
| variable is float or string&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| Defined()&lt;br /&gt;
| anything else&lt;br /&gt;
| variable is &amp;quot;undefined&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can get the value of a variable with the methods:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''return type'''&lt;br /&gt;
|-&lt;br /&gt;
| AsBool(), AsBool(bool def)&lt;br /&gt;
| bool&lt;br /&gt;
|-&lt;br /&gt;
| AsClip()&lt;br /&gt;
| PClip&lt;br /&gt;
|-&lt;br /&gt;
| AsDblDef(double def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloat(), AsFloat(float def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloatf(), AsFloatf(float def)&lt;br /&gt;
| float&lt;br /&gt;
|-&lt;br /&gt;
| AsInt(), AsInt(int def)&lt;br /&gt;
| int&lt;br /&gt;
|-&lt;br /&gt;
| AsString(), AsString(const char* def)&lt;br /&gt;
| const char*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Boolean values are not treated as numeric (unlike C).&lt;br /&gt;
&lt;br /&gt;
Note that not all 32-bit integers can be represented as IEEE 32-bit floating point numbers. 16777216 and 16777217 have the same IEEE 32-bit floating point representation. Namely [0|10010111|00000000000000000000000]. See [[Float|IEEE-754]] for more information.&lt;br /&gt;
&lt;br /&gt;
For arrays, you can use the ArraySize() method to get the number of elements, and [] indexing to get the elements themselves.&lt;br /&gt;
&lt;br /&gt;
AVSValue holds an array of AVSValues in the following way:&lt;br /&gt;
&lt;br /&gt;
AVSValue(const AVSValue* a, int size) { type = 'a'; array = a; array_size = size; }&lt;br /&gt;
&lt;br /&gt;
'''Examples'''&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
Using Invoke to apply a filter:&lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args, 3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
&lt;br /&gt;
 AVSValue(up_args, 3)&lt;br /&gt;
&lt;br /&gt;
returns the following: {'a'; {child, 384, 288}; 3}.&lt;br /&gt;
&lt;br /&gt;
Also [[#Invoke|Invoke]] returns an AVSValue (see its declaration) which in that case is a PClip.&lt;br /&gt;
&lt;br /&gt;
You can get the number of elements of up_args and its elements in the following way:&lt;br /&gt;
  &lt;br /&gt;
  int num_args, width, height;&lt;br /&gt;
  PClip clip;&lt;br /&gt;
  if (up_args.IsArray()) {&lt;br /&gt;
    num_args = up_args.ArraySize();&lt;br /&gt;
    clip = up_args[1].AsClip();&lt;br /&gt;
    width = up_args[2].AsInt();&lt;br /&gt;
    height = up_args[3].AsInt();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Integers and floats'''&lt;br /&gt;
&lt;br /&gt;
Note that 123.0 can be accurately represented as an int, float or double. So for getting the exact value of x=123.0 you can use either AsInt(123), AsFloat(x), AsFloatf(x) or AsDblDef(x). All of them will return the same value with the same accuracy.&lt;br /&gt;
&lt;br /&gt;
As noted above, 16777217 can't be accurately represented as a float. So for getting the exact value of x=16777217.0 you need to use either AsInt(16777217) or AsDblDef(x). Both will return the same value with the same accuracy. Note that AsFloat() will return a double, but it is cast to a float first (losing accuracy).&lt;br /&gt;
&lt;br /&gt;
= Structures =&lt;br /&gt;
&lt;br /&gt;
The following structure is available: VideoInfo structure. It holds global information about a clip (i.e. information that does not depend on the framenumber). The GetVideoInfo method in IClip returns this structure. A description (for AVISYNTH_INTERFACE_VERSION=6) of it can be found [[Filter_SDK/Cplusplus_API/VideoInfo|here]].&lt;br /&gt;
&lt;br /&gt;
= Constants =&lt;br /&gt;
&lt;br /&gt;
The following constants are defined in avisynth.h:&lt;br /&gt;
&lt;br /&gt;
 // Audio Sample information&lt;br /&gt;
 typedef float SFLOAT;&lt;br /&gt;
&lt;br /&gt;
 enum { // sample types&lt;br /&gt;
   SAMPLE_INT8  = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   SAMPLE_INT16 = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   SAMPLE_INT24 = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   SAMPLE_INT32 = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   SAMPLE_FLOAT = 1&amp;lt;&amp;lt;4&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // plane types&lt;br /&gt;
   PLANAR_Y         = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   PLANAR_U         = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   PLANAR_V         = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   PLANAR_ALIGNED   = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   PLANAR_Y_ALIGNED = PLANAR_Y | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_U_ALIGNED = PLANAR_U | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_V_ALIGNED = PLANAR_V | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_A         = 1&amp;lt;&amp;lt;4,                       // v5&lt;br /&gt;
   PLANAR_R         = 1&amp;lt;&amp;lt;5,                       // v5&lt;br /&gt;
   PLANAR_G         = 1&amp;lt;&amp;lt;6,                       // v5&lt;br /&gt;
   PLANAR_B         = 1&amp;lt;&amp;lt;7,                       // v5&lt;br /&gt;
   PLANAR_A_ALIGNED = PLANAR_A | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_R_ALIGNED = PLANAR_R | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_G_ALIGNED = PLANAR_G | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_B_ALIGNED = PLANAR_B | PLANAR_ALIGNED,  // v5&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // cache types&lt;br /&gt;
   // Old 2.5 poorly defined cache hints (v3).&lt;br /&gt;
   // Reserve values used by 2.5 API&lt;br /&gt;
   // Do not use in new filters&lt;br /&gt;
   CACHE_25_NOTHING             = 0, // Filter requested no caching.&lt;br /&gt;
   CACHE_25_RANGE               = 1, // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
   CACHE_25_ALL                 = 2, // This is default operation, a simple LRU cache.&lt;br /&gt;
   CACHE_25_AUDIO               = 3, // Audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_NONE          = 4, // Filter requested no audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_AUTO          = 5, // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
 &lt;br /&gt;
   // New 2.6 explicitly defined cache hints (v5).&lt;br /&gt;
   CACHE_NOTHING                = 10, // Do not cache video.&lt;br /&gt;
   CACHE_WINDOW                 = 11, // Hard protect upto X frames within a range of X from the current frame N.&lt;br /&gt;
   CACHE_GENERIC                = 12, // LRU cache upto X frames.&lt;br /&gt;
   CACHE_FORCE_GENERIC          = 13, // LRU cache upto X frames, override any previous CACHE_WINDOW.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_POLICY             = 30, // Get the current policy.&lt;br /&gt;
   CACHE_GET_WINDOW             = 31, // Get the current window h_span.&lt;br /&gt;
   CACHE_GET_RANGE              = 32, // Get the current generic frame range.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_AUDIO                  = 50, // Explicitly do cache audio, X byte cache.&lt;br /&gt;
   CACHE_AUDIO_NOTHING          = 51, // Explicitly do not cache audio.&lt;br /&gt;
   CACHE_AUDIO_NONE             = 52, // Audio cache off (auto mode), X byte intial cache.&lt;br /&gt;
   CACHE_AUDIO_AUTO             = 53, // Audio cache on (auto mode), X byte intial cache.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_AUDIO_POLICY       = 70, // Get the current audio policy.&lt;br /&gt;
   CACHE_GET_AUDIO_SIZE         = 71, // Get the current audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_FRAME         = 100, // Queue request to prefetch frame N.&lt;br /&gt;
   CACHE_PREFETCH_GO            = 101, // Action video prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_AUDIO_BEGIN   = 120, // Begin queue request transaction to prefetch audio (take critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTLO = 121, // Set low 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTHI = 122, // Set high 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COUNT   = 123, // Set low 32 bits of length.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COMMIT  = 124, // Enqueue request transaction to prefetch audio (release critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_GO      = 125, // Action audio prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_CACHE_MODE    = 200, // Cache ask Child for desired video cache mode.&lt;br /&gt;
   CACHE_GETCHILD_CACHE_SIZE    = 201, // Cache ask Child for desired video cache size.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_MODE    = 202, // Cache ask Child for desired audio cache mode.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_SIZE    = 203, // Cache ask Child for desired audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_COST          = 220, // Cache ask Child for estimated processing cost.&lt;br /&gt;
   CACHE_COST_ZERO              = 221, // Child response of zero cost (ptr arithmetic only).&lt;br /&gt;
   CACHE_COST_UNIT              = 222, // Child response of unit cost (less than or equal 1 full frame blit).&lt;br /&gt;
   CACHE_COST_LOW               = 223, // Child response of light cost. (Fast)&lt;br /&gt;
   CACHE_COST_MED               = 224, // Child response of medium cost. (Real time)&lt;br /&gt;
   CACHE_COST_HI                = 225, // Child response of heavy cost. (Slow)&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_THREAD_MODE   = 240, // Cache ask Child for thread safetyness.&lt;br /&gt;
   CACHE_THREAD_UNSAFE          = 241, // Only 1 thread allowed for all instances. 2.5 filters default!&lt;br /&gt;
   CACHE_THREAD_CLASS           = 242, // Only 1 thread allowed for each instance. 2.6 filters default!&lt;br /&gt;
   CACHE_THREAD_SAFE            = 243, //  Allow all threads in any instance.&lt;br /&gt;
   CACHE_THREAD_OWN             = 244, // Safe but limit to 1 thread, internally threaded.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_ACCESS_COST   = 260, // Cache ask Child for preferred access pattern.&lt;br /&gt;
   CACHE_ACCESS_RAND            = 261, // Filter is access order agnostic.&lt;br /&gt;
   CACHE_ACCESS_SEQ0            = 262, // Filter prefers sequential access (low cost)&lt;br /&gt;
   CACHE_ACCESS_SEQ1            = 263, // Filter needs sequential access (high cost)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // For GetCPUFlags.  These are backwards-compatible with those in VirtualDub.&lt;br /&gt;
                    /* oldest CPU to support extension */&lt;br /&gt;
   CPUF_FORCE       =  0x01,   //  N/A&lt;br /&gt;
   CPUF_FPU         =  0x02,   //  386/486DX&lt;br /&gt;
   CPUF_MMX         =  0x04,   //  P55C, K6, PII&lt;br /&gt;
   CPUF_INTEGER_SSE =  0x08,   //  PIII, Athlon&lt;br /&gt;
   CPUF_SSE         =  0x10,   //  PIII, Athlon XP/MP&lt;br /&gt;
   CPUF_SSE2        =  0x20,   //  PIV, K8&lt;br /&gt;
   CPUF_3DNOW       =  0x40,   //  K6-2&lt;br /&gt;
   CPUF_3DNOW_EXT   =  0x80,   //  Athlon&lt;br /&gt;
   CPUF_X86_64      =  0xA0,   //  Hammer (note: equiv. to 3DNow + SSE2, which only Hammer will have anyway)&lt;br /&gt;
   CPUF_SSE3        = 0x100,   //  PIV+, K8 Venice&lt;br /&gt;
 &lt;br /&gt;
   // Additional CPU flags in 2.6 (v5-v6).&lt;br /&gt;
   CPUF_SSSE3       =  0x200,   //  Core 2&lt;br /&gt;
   CPUF_SSE4        =  0x400,   //  Penryn, Wolfdale, Yorkfield&lt;br /&gt;
   CPUF_SSE4_1      =  0x400,&lt;br /&gt;
   CPUF_SSE4_2      = 0x1000,   //  Nehalem (note this was 0x800 in v5)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Development]]&lt;br /&gt;
[[Category:FilterSDK]]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API</id>
		<title>Filter SDK/Cplusplus API</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API"/>
				<updated>2017-03-11T20:38:03Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* GetVar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The header, avisynth.h, declares all the classes, structures and miscellaneous constants of the C++ API that you might need when writing a plugin. All external plugins should #include it:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;avisynth.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note, sometimes there is a reference to a version number of the plugin api (for example v3, v5 or v6). This refers to the value of [[Filter_SDK/AVISYNTH_INTERFACE_VERSION|AVISYNTH_INTERFACE_VERSION]]. The classes and miscellaneous constants are described below.&lt;br /&gt;
&lt;br /&gt;
= CreateScriptEnvironment =&lt;br /&gt;
&lt;br /&gt;
  IScriptEnvironment* __stdcall CreateScriptEnvironment(int version = AVISYNTH_INTERFACE_VERSION);&lt;br /&gt;
&lt;br /&gt;
AviSynth exports this. It enables you to use AviSynth as a library, without writing an AviSynth script or without going through AVIFile. [todo add link]&lt;br /&gt;
&lt;br /&gt;
= Classes =&lt;br /&gt;
&lt;br /&gt;
== AvisynthError ==&lt;br /&gt;
&lt;br /&gt;
AvisynthError(const char* _msg)&lt;br /&gt;
&lt;br /&gt;
Wrap your code in try/catch statements to enable exception handling. AvisynthError will tell you what's wrong.&lt;br /&gt;
&lt;br /&gt;
 try &lt;br /&gt;
 {	&lt;br /&gt;
   Val = Env-&amp;gt;Invoke(&amp;quot;Import&amp;quot;, Args, 0);&lt;br /&gt;
   Clip = Val.AsClip();&lt;br /&gt;
   VidInfo = Clip-&amp;gt;GetVideoInfo();&lt;br /&gt;
   Frame = Clip-&amp;gt;GetFrame( 1, Env);&lt;br /&gt;
 }&lt;br /&gt;
   catch (AvisynthError err) &lt;br /&gt;
 {&lt;br /&gt;
   printf(&amp;quot;%s\n&amp;quot;, err.msg);&lt;br /&gt;
   return 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== VideoFrameBuffer ==&lt;br /&gt;
&lt;br /&gt;
VideoFrameBuffer (VFB) holds information about a memory block which is used for video data. For efficiency, instances of this class are not deleted when the refcount reaches zero; instead they are stored in a linked list to be reused. The instances are deleted when the corresponding AVS file is closed. Or more accurately, a VideoFrameBuffer once new'd generally is not released until the IScriptEnvironment is deleted, except if SetMemoryMax is exceeded by too much then not in use VideoFrameBuffer's are forcible deleted until SetMemoryMax is satisfied.&lt;br /&gt;
&lt;br /&gt;
== VideoFrame ==&lt;br /&gt;
&lt;br /&gt;
VideoFrame holds a &amp;quot;window&amp;quot; into a VideoFrameBuffer. Operator new is overloaded to recycle class instances. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 src-&amp;gt;GetReadPtr(..)&lt;br /&gt;
&lt;br /&gt;
VideoFrame has the following members: GetPitch, GetRowSize, GetHeight, GetReadPtr, GetWritePtr and IsWritable.&lt;br /&gt;
&lt;br /&gt;
All those filters (except IsWritable) will give you a property (pitch, rowsize, etc ...) of a plane (of the frame it points to). The interleaved formats (BGR(A) or YUY2) consist of one plane, and the planar formats consists of one (Y) or three (YUV) planes. The default plane is just the first plane (which is plane Y for the planar formats).&lt;br /&gt;
&lt;br /&gt;
=== GetPitch ===&lt;br /&gt;
&lt;br /&gt;
  int GetPitch(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pitch&amp;quot; (also called stride) of a frame buffer is the offset (in bytes) from the beginning of one scan line to the beginning of the next. The source and destination buffers won't necessarily have the same pitch. The pitch can vary among frames in a clip, and it can differ from the width of the clip. [todo add link]&lt;br /&gt;
&lt;br /&gt;
The scan line will be padded to a multiple of 8 (if necessary) due to speed reasons, so the pitch will always be a multiple of 8. Image processing is expensive, so SIMD instructions are used to speed tasks up: &amp;lt;br&amp;gt;&lt;br /&gt;
SSE uses 128 bit = 16 byte registers, so 8 YUY2 pixels can be processed the same time. &amp;lt;br&amp;gt;&lt;br /&gt;
AVX uses 256 bit = 32 byte registers, so 16 YUY2 pixels can be processed the same time.&lt;br /&gt;
&lt;br /&gt;
NOTE that the pitch can change anytime, so in most use cases you must request the pitch dynamically.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
GetPitch must be used on every plane (interleaved like YUY2 means 1 plane...) of every PVideoFrame that you want to read or write to. It is the only way to get the size of the Video Buffer (e.g. get the size of PVideoFrame):&lt;br /&gt;
&lt;br /&gt;
 int buffer_size = src-&amp;gt;GetPitch() * src-&amp;gt;GetHeight();  //YUY2, interleaved&lt;br /&gt;
&lt;br /&gt;
This will give you the pitch of the U-plane (it will be zero if the plane doesn't exist):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const int src_pitchUV = src-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
&lt;br /&gt;
=== GetRowSize ===&lt;br /&gt;
&lt;br /&gt;
  int GetRowSize(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetRowSize gives the length of each row in bytes (thus not in pixels). It's usually equal to the pitch or slightly less, but it may be significantly less if the frame in question has been through [[Crop]]. &lt;br /&gt;
This will give you the rowsize of a frame for the interleaved formats, or the rowsize of the Y-plane for the planar formats (being the default plane).&lt;br /&gt;
&lt;br /&gt;
 const int src_width = src-&amp;gt;GetRowSize();&lt;br /&gt;
&lt;br /&gt;
=== GetHeight ===&lt;br /&gt;
&lt;br /&gt;
  int GetHeight(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetHeight gives the height of the plane in pixels.&lt;br /&gt;
&lt;br /&gt;
=== GetReadPtr ===&lt;br /&gt;
&lt;br /&gt;
  const BYTE* GetReadPtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetReadPtr gives you a read pointer to a plane. This will give a read pointer to the default plane:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const unsigned char* srcp = src-&amp;gt;GetReadPtr()&lt;br /&gt;
&lt;br /&gt;
=== GetWritePtr ===&lt;br /&gt;
&lt;br /&gt;
  BYTE* GetWritePtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetWritePtr gives you a write pointer to a plane.&lt;br /&gt;
&lt;br /&gt;
Any buffer you get from NewVideoFrame is guaranteed to be writable (as long as you only assign it to one PVideoFrame). Our filter's dst came from NewVideoFrame, so we can safely call dst-&amp;gt;GetWritePtr(). However, frames you get from other clips via GetFrame may not be writable, in which case GetWritePtr() will return a null pointer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);				&lt;br /&gt;
 unsigned char* dstp = dst-&amp;gt;GetWritePtr();&lt;br /&gt;
&lt;br /&gt;
If you want to write a frame which is not new (the source frame for example), you will have to call MakeWritable first:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 unsigned char* srcp = src-&amp;gt;GetWritePtr(PLANAR_Y);&lt;br /&gt;
&lt;br /&gt;
See IsWritable for more details.&lt;br /&gt;
&lt;br /&gt;
=== IsWritable ===&lt;br /&gt;
&lt;br /&gt;
  bool IsWritable() const;&lt;br /&gt;
&lt;br /&gt;
All frame buffers are readable, but not all are writable. This method can be used to find out if a buffer is writable or not, and there's a MakeWritable callback (described below) to ensure that it is.&lt;br /&gt;
&lt;br /&gt;
The rule about writability is this: A buffer is writable if and only if there is exactly one PVideoFrame pointing to it. In other words, you can only write to a buffer if no one else might be reading it. This rule guarantees that as long as you hold on to a PVideoFrame and don't write to it yourself, that frame will remain unchanged. The only drawback is that you can't have two PVideoFrames pointing to a writable buffer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (src-&amp;gt;IsWritetable()) {...}&lt;br /&gt;
&lt;br /&gt;
== AlignPlanar ==&lt;br /&gt;
&lt;br /&gt;
  AlignPlanar(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
AlignPlanar does nothing, if the pitch of a frame is at least mod16 (16 bytes, being the default frame alignment for luma and chroma). Otherwise it realigns the image, by blitting it to a larger buffer.&lt;br /&gt;
&lt;br /&gt;
Filters can enforce a lower pitch, but they must always apply the AlignPlanar filter after itself, if they intend to return a frame with a lower pitch. VFW delivers a 4 byte alignment for example, so the AlignPlanar filters needs to be applied on all frames when using AviSource.&lt;br /&gt;
&lt;br /&gt;
== FillBorder ==&lt;br /&gt;
&lt;br /&gt;
  FillBorder(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
This function fills up the right side of the picture on planar images with duplicates of the rightmost pixel if the planes are not aligned. That is, if src-&amp;gt;GetRowSize(PLANAR_Y) != src-&amp;gt;GetRowSize(PLANAR_Y_ALIGNED).&lt;br /&gt;
&lt;br /&gt;
== ConvertAudio ==&lt;br /&gt;
&lt;br /&gt;
  ConvertAudio(PClip _clip, int prefered_format);&lt;br /&gt;
&lt;br /&gt;
ConvertAudio converts the sample type of the audio to one of the following sample types: SAMPLE_INT8 (8 bits), SAMPLE_INT16 (16 bits), SAMPLE_INT24 (24 bits), SAMPLE_INT32 (32 bits) or SAMPLE_FLOAT (float).&lt;br /&gt;
&lt;br /&gt;
The following example converts the sample type of the clip child to SAMPLE_INT16 (16 bit) if the input isn’t 16 bit.&lt;br /&gt;
&lt;br /&gt;
 ConvertAudio(child, SAMPLE_INT16);&lt;br /&gt;
&lt;br /&gt;
== IScriptEnvironment ==&lt;br /&gt;
&lt;br /&gt;
AviSynth exports an IScriptEnvironment interface. It enables you to use AviSynth as a library, without writing an AVS script or without going through AVIFile. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 IScriptEnvironment* env&lt;br /&gt;
 env-&amp;gt;Invoke(..)&lt;br /&gt;
&lt;br /&gt;
IScriptEnvironment has the following members: ThrowError, GetCPUFlags, SaveString, Sprintf, VSprintf, Invoke, BitBlt, AtExit, AddFunction, MakeWritable, FunctionExists, GetVar, GetVarDef, SetVar, SetGlobalVar, PushContext, PopContext, NewVideoFrame, CheckVersion, Subframe, SubframePlanar, SetMemoryMax, SetWorkingDir, DeleteScriptEnvironment and ApplyMessage. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== ThrowError ===&lt;br /&gt;
&lt;br /&gt;
  __declspec(noreturn) virtual void __stdcall ThrowError(const char* fmt, ...) = 0;&lt;br /&gt;
&lt;br /&gt;
ThrowError throws an exception (of type AvisynthError). Usually, your error message will end up being displayed on the user's screen in lieu of the video clip they were expecting:&lt;br /&gt;
&lt;br /&gt;
 if (!vi.IsRGB()) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;RGBAdjust requires RGB input&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You can use [http://www.cplusplus.com/reference/cstdio/printf/ format specifiers] to print variables. The additional arguments following fmt are formatted and inserted in the resulting string replacing their respective specifiers:&lt;br /&gt;
&lt;br /&gt;
 if (w[j] &amp;lt; 0.01) {&lt;br /&gt;
  env-&amp;gt;ThrowError(&amp;quot;%s Resizer: [Internal Error] Got Zero Coefficient; j: %d; w[j]: %f&amp;quot;, &amp;quot;Spline&amp;quot;, j, w[j]);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetCPUFlags ===&lt;br /&gt;
&lt;br /&gt;
  virtual long GetCPUFlags();&lt;br /&gt;
&lt;br /&gt;
GetCPUFlags returns the instruction set of your CPU. To find out if you're running for example on a CPU that supports MMX, test:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;GetCPUFlags() &amp;amp; CPUF_MMX&lt;br /&gt;
&lt;br /&gt;
There's a complete list of flags in avisynth.h.&lt;br /&gt;
&lt;br /&gt;
=== SaveString ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* SaveString(const char* s, int length = -1);&lt;br /&gt;
&lt;br /&gt;
This function copies its argument to a safe &amp;quot;permanent&amp;quot; location and returns a pointer to the new location. &lt;br /&gt;
Each ScriptEnvironment instance has a buffer set aside for storing strings, which is expanded as needed. The strings are not deleted until the ScriptEnvironment instance goes away (when the script file is closed, usually). This is usually all the permanence that is needed, since all related filter instances will already be gone by then. &lt;br /&gt;
The returned pointer is not const-qualified, and you're welcome to write to it, as long as you don't stray beyond the bounds of the string.&lt;br /&gt;
&lt;br /&gt;
Example usage (converting a string to upper case):&lt;br /&gt;
&lt;br /&gt;
 AVSValue UCase(AVSValue args, void*, IScriptEnvironment* env) {&lt;br /&gt;
   return _strupr(env-&amp;gt;SaveString(args[0].AsString()));&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Sprintf and VSprintf ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* Sprintf(const char* fmt, ...);&lt;br /&gt;
  virtual char* VSprintf(const char* fmt, char* val);&lt;br /&gt;
&lt;br /&gt;
These store strings away in the same way as SaveString, but they treat their arguments like printf and vprintf. &lt;br /&gt;
Currently there's a size limit of 4096 characters on strings created this way. (The implementation uses _vsnprintf, so you don't need to worry about buffer overrun.) &lt;br /&gt;
&lt;br /&gt;
=== Invoke ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue Invoke(const char* name, const AVSValue args, const char** arg_names=0);&lt;br /&gt;
&lt;br /&gt;
You can use this to call a script function. There are many script functions which can be useful from other filters; for example, the Bob filter uses SeparateFields, and several source filters use UnalignedSplice. Some functions, like Weave, are implemented entirely in terms of other functions. &lt;br /&gt;
If you're calling a function taking exactly one argument, you can simply pass it in the args parameter; Invoke will convert it into an array for you. In order to call a function taking multiple arguments, you will need to create the array yourself; it can be done like this: &lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args,3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
In this case LanczosResize would need to have a parameter-type string like &amp;quot;cii&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Invoking a filter without arguments (for example catching the path of the loaded script with [[Internal_functions/ScriptDir#ScriptDir|ScriptDir]]):&lt;br /&gt;
&lt;br /&gt;
 const char* V = env-&amp;gt;Invoke(&amp;quot;ScriptDir&amp;quot;, AVSValue(0,0)).AsString();&lt;br /&gt;
&lt;br /&gt;
The arg_names parameter can be used to specify named arguments. Named arguments can also be given positionally, if you prefer. For example:&lt;br /&gt;
&lt;br /&gt;
 int size_text = 24;&lt;br /&gt;
 int align = 8;&lt;br /&gt;
 const char *names[] = {NULL, NULL, &amp;quot;align&amp;quot;, &amp;quot;size&amp;quot;, &amp;quot;text_color&amp;quot;};&lt;br /&gt;
 AVSValue avsv[5] = {clip, &amp;quot;text&amp;quot;, align, size_text, 0xFFFF00};&lt;br /&gt;
 clip = env-&amp;gt;Invoke(&amp;quot;Subtitle&amp;quot;, AVSValue(avsv, 5), names).AsClip();&lt;br /&gt;
&lt;br /&gt;
Invoke throws IScriptEnvironment::NotFound if it can't find a matching function prototype. You should be prepared to catch this unless you know that the function exists and will accept the given arguments.&lt;br /&gt;
&lt;br /&gt;
=== BitBlt ===&lt;br /&gt;
&lt;br /&gt;
  virtual void BitBlt(unsigned char* dstp, int dst_pitch, const unsigned char* srcp, int src_pitch, int row_size, int height);&lt;br /&gt;
&lt;br /&gt;
This brilliantly-named function does a line-by-line copy from the source to the destination. It's useful for quite a number of things; the built-in filters DoubleWeave, FlipVertical, AddBorders, PeculiarBlend, StackVertical, StackHorizontal, and ShowFiveVersions all use it to do their dirty work.&lt;br /&gt;
&lt;br /&gt;
In AddBorders it’s to copy the Y-plane from the source to the destination frame (for planar formats):&lt;br /&gt;
&lt;br /&gt;
 const int initial_black = top*dst_pitch + vi.BytesFromPixels(left);&lt;br /&gt;
 if (vi.IsPlanar()) {&lt;br /&gt;
   env-&amp;gt;BitBlt(dstp+initial_black, dst_pitch, srcp, src_pitch, src_row_size, src_height);&lt;br /&gt;
   ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
left is the number of pixels which is added to the left, top the number which is added to the top. So the first source pixel, srcp[0], is copied to its new location dstp[x], and so on. The remaining bytes are zeroed and can be refilled later on.&lt;br /&gt;
&lt;br /&gt;
=== AtExit ===&lt;br /&gt;
&lt;br /&gt;
  virtual void AtExit(ShutdownFunc function, void* user_data);&lt;br /&gt;
&lt;br /&gt;
When IScriptEnvironment is deleted on script close the AtExit functions get run. When you register the function you can optionally provide some user data. When the function is finally called this data will be provided as the argument to the procedure.&lt;br /&gt;
&lt;br /&gt;
The example below (thanks to tsp) loads a library and automatically unloads it (by using AtExit) after the script is closed. It can be useful when your plugin depends on a library and you want to load the library in your script (the plugin fft3dfilter.dll depends on the library fftw3.dll for example):&lt;br /&gt;
&lt;br /&gt;
 void __cdecl UnloadDll(void* hinst, IScriptEnvironment* env) {&lt;br /&gt;
   if (hinst)&lt;br /&gt;
     FreeLibrary(static_cast&amp;lt;HMODULE&amp;gt;(hinst)); &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 AVSValue __cdecl LoadDll(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   HMODULE hinst = 0;&lt;br /&gt;
   hinst = LoadLibrary(args[0].AsString()); // loads a library&lt;br /&gt;
   env-&amp;gt;AtExit(UnloadDll, hinst); // calls UnloadDll to unload the library upon script exit&lt;br /&gt;
   return hinst!=NULL;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== AddFunction ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data) = 0; &lt;br /&gt;
&lt;br /&gt;
The main purpose of the AvisynthPluginInit2 (or AvisynthPluginInit3) function is to call env-&amp;gt;AddFunction.&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;AddFunction(&amp;quot;Sepia&amp;quot;, &amp;quot;c[color]i[mode]s&amp;quot;, Create_Sepia, 0);&lt;br /&gt;
&lt;br /&gt;
AddFunction is called to let Avisynth know of the existence of our filter. It just registers a function with Avisynth's internal function table. This function takes four arguments: the name of the new script function; the parameter-type string; the C++ function implementing the script function; and the user_data cookie.&lt;br /&gt;
&lt;br /&gt;
The added function is of type AVSValue and can therefore return any AVSValue. Here are a few options how to return from the &amp;quot;added&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
 AVSValue __cdecl  returnSomething(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   &lt;br /&gt;
   char *strlit = &amp;quot;AnyOldName&amp;quot;;&lt;br /&gt;
   int len = strlen(strlit);&lt;br /&gt;
   char *s = new char[len+1];&lt;br /&gt;
   if (s==NULL)&lt;br /&gt;
     env-&amp;gt;ThrowError(&amp;quot;Cannot allocate string mem&amp;quot;);&lt;br /&gt;
   strcpy(s, strlit);                              // duplicate&lt;br /&gt;
   char *e = s+len;                                // point at null&lt;br /&gt;
   // make safe copy of string (memory is freed on Avisynth closure)&lt;br /&gt;
   AVSValue ret = env-&amp;gt;SaveString(s,e-s);          // e-s is text len only (excl null) {SaveString uses memcpy)&lt;br /&gt;
   // AVSValue ret = env-&amp;gt;SaveString(s);           // alternative, Avisynth uses strlen to ascertain length&lt;br /&gt;
   delete []s;                                     // delete our temp s buffer&lt;br /&gt;
   return ret;                                     // return saved string as AVSValue&lt;br /&gt;
   // return strlit;                               // alternative to MOST of above code char* converted to AVSValue.&lt;br /&gt;
   // return &amp;quot;AnyOldName&amp;quot;;                         // alternative to ALL of above code char* converted to AVSValue.&lt;br /&gt;
   // String literals are read only and at constant address and so need not be saved.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== MakeWritable ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall MakeWritable(PVideoFrame* pvf) = 0;&lt;br /&gt;
&lt;br /&gt;
MakeWritable only copies the active part of the frame to a completely new frame with a default pitch. You need this to recieve a valid write pointer to an existing frame. &lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
&lt;br /&gt;
=== FunctionExists ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall FunctionExists(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
FunctionExists returns true if the specified filter exists, otherwise returns false: &lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;FunctionExists(&amp;quot;Import&amp;quot;)) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Yes, the IMPORT function exist.&amp;quot;);&lt;br /&gt;
 } else {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;No, the IMPORT function don't exist.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVar(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVar can be used to access AviSynth variables. It will throw an error if the variable doesn't exist.&lt;br /&gt;
&lt;br /&gt;
Internal and external (plugin) functions are, for example, exported as AviSynth variables:&lt;br /&gt;
&lt;br /&gt;
* $InternalFunctions$ Should contain a string consisting of function names of all internal functions.&lt;br /&gt;
* $InternalFunctions!Functionname!Param$ Should contain all parameters for each internal function.&lt;br /&gt;
* $PluginFunctions$ Should contain a string of all plugins in your autoloading plugin folder.&lt;br /&gt;
* $Plugin!Functionname!Param$ Should contain all parameters.&lt;br /&gt;
&lt;br /&gt;
Use env-&amp;gt;GetVar() to access them. This example returns a string consisting of all parameters of ConvertToYV12:&lt;br /&gt;
&lt;br /&gt;
 const char* plugin_dir;&lt;br /&gt;
 plugin_dir = env-&amp;gt;GetVar(&amp;quot;$Plugin!ConverttoYV12!Param$&amp;quot;).AsString();&lt;br /&gt;
&lt;br /&gt;
This example returns the plugin folder which is used to autoload your plugins (and returns an error if it’s not set):&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
   const char* plugin_dir;&lt;br /&gt;
   plugin_dir = env-&amp;gt;GetVar(&amp;quot;$PluginDir$&amp;quot;).AsString();&lt;br /&gt;
   env-&amp;gt;ThrowError(plugin_dir);&lt;br /&gt;
 } catch(...) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Plugin directory not set.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you are making a conditional filter you can use it to get the current framenumber:&lt;br /&gt;
&lt;br /&gt;
 // Get current frame number&lt;br /&gt;
 AVSValue cf = env-&amp;gt;GetVar(&amp;quot;current_frame&amp;quot;);&lt;br /&gt;
 if (!cf.IsInt())&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;MinMaxAudio: This filter can only be used within ConditionalFilter&amp;quot;);&lt;br /&gt;
 int n = cf.AsInt();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
NEVER catch an AviSynth exception inside a plugin and continue normal execution afterwards, see [[AviSynth_Plugin_Writing_Tips]]&lt;br /&gt;
&lt;br /&gt;
=== GetVarDef, v6 ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVarDef(const char* name, const AVSValue&amp;amp; def=AVSValue()) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVarDef can be used to access AviSynth variables. It will return 'def' if the variable doesn't exist (instead of throwing an error):&lt;br /&gt;
&lt;br /&gt;
  int error;&lt;br /&gt;
  AVSValue ret1 = env-&amp;gt;GetVarDef(&amp;quot;VarUnknown&amp;quot;, AVSValue(-1)); // returns -1 when 'VarUnknown' doesn't exist&lt;br /&gt;
  AVSValue ret2 = env-&amp;gt;GetVarDef(&amp;quot;VarUnknown&amp;quot;, AVSValue(-2)); // returns -2 when 'VarUnknown' doesn't exist&lt;br /&gt;
  if (ret1 != ret2)&lt;br /&gt;
    env-&amp;gt;ThrowError(&amp;quot;Plugin: The variable 'VarUnknown' doesn't exist!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Note: One call with a proper default setting is sufficient when either a variable's content or else a default value is needed.&lt;br /&gt;
&lt;br /&gt;
=== SetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
It will return true if the variable was created and filled with the given value. It will return false in case the variable was already there and we just updated its value.&lt;br /&gt;
&lt;br /&gt;
SetVar can be used to set or create AviSynth variables. The created variables are only visible in the local scope, e.g. script functions have a new scope.&lt;br /&gt;
&lt;br /&gt;
This example sets the autoloading plugin folder to &amp;quot;C:\\&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;SetVar(&amp;quot;$PluginDir$&amp;quot;, AVSValue(&amp;quot;C:\\&amp;quot;))) {&lt;br /&gt;
   //variable was created&lt;br /&gt;
 } else {&lt;br /&gt;
   //variable was already existing and updated&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This example sets variables in GetFrame which can be accessed later on in a script within the conditional environment:&lt;br /&gt;
&lt;br /&gt;
 // saves the blue value of a pixel&lt;br /&gt;
 int BlueValue;&lt;br /&gt;
 BlueValue = srcp[x];&lt;br /&gt;
 env-&amp;gt;SetVar(&amp;quot;BlueValue&amp;quot;, AVSValue(BlueValue));&lt;br /&gt;
&lt;br /&gt;
=== SetGlobalVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetGlobalVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
SetGlobalVar can be used to create or set AviSynth variables that are visible within global scope. It is possible that a single filter may want to use SetVar in order to exchange signals to possible other instances of itself.&lt;br /&gt;
&lt;br /&gt;
There are at least 4 different components that make use of Set(Global)Var functions:&lt;br /&gt;
* the core itself&lt;br /&gt;
* the user within the avs script&lt;br /&gt;
* filters/plugins&lt;br /&gt;
* a custom application that invoked the environment&lt;br /&gt;
&lt;br /&gt;
All of above may have their own requirements for the SetVar function. Some may want to be visible globally, others may not.&lt;br /&gt;
&lt;br /&gt;
=== PushContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PushContext(int level=0) = 0;&lt;br /&gt;
&lt;br /&gt;
// TODO - see (also similar functions) http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== PopContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContext() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== PopContextGlobal ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContextGlobal() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== NewVideoFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall NewVideoFrame(const VideoInfo&amp;amp; vi, int align=FRAME_ALIGN) = 0; // default align is 16&lt;br /&gt;
&lt;br /&gt;
The NewVideoFrame callback allocates space for a video frame of the supplied size. (In this case it will hold our filter's output.) The frame buffer is uninitialized raw memory (except that in the debug build it gets filled with the repeating byte pattern 0A 11 0C A7 ED, which is easy to recognize because it looks like &amp;quot;ALLOCATED&amp;quot;). &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;vi&amp;quot; is a protected member of GenericVideoFilter. It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this structure to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
The following example creates a new VideoInfo structure and creates a new video frame from it:&lt;br /&gt;
&lt;br /&gt;
  VideoInfo vi;&lt;br /&gt;
  PVideoFrame frame;&lt;br /&gt;
  memset(&amp;amp;vi, 0, sizeof(VideoInfo));&lt;br /&gt;
  vi.width = 640;&lt;br /&gt;
  vi.height = 480;&lt;br /&gt;
  vi.fps_numerator = 30000;&lt;br /&gt;
  vi.fps_denominator = 1001;&lt;br /&gt;
  vi.num_frames = 107892;   // 1 hour&lt;br /&gt;
  vi.pixel_type = VideoInfo::CS_BGR32;&lt;br /&gt;
  vi.sample_type = SAMPLE_FLOAT;&lt;br /&gt;
  vi.nchannels = 2;&lt;br /&gt;
  vi.audio_samples_per_second = 48000;&lt;br /&gt;
  vi.num_audio_samples = vi.AudioSamplesFromFrames(vi.num_frames);&lt;br /&gt;
  frame = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
=== CheckVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall CheckVersion(int version = AVISYNTH_INTERFACE_VERSION) = 0;&lt;br /&gt;
&lt;br /&gt;
CheckVersion checks the interface version (avisynth.h). It throws an error if ‘version’ is bigger than the used interface version. The following interface versions are in use:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), 5 (v2.6.0a1-v2.6.0a5), or 6 (v2.6.0) [version 4 doesn’t exist].&lt;br /&gt;
&lt;br /&gt;
This example will throw an error if v2.5x or an older AviSynth version is being used:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;CheckVersion(5)&lt;br /&gt;
&lt;br /&gt;
This can be used in a plugin, for example, if it needs at least a certain interface version for it to work.&lt;br /&gt;
&lt;br /&gt;
=== Subframe ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall Subframe(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height) = 0;&lt;br /&gt;
&lt;br /&gt;
Subframe (for interleaved formats) extracts a part of a video frame. For planar formats use SubframePlanar. For examples see SubframePlanar.&lt;br /&gt;
&lt;br /&gt;
=== SubframePlanar ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall SubframePlanar(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV) = 0;&lt;br /&gt;
&lt;br /&gt;
SubframePlanar (for planar formats) extracts a part of a video frame. The example below returns the first field of a frame:&lt;br /&gt;
&lt;br /&gt;
 vi.height &amp;gt;&amp;gt;= 1; // sets new height in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_width = frame-&amp;gt;GetRowSize(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, 2*frame_pitch, frame_width, frame_height&amp;gt;&amp;gt;1, 0, 0, 2*frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies the first row of pixels and moves on to the third row (by moving the offset by ‘2*frame_pitch’). After frame_height/2 it stops reading.&lt;br /&gt;
&lt;br /&gt;
The following example keeps the left 100 pixels of a clip (it leaves the height unaltered) and throws away the rest:&lt;br /&gt;
&lt;br /&gt;
 vi.width = 100; // sets new width in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, frame_pitch, 100, frame_height, 0, 0, frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies 100 pixels and moves on to the next row (by moving the offset by ‘frame_pitch’).&lt;br /&gt;
&lt;br /&gt;
You need to check somewhere that the source frames is more than 100 pixels wide, otherwise throw an error.&lt;br /&gt;
&lt;br /&gt;
=== SetMemoryMax ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetMemoryMax(int mem) = 0;&lt;br /&gt;
&lt;br /&gt;
There is a builtin cache automatically inserted in between all filters. You can use SetmemoryMax to increase the size.&lt;br /&gt;
&lt;br /&gt;
SetMemoryMax only sets the size of the frame buffer cache. It is independent of any other memory allocation. Memory usage due to the frame cache should ramp up pretty quickly to the limited value and stay there. Setting a lower SetMemoryMax value will make more memory available for other purposes and provide less cache buffer frames. It is pointless having more buffers available than are needed by the scripts temporal requirements. If each and every frame generated at each and every stage of a script is only ever used once then the cache is entirely useless. By definition a cache is only useful if a generated element is needed a second or subsequent time.&lt;br /&gt;
&lt;br /&gt;
=== SetWorkingDir ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetWorkingDir(const char * newdir) = 0;&lt;br /&gt;
&lt;br /&gt;
Sets the default directory for AviSynth.&lt;br /&gt;
&lt;br /&gt;
=== DeleteScriptEnvironment, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall DeleteScriptEnvironment() = 0;&lt;br /&gt;
&lt;br /&gt;
Provides a method to delete the ScriptEnvironment which is created with CreateScriptEnvironment.&lt;br /&gt;
&lt;br /&gt;
=== ApplyMessage, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void _stdcall ApplyMessage(PVideoFrame* frame, const VideoInfo&amp;amp; vi, const char* message, int size, int textcolor, int halocolor, int bgcolor) = 0;&lt;br /&gt;
&lt;br /&gt;
ApplyMessage writes text on a frame. For example:&lt;br /&gt;
&lt;br /&gt;
 char BUF[256];&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 sprintf(BUF, &amp;quot;Filter: Frame %d is processed.&amp;quot;, n);&lt;br /&gt;
 env-&amp;gt;ApplyMessage(&amp;amp;src, vi, BUF, vi.width/4, 0xf0f080, 0, 0);&lt;br /&gt;
&lt;br /&gt;
=== GetAVSLinkage , v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual const AVS_Linkage* const __stdcall GetAVSLinkage() = 0;&lt;br /&gt;
&lt;br /&gt;
Returns the [[Filter_SDK/AVS_Linkage|AVSLinkage]].&lt;br /&gt;
&lt;br /&gt;
todo: how and when to use that ...&lt;br /&gt;
&lt;br /&gt;
==  PVideoFrame ==&lt;br /&gt;
&lt;br /&gt;
PVideoFrame is a smart pointer to VideoFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to frame ‘n’ from child:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;child&amp;quot; is a protected member of GenericVideoFilter, of type PClip. It contains the clip that was passed to the constructor. For our filter to produce frame n we need the corresponding frame of the input. If you need a different frame from the input, all you have to do is pass a different frame number to child-&amp;gt;GetFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to a new created VideoFrame from vi (which is a VideoInfo structure):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;vi&amp;quot; is another protected member of GenericVideoFilter (the only other member, actually). It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this struct to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
== IClip ==&lt;br /&gt;
&lt;br /&gt;
An Avisynth filter is simply a C++ class implementing the IClip interface. IClip has four pure virtual methods: GetVideoInfo, GetFrame, GetParity, and GetAudio. &lt;br /&gt;
The class GenericVideoFilter is a simple do-nothing filter defined in avisynth.h. It derives from IClip and implements all four methods. Most filters can inherit from GenericVideoFilter rather than directly from IClip; this saves you from having to implement methods that you don't care about, like GetAudio. &lt;br /&gt;
&lt;br /&gt;
IClip has the following members: GetVersion, GetFrame, GetParity, GetAudio, SetCacheHints and GetVideoInfo. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== GetVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall GetVersion() { return AVISYNTH_INTERFACE_VERSION; }&lt;br /&gt;
&lt;br /&gt;
GetVersion returns the interface version of the loaded avisynth.dll:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), or 6 (v2.6.0) [version 4 doesn’t exist, version 5 refers to the alpha versions of v2.6.0 so you won't need that one].&lt;br /&gt;
&lt;br /&gt;
=== GetFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
GetFrame returns a video frame. In this example, the even frames (0, 2, 4, ...) of ‘child’ are returned:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(2*n, env);&lt;br /&gt;
&lt;br /&gt;
You should do all the GetFrame() calls BEFORE you get any pointers and start manipulating any data.&lt;br /&gt;
&lt;br /&gt;
=== GetParity ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall GetParity(int n) = 0;&lt;br /&gt;
&lt;br /&gt;
GetParity returns the field parity if the clip is field-based, otherwise it returns the parity of first field of a frame. In other words, it distinguishes between top field first (TFF) and bottom field first (BFF). When it returns true, it means that this frame should be considered TFF, otherwise it should be considered BFF.&lt;br /&gt;
&lt;br /&gt;
=== GetAudio ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
Audio processing is handled through the GetAudio method. You must fill in the buffer with count samples beginning at the sample start. A sample may vary from one to four bytes, depending on whether the audio is 8, 16, 24 or 32-bit (float is also 32-bit). The flag vi.SampleType() will tell you this. &lt;br /&gt;
&lt;br /&gt;
If you cannot do your audio processing in-place, you must allocate your own buffer for the source audio using new or malloc.&lt;br /&gt;
&lt;br /&gt;
In this example, the audio of frame ‘n’ is returned (in the buffer ‘samples’):&lt;br /&gt;
&lt;br /&gt;
 VideoInfo vi = child-&amp;gt;GetVideoInfo();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const __int64 start = vi.AudioSamplesFromFrames(n);&lt;br /&gt;
 const __int64 count = vi.AudioSamplesFromFrames(1);&lt;br /&gt;
 SFLOAT* samples = new SFLOAT[count*vi.AudioChannels()];&lt;br /&gt;
 child-&amp;gt;GetAudio(samples, max(0,start), count, env);&lt;br /&gt;
&lt;br /&gt;
=== SetCacheHints ===&lt;br /&gt;
&lt;br /&gt;
  void __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
//  int __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
&lt;br /&gt;
SetCacheHints should be used in filters that request multiple frames from any single PClip source per input GetFrame call. frame_range is maximal 21.&lt;br /&gt;
&lt;br /&gt;
The possible values of cachehints are:&lt;br /&gt;
&lt;br /&gt;
 CACHE_NOTHING=0  // Filter requested no caching.&lt;br /&gt;
 CACHE_RANGE=1  // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
 CACHE_ALL=2  // This is default operation, a simple LRU cache.&lt;br /&gt;
 CACHE_AUDIO=3  // Audio caching.&lt;br /&gt;
 CACHE_AUDIO_NONE=4  // Filter requested no audio caching.&lt;br /&gt;
 CACHE_AUDIO_AUTO=5  // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
&lt;br /&gt;
When caching video frames (cachehints=0, 1, 2), frame_range is the radius around the current frame. When caching audio samples (cachehints=3, 4, 5), the value 0 creates a default buffer of 64kb and positive values allocate frame_range bytes for the cache.&lt;br /&gt;
&lt;br /&gt;
E.g. If you have a single PClip source, i.e. child and you get asked for frame 100 and you in turn then ask for frames 98, 99, 100, 101 and 102 then you need to call CACHE_RANGE with frame_range set to 3:&lt;br /&gt;
&lt;br /&gt;
 child-&amp;gt;SetCacheHints(CACHE_RANGE, 3);&lt;br /&gt;
&lt;br /&gt;
Frames outside the specified radius are candidate for normal LRU caching.&lt;br /&gt;
&lt;br /&gt;
// TODO - describe input and output for v5&lt;br /&gt;
// http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== GetVideoInfo ===&lt;br /&gt;
&lt;br /&gt;
  virtual const VideoInfo&amp;amp; __stdcall GetVideoInfo() = 0;&lt;br /&gt;
&lt;br /&gt;
GetVideoInfo returns a [[Filter_SDK/Cplusplus_API/VideoInfo|VideoInfo]] structure.&lt;br /&gt;
&lt;br /&gt;
== PClip ==&lt;br /&gt;
&lt;br /&gt;
PClip is a smart pointer to an IClip, and IClip is a generic abstract class.. It maintains a reference count on the IClip object and automagically deletes it when the last PClip referencing it goes away. For obvious reasons, you should always use PClip rather than IClip* to refer to clips. &lt;br /&gt;
&lt;br /&gt;
Like a genuine pointer, a PClip is only four bytes long, so you can pass it around by value. Also like a pointer, a PClip can be assigned a null value (0), which is often useful as a sentinel. Unlike a pointer, &lt;br /&gt;
&lt;br /&gt;
PClip is initialized to 0 by default. &lt;br /&gt;
&lt;br /&gt;
You'll need to make sure your class doesn't contain any circular PClip references, or any PClips sitting in dynamically allocated memory that you forget to delete. Other than that, you don't have to worry about the reference-counting machinery. &lt;br /&gt;
&lt;br /&gt;
AviSynth filters have a standardized output channel via IClip, but (unlike VirtualDub filters) no standardized input channel. Each filter is responsible for obtaining its own source material -- usually (as in this case) from another clip, but sometimes from several different clips, or from a file. &lt;br /&gt;
&lt;br /&gt;
The clip functionality must be provided by some concrete subclass of IClip which implements the functions GetFrame(), etc. So you cannot create a PClip without having an appropriate IClip subclass. For most filters, the GenericVideoFilter class provides the basis for this, but 'source' filters (which is basically what you have) do not have a parent clip and so GenericVideoFilter is not appropriate.&lt;br /&gt;
&lt;br /&gt;
== AVSValue ==&lt;br /&gt;
&lt;br /&gt;
Inside Avisynth, the value of a (script) variable is represented by an instance of the class AVSValue. Such objects have a one-character type field which denotes the script language type of the value:&lt;br /&gt;
* 'a' for an array of AVSValues&lt;br /&gt;
* 'b' for boolean&lt;br /&gt;
* 'c' for clip&lt;br /&gt;
* 'f' for float (IEEE single precision (32-bit) floating point)&lt;br /&gt;
* 'i' for int (32-bit signed integer)&lt;br /&gt;
* 's' for string&lt;br /&gt;
* 'v' for void&lt;br /&gt;
&lt;br /&gt;
A variable of type AVSValue, if simply declared and not initialised, will have its type set to 'v' by the AVSValue constructor, meaning void (or 'undefined'), and not just left as random garbage.&lt;br /&gt;
&lt;br /&gt;
A numeric script variable is either an integer or an float. The latter will be the case if the value of the numeric variable contains a dot (so for example the variable x = '10.' will be parsed as float since its value contains a dot).&lt;br /&gt;
&lt;br /&gt;
You can test which type a variable is with the methods (return true or false):&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''true condition'''&lt;br /&gt;
| '''false condition'''&lt;br /&gt;
|-&lt;br /&gt;
| IsArray()&lt;br /&gt;
| variable is an array&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsBool()&lt;br /&gt;
| variable is true or false&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsClip()&lt;br /&gt;
| variable is a clip&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsFloat()&lt;br /&gt;
| variable is float or int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsInt()&lt;br /&gt;
| variable is int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsString()&lt;br /&gt;
| variable is float or string&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| Defined()&lt;br /&gt;
| anything else&lt;br /&gt;
| variable is &amp;quot;undefined&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can get the value of a variable with the methods:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''return type'''&lt;br /&gt;
|-&lt;br /&gt;
| AsBool(), AsBool(bool def)&lt;br /&gt;
| bool&lt;br /&gt;
|-&lt;br /&gt;
| AsClip()&lt;br /&gt;
| PClip&lt;br /&gt;
|-&lt;br /&gt;
| AsDblDef(double def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloat(), AsFloat(float def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloatf(), AsFloatf(float def)&lt;br /&gt;
| float&lt;br /&gt;
|-&lt;br /&gt;
| AsInt(), AsInt(int def)&lt;br /&gt;
| int&lt;br /&gt;
|-&lt;br /&gt;
| AsString(), AsString(const char* def)&lt;br /&gt;
| const char*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Boolean values are not treated as numeric (unlike C).&lt;br /&gt;
&lt;br /&gt;
Note that not all 32-bit integers can be represented as IEEE 32-bit floating point numbers. 16777216 and 16777217 have the same IEEE 32-bit floating point representation. Namely [0|10010111|00000000000000000000000]. See [[Float|IEEE-754]] for more information.&lt;br /&gt;
&lt;br /&gt;
For arrays, you can use the ArraySize() method to get the number of elements, and [] indexing to get the elements themselves.&lt;br /&gt;
&lt;br /&gt;
AVSValue holds an array of AVSValues in the following way:&lt;br /&gt;
&lt;br /&gt;
AVSValue(const AVSValue* a, int size) { type = 'a'; array = a; array_size = size; }&lt;br /&gt;
&lt;br /&gt;
'''Examples'''&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
Using Invoke to apply a filter:&lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args, 3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
&lt;br /&gt;
 AVSValue(up_args, 3)&lt;br /&gt;
&lt;br /&gt;
returns the following: {'a'; {child, 384, 288}; 3}.&lt;br /&gt;
&lt;br /&gt;
Also [[#Invoke|Invoke]] returns an AVSValue (see its declaration) which in that case is a PClip.&lt;br /&gt;
&lt;br /&gt;
You can get the number of elements of up_args and its elements in the following way:&lt;br /&gt;
  &lt;br /&gt;
  int num_args, width, height;&lt;br /&gt;
  PClip clip;&lt;br /&gt;
  if (up_args.IsArray()) {&lt;br /&gt;
    num_args = up_args.ArraySize();&lt;br /&gt;
    clip = up_args[1].AsClip();&lt;br /&gt;
    width = up_args[2].AsInt();&lt;br /&gt;
    height = up_args[3].AsInt();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Integers and floats'''&lt;br /&gt;
&lt;br /&gt;
Note that 123.0 can be accurately represented as an int, float or double. So for getting the exact value of x=123.0 you can use either AsInt(123), AsFloat(x), AsFloatf(x) or AsDblDef(x). All of them will return the same value with the same accuracy.&lt;br /&gt;
&lt;br /&gt;
As noted above, 16777217 can't be accurately represented as a float. So for getting the exact value of x=16777217.0 you need to use either AsInt(16777217) or AsDblDef(x). Both will return the same value with the same accuracy. Note that AsFloat() will return a double, but it is cast to a float first (losing accuracy).&lt;br /&gt;
&lt;br /&gt;
= Structures =&lt;br /&gt;
&lt;br /&gt;
The following structure is available: VideoInfo structure. It holds global information about a clip (i.e. information that does not depend on the framenumber). The GetVideoInfo method in IClip returns this structure. A description (for AVISYNTH_INTERFACE_VERSION=6) of it can be found [[Filter_SDK/Cplusplus_API/VideoInfo|here]].&lt;br /&gt;
&lt;br /&gt;
= Constants =&lt;br /&gt;
&lt;br /&gt;
The following constants are defined in avisynth.h:&lt;br /&gt;
&lt;br /&gt;
 // Audio Sample information&lt;br /&gt;
 typedef float SFLOAT;&lt;br /&gt;
&lt;br /&gt;
 enum { // sample types&lt;br /&gt;
   SAMPLE_INT8  = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   SAMPLE_INT16 = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   SAMPLE_INT24 = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   SAMPLE_INT32 = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   SAMPLE_FLOAT = 1&amp;lt;&amp;lt;4&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // plane types&lt;br /&gt;
   PLANAR_Y         = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   PLANAR_U         = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   PLANAR_V         = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   PLANAR_ALIGNED   = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   PLANAR_Y_ALIGNED = PLANAR_Y | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_U_ALIGNED = PLANAR_U | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_V_ALIGNED = PLANAR_V | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_A         = 1&amp;lt;&amp;lt;4,                       // v5&lt;br /&gt;
   PLANAR_R         = 1&amp;lt;&amp;lt;5,                       // v5&lt;br /&gt;
   PLANAR_G         = 1&amp;lt;&amp;lt;6,                       // v5&lt;br /&gt;
   PLANAR_B         = 1&amp;lt;&amp;lt;7,                       // v5&lt;br /&gt;
   PLANAR_A_ALIGNED = PLANAR_A | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_R_ALIGNED = PLANAR_R | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_G_ALIGNED = PLANAR_G | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_B_ALIGNED = PLANAR_B | PLANAR_ALIGNED,  // v5&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // cache types&lt;br /&gt;
   // Old 2.5 poorly defined cache hints (v3).&lt;br /&gt;
   // Reserve values used by 2.5 API&lt;br /&gt;
   // Do not use in new filters&lt;br /&gt;
   CACHE_25_NOTHING             = 0, // Filter requested no caching.&lt;br /&gt;
   CACHE_25_RANGE               = 1, // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
   CACHE_25_ALL                 = 2, // This is default operation, a simple LRU cache.&lt;br /&gt;
   CACHE_25_AUDIO               = 3, // Audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_NONE          = 4, // Filter requested no audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_AUTO          = 5, // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
 &lt;br /&gt;
   // New 2.6 explicitly defined cache hints (v5).&lt;br /&gt;
   CACHE_NOTHING                = 10, // Do not cache video.&lt;br /&gt;
   CACHE_WINDOW                 = 11, // Hard protect upto X frames within a range of X from the current frame N.&lt;br /&gt;
   CACHE_GENERIC                = 12, // LRU cache upto X frames.&lt;br /&gt;
   CACHE_FORCE_GENERIC          = 13, // LRU cache upto X frames, override any previous CACHE_WINDOW.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_POLICY             = 30, // Get the current policy.&lt;br /&gt;
   CACHE_GET_WINDOW             = 31, // Get the current window h_span.&lt;br /&gt;
   CACHE_GET_RANGE              = 32, // Get the current generic frame range.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_AUDIO                  = 50, // Explicitly do cache audio, X byte cache.&lt;br /&gt;
   CACHE_AUDIO_NOTHING          = 51, // Explicitly do not cache audio.&lt;br /&gt;
   CACHE_AUDIO_NONE             = 52, // Audio cache off (auto mode), X byte intial cache.&lt;br /&gt;
   CACHE_AUDIO_AUTO             = 53, // Audio cache on (auto mode), X byte intial cache.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_AUDIO_POLICY       = 70, // Get the current audio policy.&lt;br /&gt;
   CACHE_GET_AUDIO_SIZE         = 71, // Get the current audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_FRAME         = 100, // Queue request to prefetch frame N.&lt;br /&gt;
   CACHE_PREFETCH_GO            = 101, // Action video prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_AUDIO_BEGIN   = 120, // Begin queue request transaction to prefetch audio (take critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTLO = 121, // Set low 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTHI = 122, // Set high 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COUNT   = 123, // Set low 32 bits of length.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COMMIT  = 124, // Enqueue request transaction to prefetch audio (release critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_GO      = 125, // Action audio prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_CACHE_MODE    = 200, // Cache ask Child for desired video cache mode.&lt;br /&gt;
   CACHE_GETCHILD_CACHE_SIZE    = 201, // Cache ask Child for desired video cache size.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_MODE    = 202, // Cache ask Child for desired audio cache mode.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_SIZE    = 203, // Cache ask Child for desired audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_COST          = 220, // Cache ask Child for estimated processing cost.&lt;br /&gt;
   CACHE_COST_ZERO              = 221, // Child response of zero cost (ptr arithmetic only).&lt;br /&gt;
   CACHE_COST_UNIT              = 222, // Child response of unit cost (less than or equal 1 full frame blit).&lt;br /&gt;
   CACHE_COST_LOW               = 223, // Child response of light cost. (Fast)&lt;br /&gt;
   CACHE_COST_MED               = 224, // Child response of medium cost. (Real time)&lt;br /&gt;
   CACHE_COST_HI                = 225, // Child response of heavy cost. (Slow)&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_THREAD_MODE   = 240, // Cache ask Child for thread safetyness.&lt;br /&gt;
   CACHE_THREAD_UNSAFE          = 241, // Only 1 thread allowed for all instances. 2.5 filters default!&lt;br /&gt;
   CACHE_THREAD_CLASS           = 242, // Only 1 thread allowed for each instance. 2.6 filters default!&lt;br /&gt;
   CACHE_THREAD_SAFE            = 243, //  Allow all threads in any instance.&lt;br /&gt;
   CACHE_THREAD_OWN             = 244, // Safe but limit to 1 thread, internally threaded.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_ACCESS_COST   = 260, // Cache ask Child for preferred access pattern.&lt;br /&gt;
   CACHE_ACCESS_RAND            = 261, // Filter is access order agnostic.&lt;br /&gt;
   CACHE_ACCESS_SEQ0            = 262, // Filter prefers sequential access (low cost)&lt;br /&gt;
   CACHE_ACCESS_SEQ1            = 263, // Filter needs sequential access (high cost)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // For GetCPUFlags.  These are backwards-compatible with those in VirtualDub.&lt;br /&gt;
                    /* oldest CPU to support extension */&lt;br /&gt;
   CPUF_FORCE       =  0x01,   //  N/A&lt;br /&gt;
   CPUF_FPU         =  0x02,   //  386/486DX&lt;br /&gt;
   CPUF_MMX         =  0x04,   //  P55C, K6, PII&lt;br /&gt;
   CPUF_INTEGER_SSE =  0x08,   //  PIII, Athlon&lt;br /&gt;
   CPUF_SSE         =  0x10,   //  PIII, Athlon XP/MP&lt;br /&gt;
   CPUF_SSE2        =  0x20,   //  PIV, K8&lt;br /&gt;
   CPUF_3DNOW       =  0x40,   //  K6-2&lt;br /&gt;
   CPUF_3DNOW_EXT   =  0x80,   //  Athlon&lt;br /&gt;
   CPUF_X86_64      =  0xA0,   //  Hammer (note: equiv. to 3DNow + SSE2, which only Hammer will have anyway)&lt;br /&gt;
   CPUF_SSE3        = 0x100,   //  PIV+, K8 Venice&lt;br /&gt;
 &lt;br /&gt;
   // Additional CPU flags in 2.6 (v5-v6).&lt;br /&gt;
   CPUF_SSSE3       =  0x200,   //  Core 2&lt;br /&gt;
   CPUF_SSE4        =  0x400,   //  Penryn, Wolfdale, Yorkfield&lt;br /&gt;
   CPUF_SSE4_1      =  0x400,&lt;br /&gt;
   CPUF_SSE4_2      = 0x1000,   //  Nehalem (note this was 0x800 in v5)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Development]]&lt;br /&gt;
[[Category:FilterSDK]]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API</id>
		<title>Filter SDK/Cplusplus API</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API"/>
				<updated>2017-03-11T20:30:15Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* GetVarDef, v6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The header, avisynth.h, declares all the classes, structures and miscellaneous constants of the C++ API that you might need when writing a plugin. All external plugins should #include it:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;avisynth.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note, sometimes there is a reference to a version number of the plugin api (for example v3, v5 or v6). This refers to the value of [[Filter_SDK/AVISYNTH_INTERFACE_VERSION|AVISYNTH_INTERFACE_VERSION]]. The classes and miscellaneous constants are described below.&lt;br /&gt;
&lt;br /&gt;
= CreateScriptEnvironment =&lt;br /&gt;
&lt;br /&gt;
  IScriptEnvironment* __stdcall CreateScriptEnvironment(int version = AVISYNTH_INTERFACE_VERSION);&lt;br /&gt;
&lt;br /&gt;
AviSynth exports this. It enables you to use AviSynth as a library, without writing an AviSynth script or without going through AVIFile. [todo add link]&lt;br /&gt;
&lt;br /&gt;
= Classes =&lt;br /&gt;
&lt;br /&gt;
== AvisynthError ==&lt;br /&gt;
&lt;br /&gt;
AvisynthError(const char* _msg)&lt;br /&gt;
&lt;br /&gt;
Wrap your code in try/catch statements to enable exception handling. AvisynthError will tell you what's wrong.&lt;br /&gt;
&lt;br /&gt;
 try &lt;br /&gt;
 {	&lt;br /&gt;
   Val = Env-&amp;gt;Invoke(&amp;quot;Import&amp;quot;, Args, 0);&lt;br /&gt;
   Clip = Val.AsClip();&lt;br /&gt;
   VidInfo = Clip-&amp;gt;GetVideoInfo();&lt;br /&gt;
   Frame = Clip-&amp;gt;GetFrame( 1, Env);&lt;br /&gt;
 }&lt;br /&gt;
   catch (AvisynthError err) &lt;br /&gt;
 {&lt;br /&gt;
   printf(&amp;quot;%s\n&amp;quot;, err.msg);&lt;br /&gt;
   return 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== VideoFrameBuffer ==&lt;br /&gt;
&lt;br /&gt;
VideoFrameBuffer (VFB) holds information about a memory block which is used for video data. For efficiency, instances of this class are not deleted when the refcount reaches zero; instead they are stored in a linked list to be reused. The instances are deleted when the corresponding AVS file is closed. Or more accurately, a VideoFrameBuffer once new'd generally is not released until the IScriptEnvironment is deleted, except if SetMemoryMax is exceeded by too much then not in use VideoFrameBuffer's are forcible deleted until SetMemoryMax is satisfied.&lt;br /&gt;
&lt;br /&gt;
== VideoFrame ==&lt;br /&gt;
&lt;br /&gt;
VideoFrame holds a &amp;quot;window&amp;quot; into a VideoFrameBuffer. Operator new is overloaded to recycle class instances. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 src-&amp;gt;GetReadPtr(..)&lt;br /&gt;
&lt;br /&gt;
VideoFrame has the following members: GetPitch, GetRowSize, GetHeight, GetReadPtr, GetWritePtr and IsWritable.&lt;br /&gt;
&lt;br /&gt;
All those filters (except IsWritable) will give you a property (pitch, rowsize, etc ...) of a plane (of the frame it points to). The interleaved formats (BGR(A) or YUY2) consist of one plane, and the planar formats consists of one (Y) or three (YUV) planes. The default plane is just the first plane (which is plane Y for the planar formats).&lt;br /&gt;
&lt;br /&gt;
=== GetPitch ===&lt;br /&gt;
&lt;br /&gt;
  int GetPitch(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pitch&amp;quot; (also called stride) of a frame buffer is the offset (in bytes) from the beginning of one scan line to the beginning of the next. The source and destination buffers won't necessarily have the same pitch. The pitch can vary among frames in a clip, and it can differ from the width of the clip. [todo add link]&lt;br /&gt;
&lt;br /&gt;
The scan line will be padded to a multiple of 8 (if necessary) due to speed reasons, so the pitch will always be a multiple of 8. Image processing is expensive, so SIMD instructions are used to speed tasks up: &amp;lt;br&amp;gt;&lt;br /&gt;
SSE uses 128 bit = 16 byte registers, so 8 YUY2 pixels can be processed the same time. &amp;lt;br&amp;gt;&lt;br /&gt;
AVX uses 256 bit = 32 byte registers, so 16 YUY2 pixels can be processed the same time.&lt;br /&gt;
&lt;br /&gt;
NOTE that the pitch can change anytime, so in most use cases you must request the pitch dynamically.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
GetPitch must be used on every plane (interleaved like YUY2 means 1 plane...) of every PVideoFrame that you want to read or write to. It is the only way to get the size of the Video Buffer (e.g. get the size of PVideoFrame):&lt;br /&gt;
&lt;br /&gt;
 int buffer_size = src-&amp;gt;GetPitch() * src-&amp;gt;GetHeight();  //YUY2, interleaved&lt;br /&gt;
&lt;br /&gt;
This will give you the pitch of the U-plane (it will be zero if the plane doesn't exist):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const int src_pitchUV = src-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
&lt;br /&gt;
=== GetRowSize ===&lt;br /&gt;
&lt;br /&gt;
  int GetRowSize(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetRowSize gives the length of each row in bytes (thus not in pixels). It's usually equal to the pitch or slightly less, but it may be significantly less if the frame in question has been through [[Crop]]. &lt;br /&gt;
This will give you the rowsize of a frame for the interleaved formats, or the rowsize of the Y-plane for the planar formats (being the default plane).&lt;br /&gt;
&lt;br /&gt;
 const int src_width = src-&amp;gt;GetRowSize();&lt;br /&gt;
&lt;br /&gt;
=== GetHeight ===&lt;br /&gt;
&lt;br /&gt;
  int GetHeight(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetHeight gives the height of the plane in pixels.&lt;br /&gt;
&lt;br /&gt;
=== GetReadPtr ===&lt;br /&gt;
&lt;br /&gt;
  const BYTE* GetReadPtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetReadPtr gives you a read pointer to a plane. This will give a read pointer to the default plane:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const unsigned char* srcp = src-&amp;gt;GetReadPtr()&lt;br /&gt;
&lt;br /&gt;
=== GetWritePtr ===&lt;br /&gt;
&lt;br /&gt;
  BYTE* GetWritePtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetWritePtr gives you a write pointer to a plane.&lt;br /&gt;
&lt;br /&gt;
Any buffer you get from NewVideoFrame is guaranteed to be writable (as long as you only assign it to one PVideoFrame). Our filter's dst came from NewVideoFrame, so we can safely call dst-&amp;gt;GetWritePtr(). However, frames you get from other clips via GetFrame may not be writable, in which case GetWritePtr() will return a null pointer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);				&lt;br /&gt;
 unsigned char* dstp = dst-&amp;gt;GetWritePtr();&lt;br /&gt;
&lt;br /&gt;
If you want to write a frame which is not new (the source frame for example), you will have to call MakeWritable first:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 unsigned char* srcp = src-&amp;gt;GetWritePtr(PLANAR_Y);&lt;br /&gt;
&lt;br /&gt;
See IsWritable for more details.&lt;br /&gt;
&lt;br /&gt;
=== IsWritable ===&lt;br /&gt;
&lt;br /&gt;
  bool IsWritable() const;&lt;br /&gt;
&lt;br /&gt;
All frame buffers are readable, but not all are writable. This method can be used to find out if a buffer is writable or not, and there's a MakeWritable callback (described below) to ensure that it is.&lt;br /&gt;
&lt;br /&gt;
The rule about writability is this: A buffer is writable if and only if there is exactly one PVideoFrame pointing to it. In other words, you can only write to a buffer if no one else might be reading it. This rule guarantees that as long as you hold on to a PVideoFrame and don't write to it yourself, that frame will remain unchanged. The only drawback is that you can't have two PVideoFrames pointing to a writable buffer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (src-&amp;gt;IsWritetable()) {...}&lt;br /&gt;
&lt;br /&gt;
== AlignPlanar ==&lt;br /&gt;
&lt;br /&gt;
  AlignPlanar(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
AlignPlanar does nothing, if the pitch of a frame is at least mod16 (16 bytes, being the default frame alignment for luma and chroma). Otherwise it realigns the image, by blitting it to a larger buffer.&lt;br /&gt;
&lt;br /&gt;
Filters can enforce a lower pitch, but they must always apply the AlignPlanar filter after itself, if they intend to return a frame with a lower pitch. VFW delivers a 4 byte alignment for example, so the AlignPlanar filters needs to be applied on all frames when using AviSource.&lt;br /&gt;
&lt;br /&gt;
== FillBorder ==&lt;br /&gt;
&lt;br /&gt;
  FillBorder(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
This function fills up the right side of the picture on planar images with duplicates of the rightmost pixel if the planes are not aligned. That is, if src-&amp;gt;GetRowSize(PLANAR_Y) != src-&amp;gt;GetRowSize(PLANAR_Y_ALIGNED).&lt;br /&gt;
&lt;br /&gt;
== ConvertAudio ==&lt;br /&gt;
&lt;br /&gt;
  ConvertAudio(PClip _clip, int prefered_format);&lt;br /&gt;
&lt;br /&gt;
ConvertAudio converts the sample type of the audio to one of the following sample types: SAMPLE_INT8 (8 bits), SAMPLE_INT16 (16 bits), SAMPLE_INT24 (24 bits), SAMPLE_INT32 (32 bits) or SAMPLE_FLOAT (float).&lt;br /&gt;
&lt;br /&gt;
The following example converts the sample type of the clip child to SAMPLE_INT16 (16 bit) if the input isn’t 16 bit.&lt;br /&gt;
&lt;br /&gt;
 ConvertAudio(child, SAMPLE_INT16);&lt;br /&gt;
&lt;br /&gt;
== IScriptEnvironment ==&lt;br /&gt;
&lt;br /&gt;
AviSynth exports an IScriptEnvironment interface. It enables you to use AviSynth as a library, without writing an AVS script or without going through AVIFile. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 IScriptEnvironment* env&lt;br /&gt;
 env-&amp;gt;Invoke(..)&lt;br /&gt;
&lt;br /&gt;
IScriptEnvironment has the following members: ThrowError, GetCPUFlags, SaveString, Sprintf, VSprintf, Invoke, BitBlt, AtExit, AddFunction, MakeWritable, FunctionExists, GetVar, GetVarDef, SetVar, SetGlobalVar, PushContext, PopContext, NewVideoFrame, CheckVersion, Subframe, SubframePlanar, SetMemoryMax, SetWorkingDir, DeleteScriptEnvironment and ApplyMessage. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== ThrowError ===&lt;br /&gt;
&lt;br /&gt;
  __declspec(noreturn) virtual void __stdcall ThrowError(const char* fmt, ...) = 0;&lt;br /&gt;
&lt;br /&gt;
ThrowError throws an exception (of type AvisynthError). Usually, your error message will end up being displayed on the user's screen in lieu of the video clip they were expecting:&lt;br /&gt;
&lt;br /&gt;
 if (!vi.IsRGB()) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;RGBAdjust requires RGB input&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You can use [http://www.cplusplus.com/reference/cstdio/printf/ format specifiers] to print variables. The additional arguments following fmt are formatted and inserted in the resulting string replacing their respective specifiers:&lt;br /&gt;
&lt;br /&gt;
 if (w[j] &amp;lt; 0.01) {&lt;br /&gt;
  env-&amp;gt;ThrowError(&amp;quot;%s Resizer: [Internal Error] Got Zero Coefficient; j: %d; w[j]: %f&amp;quot;, &amp;quot;Spline&amp;quot;, j, w[j]);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetCPUFlags ===&lt;br /&gt;
&lt;br /&gt;
  virtual long GetCPUFlags();&lt;br /&gt;
&lt;br /&gt;
GetCPUFlags returns the instruction set of your CPU. To find out if you're running for example on a CPU that supports MMX, test:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;GetCPUFlags() &amp;amp; CPUF_MMX&lt;br /&gt;
&lt;br /&gt;
There's a complete list of flags in avisynth.h.&lt;br /&gt;
&lt;br /&gt;
=== SaveString ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* SaveString(const char* s, int length = -1);&lt;br /&gt;
&lt;br /&gt;
This function copies its argument to a safe &amp;quot;permanent&amp;quot; location and returns a pointer to the new location. &lt;br /&gt;
Each ScriptEnvironment instance has a buffer set aside for storing strings, which is expanded as needed. The strings are not deleted until the ScriptEnvironment instance goes away (when the script file is closed, usually). This is usually all the permanence that is needed, since all related filter instances will already be gone by then. &lt;br /&gt;
The returned pointer is not const-qualified, and you're welcome to write to it, as long as you don't stray beyond the bounds of the string.&lt;br /&gt;
&lt;br /&gt;
Example usage (converting a string to upper case):&lt;br /&gt;
&lt;br /&gt;
 AVSValue UCase(AVSValue args, void*, IScriptEnvironment* env) {&lt;br /&gt;
   return _strupr(env-&amp;gt;SaveString(args[0].AsString()));&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Sprintf and VSprintf ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* Sprintf(const char* fmt, ...);&lt;br /&gt;
  virtual char* VSprintf(const char* fmt, char* val);&lt;br /&gt;
&lt;br /&gt;
These store strings away in the same way as SaveString, but they treat their arguments like printf and vprintf. &lt;br /&gt;
Currently there's a size limit of 4096 characters on strings created this way. (The implementation uses _vsnprintf, so you don't need to worry about buffer overrun.) &lt;br /&gt;
&lt;br /&gt;
=== Invoke ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue Invoke(const char* name, const AVSValue args, const char** arg_names=0);&lt;br /&gt;
&lt;br /&gt;
You can use this to call a script function. There are many script functions which can be useful from other filters; for example, the Bob filter uses SeparateFields, and several source filters use UnalignedSplice. Some functions, like Weave, are implemented entirely in terms of other functions. &lt;br /&gt;
If you're calling a function taking exactly one argument, you can simply pass it in the args parameter; Invoke will convert it into an array for you. In order to call a function taking multiple arguments, you will need to create the array yourself; it can be done like this: &lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args,3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
In this case LanczosResize would need to have a parameter-type string like &amp;quot;cii&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Invoking a filter without arguments (for example catching the path of the loaded script with [[Internal_functions/ScriptDir#ScriptDir|ScriptDir]]):&lt;br /&gt;
&lt;br /&gt;
 const char* V = env-&amp;gt;Invoke(&amp;quot;ScriptDir&amp;quot;, AVSValue(0,0)).AsString();&lt;br /&gt;
&lt;br /&gt;
The arg_names parameter can be used to specify named arguments. Named arguments can also be given positionally, if you prefer. For example:&lt;br /&gt;
&lt;br /&gt;
 int size_text = 24;&lt;br /&gt;
 int align = 8;&lt;br /&gt;
 const char *names[] = {NULL, NULL, &amp;quot;align&amp;quot;, &amp;quot;size&amp;quot;, &amp;quot;text_color&amp;quot;};&lt;br /&gt;
 AVSValue avsv[5] = {clip, &amp;quot;text&amp;quot;, align, size_text, 0xFFFF00};&lt;br /&gt;
 clip = env-&amp;gt;Invoke(&amp;quot;Subtitle&amp;quot;, AVSValue(avsv, 5), names).AsClip();&lt;br /&gt;
&lt;br /&gt;
Invoke throws IScriptEnvironment::NotFound if it can't find a matching function prototype. You should be prepared to catch this unless you know that the function exists and will accept the given arguments.&lt;br /&gt;
&lt;br /&gt;
=== BitBlt ===&lt;br /&gt;
&lt;br /&gt;
  virtual void BitBlt(unsigned char* dstp, int dst_pitch, const unsigned char* srcp, int src_pitch, int row_size, int height);&lt;br /&gt;
&lt;br /&gt;
This brilliantly-named function does a line-by-line copy from the source to the destination. It's useful for quite a number of things; the built-in filters DoubleWeave, FlipVertical, AddBorders, PeculiarBlend, StackVertical, StackHorizontal, and ShowFiveVersions all use it to do their dirty work.&lt;br /&gt;
&lt;br /&gt;
In AddBorders it’s to copy the Y-plane from the source to the destination frame (for planar formats):&lt;br /&gt;
&lt;br /&gt;
 const int initial_black = top*dst_pitch + vi.BytesFromPixels(left);&lt;br /&gt;
 if (vi.IsPlanar()) {&lt;br /&gt;
   env-&amp;gt;BitBlt(dstp+initial_black, dst_pitch, srcp, src_pitch, src_row_size, src_height);&lt;br /&gt;
   ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
left is the number of pixels which is added to the left, top the number which is added to the top. So the first source pixel, srcp[0], is copied to its new location dstp[x], and so on. The remaining bytes are zeroed and can be refilled later on.&lt;br /&gt;
&lt;br /&gt;
=== AtExit ===&lt;br /&gt;
&lt;br /&gt;
  virtual void AtExit(ShutdownFunc function, void* user_data);&lt;br /&gt;
&lt;br /&gt;
When IScriptEnvironment is deleted on script close the AtExit functions get run. When you register the function you can optionally provide some user data. When the function is finally called this data will be provided as the argument to the procedure.&lt;br /&gt;
&lt;br /&gt;
The example below (thanks to tsp) loads a library and automatically unloads it (by using AtExit) after the script is closed. It can be useful when your plugin depends on a library and you want to load the library in your script (the plugin fft3dfilter.dll depends on the library fftw3.dll for example):&lt;br /&gt;
&lt;br /&gt;
 void __cdecl UnloadDll(void* hinst, IScriptEnvironment* env) {&lt;br /&gt;
   if (hinst)&lt;br /&gt;
     FreeLibrary(static_cast&amp;lt;HMODULE&amp;gt;(hinst)); &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 AVSValue __cdecl LoadDll(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   HMODULE hinst = 0;&lt;br /&gt;
   hinst = LoadLibrary(args[0].AsString()); // loads a library&lt;br /&gt;
   env-&amp;gt;AtExit(UnloadDll, hinst); // calls UnloadDll to unload the library upon script exit&lt;br /&gt;
   return hinst!=NULL;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== AddFunction ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data) = 0; &lt;br /&gt;
&lt;br /&gt;
The main purpose of the AvisynthPluginInit2 (or AvisynthPluginInit3) function is to call env-&amp;gt;AddFunction.&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;AddFunction(&amp;quot;Sepia&amp;quot;, &amp;quot;c[color]i[mode]s&amp;quot;, Create_Sepia, 0);&lt;br /&gt;
&lt;br /&gt;
AddFunction is called to let Avisynth know of the existence of our filter. It just registers a function with Avisynth's internal function table. This function takes four arguments: the name of the new script function; the parameter-type string; the C++ function implementing the script function; and the user_data cookie.&lt;br /&gt;
&lt;br /&gt;
The added function is of type AVSValue and can therefore return any AVSValue. Here are a few options how to return from the &amp;quot;added&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
 AVSValue __cdecl  returnSomething(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   &lt;br /&gt;
   char *strlit = &amp;quot;AnyOldName&amp;quot;;&lt;br /&gt;
   int len = strlen(strlit);&lt;br /&gt;
   char *s = new char[len+1];&lt;br /&gt;
   if (s==NULL)&lt;br /&gt;
     env-&amp;gt;ThrowError(&amp;quot;Cannot allocate string mem&amp;quot;);&lt;br /&gt;
   strcpy(s, strlit);                              // duplicate&lt;br /&gt;
   char *e = s+len;                                // point at null&lt;br /&gt;
   // make safe copy of string (memory is freed on Avisynth closure)&lt;br /&gt;
   AVSValue ret = env-&amp;gt;SaveString(s,e-s);          // e-s is text len only (excl null) {SaveString uses memcpy)&lt;br /&gt;
   // AVSValue ret = env-&amp;gt;SaveString(s);           // alternative, Avisynth uses strlen to ascertain length&lt;br /&gt;
   delete []s;                                     // delete our temp s buffer&lt;br /&gt;
   return ret;                                     // return saved string as AVSValue&lt;br /&gt;
   // return strlit;                               // alternative to MOST of above code char* converted to AVSValue.&lt;br /&gt;
   // return &amp;quot;AnyOldName&amp;quot;;                         // alternative to ALL of above code char* converted to AVSValue.&lt;br /&gt;
   // String literals are read only and at constant address and so need not be saved.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== MakeWritable ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall MakeWritable(PVideoFrame* pvf) = 0;&lt;br /&gt;
&lt;br /&gt;
MakeWritable only copies the active part of the frame to a completely new frame with a default pitch. You need this to recieve a valid write pointer to an existing frame. &lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
&lt;br /&gt;
=== FunctionExists ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall FunctionExists(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
FunctionExists returns true if the specified filter exists, otherwise returns false: &lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;FunctionExists(&amp;quot;Import&amp;quot;)) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Yes, the IMPORT function exist.&amp;quot;);&lt;br /&gt;
 } else {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;No, the IMPORT function don't exist.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVar(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVar can be used to access AviSynth variables. It will throw an error if the variable doesn't exist.&lt;br /&gt;
&lt;br /&gt;
Internal and external (plugin) functions are, for example, exported as AviSynth variables:&lt;br /&gt;
&lt;br /&gt;
* $InternalFunctions$ Should contain a string consisting of function names of all internal functions.&lt;br /&gt;
* $InternalFunctions!Functionname!Param$ Should contain all parameters for each internal function.&lt;br /&gt;
* $PluginFunctions$ Should contain a string of all plugins in your autoloading plugin folder.&lt;br /&gt;
* $Plugin!Functionname!Param$ Should contain all parameters.&lt;br /&gt;
&lt;br /&gt;
Use env-&amp;gt;GetVar() to access them. This example returns a string consisting of all parameters of ConvertToYV12:&lt;br /&gt;
&lt;br /&gt;
 const char* plugin_dir;&lt;br /&gt;
 plugin_dir = env-&amp;gt;GetVar(&amp;quot;$Plugin!ConverttoYV12!Param$&amp;quot;).AsString();&lt;br /&gt;
&lt;br /&gt;
This example returns the plugin folder which is used to autoload your plugins (and returns an error if it’s not set):&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
   const char* plugin_dir;&lt;br /&gt;
   plugin_dir = env-&amp;gt;GetVar(&amp;quot;$PluginDir$&amp;quot;).AsString();&lt;br /&gt;
   env-&amp;gt;ThrowError(plugin_dir);&lt;br /&gt;
 } catch(...) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Plugin directory not set.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you are making a conditional filter you can use it to get the current framenumber:&lt;br /&gt;
&lt;br /&gt;
 // Get current frame number&lt;br /&gt;
 AVSValue cf = env-&amp;gt;GetVar(&amp;quot;current_frame&amp;quot;);&lt;br /&gt;
 if (!cf.IsInt())&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;MinMaxAudio: This filter can only be used within ConditionalFilter&amp;quot;);&lt;br /&gt;
 int n = cf.AsInt();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
=== GetVarDef, v6 ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVarDef(const char* name, const AVSValue&amp;amp; def=AVSValue()) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVarDef can be used to access AviSynth variables. It will return 'def' if the variable doesn't exist (instead of throwing an error):&lt;br /&gt;
&lt;br /&gt;
  int error;&lt;br /&gt;
  AVSValue ret1 = env-&amp;gt;GetVarDef(&amp;quot;VarUnknown&amp;quot;, AVSValue(-1)); // returns -1 when 'VarUnknown' doesn't exist&lt;br /&gt;
  AVSValue ret2 = env-&amp;gt;GetVarDef(&amp;quot;VarUnknown&amp;quot;, AVSValue(-2)); // returns -2 when 'VarUnknown' doesn't exist&lt;br /&gt;
  if (ret1 != ret2)&lt;br /&gt;
    env-&amp;gt;ThrowError(&amp;quot;Plugin: The variable 'VarUnknown' doesn't exist!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Note: One call with a proper default setting is sufficient when either a variable's content or else a default value is needed.&lt;br /&gt;
&lt;br /&gt;
=== SetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
It will return true if the variable was created and filled with the given value. It will return false in case the variable was already there and we just updated its value.&lt;br /&gt;
&lt;br /&gt;
SetVar can be used to set or create AviSynth variables. The created variables are only visible in the local scope, e.g. script functions have a new scope.&lt;br /&gt;
&lt;br /&gt;
This example sets the autoloading plugin folder to &amp;quot;C:\\&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;SetVar(&amp;quot;$PluginDir$&amp;quot;, AVSValue(&amp;quot;C:\\&amp;quot;))) {&lt;br /&gt;
   //variable was created&lt;br /&gt;
 } else {&lt;br /&gt;
   //variable was already existing and updated&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This example sets variables in GetFrame which can be accessed later on in a script within the conditional environment:&lt;br /&gt;
&lt;br /&gt;
 // saves the blue value of a pixel&lt;br /&gt;
 int BlueValue;&lt;br /&gt;
 BlueValue = srcp[x];&lt;br /&gt;
 env-&amp;gt;SetVar(&amp;quot;BlueValue&amp;quot;, AVSValue(BlueValue));&lt;br /&gt;
&lt;br /&gt;
=== SetGlobalVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetGlobalVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
SetGlobalVar can be used to create or set AviSynth variables that are visible within global scope. It is possible that a single filter may want to use SetVar in order to exchange signals to possible other instances of itself.&lt;br /&gt;
&lt;br /&gt;
There are at least 4 different components that make use of Set(Global)Var functions:&lt;br /&gt;
* the core itself&lt;br /&gt;
* the user within the avs script&lt;br /&gt;
* filters/plugins&lt;br /&gt;
* a custom application that invoked the environment&lt;br /&gt;
&lt;br /&gt;
All of above may have their own requirements for the SetVar function. Some may want to be visible globally, others may not.&lt;br /&gt;
&lt;br /&gt;
=== PushContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PushContext(int level=0) = 0;&lt;br /&gt;
&lt;br /&gt;
// TODO - see (also similar functions) http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== PopContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContext() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== PopContextGlobal ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContextGlobal() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== NewVideoFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall NewVideoFrame(const VideoInfo&amp;amp; vi, int align=FRAME_ALIGN) = 0; // default align is 16&lt;br /&gt;
&lt;br /&gt;
The NewVideoFrame callback allocates space for a video frame of the supplied size. (In this case it will hold our filter's output.) The frame buffer is uninitialized raw memory (except that in the debug build it gets filled with the repeating byte pattern 0A 11 0C A7 ED, which is easy to recognize because it looks like &amp;quot;ALLOCATED&amp;quot;). &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;vi&amp;quot; is a protected member of GenericVideoFilter. It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this structure to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
The following example creates a new VideoInfo structure and creates a new video frame from it:&lt;br /&gt;
&lt;br /&gt;
  VideoInfo vi;&lt;br /&gt;
  PVideoFrame frame;&lt;br /&gt;
  memset(&amp;amp;vi, 0, sizeof(VideoInfo));&lt;br /&gt;
  vi.width = 640;&lt;br /&gt;
  vi.height = 480;&lt;br /&gt;
  vi.fps_numerator = 30000;&lt;br /&gt;
  vi.fps_denominator = 1001;&lt;br /&gt;
  vi.num_frames = 107892;   // 1 hour&lt;br /&gt;
  vi.pixel_type = VideoInfo::CS_BGR32;&lt;br /&gt;
  vi.sample_type = SAMPLE_FLOAT;&lt;br /&gt;
  vi.nchannels = 2;&lt;br /&gt;
  vi.audio_samples_per_second = 48000;&lt;br /&gt;
  vi.num_audio_samples = vi.AudioSamplesFromFrames(vi.num_frames);&lt;br /&gt;
  frame = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
=== CheckVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall CheckVersion(int version = AVISYNTH_INTERFACE_VERSION) = 0;&lt;br /&gt;
&lt;br /&gt;
CheckVersion checks the interface version (avisynth.h). It throws an error if ‘version’ is bigger than the used interface version. The following interface versions are in use:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), 5 (v2.6.0a1-v2.6.0a5), or 6 (v2.6.0) [version 4 doesn’t exist].&lt;br /&gt;
&lt;br /&gt;
This example will throw an error if v2.5x or an older AviSynth version is being used:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;CheckVersion(5)&lt;br /&gt;
&lt;br /&gt;
This can be used in a plugin, for example, if it needs at least a certain interface version for it to work.&lt;br /&gt;
&lt;br /&gt;
=== Subframe ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall Subframe(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height) = 0;&lt;br /&gt;
&lt;br /&gt;
Subframe (for interleaved formats) extracts a part of a video frame. For planar formats use SubframePlanar. For examples see SubframePlanar.&lt;br /&gt;
&lt;br /&gt;
=== SubframePlanar ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall SubframePlanar(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV) = 0;&lt;br /&gt;
&lt;br /&gt;
SubframePlanar (for planar formats) extracts a part of a video frame. The example below returns the first field of a frame:&lt;br /&gt;
&lt;br /&gt;
 vi.height &amp;gt;&amp;gt;= 1; // sets new height in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_width = frame-&amp;gt;GetRowSize(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, 2*frame_pitch, frame_width, frame_height&amp;gt;&amp;gt;1, 0, 0, 2*frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies the first row of pixels and moves on to the third row (by moving the offset by ‘2*frame_pitch’). After frame_height/2 it stops reading.&lt;br /&gt;
&lt;br /&gt;
The following example keeps the left 100 pixels of a clip (it leaves the height unaltered) and throws away the rest:&lt;br /&gt;
&lt;br /&gt;
 vi.width = 100; // sets new width in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, frame_pitch, 100, frame_height, 0, 0, frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies 100 pixels and moves on to the next row (by moving the offset by ‘frame_pitch’).&lt;br /&gt;
&lt;br /&gt;
You need to check somewhere that the source frames is more than 100 pixels wide, otherwise throw an error.&lt;br /&gt;
&lt;br /&gt;
=== SetMemoryMax ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetMemoryMax(int mem) = 0;&lt;br /&gt;
&lt;br /&gt;
There is a builtin cache automatically inserted in between all filters. You can use SetmemoryMax to increase the size.&lt;br /&gt;
&lt;br /&gt;
SetMemoryMax only sets the size of the frame buffer cache. It is independent of any other memory allocation. Memory usage due to the frame cache should ramp up pretty quickly to the limited value and stay there. Setting a lower SetMemoryMax value will make more memory available for other purposes and provide less cache buffer frames. It is pointless having more buffers available than are needed by the scripts temporal requirements. If each and every frame generated at each and every stage of a script is only ever used once then the cache is entirely useless. By definition a cache is only useful if a generated element is needed a second or subsequent time.&lt;br /&gt;
&lt;br /&gt;
=== SetWorkingDir ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetWorkingDir(const char * newdir) = 0;&lt;br /&gt;
&lt;br /&gt;
Sets the default directory for AviSynth.&lt;br /&gt;
&lt;br /&gt;
=== DeleteScriptEnvironment, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall DeleteScriptEnvironment() = 0;&lt;br /&gt;
&lt;br /&gt;
Provides a method to delete the ScriptEnvironment which is created with CreateScriptEnvironment.&lt;br /&gt;
&lt;br /&gt;
=== ApplyMessage, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void _stdcall ApplyMessage(PVideoFrame* frame, const VideoInfo&amp;amp; vi, const char* message, int size, int textcolor, int halocolor, int bgcolor) = 0;&lt;br /&gt;
&lt;br /&gt;
ApplyMessage writes text on a frame. For example:&lt;br /&gt;
&lt;br /&gt;
 char BUF[256];&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 sprintf(BUF, &amp;quot;Filter: Frame %d is processed.&amp;quot;, n);&lt;br /&gt;
 env-&amp;gt;ApplyMessage(&amp;amp;src, vi, BUF, vi.width/4, 0xf0f080, 0, 0);&lt;br /&gt;
&lt;br /&gt;
=== GetAVSLinkage , v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual const AVS_Linkage* const __stdcall GetAVSLinkage() = 0;&lt;br /&gt;
&lt;br /&gt;
Returns the [[Filter_SDK/AVS_Linkage|AVSLinkage]].&lt;br /&gt;
&lt;br /&gt;
todo: how and when to use that ...&lt;br /&gt;
&lt;br /&gt;
==  PVideoFrame ==&lt;br /&gt;
&lt;br /&gt;
PVideoFrame is a smart pointer to VideoFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to frame ‘n’ from child:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;child&amp;quot; is a protected member of GenericVideoFilter, of type PClip. It contains the clip that was passed to the constructor. For our filter to produce frame n we need the corresponding frame of the input. If you need a different frame from the input, all you have to do is pass a different frame number to child-&amp;gt;GetFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to a new created VideoFrame from vi (which is a VideoInfo structure):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;vi&amp;quot; is another protected member of GenericVideoFilter (the only other member, actually). It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this struct to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
== IClip ==&lt;br /&gt;
&lt;br /&gt;
An Avisynth filter is simply a C++ class implementing the IClip interface. IClip has four pure virtual methods: GetVideoInfo, GetFrame, GetParity, and GetAudio. &lt;br /&gt;
The class GenericVideoFilter is a simple do-nothing filter defined in avisynth.h. It derives from IClip and implements all four methods. Most filters can inherit from GenericVideoFilter rather than directly from IClip; this saves you from having to implement methods that you don't care about, like GetAudio. &lt;br /&gt;
&lt;br /&gt;
IClip has the following members: GetVersion, GetFrame, GetParity, GetAudio, SetCacheHints and GetVideoInfo. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== GetVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall GetVersion() { return AVISYNTH_INTERFACE_VERSION; }&lt;br /&gt;
&lt;br /&gt;
GetVersion returns the interface version of the loaded avisynth.dll:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), or 6 (v2.6.0) [version 4 doesn’t exist, version 5 refers to the alpha versions of v2.6.0 so you won't need that one].&lt;br /&gt;
&lt;br /&gt;
=== GetFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
GetFrame returns a video frame. In this example, the even frames (0, 2, 4, ...) of ‘child’ are returned:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(2*n, env);&lt;br /&gt;
&lt;br /&gt;
You should do all the GetFrame() calls BEFORE you get any pointers and start manipulating any data.&lt;br /&gt;
&lt;br /&gt;
=== GetParity ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall GetParity(int n) = 0;&lt;br /&gt;
&lt;br /&gt;
GetParity returns the field parity if the clip is field-based, otherwise it returns the parity of first field of a frame. In other words, it distinguishes between top field first (TFF) and bottom field first (BFF). When it returns true, it means that this frame should be considered TFF, otherwise it should be considered BFF.&lt;br /&gt;
&lt;br /&gt;
=== GetAudio ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
Audio processing is handled through the GetAudio method. You must fill in the buffer with count samples beginning at the sample start. A sample may vary from one to four bytes, depending on whether the audio is 8, 16, 24 or 32-bit (float is also 32-bit). The flag vi.SampleType() will tell you this. &lt;br /&gt;
&lt;br /&gt;
If you cannot do your audio processing in-place, you must allocate your own buffer for the source audio using new or malloc.&lt;br /&gt;
&lt;br /&gt;
In this example, the audio of frame ‘n’ is returned (in the buffer ‘samples’):&lt;br /&gt;
&lt;br /&gt;
 VideoInfo vi = child-&amp;gt;GetVideoInfo();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const __int64 start = vi.AudioSamplesFromFrames(n);&lt;br /&gt;
 const __int64 count = vi.AudioSamplesFromFrames(1);&lt;br /&gt;
 SFLOAT* samples = new SFLOAT[count*vi.AudioChannels()];&lt;br /&gt;
 child-&amp;gt;GetAudio(samples, max(0,start), count, env);&lt;br /&gt;
&lt;br /&gt;
=== SetCacheHints ===&lt;br /&gt;
&lt;br /&gt;
  void __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
//  int __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
&lt;br /&gt;
SetCacheHints should be used in filters that request multiple frames from any single PClip source per input GetFrame call. frame_range is maximal 21.&lt;br /&gt;
&lt;br /&gt;
The possible values of cachehints are:&lt;br /&gt;
&lt;br /&gt;
 CACHE_NOTHING=0  // Filter requested no caching.&lt;br /&gt;
 CACHE_RANGE=1  // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
 CACHE_ALL=2  // This is default operation, a simple LRU cache.&lt;br /&gt;
 CACHE_AUDIO=3  // Audio caching.&lt;br /&gt;
 CACHE_AUDIO_NONE=4  // Filter requested no audio caching.&lt;br /&gt;
 CACHE_AUDIO_AUTO=5  // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
&lt;br /&gt;
When caching video frames (cachehints=0, 1, 2), frame_range is the radius around the current frame. When caching audio samples (cachehints=3, 4, 5), the value 0 creates a default buffer of 64kb and positive values allocate frame_range bytes for the cache.&lt;br /&gt;
&lt;br /&gt;
E.g. If you have a single PClip source, i.e. child and you get asked for frame 100 and you in turn then ask for frames 98, 99, 100, 101 and 102 then you need to call CACHE_RANGE with frame_range set to 3:&lt;br /&gt;
&lt;br /&gt;
 child-&amp;gt;SetCacheHints(CACHE_RANGE, 3);&lt;br /&gt;
&lt;br /&gt;
Frames outside the specified radius are candidate for normal LRU caching.&lt;br /&gt;
&lt;br /&gt;
// TODO - describe input and output for v5&lt;br /&gt;
// http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== GetVideoInfo ===&lt;br /&gt;
&lt;br /&gt;
  virtual const VideoInfo&amp;amp; __stdcall GetVideoInfo() = 0;&lt;br /&gt;
&lt;br /&gt;
GetVideoInfo returns a [[Filter_SDK/Cplusplus_API/VideoInfo|VideoInfo]] structure.&lt;br /&gt;
&lt;br /&gt;
== PClip ==&lt;br /&gt;
&lt;br /&gt;
PClip is a smart pointer to an IClip, and IClip is a generic abstract class.. It maintains a reference count on the IClip object and automagically deletes it when the last PClip referencing it goes away. For obvious reasons, you should always use PClip rather than IClip* to refer to clips. &lt;br /&gt;
&lt;br /&gt;
Like a genuine pointer, a PClip is only four bytes long, so you can pass it around by value. Also like a pointer, a PClip can be assigned a null value (0), which is often useful as a sentinel. Unlike a pointer, &lt;br /&gt;
&lt;br /&gt;
PClip is initialized to 0 by default. &lt;br /&gt;
&lt;br /&gt;
You'll need to make sure your class doesn't contain any circular PClip references, or any PClips sitting in dynamically allocated memory that you forget to delete. Other than that, you don't have to worry about the reference-counting machinery. &lt;br /&gt;
&lt;br /&gt;
AviSynth filters have a standardized output channel via IClip, but (unlike VirtualDub filters) no standardized input channel. Each filter is responsible for obtaining its own source material -- usually (as in this case) from another clip, but sometimes from several different clips, or from a file. &lt;br /&gt;
&lt;br /&gt;
The clip functionality must be provided by some concrete subclass of IClip which implements the functions GetFrame(), etc. So you cannot create a PClip without having an appropriate IClip subclass. For most filters, the GenericVideoFilter class provides the basis for this, but 'source' filters (which is basically what you have) do not have a parent clip and so GenericVideoFilter is not appropriate.&lt;br /&gt;
&lt;br /&gt;
== AVSValue ==&lt;br /&gt;
&lt;br /&gt;
Inside Avisynth, the value of a (script) variable is represented by an instance of the class AVSValue. Such objects have a one-character type field which denotes the script language type of the value:&lt;br /&gt;
* 'a' for an array of AVSValues&lt;br /&gt;
* 'b' for boolean&lt;br /&gt;
* 'c' for clip&lt;br /&gt;
* 'f' for float (IEEE single precision (32-bit) floating point)&lt;br /&gt;
* 'i' for int (32-bit signed integer)&lt;br /&gt;
* 's' for string&lt;br /&gt;
* 'v' for void&lt;br /&gt;
&lt;br /&gt;
A variable of type AVSValue, if simply declared and not initialised, will have its type set to 'v' by the AVSValue constructor, meaning void (or 'undefined'), and not just left as random garbage.&lt;br /&gt;
&lt;br /&gt;
A numeric script variable is either an integer or an float. The latter will be the case if the value of the numeric variable contains a dot (so for example the variable x = '10.' will be parsed as float since its value contains a dot).&lt;br /&gt;
&lt;br /&gt;
You can test which type a variable is with the methods (return true or false):&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''true condition'''&lt;br /&gt;
| '''false condition'''&lt;br /&gt;
|-&lt;br /&gt;
| IsArray()&lt;br /&gt;
| variable is an array&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsBool()&lt;br /&gt;
| variable is true or false&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsClip()&lt;br /&gt;
| variable is a clip&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsFloat()&lt;br /&gt;
| variable is float or int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsInt()&lt;br /&gt;
| variable is int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsString()&lt;br /&gt;
| variable is float or string&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| Defined()&lt;br /&gt;
| anything else&lt;br /&gt;
| variable is &amp;quot;undefined&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can get the value of a variable with the methods:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''return type'''&lt;br /&gt;
|-&lt;br /&gt;
| AsBool(), AsBool(bool def)&lt;br /&gt;
| bool&lt;br /&gt;
|-&lt;br /&gt;
| AsClip()&lt;br /&gt;
| PClip&lt;br /&gt;
|-&lt;br /&gt;
| AsDblDef(double def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloat(), AsFloat(float def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloatf(), AsFloatf(float def)&lt;br /&gt;
| float&lt;br /&gt;
|-&lt;br /&gt;
| AsInt(), AsInt(int def)&lt;br /&gt;
| int&lt;br /&gt;
|-&lt;br /&gt;
| AsString(), AsString(const char* def)&lt;br /&gt;
| const char*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Boolean values are not treated as numeric (unlike C).&lt;br /&gt;
&lt;br /&gt;
Note that not all 32-bit integers can be represented as IEEE 32-bit floating point numbers. 16777216 and 16777217 have the same IEEE 32-bit floating point representation. Namely [0|10010111|00000000000000000000000]. See [[Float|IEEE-754]] for more information.&lt;br /&gt;
&lt;br /&gt;
For arrays, you can use the ArraySize() method to get the number of elements, and [] indexing to get the elements themselves.&lt;br /&gt;
&lt;br /&gt;
AVSValue holds an array of AVSValues in the following way:&lt;br /&gt;
&lt;br /&gt;
AVSValue(const AVSValue* a, int size) { type = 'a'; array = a; array_size = size; }&lt;br /&gt;
&lt;br /&gt;
'''Examples'''&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
Using Invoke to apply a filter:&lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args, 3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
&lt;br /&gt;
 AVSValue(up_args, 3)&lt;br /&gt;
&lt;br /&gt;
returns the following: {'a'; {child, 384, 288}; 3}.&lt;br /&gt;
&lt;br /&gt;
Also [[#Invoke|Invoke]] returns an AVSValue (see its declaration) which in that case is a PClip.&lt;br /&gt;
&lt;br /&gt;
You can get the number of elements of up_args and its elements in the following way:&lt;br /&gt;
  &lt;br /&gt;
  int num_args, width, height;&lt;br /&gt;
  PClip clip;&lt;br /&gt;
  if (up_args.IsArray()) {&lt;br /&gt;
    num_args = up_args.ArraySize();&lt;br /&gt;
    clip = up_args[1].AsClip();&lt;br /&gt;
    width = up_args[2].AsInt();&lt;br /&gt;
    height = up_args[3].AsInt();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Integers and floats'''&lt;br /&gt;
&lt;br /&gt;
Note that 123.0 can be accurately represented as an int, float or double. So for getting the exact value of x=123.0 you can use either AsInt(123), AsFloat(x), AsFloatf(x) or AsDblDef(x). All of them will return the same value with the same accuracy.&lt;br /&gt;
&lt;br /&gt;
As noted above, 16777217 can't be accurately represented as a float. So for getting the exact value of x=16777217.0 you need to use either AsInt(16777217) or AsDblDef(x). Both will return the same value with the same accuracy. Note that AsFloat() will return a double, but it is cast to a float first (losing accuracy).&lt;br /&gt;
&lt;br /&gt;
= Structures =&lt;br /&gt;
&lt;br /&gt;
The following structure is available: VideoInfo structure. It holds global information about a clip (i.e. information that does not depend on the framenumber). The GetVideoInfo method in IClip returns this structure. A description (for AVISYNTH_INTERFACE_VERSION=6) of it can be found [[Filter_SDK/Cplusplus_API/VideoInfo|here]].&lt;br /&gt;
&lt;br /&gt;
= Constants =&lt;br /&gt;
&lt;br /&gt;
The following constants are defined in avisynth.h:&lt;br /&gt;
&lt;br /&gt;
 // Audio Sample information&lt;br /&gt;
 typedef float SFLOAT;&lt;br /&gt;
&lt;br /&gt;
 enum { // sample types&lt;br /&gt;
   SAMPLE_INT8  = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   SAMPLE_INT16 = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   SAMPLE_INT24 = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   SAMPLE_INT32 = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   SAMPLE_FLOAT = 1&amp;lt;&amp;lt;4&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // plane types&lt;br /&gt;
   PLANAR_Y         = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   PLANAR_U         = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   PLANAR_V         = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   PLANAR_ALIGNED   = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   PLANAR_Y_ALIGNED = PLANAR_Y | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_U_ALIGNED = PLANAR_U | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_V_ALIGNED = PLANAR_V | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_A         = 1&amp;lt;&amp;lt;4,                       // v5&lt;br /&gt;
   PLANAR_R         = 1&amp;lt;&amp;lt;5,                       // v5&lt;br /&gt;
   PLANAR_G         = 1&amp;lt;&amp;lt;6,                       // v5&lt;br /&gt;
   PLANAR_B         = 1&amp;lt;&amp;lt;7,                       // v5&lt;br /&gt;
   PLANAR_A_ALIGNED = PLANAR_A | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_R_ALIGNED = PLANAR_R | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_G_ALIGNED = PLANAR_G | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_B_ALIGNED = PLANAR_B | PLANAR_ALIGNED,  // v5&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // cache types&lt;br /&gt;
   // Old 2.5 poorly defined cache hints (v3).&lt;br /&gt;
   // Reserve values used by 2.5 API&lt;br /&gt;
   // Do not use in new filters&lt;br /&gt;
   CACHE_25_NOTHING             = 0, // Filter requested no caching.&lt;br /&gt;
   CACHE_25_RANGE               = 1, // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
   CACHE_25_ALL                 = 2, // This is default operation, a simple LRU cache.&lt;br /&gt;
   CACHE_25_AUDIO               = 3, // Audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_NONE          = 4, // Filter requested no audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_AUTO          = 5, // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
 &lt;br /&gt;
   // New 2.6 explicitly defined cache hints (v5).&lt;br /&gt;
   CACHE_NOTHING                = 10, // Do not cache video.&lt;br /&gt;
   CACHE_WINDOW                 = 11, // Hard protect upto X frames within a range of X from the current frame N.&lt;br /&gt;
   CACHE_GENERIC                = 12, // LRU cache upto X frames.&lt;br /&gt;
   CACHE_FORCE_GENERIC          = 13, // LRU cache upto X frames, override any previous CACHE_WINDOW.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_POLICY             = 30, // Get the current policy.&lt;br /&gt;
   CACHE_GET_WINDOW             = 31, // Get the current window h_span.&lt;br /&gt;
   CACHE_GET_RANGE              = 32, // Get the current generic frame range.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_AUDIO                  = 50, // Explicitly do cache audio, X byte cache.&lt;br /&gt;
   CACHE_AUDIO_NOTHING          = 51, // Explicitly do not cache audio.&lt;br /&gt;
   CACHE_AUDIO_NONE             = 52, // Audio cache off (auto mode), X byte intial cache.&lt;br /&gt;
   CACHE_AUDIO_AUTO             = 53, // Audio cache on (auto mode), X byte intial cache.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_AUDIO_POLICY       = 70, // Get the current audio policy.&lt;br /&gt;
   CACHE_GET_AUDIO_SIZE         = 71, // Get the current audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_FRAME         = 100, // Queue request to prefetch frame N.&lt;br /&gt;
   CACHE_PREFETCH_GO            = 101, // Action video prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_AUDIO_BEGIN   = 120, // Begin queue request transaction to prefetch audio (take critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTLO = 121, // Set low 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTHI = 122, // Set high 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COUNT   = 123, // Set low 32 bits of length.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COMMIT  = 124, // Enqueue request transaction to prefetch audio (release critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_GO      = 125, // Action audio prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_CACHE_MODE    = 200, // Cache ask Child for desired video cache mode.&lt;br /&gt;
   CACHE_GETCHILD_CACHE_SIZE    = 201, // Cache ask Child for desired video cache size.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_MODE    = 202, // Cache ask Child for desired audio cache mode.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_SIZE    = 203, // Cache ask Child for desired audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_COST          = 220, // Cache ask Child for estimated processing cost.&lt;br /&gt;
   CACHE_COST_ZERO              = 221, // Child response of zero cost (ptr arithmetic only).&lt;br /&gt;
   CACHE_COST_UNIT              = 222, // Child response of unit cost (less than or equal 1 full frame blit).&lt;br /&gt;
   CACHE_COST_LOW               = 223, // Child response of light cost. (Fast)&lt;br /&gt;
   CACHE_COST_MED               = 224, // Child response of medium cost. (Real time)&lt;br /&gt;
   CACHE_COST_HI                = 225, // Child response of heavy cost. (Slow)&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_THREAD_MODE   = 240, // Cache ask Child for thread safetyness.&lt;br /&gt;
   CACHE_THREAD_UNSAFE          = 241, // Only 1 thread allowed for all instances. 2.5 filters default!&lt;br /&gt;
   CACHE_THREAD_CLASS           = 242, // Only 1 thread allowed for each instance. 2.6 filters default!&lt;br /&gt;
   CACHE_THREAD_SAFE            = 243, //  Allow all threads in any instance.&lt;br /&gt;
   CACHE_THREAD_OWN             = 244, // Safe but limit to 1 thread, internally threaded.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_ACCESS_COST   = 260, // Cache ask Child for preferred access pattern.&lt;br /&gt;
   CACHE_ACCESS_RAND            = 261, // Filter is access order agnostic.&lt;br /&gt;
   CACHE_ACCESS_SEQ0            = 262, // Filter prefers sequential access (low cost)&lt;br /&gt;
   CACHE_ACCESS_SEQ1            = 263, // Filter needs sequential access (high cost)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // For GetCPUFlags.  These are backwards-compatible with those in VirtualDub.&lt;br /&gt;
                    /* oldest CPU to support extension */&lt;br /&gt;
   CPUF_FORCE       =  0x01,   //  N/A&lt;br /&gt;
   CPUF_FPU         =  0x02,   //  386/486DX&lt;br /&gt;
   CPUF_MMX         =  0x04,   //  P55C, K6, PII&lt;br /&gt;
   CPUF_INTEGER_SSE =  0x08,   //  PIII, Athlon&lt;br /&gt;
   CPUF_SSE         =  0x10,   //  PIII, Athlon XP/MP&lt;br /&gt;
   CPUF_SSE2        =  0x20,   //  PIV, K8&lt;br /&gt;
   CPUF_3DNOW       =  0x40,   //  K6-2&lt;br /&gt;
   CPUF_3DNOW_EXT   =  0x80,   //  Athlon&lt;br /&gt;
   CPUF_X86_64      =  0xA0,   //  Hammer (note: equiv. to 3DNow + SSE2, which only Hammer will have anyway)&lt;br /&gt;
   CPUF_SSE3        = 0x100,   //  PIV+, K8 Venice&lt;br /&gt;
 &lt;br /&gt;
   // Additional CPU flags in 2.6 (v5-v6).&lt;br /&gt;
   CPUF_SSSE3       =  0x200,   //  Core 2&lt;br /&gt;
   CPUF_SSE4        =  0x400,   //  Penryn, Wolfdale, Yorkfield&lt;br /&gt;
   CPUF_SSE4_1      =  0x400,&lt;br /&gt;
   CPUF_SSE4_2      = 0x1000,   //  Nehalem (note this was 0x800 in v5)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Development]]&lt;br /&gt;
[[Category:FilterSDK]]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API</id>
		<title>Filter SDK/Cplusplus API</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Filter_SDK/Cplusplus_API"/>
				<updated>2017-03-11T20:27:07Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* GetVarDef, v6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The header, avisynth.h, declares all the classes, structures and miscellaneous constants of the C++ API that you might need when writing a plugin. All external plugins should #include it:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;avisynth.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note, sometimes there is a reference to a version number of the plugin api (for example v3, v5 or v6). This refers to the value of [[Filter_SDK/AVISYNTH_INTERFACE_VERSION|AVISYNTH_INTERFACE_VERSION]]. The classes and miscellaneous constants are described below.&lt;br /&gt;
&lt;br /&gt;
= CreateScriptEnvironment =&lt;br /&gt;
&lt;br /&gt;
  IScriptEnvironment* __stdcall CreateScriptEnvironment(int version = AVISYNTH_INTERFACE_VERSION);&lt;br /&gt;
&lt;br /&gt;
AviSynth exports this. It enables you to use AviSynth as a library, without writing an AviSynth script or without going through AVIFile. [todo add link]&lt;br /&gt;
&lt;br /&gt;
= Classes =&lt;br /&gt;
&lt;br /&gt;
== AvisynthError ==&lt;br /&gt;
&lt;br /&gt;
AvisynthError(const char* _msg)&lt;br /&gt;
&lt;br /&gt;
Wrap your code in try/catch statements to enable exception handling. AvisynthError will tell you what's wrong.&lt;br /&gt;
&lt;br /&gt;
 try &lt;br /&gt;
 {	&lt;br /&gt;
   Val = Env-&amp;gt;Invoke(&amp;quot;Import&amp;quot;, Args, 0);&lt;br /&gt;
   Clip = Val.AsClip();&lt;br /&gt;
   VidInfo = Clip-&amp;gt;GetVideoInfo();&lt;br /&gt;
   Frame = Clip-&amp;gt;GetFrame( 1, Env);&lt;br /&gt;
 }&lt;br /&gt;
   catch (AvisynthError err) &lt;br /&gt;
 {&lt;br /&gt;
   printf(&amp;quot;%s\n&amp;quot;, err.msg);&lt;br /&gt;
   return 1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== VideoFrameBuffer ==&lt;br /&gt;
&lt;br /&gt;
VideoFrameBuffer (VFB) holds information about a memory block which is used for video data. For efficiency, instances of this class are not deleted when the refcount reaches zero; instead they are stored in a linked list to be reused. The instances are deleted when the corresponding AVS file is closed. Or more accurately, a VideoFrameBuffer once new'd generally is not released until the IScriptEnvironment is deleted, except if SetMemoryMax is exceeded by too much then not in use VideoFrameBuffer's are forcible deleted until SetMemoryMax is satisfied.&lt;br /&gt;
&lt;br /&gt;
== VideoFrame ==&lt;br /&gt;
&lt;br /&gt;
VideoFrame holds a &amp;quot;window&amp;quot; into a VideoFrameBuffer. Operator new is overloaded to recycle class instances. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 src-&amp;gt;GetReadPtr(..)&lt;br /&gt;
&lt;br /&gt;
VideoFrame has the following members: GetPitch, GetRowSize, GetHeight, GetReadPtr, GetWritePtr and IsWritable.&lt;br /&gt;
&lt;br /&gt;
All those filters (except IsWritable) will give you a property (pitch, rowsize, etc ...) of a plane (of the frame it points to). The interleaved formats (BGR(A) or YUY2) consist of one plane, and the planar formats consists of one (Y) or three (YUV) planes. The default plane is just the first plane (which is plane Y for the planar formats).&lt;br /&gt;
&lt;br /&gt;
=== GetPitch ===&lt;br /&gt;
&lt;br /&gt;
  int GetPitch(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pitch&amp;quot; (also called stride) of a frame buffer is the offset (in bytes) from the beginning of one scan line to the beginning of the next. The source and destination buffers won't necessarily have the same pitch. The pitch can vary among frames in a clip, and it can differ from the width of the clip. [todo add link]&lt;br /&gt;
&lt;br /&gt;
The scan line will be padded to a multiple of 8 (if necessary) due to speed reasons, so the pitch will always be a multiple of 8. Image processing is expensive, so SIMD instructions are used to speed tasks up: &amp;lt;br&amp;gt;&lt;br /&gt;
SSE uses 128 bit = 16 byte registers, so 8 YUY2 pixels can be processed the same time. &amp;lt;br&amp;gt;&lt;br /&gt;
AVX uses 256 bit = 32 byte registers, so 16 YUY2 pixels can be processed the same time.&lt;br /&gt;
&lt;br /&gt;
NOTE that the pitch can change anytime, so in most use cases you must request the pitch dynamically.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
GetPitch must be used on every plane (interleaved like YUY2 means 1 plane...) of every PVideoFrame that you want to read or write to. It is the only way to get the size of the Video Buffer (e.g. get the size of PVideoFrame):&lt;br /&gt;
&lt;br /&gt;
 int buffer_size = src-&amp;gt;GetPitch() * src-&amp;gt;GetHeight();  //YUY2, interleaved&lt;br /&gt;
&lt;br /&gt;
This will give you the pitch of the U-plane (it will be zero if the plane doesn't exist):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const int src_pitchUV = src-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
&lt;br /&gt;
=== GetRowSize ===&lt;br /&gt;
&lt;br /&gt;
  int GetRowSize(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetRowSize gives the length of each row in bytes (thus not in pixels). It's usually equal to the pitch or slightly less, but it may be significantly less if the frame in question has been through [[Crop]]. &lt;br /&gt;
This will give you the rowsize of a frame for the interleaved formats, or the rowsize of the Y-plane for the planar formats (being the default plane).&lt;br /&gt;
&lt;br /&gt;
 const int src_width = src-&amp;gt;GetRowSize();&lt;br /&gt;
&lt;br /&gt;
=== GetHeight ===&lt;br /&gt;
&lt;br /&gt;
  int GetHeight(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetHeight gives the height of the plane in pixels.&lt;br /&gt;
&lt;br /&gt;
=== GetReadPtr ===&lt;br /&gt;
&lt;br /&gt;
  const BYTE* GetReadPtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetReadPtr gives you a read pointer to a plane. This will give a read pointer to the default plane:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const unsigned char* srcp = src-&amp;gt;GetReadPtr()&lt;br /&gt;
&lt;br /&gt;
=== GetWritePtr ===&lt;br /&gt;
&lt;br /&gt;
  BYTE* GetWritePtr(int plane=0) const;&lt;br /&gt;
&lt;br /&gt;
GetWritePtr gives you a write pointer to a plane.&lt;br /&gt;
&lt;br /&gt;
Any buffer you get from NewVideoFrame is guaranteed to be writable (as long as you only assign it to one PVideoFrame). Our filter's dst came from NewVideoFrame, so we can safely call dst-&amp;gt;GetWritePtr(). However, frames you get from other clips via GetFrame may not be writable, in which case GetWritePtr() will return a null pointer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);				&lt;br /&gt;
 unsigned char* dstp = dst-&amp;gt;GetWritePtr();&lt;br /&gt;
&lt;br /&gt;
If you want to write a frame which is not new (the source frame for example), you will have to call MakeWritable first:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 unsigned char* srcp = src-&amp;gt;GetWritePtr(PLANAR_Y);&lt;br /&gt;
&lt;br /&gt;
See IsWritable for more details.&lt;br /&gt;
&lt;br /&gt;
=== IsWritable ===&lt;br /&gt;
&lt;br /&gt;
  bool IsWritable() const;&lt;br /&gt;
&lt;br /&gt;
All frame buffers are readable, but not all are writable. This method can be used to find out if a buffer is writable or not, and there's a MakeWritable callback (described below) to ensure that it is.&lt;br /&gt;
&lt;br /&gt;
The rule about writability is this: A buffer is writable if and only if there is exactly one PVideoFrame pointing to it. In other words, you can only write to a buffer if no one else might be reading it. This rule guarantees that as long as you hold on to a PVideoFrame and don't write to it yourself, that frame will remain unchanged. The only drawback is that you can't have two PVideoFrames pointing to a writable buffer.&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (src-&amp;gt;IsWritetable()) {...}&lt;br /&gt;
&lt;br /&gt;
== AlignPlanar ==&lt;br /&gt;
&lt;br /&gt;
  AlignPlanar(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
AlignPlanar does nothing, if the pitch of a frame is at least mod16 (16 bytes, being the default frame alignment for luma and chroma). Otherwise it realigns the image, by blitting it to a larger buffer.&lt;br /&gt;
&lt;br /&gt;
Filters can enforce a lower pitch, but they must always apply the AlignPlanar filter after itself, if they intend to return a frame with a lower pitch. VFW delivers a 4 byte alignment for example, so the AlignPlanar filters needs to be applied on all frames when using AviSource.&lt;br /&gt;
&lt;br /&gt;
== FillBorder ==&lt;br /&gt;
&lt;br /&gt;
  FillBorder(PClip _clip);&lt;br /&gt;
&lt;br /&gt;
This function fills up the right side of the picture on planar images with duplicates of the rightmost pixel if the planes are not aligned. That is, if src-&amp;gt;GetRowSize(PLANAR_Y) != src-&amp;gt;GetRowSize(PLANAR_Y_ALIGNED).&lt;br /&gt;
&lt;br /&gt;
== ConvertAudio ==&lt;br /&gt;
&lt;br /&gt;
  ConvertAudio(PClip _clip, int prefered_format);&lt;br /&gt;
&lt;br /&gt;
ConvertAudio converts the sample type of the audio to one of the following sample types: SAMPLE_INT8 (8 bits), SAMPLE_INT16 (16 bits), SAMPLE_INT24 (24 bits), SAMPLE_INT32 (32 bits) or SAMPLE_FLOAT (float).&lt;br /&gt;
&lt;br /&gt;
The following example converts the sample type of the clip child to SAMPLE_INT16 (16 bit) if the input isn’t 16 bit.&lt;br /&gt;
&lt;br /&gt;
 ConvertAudio(child, SAMPLE_INT16);&lt;br /&gt;
&lt;br /&gt;
== IScriptEnvironment ==&lt;br /&gt;
&lt;br /&gt;
AviSynth exports an IScriptEnvironment interface. It enables you to use AviSynth as a library, without writing an AVS script or without going through AVIFile. Its members can be called by:&lt;br /&gt;
&lt;br /&gt;
 IScriptEnvironment* env&lt;br /&gt;
 env-&amp;gt;Invoke(..)&lt;br /&gt;
&lt;br /&gt;
IScriptEnvironment has the following members: ThrowError, GetCPUFlags, SaveString, Sprintf, VSprintf, Invoke, BitBlt, AtExit, AddFunction, MakeWritable, FunctionExists, GetVar, GetVarDef, SetVar, SetGlobalVar, PushContext, PopContext, NewVideoFrame, CheckVersion, Subframe, SubframePlanar, SetMemoryMax, SetWorkingDir, DeleteScriptEnvironment and ApplyMessage. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== ThrowError ===&lt;br /&gt;
&lt;br /&gt;
  __declspec(noreturn) virtual void __stdcall ThrowError(const char* fmt, ...) = 0;&lt;br /&gt;
&lt;br /&gt;
ThrowError throws an exception (of type AvisynthError). Usually, your error message will end up being displayed on the user's screen in lieu of the video clip they were expecting:&lt;br /&gt;
&lt;br /&gt;
 if (!vi.IsRGB()) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;RGBAdjust requires RGB input&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You can use [http://www.cplusplus.com/reference/cstdio/printf/ format specifiers] to print variables. The additional arguments following fmt are formatted and inserted in the resulting string replacing their respective specifiers:&lt;br /&gt;
&lt;br /&gt;
 if (w[j] &amp;lt; 0.01) {&lt;br /&gt;
  env-&amp;gt;ThrowError(&amp;quot;%s Resizer: [Internal Error] Got Zero Coefficient; j: %d; w[j]: %f&amp;quot;, &amp;quot;Spline&amp;quot;, j, w[j]);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetCPUFlags ===&lt;br /&gt;
&lt;br /&gt;
  virtual long GetCPUFlags();&lt;br /&gt;
&lt;br /&gt;
GetCPUFlags returns the instruction set of your CPU. To find out if you're running for example on a CPU that supports MMX, test:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;GetCPUFlags() &amp;amp; CPUF_MMX&lt;br /&gt;
&lt;br /&gt;
There's a complete list of flags in avisynth.h.&lt;br /&gt;
&lt;br /&gt;
=== SaveString ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* SaveString(const char* s, int length = -1);&lt;br /&gt;
&lt;br /&gt;
This function copies its argument to a safe &amp;quot;permanent&amp;quot; location and returns a pointer to the new location. &lt;br /&gt;
Each ScriptEnvironment instance has a buffer set aside for storing strings, which is expanded as needed. The strings are not deleted until the ScriptEnvironment instance goes away (when the script file is closed, usually). This is usually all the permanence that is needed, since all related filter instances will already be gone by then. &lt;br /&gt;
The returned pointer is not const-qualified, and you're welcome to write to it, as long as you don't stray beyond the bounds of the string.&lt;br /&gt;
&lt;br /&gt;
Example usage (converting a string to upper case):&lt;br /&gt;
&lt;br /&gt;
 AVSValue UCase(AVSValue args, void*, IScriptEnvironment* env) {&lt;br /&gt;
   return _strupr(env-&amp;gt;SaveString(args[0].AsString()));&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Sprintf and VSprintf ===&lt;br /&gt;
&lt;br /&gt;
  virtual char* Sprintf(const char* fmt, ...);&lt;br /&gt;
  virtual char* VSprintf(const char* fmt, char* val);&lt;br /&gt;
&lt;br /&gt;
These store strings away in the same way as SaveString, but they treat their arguments like printf and vprintf. &lt;br /&gt;
Currently there's a size limit of 4096 characters on strings created this way. (The implementation uses _vsnprintf, so you don't need to worry about buffer overrun.) &lt;br /&gt;
&lt;br /&gt;
=== Invoke ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue Invoke(const char* name, const AVSValue args, const char** arg_names=0);&lt;br /&gt;
&lt;br /&gt;
You can use this to call a script function. There are many script functions which can be useful from other filters; for example, the Bob filter uses SeparateFields, and several source filters use UnalignedSplice. Some functions, like Weave, are implemented entirely in terms of other functions. &lt;br /&gt;
If you're calling a function taking exactly one argument, you can simply pass it in the args parameter; Invoke will convert it into an array for you. In order to call a function taking multiple arguments, you will need to create the array yourself; it can be done like this: &lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args,3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
In this case LanczosResize would need to have a parameter-type string like &amp;quot;cii&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Invoking a filter without arguments (for example catching the path of the loaded script with [[Internal_functions/ScriptDir#ScriptDir|ScriptDir]]):&lt;br /&gt;
&lt;br /&gt;
 const char* V = env-&amp;gt;Invoke(&amp;quot;ScriptDir&amp;quot;, AVSValue(0,0)).AsString();&lt;br /&gt;
&lt;br /&gt;
The arg_names parameter can be used to specify named arguments. Named arguments can also be given positionally, if you prefer. For example:&lt;br /&gt;
&lt;br /&gt;
 int size_text = 24;&lt;br /&gt;
 int align = 8;&lt;br /&gt;
 const char *names[] = {NULL, NULL, &amp;quot;align&amp;quot;, &amp;quot;size&amp;quot;, &amp;quot;text_color&amp;quot;};&lt;br /&gt;
 AVSValue avsv[5] = {clip, &amp;quot;text&amp;quot;, align, size_text, 0xFFFF00};&lt;br /&gt;
 clip = env-&amp;gt;Invoke(&amp;quot;Subtitle&amp;quot;, AVSValue(avsv, 5), names).AsClip();&lt;br /&gt;
&lt;br /&gt;
Invoke throws IScriptEnvironment::NotFound if it can't find a matching function prototype. You should be prepared to catch this unless you know that the function exists and will accept the given arguments.&lt;br /&gt;
&lt;br /&gt;
=== BitBlt ===&lt;br /&gt;
&lt;br /&gt;
  virtual void BitBlt(unsigned char* dstp, int dst_pitch, const unsigned char* srcp, int src_pitch, int row_size, int height);&lt;br /&gt;
&lt;br /&gt;
This brilliantly-named function does a line-by-line copy from the source to the destination. It's useful for quite a number of things; the built-in filters DoubleWeave, FlipVertical, AddBorders, PeculiarBlend, StackVertical, StackHorizontal, and ShowFiveVersions all use it to do their dirty work.&lt;br /&gt;
&lt;br /&gt;
In AddBorders it’s to copy the Y-plane from the source to the destination frame (for planar formats):&lt;br /&gt;
&lt;br /&gt;
 const int initial_black = top*dst_pitch + vi.BytesFromPixels(left);&lt;br /&gt;
 if (vi.IsPlanar()) {&lt;br /&gt;
   env-&amp;gt;BitBlt(dstp+initial_black, dst_pitch, srcp, src_pitch, src_row_size, src_height);&lt;br /&gt;
   ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
left is the number of pixels which is added to the left, top the number which is added to the top. So the first source pixel, srcp[0], is copied to its new location dstp[x], and so on. The remaining bytes are zeroed and can be refilled later on.&lt;br /&gt;
&lt;br /&gt;
=== AtExit ===&lt;br /&gt;
&lt;br /&gt;
  virtual void AtExit(ShutdownFunc function, void* user_data);&lt;br /&gt;
&lt;br /&gt;
When IScriptEnvironment is deleted on script close the AtExit functions get run. When you register the function you can optionally provide some user data. When the function is finally called this data will be provided as the argument to the procedure.&lt;br /&gt;
&lt;br /&gt;
The example below (thanks to tsp) loads a library and automatically unloads it (by using AtExit) after the script is closed. It can be useful when your plugin depends on a library and you want to load the library in your script (the plugin fft3dfilter.dll depends on the library fftw3.dll for example):&lt;br /&gt;
&lt;br /&gt;
 void __cdecl UnloadDll(void* hinst, IScriptEnvironment* env) {&lt;br /&gt;
   if (hinst)&lt;br /&gt;
     FreeLibrary(static_cast&amp;lt;HMODULE&amp;gt;(hinst)); &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 AVSValue __cdecl LoadDll(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   HMODULE hinst = 0;&lt;br /&gt;
   hinst = LoadLibrary(args[0].AsString()); // loads a library&lt;br /&gt;
   env-&amp;gt;AtExit(UnloadDll, hinst); // calls UnloadDll to unload the library upon script exit&lt;br /&gt;
   return hinst!=NULL;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== AddFunction ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data) = 0; &lt;br /&gt;
&lt;br /&gt;
The main purpose of the AvisynthPluginInit2 (or AvisynthPluginInit3) function is to call env-&amp;gt;AddFunction.&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;AddFunction(&amp;quot;Sepia&amp;quot;, &amp;quot;c[color]i[mode]s&amp;quot;, Create_Sepia, 0);&lt;br /&gt;
&lt;br /&gt;
AddFunction is called to let Avisynth know of the existence of our filter. It just registers a function with Avisynth's internal function table. This function takes four arguments: the name of the new script function; the parameter-type string; the C++ function implementing the script function; and the user_data cookie.&lt;br /&gt;
&lt;br /&gt;
The added function is of type AVSValue and can therefore return any AVSValue. Here are a few options how to return from the &amp;quot;added&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
 AVSValue __cdecl  returnSomething(AVSValue args, void* user_data, IScriptEnvironment* env){&lt;br /&gt;
   &lt;br /&gt;
   char *strlit = &amp;quot;AnyOldName&amp;quot;;&lt;br /&gt;
   int len = strlen(strlit);&lt;br /&gt;
   char *s = new char[len+1];&lt;br /&gt;
   if (s==NULL)&lt;br /&gt;
     env-&amp;gt;ThrowError(&amp;quot;Cannot allocate string mem&amp;quot;);&lt;br /&gt;
   strcpy(s, strlit);                              // duplicate&lt;br /&gt;
   char *e = s+len;                                // point at null&lt;br /&gt;
   // make safe copy of string (memory is freed on Avisynth closure)&lt;br /&gt;
   AVSValue ret = env-&amp;gt;SaveString(s,e-s);          // e-s is text len only (excl null) {SaveString uses memcpy)&lt;br /&gt;
   // AVSValue ret = env-&amp;gt;SaveString(s);           // alternative, Avisynth uses strlen to ascertain length&lt;br /&gt;
   delete []s;                                     // delete our temp s buffer&lt;br /&gt;
   return ret;                                     // return saved string as AVSValue&lt;br /&gt;
   // return strlit;                               // alternative to MOST of above code char* converted to AVSValue.&lt;br /&gt;
   // return &amp;quot;AnyOldName&amp;quot;;                         // alternative to ALL of above code char* converted to AVSValue.&lt;br /&gt;
   // String literals are read only and at constant address and so need not be saved.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== MakeWritable ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall MakeWritable(PVideoFrame* pvf) = 0;&lt;br /&gt;
&lt;br /&gt;
MakeWritable only copies the active part of the frame to a completely new frame with a default pitch. You need this to recieve a valid write pointer to an existing frame. &lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
&lt;br /&gt;
=== FunctionExists ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall FunctionExists(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
FunctionExists returns true if the specified filter exists, otherwise returns false: &lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;FunctionExists(&amp;quot;Import&amp;quot;)) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Yes, the IMPORT function exist.&amp;quot;);&lt;br /&gt;
 } else {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;No, the IMPORT function don't exist.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== GetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVar(const char* name) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVar can be used to access AviSynth variables. It will throw an error if the variable doesn't exist.&lt;br /&gt;
&lt;br /&gt;
Internal and external (plugin) functions are, for example, exported as AviSynth variables:&lt;br /&gt;
&lt;br /&gt;
* $InternalFunctions$ Should contain a string consisting of function names of all internal functions.&lt;br /&gt;
* $InternalFunctions!Functionname!Param$ Should contain all parameters for each internal function.&lt;br /&gt;
* $PluginFunctions$ Should contain a string of all plugins in your autoloading plugin folder.&lt;br /&gt;
* $Plugin!Functionname!Param$ Should contain all parameters.&lt;br /&gt;
&lt;br /&gt;
Use env-&amp;gt;GetVar() to access them. This example returns a string consisting of all parameters of ConvertToYV12:&lt;br /&gt;
&lt;br /&gt;
 const char* plugin_dir;&lt;br /&gt;
 plugin_dir = env-&amp;gt;GetVar(&amp;quot;$Plugin!ConverttoYV12!Param$&amp;quot;).AsString();&lt;br /&gt;
&lt;br /&gt;
This example returns the plugin folder which is used to autoload your plugins (and returns an error if it’s not set):&lt;br /&gt;
&lt;br /&gt;
 try {&lt;br /&gt;
   const char* plugin_dir;&lt;br /&gt;
   plugin_dir = env-&amp;gt;GetVar(&amp;quot;$PluginDir$&amp;quot;).AsString();&lt;br /&gt;
   env-&amp;gt;ThrowError(plugin_dir);&lt;br /&gt;
 } catch(...) {&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;Plugin directory not set.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you are making a conditional filter you can use it to get the current framenumber:&lt;br /&gt;
&lt;br /&gt;
 // Get current frame number&lt;br /&gt;
 AVSValue cf = env-&amp;gt;GetVar(&amp;quot;current_frame&amp;quot;);&lt;br /&gt;
 if (!cf.IsInt())&lt;br /&gt;
   env-&amp;gt;ThrowError(&amp;quot;MinMaxAudio: This filter can only be used within ConditionalFilter&amp;quot;);&lt;br /&gt;
 int n = cf.AsInt();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
=== GetVarDef, v6 ===&lt;br /&gt;
&lt;br /&gt;
  virtual AVSValue __stdcall GetVarDef(const char* name, const AVSValue&amp;amp; def=AVSValue()) = 0;&lt;br /&gt;
&lt;br /&gt;
GetVarDef can be used to access AviSynth variables. It will return 'def' if the variable doesn't exist (instead of throwing an error):&lt;br /&gt;
&lt;br /&gt;
  int error;&lt;br /&gt;
  AVSValue error = env-&amp;gt;GetVarDef(&amp;quot;VarUnknown&amp;quot;, AVSValue(-1)); // returns -1 when 'VarUnknown' doesn't exist&lt;br /&gt;
  if (error==-1)&lt;br /&gt;
    env-&amp;gt;ThrowError(&amp;quot;Plugin: The variable 'VarUnknown' doesn't exist!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Note: the example uses a default value -1 which is returned in both cases when the variable exists and has this value, and when it doesn't exist. A plugin can distinguish only with a second call, e.g. with a different default value if the variable realy exists (both return the same value) or if it doesn't exist (they return the different defaults).&lt;br /&gt;
&lt;br /&gt;
=== SetVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
It will return true if the variable was created and filled with the given value. It will return false in case the variable was already there and we just updated its value.&lt;br /&gt;
&lt;br /&gt;
SetVar can be used to set or create AviSynth variables. The created variables are only visible in the local scope, e.g. script functions have a new scope.&lt;br /&gt;
&lt;br /&gt;
This example sets the autoloading plugin folder to &amp;quot;C:\\&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 if (env-&amp;gt;SetVar(&amp;quot;$PluginDir$&amp;quot;, AVSValue(&amp;quot;C:\\&amp;quot;))) {&lt;br /&gt;
   //variable was created&lt;br /&gt;
 } else {&lt;br /&gt;
   //variable was already existing and updated&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This example sets variables in GetFrame which can be accessed later on in a script within the conditional environment:&lt;br /&gt;
&lt;br /&gt;
 // saves the blue value of a pixel&lt;br /&gt;
 int BlueValue;&lt;br /&gt;
 BlueValue = srcp[x];&lt;br /&gt;
 env-&amp;gt;SetVar(&amp;quot;BlueValue&amp;quot;, AVSValue(BlueValue));&lt;br /&gt;
&lt;br /&gt;
=== SetGlobalVar ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall SetGlobalVar(const char* name, const AVSValue&amp;amp; val) = 0;&lt;br /&gt;
&lt;br /&gt;
WARNING: memory used by ''name'' and ''val.AsString()'' parameters must be allocated till IScriptEnvironment is destroyed.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
SetGlobalVar can be used to create or set AviSynth variables that are visible within global scope. It is possible that a single filter may want to use SetVar in order to exchange signals to possible other instances of itself.&lt;br /&gt;
&lt;br /&gt;
There are at least 4 different components that make use of Set(Global)Var functions:&lt;br /&gt;
* the core itself&lt;br /&gt;
* the user within the avs script&lt;br /&gt;
* filters/plugins&lt;br /&gt;
* a custom application that invoked the environment&lt;br /&gt;
&lt;br /&gt;
All of above may have their own requirements for the SetVar function. Some may want to be visible globally, others may not.&lt;br /&gt;
&lt;br /&gt;
=== PushContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PushContext(int level=0) = 0;&lt;br /&gt;
&lt;br /&gt;
// TODO - see (also similar functions) http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== PopContext ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContext() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== PopContextGlobal ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall PopContextGlobal() = 0;&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== NewVideoFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall NewVideoFrame(const VideoInfo&amp;amp; vi, int align=FRAME_ALIGN) = 0; // default align is 16&lt;br /&gt;
&lt;br /&gt;
The NewVideoFrame callback allocates space for a video frame of the supplied size. (In this case it will hold our filter's output.) The frame buffer is uninitialized raw memory (except that in the debug build it gets filled with the repeating byte pattern 0A 11 0C A7 ED, which is easy to recognize because it looks like &amp;quot;ALLOCATED&amp;quot;). &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;vi&amp;quot; is a protected member of GenericVideoFilter. It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this structure to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
The following example creates a new VideoInfo structure and creates a new video frame from it:&lt;br /&gt;
&lt;br /&gt;
  VideoInfo vi;&lt;br /&gt;
  PVideoFrame frame;&lt;br /&gt;
  memset(&amp;amp;vi, 0, sizeof(VideoInfo));&lt;br /&gt;
  vi.width = 640;&lt;br /&gt;
  vi.height = 480;&lt;br /&gt;
  vi.fps_numerator = 30000;&lt;br /&gt;
  vi.fps_denominator = 1001;&lt;br /&gt;
  vi.num_frames = 107892;   // 1 hour&lt;br /&gt;
  vi.pixel_type = VideoInfo::CS_BGR32;&lt;br /&gt;
  vi.sample_type = SAMPLE_FLOAT;&lt;br /&gt;
  vi.nchannels = 2;&lt;br /&gt;
  vi.audio_samples_per_second = 48000;&lt;br /&gt;
  vi.num_audio_samples = vi.AudioSamplesFromFrames(vi.num_frames);&lt;br /&gt;
  frame = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
=== CheckVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall CheckVersion(int version = AVISYNTH_INTERFACE_VERSION) = 0;&lt;br /&gt;
&lt;br /&gt;
CheckVersion checks the interface version (avisynth.h). It throws an error if ‘version’ is bigger than the used interface version. The following interface versions are in use:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), 5 (v2.6.0a1-v2.6.0a5), or 6 (v2.6.0) [version 4 doesn’t exist].&lt;br /&gt;
&lt;br /&gt;
This example will throw an error if v2.5x or an older AviSynth version is being used:&lt;br /&gt;
&lt;br /&gt;
 env-&amp;gt;CheckVersion(5)&lt;br /&gt;
&lt;br /&gt;
This can be used in a plugin, for example, if it needs at least a certain interface version for it to work.&lt;br /&gt;
&lt;br /&gt;
=== Subframe ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall Subframe(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height) = 0;&lt;br /&gt;
&lt;br /&gt;
Subframe (for interleaved formats) extracts a part of a video frame. For planar formats use SubframePlanar. For examples see SubframePlanar.&lt;br /&gt;
&lt;br /&gt;
=== SubframePlanar ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall SubframePlanar(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV) = 0;&lt;br /&gt;
&lt;br /&gt;
SubframePlanar (for planar formats) extracts a part of a video frame. The example below returns the first field of a frame:&lt;br /&gt;
&lt;br /&gt;
 vi.height &amp;gt;&amp;gt;= 1; // sets new height in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_width = frame-&amp;gt;GetRowSize(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, 2*frame_pitch, frame_width, frame_height&amp;gt;&amp;gt;1, 0, 0, 2*frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies the first row of pixels and moves on to the third row (by moving the offset by ‘2*frame_pitch’). After frame_height/2 it stops reading.&lt;br /&gt;
&lt;br /&gt;
The following example keeps the left 100 pixels of a clip (it leaves the height unaltered) and throws away the rest:&lt;br /&gt;
&lt;br /&gt;
 vi.width = 100; // sets new width in the constructor&lt;br /&gt;
 &lt;br /&gt;
 PVideoFrame frame = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 if (vi.IsPlanar()) { // SubframePlanar works on planar formats only&lt;br /&gt;
   const int frame_pitch = frame-&amp;gt;GetPitch(PLANAR_Y);&lt;br /&gt;
   const int frame_height = frame-&amp;gt;GetHeight(PLANAR_Y);&lt;br /&gt;
   const int frame_pitchUV = frame-&amp;gt;GetPitch(PLANAR_U);&lt;br /&gt;
   return env-&amp;gt;SubframePlanar(frame, 0, frame_pitch, 100, frame_height, 0, 0, frame_pitchUV);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that it copies 100 pixels and moves on to the next row (by moving the offset by ‘frame_pitch’).&lt;br /&gt;
&lt;br /&gt;
You need to check somewhere that the source frames is more than 100 pixels wide, otherwise throw an error.&lt;br /&gt;
&lt;br /&gt;
=== SetMemoryMax ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetMemoryMax(int mem) = 0;&lt;br /&gt;
&lt;br /&gt;
There is a builtin cache automatically inserted in between all filters. You can use SetmemoryMax to increase the size.&lt;br /&gt;
&lt;br /&gt;
SetMemoryMax only sets the size of the frame buffer cache. It is independent of any other memory allocation. Memory usage due to the frame cache should ramp up pretty quickly to the limited value and stay there. Setting a lower SetMemoryMax value will make more memory available for other purposes and provide less cache buffer frames. It is pointless having more buffers available than are needed by the scripts temporal requirements. If each and every frame generated at each and every stage of a script is only ever used once then the cache is entirely useless. By definition a cache is only useful if a generated element is needed a second or subsequent time.&lt;br /&gt;
&lt;br /&gt;
=== SetWorkingDir ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall SetWorkingDir(const char * newdir) = 0;&lt;br /&gt;
&lt;br /&gt;
Sets the default directory for AviSynth.&lt;br /&gt;
&lt;br /&gt;
=== DeleteScriptEnvironment, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall DeleteScriptEnvironment() = 0;&lt;br /&gt;
&lt;br /&gt;
Provides a method to delete the ScriptEnvironment which is created with CreateScriptEnvironment.&lt;br /&gt;
&lt;br /&gt;
=== ApplyMessage, v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual void _stdcall ApplyMessage(PVideoFrame* frame, const VideoInfo&amp;amp; vi, const char* message, int size, int textcolor, int halocolor, int bgcolor) = 0;&lt;br /&gt;
&lt;br /&gt;
ApplyMessage writes text on a frame. For example:&lt;br /&gt;
&lt;br /&gt;
 char BUF[256];&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 env-&amp;gt;MakeWritable(&amp;amp;src);&lt;br /&gt;
 sprintf(BUF, &amp;quot;Filter: Frame %d is processed.&amp;quot;, n);&lt;br /&gt;
 env-&amp;gt;ApplyMessage(&amp;amp;src, vi, BUF, vi.width/4, 0xf0f080, 0, 0);&lt;br /&gt;
&lt;br /&gt;
=== GetAVSLinkage , v5 ===&lt;br /&gt;
&lt;br /&gt;
  virtual const AVS_Linkage* const __stdcall GetAVSLinkage() = 0;&lt;br /&gt;
&lt;br /&gt;
Returns the [[Filter_SDK/AVS_Linkage|AVSLinkage]].&lt;br /&gt;
&lt;br /&gt;
todo: how and when to use that ...&lt;br /&gt;
&lt;br /&gt;
==  PVideoFrame ==&lt;br /&gt;
&lt;br /&gt;
PVideoFrame is a smart pointer to VideoFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to frame ‘n’ from child:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;child&amp;quot; is a protected member of GenericVideoFilter, of type PClip. It contains the clip that was passed to the constructor. For our filter to produce frame n we need the corresponding frame of the input. If you need a different frame from the input, all you have to do is pass a different frame number to child-&amp;gt;GetFrame.&lt;br /&gt;
&lt;br /&gt;
In this example it gives a pointer to a new created VideoFrame from vi (which is a VideoInfo structure):&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame dst = env-&amp;gt;NewVideoFrame(vi);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;vi&amp;quot; is another protected member of GenericVideoFilter (the only other member, actually). It is a structure of type VideoInfo, which contains information about the clip (like frame size, frame rate, pixel format, audio sample rate, etc.). NewVideoFrame uses the information in this struct to return a frame buffer of the appropriate size.&lt;br /&gt;
&lt;br /&gt;
== IClip ==&lt;br /&gt;
&lt;br /&gt;
An Avisynth filter is simply a C++ class implementing the IClip interface. IClip has four pure virtual methods: GetVideoInfo, GetFrame, GetParity, and GetAudio. &lt;br /&gt;
The class GenericVideoFilter is a simple do-nothing filter defined in avisynth.h. It derives from IClip and implements all four methods. Most filters can inherit from GenericVideoFilter rather than directly from IClip; this saves you from having to implement methods that you don't care about, like GetAudio. &lt;br /&gt;
&lt;br /&gt;
IClip has the following members: GetVersion, GetFrame, GetParity, GetAudio, SetCacheHints and GetVideoInfo. They are described in the following subsections.&lt;br /&gt;
&lt;br /&gt;
=== GetVersion ===&lt;br /&gt;
&lt;br /&gt;
  virtual int __stdcall GetVersion() { return AVISYNTH_INTERFACE_VERSION; }&lt;br /&gt;
&lt;br /&gt;
GetVersion returns the interface version of the loaded avisynth.dll:&lt;br /&gt;
&lt;br /&gt;
AVISYNTH_INTERFACE_VERSION = 1 (v1.0-v2.0.8), 2 (v2.5.0-v2.5.5), 3 (v2.5.6-v2.5.8), or 6 (v2.6.0) [version 4 doesn’t exist, version 5 refers to the alpha versions of v2.6.0 so you won't need that one].&lt;br /&gt;
&lt;br /&gt;
=== GetFrame ===&lt;br /&gt;
&lt;br /&gt;
  virtual PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
GetFrame returns a video frame. In this example, the even frames (0, 2, 4, ...) of ‘child’ are returned:&lt;br /&gt;
&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(2*n, env);&lt;br /&gt;
&lt;br /&gt;
You should do all the GetFrame() calls BEFORE you get any pointers and start manipulating any data.&lt;br /&gt;
&lt;br /&gt;
=== GetParity ===&lt;br /&gt;
&lt;br /&gt;
  virtual bool __stdcall GetParity(int n) = 0;&lt;br /&gt;
&lt;br /&gt;
GetParity returns the field parity if the clip is field-based, otherwise it returns the parity of first field of a frame. In other words, it distinguishes between top field first (TFF) and bottom field first (BFF). When it returns true, it means that this frame should be considered TFF, otherwise it should be considered BFF.&lt;br /&gt;
&lt;br /&gt;
=== GetAudio ===&lt;br /&gt;
&lt;br /&gt;
  virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) = 0;&lt;br /&gt;
&lt;br /&gt;
Audio processing is handled through the GetAudio method. You must fill in the buffer with count samples beginning at the sample start. A sample may vary from one to four bytes, depending on whether the audio is 8, 16, 24 or 32-bit (float is also 32-bit). The flag vi.SampleType() will tell you this. &lt;br /&gt;
&lt;br /&gt;
If you cannot do your audio processing in-place, you must allocate your own buffer for the source audio using new or malloc.&lt;br /&gt;
&lt;br /&gt;
In this example, the audio of frame ‘n’ is returned (in the buffer ‘samples’):&lt;br /&gt;
&lt;br /&gt;
 VideoInfo vi = child-&amp;gt;GetVideoInfo();&lt;br /&gt;
 PVideoFrame src = child-&amp;gt;GetFrame(n, env);&lt;br /&gt;
 const __int64 start = vi.AudioSamplesFromFrames(n);&lt;br /&gt;
 const __int64 count = vi.AudioSamplesFromFrames(1);&lt;br /&gt;
 SFLOAT* samples = new SFLOAT[count*vi.AudioChannels()];&lt;br /&gt;
 child-&amp;gt;GetAudio(samples, max(0,start), count, env);&lt;br /&gt;
&lt;br /&gt;
=== SetCacheHints ===&lt;br /&gt;
&lt;br /&gt;
  void __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
//  int __stdcall SetCacheHints(int cachehints, int frame_range) = 0 ;  // We do not pass cache requests upwards, only to the next filter.&lt;br /&gt;
&lt;br /&gt;
SetCacheHints should be used in filters that request multiple frames from any single PClip source per input GetFrame call. frame_range is maximal 21.&lt;br /&gt;
&lt;br /&gt;
The possible values of cachehints are:&lt;br /&gt;
&lt;br /&gt;
 CACHE_NOTHING=0  // Filter requested no caching.&lt;br /&gt;
 CACHE_RANGE=1  // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
 CACHE_ALL=2  // This is default operation, a simple LRU cache.&lt;br /&gt;
 CACHE_AUDIO=3  // Audio caching.&lt;br /&gt;
 CACHE_AUDIO_NONE=4  // Filter requested no audio caching.&lt;br /&gt;
 CACHE_AUDIO_AUTO=5  // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
&lt;br /&gt;
When caching video frames (cachehints=0, 1, 2), frame_range is the radius around the current frame. When caching audio samples (cachehints=3, 4, 5), the value 0 creates a default buffer of 64kb and positive values allocate frame_range bytes for the cache.&lt;br /&gt;
&lt;br /&gt;
E.g. If you have a single PClip source, i.e. child and you get asked for frame 100 and you in turn then ask for frames 98, 99, 100, 101 and 102 then you need to call CACHE_RANGE with frame_range set to 3:&lt;br /&gt;
&lt;br /&gt;
 child-&amp;gt;SetCacheHints(CACHE_RANGE, 3);&lt;br /&gt;
&lt;br /&gt;
Frames outside the specified radius are candidate for normal LRU caching.&lt;br /&gt;
&lt;br /&gt;
// TODO - describe input and output for v5&lt;br /&gt;
// http://forum.doom9.org/showthread.php?p=1595750#post1595750&lt;br /&gt;
&lt;br /&gt;
=== GetVideoInfo ===&lt;br /&gt;
&lt;br /&gt;
  virtual const VideoInfo&amp;amp; __stdcall GetVideoInfo() = 0;&lt;br /&gt;
&lt;br /&gt;
GetVideoInfo returns a [[Filter_SDK/Cplusplus_API/VideoInfo|VideoInfo]] structure.&lt;br /&gt;
&lt;br /&gt;
== PClip ==&lt;br /&gt;
&lt;br /&gt;
PClip is a smart pointer to an IClip, and IClip is a generic abstract class.. It maintains a reference count on the IClip object and automagically deletes it when the last PClip referencing it goes away. For obvious reasons, you should always use PClip rather than IClip* to refer to clips. &lt;br /&gt;
&lt;br /&gt;
Like a genuine pointer, a PClip is only four bytes long, so you can pass it around by value. Also like a pointer, a PClip can be assigned a null value (0), which is often useful as a sentinel. Unlike a pointer, &lt;br /&gt;
&lt;br /&gt;
PClip is initialized to 0 by default. &lt;br /&gt;
&lt;br /&gt;
You'll need to make sure your class doesn't contain any circular PClip references, or any PClips sitting in dynamically allocated memory that you forget to delete. Other than that, you don't have to worry about the reference-counting machinery. &lt;br /&gt;
&lt;br /&gt;
AviSynth filters have a standardized output channel via IClip, but (unlike VirtualDub filters) no standardized input channel. Each filter is responsible for obtaining its own source material -- usually (as in this case) from another clip, but sometimes from several different clips, or from a file. &lt;br /&gt;
&lt;br /&gt;
The clip functionality must be provided by some concrete subclass of IClip which implements the functions GetFrame(), etc. So you cannot create a PClip without having an appropriate IClip subclass. For most filters, the GenericVideoFilter class provides the basis for this, but 'source' filters (which is basically what you have) do not have a parent clip and so GenericVideoFilter is not appropriate.&lt;br /&gt;
&lt;br /&gt;
== AVSValue ==&lt;br /&gt;
&lt;br /&gt;
Inside Avisynth, the value of a (script) variable is represented by an instance of the class AVSValue. Such objects have a one-character type field which denotes the script language type of the value:&lt;br /&gt;
* 'a' for an array of AVSValues&lt;br /&gt;
* 'b' for boolean&lt;br /&gt;
* 'c' for clip&lt;br /&gt;
* 'f' for float (IEEE single precision (32-bit) floating point)&lt;br /&gt;
* 'i' for int (32-bit signed integer)&lt;br /&gt;
* 's' for string&lt;br /&gt;
* 'v' for void&lt;br /&gt;
&lt;br /&gt;
A variable of type AVSValue, if simply declared and not initialised, will have its type set to 'v' by the AVSValue constructor, meaning void (or 'undefined'), and not just left as random garbage.&lt;br /&gt;
&lt;br /&gt;
A numeric script variable is either an integer or an float. The latter will be the case if the value of the numeric variable contains a dot (so for example the variable x = '10.' will be parsed as float since its value contains a dot).&lt;br /&gt;
&lt;br /&gt;
You can test which type a variable is with the methods (return true or false):&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''true condition'''&lt;br /&gt;
| '''false condition'''&lt;br /&gt;
|-&lt;br /&gt;
| IsArray()&lt;br /&gt;
| variable is an array&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsBool()&lt;br /&gt;
| variable is true or false&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsClip()&lt;br /&gt;
| variable is a clip&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsFloat()&lt;br /&gt;
| variable is float or int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsInt()&lt;br /&gt;
| variable is int&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| IsString()&lt;br /&gt;
| variable is float or string&lt;br /&gt;
| anything else&lt;br /&gt;
|-&lt;br /&gt;
| Defined()&lt;br /&gt;
| anything else&lt;br /&gt;
| variable is &amp;quot;undefined&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can get the value of a variable with the methods:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| '''Method'''&lt;br /&gt;
| '''return type'''&lt;br /&gt;
|-&lt;br /&gt;
| AsBool(), AsBool(bool def)&lt;br /&gt;
| bool&lt;br /&gt;
|-&lt;br /&gt;
| AsClip()&lt;br /&gt;
| PClip&lt;br /&gt;
|-&lt;br /&gt;
| AsDblDef(double def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloat(), AsFloat(float def)&lt;br /&gt;
| double&lt;br /&gt;
|-&lt;br /&gt;
| AsFloatf(), AsFloatf(float def)&lt;br /&gt;
| float&lt;br /&gt;
|-&lt;br /&gt;
| AsInt(), AsInt(int def)&lt;br /&gt;
| int&lt;br /&gt;
|-&lt;br /&gt;
| AsString(), AsString(const char* def)&lt;br /&gt;
| const char*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Boolean values are not treated as numeric (unlike C).&lt;br /&gt;
&lt;br /&gt;
Note that not all 32-bit integers can be represented as IEEE 32-bit floating point numbers. 16777216 and 16777217 have the same IEEE 32-bit floating point representation. Namely [0|10010111|00000000000000000000000]. See [[Float|IEEE-754]] for more information.&lt;br /&gt;
&lt;br /&gt;
For arrays, you can use the ArraySize() method to get the number of elements, and [] indexing to get the elements themselves.&lt;br /&gt;
&lt;br /&gt;
AVSValue holds an array of AVSValues in the following way:&lt;br /&gt;
&lt;br /&gt;
AVSValue(const AVSValue* a, int size) { type = 'a'; array = a; array_size = size; }&lt;br /&gt;
&lt;br /&gt;
'''Examples'''&lt;br /&gt;
&lt;br /&gt;
'''Arrays'''&lt;br /&gt;
&lt;br /&gt;
Using Invoke to apply a filter:&lt;br /&gt;
&lt;br /&gt;
 AVSValue up_args[3] = {child, 384, 288}; &lt;br /&gt;
 PClip resized = env-&amp;gt;Invoke(&amp;quot;LanczosResize&amp;quot;, AVSValue(up_args, 3)).AsClip();&lt;br /&gt;
&lt;br /&gt;
Note that&lt;br /&gt;
&lt;br /&gt;
 AVSValue(up_args, 3)&lt;br /&gt;
&lt;br /&gt;
returns the following: {'a'; {child, 384, 288}; 3}.&lt;br /&gt;
&lt;br /&gt;
Also [[#Invoke|Invoke]] returns an AVSValue (see its declaration) which in that case is a PClip.&lt;br /&gt;
&lt;br /&gt;
You can get the number of elements of up_args and its elements in the following way:&lt;br /&gt;
  &lt;br /&gt;
  int num_args, width, height;&lt;br /&gt;
  PClip clip;&lt;br /&gt;
  if (up_args.IsArray()) {&lt;br /&gt;
    num_args = up_args.ArraySize();&lt;br /&gt;
    clip = up_args[1].AsClip();&lt;br /&gt;
    width = up_args[2].AsInt();&lt;br /&gt;
    height = up_args[3].AsInt();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Integers and floats'''&lt;br /&gt;
&lt;br /&gt;
Note that 123.0 can be accurately represented as an int, float or double. So for getting the exact value of x=123.0 you can use either AsInt(123), AsFloat(x), AsFloatf(x) or AsDblDef(x). All of them will return the same value with the same accuracy.&lt;br /&gt;
&lt;br /&gt;
As noted above, 16777217 can't be accurately represented as a float. So for getting the exact value of x=16777217.0 you need to use either AsInt(16777217) or AsDblDef(x). Both will return the same value with the same accuracy. Note that AsFloat() will return a double, but it is cast to a float first (losing accuracy).&lt;br /&gt;
&lt;br /&gt;
= Structures =&lt;br /&gt;
&lt;br /&gt;
The following structure is available: VideoInfo structure. It holds global information about a clip (i.e. information that does not depend on the framenumber). The GetVideoInfo method in IClip returns this structure. A description (for AVISYNTH_INTERFACE_VERSION=6) of it can be found [[Filter_SDK/Cplusplus_API/VideoInfo|here]].&lt;br /&gt;
&lt;br /&gt;
= Constants =&lt;br /&gt;
&lt;br /&gt;
The following constants are defined in avisynth.h:&lt;br /&gt;
&lt;br /&gt;
 // Audio Sample information&lt;br /&gt;
 typedef float SFLOAT;&lt;br /&gt;
&lt;br /&gt;
 enum { // sample types&lt;br /&gt;
   SAMPLE_INT8  = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   SAMPLE_INT16 = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   SAMPLE_INT24 = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   SAMPLE_INT32 = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   SAMPLE_FLOAT = 1&amp;lt;&amp;lt;4&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // plane types&lt;br /&gt;
   PLANAR_Y         = 1&amp;lt;&amp;lt;0,&lt;br /&gt;
   PLANAR_U         = 1&amp;lt;&amp;lt;1,&lt;br /&gt;
   PLANAR_V         = 1&amp;lt;&amp;lt;2,&lt;br /&gt;
   PLANAR_ALIGNED   = 1&amp;lt;&amp;lt;3,&lt;br /&gt;
   PLANAR_Y_ALIGNED = PLANAR_Y | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_U_ALIGNED = PLANAR_U | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_V_ALIGNED = PLANAR_V | PLANAR_ALIGNED,&lt;br /&gt;
   PLANAR_A         = 1&amp;lt;&amp;lt;4,                       // v5&lt;br /&gt;
   PLANAR_R         = 1&amp;lt;&amp;lt;5,                       // v5&lt;br /&gt;
   PLANAR_G         = 1&amp;lt;&amp;lt;6,                       // v5&lt;br /&gt;
   PLANAR_B         = 1&amp;lt;&amp;lt;7,                       // v5&lt;br /&gt;
   PLANAR_A_ALIGNED = PLANAR_A | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_R_ALIGNED = PLANAR_R | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_G_ALIGNED = PLANAR_G | PLANAR_ALIGNED,  // v5&lt;br /&gt;
   PLANAR_B_ALIGNED = PLANAR_B | PLANAR_ALIGNED,  // v5&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // cache types&lt;br /&gt;
   // Old 2.5 poorly defined cache hints (v3).&lt;br /&gt;
   // Reserve values used by 2.5 API&lt;br /&gt;
   // Do not use in new filters&lt;br /&gt;
   CACHE_25_NOTHING             = 0, // Filter requested no caching.&lt;br /&gt;
   CACHE_25_RANGE               = 1, // An explicit cache of &amp;quot;frame_range&amp;quot; frames around the current frame.&lt;br /&gt;
   CACHE_25_ALL                 = 2, // This is default operation, a simple LRU cache.&lt;br /&gt;
   CACHE_25_AUDIO               = 3, // Audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_NONE          = 4, // Filter requested no audio caching.&lt;br /&gt;
   CACHE_25_AUDIO_AUTO          = 5, // Audio caching (difference with CACHE_AUDIO?).&lt;br /&gt;
 &lt;br /&gt;
   // New 2.6 explicitly defined cache hints (v5).&lt;br /&gt;
   CACHE_NOTHING                = 10, // Do not cache video.&lt;br /&gt;
   CACHE_WINDOW                 = 11, // Hard protect upto X frames within a range of X from the current frame N.&lt;br /&gt;
   CACHE_GENERIC                = 12, // LRU cache upto X frames.&lt;br /&gt;
   CACHE_FORCE_GENERIC          = 13, // LRU cache upto X frames, override any previous CACHE_WINDOW.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_POLICY             = 30, // Get the current policy.&lt;br /&gt;
   CACHE_GET_WINDOW             = 31, // Get the current window h_span.&lt;br /&gt;
   CACHE_GET_RANGE              = 32, // Get the current generic frame range.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_AUDIO                  = 50, // Explicitly do cache audio, X byte cache.&lt;br /&gt;
   CACHE_AUDIO_NOTHING          = 51, // Explicitly do not cache audio.&lt;br /&gt;
   CACHE_AUDIO_NONE             = 52, // Audio cache off (auto mode), X byte intial cache.&lt;br /&gt;
   CACHE_AUDIO_AUTO             = 53, // Audio cache on (auto mode), X byte intial cache.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GET_AUDIO_POLICY       = 70, // Get the current audio policy.&lt;br /&gt;
   CACHE_GET_AUDIO_SIZE         = 71, // Get the current audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_FRAME         = 100, // Queue request to prefetch frame N.&lt;br /&gt;
   CACHE_PREFETCH_GO            = 101, // Action video prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_PREFETCH_AUDIO_BEGIN   = 120, // Begin queue request transaction to prefetch audio (take critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTLO = 121, // Set low 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_STARTHI = 122, // Set high 32 bits of start.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COUNT   = 123, // Set low 32 bits of length.&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_COMMIT  = 124, // Enqueue request transaction to prefetch audio (release critical section).&lt;br /&gt;
   CACHE_PREFETCH_AUDIO_GO      = 125, // Action audio prefetches.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_CACHE_MODE    = 200, // Cache ask Child for desired video cache mode.&lt;br /&gt;
   CACHE_GETCHILD_CACHE_SIZE    = 201, // Cache ask Child for desired video cache size.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_MODE    = 202, // Cache ask Child for desired audio cache mode.&lt;br /&gt;
   CACHE_GETCHILD_AUDIO_SIZE    = 203, // Cache ask Child for desired audio cache size.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_COST          = 220, // Cache ask Child for estimated processing cost.&lt;br /&gt;
   CACHE_COST_ZERO              = 221, // Child response of zero cost (ptr arithmetic only).&lt;br /&gt;
   CACHE_COST_UNIT              = 222, // Child response of unit cost (less than or equal 1 full frame blit).&lt;br /&gt;
   CACHE_COST_LOW               = 223, // Child response of light cost. (Fast)&lt;br /&gt;
   CACHE_COST_MED               = 224, // Child response of medium cost. (Real time)&lt;br /&gt;
   CACHE_COST_HI                = 225, // Child response of heavy cost. (Slow)&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_THREAD_MODE   = 240, // Cache ask Child for thread safetyness.&lt;br /&gt;
   CACHE_THREAD_UNSAFE          = 241, // Only 1 thread allowed for all instances. 2.5 filters default!&lt;br /&gt;
   CACHE_THREAD_CLASS           = 242, // Only 1 thread allowed for each instance. 2.6 filters default!&lt;br /&gt;
   CACHE_THREAD_SAFE            = 243, //  Allow all threads in any instance.&lt;br /&gt;
   CACHE_THREAD_OWN             = 244, // Safe but limit to 1 thread, internally threaded.&lt;br /&gt;
 &lt;br /&gt;
   CACHE_GETCHILD_ACCESS_COST   = 260, // Cache ask Child for preferred access pattern.&lt;br /&gt;
   CACHE_ACCESS_RAND            = 261, // Filter is access order agnostic.&lt;br /&gt;
   CACHE_ACCESS_SEQ0            = 262, // Filter prefers sequential access (low cost)&lt;br /&gt;
   CACHE_ACCESS_SEQ1            = 263, // Filter needs sequential access (high cost)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 enum { // For GetCPUFlags.  These are backwards-compatible with those in VirtualDub.&lt;br /&gt;
                    /* oldest CPU to support extension */&lt;br /&gt;
   CPUF_FORCE       =  0x01,   //  N/A&lt;br /&gt;
   CPUF_FPU         =  0x02,   //  386/486DX&lt;br /&gt;
   CPUF_MMX         =  0x04,   //  P55C, K6, PII&lt;br /&gt;
   CPUF_INTEGER_SSE =  0x08,   //  PIII, Athlon&lt;br /&gt;
   CPUF_SSE         =  0x10,   //  PIII, Athlon XP/MP&lt;br /&gt;
   CPUF_SSE2        =  0x20,   //  PIV, K8&lt;br /&gt;
   CPUF_3DNOW       =  0x40,   //  K6-2&lt;br /&gt;
   CPUF_3DNOW_EXT   =  0x80,   //  Athlon&lt;br /&gt;
   CPUF_X86_64      =  0xA0,   //  Hammer (note: equiv. to 3DNow + SSE2, which only Hammer will have anyway)&lt;br /&gt;
   CPUF_SSE3        = 0x100,   //  PIV+, K8 Venice&lt;br /&gt;
 &lt;br /&gt;
   // Additional CPU flags in 2.6 (v5-v6).&lt;br /&gt;
   CPUF_SSSE3       =  0x200,   //  Core 2&lt;br /&gt;
   CPUF_SSE4        =  0x400,   //  Penryn, Wolfdale, Yorkfield&lt;br /&gt;
   CPUF_SSE4_1      =  0x400,&lt;br /&gt;
   CPUF_SSE4_2      = 0x1000,   //  Nehalem (note this was 0x800 in v5)&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Development]]&lt;br /&gt;
[[Category:FilterSDK]]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:45:25Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:45:19Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
(count)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:45:02Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:44:55Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
(try to make enough edits)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:44:39Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:44:31Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
(not edited enough yet)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:44:16Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:44:07Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
(and more test edits)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:43:53Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:43:44Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
(another test edit)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:43:28Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-03-02T17:43:07Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
(Just a test edit)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/FixChromaticAberration</id>
		<title>FixChromaticAberration</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/FixChromaticAberration"/>
				<updated>2017-02-24T20:58:11Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Scripts|Restoration_filters|Chroma correction}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|martin53 at doom9&lt;br /&gt;
|04/09/2007&lt;br /&gt;
|3=[[Media:FixChromaticAberration.avsi|FixChromaticAberration.avsi]]&lt;br /&gt;
|4=Chroma Correction&lt;br /&gt;
|5=&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=162286 Doom9 Thread]}}&lt;br /&gt;
== Description ==&lt;br /&gt;
A script to reduce [http://en.wikipedia.org/wiki/Chromatic_aberration chromatic aberration]. This function stretches the red, green and/or blue channel according to a given factor symmetrically around the center of the frame and crops it afterwards. Note that chromatic aberration also smears the image a bit, which is not compensated by this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB24]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|FixChromaticAberration (clip clip, val &amp;quot;red&amp;quot;, val &amp;quot;green&amp;quot;, val &amp;quot;blue&amp;quot;, val &amp;quot;x&amp;quot;, val &amp;quot;y&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|red|val|1}}&lt;br /&gt;
::{{Par2|green|val|1}}&lt;br /&gt;
::{{Par2|blue|val|1}}&lt;br /&gt;
:::{{Template:FuncDef3|red}}, {{Template:FuncDef3|green}} and {{Template:FuncDef3|blue}} are stretching (resizing) factors against the original clip size. Factors of e.g. &amp;lt;code&amp;gt;{{Template:FuncDef3|red}}=1.015&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{{Template:FuncDef3|green}}=1.01&amp;lt;/code&amp;gt; allow to compensate the colored edges near the corners of the image which appear from lenses with 'chromatic aberration'.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|x|val| }}&lt;br /&gt;
::{{Par2|y|val| }}&lt;br /&gt;
:::{{Template:FuncDef3|x}} and {{Template:FuncDef3|y}} allow to set the center of the aberration circle. It defaults to the center of the image.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
FixChromaticAberration with default settings:&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 FixChromaticAberration(red=1, green=1, blue=1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date(D/M/Y)      Changes&amp;lt;br&amp;gt;&lt;br /&gt;
              04/09/2007       - Initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Chroma_correction|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/External_filters</id>
		<title>External filters</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/External_filters"/>
				<updated>2017-02-16T20:38:20Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: documented FFT2DFilter v2.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rough classification of third-party filters for AviSynth - a perpetual work in progress.&lt;br /&gt;
&lt;br /&gt;
This page lists both scripts (see [[Import]]) and plugins (see [[Plugins]]).&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
==== Download sites ====&lt;br /&gt;
A large list of filters can be downloaded from the following sites but be aware that some plugins listed '''may be outdated''', only recommended as a backup.&lt;br /&gt;
&lt;br /&gt;
*[http://web.archive.org/web/20130803185015/http://www.64k.it/andres/dettaglio.php?sez=avisynth Andres' Filter Collection] &lt;br /&gt;
*[http://chaosking.de/repo/avsfilters/ AviSynth Filter DB by ChaosKing] | [http://web.archive.org/web/20140412062911/http://chaosking.de/avisynth-filter-db mirror]&lt;br /&gt;
*[http://www.avisynth.info/?plugin=attach&amp;amp;pcmd=list&amp;amp;refer=%E3%82%A2%E3%83%BC%E3%82%AB%E3%82%A4%E3%83%96 AviSynth.info Filter Archive]&lt;br /&gt;
*[http://xhmikosr.1f0.de/_old/avisynth/plugins/ XhmikosR's Builds] &lt;br /&gt;
*[http://www.avisynth.nl/users/warpenterprises/ Warp Enterprises' AviSynth Filter Collection]&lt;br /&gt;
&lt;br /&gt;
====64-bit filters====&lt;br /&gt;
A comprehensive list of 64-bit filters is available in the [[AviSynth%2B#AviSynth.2B_x64_plugins|AviSynth+]] page.&lt;br /&gt;
&lt;br /&gt;
====Outdated AviSynth plugins====&lt;br /&gt;
[[External plugins old|External plugins (old)]] - these older plugins are not recommended, page is there mainly for historical purposes.&lt;br /&gt;
&lt;br /&gt;
==== Using filters ====&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 using a source filter.&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;
&amp;lt;!--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.--&amp;gt;&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's. The filter is included in the Behappy package.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=135855 Plugin]&lt;br /&gt;
| dimzon&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;
| [[RGB24]], [[YUY2]], [[YV12]], [[I420]] &lt;br /&gt;
| [{{N2Moved}}/dgmpgdec/dgmpgdec.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=170107 DGMVCSource]&lt;br /&gt;
|MVC source filter for AviSynth.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
|[http://rationalqm.us/dgmvcsource/dgmvcsource100b22.zip Plugin]&lt;br /&gt;
|{{Author/Donald Graft}}&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_20100602.zip Plugin] [http://forum.doom9.org/showthread.php?p=1740824#post1740824 Update]&lt;br /&gt;
| {{Author/WarpEnterprises}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20071025023927/http://mvideo.ddpp.net/eng/dvtimestampex.htm DVTimeStampEx]&lt;br /&gt;
| Shows DV timestamp information over a DV clip.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://web.archive.org/web/20071024123608/http://mvideo.ddpp.net/downld/dvtimestampex_0_5_5.zip Plugin] - [http://web.archive.org/web/20071024123608/http://mvideo.ddpp.net/downld/dvtimestampex_0_5_5_src.zip source code]&lt;br /&gt;
| [http://web.archive.org/web/20071025023932/http://mvideo.ddpp.net/eng/index.htm basilik]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=134275 DSS2]&lt;br /&gt;
| DirectShowSource2 that uses the installed Haali Media Splitter along with its ''avss.dll'' AviSynth plugin. It can convert VFR files to CFR in order to support frame-accurate seeking. Not recommended due to the fact that Haali Media Splitter is considered outdated, use DDS2mod.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20130923230211/http://haali.su/mkv/ Plugin]&lt;br /&gt;
| Haali&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1699301&amp;amp;postcount=33 DSS2mod]&lt;br /&gt;
| DirectShowSource2 mod, this version does not require Haali Media Splitter. &lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20160224130743/https://filetea.me/t1sFlzxrp9xSdaqTlf3qZ6nCQ/dl Plugin]&lt;br /&gt;
| forclip&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://github.com/FFMS/ffms2/releases Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}, TheFluff, Plorkyeran, others&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=169651 FRIMSource]&lt;br /&gt;
|FRIMSource is an AviSynth plugin for sequential reading of elementary or transport streams (MPEG2, H.264 AVC/MVC-3D, VC1).&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=169651 Plugin]&lt;br /&gt;
|videofan3d&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://web.archive.org/web/20120419204535/http://strony.aster.pl/paviko/hdvinfo0.93.zip Plugin]&lt;br /&gt;
| {{Author/paviko}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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/files/imagesequence_20101115.zip Plugin]&lt;br /&gt;
| {{Author/WarpEnterprises}}&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;
| hanfrunz&lt;br /&gt;
|-&lt;br /&gt;
| [[JpegSource]]&lt;br /&gt;
| An advanced JPEG decoder for Avisynth 2.6. See [http://forum.doom9.org/showthread.php?t=170028 discussion].&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://dl.dropboxusercontent.com/s/rjnt0y3ead2c6ef/JpegSource_20140419.7z Plugin] &lt;br /&gt;
| SEt&lt;br /&gt;
|-&lt;br /&gt;
| [[LSMASHSource]]&lt;br /&gt;
| A source plugin for audio and video, it uses Libav ([http://en.wikipedia.org/wiki/Libav#Contained_codecs libavcodec]) to decode all supported A/V formats. See [http://forum.doom9.org/showthread.php?t=167435 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[LSMASHSource|Plugin]]&lt;br /&gt;
| {{Author/VFR-maniac}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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], [http://forum.doom9.org/showthread.php?t=135876 continued discussion].&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://nicaudio.codeplex.com/ 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://web.archive.org/web/20120124010957/http://arenafilm.hu/alsog/avisynthr3d/ Plugin]&lt;br /&gt;
| {{Author/Kertai Gábor}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RawSource26]]&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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [https://github.com/chikuzen/RawSource_2.6x/releases Plugin]&lt;br /&gt;
| {{Author/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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[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;
| [[VapourSource]]&lt;br /&gt;
| VapourSynth script reader for AviSynth2.6x.  [http://forum.doom9.org/showthread.php?t=168339 Discussion].&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://github.com/chikuzen/VapourSource/releases Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=170311 VideoInputSource]&lt;br /&gt;
| Capture video frames from video capture card or webcam in real-time.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[http://github.com/fieliapm/himawari_avs_plugin/raw/master/VideoInputSource/VideoInputSource.dll Plugin]&lt;br /&gt;
|[http://github.com/fieliapm fieliapm]&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/slavanap/ssifSource ssifSource]&lt;br /&gt;
| Open m2ts, ssif and mpls files located in decrypted Blu-ray and Blu-ray 3D discs. Supports horizontal of vertical stack of views as output, views selection and swap autodetection.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://github.com/slavanap/ssifSource/releases plugin]&lt;br /&gt;
|[http://github.com/slavanap slavanap]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Restoration Filters ==&lt;br /&gt;
&lt;br /&gt;
These remove effects or artifacts 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;
| [[DAA]]&lt;br /&gt;
| Anti-aliasing with contra-sharpening.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| mcDAA3&lt;br /&gt;
| Motion-Compensated Anti-aliasing with contra-sharpening, can deal with ifade too, created because when applied daa3 to fixed scenes, it could damage some details and other issues. See [http://forum.doom9.org/showthread.php?p=1639679#post1639679 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.mediafire.com/?wqkob7zx1p119e0 Script]&lt;br /&gt;
| AmjadSONY&lt;br /&gt;
|-&lt;br /&gt;
| [[MAA2]]&lt;br /&gt;
| Updated version of the MAA antialising script.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV24]]&lt;br /&gt;
| [http://web.archive.org/web/20140624125132/https://raw.githubusercontent.com/AviSynth/avs-scripts/master/maa2.avsi Script]&lt;br /&gt;
| line0&lt;br /&gt;
|-&lt;br /&gt;
| [[santiag]]&lt;br /&gt;
| Simple anti-aliasing with independent horizontal and vertical anti-aliasing strength.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1393006 Script]&lt;br /&gt;
| {{Author/cretindesalpes}}&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;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| thetoof&lt;br /&gt;
|-&lt;br /&gt;
| [[TIsophote]]&lt;br /&gt;
| A level-set (isophote) smoothing filter.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20070222162751/http://bengal.missouri.edu/~kes25c/TIsophotev091.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
|[[xaa]]&lt;br /&gt;
|Versatile anti-aliasing script.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV24]]&lt;br /&gt;
|[http://www.mediafire.com/download/sygi04y47eknvc2/xaa_v1.1.1.avsi Script]&lt;br /&gt;
|Desbreko&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Chroma correction ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [{{N2Archived}}/trbarry/Readme_BT709ToBT601.txt BT709ToBT601]&lt;br /&gt;
| Convert from BT.709 (HDTV) to BT.601 (SDTV) colorimetry.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [{{N2Archived}}/trbarry/BT709ToBT601.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
|[[caf]]&lt;br /&gt;
|Chromatic Aberration Fixer.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/ChromaShiftSP.avsi Script]&lt;br /&gt;
| Torchlight&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. See [http://forum.doom9.org/showthread.php?t=33302 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB32]]&lt;br /&gt;
| [http://web.archive.org/web/20091026153334/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;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/images/ChromaShiftSP.avsi Script]&lt;br /&gt;
| IanB, McCauley &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'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://web.archive.org/web/20140420180927/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. See [http://forum.doom9.org/showthread.php?t=77074 discussion]&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;
| [[FixChromaBleedingMod]]&lt;br /&gt;
| Fixes area of chroma bleeding by shifting the chroma and lowering the saturation in the affected areas. See [http://forum.doom9.org/showthread.php?t=77074#post1673932 discussion]&lt;br /&gt;
| [[YV12]], [[YUY2]], [[YV411]]&lt;br /&gt;
| [[FixChromaBleedingMod_source|Script]]&lt;br /&gt;
| AmjadSONY&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. See [http://forum.doom9.org/showthread.php?p=1520786#post1520786 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://avisynth.nl/index.php/FixChromaticAberration Script]&lt;br /&gt;
| Martin Wagener&lt;br /&gt;
|-&lt;br /&gt;
| [[MoveChroma]]&lt;br /&gt;
| Chroma shifting filter; can be used to independently shift the U/V channels left or right.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://sky.geocities.jp/apechironnup/MoveChroma.20090823.zip Plugin]&lt;br /&gt;
| [http://sky.geocities.jp/apechironnup/ apechironnup]&lt;br /&gt;
|-&lt;br /&gt;
| [[ReInterpolate411]]&lt;br /&gt;
| This is a fast and 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 codecs.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [{{N2Archived}}/trbarry/ReInterpolate411.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/reinterpolate420/reinterpolate420.html ReInterpolate420]&lt;br /&gt;
| Usually, DV decoders upsample [[PAL]] DV (which is YV12) to YUY2 using point sampling. This plugin re-interpolates the original chroma samples.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/reinterpolate420/reinterpolate420_v3.zip Plugin]&lt;br /&gt;
|  {{Author/Wilbert Dijkhof}}&lt;br /&gt;
{{Author/Fizick}} (v3)&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;
| [[GradFun2db]]&lt;br /&gt;
| A simple and fast debanding filter. See Wikipedia: [http://en.wikipedia.org/wiki/Color_banding Color Banding]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140705233110/http://manao4.free.fr/gradfun2db-v1.0.zip Plugin]&lt;br /&gt;
| Prunedtree&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/showpost.php?p=1386559&amp;amp;postcount=3 Script]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://f3kdb.readthedocs.org/en/latest/ 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;
| [http://github.com/SAPikachu/ SAPikachu]&lt;br /&gt;
|-&lt;br /&gt;
| LumaDB&lt;br /&gt;
| Fast 8-bit 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://web.archive.org/web/20131111114932/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 16-bit 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://web.archive.org/web/20131111114947/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?p=1410479#post1410479 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1410479&amp;amp;postcount=19 Script]&lt;br /&gt;
| Jawed&lt;br /&gt;
|-&lt;br /&gt;
| BlockTerminator&lt;br /&gt;
| Deblocking filter, see [http://forum.doom9.org/showthread.php?p=831936#post831936 discussion.]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=831936&amp;amp;postcount=24 Script]&lt;br /&gt;
| foxyshadis&lt;br /&gt;
|-&lt;br /&gt;
| [[DeBlock]]&lt;br /&gt;
| Deblocking filter,  see [http://forum.doom9.org/showthread.php?t=110352 discussion,] and [http://github.com/tp7/Deblock updated version] for AviSynth 2.6. DGDecode uses [{{N2Moved}}/dgmpgdec/DGDecodeManual.html#DeBlock DeBlock.]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/DeBlock 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's changes on block borders, but DCT-lowpassed changes on block interiours.&amp;quot; [http://forum.doom9.org/showpost.php?p=913365&amp;amp;postcount=4 Didée]. See [http://forum.doom9.org/showthread.php?p=944459 discussion.] For updated Deblock QED see this [http://forum.doom9.org/showthread.php?t=154777 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/Deblock_QED_MT2Mod.avsi Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DeblockPP7]]&lt;br /&gt;
| A port of the MPlayer PP7 deblocking filter. See [http://forum.doom9.org/showthread.php?t=172498 discussion].&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/attachment.php?attachmentid=14970&amp;amp;d=1440108276 Plugin]&lt;br /&gt;
|John Doe&lt;br /&gt;
|-&lt;br /&gt;
| [[FunkyDeBlock]]&lt;br /&gt;
| Deblocking script based on BlindPP and high/low pass 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?t=84355 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;
| [http://sites.google.com/site/jconklin754smoothd2/download Plugin]&lt;br /&gt;
| Jim Conklin&lt;br /&gt;
|-&lt;br /&gt;
| SmoothDeblock&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]&amp;lt;br&amp;gt;[[SmoothDeblock_source|(alt source)]]&lt;br /&gt;
| redfordxx&lt;br /&gt;
|-&lt;br /&gt;
|[http://avisynth.org.ru/unblock/unblock.html Unblock]&lt;br /&gt;
|UnBlock is a filter that removes the &amp;quot;blockiness&amp;quot; of heavily or moderately compressed images with statistical approach. See [http://forum.doom9.org/showthread.php?t=133059 discussion].&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://avisynth.org.ru/unblock/unblock11.zip Plugin]&lt;br /&gt;
|{{Author/Fizick}}&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;
| [[Media:abcxyz_MT2.avsi|Script]]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[BlindDeHalo3]]&lt;br /&gt;
| Filter to remove edge enhancement artifacts. See [http://forum.doom9.org/showthread.php?p=622289#post622289 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=5599&amp;amp;d=1143030001 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 artifacts. See [http://forum.doom9.org/showthread.php?p=777956#post777956 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/Dehalo_alpha_mt.avsi Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DeHaloHmod]]&lt;br /&gt;
| Another halo reducer, it includes lots of options to tweak for best performance. See [http://forum.doom9.org/showthread.php?p=1675762#post1675762 discussion]&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
| [[DeHaloHmod|Script]]&lt;br /&gt;
|AmjadSONY&lt;br /&gt;
|-&lt;br /&gt;
|[[FineDehalo]]&lt;br /&gt;
|Halo removal script that uses DeHalo_alpha with a few masks and optional contra-sharpening to try remove halos without removing important details (like line edges).&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[http://avisynth.nl/images/FineDehalo.avsi Script]&lt;br /&gt;
|{{Author/cretindesalpes}}&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;
| 'Orum&lt;br /&gt;
|-&lt;br /&gt;
| [[VHSHaloremover]]&lt;br /&gt;
| Quick &amp;amp; dirty halo removal. Will introduce some blurriness, but the halos are so huge you can’t avoid it. See [http://forum.doom9.org/showthread.php?p=1758184#post1758184]&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://pastebin.com/s24mSgJ5 Script]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[YAHR]]&lt;br /&gt;
| Basic filter with no variables to remove edge enhancement artifacts. 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;
| YAHRmod&lt;br /&gt;
| Basic filter used to reduce halos in modern DVD and other cases.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[YAHRmod_source|Script]]&lt;br /&gt;
| AmjadSONY&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deringing &amp;amp; Mosquito Noise ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[aWarpSharpDering]]&lt;br /&gt;
| Tries to clean up slight ringing around edges by heavily aWarpSharp-ing the image and then applying it only to the areas where the difference is small enough so detail isn't destroyed.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/AWarpSharpDering.avsi Script]&lt;br /&gt;
| [http://leak.no-ip.org/AviSynth/ Leak]&lt;br /&gt;
|-&lt;br /&gt;
| [http://rationalqm.us/dgmpgdec/DGDecodeManual.html#BlindPP BlindPP]&lt;br /&gt;
| Deblocking &amp;amp; deringing filter; part of [[DGDecode]]. &amp;lt;br&amp;gt;Mosquito noise removal: &amp;lt;code&amp;gt;BlindPP(quant=16, cpu2=&amp;quot;ooooxx&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [{{N2Moved}}/dgmpgdec/dgmpgdec.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&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;
| [[EdgeCleaner]]&lt;br /&gt;
| A simple edge cleaning and weak dehaloing function. See [http://forum.doom9.org/showthread.php?t=164592 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1568521&amp;amp;postcount=13 Script]&lt;br /&gt;
| [http://forum.doom9.org/member.php?u=80518 canuckerfan]&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;
| [[HQDering mod]]&lt;br /&gt;
| Applies deringing by using a smart smoother near edges (where ringing occurs) only.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140711173345/http://www.nmm-hd.org/upload/get~08CusazVphU/HQDeringmod_v1.8.avsi Script]&lt;br /&gt;
| [http://www.nmm-hd.org/newbbs/memberlist.php?mode=viewprofile&amp;amp;u=479&amp;amp;sid=ff62d0f6c22fcfdbe97b53c8351429bc mawen1250]&lt;br /&gt;
|-&lt;br /&gt;
| [[LazyDering]]&lt;br /&gt;
| Tries to clean up slight ringing around edges by applying [[aWarpSharp2]] only to areas where the difference is small enough so detail isn't destroyed.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20131103155455/http://anime-addict.ani-x.com/files/avisynth/scripts/LazyDering_v0.1.avsi Script]&lt;br /&gt;
| [http://leak.no-ip.org/AviSynth/ Leak], RazorbladeByte&lt;br /&gt;
|-&lt;br /&gt;
| [[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://web.archive.org/web/20131028144351/http://www.geocities.jp/w_bean17/files/mosquito_nr_avisynth.zip Plugin]&lt;br /&gt;
| {{Author/b_inary}}&lt;br /&gt;
|-&lt;br /&gt;
|ungibbs&lt;br /&gt;
|ungibbs, a gibbs artifact remover.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=134502 Script]&lt;br /&gt;
|*.mp4 guy&lt;br /&gt;
|-&lt;br /&gt;
|WarpDeRing&lt;br /&gt;
|Uses aWarpSharp2's flattening to clean out ringing/smaller halos, then runs some masks to preserve the edges and avoid the thinning.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[WarpDeRing_source|Script]]&lt;br /&gt;
|mirkosp&lt;br /&gt;
|-&lt;br /&gt;
|WarpDeRing_faster&lt;br /&gt;
|Same as WarpDeRing but may be a bit faster.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[WarpDeRing_faster_source|Script]]&lt;br /&gt;
|mirkosp&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's VirtualDub filter &amp;quot;Deinterlace - area based&amp;quot; to AviSynth.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/area_5F25_dll_20030217.zip 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's data. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=55598 discussion].&lt;br /&gt;
| [[RGB]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [{{N2Moved}}/dgbob/dgbob.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Decomb]]&lt;br /&gt;
| The FieldDeinterlace filter provides functionality similar to the postprocessing function of 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;
| [[YUY2]], [[YUY2]]&lt;br /&gt;
| [{{N2Moved}}/decomb/decombnew.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EEDI2]]&lt;br /&gt;
| EEDI2 resizes an image by 2x in the vertical direction by copying the existing image to 2*y(n) and interpolating the missing field.  It is intended for edge-directed interpolation for deinterlacing (i.e. not really made for resizing a normal image, but can do that as well).&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140420183147/http://bengal.missouri.edu/~kes25c/EEDI2v092.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[eedi3|EEDI3]]&lt;br /&gt;
| Another edge directed interpolation filter. Works by minimizing a cost functional involving every pixel in a scan line. eedi3 is good for deinterlacing and enlarging images by the powers of 2.&lt;br /&gt;
| [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://github.com/Elegant996/EEDI3/releases/download/0.9.2.1/EEDI3_v0_9_2_1.7z Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FieldHint]]&lt;br /&gt;
|FieldHint combines arbitrary fields from the input clip, and optionally adds Telecide-compatible postprocessing hints.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20120223025813/http://ivtc.org/yatta%20support/fieldhint-0.12.rar Plugin]&lt;br /&gt;
|{{Author/akupenguin}}&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;
| [[YUY2]], [[YV12]]&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]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [{{N2Moved}}/kerneldeint/kerneldeint.html Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&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]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://leak.no-ip.org/AviSynth/LeakKernelDeint/LeakKernelDeint_1.5.4.zip Plugin]&lt;br /&gt;
| {{Author/Leak}}&lt;br /&gt;
|-&lt;br /&gt;
| [[nnedi3]]&lt;br /&gt;
| nnedi3 is an intra-field only deinterlacer. It takes in a frame, throws away one field, and then interpolates the missing pixels using only information from the kept field. It also has same rate and double rate modes.&lt;br /&gt;
| [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://github.com/jpsdr/NNEDI3/releases Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[nnedi3ocl]]&lt;br /&gt;
| OpenCL rewrite of [[nnedi3]]. See [http://forum.doom9.org/showthread.php?t=169766 discussion].&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://dl.dropboxusercontent.com/s/bmemjsu7jqnlk65/nnedi3ocl_20131208.7z Plugin]&lt;br /&gt;
| SEt&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'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;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/QTGMC Script]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
| [[SangNom2]]&lt;br /&gt;
| Reimplementation of the old [[SangNom]] plugin. See [http://forum.doom9.org/showthread.php?t=168315 discussion].&lt;br /&gt;
| [[Y8]],[[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/tp7/SangNom2/releases Plugin]&lt;br /&gt;
| {{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.guthspot.se/video/AVSPorts/SmoothDeinterlacer/ SmoothDeinterlace]&lt;br /&gt;
| This contains an adaptive deinterlacer plugin for (AVISynth). It is based on Gunnar Thalin's [http://www.guthspot.se/video/index.htm#deinterlacesmooth Smooth Deinterlace plugin] for VirtualDub.&amp;lt;br&amp;gt;&lt;br /&gt;
See also [[SmoothDeinterlaceFunctions]]&lt;br /&gt;
| [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.guthspot.se/video/AVSPorts/SmoothDeinterlacer/AVSSmoothDeinterlacer.zip 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://web.archive.org/web/20140420182314/http://bengal.missouri.edu/~kes25c/TDeintv11.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TelecideHints]]&lt;br /&gt;
| The filter process the stats file to get the usual progressive matches and identify VFR sections.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://mod16.org/fansub/Telecidehints11.rar Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}&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;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/TempGaussMC Script]&lt;br /&gt;
| {{Author/Didée}}&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's avisynth filter port of yadif from mplayer. This version doesn'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://web.archive.org/web/20140420183914/http://bengal.missouri.edu/~kes25c/yadifmod_v1.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[yadifmod2]]&lt;br /&gt;
| Yadif + yadifmod for avisynth2.6/avisynth+. See [http://forum.doom9.org/showthread.php?p=1761361 discussion].&lt;br /&gt;
| [[YV24]], [[YV16]], [[YV12]], [[YV411]], [[Y8]]&lt;br /&gt;
| [http://github.com/chikuzen/yadifmod2/releases Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Duplicate Frame Detectors ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[ApparentFPS]]&lt;br /&gt;
| Shows underlying framerate where a clip has had many duplicates inserted, easier than counting unique frames.&lt;br /&gt;
| (see [[ApparentFPS|docs]])&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=171339 Plugin]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&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. See [http://forum.doom9.org/showthread.php?t=41850 original] and [http://forum.doom9.org/showthread.php?t=153037 continued] discussion. &amp;lt;!--[http://forum.doom9.org/showthread.php?t=44500 another old link]--&amp;gt;&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [{{N2Moved}}/dup/dupnew.html Plugin] &lt;br /&gt;
[http://forum.doom9.org/showpost.php?p=1747207&amp;amp;postcount=17 Update (v2.32a)]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=134930 Dupped]&lt;br /&gt;
| Another frame duplication function, similar to Dup, but hopefully more accurate. See [http://forum.doom9.org/showthread.php?t=134930 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140420181919/http://www.randomdestination.com/members/corran/misc/dupped/dupped.avsi Script]&lt;br /&gt;
| Corran&lt;br /&gt;
|-&lt;br /&gt;
| [http://akuvian.org/src/avisynth/dedup/dedup.txt 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;
| {{Author/akupenguin}}&lt;br /&gt;
|-&lt;br /&gt;
|[[ExactDedup]]&lt;br /&gt;
| ExactDedup is a filter intended to remove frames that are exact duplicates of each other, leaving only the first and (optionally) last frames of a run intact, and generates a Matroska v2 timecodes file with timing information for the ensuing stream. See [http://tasvideos.org/forum/viewtopic.php?t=12065 discussion].&lt;br /&gt;
| [[RGB24]] [[RGB32]], [[YV12]]&lt;br /&gt;
| [http://www.mediafire.com/download/9x2ax1rb5un02d5/ExactDedup+Version+0.03.zip Plugin]&lt;br /&gt;
|Steve Melenchuk, Arick Chan&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/getdups/getdups.html 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;
| [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/users/fizick/getdups/getdups096.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=164372 MorphDups]&lt;br /&gt;
| Replace duplicate frames by interpolations.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=164372 Script]&lt;br /&gt;
| sven_x&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]] &lt;br /&gt;
| c_deblend is a simple blend replacing function like unblend or removeblend. Superseded by [[srestore]].&lt;br /&gt;
| [[YV12]]&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;
| [[YV12]]&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 'G' is good and 'B' 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;
| [[FixBlendIVTC]]&lt;br /&gt;
| A blend replacing/frame restoring function for doubleblends caused by blend-deinterlacing of telecined sources. Superseded by [[srestore]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| MOmonster&lt;br /&gt;
|-&lt;br /&gt;
| [[mrestore]]&lt;br /&gt;
| Uses conditional frame evaluation to undo standard conversions with blends. Superseded by [[srestore]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| MOmonster&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [//web.archive.org/web/20061113201230/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;
|[[YV12]]&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;
| [http://wilbertdijkhof.com/mg262/Restorefps_v10.zip Plugin]&lt;br /&gt;
| {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Srestore]]&lt;br /&gt;
| Replacement function for mrestore, c_deblend, FixBlendIVTC and DupHq.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[Srestore|script]]&lt;br /&gt;
| MOmonster&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] and much more information [http://horman.net/doctorwho/specials.php here] and [http://forum.doom9.org/showthread.php?t=168832 here].&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's deblend algorithm and neuron2'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;
&lt;br /&gt;
=== Film Damage correction ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://avisynth.org.ru/descratch/descratch.html 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.nl/users/fizick/descratch/descratch110.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/despot/despot.html 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.nl/users/fizick/despot/despot3610.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[deVCR]]&lt;br /&gt;
| deVCR eliminates (to a certain degree) the annoying horizontal lines that keep crawling around your VHS or Beta recorded video. See discussion [http://forum.videohelp.com/threads/323093-How-to-use-DeVCR-for-Avisynth here] and [http://www.digitalfaq.com/forum/video-restore/2607-tracking-lines-video.html here.]&lt;br /&gt;
|&lt;br /&gt;
| Script&lt;br /&gt;
| Ricardo Garcia&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=144271 VideoFred's Film Restoring]&lt;br /&gt;
| A suite of scripts for film restoring.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=144271 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;
| [http://avisynth.nl/index.php/RemoveDirt Plugin]&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Frequency Interference removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://avisynth.org.ru/defreq/defreq.html 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/defreq07.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/vcmohan/FanFilter/FanFilter.html FanFilter] &lt;br /&gt;
| Regular vertical frequency interference is filtered in spatial domain.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB32]], [[RGB24]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/FanFilter/FanFilter.zip 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'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] and See [http://forum.doom9.org/showthread.php?p=1673928] for mod version.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| thetoof&lt;br /&gt;
|-&lt;br /&gt;
| BruteIVTC&lt;br /&gt;
| Some information [http://web.archive.org/web/20141221181254/http://privatepaste.com/download/77d973422b here]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20091214015625/http://mf.creations.nl/avs/filters/BruteIVTC.dll Plugin]&lt;br /&gt;
| {{Author/Marc FD}}&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'd.  This filter reconstructs the chroma exactly and fixes the problem.&lt;br /&gt;
| [[YV12]]&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 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;
| [{{N2Moved}}/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's Greedy/HM algorithm code to perform pulldown matching, filtering, and video deinterlace. It has pretty much been superseded by Donald Graft'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;
| [{{N2Archived}}/trbarry/GreedyHMA.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IT]]&lt;br /&gt;
| Inverse Telecine plugin.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.dropbox.com/s/002p6yed7dzi8f3/IT_YV12_0103_width8K.zip?dl=1 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. More information [http://web.archive.org/web/20140420184542/http://doom10.org/index.php?topic=292.msg5499 here] (last post).&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1466105&amp;amp;postcount=4 Script]&lt;br /&gt;
| {{Author/cretindesalpes}} aka Firesledge&lt;br /&gt;
|-&lt;br /&gt;
|JIVTC&lt;br /&gt;
|JIVTC applies inverse telecine in a way to minimize artifacts often seen on Japanese TV broadcasts followed by recalculating the fields that might still contain some.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://raw.githubusercontent.com/lovesyk/avisynth-scripts/master/JIVTC.avsi Script]&lt;br /&gt;
|[http://github.com/lovesyk lovesyk]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=168397 MDec2]&lt;br /&gt;
|MDec2 is a 2 pass decimating filter, acting much like the MultiDecimate filter.&lt;br /&gt;
|[[RGB32]], [[RGB24]], ][[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://www.mediafire.com/download/3ajn640ujxr8jnx/MDec2_25%2626_dll_v1.01_20150330.zip Plugin]&lt;br /&gt;
|StainlessS&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;
| [{{N2Moved}}/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://web.archive.org/web/20091028073306/http://geocities.com/siwalters_uk/pfravs.html Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ReMatch]]&lt;br /&gt;
| ReMatch is a field matching plugin, specifically for anime.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/rematch_5F25_dll_20050306.zip Plugin]&lt;br /&gt;
| Dan Donovan&lt;br /&gt;
|-&lt;br /&gt;
| RePal&lt;br /&gt;
|  [http://forum.doom9.org/showthread.php?t=48401 Discussion] / [http://forum.doom9.org/showthread.php?p=1092552#post1092552 repal_29.97Hz_mod]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/repal_5F25_dll_20030523.zip Plugin] - [http://forum.doom9.org/attachment.php?attachmentid=8028&amp;amp;d=1201414683 Mod]&lt;br /&gt;
| Bach&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://www.kevina.org/tel/ Plugin]&lt;br /&gt;
| {{Author/Kevin Atkinson}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Decomb]]&lt;br /&gt;
| The Telecide and Decimate filters can be combined to implement IVTC.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [{{N2Moved}}/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;
| [http://web.archive.org/web/20140420181748/http://bengal.missouri.edu/~kes25c/TIVTCv105.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| TPRIVTC&lt;br /&gt;
| TPRIVTC stands for TMPEG InVerse Telecine, i.e. the process where an 29.97fps interlaced NTSC clip is converted to 23.976fps while removing interlaced frames. [http://web.archive.org/web/20030808191810/http://kurosu.inforezo.org/avs/TPRIVTC/index.html Readme]&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/tprivtc_5F25_dll_20040930.zip Plugin]&lt;br /&gt;
| daxab, {{Author/Kurosu}}&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;
| [{{N2Archived}}/trbarry/UnComb.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=167875 WeaveMan]&lt;br /&gt;
| Remove arbitrary pulldown patterns manually; meant for perfectionists to undo non-standard 24-&amp;gt;25 fps, 25-&amp;gt;29.97 fps, etc. telecine conversions, along with other weird telecine anomalies created by broadcasters speeding up film-sourced content. See sample case [http://forum.doom9.org/showthread.php?p=1630931&amp;amp;highlight=weaveman#post1630931 here].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20131208232913/http://chidragon.thedessie.com/Doom9/WeaveMan-v0.2.zip Plugin]&lt;br /&gt;
| ChiDragon&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;
| FixVHSOversharp attempts to repair the light and dark halos that follow high contrast edges found in VHS sources. See [http://web.archive.org/web/20131014010552/http://www.videohelp.eu/forum/avisynth/2851-avisynth-fixvhsoversharp-beta.html discussion.] &lt;br /&gt;
| | [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20091026142456/http://www.geocities.com/mrtibsvideo/fixvhsoversharp.html Plugin]&lt;br /&gt;
| [http://web.archive.org/web/20091027001215/http://geocities.com/mrtibsvideo/ MrTibs]&lt;br /&gt;
|-&lt;br /&gt;
| GhostBuster&lt;br /&gt;
| Ghostbuster is an AviSynth filter for removing &amp;quot;ghosts&amp;quot; from a clip. A ghost in this context is a faint copy of the picture offset horizontally. It works by either subtracting or adding the image from itself at the specified offset. With some tweaking the result, while not perfect, can be very pleasing. See discussion [http://forum.doom9.org/showthread.php?t=35339 here] and [http://web.archive.org/web/20121215130729/http://www.videohelp.eu/forum/avisynth/14691-ghostbuster-filter-avisynth.html here.]&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=12721&amp;amp;d=1330678606 Plugin]&lt;br /&gt;
| [http://web.archive.org/web/20140420183804/http://www.videohelp.eu/forum/avisynth/14679-sansgrips-avisynth-filters.html SansGrip]&lt;br /&gt;
|-&lt;br /&gt;
| LGhost&lt;br /&gt;
| Plugin intended for ghost removal but can also reduce edge (ringing) artifacts. See [http://forum.doom9.org/showthread.php?p=1176552#post1176552 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://nullinfo.s21.xrea.com/data/LGhost0301.zip Plugin]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logo Removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[DeKafka]]&lt;br /&gt;
| This fairly simple filter washes away those annoying bugs from broadcast clips.&lt;br /&gt;
| Any&lt;br /&gt;
| Script&lt;br /&gt;
| poptone&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;
| [[RGB32]]&lt;br /&gt;
| [{{N2Moved}}/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;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/InpaintFunc.avs 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;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/Rm_logo.avs Script]&lt;br /&gt;
| Spuds &lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=154559 s_ExLogo]&lt;br /&gt;
|De-logo function with clipping (Dekafka mod).&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[http://www.mediafire.com/download/40cpnnctd0uutpv/s_ExLogo_1.1.zip Script]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| X-Logo&lt;br /&gt;
| X-Logo AviSynth plugin and VirtualDub filter. Removes opaque logos. See [http://forum.doom9.org/showthread.php?t=56660 discussion] and [http://forum.videohelp.com/threads/273109-Remove-an-opaque-logo-using-Xlogo-in-Avisynth tutorial].&lt;br /&gt;
| [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.marzocchi.net/Olafsen/Software/X-Logo?setview=en Plugin]&lt;br /&gt;
| [http://web.archive.org/web/20041204210505/http://members.verizon.net/~vze3kkvm/filters.html Leuf]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Luma Equalization ===&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://www.avisynth.nl/users/warpenterprises/files/antiflicker_5F25_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;
| {{Author/Fizick}}&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;
| [[ReduceFlicker]]&lt;br /&gt;
| Reduces temporal oscillations in clips; should be applied before deinterlacing. Contains ReduceFlicker, ReduceFluctuations, and LockClense. See [http://videoprocessing.fr.yuku.com/topic/24/ReduceFlicker-05 discussion.] &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/index.php/ReduceFlicker 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;
| {{Author/Denis Zhitenev}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Vinverse]]&lt;br /&gt;
| A simple but effective plugin to remove residual combing.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/tp7/vinverse/releases Plugin]&lt;br /&gt;
| {{Author/Didée}}, {{Author/tritical}}, {{Author/tp7}}&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;
=== [[:Category:Rainbow &amp;amp; Dot Crawl Removal|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://github.com/dubhater/vapoursynth-bifrost/releases/download/v2.0-avs/avisynth-bifrost-v2.0.7z Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}, dubhater&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;
| [[Checkmate]]&lt;br /&gt;
| Spatial-temporal dot crawl removal. See [http://github.com/tp7/checkmate Checkmate for AviSynth 2.6].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/Checkmate Plugin]&lt;br /&gt;
| {{Author/mf}} / prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| [[ChubbyRain]]&lt;br /&gt;
| Spatial-temporal rainbow reducing script.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/ChubbyRain.avsi Script]&lt;br /&gt;
| Mug Funky&lt;br /&gt;
|-&lt;br /&gt;
| [[ChubbyRain2]]&lt;br /&gt;
| Spatial-temporal rainbow reducing script based on [[ChubbyRain]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/ChubbyRain2.avsi Script]&lt;br /&gt;
| Lothar&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/data/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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://nullinfo.s21.xrea.com/data/DeDot_YV12_0002.zip Plugin]&lt;br /&gt;
| {{Author/thejam79}} / {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeRainbow]]&lt;br /&gt;
| A simple script to reduce rainbows. See [http://forum.doom9.org/showthread.php?p=398106#post398106 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/images/DeRainbow.avsi 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]]&lt;br /&gt;
| [http://avisynth.nl/images/DFMDeRainbow-20140223.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 spatial; only targets pixels for dot crawl removal if luma is fluctuating and (optionally) chroma is not.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140421001939/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 spatial; only targets pixels for derainbowing if chroma is fluctuating and (optionally) luma is not.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140421001939/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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/MfRainbow-v0.32.avsi Script]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Rainbow_Smooth]]&lt;br /&gt;
| A small spatial derainbow function. It uses [[SmoothUV]] to smooth out chroma and edge masking to prevent color bleeding.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/Rainbow_smooth.avsi 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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/SmartSSIQ.avsi 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;
| [[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). See [http://github.com/Elegant996/TComb TComb for AviSynth 2.6.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/index.php/TComb 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;
| [[YARK|Script]]&lt;br /&gt;
| jase99&lt;br /&gt;
|-&lt;br /&gt;
| [[ASTDR]]&lt;br /&gt;
| ASTDR uses mt_motion for motion and edge to deal with moving Rainbow and apply mask once more in the opposite way to keep around the lines as they are. It uses DeCross and other filters to remove Rainbow. ASTDRmc avoids chroma bleeding in moving scenes. See [http://forum.doom9.org/showpost.php?p=1665492&amp;amp;postcount=27 post on doom9.org].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[ASTDR|Script]]&lt;br /&gt;
| AmjadSONY&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Stabilization ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[CelStabilize]]&lt;br /&gt;
| Script which holds a fixed background steady.  Doesn't work well with pans or fades.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/CelStabilize Script]&lt;br /&gt;
| mg262&lt;br /&gt;
|-&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;
|DepanSafe&lt;br /&gt;
|Another DePan stabilization script. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[DepanSafe_source|Script]]&lt;br /&gt;
|[http://pastebin.com/u/tophf tophf]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=171051 Deshaker3D]&lt;br /&gt;
| Experimental 3D image stabiliser (VDub [http://www.guthspot.se/video/deshaker.htm Deshaker] required).&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=171051 Plugin]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=172136 SpatialAlign]&lt;br /&gt;
|Fix spatial alignment between two clips containing similar scenes.&lt;br /&gt;
|Any?&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=172136 Script]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [[Stab]]&lt;br /&gt;
| Simple but powerful script to remove small high frequency jitter that appears often on old/bad transfers. See [http://forum.doom9.org/showthread.php?p=1222830#post1222830]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/Stab.avsi Script]&lt;br /&gt;
| g-force&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.videohelp.com/threads/371336-Stabilization-Tools-Pack-v1-8 Stabilization Tools Pack]&lt;br /&gt;
| A set of tools to work with common stabilization issues, mainly from telecine process.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.videohelp.com/threads/371336-Stabilization-Tools-Pack-v1-8 Script]&lt;br /&gt;
|Dogway&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20151223052321/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's Avisynth 2.6 MT to stop working)&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20151223052318/https://code.google.com/p/avisynthrestoration/downloads/list Script]&lt;br /&gt;
| halifaxgeorge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Denoisers ==&lt;br /&gt;
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;
| This is an adaptive Median Filter for eliminating certain types of noise. It uses local statistics (minimum, maximum and median values) of a moving local grid, and changes grid size depending on local statistics.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/index.php/AdaptiveMedian Plugin]&lt;br /&gt;
|{{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| Atc&lt;br /&gt;
| Alternate Temporal Cleaner; a fast temporal cleaner with some cool stuff.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://ziquash.chez-alice.fr/atc%20beta%201.zip Plugin]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
| ColourizeSmooth&lt;br /&gt;
| ColourizeSmooth uses a general colourizing algorithm to smooth a given clip. ColourizeSmooth is based on this [http://www.cs.huji.ac.il/~yweiss/Colorization algorithm.] See [http://forum.doom9.org/showthread.php?t=91344 discussion]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/colourizesmooth_5F25_dll_20050429.zip Plugin]&lt;br /&gt;
| insanedesio&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.kevina.org/temporal_median/ ConditionalTemporalMedian]&lt;br /&gt;
|This filter is designed to remove temporal noise in the form of small dots and streaks found in some videos. A common cause of this is dirty VHS heads but I have also seen small black or white streaks in broadcast material. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.kevina.org/temporal_median/CondTemporalMedian-0.93.zip Plugin]&lt;br /&gt;
| {{Author/Kevin Atkinson}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=159148 Deathray]&lt;br /&gt;
|OpenCL GPU accelerated spatial/temporal non-local means de-noising. See [http://raw.githubusercontent.com/JawedAshraf/Deathray/master/Deathray%20readme.txt readme] and GitHub source code [http://github.com/JawedAshraf/Deathray/ repository].&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://github.com/JawedAshraf/Deathray/raw/master/Deathray.dll Plugin]&lt;br /&gt;
|[http://github.com/JawedAshraf Jawed]&lt;br /&gt;
|-&lt;br /&gt;
| [[DeNoise]]&lt;br /&gt;
| This is an adaptive local noise reduction filter. It uses global variance of the noise, local mean and local variance in a moving grid of specified size. It tries to preserve edges as closely as possible. The global variance value can be specified or it can be computed from a window. The global variance can have one value for the entire clip or can vary frame to frame linearly or computed from a window with its coordinates linearly moving with frame numbers.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/DeNoise Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20071105084352/http://www.geocities.com/fredthompson6/Kiraru2002/Kiraru2002sROOM.htm#dnr2 DNR2]&lt;br /&gt;
| Dynamic Noise Reduction 2 is based on the VirtualDub [http://www.shdon.com/vid/dnr DNR] filter by Steve Don and Avery Lee. &lt;br /&gt;
| [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/dnr2_5F25_dll_20021225.zip Plugin]&lt;br /&gt;
| {{Author/kiraru2002}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeSaltPepper]]&lt;br /&gt;
| Remove white and black noise.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://avisynth.nl/index.php/DeSaltPepper Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| ExtendedBilateral&lt;br /&gt;
| ExtendedBilateral extends the regular bilateral filtering process by adding an &amp;quot;initial estimation preprocess.&amp;quot; It is similar in operation to [[TBilateral]] and offers many of the same options (though not all) while adding the preprocess. See [http://forum.doom9.org/showthread.php?t=96015 discussion.]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/extendedbilateral_5F25_dll_20050622.zip Plugin]&lt;br /&gt;
|insanedesio&lt;br /&gt;
|-&lt;br /&gt;
| [[FFTQuiver]]&lt;br /&gt;
| Remove periodic noise. Useful for analog interference.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://avisynth.nl/index.php/FFTQuiver Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| SmootherHiQ&lt;br /&gt;
| VirtualDub's ''Smart Smoother High Quality'' for AviSynth, see archived [http://web.archive.org/web/20040611013235/http://cultact-server.novi.dk/kpo/avisynth/smooth_hiq_as.html documentation].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/smoothhiq_5F25_dll_20030208.zip Plugin]&lt;br /&gt;
| {{Author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TNLMeans]]&lt;br /&gt;
| TNLMeans is an implementation of the NL-means denoising algorithm. - [http://forum.doom9.org/showthread.php?t=111344 discussion] - [http://forum.doom9.org/showthread.php?t=168090 TNLMeans built with ICL10]&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=171817 TfNLMeans] - an AviSynth 2.6 fork of TNLMeans 1.0.3&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20151125175557/http://bengal.missouri.edu/~kes25c/TNLMeansv103.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| KNLMeansCL&lt;br /&gt;
| KNLMeans is an optimized OpenCL implementation of the Non-local means denoising algorithm. See [http://forum.doom9.org/showthread.php?t=171379 discussion.]. View on [http://github.com/Khanattila/KNLMeansCL/wiki/Filter-description GitHub].&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/Khanattila/KNLMeansCL/releases Plugin]&lt;br /&gt;
| [http://github.com/Khanattila Khanattila]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=172966 xNLMeans]&lt;br /&gt;
|xNLMeans is an AviSynth plugin implementation of the Non Local Means denoising proposition. This implementation provides several optimizations and extensions over the original proposition and other implementations.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://www.mediafire.com/download/4stpv24pvpfclzm/xNLMeans_0.03_20160324.zip Plugin] &amp;lt;!--[http://www.mediafire.com/download/bmldoqgmmboij8n/xNLMeans_0.01_151212.zip older version]--&amp;gt;&lt;br /&gt;
|martin53&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 [{{N2Moved}}/2dcleaner.html 2D Cleaner.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://dl.dropboxusercontent.com/s/vh7a5xmdpyj3d8u/_2DCleanYUY2_v0_10_mod_for_smp_YV12.zip Plugin]&lt;br /&gt;
| {{Author/kiraru2002}}, {{Author/xeon533}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DctFilter]]&lt;br /&gt;
| An experimental filter that operates on DCT coefficients. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/index.php/DctFilter Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DCTFun]]&lt;br /&gt;
| A fast spatial denoiser that does a hard thresholding of a complete 4x4 ICT transform.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/DCTFun Plugin]&lt;br /&gt;
| Prunedtree &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;
| [[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;
| [[frfun3d]]&lt;br /&gt;
| Fractal denoising; frfun3d is a quality optimized frfun3b. See [http://forum.doom9.org/showthread.php?t=110200 discussion] &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://dl.dropboxusercontent.com/s/xqxfy59pcv3ea1q/frfun3d_r1.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://avisynth.nl/index.php/Frfun7 Plugin]&lt;br /&gt;
| prunedtree&lt;br /&gt;
|-&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;
|Kuwahara&lt;br /&gt;
|This filter is an edge preserving spatial noise reduction filter. It applies spatial smoothing while preserving the edges. See [http://forum.doom9.org/showthread.php?p=1689773 discussion]&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[http://www.wilbertdijkhof.com/Kuwahara_v11.zip Plugin]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [{{N2Moved}}/msmooth/msmooth.html Msmooth]&lt;br /&gt;
| Masked smoother, designed specifically for anime.&lt;br /&gt;
| [[YV12]], [[RGB32]]&lt;br /&gt;
| [{{N2Moved}}/msmooth/msmooth202.zip Plugin]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothUV]]&lt;br /&gt;
| A spatial denoising plugin based on [{{N2Moved}}/smooth.html Smart Smoother] and [{{N2Moved}}/hiq/smoothhiq.html Smart Smooth HiQ].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/smoothuv_5F25_dll_20030902.zip Plugin]&lt;br /&gt;
| {{Author/Kurosu}}&lt;br /&gt;
|-&lt;br /&gt;
|[[SPresso]]&lt;br /&gt;
|A fast script to make SD content compress better while keeping the &amp;quot;original look&amp;quot;.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showpost.php?p=867316&amp;amp;postcount=23 Script]&lt;br /&gt;
|{{Author/Didée}}&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://web.archive.org/web/20151125175557/http://bengal.missouri.edu/~kes25c/TBilateralv0911.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&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 neighbors. See [http://forum.doom9.org/showthread.php?s=&amp;amp;postid=205442#post205442 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20130207143129/http://neuron2.net/trbarry/UnDot.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&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://web.archive.org/web/20140420181313/http://bengal.missouri.edu/~kes25c/cnr2_v261.zip Plugin]&lt;br /&gt;
| {{Author/Marc FD}}, {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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://web.archive.org/web/20070225212908/http://bengal.missouri.edu/~kes25c/FluxSmooth-1.1b.zip Plugin]&lt;br /&gt;
| {{Author/SansGrip}}, {{Author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/grapesmoother.htm 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 [[MVTools]] package.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/index.php/MVTools Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.nl/users/fizick/docs/english/externalfilters/temporalcleaner.htm TemporalCleaner]&lt;br /&gt;
| TemporalCleaner is an AviSynth port of the original port of the VirtualDub filter TemporalCleaner made by [http://home.earthlink.net/~casaburi/download/#temporalcleaner Jim Casaburi.]&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://web.archive.org/web/20151125175557/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;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/TemporalDegrain.avs Script]&lt;br /&gt;
| Didée, Sagekilla &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spatio-Temporal Denoisers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://web.archive.org/web/20130118045049/http://hellninjacommando.com/con3d/beta/index.html 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], [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=49806 continued].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20130118045049/http://hellninjacommando.com/con3d/beta/con3d-yv12-beta5.zip 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;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/index.php/Deen Plugin]&lt;br /&gt;
| {{Author/Marc FD}}&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;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=162603 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;
| [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://ldesoras.free.fr/src/avs/dfttest-1.9.4.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 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=147676 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;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.org.ru/degrain/degrainmedian082.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/fft3dfilter/fft3dfilter.html FFT3DFilter]&lt;br /&gt;
| A 3D Frequency Domain filter - gives strong denoising and moderate sharpening. See [http://forum.doom9.org/showthread.php?t=85790 discussion].&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1797567 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. See [http://forum.doom9.org/showthread.php?t=89941 discussion.]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/users/tsp/fft3dgpu0.8.2.7z Plugin]&lt;br /&gt;
| {{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
| [[hqdn3d]] &lt;br /&gt;
| High Quality DeNoise 3D is an Avisynth 2.5 port of the MPlayer filter of the same name. It performs a 3-way low-pass filter, which can completely remove high-frequency noise while minimizing blending artifacts. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://akuvian.org/src/avisynth/hqdn3d/hqdn3d-0.11.zip Plugin]&lt;br /&gt;
| {{Author/akupenguin}}&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;
| [[YV12]]&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;
| [http://avisynth.org.ru/docs/english/externalfilters/mipsmooth.htm MipSmooth]&lt;br /&gt;
| MipSmooth is a reinvention of [[SmoothHiQ]] and [[Convolution3D]]. MipSmooth was made to enable smoothing of larger pixel areas than 3x3(x3), to remove blocks and smoothing out low-frequency noise. See [http://forum.doom9.org/showthread.php?t=64940 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/mipsmooth_5F25_dll_20051223.zip Plugin]&lt;br /&gt;
| {{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/nomosmooth.htm NoMoSmooth]&lt;br /&gt;
| NoMoSmooth temporally denoises relatively static areas and a spatially denoises moving parts. In addition to this motion-based approach, NoMoSmooth employs another technique to try to retain as much existing detail as possible: only pixels that are &amp;quot;fluctuating&amp;quot; are smoothed. See [http://forum.doom9.org/showthread.php?t=37471 discussion.]&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/nomosmooth_5F25_dll_200309015.zip Plugin]&lt;br /&gt;
| SansGrip&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/peachsmoother.htm PeachSmoother]&lt;br /&gt;
| PeachSmoother was designed to cope with the oddities of analog broadcast TV.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/peachsmoother_5F25_dll_20030801.zip Plugin]&lt;br /&gt;
| {{Author/Lindsey Dubb}}&lt;br /&gt;
|-&lt;br /&gt;
| RemoveDirtMC&lt;br /&gt;
| See [http://forum.doom9.org/showthread.php?p=1485300#post1485300 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://pastebin.com/PgkQc9X4 Script]&lt;br /&gt;
| Nephilis/A.SONY&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveGrain]]&lt;br /&gt;
| RemoveGrain is a plugin package containing various plugins for spatial and temporal denoising, repairing, sharpening, deinterlacing, and other utility functions.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/index.php/RemoveGrain Plugin]&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveGrainHD]]&lt;br /&gt;
| RemoveGrainHD is like RemoveGrain but intended for high definition content. It includes various spatial and temporal functions. See [http://web.archive.org/web/20130412014246/http://www.removegrainhd.de.tf/ documentation.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://chaosking.de/wp-content/uploads/avsfilters/Denoisers/Spatial_Denoisers/RemoveGrainHD___(0.5_-_2011-08-11).7z Plugin]&lt;br /&gt;
| {{Author/kassandro}}&lt;br /&gt;
|-&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;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=110078 Script]&lt;br /&gt;
| Heini011&lt;br /&gt;
|-&lt;br /&gt;
| [[RgTools]]&lt;br /&gt;
| Modern rewrite of &amp;lt;tt&amp;gt;[[RgTools/RemoveGrain|RemoveGrain]]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[RgTools/Repair|Repair]]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[RgTools/BackwardClense|BackwardClense]]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[RgTools/Clense|Clense]]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[RgTools/ForwardClense|ForwardClense]]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[[RgTools/VerticalCleaner| VerticalCleaner]]&amp;lt;/tt&amp;gt; all in a single plugin. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/pinterf/RgTools/releases Plugin]&lt;br /&gt;
| {{Author/tp7}}, {{Author/pinterf}}&lt;br /&gt;
|-&lt;br /&gt;
|[[SMDegrain]]&lt;br /&gt;
|SMDegrain is a convenience function for using MDegrain, including 16bit and interlaced support, with extra capabilities for light sharpening and spatial filtering.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://forum.videohelp.com/threads/369142-Simple-MDegrain-Mod-v3-0d-A-Quality-Denoising-Solution Script]&lt;br /&gt;
|{{Author/Dogway}}&lt;br /&gt;
|-&lt;br /&gt;
|[[STMedianFilter]]&lt;br /&gt;
|STMedianFilter is a (slightly motion compensated) spatial/temporal median filter. It fairly very fine grained, using only adjacent pixels in space and time, so it looks at the adjacent 26 locations to filter each location. &lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20130207143129/http://neuron2.net/trbarry/STMedianFilter.zip Plugin]&lt;br /&gt;
|{{Author/Tom Barry}}, {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[STPresso]]&lt;br /&gt;
|A fast script to make SD/720p content compress better without losing detail and original grain structure. See [http://forum.doom9.org/showthread.php?p=1551871#post1551871 discussion.]&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showpost.php?p=1551871&amp;amp;postcount=2 Script]&lt;br /&gt;
|{{Author/Didée}}&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;
=== Averaging/Layering/Masking ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[Average]]&lt;br /&gt;
| A simple plugin that calculates weighted frame-by-frame average from multiple clips. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/index.php/Average Plugin]&lt;br /&gt;
| {{Author/tp7}}, {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://sourceforge.net/projects/avisynthgmplyr/files/ AviSynthGimpLayer]&lt;br /&gt;
|AviSynth Gimp-style Layer merge plugin.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[http://sourceforge.net/projects/avisynthgmplyr/files/ Plugin]&lt;br /&gt;
| [http://sourceforge.net/u/panzerboy66/profile/ panzerboy66]&lt;br /&gt;
|-&lt;br /&gt;
| BlockAverage&lt;br /&gt;
| A simple filter that just averages the Y values of each 2x2 pixel block in a YV12 image – U and V values are left alone as they already common to each 2x2 block in a progressive YV12 image. Just made to see if it satifies the requirements in [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=91580&amp;amp;perpage=10&amp;amp;pagenumber=1 this thread].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20091028073306/http://geocities.com/siwalters_uk/blockaverage01.zip Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&lt;br /&gt;
|-&lt;br /&gt;
|CheckMask&lt;br /&gt;
|A YV12 spatial dot finding filter for AviSynth.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://www.avisynth.nl/users/warpenterprises/files/checkmask_5F25_dll_20050310.zip Plugin]&lt;br /&gt;
|[http://web.archive.org/web/20090618112048/http://kawaii-shoujo.net/AntiAliased/index.html Dan Donovan]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=159274 ColorScreenMask]&lt;br /&gt;
|ColorScreenMask is a special effects plugin for processing chroma key (i.e., a green screen or blue screen) backgrounds. It uses color thresholds rather than absolute values as the criteria for setting the alpha channel transparency. &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://forum.doom9.org/attachment.php?attachmentid=15699&amp;amp;d=1483786544 Plugin]&lt;br /&gt;
|Grandpa Oddball&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=99890 ColourMask]&lt;br /&gt;
|Creates colour masks.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://www.avisynth.nl/users/warpenterprises/files/colourmask_20050911.zip Plugin]&lt;br /&gt;
|{{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/chikuzen/CombMask/tree/master/avisynth CombMask]&lt;br /&gt;
|A filter to create and process comb masks. These filters were written from scratch, but most of logic comes from tritical's [[TIVTC]] plugin.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://github.com/chikuzen/CombMask/releases Plugin]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Fusion]]&lt;br /&gt;
|Pyramidal image processing for video, it uses image pyramids to blend clips together (more commonly used in the creation of HDR images and image stitching).&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://horman.net/fusion.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GraMaMa]]&lt;br /&gt;
| Gradient Mask Maker: Creates a mask (either a gradient or black/white) given a prescribed shape (such as circle, ellipse, line, square or rectangle).&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.wilbertdijkhof.com/GraMaMa_v02.zip Plugin]&lt;br /&gt;
| {{author/E-Male}}, &lt;br /&gt;
{{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://umezawa.dyndns.info/archive/imck/imck-2.3.0-readme.html ImasMultiColorKeying]&lt;br /&gt;
|Chroma keying filter (Japanese)&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://umezawa.dyndns.info/archive/imck/ Plugin]&lt;br /&gt;
|Umezawa Takeshi&lt;br /&gt;
|-&lt;br /&gt;
|MaskCrop&lt;br /&gt;
|Non-clip plugin and function to speed up filtering with a mask.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://www.dropbox.com/s/xcrlno31jqavqob/MaskCrop.7z?dl=1 Plugin]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.videohelp.com/threads/369143-ResizersPack-MasksPack-PlaygroundPack-SmoothContrast-Logo-mod-functions?s=7811fcf9c429ffb99f2e0a4b8043832d&amp;amp;p=2364052&amp;amp;viewfull=1#post2364052 MasksPack]&lt;br /&gt;
|This is a set of functions related to masks, so localized filtering will be able, giving you finer control on how and where to filter or protect certain zones.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://www.mediafire.com/download/mch99c0z5957u9z/MasksPack2.3.zip Script]&lt;br /&gt;
|Dogway&lt;br /&gt;
|-&lt;br /&gt;
|[[Median]]&lt;br /&gt;
|A filter plugin for AviSynth which generates a pixel-by-pixel median of several clips. This is particularly useful for filtering out noise and glitches from multiple VHS/SVHS/8mm/Hi8 tape captures, but can be used for other purposes also. [http://forum.videohelp.com/threads/362361-Median%28%29-plugin-for-AviSynth VideoHelp discussion]&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=170216 Plugin]&lt;br /&gt;
|{{Author/ajk}}&lt;br /&gt;
|-&lt;br /&gt;
| ParameterisedBlend&lt;br /&gt;
| ParameterisedBlend allows you to blend any number of frames within a clip, or blend any number of different clips together.  You can use it as an extended, gamma-aware replacement for Merge().&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://sites.google.com/site/ourenthusiasmsasham/soft#TOC-ParameterisedBlend Plugin]&lt;br /&gt;
| [http://sites.google.com/site/ourenthusiasmsasham/ PitifulInsect]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=172388 Polygon]&lt;br /&gt;
|The very raw beginning of a plugin for drawing high quality polygons (mainly to be used as masks) in AviSynth.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=172388 Plugin]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=163018 RedAverage]&lt;br /&gt;
|Frame-by-frame merging of multiple clips. Includes a masked average, weighted average, and a merge filter. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://chaosking.de/repo/avsfilters/Unclassified/RedAverage___%281.4.3_-_2011-12-02%29.7z Plugin]&lt;br /&gt;
|redfordxx&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/jojje/shapemask ShapeMask]&lt;br /&gt;
|A filter plugin for AviSynth that identifies bright areas such as projector screens at conferences and creates a mask out of them. The use case for which it was created is to deal with overly bright lectures, such as screen casts or talks where the speaker or producer hasn't followed presentation 101; Use light text on a dark background! See [http://forum.doom9.org/showthread.php?t=172308 discussion.]&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20150702103042/http://snarl.zapto.org/files/ShapeMask-1.0.zip Plugin]&lt;br /&gt;
|[http://github.com/jojje jojje]&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/tp7/tcolormask TColorMask]&lt;br /&gt;
|A simple color masking plugin for AviSynth. See [http://forum.doom9.org/showthread.php?t=169832 discussion]&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://github.com/tp7/tcolormask/releases Plugin]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=76595 TCombMask]&lt;br /&gt;
|TCombMask is a simple filter that creates a comb map that can (could) be used by other filters.  It currently supports optional motion adaption, optional spatial adaption, optional luma &amp;lt;-&amp;gt; chroma linking, different thresholds for chroma and luma, and much more.&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20070222162504/http://bengal.missouri.edu/~kes25c/TCombMaskv094.zip Plugin]&lt;br /&gt;
|{{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/tp7/tmaskcleaner TMaskCleaner]&lt;br /&gt;
|A really simple mask cleaning plugin for AviSynth based on mt_hysteresis. See [http://forum.doom9.org/showthread.php?t=169832 discussion]&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://github.com/tp7/tmaskcleaner/releases Plugin]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TMM]]&lt;br /&gt;
| TMM builds a motion-mask for TDeint, which TDeint uses via its 'emask' parameter. See [http://forum.doom9.org/showthread.php?p=980353#post980353 discussion.]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140420183526/http://bengal.missouri.edu/~kes25c/TMMv1.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://github.com/chikuzen/TMM2 TMM2]&lt;br /&gt;
| A rewrite of TMM&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://github.com/chikuzen/TMM2/releases Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Unpremultiply]] &lt;br /&gt;
| This plugin convert the input RGBA clip from premultiplied alpha to straight matted alpha. See [http://forum.doom9.org/showthread.php?t=166730 discussion.]&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=13207&amp;amp;d=1356994426 Plugin]&lt;br /&gt;
| [http://web.archive.org/web/20160610124858/http://code.google.com/p/avisynth-unpremultiply/ Josh Sutinen]&lt;br /&gt;
|-&lt;br /&gt;
| [[uu_mt_blend]]&lt;br /&gt;
| ''Blend'' (''[[Overlay]], [[Layer]]'') two clips using [[MaskTools2|MaskTools]]. Wide selection of blend modes.&lt;br /&gt;
| [[YV12]],[[RGB24]],[[RGB32]]&lt;br /&gt;
| [[Media:UU_mt_blend.avs|Script]]&lt;br /&gt;
| rafriff42&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blurring ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[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;
| [http://dl.dropboxusercontent.com/s/bczippngoqy6xbw/BucketMedian-0.3.1.7z Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GBlur]]&lt;br /&gt;
| Gaussian blur.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/GBlur/GBlur.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MedianBlur]]&lt;br /&gt;
| A plugin with 5 different types of median blur filters. See [http://forum.doom9.org/showthread.php?t=84636 discussion.] &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/tsp/medianblur084.zip Plugin]&lt;br /&gt;
| {{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MedianBlur2]]&lt;br /&gt;
| Implementation of [http://nomis80.org/ctmf.html constant time median filter] for AviSynth 2.6, similar to MedianBlur.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/tp7/MedianBlur2/releases Plugin]&lt;br /&gt;
| {{Author/tp7}}&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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]],&lt;br /&gt;
| [http://web.archive.org/web/20140420184040/http://bengal.missouri.edu/~kes25c/variableblur.zip Plugin]&lt;br /&gt;
| {{Author/tsp}}, {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[VariableMedian]]&lt;br /&gt;
| A simple median filter. See [http://forum.doom9.org/showthread.php?t=83985 discussion]&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://web.archive.org/web/20091027134543/http://www.geocities.com/siwalters_uk/variablemedian.zip Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Borders and Cropping ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[BorderControl]]&lt;br /&gt;
| It's designed to allow you to manipulate the regions at the top, bottom and sides of a frame. Set a black border, set a border region to be faded out and you can &amp;quot;smear&amp;quot; the border to save having to crop and resize the whole frame for the sake of a few pixels. Each border (top,bottom.left and right) can be manipulated independently. See [http://forum.doom9.org/showthread.php?t=33479 discussion] and [http://avisynth.org.ru/docs/english/externalfilters/bordercontrol.htm documentation].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20140709005736/http://www.geocities.com/siwalters_uk/bordercontrol14.zip Plugin]&lt;br /&gt;
|{{Author/Simon Walters}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FillMargins]]&lt;br /&gt;
|FillMargins is a simple AviSynth filter that fills the four margins of a video clip with the outer pixels of the unfilled portion. It takes integer 4 parameters specifying the size of the left, top, right, and bottom margins. These may be any value and do not have to be any particular multiple. See discussion [http://forum.doom9.org/showthread.php?t=50132 here] and [http://forum.doom9.org/showthread.php?t=55881 here], additional [http://avisynth.org.ru/docs/english/externalfilters/fillmargins.htm documentation]&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20130207143129/http://neuron2.net/trbarry/FillMargins.zip Plugin]&lt;br /&gt;
|{{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| Padding&lt;br /&gt;
| Duplicate edge pixels to the outside with [[PointResize]]. See [http://forum.doom9.org/showthread.php?t=165946 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1596804&amp;amp;postcount=5 Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[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. See original [http://forum.doom9.org/showthread.php?t=37204 discussion] and updated AutoCrop [http://forum.doom9.org/showthread.php?t=87602 discussion]&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://len0x.leffe.dnsalias.com/autocrop12.zip Plugin]&lt;br /&gt;
| [http://web.archive.org/web/20050404182221/http://www.videofringe.com/autocrop/ Glenn Bussell], len0x&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/slavanap/ssifSource CropDetect]&lt;br /&gt;
| Plugin to detect black bounding box in video and crop it easily. See [http://forum.doom9.org/showthread.php?p=1761842#post1761842 discussion]. Note, CropDetect small plugin merged within ssifSource project. Look for &amp;quot;CropDetect&amp;quot; function in Sub3D.dll&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[https://github.com/slavanap/ssifSource/releases plugin]&lt;br /&gt;
|[http://github.com/slavanap slavanap]&lt;br /&gt;
|-&lt;br /&gt;
|[[RoboCrop]]&lt;br /&gt;
| RoboCrop is an automatic cropping solution to crop black borders from video clips, loosely based on (but using no code from) AutoCrop by Glenn Bussell. See [http://forum.doom9.org/showthread.php?t=168053 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://www.mediafire.com/download/72y0im53kao3124/RoboCrop_25%2626_dll_v1-06_20150422.zip Plugin]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Colourspace Conversion ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [{{N2Moved}}/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;
|[http://forum.doom9.org/showthread.php?t=171786 Cnv2]&lt;br /&gt;
| Universal [[Convert|ConvertTo...()]] wrapper with some additional features. Requires [http://forum.doom9.org/showthread.php?t=147846 GScript]&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=171786 Script]&lt;br /&gt;
| martin53&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;
| ManualColorMatrix&lt;br /&gt;
| Can perform any matrix-based color conversion. See [http://forum.doom9.org/showthread.php?t=161777 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YV24]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=12346&amp;amp;d=1309522614 Plugin]&lt;br /&gt;
| xv&lt;br /&gt;
|-&lt;br /&gt;
|[[nnedi3_resize16]]&lt;br /&gt;
|An advanced script for high quality 16-bit image resizing and colorspace conversion. &lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[http://avisynth.nl/index.php/Nnedi3_resize16 Script]&lt;br /&gt;
|mawen1250&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/chikuzen/PlanarTools PlanarTools]&lt;br /&gt;
|This plugin is a set of filters that offers converting packed(interleaved) formats to planar formats and vice versa.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV16]]&lt;br /&gt;
|[http://github.com/chikuzen/PlanarTools/releases Plugin]&lt;br /&gt;
|{{Author/Chikuzen}}&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;
|[http://github.com/chikuzen/YV12To422 YV12To422]&lt;br /&gt;
|YV12 to YV16/YUY2 converter for AviSynth 2.6.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://github.com/chikuzen/YV12To422/releases Plugin]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Effects ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AddGrainC]]&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;
| [[RGB24]], [[RGB32]], [[YUY2]],&lt;br /&gt;
[[Y8]], [[YV411]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://ldesoras.free.fr/src/avs/AddGrainC-1.7.1.7z Plugin]&lt;br /&gt;
|{{Author/Tom Barry}}, {{Author/Foxyshadis}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{Author/LaTo}}, {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| AddStaticGrainM&lt;br /&gt;
| This function adds static grain in dark areas based on a mask.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[AddStaticGrainM_source|Script]]&lt;br /&gt;
| [http://canihaziframe.wordpress.com/2011/02/23/addstaticgrainm/ Daiz]&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://www.avisynth.nl/users/warpenterprises/files/blockbuster_5F25_src_20021229.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's hardware to assist with rendering&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/avishader_5F25_dll_20041228.zip 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's VDub filter Colorlooks and Donald Graft'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://forum.doom9.org/showthread.php?t=170732 crt_display]&lt;br /&gt;
| CRT emulation with scanline and phosphor effects. crt_display emulates a CRT display using aperture grille (Trinitron) or Cromaclear technologies. See [http://forum.doom9.org/showthread.php?t=170732 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=170732 Script]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[f3kgrain]]&lt;br /&gt;
| Another 8/16-bit luma adaptive grain generator.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://web.archive.org/web/20131111114900/http://www.nmm-hd.org/upload/get~ElhZlazJbsQ/f3kgrain_v0.4.avsi Script]&lt;br /&gt;
| {{Author/06_taro}}&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/mf}}&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 discussion.]&lt;br /&gt;
| [[YV12]]&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;
| [[GrainFactory3mod]]&lt;br /&gt;
| Luma adaptive grain generating filter in 8-bit precision. Based on Didée's [[GrainFactory3]] script.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140722190952/http://www.nmm-hd.org/upload/get~kvNvGpuyxfc/GrainFactory3mod_v1.2.avsi Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GrainFactoryLite]]&lt;br /&gt;
| Luma adaptive grain generating filter with stacked 16-bit input/output support. Based on Didée's [[GrainFactory3]] script, processing in 16-bit precision, and some commonly unused parameters removed.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140722185917/http://www.nmm-hd.org/upload/get~FaqsQaMom9s/GrainFactoryLite_v1.2.avsi Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/HollywoodSq/HollywoodSq.html HollywoodSQ]&lt;br /&gt;
| Creates popup album, akin to Hollywood squares TV show&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&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;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/noisegenerator_5F25_dll_20050616.zip 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;
| [[YV12]]&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://web.archive.org/web/20131228160225/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?t=158695 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;
| Tries to restore the original progressive field order of a movie (or any predominantly filmed material transferred to video) where the field order changes at scene changes in a seemingly random fashion! See [http://forum.doom9.org/showthread.php?t=49815 discussion.]&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20091028073306/http://geocities.com/siwalters_uk/pfravs.html Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&lt;br /&gt;
|-&lt;br /&gt;
| ReverseFieldDominance&lt;br /&gt;
| This filter is intended to reverse the field dominance of [[PAL]] DV video. See [http://forum.doom9.org/showthread.php?t=46765 discussion.]&lt;br /&gt;
| [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://web.archive.org/web/20091028073306/http://geocities.com/siwalters_uk/reversefielddominance.html Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&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;
| Any&lt;br /&gt;
| Script&lt;br /&gt;
| actionman133&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.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]]&lt;br /&gt;
| Script&lt;br /&gt;
| scharfis_brain&lt;br /&gt;
|-&lt;br /&gt;
| [http://github.com/arkeet/fpsdown/blob/master/README.md 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;
| [http://github.com/arkeet/fpsdown/blob/master/README.md Plugin]&lt;br /&gt;
| [http://github.com/arkeet/ arkeet]&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [{{N2Archived}}/trbarry/FrameDbl.zip Plugin]&lt;br /&gt;
| {{Author/Tom Barry}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.spirton.com/uploads/InterFrame/InterFrame2.html InterFrame]&lt;br /&gt;
| Frame rate conversion script. Interframe works very well at converting 24FPS to 60FPS; converts videos to higher frame rates like newer TVs do. Common names are frame doubling, smooth motion, among others. See [http://forum.doom9.org/showthread.php?t=160226 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1486831&amp;amp;postcount=1 Script]&lt;br /&gt;
|{{Author/SubJunk}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.compression.ru/video/frame_rate_conversion/index_en_msu.html MSU_FRC]&lt;br /&gt;
|The filter is intended for video frame rate up-conversion. It increases the frame rate integer times. It allows, for example, to convert a video with 15 fps into a video with 30 fps.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://www.compression.ru/video/frame_rate_conversion/src/msu_frc.zip Plugin]&lt;br /&gt;
|Dmitriy Vatolin, et al.&lt;br /&gt;
|-&lt;br /&gt;
| Motion&lt;br /&gt;
| Fast true-motion motion-compensation functions for AviSynth. [http://forum.doom9.org/showthread.php?t=101859 Discussion], [http://web.archive.org/web/20060103143553/http://people.pwf.cam.ac.uk/mg262/posts/Motion/motion.html Documentation]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://wilbertdijkhof.com/mg262/Motion_v10.zip plugin]&lt;br /&gt;
| mg262&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 discussion].&lt;br /&gt;
| [[YV12]]&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;
| A modded version of MotionProtectedFPS for extra protection.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/SalFPS3.avs Script]&lt;br /&gt;
| Mug Funky, {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.svp-team.com/wiki/Plugins:_SVPflow SVPflow]&lt;br /&gt;
| SVPflow provides fast and high quality GPU accelerated frame rate interpolation. See [http://forum.doom9.org/showthread.php?t=164554 discussion.] &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.svp-team.com/files/gpl/svpflow-4.0.0.128.zip Plugin]&lt;br /&gt;
| [http://www.svp-team.com/wiki/Credits SVP Team]&lt;br /&gt;
|-&lt;br /&gt;
| [http://github.com/gnaggnoyil/tc2cfr tc2cfr]&lt;br /&gt;
| This plugin that can read a timecode file and convert a given video clip in to one with a constant framerate by adding duplicate frames.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://github.com/gnaggnoyil/tc2cfr/releases Plugin]&lt;br /&gt;
| [http://github.com/gnaggnoyil gnaggnoyil]&lt;br /&gt;
|-&lt;br /&gt;
| [http://tasvideos.org/forum/viewtopic.php?t=12763 TimecodeFPS]&lt;br /&gt;
| Converts clip from VFR to CFR.  Timing information from clip is discarded, and matroska v2 timecodes from the timecodes file are used instead.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://www.mediafire.com/?a51pifo438i7hdb Plugin]&lt;br /&gt;
| natt&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=165045 VFRtoCFR]&lt;br /&gt;
| Converts a variable frame rate (VFR) video to a constant frame rate (CFR) video with the help of Matroska Version 2 Timecodes.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.mediafire.com/download/q6zfgpo5dhh50si/VFRtoCFR20120730.zip Plugin]&lt;br /&gt;
| Aktan&lt;br /&gt;
|-&lt;br /&gt;
| [http://griffeltavla.wordpress.com/2013/01/18/convert-vfr-to-cfr-using-avisynth/ VfrToCfr]&lt;br /&gt;
| This plugin converts variable frame rate clips to constant frame rate by introducing null frames. [http://github.com/jojje/VfrToCfr-the-other-one GitHub repository]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20130430033132/http://snarl.zapto.org/files/vfrtocfr-1.0.zip Plugin]&lt;br /&gt;
| joyje&lt;br /&gt;
|-&lt;br /&gt;
|[[YFRC]]&lt;br /&gt;
| Yushko Frame Rate Converter - doubles the frame rate with strong artifact detection and scene change detection.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://avisynth.nl/images/YFRC-01dd-10mm-2015yyyy.avsi Script]&lt;br /&gt;
| Oleg Yushko&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Frame Replacement/Range Processing ===&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=461878#post461878 ApplyEvery]&lt;br /&gt;
|A collection of AviSynth functions that operate at regular intervals in a clip. &lt;br /&gt;
|&lt;br /&gt;
|[http://www.avisynth.nl/users/stickboy/ApplyEvery.zip Plugin]&lt;br /&gt;
|{{Author/stickboy}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.avisynth.nl/users/fizick/badframes/badframes.html BadFrames]&lt;br /&gt;
|Replaces given bad frames by neighbors or blend (interpolation). Useful for frames with very large defects. &lt;br /&gt;
|&lt;br /&gt;
|[http://www.avisynth.nl/users/fizick/badframes/badframes20.zip Plugin]&lt;br /&gt;
|{{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=162266 ClipClop]&lt;br /&gt;
|Clipclop is a simple plugin to replace ranges in a source clip with the same range, from a replacement clip. Supports up to 255 replacement clips, with unlimited number of replacements into output clip.&lt;br /&gt;
|&lt;br /&gt;
|[http://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=168047 FrameRepeat]&lt;br /&gt;
|FrameRepeat() is a simple plugin to select frames to repeat. Requires AviSynth 2.6.&lt;br /&gt;
|&lt;br /&gt;
|[http://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=167971 FrameSel/FrameRep]&lt;br /&gt;
|FrameSel() is a simple plugin to select individual frames from a clip. Can select frames numbers by direct arguments to filter, or in a string, or in a command file.&lt;br /&gt;
|&lt;br /&gt;
|[http://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=164766 MatchFrames/LocateFrames]&lt;br /&gt;
|MatchFrames, intended for matched frames extraction,LocateFrames, intended to be usable by other scripts to identify matches.&lt;br /&gt;
|&lt;br /&gt;
|[http://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showpost.php?p=1644971&amp;amp;postcount=28 RemapFrames]&lt;br /&gt;
|A collection of functions to rearrange frames between clips. Remaps the frame indices in a clip or from a second clip as specified by an input text file or by an input string. Efficient alternatives to long chains of &amp;lt;tt&amp;gt;FreezeFrame, DeleteFrame, or ApplyRange&amp;lt;/tt&amp;gt;. &lt;br /&gt;
|&lt;br /&gt;
|[http://ldesoras.free.fr/src/avs/RemapFrames-0.4.1.zip Plugin]&lt;br /&gt;
|{{Author/stickboy}}, {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=162446 Prune]&lt;br /&gt;
|Prune is a simple plugin to trim() multiple source clips and splice the results into a new clip. Supports up to 256 source clips, with unlimited number of trims/splices into output clip. Prune can fade Audio (to reduce clicks between splices) for supported audio formats. The plugin will do [[AlignedSplice]] only.&lt;br /&gt;
|&lt;br /&gt;
|[http://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS Plugin]&lt;br /&gt;
|StainlessS&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 AutoAdjust]&lt;br /&gt;
| A high quality automatic adjustement filter. It calculates statistics of clip, averages them temporally to stabilize data and uses them to adjust luminance gain &amp;amp; color balance. AutoAdjust 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. AutoAdjust is internally multithreaded and SSE2 optimized.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=167573 Plugin]&lt;br /&gt;
| {{Author/LaTo}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=173208#post1757661 AutoContrast]&lt;br /&gt;
|Auto contrast adjustment.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=173208#post1757661 Script]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.thebattles.net/video/autolevels.html Autolevels]&lt;br /&gt;
| Improvement of the [[ColorYUV]] filter'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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&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;
| [[ChanMix]]&lt;br /&gt;
| Creates a grayscale image from an RGB24 source, it has 3 parameters to specify how much of each color-channel is used.&lt;br /&gt;
| [[RGB24]]&lt;br /&gt;
| [{{N2Moved}}/misc/chanmix.zip Plugin]&lt;br /&gt;
| E-Male&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [http://forum.videohelp.com/images/guides/p1767998/channelmixer_v1_0.zip Plugin]&lt;br /&gt;
| Gustaf Ullberg&lt;br /&gt;
|-&lt;br /&gt;
| [[ChromaJig]]&lt;br /&gt;
| Automatic Colorization.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1775733#post1775733]&lt;br /&gt;
| MWilson&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorBalance]]&lt;br /&gt;
| Same tool that is found in Gimp &amp;amp; Cinepaint. See [http://forum.doom9.org/showthread.php?p=1180090#post1180090 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://dl.dropbox.com/s/ve66ayxfnfet9u0/ColorBalance_0.26.zip Plugin]&lt;br /&gt;
| Gavino &amp;amp; mikeytown2&lt;br /&gt;
|-&lt;br /&gt;
|ColorLooks&lt;br /&gt;
| This plugin is based on Trev's VDub filter [http://www.trevlac.us/FilterDocs/ Colorlooks] and Donald Graft's [http://rationalqm.us/colorize.html Colorize] (well it works a bit similar). I also added some new stuff. The plugin contains the following filters: Technicolor, Colorize, Sepia and Posterize. See [http://forum.doom9.org/showthread.php?t=97706 discussion]&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://www.wilbertdijkhof.com/ColorLooks_v13.zip Plugin]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=163829 ColorYUV2]&lt;br /&gt;
|YUV color adjustment plugin with a graffer. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://www.mediafire.com/download/875czvfnigu72ds/ColorYUV2_25_dll_20120529.zip Plugin]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=96308 ColourLike]&lt;br /&gt;
| Makes a clip look like a 'reference' clip by adjusting each colour mask. Updated [http://forum.doom9.org/showpost.php?p=1582935&amp;amp;postcount=38 documentation]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/colourlike_5F25_dll_20050825.zip 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;
|[http://mpierce.pie2k.com/pages/211.php Exposure]&lt;br /&gt;
|Exposure function for AviSynth.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[http://mpierce.pie2k.com/downloads/exposure.zip Plugin]&lt;br /&gt;
|Matt Pierce&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}}'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?t=173695 GamMac]&lt;br /&gt;
|Useful to correct color cast on old 8mm films.&lt;br /&gt;
|[[RGB32]], [[RGB24]]&lt;br /&gt;
|[http://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS Plugin]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=605890#post605890 GiCocu]&lt;br /&gt;
| Use GIMP/Photoshop curve files, see [http://avisynth.org.ru/docs/english/externalfilters/gicocu.htm documentation.] &lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/gicocu_5F25_dll_20050620.zip Plugin]&lt;br /&gt;
| E-Male&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=167027#post1629321 Gray_Balance]&lt;br /&gt;
|A gray balance script, which is based on Black/White/Gray balance picker.&lt;br /&gt;
|[[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=167027#post1629321 Script]&lt;br /&gt;
|Kisa_AG&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20130812061301/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'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;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20120419193005/http://strony.aster.pl/paviko/Hdragc-1.8.7.zip Plugin]&lt;br /&gt;
| {{Author/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;
| [[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;
| [http://avisynth.nl/users/vcmohan/HistogramAdjust/HistogramAdjust.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Histograms in RGB &amp;amp; CMY]]&lt;br /&gt;
| Similar to Histogram(&amp;quot;levels&amp;quot;) but for RGB and CMY instead of YUV. It also includes a RGB parade color scope.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/images/Histograms_in_RGB_%26_CMY.avsi Script]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
|HSVAdjust&lt;br /&gt;
|HSVAdjust/HSLAdjust/HSIAdjust let's you rotate hues, control the strength of color (saturation), or modify the brightness of a clip. The type of brightness depends on the filter. It's value for HSVAdjust, lightness for HSLAdjust or intensity for HSIAdjust. See [http://forum.doom9.org/showthread.php?t=162022 discussion]&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[http://www.wilbertdijkhof.com/HSVAdjust_v01.zip Plugin]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|Hue&lt;br /&gt;
|This plugin is a port of Donald Graft's VirtualDub [http://rationalqm.us/hue.html Hue] filter. See [http://forum.doom9.org/showthread.php?s=&amp;amp;threadid=87439&amp;amp;pagenumber=2 discussion]&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[http://www.wilbertdijkhof.com/Hue_v10.zip Plugin]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|MatchHistogram&lt;br /&gt;
| Tries to modify the histogram of the input clip to match that of a reference clip. Should be used for analysis only, not for production. See [http://forum.doom9.org/showthread.php?t=153196 discussion]&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://latoninf.free.fr/d9/MatchHistogram.7z Plugin]&lt;br /&gt;
| {{Author/LaTo}}&lt;br /&gt;
|-&lt;br /&gt;
| [[OutRange]]&lt;br /&gt;
| A simple function to scan the whole video and output a log file, in which out-of-tv-range frames are logged.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/images/OutRange.avsi Script]&lt;br /&gt;
| 06_taro&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=170642 RGBAdapt]&lt;br /&gt;
|Another RGB color correction plugin, it also also includes a graffer.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[http://www.mediafire.com/download/bo4afg77u4dfu8k/RGBAdapt_dll_v0.3-20150617.zip Plugin]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=168293 RgbAmplifier]&lt;br /&gt;
|An AviSynth forensic plugin to amplify color shifts.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[http://www.mediafire.com/download/432rxa9ed1lr2in/RgbAmplifier_25_dll_v1.03_20140607.zip Plugin]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SGradation]]&lt;br /&gt;
| SGradation is much like a gamma function, but '2nd order'.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| Script&lt;br /&gt;
| martin53&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=163829 ShowChannels]&lt;br /&gt;
|Simple plugin whose only function is to display the average Y,U and V values for a YUV frame or R,G, and B for an RGB frame. Also shows accumulated average for all frames visited so far.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://www.mediafire.com/download/2dgk1y1cohql64r/ShowChannels_25%2626_v0-8_dll_20150330.zip Plugin]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowOverRange]]&lt;br /&gt;
| Shows illegal &amp;quot;TV range&amp;quot; by painting pixels blue for anything less than 16 and red for anything greater than 235.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.nmm-hd.org/newbbs/download/file.php?id=164 Plugin]&lt;br /&gt;
| {{Author/SAPikachu}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=154971 SmoothAdjust]&lt;br /&gt;
| SmoothAdjust is a set of 5 plugins to make YUV adjustements. These 5 plugins have a smoothing &amp;amp; dithering algorithm to avoid banding issue. Calculations are made in 32bits float to avoid rounding errors and artifacts. SmoothAdjust is multithreaded (up to 16 threads) and SSE2 optimized. SmoothAdjust is [[SmoothLevels|SmoothLevels']] successor. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=154971 Plugin]&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;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| Script&lt;br /&gt;
| actionman133 &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;
| [[VideoScope]]&lt;br /&gt;
| Similar to Histogram(&amp;quot;classic&amp;quot;) but with additional features, it shows waveform monitors and a vectorscope. &lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://www.wilbertdijkhof.com/VScope12.zip Plugin]&lt;br /&gt;
| {{Author/Randy French}}&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'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;
=== Line Darkening ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&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;
| [http://forum.doom9.org/showthread.php?p=1060081#post1060081 Script]&lt;br /&gt;
| Vectrangle / {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Hysteria]]&lt;br /&gt;
|Hysteria, a line darkening script by Scintilla.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://pastebin.com/raw/fvDdiV6m Script]&lt;br /&gt;
|Scintilla&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showpost.php?p=993939&amp;amp;postcount=2 LineDarkenToon]&lt;br /&gt;
| LineDarkenToon use the idea of mf_toon (0.5) for linedarken. I wanted a really small fast code like FastLineDarken but with similar output like mf_toon and this is the result.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=993939&amp;amp;postcount=2 Script]&lt;br /&gt;
| MOmonster&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
|[[proToon]]&lt;br /&gt;
|Line darkening script, used to be known as vmToon and before that mfToon.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://pastebin.com/raw/Aw9En26L Script]&lt;br /&gt;
|TheProfileth&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 line darkener. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://dl.dropbox.com/s/guk5plphkthdy2f/Toon-v1.1.7z Plugin]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ToonLite]]&lt;br /&gt;
| It's the same as [[Toon]], just without the warpsharp processing..&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;
| [[AreaResize]]&lt;br /&gt;
| An area-average resizer plugin; only use to downscale.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://www.mediafire.com/download.php?kn56wh7r81vk2rx Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Debicubic]]&lt;br /&gt;
| This filter is designed to reverse the effects of bicubic upsampling.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140622040033/http://rgb.chromashift.org/debicubic%20r2.zip Plugin]&lt;br /&gt;
| Prunedtree&lt;br /&gt;
|-&lt;br /&gt;
| [[Debilinear]]&lt;br /&gt;
| This filter is designed to reverse the effects of bilinear upsampling.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140214021604/http://rgb.chromashift.org/debilinear%20r6.zip Plugin]&lt;br /&gt;
| Prunedtree&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1738351#post1738351 edi_rpow2]&lt;br /&gt;
|An improved rpow2 function for nnedi3, nnedi3ocl, eedi3, and eedi2. Requires [http://www.mediafire.com/download/lcbtb7uta4ta5pc/ResizeX_v1.0.avsi ResizeX]&lt;br /&gt;
|[[RGB24]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://www.mediafire.com/view/pcmkxaauku375xd/edi_rpow2_v1.0.avsi Script]&lt;br /&gt;
|Desbreko&lt;br /&gt;
|-&lt;br /&gt;
| [[JincResize]]&lt;br /&gt;
| Jinc (EWA Lanczos) Resampler Plugin for Avisynth/Avisynth+. See [http://forum.doom9.org/showthread.php?t=169813 discussion.]&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/AviSynth/jinc-resize/releases Plugin]&lt;br /&gt;
| innocenat&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;
|[[nnedi3/nnedi3_rpow2|nnedi3_rpow2]]&lt;br /&gt;
| Enlarge images by the powers of 2 using Neural Network New-Edge Directed Interpolation ; nnedi3_rpow2 is a function included in [[nnedi3]].&lt;br /&gt;
|[[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://avisynth.nl/index.php/Nnedi3 Plugin]&lt;br /&gt;
|{{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
|[[nnedi3ocl/nnedi3x_rpow2|nnedi3x_rpow2]]&lt;br /&gt;
| Enlarge images by the powers of 2 using Neural Network New-Edge Directed Interpolation ; nnedi3x_rpow2 is a script function included in [[nnedi3ocl]].&lt;br /&gt;
|[[RGB24]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://avisynth.nl/index.php/nnedi3ocl Script and Plugin]&lt;br /&gt;
|SeT&lt;br /&gt;
|-&lt;br /&gt;
|[[nnedi3_resize16]]&lt;br /&gt;
|An advanced script for high quality image resizing and colorspace conversion. &lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[http://avisynth.nl/index.php/Nnedi3_resize16 Script]&lt;br /&gt;
|mawen1250 &lt;br /&gt;
|-&lt;br /&gt;
| [[PointSize]]&lt;br /&gt;
| A set of [http://en.wikipedia.org/wiki/Image_scaling pixel art resizers]; Includes Scale2x/3x, LQ2x/3x/4x, HQ2x/3x/4x, xBRZ (2x to 6x). See [http://forum.doom9.org/showthread.php?t=154674 discussion].&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://www.dropbox.com/s/2uvflijgrngvi7x/PointSize_0.2.zip?dl=1 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;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://sourceforge.net/projects/int64/files/ResampleHQ/ResampleHQ-v1.zip/download Plugin]&lt;br /&gt;
| Cory Nelson&lt;br /&gt;
|-&lt;br /&gt;
|[[Resize8]]&lt;br /&gt;
|&amp;lt;tt&amp;gt;Resize8()&amp;lt;/tt&amp;gt; works just like AviSynth's internal resizers but with some extra features. It had correct chroma placement, optional adaptive anti-ringing algorithm and few other features.  &lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[http://web.archive.org/web/20150911013350/http://www.nmm-hd.org/upload/get~8y1IjaaqvoI/Resize8_v1.2.avsi Script]&lt;br /&gt;
|mawen1250 &lt;br /&gt;
|-&lt;br /&gt;
|ResizeX&lt;br /&gt;
|ResizeX is a wrapper function for AviSynth's internal resizers and Dither_resize16 that corrects for the chroma shift caused by the internal resizers when they're used on horizontally subsampled chroma with MPEG2 placement.&lt;br /&gt;
|[[RGB24]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://www.mediafire.com/download/lcbtb7uta4ta5pc/ResizeX_v1.0.avsi Script]&lt;br /&gt;
|Desbreko&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;
|SincResize&lt;br /&gt;
|SincResize is an experimental plugin that uses DCT to perform resizing. See [http://forum.doom9.org/showthread.php?p=953002#post953002 discussion], read on for more information.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://cafxx.strayorange.com/files/SincResize4.7z Plugin]&lt;br /&gt;
|[http://cafxx.strayorange.com/ CAFxX]&lt;br /&gt;
|-&lt;br /&gt;
| [[SimpleResize]]&lt;br /&gt;
| Resizing plugin with 4 filters: SimpleResize, WarpResize, InterlacedResize and InterlacedWarpedResize.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [{{N2Archived}}/trbarry/SimpleResize.zip 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;
|[http://github.com/sunnyone/Waifu2xAvisynth waifu2x]&lt;br /&gt;
|Single-Image Super-Resolution for anime/fan-art using Deep Convolutional Neural Networks.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[http://github.com/sunnyone/Waifu2xAvisynth/releases Plugin]&lt;br /&gt;
|[http://github.com/sunnyone sunnyone]&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;
| mikeytown2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Sharpeners ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[aSharp]] &lt;br /&gt;
| Simple unsharp mask filter with optional adaptive sharpening. 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;
|[http://forum.doom9.org/showthread.php?t=122443 AVSShock]&lt;br /&gt;
|This Shock Filter sharpens edges of images by applying erosions or dilations depending on the sign of the Laplacian (or the so called Haralick-Canny edge detector). &lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[http://forum.gleitz.info/showthread.php?33105-Neues-Plugin-zum-Video-sch%E4rfen-Patent-Problem!&amp;amp;p=321585#post321585 Plugin]&lt;br /&gt;
|AMSS0815&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;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://github.com/pinterf/aWarpSharp/releases Plugin]&lt;br /&gt;
| {{Author/SEt}}&lt;br /&gt;
|-&lt;br /&gt;
| [[blah]]&lt;br /&gt;
| Sharpening. See [http://forum.doom9.org/showthread.php?t=155030 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1406843 Script]&lt;br /&gt;
| *.mp4 guy&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;
| [[LimitedSharpen]]&lt;br /&gt;
| LimitedSharpen can be used like a traditional sharpener, but producing much less artifacts. 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;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/LimitedSharpenFaster.avsi 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;
|[http://forum.doom9.org/showthread.php?t=173515 MCLS_16]&lt;br /&gt;
|Motion Compensate Limited Sharpen 16bit&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=173515 Script]&lt;br /&gt;
|Motenai Yoda&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=153201 MedSharp]&lt;br /&gt;
|Soft thresholded median sharpening function. See [http://forum.doom9.org/showthread.php?t=153201 discussion].&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=153201 Script]&lt;br /&gt;
|*.mp4 guy &lt;br /&gt;
|-&lt;br /&gt;
| [[MSharpen]]&lt;br /&gt;
| &amp;lt;tt&amp;gt;MSharpen&amp;lt;/tt&amp;gt; is a very simple masked sharpening plugin for AviSynth. This version is a reimplementation of neuron2's [http://rationalqm.us/msharpen/msharpen.html old &amp;lt;tt&amp;gt;MSharpen&amp;lt;/tt&amp;gt;] plugin. See [http://forum.doom9.org/showthread.php?t=169832 discussion].&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/index.php/MSharpen Plugin]&lt;br /&gt;
| {{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
| [[NonlinUSM]]&lt;br /&gt;
| Non-linear Unsharp Masking.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1555234&amp;amp;postcount=46 Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[pSharpen]]&lt;br /&gt;
| Performs two-point sharpening to avoid overshoot. See [http://forum.doom9.org/showthread.php?t=172422 discussion].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=172422#post1732663 Script]&lt;br /&gt;
| ilpippo80, colours&lt;br /&gt;
|-&lt;br /&gt;
|[[ReCon]]&lt;br /&gt;
|'''ReCon'''volution - makes things sharp by mixing pixels together. See [http://forum.doom9.org/showthread.php?t=153201 discussion].&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1409582#post1409582 Script]&lt;br /&gt;
|*.mp4 guy &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 over-sharpening or creating jaggies on strong detail, and produce a result that is temporally stable without detail shimmering.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://avisynth.nl/images/SeeSaw.avs Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| SharpenComplex2&lt;br /&gt;
| Port of MPC-HC's Sharpen Complex 2 to AviSynth. Despite the name, this script is very simple, see [http://forum.doom9.org/showthread.php?t=158385 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[SharpenComplex2_source|Script]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SSXSharpen&lt;br /&gt;
| Included in SharpTools. Sharpens the picture using [[supersampling]] techniques.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20100120201434/http://mf.creations.nl/avs/functions/SharpTools-v0.3.avs Script]&lt;br /&gt;
| {{Author/mf}}, {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SSSharp]]&lt;br /&gt;
| Also known as Super Slow Sharpen - a very slow, but high quality sharpener. See [http://forum.doom9.org/showthread.php?t=132330 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1071731 Script]&lt;br /&gt;
| *.mp4 guy&lt;br /&gt;
|-&lt;br /&gt;
| [[TUnsharp]]&lt;br /&gt;
| TUnsharp is a basic sharpening filter that uses a couple different variations of unsharp masking and allows for controlled sharpening based on edge magnitude and min/max neighborhood value clipping. See [http://forum.doom9.org/showthread.php?t=84344 discussion].&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20070222162107/http://bengal.missouri.edu/~kes25c/TUnsharpv093.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://web.archive.org/web/20160302123821/https://filetea.me/t1sl65PsDLsT0mXMZL0s14xEg/dl Plugin]&lt;br /&gt;
| list&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| [[WarpSharp]]&lt;br /&gt;
| WarpSharp contains these sharpeners: &amp;lt;tt&amp;gt;UnsharpMask, WarpSharp, Xsharpen&amp;lt;/tt&amp;gt;.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.dropbox.com/s/g6z1tohioqnw5b9/warpsharp_20080325.zip?dl=1 Plugin]&lt;br /&gt;
|???, {{Author/seraphy}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Rotation/Shear/Skew/Perspective ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[DeBarrel]]&lt;br /&gt;
| Remove barrel and pincushion distortion, where straight lines appear curved.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/DeBarrel/DeBarrel.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=152860 Defish]&lt;br /&gt;
|Barrel and pincushion distortion correction filter. [http://forum.doom9.org/showthread.php?t=127432 Old discussion]&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://horman.net/defish.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=171922 Defish Different Projections]&lt;br /&gt;
|Defish with different map projections, like Lambert Cylindrical Equal Area, Mercator and Miller projections.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=171922 Script]&lt;br /&gt;
|Kisa_AG&lt;br /&gt;
|-&lt;br /&gt;
| [[FTurn]]&lt;br /&gt;
| Fast implementation of [[TurnLeft]](), [[TurnRight]]() and [[Turn180]]() AviSynth functions. See [http://forum.doom9.org/showthread.php?t=168315 discussion.]&lt;br /&gt;
| [[Y8]], [[YV12]],[[YV24]]&lt;br /&gt;
| [http://github.com/tp7/fturn/releases Plugin]&lt;br /&gt;
| {{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=165978 Quad]&lt;br /&gt;
|An Avisynth plugin to perform quadrilateral transformations.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://horman.net/quad.zip Plugin] -- [http://forum.doom9.org/showpost.php?p=1602709&amp;amp;postcount=22 no SSE]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Reform/Reform.html Reform]&lt;br /&gt;
| Skewed images are corrected or vice versa, useful if video is recorded with slightly incorrectly located camera. Sometimes refered to as perspective correction.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Reform/Reform.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Reformer]]&lt;br /&gt;
| Perspective correction and warping.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Reformer/Reformer.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/rotate/rotate.html Rotate]&lt;br /&gt;
| Rotate or shear on any given angle. See [http://forum.doom9.org/showthread.php?t=131307 discussion.]&lt;br /&gt;
| [[RGB32]], [[YV12]]&lt;br /&gt;
| [http://avisynth.org.ru/rotate/rotate134.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Spinner/Spinner.html Spinner]&lt;br /&gt;
| Spinner plugin rotates a frame or selected part of it about the given axis coordinates in floating point precision.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Spinner/Spinner.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=166087 xyremap]&lt;br /&gt;
|xyremap is a filter for remapping pixels using formulae written in [http://en.wikipedia.org/wiki/Reverse_Polish_notation reverse Polish notation].&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://horman.net/avisynth/download/xyremap0.3.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&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://www.avisynth.nl/users/warpenterprises/files/zoom_5F25_dll_20050122.zip Plugin]&lt;br /&gt;
| {{Author/WarpEnterprises}}&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]. [http://github.com/pingplug/assrender Updated version]; only source code available. &lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YV24]], [[YV12]], [[Y8]]&lt;br /&gt;
| [http://srsfckn.biz/assrender/ C Plugin] &amp;lt;!--[http://encodan.srsfckn.biz/assrender/ C Plugin] - dead link ---&amp;gt;&lt;br /&gt;
| lachs0r, TheFluff&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/slavanap/ssifSource sub3d]&lt;br /&gt;
|Plugin for rendering subtitles on 3D video with correct depth.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[https://github.com/slavanap/ssifSource/tree/master/Sub3D Sources] [https://github.com/slavanap/ssifSource/releases Binaries][http://forum.doom9.org/showthread.php?t=173143 Discussion] &lt;br /&gt;
|slavanap&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20071025023938/http://mvideo.ddpp.net/eng/subtitleex_plugin.htm 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. [http://hosiken.jp/dev/win/subtitleex.html Plugin update (Japanese)]&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/subtitleex_5F25_dll_20040819.zip Plugin] / [http://avisynth.nl/users/warpenterprises/files/dvutilities_20050717.zip .chm (help)]&lt;br /&gt;
|[http://web.archive.org/web/20070821222318/http://mvideo.ddpp.net/eng/index.htm basilik]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=119390 SUPtext]&lt;br /&gt;
|Overlays SUP-subtitles on a video clip.&lt;br /&gt;
|[[RGB32]], [[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/attachment.php?attachmentid=7846&amp;amp;d=1196858433 Plugin]&lt;br /&gt;
|emmel&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.zachsaw.com/?pg=suptitle_pgs_avisynth_plugin SupTitle]&lt;br /&gt;
| Blu-ray PGS .SUP Subtitle Renderer Plugin for AviSynth. See [http://forum.doom9.org/showthread.php?t=148167 discussion] &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.zachsaw.com/?pg=suptitle_pgs_avisynth_plugin Plugin]&lt;br /&gt;
| {{Author/ZachSaw}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/vsfilter.htm 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;
|-&lt;br /&gt;
| [http://web.archive.org/web/20141227072702/https://code.google.com/p/vsfiltermod/ VSFilterMod]&lt;br /&gt;
| VSFilterMod is modification of original VSFilter subtitle renderer by Gabest. This mod brings up new features and some minor bugfixes. &lt;br /&gt;
|&lt;br /&gt;
| [http://web.archive.org/web/20141227072702/https://code.google.com/p/vsfiltermod/ Plugin]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=168282 xy-VSFilter]&lt;br /&gt;
|High performance VSFilter compatible subtitle filters. [http://web.archive.org/web/20151213235432/http://code.google.com/p/xy-vsfilter/ Google Code repository]&lt;br /&gt;
|&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=168282 Plugin]&lt;br /&gt;
|cyberbeing&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;
'''Note:''' 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;
| [[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;
| AVIInfo gives information about the streams in the clip without loading any frames. filename can be a WAV file or an AVI file with several audio streams (it won't open AVI files with embedded subtitles though). It will return the info as a string. &lt;br /&gt;
| &lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/avinfo_5F25_dll_20050417.zip Plugin]&lt;br /&gt;
| trevlac, wilbert &lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=170647 Avisynth Info Tool]&lt;br /&gt;
|This program gathers all available info about the installed Avisynth version. It should be useful for troubleshooting since especially novice users don't always know which Avisynth version they have installed, what DLLs/DLL-versions reside in their plugin directory, etc. The tool also helps resolve problems with plugin DLL dependencies like missing Microsoft runtime libraries.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Groucho2004&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 with virtually no overhead, displays clip info, CPU and memory usage and the minimum, maximum and average frames processed per second. It measures how fast Avisynth can serve frames to a client application (x264, for example) and comes in handy when testing filters/plugins to evaluate their performance and memory requirements.&lt;br /&gt;
|&lt;br /&gt;
| Command line executable&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=116949 ColorDiff]&lt;br /&gt;
|ColorDiff makes a greyscale (Y8) frame according to the input frame's pixels' &amp;quot;distance&amp;quot; from a specified color. The diff is calculated by simply getting the diff of the individual color components from the desired color's components and summing them up. Also, weights can be set for the individual diffs. Documentation is at the beginning of the source file. This is a [http://avisynth.nl/index.php/Plugins#LoadCPlugin C Plugin!]&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]] &lt;br /&gt;
|[http://forum.doom9.org/attachment.php?attachmentid=7811&amp;amp;d=1196110203 C Plugin]&lt;br /&gt;
|Ignus2&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. See [http://www.theneitherworld.com/mcpoodle/Tools/DumpPixelValues.html homepage.]&lt;br /&gt;
| [[RGB32]], [[YUY2]]&lt;br /&gt;
| [http://www.theneitherworld.com/mcpoodle/Tools/DumpPixelValues.zip Plugin]&lt;br /&gt;
| [http://www.theneitherworld.com/mcpoodle/Tools/index.html McPoodle]&lt;br /&gt;
|-&lt;br /&gt;
|[[GrainEvaluate]]&lt;br /&gt;
| A script to analyze and log the strength of grain for each frame. See [http://forum.doom9.org/showthread.php?t=167455 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
|[http://www.nmm-hd.org/upload/get~-eJfUjEXJY4/GrainEvaluate.avsi Script]&lt;br /&gt;
|{{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showpost.php?p=1462931&amp;amp;postcount=81 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;
| jmac698&lt;br /&gt;
|-&lt;br /&gt;
| [[Grid]]&lt;br /&gt;
| Overlays a grid, useful for pixel counting.&lt;br /&gt;
| Any&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Grid/Grid.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20160610124531/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://web.archive.org/web/20151223052318/https://code.google.com/p/avisynthrestoration/downloads/list Script]&lt;br /&gt;
| halifaxgeorge&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/lcferrum/segment-display-ocr SegmentDisplayOCR]&lt;br /&gt;
|SegmentDisplayOCR is a seven-segment display recognition filter for AviSynth. It has built in logging functionality (it will log frame recognition results) and also can be used in AviSynth conditional filters. The main purpose of this filter is to process readings of various digital instruments (e.g. digital multimeters) captured on video. So if your favourite instrument lacks interface for connecting it to PC you can capture it's readings on cam and convert them to computer readable format with SegmentDisplayOCR filter.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://sourceforge.net/projects/segmentdisplayocr/files/SegmentDisplayOCR/ Plugin]&lt;br /&gt;
|[http://github.com/lcferrum lcferrum]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=61128 SSIM]&lt;br /&gt;
|A filter that compute an objective video quality metric between two videos. Based on SSIM work from [http://web.archive.org/web/20060515090025/http://www.cns.nyu.edu/~zwang/files/research/ssim/index.html Zhou Wang]. It has been created with the help of Mfa.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20070129114000/http://perso.orange.fr/reservoir/dl/SSIM-0.24.rar Plugin] / [http://web.archive.org/web/20070129115059/http://perso.orange.fr/reservoir/dl/SSIMSrc-0.24.rar source]&lt;br /&gt;
|[http://web.archive.org/web/20060507012947/http://perso.wanadoo.fr/reservoir/ Lefungus]&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. See [http://forum.doom9.org/showthread.php?t=64192 discussion] and [http://web.archive.org/web/20091028073306/http://geocities.com/siwalters_uk/showpixelvalues.html homepage.]&lt;br /&gt;
| [[RGB32]], [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20091028122947/http://geocities.com/siwalters_uk/showpixelvalues1.4c.zip Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://web.archive.org/web/20151223052321/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://web.archive.org/web/20151223052318/https://code.google.com/p/avisynthrestoration/downloads/list Script]&lt;br /&gt;
| halifaxgeorge&lt;br /&gt;
|-&lt;br /&gt;
| [http://avisynth.org.ru/docs/english/externalfilters/tmonitor.htm TMonitor]&lt;br /&gt;
| TMonitor is a filter very similar to AVSMon. It enables monitoring of an Avisynth clip via previewing the video, viewing clip information (such as video width, height, colorspace, number of frames, audio samples, sample rate, number of audio channels, and more), and adjusting the audio delay. It also supports multiple instances per script, allowing viewing of differences between different parts of a processing chain.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20151125175557/http://bengal.missouri.edu/~kes25c/TMonitorv094.zip Plugin]&lt;br /&gt;
|{{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=53238 ViewFields/UnViewFields]&lt;br /&gt;
| [http://web.archive.org/web/20140709004333/http://www.geocities.com/siwalters_uk/unviewfields.html UnViewFields], [http://web.archive.org/web/20140708181324/http://www.geocities.com/siwalters_uk/viewfields.html ViewFields]&lt;br /&gt;
| &lt;br /&gt;
| Plugin&lt;br /&gt;
| {{Author/Simon Walters}}&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;
&lt;br /&gt;
=== Edge Detection ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[aWarpsharp2/aSobel|aSobel]]&lt;br /&gt;
| Sobel edge dectecion filter included in [[aWarpSharp2]]. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[aWarpSharp2| Plugin]]&lt;br /&gt;
| {{Author/SEt}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MaskTools2/Mt edge| mt_edge]]&lt;br /&gt;
| Edge detection filter included in [[MaskTools2]].&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[MaskTools2|Plugin]]&lt;br /&gt;
| {{Author/Manao}}&lt;br /&gt;
|-&lt;br /&gt;
| [[tcanny]]&lt;br /&gt;
| Contains a canny edge detection filter and distance transform filter.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140804144614/http://bengal.missouri.edu/~kes25c/tcanny.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TCannyMod]]&lt;br /&gt;
| Canny edge detection filter for Avisynth 2.6. Reimplementation of tcanny. See [http://forum.doom9.org/showthread.php?t=168449  discussion]&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/chikuzen/TCannyMod/releases/ Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TEdgeMask]]&lt;br /&gt;
| TEdgeMask creates an edge mask based off gradient vector magnitude.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20151125175557/http://bengal.missouri.edu/~kes25c/TEdgeMaskv09.zip Plugin]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TEMmod]]&lt;br /&gt;
| TEdgeMask modified for Avisynth 2.6. It creates an edge mask using gradient vector magnitude. See [http://forum.doom9.org/showthread.php?t=168390  discussion]&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/chikuzen/TEMmod/releases Plugin]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Export Filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can write directly to media files. &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?t=172837 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. [http://forum.doom9.org/showthread.php?t=172761 Update for AviSynth 2.6]. [http://forum.doom9.org/showthread.php?p=1750415#post1750415 Usage]. [http://forum.doom9.org/showthread.php?p=1073371#post1073371 Old mod by squid_80].&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.mediafire.com/download/84csi0174ettu5l/TWriteAVI_dll_v2.03-20160603.zip Plugin]&amp;lt;!--[http://www.mediafire.com/download/c5iboqi43ijprap/TWriteAVI_dll_v2.02-20160106.zip older version]--&amp;gt;&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1403600 Sashimi]&lt;br /&gt;
(function &amp;quot;RawWriter&amp;quot;)&lt;br /&gt;
| Sashimi writes (and reads) almost any regular raw uncompressed data format you can define.  You'll find a fuller description under [[#Source_Filters|Source Filters]].&lt;br /&gt;
| [[RGB]], [[YUY2]],[[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;
| [[SoundOut]]&lt;br /&gt;
| SoundOut is a GUI driven sound file output module for AviSynth (it exports audio to several compressors).&lt;br /&gt;
| All audio.&lt;br /&gt;
| [[SoundOut|Plugin]]&lt;br /&gt;
| {{Author/Sh0dan}}&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://www.avisynth.nl/users/warpenterprises/files/freeframe_5F25_dll_20050426.zip Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}&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;
|[http://forum.doom9.org/showthread.php?t=164407 AVSTP]&lt;br /&gt;
|A library for multithreaded plug-in development&lt;br /&gt;
|Any&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=164407 Plugin]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=163281 MP_Pipeline]&lt;br /&gt;
|Run parts of an AviSynth script in external processes.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=163281 Plugin]&lt;br /&gt;
|[http://github.com/SAPikachu/ SAPikachu]&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;
| [http://www.avisynth.nl/users/warpenterprises/files/mt_20070301.zip Plugin]&lt;br /&gt;
| tsp&lt;br /&gt;
|-&lt;br /&gt;
| [[MVTools]] &lt;br /&gt;
| MVTools provides filters for estimation and compensation of objects' 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;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[MVTools|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=164073 SoraThread]&lt;br /&gt;
|Sora's avs multi-process/multi-thread plugin package&lt;br /&gt;
|Any&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=164073 Plugin]&lt;br /&gt;
|leiming2006&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=154886 ThreadRequest]&lt;br /&gt;
|Yet another plugin for multithread processing. [http://web.archive.org/web/20130124045626/http://lantis.homeunix.org/avisynth.shtml Archive homepage (Japanese)]&lt;br /&gt;
|Any&lt;br /&gt;
|[http://www.mediafire.com/download/4xux7d7l1u3toy8/ThreadRequest+102a.rar Plugin]&lt;br /&gt;
|lantis&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Multipurpose Filters ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=166061 HybridFuPP]&lt;br /&gt;
| An adaptive processor, allowing picture cleaning and compressibility gain. Original [http://forum.doom9.org/showthread.php?t=146632 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.mediafire.com/download/6g09aazs4z7m11a/HybridFuPP_0.992b.zip Script]&lt;br /&gt;
| Fupp&lt;br /&gt;
|-&lt;br /&gt;
| [[MaskTools2]]&lt;br /&gt;
| This plugin provides tools for the creation, enhancement and manipulation of masks for each [[YUV]] component.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://avisynth.nl/index.php/MaskTools2#Download Plugin]&lt;br /&gt;
| {{Author/Manao}}, {{Author/tp7}}&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;
&lt;br /&gt;
=== Scene Change Detection ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=171624 DBSC]&lt;br /&gt;
|A scene change detection tool set/kit/box (work-in-progress).&lt;br /&gt;
|All&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=171624 Script]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=145143 EDLmaker]&lt;br /&gt;
| Simple scenechange detector that writes to EDL file.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=145143 Script]&lt;br /&gt;
| Mug Funky&lt;br /&gt;
|-&lt;br /&gt;
| [[MVTools2/MSCDetection|MSCDetection]]&lt;br /&gt;
| Part of MVTools2; MSCDetection creates a scene detection mask clip from motion vectors data. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[MVTools|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| SCDetect&lt;br /&gt;
| Detect scene change and output scene change frames to a file.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20140614152525/http://www.nmm-hd.org/upload/get~TfPm2QO4jbk/SCDetect_v0.3.rar Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://akuvian.org/src/avisynth/sclavc/readme.txt SceneChangeLavc]&lt;br /&gt;
| SClavc is an AviSynth plugin intended to allow access to libavcodec's scene-change metrics. See [http://akuvian.org/src/avisynth/sclavc/ homepage.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/scenechangelavc_5F25_dll_20041201.zip Plugin]&lt;br /&gt;
| {{Author/akupenguin}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SCXvid]]&lt;br /&gt;
| SCXvid produces first pass Xvid logs from AviSynth at the equivalent of the default VFW preset. These logs are primarily intended to get scene change information from but may have other uses.&lt;br /&gt;
|  [[YV12]]&lt;br /&gt;
| [http://dl.dropbox.com/s/402hlckyn669p9n/SCXvid-1.1.rar Plugin]&lt;br /&gt;
| {{Author/Myrsloik}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SCXvidMask]]&lt;br /&gt;
| A tiny AviSynth plugin that reads an SCXvid log and creates a binary mask based on it.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://github.com/tp7/SCXvidMask/releases Plugin]&lt;br /&gt;
| {{Author/tp7}}&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;
| [[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;
|[http://forum.doom9.org/showthread.php?t=162874 ArcFuns]&lt;br /&gt;
|This plugin expands the available numerical functions with missing inverse trig functions.&lt;br /&gt;
|N/A&lt;br /&gt;
|[http://forum.doom9.org/attachment.php?attachmentid=12494&amp;amp;d=1319627190 Plugin]&lt;br /&gt;
|{{Author/Gavino}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/tp7/AvsMotion#avsmotion AvsMotion]&lt;br /&gt;
|AviSynth plugin for animating clips with AAE motion tracking data.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://github.com/tp7/AvsMotion/releases Plugin]&lt;br /&gt;
|{{Author/tp7}}&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;
| N/A&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/call_5F25_dll_20030310.zip Plugin]&lt;br /&gt;
| Nic, DDogg&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=166063 CallCmd]&lt;br /&gt;
|Plugin to execute command on selectable frames or at startup or closedown. Based on [http://forum.doom9.org/showthread.php?t=46506 Call by Nic].&lt;br /&gt;
|N/A&lt;br /&gt;
|[http://www.mediafire.com/download/i6m7wffyi3dftxx/CallCmd_25_dll_v1.02_20130101.zip Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=173538 ClipBoard]&lt;br /&gt;
|Get text from Clipboard.&lt;br /&gt;
|N/A&lt;br /&gt;
|[http://www.mediafire.com/download/qct5uj786ub28to/ClipBoard_25_dll_v0.01_20160530.zip Plugin]&lt;br /&gt;
|StainlessS&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;
| GetSystemEnv&lt;br /&gt;
| An AviSynth plug-in to retrieve information from the system. &lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.avisynth.nl/users/stickboy/GetSystemEnv.zip Plugin]&lt;br /&gt;
| {{Author/stickboy}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GRunT]]&lt;br /&gt;
| Extends AviSynth'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), 'while' loops and 'for' 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;
|[http://forum.doom9.org/showthread.php?t=119200 LoadDLL]&lt;br /&gt;
| Used to manually load dll files in AviSynth. Useful if a filter relies on an external dll that is not in the system PATH.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.avisynth.nl/users/tsp/LoadDll.zip Plugin]&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=97748 PlaneMinMax]&lt;br /&gt;
| Frame-based YV12 plane Min/Max/Avg functions without [[ConditionalFilter]].&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/planeminmax_5F25_dll_20050727.zip Plugin]&lt;br /&gt;
| Bart Silverstein&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=83451 pop]&lt;br /&gt;
|A filter to get values from variables that may not yet be initialized.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://www.tsp.person.dk/pop.zip Plugin] &amp;lt;!--[http://web.archive.org/web/20160224093903/http://www.tsp.person.dk/pop.zip archived]--&amp;gt;&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=165479 Rt_Stats]&lt;br /&gt;
| Compile-time/Runtime Functions.&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS Plugin] [http://www.sendspace.com/folder/2mwrco mirror]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deepcolor Filters ===&lt;br /&gt;
(also check the [[High_bit-depth_Support_with_Avisynth#Processing_High_Bit-depth_Video_with_AviSynth|High Bit-Depth]] page and the [[:Category:Deep_color_tools|Deep Color Tools]] category)&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[Dither_tools|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 color banding 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/showpost.php?p=1386559&amp;amp;postcount=3 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]&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://chaosking.de/wp-content/uploads/avsfilters/Unclassified/Anaglyph___(0.85_-_2010-08-29).7z Plugin] / [http://web.archive.org/web/20140412062911/http://chaosking.de/wp-content/uploads/avsfilters/Unclassified/Anaglyph___(0.85_-_2010-08-29).7z mirror]&lt;br /&gt;
| {{Author/Kertai Gábor}}&lt;br /&gt;
|-&lt;br /&gt;
| Anaglypher &lt;br /&gt;
| A plugin for combining stereopairs into single anaglyph image.&lt;br /&gt;
| [[RGB32]], [[RGB24]]&lt;br /&gt;
| [http://shura.luberetsky.ru/anaglypher/Anaglypher.zip Plugin]&lt;br /&gt;
| [http://shura.luberetsky.ru/ Shura Luberetsky]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=162616 Displace / McM_2D_to_3D]&lt;br /&gt;
|Plugin and script that enables you to convert 2d to 3d stereo with bidirectional pulfrich effect + add depth to stationary objects.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=162616#post1539121 Plugin/Script]&lt;br /&gt;
|Mcmount&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=143855 fauxD]&lt;br /&gt;
|2D to stereo-3D conversion in real-time.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[http://forum.doom9.org/attachment.php?attachmentid=9278&amp;amp;d=1232092731 Plugin]&lt;br /&gt;
|eslave&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.pantarheon.org/AviSynth3DToolbox/ Pantarheon 3D AviSynth Toolbox]&lt;br /&gt;
| The Toolbox contains a number of basic functions which allow you to multiplex the left and right views found in two separate videos into one video, using several of the common methods currently in use.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.pantarheon.org/AviSynth3DToolbox/zip/ Script]&lt;br /&gt;
| [http://www.pantarheon.org/ G. Adam Stanislav]&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;
&lt;br /&gt;
== Audio Filters ==&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AddAudio]]&lt;br /&gt;
| A function that adds silent audio to a clip. Needed for CCE 2.50 users.&lt;br /&gt;
| N/A&lt;br /&gt;
| Script&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[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. [http://forum.doom9.org/showthread.php?t=59412 Doom9 discussion]. Ihor Bobalo added a few additional features to AudioGraph, only the source code is provided: [http://sourceforge.net/projects/audiograph/ SourceForge repository].&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]]&lt;br /&gt;
| [http://web.archive.org/web/20060517015407/http://beta.zenaria.com/kpo/avisynth/AudGraph_25.zip Plugin]&lt;br /&gt;
| Richard Ling, {{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=108470 AudioLimiter]&lt;br /&gt;
| To increase volume for silent sounds a lot, to increase volume for middle-volume sounds a little and to keep hi-volume sounds untoched.&lt;br /&gt;
| N/A&lt;br /&gt;
|[http://forum.doom9.org/attachment.php?attachmentid=6586&amp;amp;d=1167241138 Plugin]&lt;br /&gt;
|dimzon&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=171813 AudioTimeline]&lt;br /&gt;
|Displays a audio timeline track under the frame. It is especially suited for thumbsheets, where it allows to estimate the audio track of the thumbnailed clip.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=171813 Plugin]&lt;br /&gt;
|martin53&lt;br /&gt;
|-&lt;br /&gt;
| BeFa &lt;br /&gt;
| Band Eliminate Filter for Audio. See [http://web.archive.org/web/20071105084352/http://www.geocities.com/fredthompson6/Kiraru2002/Kiraru2002sROOM.htm#Befa English documentation] (translated from the original [http://web.archive.org/web/20081122113014/http://kiraru2002.at.infoseek.co.jp/#befa Japanese documentation]).&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/befa_5F25_dll_20030924.zip Plugin]&lt;br /&gt;
| {{Author/kiraru2002}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FindAudioSyncScript]]&lt;br /&gt;
| FindAudioSyncScript helps you to find the appropriate audio delays, if you have desync'ed audio.&lt;br /&gt;
| N/A&lt;br /&gt;
| Script&lt;br /&gt;
| IanB&lt;br /&gt;
|-&lt;br /&gt;
| 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 float[http://forum.doom9.org/showpost.php?p=1197592&amp;amp;postcount=19]. It's a conditional audio filter, so the computation is done framewise. See [http://forum.doom9.org/showthread.php?t=127530 discussion]&lt;br /&gt;
| N/A&lt;br /&gt;
| [http://www.wilbertdijkhof.com/MinMaxAudio_v02.zip Plugin]&lt;br /&gt;
| {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|Normalize2&lt;br /&gt;
|Audio normalizing plugin. The main difference between this plugin and the built-in normalizing plugin [[Normalize]]() is that this plugin can store the peak level value in an external file and uses a lookup table to do the actual normalizing (for speed).&lt;br /&gt;
|N/A&lt;br /&gt;
|[http://sourceforge.net/projects/jorydownloader/files/Normalize2%20for%20AviSynth/Normalize%20v0.1%20for%20AviSynth%202.5/ Plugin]&lt;br /&gt;
|[http://sourceforge.net/u/jcsston/profile/ jcsston]&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;
|[[Spectrogram]]&lt;br /&gt;
|Linear [http://en.wikipedia.org/wiki/Spectrogram spectrogram] for AviSynth 2.6.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://www.dropbox.com/s/9p2t1mv5t5yjpgd/Spectrogram_r5.7z?dl=1 Plugin]&lt;br /&gt;
|[http://github.com/innocenat innocenat]&lt;br /&gt;
|-&lt;br /&gt;
|SwitchByAudio&lt;br /&gt;
|Plugin to switch video source based on audio. See [http://forum.doom9.org/showthread.php?t=167011 discussion]&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]  &lt;br /&gt;
|[http://www.avisynth.nl/users/vcmohan/SwitchByAudio/SwitchByAudio.zip Plugin]&lt;br /&gt;
|{{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showpost.php?p=1722472&amp;amp;postcount=20 TimeStretchPlugin]&lt;br /&gt;
|[[TimeStretch]] with multichannel support and updated SoundTouch library. &lt;br /&gt;
|N/A&lt;br /&gt;
|[http://www.wilbertdijkhof.com/TimeStretch_v258.zip Plugin]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ViewAudio]]&lt;br /&gt;
| Includes two filters: ViewAudio and CacheAudio. &lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://nullinfo.s21.xrea.com/data/ViewAudio0301.zip Plugin] &amp;lt;!--[http://www.avisynth.nl/users/warpenterprises/files/viewaudio_5F25_dll_20031103.zip Plugin]--&amp;gt;&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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. See [http://forum.doom9.org/showthread.php?t=165703 discussion]&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]  &lt;br /&gt;
| [http://horman.net/avisynth/download/waveform0.3.zip Plugin]&amp;lt;!--[https://web.archive.org/web/20130413095328/http://horman.net/waveform0.2.zip archived]--&amp;gt;&lt;br /&gt;
| {{Author/David Horman}}&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. See [http://forum.doom9.org/showthread.php?p=397426 discussion.]&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/files/adjust_5F25_dll_20031110.zip Plugin]&lt;br /&gt;
| [http://avisynth.nl/users/warpenterprises/ WarpEnterprises]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=166588 Adaptive Lens Blur Repair]&lt;br /&gt;
|This function adaptively repairs video damaged by lens blur, using a frame-adaptive repair mask, a selection of sharpeners and multi-stage motion-compensated artifact removal.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=13154&amp;amp;stc=1&amp;amp;d=1354907363 Script]&lt;br /&gt;
| fvisagie&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showpost.php?p=1703332&amp;amp;postcount=172 amp]&lt;br /&gt;
|Inspired by [http://forum.doom9.org/showthread.php?t=168293 RgbAmplifier], it performs temporal smoothing, then (optionally) enhances the difference between the windowed average and the current frame.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://horman.net/avisynth/amp.zip Plugin]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/Xenoveritas/AviSynth-Stuff/tree/master/AutoTrace AutoTraceFilter]&lt;br /&gt;
|An intentionally useless plugin that uses [http://autotrace.sourceforge.net/ AutoTrace] to trace and then resize a source video, rendering the result using GDI+.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
| [http://github.com/Xenoveritas/AviSynth-Stuff/tree/master/AutoTrace Plugin]&lt;br /&gt;
| [http://github.com/Xenoveritas Xenoveritas]&lt;br /&gt;
|-&lt;br /&gt;
|[http://nutbread.github.io/ave/ ave]&lt;br /&gt;
| A set of experimental audio/video filters.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://nutbread.github.io/ave/ Plugin]&lt;br /&gt;
| [http://github.com/nutbread nutbread]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=172698 AviSynth Shader]&lt;br /&gt;
|This plugin allows running HLSL pixel shaders within AviSynth. This gives access to various HLSL filters that haven't been programmed in AviSynth.&lt;br /&gt;
|[[RGB32]], [[YV24]], [[YV12]]&lt;br /&gt;
|[http://github.com/mysteryx93/AviSynthShader Plugin]&lt;br /&gt;
|[http://github.com/mysteryx93 MysteryX]&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=675275#post675275 BeforeAfter]&lt;br /&gt;
| See the difference before and after; similar discussion [http://forum.doom9.org/showthread.php?t=98876 here]. (missing [http://www.animemusicvideos.org/forum/viewtopic.php?f=11&amp;amp;t=45223 BeforeAfterDiff] and BeforeAfterLine scripts.)&lt;br /&gt;
| any&lt;br /&gt;
| Script&lt;br /&gt;
| Corran&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=158696 ccc]&lt;br /&gt;
|A plugin specifically designed for Cross-Conversion Correction.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20150403181720/http://japland.org/ccc/ccc_v0.4a_avs.zip Plugin]&lt;br /&gt;
|Daemon404&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/tp7/CLExpr CLExpr]&lt;br /&gt;
|AviSynth Expr filter implemented in OpenCL for runtime calculation of expressions on 8 and 16-bit depths clips. Makes mt_lutxy and mt_lutxyz possible on 16-bit. More information [http://forum.doom9.org/showpost.php?p=1672638 here].&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://github.com/tp7/CLExpr/releases Plugin]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/ColorIt/ColorIt.html Colorit]&lt;br /&gt;
| Color a black and white image or recolor a color image. See [http://forum.doom9.org/showthread.php?t=93990 discussion.]&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/ColorIt/Colorit.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&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;
| mikeytown2&lt;br /&gt;
|-&lt;br /&gt;
| DCT&lt;br /&gt;
| Plugin with the following functions: IDCT, IDCT2, FDCT, FDCT2. See [http://forum.doom9.org/showthread.php?p=667382#post667382 discussion]&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [http://alainmuchembled.free.fr/DCT.zip Plugin]&lt;br /&gt;
| lcld&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. See [http://forum.doom9.org/showthread.php?t=156888 discussion.]&lt;br /&gt;
|&lt;br /&gt;
| [http://www.mediafire.com/download/bfhj5crwaxbupeh/DDigitTest_25%2626_v1-06_dll_20150330-RECOMPILE.zip Plugin]&lt;br /&gt;
| {{Author/StainlessS}}&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://www.avisynth.nl/users/warpenterprises/files/deblot_5F25_dll_20030628.zip Plugin]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=95193 DeJump]&lt;br /&gt;
| This is a specific filter which might be used to stabilize some &amp;quot;jumpy&amp;quot; video sources captured from VHS. &lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
| [http://forum.doom9.org/attachment.php?attachmentid=3988&amp;amp;d=1117479069 Plugin]&lt;br /&gt;
| dinstun&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;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://avisynth.org.ru/exinpaint/exinpaint0200.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FFAvisynth]]&lt;br /&gt;
| A plugin which lets you directly use [http://en.wikipedia.org/wiki/Ffdshow ffdshow] video and audio filters from AviSynth scripts.  &lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [http://sourceforge.net/projects/ffdshow-tryout/ Plugin]&lt;br /&gt;
| Milan Cutka &lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/Youka/FLuaG FLuaG]&lt;br /&gt;
| FLuaG (Floating Lua Graphics) is an AviSynth plugin for video/audio data editing via Lua scripting. See [http://forum.doom9.org/showthread.php?t=161852 discussion] &lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [http://github.com/Youka/FLuaG/archive/master.zip Plugin]&lt;br /&gt;
| [http://github.com/Youka Youka]&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;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1600151#post1600151 FSubstitute]&lt;br /&gt;
|Tries to automate the task of replacing bad frames using adjacent or close-by frames.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1600151#post1600151 Script]&lt;br /&gt;
|martin53&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=130611 GrainOptimizer]&lt;br /&gt;
|The only temporal-only grain reducer! See discussion for more information. Related topics: [http://forum.doom9.org/showthread.php?t=137117 x264: Film Grain Optimization], [http://web.archive.org/web/20090916181521/http://x264dev.blogspot.com/2008/05/film-grain-optimization.html]&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://web.archive.org/web/20081228144846/http://mirror05.x264.nl/Dark/force.php?file=./GrainOptimizer_2.02.zip Plugin]&lt;br /&gt;
|Dark Shikari&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/Khanattila/KPassFilterCL KPassFilterCL]&lt;br /&gt;
|KPassFilterCL is a set of tools in the frequency domain.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://github.com/Khanattila/KPassFilterCL/releases Plugin]&lt;br /&gt;
|[http://github.com/Khanattila Khanattila ]&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/Youka/LVS LVS]&lt;br /&gt;
| LVS (Lua Video Sync) is a video frameserver plugin to edit video frames with the capability of scripting language Lua + 2D image processing functionality. See [http://forum.doom9.org/showthread.php?t=167716 discussion] &lt;br /&gt;
| [[RGB32]], [[RGB24]]&lt;br /&gt;
| [http://sourceforge.net/projects/lua-video-sync/files/ Plugin]&lt;br /&gt;
| [http://github.com/Youka Youka]&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/NeuralNet/NeuralNet.html NeuralNet]&lt;br /&gt;
| Neural networks through back propagation learn and filter some types of noise. Classification and linear type networks are included.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/NeuralNet/NeuralNet.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| PseudoColor &lt;br /&gt;
| This filter first converts clip to b/w, then colors it to pseudorandom colors according to brightness. See [http://forum.doom9.org/showthread.php?t=61570 discussion.]&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/warpenterprises/files/pseudocolor_5F25_dll_20030919.zip Plugin]&lt;br /&gt;
| Shubin&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/jeremypoulter/QRCodeSource QRCodeSource]&lt;br /&gt;
|AviSynth plugin to provide a means to embed QR codes in video.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://github.com/jeremypoulter/QRCodeSource/releases Plugin]&lt;br /&gt;
|[http://github.com/jeremypoulter jeremypoulter]&lt;br /&gt;
|-&lt;br /&gt;
|RemoveDeadPixels&lt;br /&gt;
|See [http://forum.doom9.org/showthread.php?p=699915#post699915 here] and [http://videoprocessing.fr.yuku.com/topic/27/Removedeadpixels here].&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[http://home.arcor.de/kassandro/RemoveDeadPixels.rar Plugin]&lt;br /&gt;
|{{Author/kassandro}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=172601 rgba_rpn]&lt;br /&gt;
|A filter for manipulating the pixels of [[RGB]] (and also [[YUV]]) clips using [http://en.wikipedia.org/wiki/Reverse_Polish_notation reverse Polish notation.] &lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[http://horman.net/avisynth/downloads/rgba_rpn0.1.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SegmentedAmp]] &lt;br /&gt;
| Image is segmented with watershed algorithm for smoothing and/or sharpening.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [http://avisynth.nl/index.php/SegmentedAmp Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=172377 SmoothSkip]&lt;br /&gt;
|In tribute to tritical's awesome filter, this one tackles the inverse problem of [[TIVTC/TDecimate|TDecimate]]; allowing for addressing frames that have non-smooth, skippy motion. For source code see [http://github.com/jojje/SmoothSkip GitHub repository]. &lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[http://github.com/jojje/SmoothSkip/releases/download/v1.0.2/SmoothSkip-1.0.2.zip Plugin]&lt;br /&gt;
|[http://github.com/jojje jojje]&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. See [http://forum.doom9.org/showthread.php?t=99679 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?t=99679 Script]&lt;br /&gt;
| {{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://sourceforge.net/projects/avisynthtrackin/ Tracking]&lt;br /&gt;
| Use computer vision to track objects in the video, and produce ConditionalReader input. Demo at [http://www.youtube.com/watch?v=SQ-JtJs7US0 Youtube]. &lt;br /&gt;
| [[RGB24]]&lt;br /&gt;
| [http://sourceforge.net/projects/avisynthtrackin/files/1.1/AvisynthTrackin.1.1.binary.zip/download Plugin]&lt;br /&gt;
| [http://avisynthtrackin.sourceforge.net/ Shlomo Matichin]&lt;br /&gt;
|-&lt;br /&gt;
| UnSmooth&lt;br /&gt;
| What does it do. It amplifies noise, small detail, and artifacts. Doesn't sound very attractive, but there can still be some detail left in over smoothed encodes. See [http://forum.doom9.org/showthread.php?t=63361 discussion.]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://web.archive.org/web/20090821183550/http://mf.creations.nl/avs/functions/UnSmooth-v0.1.avs Script]&lt;br /&gt;
| {{Author/mf}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=163870 Watermark]&lt;br /&gt;
|Creates a transparent deformation in the video akin to a watermark. The watermark is defined by a black and white image which may be a dynamic image. The intensity of the effect is controlled by several parameters.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1554560#post1554560 Plugin]&lt;br /&gt;
|[http://sourceforge.net/u/phillvanleersum/profile/ DrPhill]&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/WaterShed/Watershed.html WaterShed] &lt;br /&gt;
| Assuming image grey values to be elevations, it is segmented into basins and watershed lines. Useful in certain medical image analysis and recoloring work.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| AviSynth 2.5.8: [http://www.avisynth.nl/users/vcmohan/WaterShed/Watershed.zip Plugin]&lt;br /&gt;
AviSynth 2.6.0: [http://www.avisynth.nl/users/vcmohan/WaterShed/Watershed_2_6.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://github.com/Xenoveritas/AviSynth-Stuff/tree/master/xvplugins xvplugins]&lt;br /&gt;
|This is simply a bunch of AviSynth stuff that isn't (really) possible using plain AviSynth and instead required a plugin.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
| [http://github.com/Xenoveritas/AviSynth-Stuff/tree/master/xvplugins Plugin]&lt;br /&gt;
| [http://github.com/Xenoveritas Xenoveritas]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Usage]]&lt;br /&gt;
[[Category:External_filters]]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/High_bit-depth_Support_with_Avisynth</id>
		<title>High bit-depth Support with Avisynth</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/High_bit-depth_Support_with_Avisynth"/>
				<updated>2013-11-15T16:32:32Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently, Avisynth only supports 8-bit video.  Nevertheless, through various utilities, plugins, and scripts, Avisynth can be used to import, process, and export high bit-depth video.  There has been some effort to update Avisynth itself to support high bit-depth, but there has been no progress as of 2012 (http://forum.doom9.org/showthread.php?t=162436).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What is deepcolor?'''&lt;br /&gt;
&lt;br /&gt;
Deepcolor refers to using more than 8 bits of data to represent each color channel.  It is also referred to as high bit-depth color.  Basically, deepcolor/high bit-depth allows finer graduations of color, allowing smoother gradients and more detail.  Please refer to this short, easy to understand article:  http://www.pcworld.com/article/171223/what_is_10bit_color.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Why Use Deepcolor?'''&lt;br /&gt;
&lt;br /&gt;
-Higher internal precision, using high-bit depth color, when processing an image in a filter, gives a higher quality (8-bit) output&lt;br /&gt;
&lt;br /&gt;
-If a video filter uses linear gamma internally, there can be noticeable differences in the image.  A linear gamma representation is best supported with a high bit-depth. See the illustration for ResampleHQ, http://int64.org/projects/resamplehq/&lt;br /&gt;
&lt;br /&gt;
-If you encode high-bit depth video, you can get better compression (reportedly up to 30%) and less banding.  &lt;br /&gt;
Banding is one of the most serious liabilities of 8-bit depth.  Refer to the following references for an explanation of why 10-bit encodes compress better:&lt;br /&gt;
&lt;br /&gt;
http://x264.nl/x264/10bit_02-ateme-why_does_10bit_save_bandwidth.pdf &lt;br /&gt;
&lt;br /&gt;
http://x264.nl/x264/10bit_01-ateme_pierre_larbier_422_10-bit.pdf &lt;br /&gt;
&lt;br /&gt;
http://x264.nl/x264/10bit_03-422_10_bit_pristine_video_quality.pdf&lt;br /&gt;
&lt;br /&gt;
-Professional video is stored in 10bit formats (like ProRes 422) and people want to use Avisynth for processing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Importing High Bit-depth Video into Avisynth'''&lt;br /&gt;
&lt;br /&gt;
Patched ffms2/ffms2-ffmbc - http://forum.doom9.org/showthread.php?p=1580141#post1580141 (See SAPikachu's signature for downloading) Can import DNxHD, ProRes, or other 10 bit videos in their native chroma format (4:2:2 and 4:4:4 are also supported), outputting in the Avisynth high bit-depth convention.  Uses Avisynth 2.6's new colorspace.  You can process with the full quality of the format. &lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
# There may be a long delay on opening, as FFMS2 performs an automatic indexing operation. &lt;br /&gt;
# At the time of writing (1-8-2012), the official libav library has a bug with decoding of DNxHD video, so you should use the ffmbc build to decode that. Other than that, both builds should be OK, but ffmbc may have better support for professional video formats (ProRes etc.), and libav is better for H264 and other common formats.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following methods are obsoleted now, except as a verification or workaround:&lt;br /&gt;
&lt;br /&gt;
Readv210mod - http://forum.doom9.org/showthread.php?p=1526131#post1526131 Can read uncompressed v210 in .mov container as color.  Needs a manual setting skip the file header.  &lt;br /&gt;
&lt;br /&gt;
Sashimi - http://sites.google.com/site/ourenthusiasmsasham/soft - Sashimi 0.85 has different bit-depth support.  Please see OtherFormats/Read_v210.avs included in the package.&lt;br /&gt;
&lt;br /&gt;
ReadV210 - http://forum.doom9.org/archive/index.php/t-158985.html Can read uncompressed v210 in .mov container as greyscale.  &lt;br /&gt;
&lt;br /&gt;
Alternative builds and methods of importing:&lt;br /&gt;
&lt;br /&gt;
ffms2mod - http://forum.doom9.org/showthread.php?p=1528494 Can return most 10bit video in the Avisynth high bit-depth convention.&lt;br /&gt;
&lt;br /&gt;
rawsource with ffmpeg - http://forum.doom9.org/showthread.php?t=162598&amp;amp;page=2 - shows an example of using ffmpeg to convert to a 16bit format which can be read by rawsource in Avisynth 2.6.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Processing High Bit-depth Video with Avisynth'''&lt;br /&gt;
&lt;br /&gt;
Some plugins support processing internally in a higher bit-depth for better quality and return an 8-bit video.  Others support full high-bit processing and can retun a special format 16 bit video.&lt;br /&gt;
&lt;br /&gt;
Most developers have adopted a vertically stacked format, where the high bits are stored in the upper half of a video, and the lower bits in the lower half of the video.  This special format must be processed only with high-bit aware scripts and plugins.&lt;br /&gt;
&lt;br /&gt;
RedAverage - http://forum.doom9.org/showthread.php?t=163018 - 16bit capable average with masking.&lt;br /&gt;
&lt;br /&gt;
Dither - http://forum.doom9.org/showthread.php?p=1386559 - A set of scripts, original and modified plugins to process 16-bit clips in the native 8-bit Avisynth environment. &lt;br /&gt;
&lt;br /&gt;
ResampleHQ - http://svn.int64.org/viewvc/int64/resamplehq/doc/index.html - Provides gamma-aware resizing and colorspace conversion.  Uses 32-bit linear color internally.&lt;br /&gt;
&lt;br /&gt;
Tweak3 - ? - same as Tweak but with dithering.&lt;br /&gt;
&lt;br /&gt;
Smoothlevels - http://forum.doom9.org/showthread.php?t=137479 - Advanced levels adjustment function, with limiting &amp;amp; smoothing parameters. &lt;br /&gt;
&lt;br /&gt;
Deep Color Tools - http://forum.doom9.org/showthread.php?p=1467907#post1467907 - This Script provides basic functions to import 10bit video, do color adjustments, and export to 8bit &lt;br /&gt;
&lt;br /&gt;
flash3kyuu_deband - another deband filter for avisynth - https://github.com/SAPikachu/flash3kyuu_deband#readme http://forum.doom9.org/showthread.php?t=161411  Dither 10bit to 8bit: &lt;br /&gt;
 ReadV210(...)&lt;br /&gt;
 f3kdb(precision_mode=3,input_mode=1,input_depth=16)&lt;br /&gt;
&lt;br /&gt;
8/16 bit denoise - deepcolor denoise - http://forum.doom9.org/showthread.php?t=162342&lt;br /&gt;
&lt;br /&gt;
You can also check http://avisynth.org/mediawiki/External_filters#Deepcolor_Filters for possibly more listings.&lt;br /&gt;
&lt;br /&gt;
8bit Video to 16bit Scene Referred Linear guide http://blendervse.wordpress.com/2011/09/16/8bit-video-to-16bit-scene-referred-linear-exrs/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Codecs which support high bit-depth'''&lt;br /&gt;
&lt;br /&gt;
-H.264, High 10 Profile (Hi10P) and above  https://en.wikipedia.org/wiki/H.264&lt;br /&gt;
&lt;br /&gt;
-ProRes 422  https://en.wikipedia.org/wiki/ProRes&lt;br /&gt;
&lt;br /&gt;
-DNxHD  https://en.wikipedia.org/wiki/DNxHD also supported by ffmbc  https://code.google.com/p/ffmbc/&lt;br /&gt;
&lt;br /&gt;
-Apple Animation  https://en.wikipedia.org/wiki/Animation_codec&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Digital_cinematography#Digital_acquisition_codecs_compared&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Exporting High Bit-depth Video'''&lt;br /&gt;
&lt;br /&gt;
You can encode out of AVIsynth to 10bit x264 via &lt;br /&gt;
&lt;br /&gt;
AVS4x264 https://astrataro.wordpress.com/2012/06/04/avs4x264mod-v0-8-0-supports-d2v-dgi-dga-avi-mkv-mp4-m2ts-wmv-input-and-auto-fps-correction/  This command-line tool will directly convert from a high bit-depth convention Avisynth script to H.264 with x264, including the 10bit profile.  Please check the blog for updated versions.&lt;br /&gt;
&lt;br /&gt;
x264+tmod https://astrataro.wordpress.com/2012/07/21/x264-rev2208677-tmod/  tmod is a modification to the x264 encoder to enable various enhancements, especially for the use of high-bit depth input.  Supports the Avisynth high bit-depth convention, quality enhancements, bit-depth conversion, filters such as denoising and deinterlacing&lt;br /&gt;
&lt;br /&gt;
10bit x264 command-line example:&lt;br /&gt;
&lt;br /&gt;
 avs2yuv -raw &amp;quot;script.avs&amp;quot; -o - | x264-10bit --demuxer raw --input-depth 10 --input-res 1280x720 --fps 24 --output &amp;quot;out.mp4&amp;quot; -&lt;br /&gt;
&lt;br /&gt;
AVS2yuv (http://akuvian.org/src/avisynth/avs2yuv/) &lt;br /&gt;
&lt;br /&gt;
AVS2pipemod (https://github.com/chikuzen/avs2pipemod#readme).  The Dither html doc with the plugin gives examples of using AVS2yuv including lossless 10bit.&lt;br /&gt;
&lt;br /&gt;
AVS2x264mod http://forum.doom9.org/showthread.php?p=1529305#post1529305  Example:&lt;br /&gt;
&lt;br /&gt;
 avs4x264mod.exe --x264-binary “C:\x264_64-abc.exe” -o out.264 in.avs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Playback of High Bit-depth Videos'''&lt;br /&gt;
&lt;br /&gt;
-Most of the time you will only get to see dithered 8-bit video, as equipment to truly display high bit-depths is rare at the consumer level in 2011.  Digital theatres project up to 12-bit video. Guide:  http://coalgirls.wakku.to/?page_id=4635&lt;br /&gt;
&lt;br /&gt;
-The Bluray standard does not support xvColor (using full-range 8 bit video) or high bit-depth video.&lt;br /&gt;
&lt;br /&gt;
Playback Software&lt;br /&gt;
&lt;br /&gt;
MPlayer with high-bit codecs installed, such as http://samples.mplayerhq.hu/drivers32/new/AppleProResDecoder.qtx ProRES 422&lt;br /&gt;
&lt;br /&gt;
MadVR http://forum.doom9.org/showthread.php?t=146228&lt;br /&gt;
&lt;br /&gt;
VLC http://www.videolan.org&lt;br /&gt;
&lt;br /&gt;
Other sofware and information&lt;br /&gt;
&lt;br /&gt;
Further information on high-bit playback http://forum.doom9.org/showthread.php?t=161548&lt;br /&gt;
&lt;br /&gt;
FFdshow builds with 10-bit support http://forum.doom9.org/showthread.php?t=161915&lt;br /&gt;
&lt;br /&gt;
An excellent guide on 10-bit playback:  http://haruhichan.com/wpblog/?p=205&lt;br /&gt;
&lt;br /&gt;
'''Sample High Bit-Depth Videos'''&lt;br /&gt;
&lt;br /&gt;
See this thread for links to examples.  There are also deepcolor versions of standard test clips (used in image processing research).  http://forum.doom9.org/showthread.php?t=158836&amp;amp;highlight=v210&lt;br /&gt;
&lt;br /&gt;
[[Category:Advanced topics]]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Srestore</id>
		<title>Srestore</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Srestore"/>
				<updated>2013-11-04T19:56:38Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat|External_filters|Restoration_filters|Deblenders}}&lt;br /&gt;
{{Filter|MOmonster|2.7e, 2.7f|[[Media:srestore.avsi|srestore.avsi]] [[Media:srestore_27f.avsi|srestore_27f.avsi]]|Deblenders|&lt;br /&gt;
* YV12&lt;br /&gt;
|}}&lt;br /&gt;
{{Template:FuncDef|        srestore(clip source, float ''frate'', int ''dmode'', ''omode'', float ''blocks'', int ''mthresh'', int ''bthresh'', bool ''chroma'', int ''cache'', float ''rr'', clip ''dclip'') }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
[[Srestore]] is the replacement function for [[mrestore]], Cdeblend, FixBlendIVTC and DupHq from the [[R_pack]]. It is an AviSynth script function that uses conditional frame evaluation for the output calculation. Generally it was written to undo norm-conversions with blends, but the last version can be useful for decimation ratios between 5 and 1 using the ''frate'' parameter.&lt;br /&gt;
&lt;br /&gt;
Important note: Srestore 2.7e can only be called one time in any script due to its use of global variables.&lt;br /&gt;
Srestore 2.7f (currently only available via forum) can be called as many times as you like. This is hopefully the only functional difference.&lt;br /&gt;
&lt;br /&gt;
== Requires Filters ==&lt;br /&gt;
*[[MaskTools2]]&lt;br /&gt;
*[[TIVTC]] Version 1.04 or higher (only for cache&amp;gt;0, not default)&lt;br /&gt;
*[[RemoveGrain]]   (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?p=1129919#post1129919 Average]       (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=139337 GRunT] Version 1.0.1 or higher (only for v2.7f)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{{Par|frate|float|optional}}&lt;br /&gt;
You don't need to set the decimation parameters for the norm conversions restoring Pal_to_NTSC (50-&amp;gt;23.976 or 25-&amp;gt;11.988) and NTSC_to_Pal (59.94-&amp;gt;25 or 29.97-&amp;gt;12.5), but for some seldom other blend conversion (for example 29.97 back to 23.976 or 50 to 25 - DEFT). Use frate to set the wanted output-framerate. If source-framerate/frate &amp;gt;5 or &amp;lt;1 the output-framerate will be the same as the input-framerate. This can be useful if you want to have only the dup functionality of srestore.&lt;br /&gt;
&lt;br /&gt;
{{ParR|omode|string|6|0-6 or mode}}&lt;br /&gt;
Srestore can be used as blend-decimation-function, as simple deblend-function and for double-blend-removal&lt;br /&gt;
: 1   - deblend-mode 1        -&amp;gt; detected blends will be replaced with the previous frame&lt;br /&gt;
: 2   - deblend-mode 2        -&amp;gt; next frame is used instead of the detected blend&lt;br /&gt;
: 3   - deblend-mode 3        -&amp;gt; detected blends will be replaced with the neighbour that has the smaller difference&lt;br /&gt;
: 4   - deblend-mode 4        -&amp;gt; use the neighbour with the smaller blend-possibility&lt;br /&gt;
: 5   - deblend-special       -&amp;gt; outputs the one of four frames with the smallest blend-possibility&lt;br /&gt;
: &amp;gt;5  - blend-decimation      -&amp;gt; for all decimation operations&lt;br /&gt;
&lt;br /&gt;
The output-modes 1-5 are simple deblending modes, so the framerate will not change.&lt;br /&gt;
            &lt;br /&gt;
To enable the double-blend-removal you have to set a string for omode. This string decides about the postprocessing mode that is used on the restored frames:&lt;br /&gt;
: pp0 -&amp;gt;  the fastest mode, no postprocessing&lt;br /&gt;
: pp1 -&amp;gt;  use difference masking, higher quality and still good speed&lt;br /&gt;
: pp2 -&amp;gt;  use a special blurring mask on luma and chroma that reduces artefacts&lt;br /&gt;
: pp3 -&amp;gt;  combines postprocessing 1 and 2   -&amp;gt; slowest&lt;br /&gt;
&lt;br /&gt;
You can add also your own postprocessing to these modes. Just add your function like this:&lt;br /&gt;
&lt;br /&gt;
 omode=&amp;quot;pp3.blur(1)&amp;quot;		   -&amp;gt; pp3 + blurring&lt;br /&gt;
If you want to add a function with its own inputstrings use three quotation marks:&lt;br /&gt;
 omode=&amp;quot;&amp;quot;&amp;quot;pp2.deen(&amp;quot;a2d&amp;quot;)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important Note: Also the double-blend-removal does no decimation. It's created only for double-blends caused by blend deinterlacing of telecined sources. You have to add an decimation function for full restoring:&lt;br /&gt;
&lt;br /&gt;
 source                          #progressive&lt;br /&gt;
 srestore(dmode=-4,omode=&amp;quot;pp0&amp;quot;)&lt;br /&gt;
 decimate(cycle=5,quality=0)     #recommed decimating&lt;br /&gt;
&lt;br /&gt;
{{ParR|speed|int|9|-25-25}}&lt;br /&gt;
With the speed parameter you can set a speed-vs-detail-detection value. If you set speed=25, only one of 25 pixels (5*5) is used for the detection. Higher values result in a lower possibility of low-detail detection. Set a negative speed value for high quality and hd sources. This can improve the detection of small details.&lt;br /&gt;
&lt;br /&gt;
{{ParR|mode|int|2|1-3}}&lt;br /&gt;
With the mode parameter you can decide if chroma should be used for detection and if srestore have to merge neighboured frames or look for dups to improve output quality:&lt;br /&gt;
: 1   - simple output mode, decimation is not touched&lt;br /&gt;
: 2   - duping feature, if a frame has a dup-neighbour, that seems to have a higher quality, this one will be outputed&lt;br /&gt;
: 3   - like 2 but the duplicates will be merged&lt;br /&gt;
: &amp;gt;3  - mode 2 and 3 combined&lt;br /&gt;
By setting the compatible negative values, the chroma values will be also used for the detection.&lt;br /&gt;
Note: The double-blend-removal does not use this parameter (-&amp;gt; only mode 1 or -1).&lt;br /&gt;
&lt;br /&gt;
{{ParR|thresh|int|22|12-44}}&lt;br /&gt;
The detection of srestore is pretty stable, but the threshold is still important to weight the detection influence. Use small values for sources with little temporal artefacts (bobbing effect, aliasing, blocks, noise, ...) and higher values for the opposite case.&lt;br /&gt;
&lt;br /&gt;
{{ParR|cache|int|-1|-1-10}}&lt;br /&gt;
With cache&amp;gt;=0 srestore use the RequestLinear function (TIVTC) to be more compatible with non-linear requesting (codec or other functions). Best way to use srestore is to do a lossless first pass right after calling srestore and do all other filtering and the final encoding in a second pass. If you do not have enough space to do a lossless pass and you cannot avoid non-linear frame requesting and the pattern of the source is pretty unstable set cache around 5-10, but keep in mind that this can increase memory usage.&lt;br /&gt;
    			&lt;br /&gt;
{{Par|dclip|clip|input}}&lt;br /&gt;
The '''d'''etection '''clip''' can be used to improve (deblock, smooth, ...) and speed-up blend and motion detection. The selected clip is only used for detection and not for output, so it does not affect the output quality. &lt;br /&gt;
If you use a high quality deinterlacing on the source you can speed up the detection by using a faster deinterlacing function (third code example) for the detection clip.&lt;br /&gt;
It's recommended to crop the bobbed source (deinterlace BEFORE cropping!) to avoid the detection influence of the bobbing borders (second code example).&lt;br /&gt;
&lt;br /&gt;
== Examples== &lt;br /&gt;
&lt;br /&gt;
bobbed (or progressive) source&lt;br /&gt;
 srestore()&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 ord = last.getparity() ? 1 : 0&lt;br /&gt;
 leakkernelbob(ord,4,true,true)&lt;br /&gt;
 srestore(dclip=last.crop(8,16,-8,-24))&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 d = last.bob(-0.2,0.6).reduceflicker(strength=1)&lt;br /&gt;
 tdeint(mode=1)   #or for example yadif(mode=1)&lt;br /&gt;
 srestore(mode=4,dclip=d)&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=95924 Discussion thread] at [http://forum.doom9.org/ Doom9's Forum]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Srestore</id>
		<title>Srestore</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Srestore"/>
				<updated>2013-11-04T19:55:07Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat|External_filters|Restoration_filters|Deblenders}}&lt;br /&gt;
{{Filter|MOmonster|2.7e, 2.7f|[[Media:srestore.avsi|srestore.avsi]] [[Media:srestore_27f.avsi|srestore_27f.avsi]]|Deblenders|&lt;br /&gt;
* YV12&lt;br /&gt;
|}}&lt;br /&gt;
{{Template:FuncDef|        srestore(clip source, float ''frate'', int ''dmode'', ''omode'', float ''blocks'', int ''mthresh'', int ''bthresh'', bool ''chroma'', int ''cache'', float ''rr'', clip ''dclip'') }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
[[Srestore]] is the replacement function for [[mrestore]], Cdeblend, FixBlendIVTC and DupHq from the [[R_pack]]. It is an AviSynth script function that uses conditional frame evaluation for the output calculation. Generally it was written to undo norm-conversions with blends, but the last version can be useful for decimation ratios between 5 and 1 using the ''frate'' parameter.&lt;br /&gt;
&lt;br /&gt;
Important note: Srestore 2.7e can only be called one time in any script due to its use of global variables.&lt;br /&gt;
Srestore 2.7f (currently only available via forum) can be called as many times you like. This is hopefully the only functional difference. Formatting was also changed a bit to improve clarity of the nested '?' operators.&lt;br /&gt;
&lt;br /&gt;
== Requires Filters ==&lt;br /&gt;
*[[MaskTools2]]&lt;br /&gt;
*[[TIVTC]] Version 1.04 or higher (only for cache&amp;gt;0, not default)&lt;br /&gt;
*[[RemoveGrain]]   (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?p=1129919#post1129919 Average]       (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=139337 GRunT] Version 1.0.1 or higher (only for v2.7f)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{{Par|frate|float|optional}}&lt;br /&gt;
You don't need to set the decimation parameters for the norm conversions restoring Pal_to_NTSC (50-&amp;gt;23.976 or 25-&amp;gt;11.988) and NTSC_to_Pal (59.94-&amp;gt;25 or 29.97-&amp;gt;12.5), but for some seldom other blend conversion (for example 29.97 back to 23.976 or 50 to 25 - DEFT). Use frate to set the wanted output-framerate. If source-framerate/frate &amp;gt;5 or &amp;lt;1 the output-framerate will be the same as the input-framerate. This can be useful if you want to have only the dup functionality of srestore.&lt;br /&gt;
&lt;br /&gt;
{{ParR|omode|string|6|0-6 or mode}}&lt;br /&gt;
Srestore can be used as blend-decimation-function, as simple deblend-function and for double-blend-removal&lt;br /&gt;
: 1   - deblend-mode 1        -&amp;gt; detected blends will be replaced with the previous frame&lt;br /&gt;
: 2   - deblend-mode 2        -&amp;gt; next frame is used instead of the detected blend&lt;br /&gt;
: 3   - deblend-mode 3        -&amp;gt; detected blends will be replaced with the neighbour that has the smaller difference&lt;br /&gt;
: 4   - deblend-mode 4        -&amp;gt; use the neighbour with the smaller blend-possibility&lt;br /&gt;
: 5   - deblend-special       -&amp;gt; outputs the one of four frames with the smallest blend-possibility&lt;br /&gt;
: &amp;gt;5  - blend-decimation      -&amp;gt; for all decimation operations&lt;br /&gt;
&lt;br /&gt;
The output-modes 1-5 are simple deblending modes, so the framerate will not change.&lt;br /&gt;
            &lt;br /&gt;
To enable the double-blend-removal you have to set a string for omode. This string decides about the postprocessing mode that is used on the restored frames:&lt;br /&gt;
: pp0 -&amp;gt;  the fastest mode, no postprocessing&lt;br /&gt;
: pp1 -&amp;gt;  use difference masking, higher quality and still good speed&lt;br /&gt;
: pp2 -&amp;gt;  use a special blurring mask on luma and chroma that reduces artefacts&lt;br /&gt;
: pp3 -&amp;gt;  combines postprocessing 1 and 2   -&amp;gt; slowest&lt;br /&gt;
&lt;br /&gt;
You can add also your own postprocessing to these modes. Just add your function like this:&lt;br /&gt;
&lt;br /&gt;
 omode=&amp;quot;pp3.blur(1)&amp;quot;		   -&amp;gt; pp3 + blurring&lt;br /&gt;
If you want to add a function with its own inputstrings use three quotation marks:&lt;br /&gt;
 omode=&amp;quot;&amp;quot;&amp;quot;pp2.deen(&amp;quot;a2d&amp;quot;)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important Note: Also the double-blend-removal does no decimation. It's created only for double-blends caused by blend deinterlacing of telecined sources. You have to add an decimation function for full restoring:&lt;br /&gt;
&lt;br /&gt;
 source                          #progressive&lt;br /&gt;
 srestore(dmode=-4,omode=&amp;quot;pp0&amp;quot;)&lt;br /&gt;
 decimate(cycle=5,quality=0)     #recommed decimating&lt;br /&gt;
&lt;br /&gt;
{{ParR|speed|int|9|-25-25}}&lt;br /&gt;
With the speed parameter you can set a speed-vs-detail-detection value. If you set speed=25, only one of 25 pixels (5*5) is used for the detection. Higher values result in a lower possibility of low-detail detection. Set a negative speed value for high quality and hd sources. This can improve the detection of small details.&lt;br /&gt;
&lt;br /&gt;
{{ParR|mode|int|2|1-3}}&lt;br /&gt;
With the mode parameter you can decide if chroma should be used for detection and if srestore have to merge neighboured frames or look for dups to improve output quality:&lt;br /&gt;
: 1   - simple output mode, decimation is not touched&lt;br /&gt;
: 2   - duping feature, if a frame has a dup-neighbour, that seems to have a higher quality, this one will be outputed&lt;br /&gt;
: 3   - like 2 but the duplicates will be merged&lt;br /&gt;
: &amp;gt;3  - mode 2 and 3 combined&lt;br /&gt;
By setting the compatible negative values, the chroma values will be also used for the detection.&lt;br /&gt;
Note: The double-blend-removal does not use this parameter (-&amp;gt; only mode 1 or -1).&lt;br /&gt;
&lt;br /&gt;
{{ParR|thresh|int|22|12-44}}&lt;br /&gt;
The detection of srestore is pretty stable, but the threshold is still important to weight the detection influence. Use small values for sources with little temporal artefacts (bobbing effect, aliasing, blocks, noise, ...) and higher values for the opposite case.&lt;br /&gt;
&lt;br /&gt;
{{ParR|cache|int|-1|-1-10}}&lt;br /&gt;
With cache&amp;gt;=0 srestore use the RequestLinear function (TIVTC) to be more compatible with non-linear requesting (codec or other functions). Best way to use srestore is to do a lossless first pass right after calling srestore and do all other filtering and the final encoding in a second pass. If you do not have enough space to do a lossless pass and you cannot avoid non-linear frame requesting and the pattern of the source is pretty unstable set cache around 5-10, but keep in mind that this can increase memory usage.&lt;br /&gt;
    			&lt;br /&gt;
{{Par|dclip|clip|input}}&lt;br /&gt;
The '''d'''etection '''clip''' can be used to improve (deblock, smooth, ...) and speed-up blend and motion detection. The selected clip is only used for detection and not for output, so it does not affect the output quality. &lt;br /&gt;
If you use a high quality deinterlacing on the source you can speed up the detection by using a faster deinterlacing function (third code example) for the detection clip.&lt;br /&gt;
It's recommended to crop the bobbed source (deinterlace BEFORE cropping!) to avoid the detection influence of the bobbing borders (second code example).&lt;br /&gt;
&lt;br /&gt;
== Examples== &lt;br /&gt;
&lt;br /&gt;
bobbed (or progressive) source&lt;br /&gt;
 srestore()&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 ord = last.getparity() ? 1 : 0&lt;br /&gt;
 leakkernelbob(ord,4,true,true)&lt;br /&gt;
 srestore(dclip=last.crop(8,16,-8,-24))&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 d = last.bob(-0.2,0.6).reduceflicker(strength=1)&lt;br /&gt;
 tdeint(mode=1)   #or for example yadif(mode=1)&lt;br /&gt;
 srestore(mode=4,dclip=d)&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=95924 Discussion thread] at [http://forum.doom9.org/ Doom9's Forum]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Srestore</id>
		<title>Srestore</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Srestore"/>
				<updated>2013-11-04T19:26:06Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat|External_filters|Restoration_filters|Deblenders}}&lt;br /&gt;
{{Filter|MOmonster|2.7e, 2.7f|[[Media:srestore.avsi|srestore.avsi]] [[Media:srestore_27f.avsi|srestore_27f.avsi]]|Deblenders|&lt;br /&gt;
* YV12&lt;br /&gt;
|}}&lt;br /&gt;
{{Template:FuncDef|        srestore(clip source, float ''frate'', int ''dmode'', ''omode'', float ''blocks'', int ''mthresh'', int ''bthresh'', bool ''chroma'', int ''cache'', float ''rr'', clip ''dclip'') }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
[[Srestore]] is the replacement function for [[mrestore]], Cdeblend, FixBlendIVTC and DupHq from the [[R_pack]]. It is an AviSynth script function that uses conditional frame evaluation for the output calculation. Generally it was written to undo norm-conversions with blends, but the last version can be useful for decimation ratios between 5 and 1 using the ''frate'' parameter.&lt;br /&gt;
&lt;br /&gt;
Important note: Srestore can only be called one time in any script due to its use of global variables.&lt;br /&gt;
&lt;br /&gt;
== Requires Filters ==&lt;br /&gt;
*[[MaskTools2]]&lt;br /&gt;
*[[TIVTC]] Version 1.04 or higher (only for cache&amp;gt;0, not default)&lt;br /&gt;
*[[RemoveGrain]]   (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?p=1129919#post1129919 Average]       (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=139337 GRunT] Version 1.0.1 or higher (only for v2.7f)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{{Par|frate|float|optional}}&lt;br /&gt;
You don't need to set the decimation parameters for the norm conversions restoring Pal_to_NTSC (50-&amp;gt;23.976 or 25-&amp;gt;11.988) and NTSC_to_Pal (59.94-&amp;gt;25 or 29.97-&amp;gt;12.5), but for some seldom other blend conversion (for example 29.97 back to 23.976 or 50 to 25 - DEFT). Use frate to set the wanted output-framerate. If source-framerate/frate &amp;gt;5 or &amp;lt;1 the output-framerate will be the same as the input-framerate. This can be useful if you want to have only the dup functionality of srestore.&lt;br /&gt;
&lt;br /&gt;
{{ParR|omode|string|6|0-6 or mode}}&lt;br /&gt;
Srestore can be used as blend-decimation-function, as simple deblend-function and for double-blend-removal&lt;br /&gt;
: 1   - deblend-mode 1        -&amp;gt; detected blends will be replaced with the previous frame&lt;br /&gt;
: 2   - deblend-mode 2        -&amp;gt; next frame is used instead of the detected blend&lt;br /&gt;
: 3   - deblend-mode 3        -&amp;gt; detected blends will be replaced with the neighbour that has the smaller difference&lt;br /&gt;
: 4   - deblend-mode 4        -&amp;gt; use the neighbour with the smaller blend-possibility&lt;br /&gt;
: 5   - deblend-special       -&amp;gt; outputs the one of four frames with the smallest blend-possibility&lt;br /&gt;
: &amp;gt;5  - blend-decimation      -&amp;gt; for all decimation operations&lt;br /&gt;
&lt;br /&gt;
The output-modes 1-5 are simple deblending modes, so the framerate will not change.&lt;br /&gt;
            &lt;br /&gt;
To enable the double-blend-removal you have to set a string for omode. This string decides about the postprocessing mode that is used on the restored frames:&lt;br /&gt;
: pp0 -&amp;gt;  the fastest mode, no postprocessing&lt;br /&gt;
: pp1 -&amp;gt;  use difference masking, higher quality and still good speed&lt;br /&gt;
: pp2 -&amp;gt;  use a special blurring mask on luma and chroma that reduces artefacts&lt;br /&gt;
: pp3 -&amp;gt;  combines postprocessing 1 and 2   -&amp;gt; slowest&lt;br /&gt;
&lt;br /&gt;
You can add also your own postprocessing to these modes. Just add your function like this:&lt;br /&gt;
&lt;br /&gt;
 omode=&amp;quot;pp3.blur(1)&amp;quot;		   -&amp;gt; pp3 + blurring&lt;br /&gt;
If you want to add a function with its own inputstrings use three quotation marks:&lt;br /&gt;
 omode=&amp;quot;&amp;quot;&amp;quot;pp2.deen(&amp;quot;a2d&amp;quot;)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important Note: Also the double-blend-removal does no decimation. It's created only for double-blends caused by blend deinterlacing of telecined sources. You have to add an decimation function for full restoring:&lt;br /&gt;
&lt;br /&gt;
 source                          #progressive&lt;br /&gt;
 srestore(dmode=-4,omode=&amp;quot;pp0&amp;quot;)&lt;br /&gt;
 decimate(cycle=5,quality=0)     #recommed decimating&lt;br /&gt;
&lt;br /&gt;
{{ParR|speed|int|9|-25-25}}&lt;br /&gt;
With the speed parameter you can set a speed-vs-detail-detection value. If you set speed=25, only one of 25 pixels (5*5) is used for the detection. Higher values result in a lower possibility of low-detail detection. Set a negative speed value for high quality and hd sources. This can improve the detection of small details.&lt;br /&gt;
&lt;br /&gt;
{{ParR|mode|int|2|1-3}}&lt;br /&gt;
With the mode parameter you can decide if chroma should be used for detection and if srestore have to merge neighboured frames or look for dups to improve output quality:&lt;br /&gt;
: 1   - simple output mode, decimation is not touched&lt;br /&gt;
: 2   - duping feature, if a frame has a dup-neighbour, that seems to have a higher quality, this one will be outputed&lt;br /&gt;
: 3   - like 2 but the duplicates will be merged&lt;br /&gt;
: &amp;gt;3  - mode 2 and 3 combined&lt;br /&gt;
By setting the compatible negative values, the chroma values will be also used for the detection.&lt;br /&gt;
Note: The double-blend-removal does not use this parameter (-&amp;gt; only mode 1 or -1).&lt;br /&gt;
&lt;br /&gt;
{{ParR|thresh|int|22|12-44}}&lt;br /&gt;
The detection of srestore is pretty stable, but the threshold is still important to weight the detection influence. Use small values for sources with little temporal artefacts (bobbing effect, aliasing, blocks, noise, ...) and higher values for the opposite case.&lt;br /&gt;
&lt;br /&gt;
{{ParR|cache|int|-1|-1-10}}&lt;br /&gt;
With cache&amp;gt;=0 srestore use the RequestLinear function (TIVTC) to be more compatible with non-linear requesting (codec or other functions). Best way to use srestore is to do a lossless first pass right after calling srestore and do all other filtering and the final encoding in a second pass. If you do not have enough space to do a lossless pass and you cannot avoid non-linear frame requesting and the pattern of the source is pretty unstable set cache around 5-10, but keep in mind that this can increase memory usage.&lt;br /&gt;
    			&lt;br /&gt;
{{Par|dclip|clip|input}}&lt;br /&gt;
The '''d'''etection '''clip''' can be used to improve (deblock, smooth, ...) and speed-up blend and motion detection. The selected clip is only used for detection and not for output, so it does not affect the output quality. &lt;br /&gt;
If you use a high quality deinterlacing on the source you can speed up the detection by using a faster deinterlacing function (third code example) for the detection clip.&lt;br /&gt;
It's recommended to crop the bobbed source (deinterlace BEFORE cropping!) to avoid the detection influence of the bobbing borders (second code example).&lt;br /&gt;
&lt;br /&gt;
== Examples== &lt;br /&gt;
&lt;br /&gt;
bobbed (or progressive) source&lt;br /&gt;
 srestore()&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 ord = last.getparity() ? 1 : 0&lt;br /&gt;
 leakkernelbob(ord,4,true,true)&lt;br /&gt;
 srestore(dclip=last.crop(8,16,-8,-24))&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 d = last.bob(-0.2,0.6).reduceflicker(strength=1)&lt;br /&gt;
 tdeint(mode=1)   #or for example yadif(mode=1)&lt;br /&gt;
 srestore(mode=4,dclip=d)&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=95924 Discussion thread] at [http://forum.doom9.org/ Doom9's Forum]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Srestore</id>
		<title>Srestore</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Srestore"/>
				<updated>2013-11-04T19:11:48Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat|External_filters|Restoration_filters|Deblenders}}&lt;br /&gt;
{{Filter|MOmonster|2.7e, 2.7f|[[Media:srestore.avsi|srestore.avsi]]|Deblenders|&lt;br /&gt;
* YV12&lt;br /&gt;
|}}&lt;br /&gt;
{{Template:FuncDef|        srestore(clip source, float ''frate'', int ''dmode'', ''omode'', float ''blocks'', int ''mthresh'', int ''bthresh'', bool ''chroma'', int ''cache'', float ''rr'', clip ''dclip'') }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
[[Srestore]] is the replacement function for [[mrestore]], Cdeblend, FixBlendIVTC and DupHq from the [[R_pack]]. It is an AviSynth script function that uses conditional frame evaluation for the output calculation. Generally it was written to undo norm-conversions with blends, but the last version can be useful for decimation ratios between 5 and 1 using the ''frate'' parameter.&lt;br /&gt;
&lt;br /&gt;
Important note: Srestore can only be called one time in any script due to its use of global variables.&lt;br /&gt;
&lt;br /&gt;
== Requires Filters ==&lt;br /&gt;
*[[MaskTools2]]&lt;br /&gt;
*[[TIVTC]] Version 1.04 or higher (only for cache&amp;gt;0, not default)&lt;br /&gt;
*[[RemoveGrain]]   (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?p=1129919#post1129919 Average]       (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=139337 GRunT] Version 1.0.1 or higher (only for v2.7f)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{{Par|frate|float|optional}}&lt;br /&gt;
You don't need to set the decimation parameters for the norm conversions restoring Pal_to_NTSC (50-&amp;gt;23.976 or 25-&amp;gt;11.988) and NTSC_to_Pal (59.94-&amp;gt;25 or 29.97-&amp;gt;12.5), but for some seldom other blend conversion (for example 29.97 back to 23.976 or 50 to 25 - DEFT). Use frate to set the wanted output-framerate. If source-framerate/frate &amp;gt;5 or &amp;lt;1 the output-framerate will be the same as the input-framerate. This can be useful if you want to have only the dup functionality of srestore.&lt;br /&gt;
&lt;br /&gt;
{{ParR|omode|string|6|0-6 or mode}}&lt;br /&gt;
Srestore can be used as blend-decimation-function, as simple deblend-function and for double-blend-removal&lt;br /&gt;
: 1   - deblend-mode 1        -&amp;gt; detected blends will be replaced with the previous frame&lt;br /&gt;
: 2   - deblend-mode 2        -&amp;gt; next frame is used instead of the detected blend&lt;br /&gt;
: 3   - deblend-mode 3        -&amp;gt; detected blends will be replaced with the neighbour that has the smaller difference&lt;br /&gt;
: 4   - deblend-mode 4        -&amp;gt; use the neighbour with the smaller blend-possibility&lt;br /&gt;
: 5   - deblend-special       -&amp;gt; outputs the one of four frames with the smallest blend-possibility&lt;br /&gt;
: &amp;gt;5  - blend-decimation      -&amp;gt; for all decimation operations&lt;br /&gt;
&lt;br /&gt;
The output-modes 1-5 are simple deblending modes, so the framerate will not change.&lt;br /&gt;
            &lt;br /&gt;
To enable the double-blend-removal you have to set a string for omode. This string decides about the postprocessing mode that is used on the restored frames:&lt;br /&gt;
: pp0 -&amp;gt;  the fastest mode, no postprocessing&lt;br /&gt;
: pp1 -&amp;gt;  use difference masking, higher quality and still good speed&lt;br /&gt;
: pp2 -&amp;gt;  use a special blurring mask on luma and chroma that reduces artefacts&lt;br /&gt;
: pp3 -&amp;gt;  combines postprocessing 1 and 2   -&amp;gt; slowest&lt;br /&gt;
&lt;br /&gt;
You can add also your own postprocessing to these modes. Just add your function like this:&lt;br /&gt;
&lt;br /&gt;
 omode=&amp;quot;pp3.blur(1)&amp;quot;		   -&amp;gt; pp3 + blurring&lt;br /&gt;
If you want to add a function with its own inputstrings use three quotation marks:&lt;br /&gt;
 omode=&amp;quot;&amp;quot;&amp;quot;pp2.deen(&amp;quot;a2d&amp;quot;)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important Note: Also the double-blend-removal does no decimation. It's created only for double-blends caused by blend deinterlacing of telecined sources. You have to add an decimation function for full restoring:&lt;br /&gt;
&lt;br /&gt;
 source                          #progressive&lt;br /&gt;
 srestore(dmode=-4,omode=&amp;quot;pp0&amp;quot;)&lt;br /&gt;
 decimate(cycle=5,quality=0)     #recommed decimating&lt;br /&gt;
&lt;br /&gt;
{{ParR|speed|int|9|-25-25}}&lt;br /&gt;
With the speed parameter you can set a speed-vs-detail-detection value. If you set speed=25, only one of 25 pixels (5*5) is used for the detection. Higher values result in a lower possibility of low-detail detection. Set a negative speed value for high quality and hd sources. This can improve the detection of small details.&lt;br /&gt;
&lt;br /&gt;
{{ParR|mode|int|2|1-3}}&lt;br /&gt;
With the mode parameter you can decide if chroma should be used for detection and if srestore have to merge neighboured frames or look for dups to improve output quality:&lt;br /&gt;
: 1   - simple output mode, decimation is not touched&lt;br /&gt;
: 2   - duping feature, if a frame has a dup-neighbour, that seems to have a higher quality, this one will be outputed&lt;br /&gt;
: 3   - like 2 but the duplicates will be merged&lt;br /&gt;
: &amp;gt;3  - mode 2 and 3 combined&lt;br /&gt;
By setting the compatible negative values, the chroma values will be also used for the detection.&lt;br /&gt;
Note: The double-blend-removal does not use this parameter (-&amp;gt; only mode 1 or -1).&lt;br /&gt;
&lt;br /&gt;
{{ParR|thresh|int|22|12-44}}&lt;br /&gt;
The detection of srestore is pretty stable, but the threshold is still important to weight the detection influence. Use small values for sources with little temporal artefacts (bobbing effect, aliasing, blocks, noise, ...) and higher values for the opposite case.&lt;br /&gt;
&lt;br /&gt;
{{ParR|cache|int|-1|-1-10}}&lt;br /&gt;
With cache&amp;gt;=0 srestore use the RequestLinear function (TIVTC) to be more compatible with non-linear requesting (codec or other functions). Best way to use srestore is to do a lossless first pass right after calling srestore and do all other filtering and the final encoding in a second pass. If you do not have enough space to do a lossless pass and you cannot avoid non-linear frame requesting and the pattern of the source is pretty unstable set cache around 5-10, but keep in mind that this can increase memory usage.&lt;br /&gt;
    			&lt;br /&gt;
{{Par|dclip|clip|input}}&lt;br /&gt;
The '''d'''etection '''clip''' can be used to improve (deblock, smooth, ...) and speed-up blend and motion detection. The selected clip is only used for detection and not for output, so it does not affect the output quality. &lt;br /&gt;
If you use a high quality deinterlacing on the source you can speed up the detection by using a faster deinterlacing function (third code example) for the detection clip.&lt;br /&gt;
It's recommended to crop the bobbed source (deinterlace BEFORE cropping!) to avoid the detection influence of the bobbing borders (second code example).&lt;br /&gt;
&lt;br /&gt;
== Examples== &lt;br /&gt;
&lt;br /&gt;
bobbed (or progressive) source&lt;br /&gt;
 srestore()&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 ord = last.getparity() ? 1 : 0&lt;br /&gt;
 leakkernelbob(ord,4,true,true)&lt;br /&gt;
 srestore(dclip=last.crop(8,16,-8,-24))&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 d = last.bob(-0.2,0.6).reduceflicker(strength=1)&lt;br /&gt;
 tdeint(mode=1)   #or for example yadif(mode=1)&lt;br /&gt;
 srestore(mode=4,dclip=d)&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=95924 Discussion thread] at [http://forum.doom9.org/ Doom9's Forum]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Srestore</id>
		<title>Srestore</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Srestore"/>
				<updated>2013-11-04T19:07:19Z</updated>
		
		<summary type="html">&lt;p&gt;Martin53: /* Requires Filters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat|External_filters|Restoration_filters|Deblenders}}&lt;br /&gt;
{{Filter|MOmonster|2.7e|[[Media:srestore.avsi|srestore.avsi]]|Deblenders|&lt;br /&gt;
* YV12&lt;br /&gt;
|}}&lt;br /&gt;
{{Template:FuncDef|        srestore(clip source, float ''frate'', int ''dmode'', ''omode'', float ''blocks'', int ''mthresh'', int ''bthresh'', bool ''chroma'', int ''cache'', float ''rr'', clip ''dclip'') }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
[[Srestore]] is the replacement function for [[mrestore]], Cdeblend, FixBlendIVTC and DupHq from the [[R_pack]]. It is an AviSynth script function that uses conditional frame evaluation for the output calculation. Generally it was written to undo norm-conversions with blends, but the last version can be useful for decimation ratios between 5 and 1 using the ''frate'' parameter.&lt;br /&gt;
&lt;br /&gt;
Important note: Srestore can only be called one time in any script due to its use of global variables.&lt;br /&gt;
&lt;br /&gt;
== Requires Filters ==&lt;br /&gt;
*[[MaskTools2]]&lt;br /&gt;
*[[TIVTC]] Version 1.04 or higher (only for cache&amp;gt;0, not default)&lt;br /&gt;
*[[RemoveGrain]]   (only for double-blend-removal, not default)&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?p=1129919#post1129919 Average]       (only for double-blend-removal, not default)&lt;br /&gt;
*GRunT[http://forum.doom9.org/showthread.php?t=139337] Version 1.0.1 or higher (only for v2.7f)&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{{Par|frate|float|optional}}&lt;br /&gt;
You don't need to set the decimation parameters for the norm conversions restoring Pal_to_NTSC (50-&amp;gt;23.976 or 25-&amp;gt;11.988) and NTSC_to_Pal (59.94-&amp;gt;25 or 29.97-&amp;gt;12.5), but for some seldom other blend conversion (for example 29.97 back to 23.976 or 50 to 25 - DEFT). Use frate to set the wanted output-framerate. If source-framerate/frate &amp;gt;5 or &amp;lt;1 the output-framerate will be the same as the input-framerate. This can be useful if you want to have only the dup functionality of srestore.&lt;br /&gt;
&lt;br /&gt;
{{ParR|omode|string|6|0-6 or mode}}&lt;br /&gt;
Srestore can be used as blend-decimation-function, as simple deblend-function and for double-blend-removal&lt;br /&gt;
: 1   - deblend-mode 1        -&amp;gt; detected blends will be replaced with the previous frame&lt;br /&gt;
: 2   - deblend-mode 2        -&amp;gt; next frame is used instead of the detected blend&lt;br /&gt;
: 3   - deblend-mode 3        -&amp;gt; detected blends will be replaced with the neighbour that has the smaller difference&lt;br /&gt;
: 4   - deblend-mode 4        -&amp;gt; use the neighbour with the smaller blend-possibility&lt;br /&gt;
: 5   - deblend-special       -&amp;gt; outputs the one of four frames with the smallest blend-possibility&lt;br /&gt;
: &amp;gt;5  - blend-decimation      -&amp;gt; for all decimation operations&lt;br /&gt;
&lt;br /&gt;
The output-modes 1-5 are simple deblending modes, so the framerate will not change.&lt;br /&gt;
            &lt;br /&gt;
To enable the double-blend-removal you have to set a string for omode. This string decides about the postprocessing mode that is used on the restored frames:&lt;br /&gt;
: pp0 -&amp;gt;  the fastest mode, no postprocessing&lt;br /&gt;
: pp1 -&amp;gt;  use difference masking, higher quality and still good speed&lt;br /&gt;
: pp2 -&amp;gt;  use a special blurring mask on luma and chroma that reduces artefacts&lt;br /&gt;
: pp3 -&amp;gt;  combines postprocessing 1 and 2   -&amp;gt; slowest&lt;br /&gt;
&lt;br /&gt;
You can add also your own postprocessing to these modes. Just add your function like this:&lt;br /&gt;
&lt;br /&gt;
 omode=&amp;quot;pp3.blur(1)&amp;quot;		   -&amp;gt; pp3 + blurring&lt;br /&gt;
If you want to add a function with its own inputstrings use three quotation marks:&lt;br /&gt;
 omode=&amp;quot;&amp;quot;&amp;quot;pp2.deen(&amp;quot;a2d&amp;quot;)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Important Note: Also the double-blend-removal does no decimation. It's created only for double-blends caused by blend deinterlacing of telecined sources. You have to add an decimation function for full restoring:&lt;br /&gt;
&lt;br /&gt;
 source                          #progressive&lt;br /&gt;
 srestore(dmode=-4,omode=&amp;quot;pp0&amp;quot;)&lt;br /&gt;
 decimate(cycle=5,quality=0)     #recommed decimating&lt;br /&gt;
&lt;br /&gt;
{{ParR|speed|int|9|-25-25}}&lt;br /&gt;
With the speed parameter you can set a speed-vs-detail-detection value. If you set speed=25, only one of 25 pixels (5*5) is used for the detection. Higher values result in a lower possibility of low-detail detection. Set a negative speed value for high quality and hd sources. This can improve the detection of small details.&lt;br /&gt;
&lt;br /&gt;
{{ParR|mode|int|2|1-3}}&lt;br /&gt;
With the mode parameter you can decide if chroma should be used for detection and if srestore have to merge neighboured frames or look for dups to improve output quality:&lt;br /&gt;
: 1   - simple output mode, decimation is not touched&lt;br /&gt;
: 2   - duping feature, if a frame has a dup-neighbour, that seems to have a higher quality, this one will be outputed&lt;br /&gt;
: 3   - like 2 but the duplicates will be merged&lt;br /&gt;
: &amp;gt;3  - mode 2 and 3 combined&lt;br /&gt;
By setting the compatible negative values, the chroma values will be also used for the detection.&lt;br /&gt;
Note: The double-blend-removal does not use this parameter (-&amp;gt; only mode 1 or -1).&lt;br /&gt;
&lt;br /&gt;
{{ParR|thresh|int|22|12-44}}&lt;br /&gt;
The detection of srestore is pretty stable, but the threshold is still important to weight the detection influence. Use small values for sources with little temporal artefacts (bobbing effect, aliasing, blocks, noise, ...) and higher values for the opposite case.&lt;br /&gt;
&lt;br /&gt;
{{ParR|cache|int|-1|-1-10}}&lt;br /&gt;
With cache&amp;gt;=0 srestore use the RequestLinear function (TIVTC) to be more compatible with non-linear requesting (codec or other functions). Best way to use srestore is to do a lossless first pass right after calling srestore and do all other filtering and the final encoding in a second pass. If you do not have enough space to do a lossless pass and you cannot avoid non-linear frame requesting and the pattern of the source is pretty unstable set cache around 5-10, but keep in mind that this can increase memory usage.&lt;br /&gt;
    			&lt;br /&gt;
{{Par|dclip|clip|input}}&lt;br /&gt;
The '''d'''etection '''clip''' can be used to improve (deblock, smooth, ...) and speed-up blend and motion detection. The selected clip is only used for detection and not for output, so it does not affect the output quality. &lt;br /&gt;
If you use a high quality deinterlacing on the source you can speed up the detection by using a faster deinterlacing function (third code example) for the detection clip.&lt;br /&gt;
It's recommended to crop the bobbed source (deinterlace BEFORE cropping!) to avoid the detection influence of the bobbing borders (second code example).&lt;br /&gt;
&lt;br /&gt;
== Examples== &lt;br /&gt;
&lt;br /&gt;
bobbed (or progressive) source&lt;br /&gt;
 srestore()&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 ord = last.getparity() ? 1 : 0&lt;br /&gt;
 leakkernelbob(ord,4,true,true)&lt;br /&gt;
 srestore(dclip=last.crop(8,16,-8,-24))&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
 d = last.bob(-0.2,0.6).reduceflicker(strength=1)&lt;br /&gt;
 tdeint(mode=1)   #or for example yadif(mode=1)&lt;br /&gt;
 srestore(mode=4,dclip=d)&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://forum.doom9.org/showthread.php?t=95924 Discussion thread] at [http://forum.doom9.org/ Doom9's Forum]&lt;/div&gt;</summary>
		<author><name>Martin53</name></author>	</entry>

	</feed>