<?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=Pinterf</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=Pinterf"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Special:Contributions/Pinterf"/>
		<updated>2026-06-10T07:10:44Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>http://avisynth.nl/index.php/Avsresize</id>
		<title>Avsresize</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Avsresize"/>
				<updated>2026-01-30T20:41:08Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: Version update r26&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Resizers|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1=[https://github.com/sekrit-twc sekrit-twc], [https://codeberg.org/StvG StvG]&lt;br /&gt;
|2=r26&lt;br /&gt;
|3=[https://codeberg.org/StvG/avsresize/releases avsresize_r26.7z]&lt;br /&gt;
|4=Resize &lt;br /&gt;
|5=Open source&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=173986 Doom9 Forum]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
[https://github.com/sekrit-twc/zimg z.lib] resizers for AviSynth+&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [[AviSynth+]] x86/x64, latest binaries are 64-bit only&lt;br /&gt;
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
**All [[planar]] formats (8/10/12/14/16/32-bit, YUV/RGB with or without alpha) are supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
Syntax was updated here till r21 (?), for up-to-date list, check documentation.&lt;br /&gt;
&lt;br /&gt;
===z_ConvertFormat===&lt;br /&gt;
Scaling, colorspace conversion, and depth conversion.&lt;br /&gt;
:{{Template:FuncDef|z_ConvertFormat (clip clip, int &amp;quot;width&amp;quot;, int &amp;quot;height&amp;quot;, string &amp;quot;pixel_type&amp;quot;, string &amp;quot;colorspace_op&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, bool &amp;quot;interlaced&amp;quot;, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, string &amp;quot;resample_filter&amp;quot;, float &amp;quot;filter_param_a&amp;quot;, float &amp;quot;filter_param_b&amp;quot;, string &amp;quot;resample_filter_uv&amp;quot;, float &amp;quot;filter_param_a_uv&amp;quot;, float &amp;quot;filter_param_b_uv&amp;quot;, string &amp;quot;dither_type&amp;quot;, string &amp;quot;cpu_type&amp;quot;, float &amp;quot;nominal_luminance&amp;quot;, bool &amp;quot;approximate_gamma&amp;quot;, bool &amp;quot;use_props&amp;quot;, bool &amp;quot;scene_referred&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|width|int| }}&lt;br /&gt;
::{{Par2|height|int| }}&lt;br /&gt;
:::Output width and height in pixels.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|pixel_type|string| }}&lt;br /&gt;
:::Output pixel type (&amp;quot;YV12&amp;quot;, &amp;quot;YUV420P16&amp;quot;, etc.).&lt;br /&gt;
::::{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;height:100px; width:240px; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!width=10%| Bit Depth&lt;br /&gt;
!width=10%| Grey&lt;br /&gt;
!width=10%| YUV420&lt;br /&gt;
!width=10%| YUVA420&lt;br /&gt;
!width=10%| YUV422&lt;br /&gt;
!width=10%| YUVA422&lt;br /&gt;
!width=10%| YUV444&lt;br /&gt;
!width=10%| YUVA444&lt;br /&gt;
!width=10%| RGB&lt;br /&gt;
!width=10%| RGBA&lt;br /&gt;
|-&lt;br /&gt;
!8&lt;br /&gt;
|Y8&lt;br /&gt;
|YV12&amp;lt;br&amp;gt;YUV420&amp;lt;br&amp;gt;YUV420P8&lt;br /&gt;
|YUVA420&amp;lt;br&amp;gt;YUVA420P8&lt;br /&gt;
|YV16&amp;lt;br&amp;gt;YUV422&amp;lt;br&amp;gt;YUV422P8&lt;br /&gt;
|YUVA422&amp;lt;br&amp;gt;YUVA422P8&lt;br /&gt;
|YV24&amp;lt;br&amp;gt;YUV444&amp;lt;br&amp;gt;YUV444P8&lt;br /&gt;
|YUVA444&amp;lt;br&amp;gt;YUVA444P8&lt;br /&gt;
|RGBP&amp;lt;br&amp;gt;RGBP8&lt;br /&gt;
|RGBAP&amp;lt;br&amp;gt;RGBAP8&lt;br /&gt;
|-&lt;br /&gt;
!10&lt;br /&gt;
|Y10&lt;br /&gt;
|YUV420P10&lt;br /&gt;
|YUVA420P10&lt;br /&gt;
|YUV422P10&lt;br /&gt;
|YUVA422P10&lt;br /&gt;
|YUV444P10&lt;br /&gt;
|YUVA444P10&lt;br /&gt;
|RGBP10&lt;br /&gt;
|RGBAP10&lt;br /&gt;
|-&lt;br /&gt;
!12&lt;br /&gt;
|Y12&lt;br /&gt;
|YUV420P12&lt;br /&gt;
|YUVA420P12&lt;br /&gt;
|YUV422P12&lt;br /&gt;
|YUVA422P12&lt;br /&gt;
|YUV444P12&lt;br /&gt;
|YUVA444P12&lt;br /&gt;
|RGBP12&lt;br /&gt;
|RGBAP12&lt;br /&gt;
|-&lt;br /&gt;
!14&lt;br /&gt;
|Y14&lt;br /&gt;
|YUV420P14&lt;br /&gt;
|YUVA420P14&lt;br /&gt;
|YUV422P14&lt;br /&gt;
|YUVA422P14&lt;br /&gt;
|YUV444P14&lt;br /&gt;
|YUVA444P14&lt;br /&gt;
|RGBP14&lt;br /&gt;
|RGBAP14&lt;br /&gt;
|-&lt;br /&gt;
!16&lt;br /&gt;
|Y16&lt;br /&gt;
|YUV420P16&lt;br /&gt;
|YUVA420P16&lt;br /&gt;
|YUV422P16&lt;br /&gt;
|YUVA422P16&lt;br /&gt;
|YUV444P16&lt;br /&gt;
|YUVA444P16&lt;br /&gt;
|RGBP16&lt;br /&gt;
|RGBAP16&lt;br /&gt;
|-&lt;br /&gt;
!32&lt;br /&gt;
|Y32&lt;br /&gt;
|YUV420PS&lt;br /&gt;
|YUVA420PS&lt;br /&gt;
|YUV422PS&lt;br /&gt;
|YUVA422PS&lt;br /&gt;
|YUV444PS&lt;br /&gt;
|YUVA444PS&lt;br /&gt;
|RGBPS&lt;br /&gt;
|RGBAPS&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;10&amp;quot;| All colorspaces are planar. &amp;quot;YUV9&amp;quot; and &amp;quot;YV411&amp;quot; (&amp;quot;YUV411&amp;quot;, &amp;quot;YUV411P8&amp;quot;) were omitted from table above. See [[Avisynthplus_color_formats#Color_Format_Table|AviSynth+ color formats table]]. &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|colorspace_op|string| }}&lt;br /&gt;
:::Colorspace operation description.&lt;br /&gt;
:::Format is &amp;lt;code&amp;gt;&amp;quot;matS[:transS[:primS[:rangeS]]]=&amp;gt;matD[:transD[:primD[:rangeD]]]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:::Example JPEG to MPEG: &amp;lt;code&amp;gt;&amp;quot;170m:709:709:f=&amp;gt;709:709:709:l&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:::There is keyword &amp;quot;auto&amp;quot; for source matrix, transfer, primaries, range. When it's used the corresponding input frame properties are used, if such frame properties don't exist either an error is raised or default matrix and color range are used.&lt;br /&gt;
:::There is keyword &amp;quot;same&amp;quot; for destination matrix, transfer, primaries, range. When it's used the corresponding source value is applied for destination too so there is no conversion.&lt;br /&gt;
:::See [[#Examples|examples]] for more information.&lt;br /&gt;
::::{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;height:100px; width:240px; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!width=25%| MATRIX COEFFICIENTS&lt;br /&gt;
!width=25%| TRANSFER CHARACTERISTICS&lt;br /&gt;
!width=25%| COLOR PRIMARIES&lt;br /&gt;
!width=25%| PIXEL RANGE&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;rgb&amp;quot;&lt;br /&gt;
|&amp;quot;709&amp;quot;&lt;br /&gt;
|&amp;quot;709&amp;quot;&lt;br /&gt;
|&amp;quot;limited&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;709&amp;quot;&lt;br /&gt;
|&amp;quot;unspec&amp;quot;&lt;br /&gt;
|&amp;quot;unspec&amp;quot;&lt;br /&gt;
|&amp;quot;l&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;unspec&amp;quot;&lt;br /&gt;
|&amp;quot;470m&amp;quot;&lt;br /&gt;
|&amp;quot;470m&amp;quot;&lt;br /&gt;
|&amp;quot;full&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;fcc&amp;quot;&lt;br /&gt;
|&amp;quot;470bg&amp;quot;&lt;br /&gt;
|&amp;quot;470bg&amp;quot;&lt;br /&gt;
|&amp;quot;f&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;470bg&amp;quot;&lt;br /&gt;
|&amp;quot;601&amp;quot;&lt;br /&gt;
|&amp;quot;170m&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;170m&amp;quot;&lt;br /&gt;
|&amp;quot;240m&amp;quot;&lt;br /&gt;
|&amp;quot;240m&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;240&amp;quot;&lt;br /&gt;
|&amp;quot;linear&amp;quot;&lt;br /&gt;
|&amp;quot;film&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;ycgco&amp;quot;&lt;br /&gt;
|&amp;quot;log100&amp;quot;&lt;br /&gt;
|&amp;quot;2020&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;2020ncl&amp;quot;&lt;br /&gt;
|&amp;quot;log316&amp;quot;&lt;br /&gt;
|&amp;quot;st428&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;2020cl&amp;quot;&lt;br /&gt;
|&amp;quot;xvycc&amp;quot;&lt;br /&gt;
|&amp;quot;st431-2&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;chromancl&amp;quot;&lt;br /&gt;
|&amp;quot;srgb&amp;quot;&lt;br /&gt;
|&amp;quot;st432-1&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;chromacl&amp;quot;&lt;br /&gt;
|&amp;quot;2020_10&amp;quot;&lt;br /&gt;
|&amp;quot;jedec-p22&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;ictcp&amp;quot;&lt;br /&gt;
|&amp;quot;2020_12&amp;quot;&lt;br /&gt;
|&amp;quot;prophoto&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Compatibility aliases&lt;br /&gt;
|&amp;quot;st2084&amp;quot;&lt;br /&gt;
|Compatibility aliases&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;601&amp;quot; same as &amp;quot;470bg&amp;quot;&lt;br /&gt;
|&amp;quot;std-b67&amp;quot;&lt;br /&gt;
|&amp;quot;xyz&amp;quot; same as &amp;quot;st428&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;2020&amp;quot; same as &amp;quot;2020ncl&amp;quot;&lt;br /&gt;
|&amp;quot;prophoto&amp;quot;&lt;br /&gt;
|&amp;quot;dci-p3&amp;quot; same as &amp;quot;st431-2&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|Compatibility aliases&lt;br /&gt;
|&amp;quot;display-p3&amp;quot; same as &amp;quot;st432-1&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&amp;quot;2020&amp;quot; same as &amp;quot;2020_10&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot;| see tables on [http://www.vapoursynth.com/doc/functions/video/resize.html VapourSynth resize documentation] &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|chromaloc_op|string| }}&lt;br /&gt;
:::Chroma location operation description.&lt;br /&gt;
:::Format is &amp;lt;code&amp;gt;&amp;quot;[locS]=&amp;gt;[locD]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:::There is keyword &amp;quot;auto&amp;quot; for source chromaloc_op. When it's used the corresponding input frame property is used, if such frame property doesn't exist default chromaloc is used.&lt;br /&gt;
:::There is keyword &amp;quot;same&amp;quot; for destination chromaloc_op. When it's used the corresponding source value is applied for destination too so there is no conversion.&lt;br /&gt;
:::See [[#Examples|examples]] for more information.&lt;br /&gt;
::::Chroma location table, names in parenthesis are compatibility aliases:&lt;br /&gt;
::::* &amp;lt;code&amp;gt;&amp;quot;left&amp;quot; (&amp;quot;mpeg2&amp;quot;) | &amp;quot;center&amp;quot; (&amp;quot;jpeg&amp;quot; and &amp;quot;mpeg1&amp;quot;) | &amp;quot;top_left&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
:::Example JPEG to MPEG2: &amp;lt;code&amp;gt;&amp;quot;center=&amp;gt;left&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|interlaced|bool|false}}&lt;br /&gt;
:::Whether to use interlaced mode.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|src_left|float|0.0}}&lt;br /&gt;
::{{Par2|src_top|float|0.0}}&lt;br /&gt;
::{{Par2|src_width|float|Source width}}&lt;br /&gt;
::{{Par2|src_height|float|Source height}}&lt;br /&gt;
:::Optional crop rectangle in the input frame.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|resample_filter|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:::Resampling modes: &amp;lt;code&amp;gt;&amp;quot;point&amp;quot; | &amp;quot;bilinear&amp;quot; | &amp;quot;bicubic&amp;quot; | &amp;quot;spline16&amp;quot; | &amp;quot;spline36&amp;quot; | &amp;quot;spline64&amp;quot; | &amp;quot;lanczos&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|filter_param_a|float| }}&lt;br /&gt;
::{{Par2|filter_param_b|float| }}&lt;br /&gt;
:::First and second parameter to resampler.&lt;br /&gt;
:::Example Bicubic (Mitchell-Netravali): &amp;lt;code&amp;gt;resample_filter=&amp;quot;bicubic&amp;quot;, filter_param_a=0.333, filter_param_b=0.333&amp;lt;/code&amp;gt;&lt;br /&gt;
:::Example 4-tap Lanczos: &amp;lt;code&amp;gt;resample_filter=&amp;quot;lanczos&amp;quot;, filter_param_a=4&amp;lt;/code&amp;gt;&lt;br /&gt;
:::Default for &amp;quot;bicubic&amp;quot;: &amp;lt;code&amp;gt;filter_param_a=0.0, filter_param_b=0.5&amp;lt;/code&amp;gt;&lt;br /&gt;
:::Default for &amp;quot;lanczos&amp;quot;: &amp;lt;code&amp;gt;filter_param_a=3&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|resample_filter_uv|string|resample_filter}}&lt;br /&gt;
:::Resampling mode for chroma.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|filter_param_a_uv|float|filter_param_a}}&lt;br /&gt;
::{{Par2|filter_param_b_uv|float|filter_param_b}}&lt;br /&gt;
:::First and second parameter to chroma resampler.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dither_type|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:::Dithering type: &amp;lt;code&amp;gt;&amp;quot;none&amp;quot; | &amp;quot;ordered&amp;quot; | &amp;quot;random&amp;quot; | &amp;quot;error_diffusion&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|cpu_type|string| }}&lt;br /&gt;
:::CPU type, names in parenthesis are compatibility aliases: &lt;br /&gt;
:::*&amp;lt;code&amp;gt;&amp;quot;none&amp;quot; | &amp;quot;avx&amp;quot;  | &amp;quot;avx_e&amp;quot; (&amp;quot;ivy&amp;quot;) | &amp;quot;avx2&amp;quot; | &amp;quot;avx512f | &amp;quot;avx512_skx&amp;quot; (&amp;quot;skx&amp;quot;) | &amp;quot;avx512_clx&amp;quot; | &amp;quot;avx512_pmc&amp;quot; (&amp;quot;cannon&amp;quot;) | &amp;quot;avx512_snc&amp;quot; (&amp;quot;ice&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|nominal_luminance|float|100.0}}&lt;br /&gt;
:::Nominal peak luminance in cd/m^2 when converting HDR content to RGB Linear. More info [https://github.com/sekrit-twc/zimg/blob/93f8504a67373d428158219eb3aca0455e4c20ca/src/zimg/api/zimg.h#L595 here].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|approximate_gamma|bool|true}}&lt;br /&gt;
:::Evaluating transfer functions at reduced precision.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|use_props|int|}}&lt;br /&gt;
:::Whether to read and set frame properties:&lt;br /&gt;
:::*-1: If frame properties are supported - if every option of &amp;lt;code&amp;gt;colorspace_op&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;chromaloc_op&amp;lt;/code&amp;gt; are specified and different than &amp;quot;auto&amp;quot;, 0, otherwise 1. &amp;lt;br&amp;gt; If frame properties are not supported - 0.&lt;br /&gt;
:::*0: If frame properties are supported - only set frame properties.&lt;br /&gt;
:::*1: Read and set frame properties.&lt;br /&gt;
:::*2: Save properties of the source clip as frame properties: &amp;lt;code&amp;gt;z_ChromaLocation, z_ColorRange, z_Matrix, z_Transfer, z_Primaries&amp;lt;/code&amp;gt;. &amp;lt;br&amp;gt; Every option of &amp;lt;code&amp;gt;colorspace_op&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;chromaloc_op&amp;lt;/code&amp;gt; must be specified and different than &amp;quot;auto&amp;quot;.&lt;br /&gt;
:::*3: Save properties of the source clip as frame properties: &amp;lt;code&amp;gt;z_ChromaLocation, z_ColorRange, z_Matrix, z_Transfer, z_Primaries&amp;lt;/code&amp;gt;. &amp;lt;br&amp;gt; Frame properties &amp;lt;code&amp;gt;_ChromaLocation, _ColorRange, _Matrix, _Transfer, _Primaries&amp;lt;/code&amp;gt; must exist. &amp;lt;br&amp;gt; Frame properties &amp;lt;code&amp;gt;_Matrix, _Transfer, _Primaries&amp;lt;/code&amp;gt; must have values different than 2 (unspec).&lt;br /&gt;
:::*4: Use z_xxx frame properties as target values. &amp;lt;br&amp;gt; z_xxx frame properties are removed after the colorspace conversion.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:::&amp;lt;code&amp;gt;use_props=0&amp;lt;/code&amp;gt; is faster than &amp;lt;code&amp;gt;use_props=1&amp;lt;/code&amp;gt;&lt;br /&gt;
:::&amp;lt;code&amp;gt;use_props=2&amp;lt;/code&amp;gt; is faster than &amp;lt;code&amp;gt;use_props=3&amp;lt;/code&amp;gt;&lt;br /&gt;
:::Example &amp;lt;code&amp;gt;use_props=2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;use_props=4&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 87em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
z_ConvertFormat(pixel_type=&amp;quot;rgbp&amp;quot;, colorspace_op=&amp;quot;709:709:709:l=&amp;gt;rgb:linear:709:f&amp;quot;, chromaloc_op=&amp;quot;left=&amp;gt;left&amp;quot;, use_props=2)&lt;br /&gt;
z_ConvertFormat(pixel_type=&amp;quot;yv12&amp;quot;, use_props=4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:::Example &amp;lt;code&amp;gt;use_props=3&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;use_props=4&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 87em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
z_ConvertFormat(pixel_type=&amp;quot;rgbp&amp;quot;, colorspace_op=&amp;quot;709:709=&amp;gt;rgb:linear&amp;quot;, use_props=3)&lt;br /&gt;
z_ConvertFormat(pixel_type=&amp;quot;yv12&amp;quot;, use_props=4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|scene_referred|bool|false}}&lt;br /&gt;
:::Whether to use scene-referred transfer function (default false). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Frame Properties====&lt;br /&gt;
*The name of the frame properties that are read and set are: &amp;lt;code&amp;gt;_ChromaLocation, _ColorRange, _Matrix, _Transfer, _Primaries&amp;lt;/code&amp;gt;&lt;br /&gt;
*The frame properties read and set the corresponding numerical index of the parameters. For example: matrix &amp;lt;code&amp;gt;&amp;quot;709&amp;quot;&amp;lt;/code&amp;gt; has numerical index `1` and the frame property have value of `1`.&lt;br /&gt;
*If colorspace_op is not defined and there are frame properties, they are used for default source values.&lt;br /&gt;
*If colorspace_op is not defined and there are no frame properties or they are not supported, default values are used as before (there are default values for matrix, range and chromaloc).&lt;br /&gt;
*If colorspace_op is defined and you want to use the frame property for a source value, use &amp;quot;auto&amp;quot;.&lt;br /&gt;
*If colorspace_op is defined and you use &amp;quot;auto&amp;quot; without frame property, the default value for that argument will be used if exist.&lt;br /&gt;
*If you use &amp;quot;auto&amp;quot; for argument with frame property that has value of 2 (unspec) and use anything different than &amp;quot;same&amp;quot; for destination, error will be raised.&lt;br /&gt;
*If you use &amp;quot;auto=&amp;gt;same&amp;quot; for matrix/transfer/primaries with frame property 2 (unspec) and you want to make colorspace conversion, error will be raised. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#transfer property has value of 2&lt;br /&gt;
#primaries 709 (1)&lt;br /&gt;
#input yv12&lt;br /&gt;
z_convertformat(pixel_type=&amp;quot;rgbp&amp;quot;, colorspace_op=&amp;quot;auto:auto:709=&amp;gt;rgb:same:470bg&amp;quot;) # error raised&lt;br /&gt;
#z_convertformat(pixel_type=&amp;quot;rgbp&amp;quot;, colorspace_op=&amp;quot;auto:709:709=&amp;gt;rgb:709:470bg&amp;quot;) # ok&lt;br /&gt;
#z_convertformat(pixel_type=&amp;quot;rgbp&amp;quot;, colorspace_op=&amp;quot;auto:709:auto=&amp;gt;rgb:same:470bg&amp;quot;) # ok&lt;br /&gt;
#z_ConvertFormat(colorspace_op=&amp;quot;auto:auto=&amp;gt;same:470bg&amp;quot;) # error&lt;br /&gt;
#z_ConvertFormat(colorspace_op=&amp;quot;auto:auto:auto:auto=&amp;gt;same:same:same:f&amp;quot;) # ok&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Resizers===&lt;br /&gt;
z.lib compatibility wrappers with the same syntax as the [[Resize|built-in resizers]].&lt;br /&gt;
:{{Template:FuncDef|z_PointResize (clip, int target_width, int target_height, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|z_BilinearResize (clip, int target_width, int target_height, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|z_BicubicResize (clip, int target_width, int target_height, float &amp;quot;b&amp;quot;, float &amp;quot;c&amp;quot;, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|z_LanczosResize (clip, int target_width, int target_height, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, int &amp;quot;taps&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|z_Lanczos4Resize (clip, int target_width, int target_height, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, int &amp;quot;taps&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|z_Spline16Resize (clip, int target_width, int target_height, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|z_Spline36Resize (clip, int target_width, int target_height, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|z_Spline64Resize (clip, int target_width, int target_height, float &amp;quot;src_left&amp;quot;, float &amp;quot;src_top&amp;quot;, float &amp;quot;src_width&amp;quot;, float &amp;quot;src_height&amp;quot;, string &amp;quot;chromaloc_op&amp;quot;, string &amp;quot;dither&amp;quot;, bool &amp;quot;interlaced&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::A clip to process. All planar formats are supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2||int| }}&lt;br /&gt;
:::&amp;lt;code&amp;gt;target_width&amp;lt;/code&amp;gt;: the width of the output.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2||int| }}&lt;br /&gt;
:::&amp;lt;code&amp;gt;target_height&amp;lt;/code&amp;gt;: the height of the output.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|b|float|0.0}}&lt;br /&gt;
::{{Par2|c|float|0.5}}&lt;br /&gt;
:::Parameters for &amp;lt;code&amp;gt;z_BicubicResize&amp;lt;/code&amp;gt; only.&lt;br /&gt;
:::&amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt; can be used to tweak the filter’s behavior. For upscaling, it is recommended to use values that satisfy the equation &amp;lt;code&amp;gt;b + 2c = 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
:::Roughly speaking, raising B will cause blurring and raising C will cause ringing.&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=1.0, c=0.0&amp;lt;/code&amp;gt; : B-Spline&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=0.0, c=0.0&amp;lt;/code&amp;gt; : Hermite&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=1/3, c=1/3&amp;lt;/code&amp;gt; : Mitchell-Netravali cubic filter&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=0.0, c=0.5&amp;lt;/code&amp;gt; : Catmull-Rom spline (default)&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=0.0, c=0.75&amp;lt;/code&amp;gt; : VirtualDub's &amp;quot;Precise Bicubic&amp;quot;&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=0.0, c=1.0&amp;lt;/code&amp;gt; : Sharp Bicubic&lt;br /&gt;
:::Hermite is often considered one of the best choices for downscaling, as it produces only minimal artifacts, at the cost of slight blurriness.[https://guideencodemoe-mkdocs.readthedocs.io/encoding/resampling/#mitchell-netravali-bicubic]&lt;br /&gt;
:::B/C splines by Nicolas Robidoux:&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=0.3782, c=0.3109&amp;lt;/code&amp;gt; : Robidoux&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=0.2620, c=0.3690&amp;lt;/code&amp;gt; : RobidouxSharp&lt;br /&gt;
:::*&amp;lt;code&amp;gt;b=0.6796, c=0.1602&amp;lt;/code&amp;gt; : RobidouxSoft&lt;br /&gt;
:::Note: these numbers are rounded, exact values can be found [https://legacy.imagemagick.org/discourse-server/viewtopic.php?f=22&amp;amp;t=19823&amp;amp;start=30 here] and [https://github.com/mpv-player/mpv/issues/2637 here]&lt;br /&gt;
:::Didée's method to resize 1080p content to 720p: &amp;lt;code&amp;gt;b=-0.5, c=0.25&amp;lt;/code&amp;gt;  [https://forum.doom9.org/showthread.php?p=1579385#post1579385] [https://forum.doom9.org/showthread.php?p=1748922#post1748922]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|src_left|float|0.0}}&lt;br /&gt;
::: Cropping of the left edge.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|src_top|float|0.0}}&lt;br /&gt;
:::Cropping of the top edge.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|src_width|float|Source width}}&lt;br /&gt;
:::If &amp;gt; 0.0 it sets the width of the clip before resizing.&lt;br /&gt;
:::If &amp;lt;= 0.0 it sets the cropping of the right edges before resizing.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|src_height|float|Source height}}&lt;br /&gt;
:::If &amp;gt; 0.0 it sets the height of the clip before resizing.&lt;br /&gt;
:::If &amp;lt;= 0.0 it sets the cropping of the bottom edges before resizing&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|taps|int|3}}&lt;br /&gt;
:::Parameter for &amp;lt;code&amp;gt;z_LanczosResize&amp;lt;/code&amp;gt; only.&lt;br /&gt;
:::Controls the filter’s number of lobes, or taps. Increasing the number of lobes improves sharpness at the cost of increased ringing. &lt;br /&gt;
:::You might occasionally see the tap count appended to the filter name to clarify the exact filter used, e.g. Lanczos2 for 2 taps.&lt;br /&gt;
:::For downscaling, higher tap counts might help in suppressing [http://www.imagemagick.org/Usage/filter/#aliasing Moiré effects].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|chromaloc_op|string|&amp;lt;nowiki&amp;gt;&amp;quot;left=&amp;gt;left&amp;quot;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
:::Chroma location operation description.&lt;br /&gt;
:::Format is &amp;lt;code&amp;gt;&amp;quot;[locS]=&amp;gt;[locD]&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
::::Chroma location table, names in parenthesis are compatibility aliases:&lt;br /&gt;
::::* &amp;lt;code&amp;gt;&amp;quot;left&amp;quot; (&amp;quot;mpeg2&amp;quot;) | &amp;quot;center&amp;quot; (&amp;quot;jpeg&amp;quot; and &amp;quot;mpeg1&amp;quot;) | &amp;quot;top_left&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
:::Example JPEG to MPEG2: &amp;lt;code&amp;gt;&amp;quot;center=&amp;gt;left&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dither|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:::Dithering type: &amp;lt;code&amp;gt;&amp;quot;none&amp;quot; | &amp;quot;ordered&amp;quot; | &amp;quot;random&amp;quot; | &amp;quot;error_diffusion&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|interlaced|bool|false}}&lt;br /&gt;
:::Whether to use interlaced mode.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===YUV⟷RGB Conversion===&lt;br /&gt;
*'''HD YUV 4:2:0 Rec. 709 to 16-bit RGB:'''&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;) &lt;br /&gt;
 z_ConvertFormat(pixel_type=&amp;quot;RGBP16&amp;quot;, colorspace_op=&amp;quot;709:709:709:limited=&amp;gt;rgb:709:709:full&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''RGB to 8-bit YV12 (YUV 4:2:0 Rec. 709):'''&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;) &lt;br /&gt;
 ConvertToPlanarRGB() # omit if source is already planar RGB&lt;br /&gt;
 z_ConvertFormat(pixel_type=&amp;quot;YUV420P8&amp;quot;, colorspace_op=&amp;quot;rgb:709:709:full=&amp;gt;709:709:709:limited&amp;quot;)&lt;br /&gt;
Note: RGB input must be planar, use [[Convert|ConvertToPlanarRGB()]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Changing Colorimetry===&lt;br /&gt;
*'''SD NTSC Rec. 601 to HD Rec. 709'''&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;) # let's assume the source is a NTSC DVD clip&lt;br /&gt;
 z_ConvertFormat(colorspace_op=&amp;quot;470bg:601:170m:full=&amp;gt;709:709:709:full&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''SD PAL Rec. 601 to HD Rec. 709'''&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;) # let's assume the source is a PAL DVD clip&lt;br /&gt;
 z_ConvertFormat(colorspace_op=&amp;quot;470bg:601:470bg:full=&amp;gt;709:709:709:full&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''Rec. 709 SDR to Rec. 2020 SDR'''&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;) # let's assume the source is BT709 SDR&lt;br /&gt;
 z_ConvertFormat(colorspace_op=&amp;quot;709:709:709:full=&amp;gt;2020:2020:2020:full&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''Rec. 709 SDR to Rec. 2020 HLG HDR'''&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;) # let's assume the source is BT709 SDR&lt;br /&gt;
 z_ConvertFormat(colorspace_op=&amp;quot;709:709:709:full=&amp;gt;2020ncl:std-b67:2020:full&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''Rec. 2020 SDR to Rec. 709 SDR'''&lt;br /&gt;
 AviSource(&amp;quot;blah.avi&amp;quot;) # let's assume the source is BT2020 SDR&lt;br /&gt;
 z_ConvertFormat(colorspace_op=&amp;quot;2020:2020:2020:full=&amp;gt;709:709:709:full&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
* Note that the examples above use full=&amp;gt;full since it does not truncate the brightest and darkest pixels, as opposed to limited=&amp;gt;limited. [https://forum.doom9.org/showthread.php?p=1906754&amp;amp;highlight=full#post1906754]. &lt;br /&gt;
* To learn more about matrix, transfer, and primaries and its different names, see [https://forum.doom9.org/showthread.php?p=1897824#post1897824 this post on Doom9].&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Linear Light Downscaling===&lt;br /&gt;
In the following examples, the source is first converted to linear light RGB, then resized  and converted back to the original format.&amp;lt;br&amp;gt;&lt;br /&gt;
By default &amp;lt;code&amp;gt;approximate_gamma=true&amp;lt;/code&amp;gt;, you can set it to false but the speed decrease dramatically and it's probably not worth it.&amp;lt;br&amp;gt;&lt;br /&gt;
Also note that scaling in linear light could easily lead to increased/or even create haloing. The chance is very high when using spline36 as the resample filter [https://forum.doom9.org/showthread.php?p=1948138#post1948138]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''HD (Rec709) content:'''&lt;br /&gt;
 z_ConvertFormat(pixel_type=&amp;quot;RGBPS&amp;quot;, colorspace_op=&amp;quot;709:709:709:limited=&amp;gt;rgb:linear:709:full&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
 z_ConvertFormat(width=1280, height=720, pixel_type=&amp;quot;YUV420P16&amp;quot;, colorspace_op=&amp;quot;rgb:linear:709:full=&amp;gt;709:709:709:limited&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''SD NTSC content:'''&lt;br /&gt;
 z_ConvertFormat(pixel_type=&amp;quot;RGBPS&amp;quot;, colorspace_op=&amp;quot;470bg:601:170m:limited=&amp;gt;rgb:linear:170m:full&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
 z_ConvertFormat(width=320, height=240, pixel_type=&amp;quot;YUV420P16&amp;quot;, colorspace_op=&amp;quot;rgb:linear:170m:full=&amp;gt;470bg:601:170m:limited&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''SD PAL content:'''&lt;br /&gt;
 z_ConvertFormat(pixel_type=&amp;quot;RGBPS&amp;quot;, colorspace_op=&amp;quot;470bg:601:470bg:limited=&amp;gt;rgb:linear:470bg:full&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
 z_ConvertFormat(width=320, height=240, pixel_type=&amp;quot;YUV420P16&amp;quot;, colorspace_op=&amp;quot;rgb:linear:470bg:full=&amp;gt;470bg:601:470bg:limited&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''JPEG (e.g. pictures):'''&lt;br /&gt;
 z_ConvertFormat(pixel_type=&amp;quot;RGBPS&amp;quot;, colorspace_op=&amp;quot;601:601:470bg:full=&amp;gt;rgb:linear:470bg:full&amp;quot;, chromaloc_op=&amp;quot;center=&amp;gt;center&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
 z_ConvertFormat(width=480, height=360, pixel_type=&amp;quot;YUV420P16&amp;quot;, colorspace_op=&amp;quot;rgb:linear:470bg:full=&amp;gt;601:601:470bg:full&amp;quot;, chromaloc_op=&amp;quot;center=&amp;gt;center&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*'''RGB content:'''&lt;br /&gt;
 z_ConvertFormat(pixel_type=&amp;quot;RGBPS&amp;quot;, colorspace_op=&amp;quot;rgb:srgb:709:full=&amp;gt;rgb:linear:709:full&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
 z_ConvertFormat(width=1280, height=720, pixel_type=&amp;quot;RGBP16&amp;quot;, colorspace_op=&amp;quot;rgb:linear:709:full=&amp;gt;rgb:srgb:709:full&amp;quot;, resample_filter=&amp;quot;spline36&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version      Date            Changes&amp;lt;br&amp;gt;&lt;br /&gt;
 r26          2025/08/31      - ?&lt;br /&gt;
 r21          2023/02/15      - changes by [https://forum.doom9.org/showthread.php?p=1982991#post1982991 StvG]&lt;br /&gt;
                              - throw error if IsFieldBased()=true and interlaced=false/use_props=1;&lt;br /&gt;
                              - resizer wrappers: added parameter interlaced;&lt;br /&gt;
                              - changed behavior of interlaced=true - previously it force use_props=0; now it doesn't have effect when use_props=1.&amp;lt;BR&amp;gt;&lt;br /&gt;
 r20          2023/01/30      - changes by [https://forum.doom9.org/showthread.php?p=1982087#post1982087 StvG]&lt;br /&gt;
                              - not read &amp;quot;_FieldBased&amp;quot; frame prop when use_props=0;&lt;br /&gt;
                              - added ProPhotoRGB (TomArrow).&amp;lt;br&amp;gt;&lt;br /&gt;
 r19          2022/08/17      - changes by [https://forum.doom9.org/showthread.php?p=1973326#post1973326 StvG]&lt;br /&gt;
                              - fixed the behavior when missing frame property;&lt;br /&gt;
                              - the matrix between yuv&amp;lt;-&amp;gt;grey isn't silently changed anymore.&amp;lt;br&amp;gt;&lt;br /&gt;
 r18          2022/08/15      - changes by [https://forum.doom9.org/showthread.php?p=1973192#post1973192 StvG]&lt;br /&gt;
                              - fixed output frame properties when use_props=0 and colorspace_op/chromaloc_op not specified.&amp;lt;br&amp;gt;&lt;br /&gt;
 r17          2022/08/13      - changes by [https://forum.doom9.org/showthread.php?p=1973142#post1973142 StvG]&lt;br /&gt;
                              - use_props=-1 improved a bit more.&amp;lt;br&amp;gt;&lt;br /&gt;
 r16          2022/08/09      - changes by [https://forum.doom9.org/showthread.php?p=1972971#post1972971 StvG]&lt;br /&gt;
                              - improved use_props=-1;&lt;br /&gt;
                              - throw error when use_props=0 and _FieldBased/_Field &amp;gt; 0;&lt;br /&gt;
                              - added support for interlaced clips: when interlaced=true, always use_props=0. &amp;lt;br&amp;gt;&lt;br /&gt;
 r15          2022/08/06      - changes by [https://forum.doom9.org/showthread.php?p=1972716#post1972716 StvG]&lt;br /&gt;
                              - relaxed restrictions for use_props=0;&lt;br /&gt;
                              - added scene_referred parameter (default false).&amp;lt;br&amp;gt;&lt;br /&gt;
 r14          2022/04/18      - changes by [https://forum.doom9.org/showthread.php?p=1967682#post1967682 StvG]&lt;br /&gt;
                              - fixed regression (r12) when reading frame properties (use_props=3/4).&amp;lt;br&amp;gt;&lt;br /&gt;
 r13          2022/04/14      - changes by [https://forum.doom9.org/showthread.php?p=1967463#post1967463 StvG] &lt;br /&gt;
                              - zimg@dd4c4df;&lt;br /&gt;
                              - use_props= -1: If frame properties are supported - if every option of colorspace_op &lt;br /&gt;
                                and chromaloc_op (for src/dst colorspace with subsampling w/h &amp;gt; 0) are specified &lt;br /&gt;
                                and different than &amp;quot;auto&amp;quot;, 0, otherwise 1.&amp;lt;br&amp;gt;&lt;br /&gt;
 r12          2021/11/21      - changes by [https://forum.doom9.org/showthread.php?p=1957876#post1957876 StvG]&lt;br /&gt;
                              - changed use_props type from bool to int.&amp;lt;br&amp;gt;&lt;br /&gt;
 r11          2021/11/18      - changes by [https://forum.doom9.org/showthread.php?p=1957643#post1957643 StvG]&lt;br /&gt;
                              - added parameter use_props (whether to read and set frame properties)&lt;br /&gt;
                              - zimg 3.0.3.&amp;lt;br&amp;gt;&lt;br /&gt;
 r10          2021/08/12      - changes by [https://forum.doom9.org/showthread.php?p=1949669#post1949669 StvG]&lt;br /&gt;
                              - do not set matrix frame property when source matrix frame property is undef and color family is not changed&lt;br /&gt;
                              - zimg@bf73dbe.&amp;lt;br&amp;gt;&lt;br /&gt;
 r9           2021/06/30      - changes by [https://forum.doom9.org/showthread.php?p=1946523#post1946523 StvG]&lt;br /&gt;
                              - do not use the same color range for the destination when frame property available&lt;br /&gt;
                                and source/destination color family is different;&lt;br /&gt;
                              - set the correct color range frame property value for destination YUV 32-bit.&amp;lt;br&amp;gt;&lt;br /&gt;
 r8           2021/06/29      - changes by [https://forum.doom9.org/showthread.php?p=1946427#post1946427 StvG]&lt;br /&gt;
                              - changed MT mode to [[MT_MULTI_INSTANCE]]&amp;lt;br&amp;gt;&lt;br /&gt;
 r7           2021/06/23      - changes by [https://forum.doom9.org/showthread.php?p=1945780#post1945780 StvG]&lt;br /&gt;
                              - fixed frame properties reading.&amp;lt;br&amp;gt;&lt;br /&gt;
 r6           2021/05/31      - changes by [https://forum.doom9.org/showthread.php?p=1943908#post1943908 StvG]&lt;br /&gt;
                              - registered as MT_NICE_FILTER&lt;br /&gt;
                              - read frame properties from every frame (previously only from the first frame)&lt;br /&gt;
                              - zimg@8d0b839.&amp;lt;br&amp;gt;&lt;br /&gt;
 r5           2020/10/30      - changes by [https://forum.doom9.org/showthread.php?p=1927059#post1927059 StvG]&lt;br /&gt;
                              - use chromaloc frame property (when available) for the legacy resizers.&amp;lt;br&amp;gt;&lt;br /&gt;
 r4           2020/10/21      - changes by [https://forum.doom9.org/showthread.php?p=1926438#post1926438 StvG]&lt;br /&gt;
                              - fixed crashing when avs+ doesn't support frame properties;&lt;br /&gt;
                              - set _SARNum and _SARDen properties;&lt;br /&gt;
                              - read the input frame property _ChromaLocation if available;&lt;br /&gt;
                              - do not process clips with frame property _FiledBased &amp;gt; 0.&amp;lt;br&amp;gt;&lt;br /&gt;
 r3           2020/10/15      - changes by [https://forum.doom9.org/showthread.php?p=1925849#post1925849 StvG]&lt;br /&gt;
                              - removed parameter prefer_props;&lt;br /&gt;
                              - added keyword &amp;quot;auto&amp;quot; for source matrix, transfer, primaries, range. &lt;br /&gt;
                                When it's used the corresponding input frame properties are used, &lt;br /&gt;
                                if such frame properties don't exist either an error is raised or &lt;br /&gt;
                                default matrix and color range are used;&lt;br /&gt;
                              - added keyword &amp;quot;auto&amp;quot; for source chromaloc_op. &lt;br /&gt;
                                When it's used the corresponding input frame property is used, &lt;br /&gt;
                                if such frame property doesn't exist default chromaloc is used.&amp;lt;br&amp;gt;&lt;br /&gt;
 r2           2020/10/14      - changes by [https://forum.doom9.org/showthread.php?p=1925801#post1925801 StvG]&lt;br /&gt;
                              - added keyword 'same' for destination matrix, transfer, primaries, range, chromaloc_op.&lt;br /&gt;
                              - When it's used the source value (argument or frame property) is used for destination too.&amp;lt;br&amp;gt;&lt;br /&gt;
 r1g          2020/10/03      - changes by [https://forum.doom9.org/showthread.php?p=1924923#post1924923 StvG]&lt;br /&gt;
                              - added parameter prefer_props; read and set _ChromaLocation, _ColorRange, _Matrix, _Transfer, &lt;br /&gt;
                                _Primaries frame properties; added chromaloc_op parameters - bottom_left and bottom.&amp;lt;br&amp;gt;&lt;br /&gt;
 r1f          2020/08/25      - changes by [https://forum.doom9.org/showthread.php?p=1921975#post1921975 StvG]&lt;br /&gt;
                              - added @[https://forum.doom9.org/showthread.php?p=1920920#post1920920 Losko] patch, zimg v3.0.1, added support for frame properties.&amp;lt;br&amp;gt;&lt;br /&gt;
 r1e          2020/04/23      - changes by [https://forum.doom9.org/showthread.php?p=1908845#post1908845 StvG]&lt;br /&gt;
                              - update to zimg@8815111;&lt;br /&gt;
                              - z_ConvertFormat: added pixel type RGBP8, RGBAP8, YUV444, YUV444P8, YUVA444P8, YUV422, &lt;br /&gt;
                                YUV422P8, YUVA422P8, YUV420, YUV420P8 , YUVA420P8, YUV411, YUV411P8&lt;br /&gt;
                              - added version.&amp;lt;br&amp;gt;&lt;br /&gt;
              2020/04/08      - changes by [https://forum.doom9.org/showthread.php?p=1906771#post1906771 StvG]&lt;br /&gt;
                              - update to zimg@5896a26&lt;br /&gt;
                              - z_ConvertFormat: add &amp;quot;cpu_type&amp;quot;, &amp;quot;nominal_luminance&amp;quot;, and &amp;quot;approximate_gamma&amp;quot; parameters&lt;br /&gt;
                              - z_ConvertFormat: remove &amp;quot;gauss&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, and &amp;quot;sinc&amp;quot; compatibility aliases&lt;br /&gt;
                              - z_ConvertFormat: remove &amp;quot;dv&amp;quot; compatibility alias from chromaloc_op&lt;br /&gt;
                              - resizers: add &amp;quot;chromaloc_op&amp;quot; and &amp;quot;dither&amp;quot; parameters&lt;br /&gt;
                              - resizers: remove z_BlackmanResize(), z_GaussResize(), &lt;br /&gt;
                                and z_SincResize() compatibility aliases.&amp;lt;br&amp;gt;&lt;br /&gt;
 r1d          2018/03/21      - ...............&amp;lt;br&amp;gt;&lt;br /&gt;
 r1           2016/10/29      - initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;400px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!r26&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=2022249#post2022249 avsresize_r26.7z]&lt;br /&gt;
|[https://codeberg.org/StvG/avsresize/releases avsresize_r26.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r21&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1982991#post1982991 avsresize_r21.7z]&lt;br /&gt;
|[https://web.archive.org/web/20230215081928if_/https://files.videohelp.com/u/223002/avsresize_r21.7z avsresize_r21.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r20&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1982087#post1982087 avsresize_r20.7z]&lt;br /&gt;
|[https://web.archive.org/web/20230130075804if_/https://files.videohelp.com/u/223002/avsresize_r20.7z avsresize_r20.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r19&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1973326#post1973326 avsresize_r19.7z]&lt;br /&gt;
|[https://web.archive.org/web/20220818022554if_/https://files.videohelp.com/u/223002/avsresize_r19.7z avsresize_r19.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r18&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1973192#post1973192 avsresize_r18.7z]&lt;br /&gt;
|[https://web.archive.org/web/20220815000722if_/https://files.videohelp.com/u/223002/avsresize_r18.7z avsresize_r18.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r17&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1973142#post1973142 avsresize_r17.7z]&lt;br /&gt;
|[https://web.archive.org/web/20220813203417if_/https://files.videohelp.com/u/223002/avsresize_r17.7z avsresize_r17.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r16&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1972971#post1972971 avsresize_r16.7z]&lt;br /&gt;
|[https://web.archive.org/web/20220810145814if_/https://files.videohelp.com/u/223002/avsresize_r16.7z avsresize_r16.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r15&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1972716#post1972716 avsresize_r15.7z]&lt;br /&gt;
|[https://web.archive.org/web/20220806144931if_/https://files.videohelp.com/u/223002/avsresize_r15.7z avsresize_r15.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r14&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1967682#post1967682 avsresize_r14.7z]&lt;br /&gt;
|[https://web.archive.org/web/20220419113153if_/https://files.videohelp.com/u/223002/avsresize_r14.7z avsresize_r14.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r13&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1967463#post1967463 avsresize_r13.7z]&lt;br /&gt;
|[https://web.archive.org/web/20220415100326if_/https://files.videohelp.com/u/223002/avsresize_r13.7z avsresize_r13.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r12&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1957876#post1957876 avsresize_r12.7z]&lt;br /&gt;
|[https://web.archive.org/web/20211121225346if_/https://files.videohelp.com/u/223002/avsresize_r12.7z avsresize_r12.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r11&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1957643#post1957643 avsresize_r11.7z]&lt;br /&gt;
|[https://web.archive.org/web/20211118222533if_/https://files.videohelp.com/u/223002/avsresize_r11.7z avsresize_r11.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r10&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1949669#post1949669 avsresize_r10.7z]&lt;br /&gt;
|[https://web.archive.org/web/20210813212341if_/https://files.videohelp.com/u/223002/avsresize_r10.7z avsresize_r10.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r9&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1946523#post1946523 avsresize_r9.7z]&lt;br /&gt;
|[https://web.archive.org/web/20210721045904if_/https://files.videohelp.com/u/223002/avsresize_r9.7z avsresize_r9.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r8&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1946427#post1946427 avsresize_r8.7z]&lt;br /&gt;
|[https://web.archive.org/web/20210721050245if_/https://files.videohelp.com/u/223002/avsresize_r8.7z avsresize_r8.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r7&lt;br /&gt;
|[https://forum.doom9.org/showpost.php?p=1945780&amp;amp;postcount=163 avsresize_r7.7z]&lt;br /&gt;
|[https://web.archive.org/web/20210625201951if_/https://files.videohelp.com/u/223002/avsresize_r7.7z avsresize_r7.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r6&lt;br /&gt;
|[https://cloud.owncube.com/s/KfAcEpqkMPSdagr/download avsresize_r6.7z]&lt;br /&gt;
|[https://web.archive.org/web/20210606012435if_/https://files.videohelp.com/u/223002/avsresize_r6.7z avsresize_r6.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r5&lt;br /&gt;
|[https://cloud.owncube.com/s/Zq6iPjyYGcTLAT8/download avsresize_r5.7z]&lt;br /&gt;
|[https://web.archive.org/web/20201101042308if_/https://files.videohelp.com/u/223002/avsresize_r5.7z avsresize_r5.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r4&lt;br /&gt;
|[https://cloud.owncube.com/s/ScA6xEADaHLiAFd/download avsresize_r4.7z]&lt;br /&gt;
|[https://web.archive.org/web/20201023043116if_/https://files.videohelp.com/u/223002/avsresize_r4.7z avsresize_r4.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r3&lt;br /&gt;
|[https://cloud.owncube.com/s/f6rQEcCLA95jZMN/download avsresize_r3.7z]&lt;br /&gt;
|[https://web.archive.org/web/20201016173250if_/https://files.videohelp.com/u/223002/avsresize_r3.7z avsresize_r3.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r2&lt;br /&gt;
|[https://cloud.owncube.com/s/jfDf8rERkxEFTqW/download avsresize_r2.7z]&lt;br /&gt;
|[https://web.archive.org/web/20201014204436if_/https://files.videohelp.com/u/223002/avsresize_r2.7z avsresize_r2.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r1g&lt;br /&gt;
|[https://cloud.owncube.com/s/rqiwDJT7dncATgr/download avsresize_r1g.7z]&lt;br /&gt;
|[https://web.archive.org/web/20201004164145if_/https://files.videohelp.com/u/223002/avsresize_r1g.7z avsresize_r1g.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r1f&lt;br /&gt;
|[https://cloud.owncube.com/s/XCLyRtnysGXY92c/download avsresize_r1f.7z]&lt;br /&gt;
|[https://web.archive.org/web/20200829234447if_/https://files.videohelp.com/u/223002/avsresize_r1f.7z avsresize_r1f.7z]&lt;br /&gt;
|-&lt;br /&gt;
!r1e&lt;br /&gt;
|[https://cloud.owncube.com/s/a2Jg7j4ojEKkYoD avsresize_r1e.7z]&lt;br /&gt;
|[https://web.archive.org/web/20200520165136if_/https://files.videohelp.com/u/223002/avsresize_r1e.7z avsresize_r1e.7z]&lt;br /&gt;
|-&lt;br /&gt;
!2020/04/08&lt;br /&gt;
|[https://cloud.owncube.com/s/DjHxaH7YdEieY3s avsresize.7z]&lt;br /&gt;
|[https://web.archive.org/web/20200605163637if_/https://files.videohelp.com/u/223002/avsresize_20200408.7z avsresize_20200408.7z] &amp;lt;!--[https://web.archive.org/web/20200420201434if_/http://s000.tinyupload.com/download.php?file_id=49834445125252781062&amp;amp;t=4983444512525278106230636 avsresize_20200408.7z]--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!r1d&lt;br /&gt;
|[https://web.archive.org/web/20200605163506if_/https://files.videohelp.com/u/223002/avsresize-r1d.7z avsresize-r1d.7z]&lt;br /&gt;
|[https://web.archive.org/web/20200420200859if_/http://s000.tinyupload.com/download.php?file_id=84753125388772791779&amp;amp;t=8475312538877279177900406 avsresize-r1d.7z]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[https://forum.doom9.org/showthread.php?t=175428 Doom9 Forum] - 8bit or greater (AviSynth+) linear/gamma light aware resizing?&lt;br /&gt;
*[https://forum.doom9.org/showthread.php?t=176773 Doom9 Forum] - HDRTools vs DitherTools vs ColorMatrix &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#Resizers|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/AssRender</id>
		<title>AssRender</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/AssRender"/>
				<updated>2026-01-28T14:27:29Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: New version 0.36&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Subtitling|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1=pinterf, vadosnaprimer, Blitzker, pingplug, lachs0r, TheFluff, Seiya&lt;br /&gt;
|2=v0.36&lt;br /&gt;
|3=[https://github.com/pinterf/assrender/releases/ assrender-0.36.7z]&lt;br /&gt;
|4=Subtitling&lt;br /&gt;
|5=Source code is MIT license, binaries are GPL&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=148926 Doom9 Thread]}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
AssRender is an AviSynth plugin that renders ASS/SSA and SRT (without the HTML-like markup) subtitles. It uses libass to render the subtitles.&lt;br /&gt;
&lt;br /&gt;
This also means that it is much more picky about script syntax than VSFilter and friends, so keep that in mind before blaming the filter. Yes, people have reported a lot of errors that were actually the script author’s fault and libass vs VSFilter compatibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Note:'''&amp;lt;/span&amp;gt; AssRender is a C-plugin so on Avisynth 3.6 it must be loaded using [[Plugins#LoadCPlugin|LoadCPlugin]]. AviSynth+ has no special treatment. It loads C-plugins similarly to C++.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]] &lt;br /&gt;
* Supported color formats: [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
** AviSynth+: all [[planar]] formats (8/10/12/14/16bit, Y/YUV/RGB with or without alpha) are supported. [[RGB48]] and [[RGB64]] are also supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Being a C plugin, minimum required Avisynth+ version varies on which Avisynth version's .LIB was it linked with. v0.36 may require at least Aviysnth 3.7.5.&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|assrender (clip, string file, string &amp;quot;vfr&amp;quot;, int &amp;quot;hinting&amp;quot;, float &amp;quot;scale&amp;quot;, float &amp;quot;line_spacing&amp;quot;, float &amp;quot;dar&amp;quot;, float &amp;quot;sar&amp;quot;, int &amp;quot;top&amp;quot;, int &amp;quot;bottom&amp;quot;, int &amp;quot;left&amp;quot;, int &amp;quot;right&amp;quot;, string &amp;quot;charset&amp;quot;, int &amp;quot;debuglevel&amp;quot;, string &amp;quot;fontdir&amp;quot;, string &amp;quot;srt_font&amp;quot;, string &amp;quot;colorspace&amp;quot;) }}&lt;br /&gt;
&lt;br /&gt;
v0.36:&lt;br /&gt;
:{{Template:FuncDef|assrender (clip, string file, string &amp;quot;vfr&amp;quot;, int &amp;quot;hinting&amp;quot;, float &amp;quot;scale&amp;quot;, float &amp;quot;line_spacing&amp;quot;, int frame_width, int frame_height, bool set_default_storage_size, float &amp;quot;dar&amp;quot;, float &amp;quot;sar&amp;quot;, int &amp;quot;top&amp;quot;, int &amp;quot;bottom&amp;quot;, int &amp;quot;left&amp;quot;, int &amp;quot;right&amp;quot;, string &amp;quot;charset&amp;quot;, int &amp;quot;debuglevel&amp;quot;, string &amp;quot;fontdir&amp;quot;, string &amp;quot;srt_font&amp;quot;, string &amp;quot;colorspace&amp;quot;) }}&lt;br /&gt;
&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||string|}}&lt;br /&gt;
:::Your subtitle file. May be ASS, SSA or SRT.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|vfr|string| }}&lt;br /&gt;
:::Specify timecodes v1 or v2 file when working with VFRaC.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|hinting|int|0}}&lt;br /&gt;
:::Font hinting mode. Choose between: &lt;br /&gt;
:::*none (0, default), light (1), normal (2) and Freetype native (3) autohinting.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|scale|float|1.0}}&lt;br /&gt;
:::Font scale. Defaults to 1.0.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|line_spacing|float|1.0}}&lt;br /&gt;
:::Line spacing in pixels. Defaults to 1.0 and won’t be scaled with frame size. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|frame_width|int|}}&lt;br /&gt;
::{{Par2|frame_height|int|}}&lt;br /&gt;
:::Actual displayed size, provide more information than dar &amp;amp; sar. Of course you need to set both parameters.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|set_default_storage_size|bool|True}}&lt;br /&gt;
:::Whether to render ASS according to storage size, default is True. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dar|float| }}&lt;br /&gt;
::{{Par2|sar|float| }}&lt;br /&gt;
:::Aspect ratio. Of course you need to set both parameters. Less priority than frame_width &amp;amp; frame_height.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|top|int|0}}&lt;br /&gt;
::{{Par2|bottom|int|0}}&lt;br /&gt;
::{{Par2|left|int|0}}&lt;br /&gt;
::{{Par2|right|int|0}}&lt;br /&gt;
:::Margins. They will be added to the frame size and may be negative.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|charset|string|&amp;quot;UTF-8&amp;quot;}}&lt;br /&gt;
:::Character set to use, in GNU iconv or enca format. Defaults to UTF-8.&lt;br /&gt;
:::Example enca format: enca:pl:cp1250 (guess the encoding for Polish, fall back on cp1250)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debuglevel|int|0}}&lt;br /&gt;
:::How much crap assrender is supposed to spam to stderr.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|fontdir|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::Additional font directory.&lt;br /&gt;
:::Useful if you are lazy but want to keep your system fonts clean.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|srt_font|string|&amp;quot;Sans&amp;quot;}}&lt;br /&gt;
:::Font to use for SRT subtitles. Defaults to whatever Fontconfig chooses for “Sans”.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|colorspace|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::The color space of your (YUV) video. Possible values:&lt;br /&gt;
:::* &amp;quot;Rec2020&amp;quot;, &amp;quot;BT.2020&amp;quot;&lt;br /&gt;
:::* &amp;quot;Rec709&amp;quot;, &amp;quot;BT.709&amp;quot;&lt;br /&gt;
:::* &amp;quot;Rec601&amp;quot;, &amp;quot;BT.601&amp;quot;&lt;br /&gt;
:::* &amp;quot;PC.709&amp;quot;&lt;br /&gt;
:::* &amp;quot;PC.601&amp;quot;&lt;br /&gt;
:::* &amp;quot;TV.fcc&amp;quot;, &amp;quot;PC.fcc&amp;quot;&lt;br /&gt;
:::* &amp;quot;TV.240m&amp;quot;, &amp;quot;PC.240m&amp;quot;&lt;br /&gt;
:::* &amp;quot;none&amp;quot;, &amp;quot;guess&amp;quot;&lt;br /&gt;
:::Default is to use the ASS script's &amp;quot;YCbCr Matrix&amp;quot; or &amp;quot;Video Colorspace&amp;quot; property.&lt;br /&gt;
:::Recognized .ASS properties: &amp;quot;TV.601&amp;quot; &amp;quot;TV.709&amp;quot;, &amp;quot;PC.601&amp;quot; &amp;quot;PC.709&amp;quot; &amp;quot;TV.240m&amp;quot; &amp;quot;PC.240m&amp;quot; &amp;quot;TV.fcc&amp;quot; &amp;quot;PC.fcc&amp;quot; and &amp;quot;none&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:::&amp;quot;none&amp;quot; and &amp;quot;guess&amp;quot; decides upon on video resolution: width &amp;gt; 1280 or height &amp;gt; 576 → BT.709, else → BT.601. When no hint found in ASS script and 'colorspace' parameter is empty then the default is BT.601.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 AssRender(&amp;quot;subtitles.ass&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2026-01-22 - seiya-git, pinterf&lt;br /&gt;
     * Version 0.36:&lt;br /&gt;
        - Binaries using AviSynth 3.7.5's lib, VS2022 MSVC 14.38 toolset&lt;br /&gt;
        - Update build instructions&lt;br /&gt;
        - Fix hinting&lt;br /&gt;
        - Fix ass_set_storage_size not be called&lt;br /&gt;
        - Switch submodule build system to meson&lt;br /&gt;
        - Update avisynth(plus) headers to v12&lt;br /&gt;
        - Update libass to 0.17.4&lt;br /&gt;
        - Unicode-safe file reading&lt;br /&gt;
        - Add frame size parameters&lt;br /&gt;
        - Add set_default_storage_size boolean&lt;br /&gt;
        - Use frame properties if they available for &amp;quot;YCbCr Matrix: None&amp;quot;&lt;br /&gt;
        - Work with frame copy instead of just modifying it&lt;br /&gt;
&lt;br /&gt;
2021-03-04 - pinterf&lt;br /&gt;
     * Version 0.35:&lt;br /&gt;
        - Windows MSVC: Update to libass v0.15 (git submodule update --init --recursive --remote)&lt;br /&gt;
          For changes since v0.14 see https://github.com/libass/libass/blob/master/Changelog&lt;br /&gt;
        - don't guess base on video resolution (realfinder)&lt;br /&gt;
          if .ass file has no Matrix info then it should be treated as it &amp;quot;Rec601&amp;quot; to maintain compatibility&lt;br /&gt;
        - Parameter 'colorspace' default value is no longer &amp;quot;guess&amp;quot;&lt;br /&gt;
        - Add more color options: PC.709, PC.601, TV.fcc, PC.fcc, TV.240m, PC.240m, none.&lt;br /&gt;
          &amp;quot;none&amp;quot; and &amp;quot;guess&amp;quot; implies &amp;quot;guess-by-resolution&amp;quot;.&lt;br /&gt;
        - Fix: possible crash on initializing phase (buffer overread, linux crashed, Windows was just lucky)&lt;br /&gt;
&lt;br /&gt;
2021-03-01 - pinterf&lt;br /&gt;
     * Version 0.34:&lt;br /&gt;
        - Fix the fix: revert matrix change made in 0.33&lt;br /&gt;
        - Fix: Check matrix from .ASS file &amp;quot;YCbCr Matrix:&amp;quot; section besides &amp;quot;Video Colorspace:&amp;quot;&lt;br /&gt;
          Recognized values are &amp;quot;tv.601&amp;quot; and &amp;quot;tv.709&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2021-02-28 - pinterf&lt;br /&gt;
     * Version 0.33:&lt;br /&gt;
        - Fix: wrong Bt.709 matrix (it wasn't :) )&lt;br /&gt;
&lt;br /&gt;
2021-02-27 - pinterf&lt;br /&gt;
     * Version 0.32:&lt;br /&gt;
        - Fix: treat I420 variant as YV12 instead of unsupported color space&lt;br /&gt;
&lt;br /&gt;
2021-02-18 - pinterf&lt;br /&gt;
     * Version 0.31:&lt;br /&gt;
        - Fix colors for planar RGB&lt;br /&gt;
        - code: hidden ifdef FOR_AVISYNTH_26_ONLY for Avisynth 2.6-only build&lt;br /&gt;
&lt;br /&gt;
2021-02-17 - pinterf&lt;br /&gt;
     * Version 0.30:&lt;br /&gt;
        - 10-16 bit support (including RGB48 and RGB64)&lt;br /&gt;
        - YV411, Planar RGB support&lt;br /&gt;
&lt;br /&gt;
2021-02-16 - pinterf&lt;br /&gt;
     * Version 0.29:&lt;br /&gt;
        - project moved to https://github.com/pinterf/assrender from https://github.com/vadosnaprimer/assrender&lt;br /&gt;
        - Move to Visual Studio 2019 - v142 platform toolset&lt;br /&gt;
        - Add .def module definition file for Avisynth 2.6 std compatibility (function name mangling)&lt;br /&gt;
        - Update Avisynth C headers&lt;br /&gt;
        - Check Linux and gcc-MinGW CMake build&lt;br /&gt;
        - Add build instructions and change log to README&lt;br /&gt;
&lt;br /&gt;
2019-01-14 - vadosnaprimer&lt;br /&gt;
        - https://github.com/vadosnaprimer/assrender/&lt;br /&gt;
        - add batch that lets not to change deps sdk and vs version copied from SMP libass&lt;br /&gt;
        - update SMP submodules&lt;br /&gt;
&lt;br /&gt;
2016-10-18 - Blitzker&lt;br /&gt;
        - https://github.com/Blitzker/assrender&lt;br /&gt;
        - Visual Studio 2015 support&lt;br /&gt;
&lt;br /&gt;
2012-04-20 - lachs0r &lt;br /&gt;
    * Version 0.25:&lt;br /&gt;
        - code restructured&lt;br /&gt;
        - added support for the BT.709 color space and the “Video Colorspace”&lt;br /&gt;
          property that has been introduced with recent versions of Aegisub.&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated everything, switched to MinGW-w64&lt;br /&gt;
              (same toolchain as mplayer2 now)&lt;br /&gt;
&lt;br /&gt;
2011-09-22 - lachs0r &lt;br /&gt;
    * Version 0.24.1:&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD&lt;br /&gt;
            - switched Harfbuzz to libass’ compatibility branch&lt;br /&gt;
            - compiled Harfbuzz without Uniscribe backend&lt;br /&gt;
              fixes lots of crashes and misbehavior&lt;br /&gt;
&lt;br /&gt;
2011-07-29 - lachs0r&lt;br /&gt;
    * Version 0.24:&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD:&lt;br /&gt;
                - fixed performance regression&lt;br /&gt;
&lt;br /&gt;
2011-07-29 - lachs0r&lt;br /&gt;
    * Version 0.23:&lt;br /&gt;
        - disabled font hinting by default&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD and included Harfbuzz:&lt;br /&gt;
                - added support for bidirectional text, Arabic shaping etc.&lt;br /&gt;
                - added proper support for @fonts (vertical writing)&lt;br /&gt;
                - slight performance regression&lt;br /&gt;
                  (glyph cache not hooked up with Harfbuzz yet)&lt;br /&gt;
            - updated FreeType to current git HEAD:&lt;br /&gt;
                - fixed outline stroker for some broken fonts&lt;br /&gt;
&lt;br /&gt;
2011-06-16 - lachs0r&lt;br /&gt;
    * Version 0.22:&lt;br /&gt;
        - fixed hang when a glyph with zero dimensions was encountered&lt;br /&gt;
          (mostly vector clips)&lt;br /&gt;
&lt;br /&gt;
2011-06-08 - lachs0r &amp;lt;lachs0r@srsfckn.biz&amp;gt;&lt;br /&gt;
    * Version 0.21:&lt;br /&gt;
        - finally implemented proper subsampling for YV12&lt;br /&gt;
        - temporarily removed YV16 support&lt;br /&gt;
        - renamed parameter verbosity → debuglevel&lt;br /&gt;
        - code cleanups&lt;br /&gt;
        binary:&lt;br /&gt;
            - reverted to GCC 4.5.2 (4.6 miscompiles MinGW)&lt;br /&gt;
&lt;br /&gt;
2011-06-01 - lachs0r&lt;br /&gt;
    * Version 0.20:&lt;br /&gt;
        - fixed the masksub stuff&lt;br /&gt;
        - properly output debug messages to stderr instead of stdout&lt;br /&gt;
        - reformatted source and corrected/removed some comments&lt;br /&gt;
        - modified CMakeLists.txt to strip the binary by default&lt;br /&gt;
        binary:&lt;br /&gt;
            - now built with GCC 4.6 instead of 4.5.2&lt;br /&gt;
            - included enca again&lt;br /&gt;
            - patched fontconfig:&lt;br /&gt;
                - prettier debug output&lt;br /&gt;
                - use the correct location for its cache&lt;br /&gt;
&lt;br /&gt;
2011-02-01 - lachs0r&lt;br /&gt;
    * Version 0.19:&lt;br /&gt;
        This is a bugfix/cleanup release.&lt;br /&gt;
        - fixed possible buffer overflows in timecodesv1 and SRT parsing&lt;br /&gt;
        - fixed random crashes on unloading&lt;br /&gt;
        - probably fixed compilation with MSVC (patch by TheFluff)&lt;br /&gt;
        - very slightly improved performance with GCC&lt;br /&gt;
        - various code cleanups&lt;br /&gt;
&lt;br /&gt;
2011-01-25 - lachs0r&lt;br /&gt;
    * Version 0.18:&lt;br /&gt;
        - improved YV12 support (should be somewhat usable now)&lt;br /&gt;
        - added support for RGB24, YV24, YV16 and Y8 (YUY2 coming soon)&lt;br /&gt;
        - added SRT subtitle format support&lt;br /&gt;
            additional parameter: srt_font (font to use for srt subs)&lt;br /&gt;
        - exposed some libass parameters:&lt;br /&gt;
            line_spacing (line spacing)&lt;br /&gt;
            dar, sar (aspect ratio)&lt;br /&gt;
            top, bottom, left, right (margins)&lt;br /&gt;
            fontdir (additional font directory)&lt;br /&gt;
        - masksub equivalent if used on a blankclip&lt;br /&gt;
            (still buggy - read source for details)&lt;br /&gt;
        - no more global variables&lt;br /&gt;
&lt;br /&gt;
2011-01-17 - lachs0r &lt;br /&gt;
    * Version 0.17:&lt;br /&gt;
        - added rudimentary YV12 support (chroma subsampling still needs work)&lt;br /&gt;
        - binary: Previously, I linked against a very old avisynth_c.lib - now&lt;br /&gt;
                  you shouldn’t get any error messages about “avisynth_c.dll”&lt;br /&gt;
        - tidied up the RGB32 blitter a bit&lt;br /&gt;
&lt;br /&gt;
2011-01-16 - lachs0r&lt;br /&gt;
    * Version 0.15:&lt;br /&gt;
        - reimplemented as AviSynth C plugin - this fixed several crashes and&lt;br /&gt;
          got rid of the major pain in the ass that is MSVC&lt;br /&gt;
        - binary: built with patched Fontconfig (no longer needs fonts.conf)&lt;br /&gt;
    * Version 0.16:&lt;br /&gt;
        - implemented VFRaC support via timecodes files (v1 and v2 supported)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v0.25&lt;br /&gt;
|[http://srsfckn.biz/assrender/assrender-0.25.7z assrender-0.25.7z]&lt;br /&gt;
|[https://web.archive.org/web/20180118024447if_/http://srsfckn.biz/assrender/assrender-0.25.7z assrender-0.25.7z]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--[http://encodan.srsfckn.biz/assrender/ C Plugin] - dead link ---&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[http://github.com/pinterf/assrender GitHub] - Updated version (v0.30+) &lt;br /&gt;
*[http://github.com/pingplug/assrender GitHub] - Updated version (v0.28), only source code available. &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#Subtitling|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/AssRender</id>
		<title>AssRender</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/AssRender"/>
				<updated>2026-01-28T14:22:12Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Syntax and Parameters */  add frame_width, frame_height, set_default_storage_size&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Subtitling|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1=pinterf, vadosnaprimer, Blitzker, pingplug, lachs0r, TheFluff&lt;br /&gt;
|2=v0.35&lt;br /&gt;
|3=[https://github.com/pinterf/assrender/releases/ assrender-0.35.7z]&lt;br /&gt;
|4=Subtitling&lt;br /&gt;
|5=Source code is MIT license, binaries are GPL&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=148926 Doom9 Thread]}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
AssRender is an AviSynth plugin that renders ASS/SSA and SRT (without the HTML-like markup) subtitles. It uses libass to render the subtitles.&lt;br /&gt;
&lt;br /&gt;
This also means that it is much more picky about script syntax than VSFilter and friends, so keep that in mind before blaming the filter. Yes, people have reported a lot of errors that were actually the script author’s fault and libass vs VSFilter compatibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Note:'''&amp;lt;/span&amp;gt; AssRender is a C-plugin so it must be loaded using [[Plugins#LoadCPlugin|LoadCPlugin]], except if you're using AviSynth+, it allows autoloading of C-plugins.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]] &lt;br /&gt;
* Supported color formats: [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
** AviSynth+: all [[planar]] formats (8/10/12/14/16bit, Y/YUV/RGB with or without alpha) are supported. [[RGB48]] and [[RGB64]] are also supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|assrender (clip, string file, string &amp;quot;vfr&amp;quot;, int &amp;quot;hinting&amp;quot;, float &amp;quot;scale&amp;quot;, float &amp;quot;line_spacing&amp;quot;, float &amp;quot;dar&amp;quot;, float &amp;quot;sar&amp;quot;, int &amp;quot;top&amp;quot;, int &amp;quot;bottom&amp;quot;, int &amp;quot;left&amp;quot;, int &amp;quot;right&amp;quot;, string &amp;quot;charset&amp;quot;, int &amp;quot;debuglevel&amp;quot;, string &amp;quot;fontdir&amp;quot;, string &amp;quot;srt_font&amp;quot;, string &amp;quot;colorspace&amp;quot;) }}&lt;br /&gt;
&lt;br /&gt;
v0.36:&lt;br /&gt;
:{{Template:FuncDef|assrender (clip, string file, string &amp;quot;vfr&amp;quot;, int &amp;quot;hinting&amp;quot;, float &amp;quot;scale&amp;quot;, float &amp;quot;line_spacing&amp;quot;, int frame_width, int frame_height, bool set_default_storage_size, float &amp;quot;dar&amp;quot;, float &amp;quot;sar&amp;quot;, int &amp;quot;top&amp;quot;, int &amp;quot;bottom&amp;quot;, int &amp;quot;left&amp;quot;, int &amp;quot;right&amp;quot;, string &amp;quot;charset&amp;quot;, int &amp;quot;debuglevel&amp;quot;, string &amp;quot;fontdir&amp;quot;, string &amp;quot;srt_font&amp;quot;, string &amp;quot;colorspace&amp;quot;) }}&lt;br /&gt;
&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||string|}}&lt;br /&gt;
:::Your subtitle file. May be ASS, SSA or SRT.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|vfr|string| }}&lt;br /&gt;
:::Specify timecodes v1 or v2 file when working with VFRaC.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|hinting|int|0}}&lt;br /&gt;
:::Font hinting mode. Choose between: &lt;br /&gt;
:::*none (0, default), light (1), normal (2) and Freetype native (3) autohinting.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|scale|float|1.0}}&lt;br /&gt;
:::Font scale. Defaults to 1.0.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|line_spacing|float|1.0}}&lt;br /&gt;
:::Line spacing in pixels. Defaults to 1.0 and won’t be scaled with frame size. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|frame_width|int|}}&lt;br /&gt;
::{{Par2|frame_height|int|}}&lt;br /&gt;
:::Actual displayed size, provide more information than dar &amp;amp; sar. Of course you need to set both parameters.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|set_default_storage_size|bool|True}}&lt;br /&gt;
:::Whether to render ASS according to storage size, default is True. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dar|float| }}&lt;br /&gt;
::{{Par2|sar|float| }}&lt;br /&gt;
:::Aspect ratio. Of course you need to set both parameters. Less priority than frame_width &amp;amp; frame_height.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|top|int|0}}&lt;br /&gt;
::{{Par2|bottom|int|0}}&lt;br /&gt;
::{{Par2|left|int|0}}&lt;br /&gt;
::{{Par2|right|int|0}}&lt;br /&gt;
:::Margins. They will be added to the frame size and may be negative.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|charset|string|&amp;quot;UTF-8&amp;quot;}}&lt;br /&gt;
:::Character set to use, in GNU iconv or enca format. Defaults to UTF-8.&lt;br /&gt;
:::Example enca format: enca:pl:cp1250 (guess the encoding for Polish, fall back on cp1250)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debuglevel|int|0}}&lt;br /&gt;
:::How much crap assrender is supposed to spam to stderr.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|fontdir|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::Additional font directory.&lt;br /&gt;
:::Useful if you are lazy but want to keep your system fonts clean.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|srt_font|string|&amp;quot;Sans&amp;quot;}}&lt;br /&gt;
:::Font to use for SRT subtitles. Defaults to whatever Fontconfig chooses for “Sans”.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|colorspace|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::The color space of your (YUV) video. Possible values:&lt;br /&gt;
:::* &amp;quot;Rec2020&amp;quot;, &amp;quot;BT.2020&amp;quot;&lt;br /&gt;
:::* &amp;quot;Rec709&amp;quot;, &amp;quot;BT.709&amp;quot;&lt;br /&gt;
:::* &amp;quot;Rec601&amp;quot;, &amp;quot;BT.601&amp;quot;&lt;br /&gt;
:::* &amp;quot;PC.709&amp;quot;&lt;br /&gt;
:::* &amp;quot;PC.601&amp;quot;&lt;br /&gt;
:::* &amp;quot;TV.fcc&amp;quot;, &amp;quot;PC.fcc&amp;quot;&lt;br /&gt;
:::* &amp;quot;TV.240m&amp;quot;, &amp;quot;PC.240m&amp;quot;&lt;br /&gt;
:::* &amp;quot;none&amp;quot;, &amp;quot;guess&amp;quot;&lt;br /&gt;
:::Default is to use the ASS script's &amp;quot;YCbCr Matrix&amp;quot; or &amp;quot;Video Colorspace&amp;quot; property.&lt;br /&gt;
:::Recognized .ASS properties: &amp;quot;TV.601&amp;quot; &amp;quot;TV.709&amp;quot;, &amp;quot;PC.601&amp;quot; &amp;quot;PC.709&amp;quot; &amp;quot;TV.240m&amp;quot; &amp;quot;PC.240m&amp;quot; &amp;quot;TV.fcc&amp;quot; &amp;quot;PC.fcc&amp;quot; and &amp;quot;none&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:::&amp;quot;none&amp;quot; and &amp;quot;guess&amp;quot; decides upon on video resolution: width &amp;gt; 1280 or height &amp;gt; 576 → BT.709, else → BT.601. When no hint found in ASS script and 'colorspace' parameter is empty then the default is BT.601.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 AssRender(&amp;quot;subtitles.ass&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2026-01-22 - seiya-git, pinterf&lt;br /&gt;
     * Version 0.36:&lt;br /&gt;
        - Binaries using AviSynth 3.7.5's lib, VS2022 MSVC 14.38 toolset&lt;br /&gt;
        - Update build instructions&lt;br /&gt;
        - Fix hinting&lt;br /&gt;
        - Fix ass_set_storage_size not be called&lt;br /&gt;
        - Switch submodule build system to meson&lt;br /&gt;
        - Update avisynth(plus) headers to v12&lt;br /&gt;
        - Update libass to 0.17.4&lt;br /&gt;
        - Unicode-safe file reading&lt;br /&gt;
        - Add frame size parameters&lt;br /&gt;
        - Add set_default_storage_size boolean&lt;br /&gt;
        - Use frame properties if they available for &amp;quot;YCbCr Matrix: None&amp;quot;&lt;br /&gt;
        - Work with frame copy instead of just modifying it&lt;br /&gt;
&lt;br /&gt;
2021-03-04 - pinterf&lt;br /&gt;
     * Version 0.35:&lt;br /&gt;
        - Windows MSVC: Update to libass v0.15 (git submodule update --init --recursive --remote)&lt;br /&gt;
          For changes since v0.14 see https://github.com/libass/libass/blob/master/Changelog&lt;br /&gt;
        - don't guess base on video resolution (realfinder)&lt;br /&gt;
          if .ass file has no Matrix info then it should be treated as it &amp;quot;Rec601&amp;quot; to maintain compatibility&lt;br /&gt;
        - Parameter 'colorspace' default value is no longer &amp;quot;guess&amp;quot;&lt;br /&gt;
        - Add more color options: PC.709, PC.601, TV.fcc, PC.fcc, TV.240m, PC.240m, none.&lt;br /&gt;
          &amp;quot;none&amp;quot; and &amp;quot;guess&amp;quot; implies &amp;quot;guess-by-resolution&amp;quot;.&lt;br /&gt;
        - Fix: possible crash on initializing phase (buffer overread, linux crashed, Windows was just lucky)&lt;br /&gt;
&lt;br /&gt;
2021-03-01 - pinterf&lt;br /&gt;
     * Version 0.34:&lt;br /&gt;
        - Fix the fix: revert matrix change made in 0.33&lt;br /&gt;
        - Fix: Check matrix from .ASS file &amp;quot;YCbCr Matrix:&amp;quot; section besides &amp;quot;Video Colorspace:&amp;quot;&lt;br /&gt;
          Recognized values are &amp;quot;tv.601&amp;quot; and &amp;quot;tv.709&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2021-02-28 - pinterf&lt;br /&gt;
     * Version 0.33:&lt;br /&gt;
        - Fix: wrong Bt.709 matrix (it wasn't :) )&lt;br /&gt;
&lt;br /&gt;
2021-02-27 - pinterf&lt;br /&gt;
     * Version 0.32:&lt;br /&gt;
        - Fix: treat I420 variant as YV12 instead of unsupported color space&lt;br /&gt;
&lt;br /&gt;
2021-02-18 - pinterf&lt;br /&gt;
     * Version 0.31:&lt;br /&gt;
        - Fix colors for planar RGB&lt;br /&gt;
        - code: hidden ifdef FOR_AVISYNTH_26_ONLY for Avisynth 2.6-only build&lt;br /&gt;
&lt;br /&gt;
2021-02-17 - pinterf&lt;br /&gt;
     * Version 0.30:&lt;br /&gt;
        - 10-16 bit support (including RGB48 and RGB64)&lt;br /&gt;
        - YV411, Planar RGB support&lt;br /&gt;
&lt;br /&gt;
2021-02-16 - pinterf&lt;br /&gt;
     * Version 0.29:&lt;br /&gt;
        - project moved to https://github.com/pinterf/assrender from https://github.com/vadosnaprimer/assrender&lt;br /&gt;
        - Move to Visual Studio 2019 - v142 platform toolset&lt;br /&gt;
        - Add .def module definition file for Avisynth 2.6 std compatibility (function name mangling)&lt;br /&gt;
        - Update Avisynth C headers&lt;br /&gt;
        - Check Linux and gcc-MinGW CMake build&lt;br /&gt;
        - Add build instructions and change log to README&lt;br /&gt;
&lt;br /&gt;
2019-01-14 - vadosnaprimer&lt;br /&gt;
        - https://github.com/vadosnaprimer/assrender/&lt;br /&gt;
        - add batch that lets not to change deps sdk and vs version copied from SMP libass&lt;br /&gt;
        - update SMP submodules&lt;br /&gt;
&lt;br /&gt;
2016-10-18 - Blitzker&lt;br /&gt;
        - https://github.com/Blitzker/assrender&lt;br /&gt;
        - Visual Studio 2015 support&lt;br /&gt;
&lt;br /&gt;
2012-04-20 - lachs0r &lt;br /&gt;
    * Version 0.25:&lt;br /&gt;
        - code restructured&lt;br /&gt;
        - added support for the BT.709 color space and the “Video Colorspace”&lt;br /&gt;
          property that has been introduced with recent versions of Aegisub.&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated everything, switched to MinGW-w64&lt;br /&gt;
              (same toolchain as mplayer2 now)&lt;br /&gt;
&lt;br /&gt;
2011-09-22 - lachs0r &lt;br /&gt;
    * Version 0.24.1:&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD&lt;br /&gt;
            - switched Harfbuzz to libass’ compatibility branch&lt;br /&gt;
            - compiled Harfbuzz without Uniscribe backend&lt;br /&gt;
              fixes lots of crashes and misbehavior&lt;br /&gt;
&lt;br /&gt;
2011-07-29 - lachs0r&lt;br /&gt;
    * Version 0.24:&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD:&lt;br /&gt;
                - fixed performance regression&lt;br /&gt;
&lt;br /&gt;
2011-07-29 - lachs0r&lt;br /&gt;
    * Version 0.23:&lt;br /&gt;
        - disabled font hinting by default&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD and included Harfbuzz:&lt;br /&gt;
                - added support for bidirectional text, Arabic shaping etc.&lt;br /&gt;
                - added proper support for @fonts (vertical writing)&lt;br /&gt;
                - slight performance regression&lt;br /&gt;
                  (glyph cache not hooked up with Harfbuzz yet)&lt;br /&gt;
            - updated FreeType to current git HEAD:&lt;br /&gt;
                - fixed outline stroker for some broken fonts&lt;br /&gt;
&lt;br /&gt;
2011-06-16 - lachs0r&lt;br /&gt;
    * Version 0.22:&lt;br /&gt;
        - fixed hang when a glyph with zero dimensions was encountered&lt;br /&gt;
          (mostly vector clips)&lt;br /&gt;
&lt;br /&gt;
2011-06-08 - lachs0r &amp;lt;lachs0r@srsfckn.biz&amp;gt;&lt;br /&gt;
    * Version 0.21:&lt;br /&gt;
        - finally implemented proper subsampling for YV12&lt;br /&gt;
        - temporarily removed YV16 support&lt;br /&gt;
        - renamed parameter verbosity → debuglevel&lt;br /&gt;
        - code cleanups&lt;br /&gt;
        binary:&lt;br /&gt;
            - reverted to GCC 4.5.2 (4.6 miscompiles MinGW)&lt;br /&gt;
&lt;br /&gt;
2011-06-01 - lachs0r&lt;br /&gt;
    * Version 0.20:&lt;br /&gt;
        - fixed the masksub stuff&lt;br /&gt;
        - properly output debug messages to stderr instead of stdout&lt;br /&gt;
        - reformatted source and corrected/removed some comments&lt;br /&gt;
        - modified CMakeLists.txt to strip the binary by default&lt;br /&gt;
        binary:&lt;br /&gt;
            - now built with GCC 4.6 instead of 4.5.2&lt;br /&gt;
            - included enca again&lt;br /&gt;
            - patched fontconfig:&lt;br /&gt;
                - prettier debug output&lt;br /&gt;
                - use the correct location for its cache&lt;br /&gt;
&lt;br /&gt;
2011-02-01 - lachs0r&lt;br /&gt;
    * Version 0.19:&lt;br /&gt;
        This is a bugfix/cleanup release.&lt;br /&gt;
        - fixed possible buffer overflows in timecodesv1 and SRT parsing&lt;br /&gt;
        - fixed random crashes on unloading&lt;br /&gt;
        - probably fixed compilation with MSVC (patch by TheFluff)&lt;br /&gt;
        - very slightly improved performance with GCC&lt;br /&gt;
        - various code cleanups&lt;br /&gt;
&lt;br /&gt;
2011-01-25 - lachs0r&lt;br /&gt;
    * Version 0.18:&lt;br /&gt;
        - improved YV12 support (should be somewhat usable now)&lt;br /&gt;
        - added support for RGB24, YV24, YV16 and Y8 (YUY2 coming soon)&lt;br /&gt;
        - added SRT subtitle format support&lt;br /&gt;
            additional parameter: srt_font (font to use for srt subs)&lt;br /&gt;
        - exposed some libass parameters:&lt;br /&gt;
            line_spacing (line spacing)&lt;br /&gt;
            dar, sar (aspect ratio)&lt;br /&gt;
            top, bottom, left, right (margins)&lt;br /&gt;
            fontdir (additional font directory)&lt;br /&gt;
        - masksub equivalent if used on a blankclip&lt;br /&gt;
            (still buggy - read source for details)&lt;br /&gt;
        - no more global variables&lt;br /&gt;
&lt;br /&gt;
2011-01-17 - lachs0r &lt;br /&gt;
    * Version 0.17:&lt;br /&gt;
        - added rudimentary YV12 support (chroma subsampling still needs work)&lt;br /&gt;
        - binary: Previously, I linked against a very old avisynth_c.lib - now&lt;br /&gt;
                  you shouldn’t get any error messages about “avisynth_c.dll”&lt;br /&gt;
        - tidied up the RGB32 blitter a bit&lt;br /&gt;
&lt;br /&gt;
2011-01-16 - lachs0r&lt;br /&gt;
    * Version 0.15:&lt;br /&gt;
        - reimplemented as AviSynth C plugin - this fixed several crashes and&lt;br /&gt;
          got rid of the major pain in the ass that is MSVC&lt;br /&gt;
        - binary: built with patched Fontconfig (no longer needs fonts.conf)&lt;br /&gt;
    * Version 0.16:&lt;br /&gt;
        - implemented VFRaC support via timecodes files (v1 and v2 supported)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v0.25&lt;br /&gt;
|[http://srsfckn.biz/assrender/assrender-0.25.7z assrender-0.25.7z]&lt;br /&gt;
|[https://web.archive.org/web/20180118024447if_/http://srsfckn.biz/assrender/assrender-0.25.7z assrender-0.25.7z]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--[http://encodan.srsfckn.biz/assrender/ C Plugin] - dead link ---&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[http://github.com/pinterf/assrender GitHub] - Updated version (v0.30+) &lt;br /&gt;
*[http://github.com/pingplug/assrender GitHub] - Updated version (v0.28), only source code available. &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#Subtitling|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/AssRender</id>
		<title>AssRender</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/AssRender"/>
				<updated>2026-01-28T14:13:28Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changelog */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Subtitling|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1=pinterf, vadosnaprimer, Blitzker, pingplug, lachs0r, TheFluff&lt;br /&gt;
|2=v0.35&lt;br /&gt;
|3=[https://github.com/pinterf/assrender/releases/ assrender-0.35.7z]&lt;br /&gt;
|4=Subtitling&lt;br /&gt;
|5=Source code is MIT license, binaries are GPL&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=148926 Doom9 Thread]}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
AssRender is an AviSynth plugin that renders ASS/SSA and SRT (without the HTML-like markup) subtitles. It uses libass to render the subtitles.&lt;br /&gt;
&lt;br /&gt;
This also means that it is much more picky about script syntax than VSFilter and friends, so keep that in mind before blaming the filter. Yes, people have reported a lot of errors that were actually the script author’s fault and libass vs VSFilter compatibility.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Note:'''&amp;lt;/span&amp;gt; AssRender is a C-plugin so it must be loaded using [[Plugins#LoadCPlugin|LoadCPlugin]], except if you're using AviSynth+, it allows autoloading of C-plugins.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]] &lt;br /&gt;
* Supported color formats: [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
** AviSynth+: all [[planar]] formats (8/10/12/14/16bit, Y/YUV/RGB with or without alpha) are supported. [[RGB48]] and [[RGB64]] are also supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
:{{Template:FuncDef|assrender (clip, string file, string &amp;quot;vfr&amp;quot;, int &amp;quot;hinting&amp;quot;, float &amp;quot;scale&amp;quot;, float &amp;quot;line_spacing&amp;quot;, float &amp;quot;dar&amp;quot;, float &amp;quot;sar&amp;quot;, int &amp;quot;top&amp;quot;, int &amp;quot;bottom&amp;quot;, int &amp;quot;left&amp;quot;, int &amp;quot;right&amp;quot;, string &amp;quot;charset&amp;quot;, int &amp;quot;debuglevel&amp;quot;, string &amp;quot;fontdir&amp;quot;, string &amp;quot;srt_font&amp;quot;, string &amp;quot;colorspace&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||string|}}&lt;br /&gt;
:::Your subtitle file. May be ASS, SSA or SRT.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|vfr|string| }}&lt;br /&gt;
:::Specify timecodes v1 or v2 file when working with VFRaC.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|hinting|int|0}}&lt;br /&gt;
:::Font hinting mode. Choose between: &lt;br /&gt;
:::*none (0, default), light (1), normal (2) and Freetype native (3) autohinting.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|scale|float|1.0}}&lt;br /&gt;
:::Font scale. Defaults to 1.0.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|line_spacing|float|1.0}}&lt;br /&gt;
:::Line spacing in pixels. Defaults to 1.0 and won’t be scaled with frame size. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dar|float| }}&lt;br /&gt;
::{{Par2|sar|float| }}&lt;br /&gt;
:::Aspect ratio. Of course you need to set both parameters.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|top|int|0}}&lt;br /&gt;
::{{Par2|bottom|int|0}}&lt;br /&gt;
::{{Par2|left|int|0}}&lt;br /&gt;
::{{Par2|right|int|0}}&lt;br /&gt;
:::Margins. They will be added to the frame size and may be negative.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|charset|string|&amp;quot;UTF-8&amp;quot;}}&lt;br /&gt;
:::Character set to use, in GNU iconv or enca format. Defaults to UTF-8.&lt;br /&gt;
:::Example enca format: enca:pl:cp1250 (guess the encoding for Polish, fall back on cp1250)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debuglevel|int|0}}&lt;br /&gt;
:::How much crap assrender is supposed to spam to stderr.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|fontdir|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::Additional font directory.&lt;br /&gt;
:::Useful if you are lazy but want to keep your system fonts clean.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|srt_font|string|&amp;quot;Sans&amp;quot;}}&lt;br /&gt;
:::Font to use for SRT subtitles. Defaults to whatever Fontconfig chooses for “Sans”.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|colorspace|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::The color space of your (YUV) video. Possible values:&lt;br /&gt;
:::* &amp;quot;Rec2020&amp;quot;, &amp;quot;BT.2020&amp;quot;&lt;br /&gt;
:::* &amp;quot;Rec709&amp;quot;, &amp;quot;BT.709&amp;quot;&lt;br /&gt;
:::* &amp;quot;Rec601&amp;quot;, &amp;quot;BT.601&amp;quot;&lt;br /&gt;
:::* &amp;quot;PC.709&amp;quot;&lt;br /&gt;
:::* &amp;quot;PC.601&amp;quot;&lt;br /&gt;
:::* &amp;quot;TV.fcc&amp;quot;, &amp;quot;PC.fcc&amp;quot;&lt;br /&gt;
:::* &amp;quot;TV.240m&amp;quot;, &amp;quot;PC.240m&amp;quot;&lt;br /&gt;
:::* &amp;quot;none&amp;quot;, &amp;quot;guess&amp;quot;&lt;br /&gt;
:::Default is to use the ASS script's &amp;quot;YCbCr Matrix&amp;quot; or &amp;quot;Video Colorspace&amp;quot; property.&lt;br /&gt;
:::Recognized .ASS properties: &amp;quot;TV.601&amp;quot; &amp;quot;TV.709&amp;quot;, &amp;quot;PC.601&amp;quot; &amp;quot;PC.709&amp;quot; &amp;quot;TV.240m&amp;quot; &amp;quot;PC.240m&amp;quot; &amp;quot;TV.fcc&amp;quot; &amp;quot;PC.fcc&amp;quot; and &amp;quot;none&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:::&amp;quot;none&amp;quot; and &amp;quot;guess&amp;quot; decides upon on video resolution: width &amp;gt; 1280 or height &amp;gt; 576 → BT.709, else → BT.601. When no hint found in ASS script and 'colorspace' parameter is empty then the default is BT.601.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 AssRender(&amp;quot;subtitles.ass&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2026-01-22 - seiya-git, pinterf&lt;br /&gt;
     * Version 0.36:&lt;br /&gt;
        - Binaries using AviSynth 3.7.5's lib, VS2022 MSVC 14.38 toolset&lt;br /&gt;
        - Update build instructions&lt;br /&gt;
        - Fix hinting&lt;br /&gt;
        - Fix ass_set_storage_size not be called&lt;br /&gt;
        - Switch submodule build system to meson&lt;br /&gt;
        - Update avisynth(plus) headers to v12&lt;br /&gt;
        - Update libass to 0.17.4&lt;br /&gt;
        - Unicode-safe file reading&lt;br /&gt;
        - Add frame size parameters&lt;br /&gt;
        - Add set_default_storage_size boolean&lt;br /&gt;
        - Use frame properties if they available for &amp;quot;YCbCr Matrix: None&amp;quot;&lt;br /&gt;
        - Work with frame copy instead of just modifying it&lt;br /&gt;
&lt;br /&gt;
2021-03-04 - pinterf&lt;br /&gt;
     * Version 0.35:&lt;br /&gt;
        - Windows MSVC: Update to libass v0.15 (git submodule update --init --recursive --remote)&lt;br /&gt;
          For changes since v0.14 see https://github.com/libass/libass/blob/master/Changelog&lt;br /&gt;
        - don't guess base on video resolution (realfinder)&lt;br /&gt;
          if .ass file has no Matrix info then it should be treated as it &amp;quot;Rec601&amp;quot; to maintain compatibility&lt;br /&gt;
        - Parameter 'colorspace' default value is no longer &amp;quot;guess&amp;quot;&lt;br /&gt;
        - Add more color options: PC.709, PC.601, TV.fcc, PC.fcc, TV.240m, PC.240m, none.&lt;br /&gt;
          &amp;quot;none&amp;quot; and &amp;quot;guess&amp;quot; implies &amp;quot;guess-by-resolution&amp;quot;.&lt;br /&gt;
        - Fix: possible crash on initializing phase (buffer overread, linux crashed, Windows was just lucky)&lt;br /&gt;
&lt;br /&gt;
2021-03-01 - pinterf&lt;br /&gt;
     * Version 0.34:&lt;br /&gt;
        - Fix the fix: revert matrix change made in 0.33&lt;br /&gt;
        - Fix: Check matrix from .ASS file &amp;quot;YCbCr Matrix:&amp;quot; section besides &amp;quot;Video Colorspace:&amp;quot;&lt;br /&gt;
          Recognized values are &amp;quot;tv.601&amp;quot; and &amp;quot;tv.709&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2021-02-28 - pinterf&lt;br /&gt;
     * Version 0.33:&lt;br /&gt;
        - Fix: wrong Bt.709 matrix (it wasn't :) )&lt;br /&gt;
&lt;br /&gt;
2021-02-27 - pinterf&lt;br /&gt;
     * Version 0.32:&lt;br /&gt;
        - Fix: treat I420 variant as YV12 instead of unsupported color space&lt;br /&gt;
&lt;br /&gt;
2021-02-18 - pinterf&lt;br /&gt;
     * Version 0.31:&lt;br /&gt;
        - Fix colors for planar RGB&lt;br /&gt;
        - code: hidden ifdef FOR_AVISYNTH_26_ONLY for Avisynth 2.6-only build&lt;br /&gt;
&lt;br /&gt;
2021-02-17 - pinterf&lt;br /&gt;
     * Version 0.30:&lt;br /&gt;
        - 10-16 bit support (including RGB48 and RGB64)&lt;br /&gt;
        - YV411, Planar RGB support&lt;br /&gt;
&lt;br /&gt;
2021-02-16 - pinterf&lt;br /&gt;
     * Version 0.29:&lt;br /&gt;
        - project moved to https://github.com/pinterf/assrender from https://github.com/vadosnaprimer/assrender&lt;br /&gt;
        - Move to Visual Studio 2019 - v142 platform toolset&lt;br /&gt;
        - Add .def module definition file for Avisynth 2.6 std compatibility (function name mangling)&lt;br /&gt;
        - Update Avisynth C headers&lt;br /&gt;
        - Check Linux and gcc-MinGW CMake build&lt;br /&gt;
        - Add build instructions and change log to README&lt;br /&gt;
&lt;br /&gt;
2019-01-14 - vadosnaprimer&lt;br /&gt;
        - https://github.com/vadosnaprimer/assrender/&lt;br /&gt;
        - add batch that lets not to change deps sdk and vs version copied from SMP libass&lt;br /&gt;
        - update SMP submodules&lt;br /&gt;
&lt;br /&gt;
2016-10-18 - Blitzker&lt;br /&gt;
        - https://github.com/Blitzker/assrender&lt;br /&gt;
        - Visual Studio 2015 support&lt;br /&gt;
&lt;br /&gt;
2012-04-20 - lachs0r &lt;br /&gt;
    * Version 0.25:&lt;br /&gt;
        - code restructured&lt;br /&gt;
        - added support for the BT.709 color space and the “Video Colorspace”&lt;br /&gt;
          property that has been introduced with recent versions of Aegisub.&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated everything, switched to MinGW-w64&lt;br /&gt;
              (same toolchain as mplayer2 now)&lt;br /&gt;
&lt;br /&gt;
2011-09-22 - lachs0r &lt;br /&gt;
    * Version 0.24.1:&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD&lt;br /&gt;
            - switched Harfbuzz to libass’ compatibility branch&lt;br /&gt;
            - compiled Harfbuzz without Uniscribe backend&lt;br /&gt;
              fixes lots of crashes and misbehavior&lt;br /&gt;
&lt;br /&gt;
2011-07-29 - lachs0r&lt;br /&gt;
    * Version 0.24:&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD:&lt;br /&gt;
                - fixed performance regression&lt;br /&gt;
&lt;br /&gt;
2011-07-29 - lachs0r&lt;br /&gt;
    * Version 0.23:&lt;br /&gt;
        - disabled font hinting by default&lt;br /&gt;
        binary:&lt;br /&gt;
            - updated libass to current git HEAD and included Harfbuzz:&lt;br /&gt;
                - added support for bidirectional text, Arabic shaping etc.&lt;br /&gt;
                - added proper support for @fonts (vertical writing)&lt;br /&gt;
                - slight performance regression&lt;br /&gt;
                  (glyph cache not hooked up with Harfbuzz yet)&lt;br /&gt;
            - updated FreeType to current git HEAD:&lt;br /&gt;
                - fixed outline stroker for some broken fonts&lt;br /&gt;
&lt;br /&gt;
2011-06-16 - lachs0r&lt;br /&gt;
    * Version 0.22:&lt;br /&gt;
        - fixed hang when a glyph with zero dimensions was encountered&lt;br /&gt;
          (mostly vector clips)&lt;br /&gt;
&lt;br /&gt;
2011-06-08 - lachs0r &amp;lt;lachs0r@srsfckn.biz&amp;gt;&lt;br /&gt;
    * Version 0.21:&lt;br /&gt;
        - finally implemented proper subsampling for YV12&lt;br /&gt;
        - temporarily removed YV16 support&lt;br /&gt;
        - renamed parameter verbosity → debuglevel&lt;br /&gt;
        - code cleanups&lt;br /&gt;
        binary:&lt;br /&gt;
            - reverted to GCC 4.5.2 (4.6 miscompiles MinGW)&lt;br /&gt;
&lt;br /&gt;
2011-06-01 - lachs0r&lt;br /&gt;
    * Version 0.20:&lt;br /&gt;
        - fixed the masksub stuff&lt;br /&gt;
        - properly output debug messages to stderr instead of stdout&lt;br /&gt;
        - reformatted source and corrected/removed some comments&lt;br /&gt;
        - modified CMakeLists.txt to strip the binary by default&lt;br /&gt;
        binary:&lt;br /&gt;
            - now built with GCC 4.6 instead of 4.5.2&lt;br /&gt;
            - included enca again&lt;br /&gt;
            - patched fontconfig:&lt;br /&gt;
                - prettier debug output&lt;br /&gt;
                - use the correct location for its cache&lt;br /&gt;
&lt;br /&gt;
2011-02-01 - lachs0r&lt;br /&gt;
    * Version 0.19:&lt;br /&gt;
        This is a bugfix/cleanup release.&lt;br /&gt;
        - fixed possible buffer overflows in timecodesv1 and SRT parsing&lt;br /&gt;
        - fixed random crashes on unloading&lt;br /&gt;
        - probably fixed compilation with MSVC (patch by TheFluff)&lt;br /&gt;
        - very slightly improved performance with GCC&lt;br /&gt;
        - various code cleanups&lt;br /&gt;
&lt;br /&gt;
2011-01-25 - lachs0r&lt;br /&gt;
    * Version 0.18:&lt;br /&gt;
        - improved YV12 support (should be somewhat usable now)&lt;br /&gt;
        - added support for RGB24, YV24, YV16 and Y8 (YUY2 coming soon)&lt;br /&gt;
        - added SRT subtitle format support&lt;br /&gt;
            additional parameter: srt_font (font to use for srt subs)&lt;br /&gt;
        - exposed some libass parameters:&lt;br /&gt;
            line_spacing (line spacing)&lt;br /&gt;
            dar, sar (aspect ratio)&lt;br /&gt;
            top, bottom, left, right (margins)&lt;br /&gt;
            fontdir (additional font directory)&lt;br /&gt;
        - masksub equivalent if used on a blankclip&lt;br /&gt;
            (still buggy - read source for details)&lt;br /&gt;
        - no more global variables&lt;br /&gt;
&lt;br /&gt;
2011-01-17 - lachs0r &lt;br /&gt;
    * Version 0.17:&lt;br /&gt;
        - added rudimentary YV12 support (chroma subsampling still needs work)&lt;br /&gt;
        - binary: Previously, I linked against a very old avisynth_c.lib - now&lt;br /&gt;
                  you shouldn’t get any error messages about “avisynth_c.dll”&lt;br /&gt;
        - tidied up the RGB32 blitter a bit&lt;br /&gt;
&lt;br /&gt;
2011-01-16 - lachs0r&lt;br /&gt;
    * Version 0.15:&lt;br /&gt;
        - reimplemented as AviSynth C plugin - this fixed several crashes and&lt;br /&gt;
          got rid of the major pain in the ass that is MSVC&lt;br /&gt;
        - binary: built with patched Fontconfig (no longer needs fonts.conf)&lt;br /&gt;
    * Version 0.16:&lt;br /&gt;
        - implemented VFRaC support via timecodes files (v1 and v2 supported)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v0.25&lt;br /&gt;
|[http://srsfckn.biz/assrender/assrender-0.25.7z assrender-0.25.7z]&lt;br /&gt;
|[https://web.archive.org/web/20180118024447if_/http://srsfckn.biz/assrender/assrender-0.25.7z assrender-0.25.7z]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--[http://encodan.srsfckn.biz/assrender/ C Plugin] - dead link ---&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[http://github.com/pinterf/assrender GitHub] - Updated version (v0.30+) &lt;br /&gt;
*[http://github.com/pingplug/assrender GitHub] - Updated version (v0.28), only source code available. &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#Subtitling|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/TIVTC</id>
		<title>TIVTC</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/TIVTC"/>
				<updated>2025-12-10T19:36:28Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: New version 1.0.30&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|IVTC|Decimation|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1={{Author/tritical}}, {{Author/pinterf}}&lt;br /&gt;
|2=1.0.30&lt;br /&gt;
|3=[https://github.com/pinterf/TIVTC/releases TIVTC-v1.0.30.7z]&lt;br /&gt;
|4=[[:Category:IVTC|IVTC]] &amp;amp; [[:Category:Decimation|Decimation]]&lt;br /&gt;
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=82264 Doom9 Thread]}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
'''TIVTC''' is a plugin package containing 7 different filters and 3 conditional functions. The seven filters included are '''[[TIVTC/TFM|TFM]], [[TIVTC/TDecimate|TDecimate]], [[TIVTC/MergeHints|MergeHints]], [[TIVTC/FrameDiff|FrameDiff]], [[TIVTC/FieldDiff|FieldDiff]], [[TIVTC/ShowCombedTIVTC|ShowCombedTIVTC]],''' and '''[[TIVTC/RequestLinear|RequestLinear]]'''. &lt;br /&gt;
&lt;br /&gt;
*'''TFM''' is a field matching filter that will recreate the original progressive frames in a telecined source, and '''TDecimate''' is a decimation filter that removes duplicates. These filters can be used together to achieve an [http://en.wikipedia.org/wiki/Ivtc IVTC] or separately to accomplish other tasks. &lt;br /&gt;
&lt;br /&gt;
*'''TDecimate''' also provides special options for handling hybrid material which include [[VFR]] via [http://en.wikipedia.org/wiki/Matroska Matroska] (using a timecodes file) and blend decimation/upconversion for CFR solutions. &lt;br /&gt;
&lt;br /&gt;
*'''Mergehints, RequestLinear, FrameDiff, FieldDiff,''' and '''ShowCombedTIVTC''' are special utility filters included to help perform specific functions. &lt;br /&gt;
&lt;br /&gt;
*The conditional functions are '''IsCombedTIVTC, CFieldDiff,''' and '''CFrameDiff''' which can be used via AviSynth's [[ConditionalFilter|conditional filtering]] environment to test if frames are combed, determine how well two fields fit together, or calculate the difference between frames.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: [[YUY2]], [[YV12]], [[YV16]], [[YV411]], [[YV24]]&lt;br /&gt;
**AviSynth+: all [[planar]] Y and YUV formats (8/10/12/14/16-bit) are supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Usage Examples==&lt;br /&gt;
&lt;br /&gt;
====NTSC cases:====&lt;br /&gt;
&lt;br /&gt;
   1.) NTSC Film, normal source (not anime or cartoon).  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate()&lt;br /&gt;
&lt;br /&gt;
   2.) NTSC Film, anime or cartoon source.  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=1)&lt;br /&gt;
&lt;br /&gt;
   3.) NTSC Hybrid, using blend decimation on video sections (not anime or cartoon).  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(hybrid=1)&lt;br /&gt;
&lt;br /&gt;
   4.) NTSC Hybrid, using blend decimation on video sections, anime or cartoon source.  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=1,hybrid=1)&lt;br /&gt;
&lt;br /&gt;
   5.) NTSC Hybrid, using vfr via mkv (not anime or cartoon).  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=3,hybrid=2,vfrDec=0,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   6.) NTSC Hybrid, using vfr via mkv, anime or cartoon source.  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=3,hybrid=2,vfrDec=1,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   7.) NTSC, two pass (enables use of conCycleTP parameter) mkv vfr for hybrid source.&lt;br /&gt;
         First pass:&lt;br /&gt;
             mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
             tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;,output=&amp;quot;matches.txt&amp;quot;)&lt;br /&gt;
             tdecimate(mode=4,output=&amp;quot;metrics.txt&amp;quot;)&lt;br /&gt;
         Second pass (not anime or cartoon):&lt;br /&gt;
             mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
             tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;,input=&amp;quot;matches.txt&amp;quot;)&lt;br /&gt;
             tdecimate(mode=5,hybrid=2,vfrDec=0,input=&amp;quot;metrics.txt&amp;quot;,tfmIn=&amp;quot;matches.txt&amp;quot;,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
         Second pass (anime or cartoon):&lt;br /&gt;
             mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
             tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;,input=&amp;quot;matches.txt&amp;quot;)&lt;br /&gt;
             tdecimate(mode=5,hybrid=2,vfrDec=1,input=&amp;quot;metrics.txt&amp;quot;,tfmIn=&amp;quot;matches.txt&amp;quot;,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====PAL Cases:====&lt;br /&gt;
&lt;br /&gt;
   1.) PAL, no decimation (just field matching)&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   2.) PAL, decimate 1 in 25 (most similar)&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(cycle=25)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v1.0.5&lt;br /&gt;
|[https://web.archive.org/web/20140420181748if_/http://bengal.missouri.edu/~kes25c/TIVTCv105.zip TIVTCv105.zip]&lt;br /&gt;
|[https://web.archive.org/web/20120223025813if_/http://ivtc.org/yatta%20support/TIVTCv105.zip TIVTCv105.zip]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--Old versions: https://web.archive.org/web/20081017060943/http://bengal.missouri.edu/~kes25c/old_stuff/--&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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#IVTC_.26_Decimation|External Filters]] &amp;amp;larr;'''&lt;br /&gt;
-----------------------------------------------&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Layer</id>
		<title>Layer</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Layer"/>
				<updated>2025-01-15T14:21:23Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Layer */ Mention Avs+ documentation link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsStarFilter}}&lt;br /&gt;
__TOC__&lt;br /&gt;
== Layer ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BlueBox2|40|0|3px solid purple}} &amp;gt;&lt;br /&gt;
{{AvsPlusFullname}}&amp;lt;br&amp;gt;&lt;br /&gt;
Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/layer.html https://avisynthplus.readthedocs.io]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Layer (aka ''overlay'', ''blend'', ''merge'') two clips of possibly different sizes, but with the same color format.&lt;br /&gt;
&lt;br /&gt;
For pixel-wise transparency information, the alpha channel of an RGBA ''overlay_clip'' is used as a mask.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} Before Avisynth+ 3.4.0 Layer was working only for RGB32 and YUY2. Filter &amp;quot;Overlay&amp;quot; was used primarily for YUV. Now Layer accepts practically all formats (also RGB24/48 since v3.5).&amp;lt;br&amp;gt;&lt;br /&gt;
Note that some modes can be similar to Overlay, but the two filters are still different.&amp;lt;br&amp;gt; &lt;br /&gt;
Overlay accepts mask clip, Layer would use existing A plane.&amp;lt;br&amp;gt;&lt;br /&gt;
Overlay &amp;quot;blend&amp;quot; is Layer &amp;quot;add&amp;quot;, Overlay &amp;quot;add&amp;quot; is different.&amp;lt;br&amp;gt;&lt;br /&gt;
Lighten and darken is a bit different in Overlay.&amp;lt;br&amp;gt;&lt;br /&gt;
Layer has &amp;quot;placement&amp;quot; parameter for proper mask positioning over chroma.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Layer( clip ''base_clip'', clip ''overlay_clip'' [, string ''op'', int ''level'', int ''x'', int ''y'', int ''threshold'', bool ''use_chroma'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Layer( clip ''base_clip'', clip ''overlay_clip'' [, string ''op'', int ''level'', int ''x'', int ''y'', int ''threshold'', bool ''use_chroma'', float ''opacity'', string ''placement'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|base_clip|clip|}}&lt;br /&gt;
:: The underlying clip, which determines the size and all other video and audio properties of the result.&lt;br /&gt;
::Color format must be [[YUY2]] or [[RGB32]].&lt;br /&gt;
::{{AvsPluscon}} supports all color spaces, except YV411.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|overlay_clip|clip|}}&lt;br /&gt;
:: The clip which is merged onto {{FuncArg|clip}}. If [[RGB32]] or other alpha-aware color space, the alpha channel is used as a mask. &lt;br /&gt;
::Color format must match {{FuncArg|base_clip}}.&lt;br /&gt;
::{{AvsPluscon}}Non-alpha plane YUV/planar RGB color spaces act as having a fully transparent alpha channel (like the former YUY2 only working mode)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|op|string|&amp;quot;add&amp;quot;}}&lt;br /&gt;
::The merge operation to be performed, which can be one of the following:&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:56em;margin:0 0 0 3.5em&amp;quot; &amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
!style=&amp;quot;min-width:4em&amp;quot;| Op&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| ''add''&lt;br /&gt;
|[[File:Layer-base-Lena.png]] [[File:Layer-over-grad.png]] &lt;br /&gt;
&lt;br /&gt;
[[File:Layer-example-add.png]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| This is the default mode. Equivalent to [[Overlay]](mode=&amp;quot;blend&amp;quot;).&amp;lt;br&amp;gt;{{FuncArg|overlay_clip}} will be copied on top of the original, in proportion to {{FuncArg|level}}, and subject to the alpha channel. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The difference between {{FuncArg|base_clip}} and {{FuncArg|overlay_clip}} is multiplied with alpha and added to {{FuncArg|base_clip}}.&lt;br /&gt;
*alpha=0{{D}} &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;rarr; only {{FuncArg|base_clip}} visible&lt;br /&gt;
*alpha=128{{D}} &amp;amp;rarr; {{FuncArg|base_clip}} and {{FuncArg|overlay_clip}} equally blended&lt;br /&gt;
*alpha=255{{D}} &amp;amp;rarr; only {{FuncArg|overlay_clip}} visible&lt;br /&gt;
Formula used :&lt;br /&gt;
*RGB: &amp;amp;nbsp;[[File:Layer-Eq1.png]]&lt;br /&gt;
*YUY2: [[File:Layer-Eq2.png]]&lt;br /&gt;
*In general, see {{FuncArg|opacity}} parameter&lt;br /&gt;
*Alpha-aware: base = base + (overlay - base) * opacity * alpha / max_range{{D}}&lt;br /&gt;
*No alpha: base = base + (overlay - base) * opacity&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| ''subtract''&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| [[File:Layer-example-sub.png]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| {{FuncArg|base_clip}} minus {{FuncArg|overlay_clip}}. The same as ''add'', but {{FuncArg|overlay_clip}} is inverted before adding.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;If both clips are equal and {{FuncArg|level}}=128, a flat gray field is returned; compare to [[Subtract]].&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| ''lighten''&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| [[File:Layer-example-lite.png]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| Copy {{FuncArg|overlay_clip}} over {{FuncArg|base_clip}} in areas where {{FuncArg|overlay_clip}} is lighter by {{FuncArg|threshold}}. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Performs the same operation as ''add'', but only when {{FuncArg|overlay_clip}} is BRIGHTER than {{FuncArg|base_clip}}. {{FuncArg|use_chroma}} must be ''true''.&lt;br /&gt;
&amp;lt;br&amp;gt; Also known as [http://photoblogstop.com/photoshop/photoshop-blend-modes-explained ''lighter color.'']&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| ''darken''&lt;br /&gt;
| [[File:Layer-example-dark.png]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| Copy {{FuncArg|overlay_clip}} over {{FuncArg|base_clip}} in areas where {{FuncArg|overlay_clip}} is darker by {{FuncArg|threshold}}. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The same as &amp;quot;lighten&amp;quot;, but it is performed only when {{FuncArg|overlay_clip}} is DARKER than {{FuncArg|base_clip}}. {{FuncArg|use_chroma}} must be ''true''. &lt;br /&gt;
&amp;lt;br&amp;gt;Also known as [http://photoblogstop.com/photoshop/photoshop-blend-modes-explained ''darker color.'']&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| ''mul''&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| [[File:Layer-example-mul-rgb.png]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| {{FuncArg|base_clip}} multiplied by {{FuncArg|overlay_clip}}. This will generally make the output darker. &lt;br /&gt;
*alpha=0{{D}} &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;rarr; only {{FuncArg|base_clip}} visible.&lt;br /&gt;
*alpha=255{{D}} &amp;amp;rarr; approx. the same luminance as {{FuncArg|base_clip}} but with the colors of {{FuncArg|overlay_clip}}.&lt;br /&gt;
See [http://docs.gimp.org/2.8/en/gimp-concepts-layer-modes.html#layer-mode-multiply GIMP: Multiply]&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| ''fast''&lt;br /&gt;
| &lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot;| Like ''add'', but without masking. {{FuncArg|use_chroma}} must be ''true''; {{FuncArg|level}} and {{FuncArg|threshold}} are not used. The result is simply the average of {{FuncArg|base_clip}} and {{FuncArg|overlay_clip}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:{{Par2|level|int|(maximum)}}&lt;br /&gt;
::The strength of the performed operation:&lt;br /&gt;
::* 0 &amp;amp;ndash; no effect: {{FuncArg|base_clip}} is returned unchanged&lt;br /&gt;
::* 257 (256 for YUY2) &amp;amp;ndash; maximum strength&lt;br /&gt;
::{{AvsPluscon}} deprecated &amp;amp;ndash; use {{FuncArg|opacity}} instead.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|x|int|0}}&lt;br /&gt;
:{{Par2|y|int|0}}&lt;br /&gt;
::offset position of {{FuncArg|overlay_clip}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|threshold|int|0}}&lt;br /&gt;
::Changes the transition point of {{FuncArg|op}} = &amp;quot;darken&amp;quot;, &amp;quot;lighten.&amp;quot;&lt;br /&gt;
::{{AvsPluscon}} automatically scaled for bit depths over 8, keep it between 0 and 255&lt;br /&gt;
&lt;br /&gt;
:{{Par2|use_chroma|bool|true}}&lt;br /&gt;
::Use chroma of the {{FuncArg|overlay_clip}}. Default=true. When false, only luma is used. &lt;br /&gt;
::Must be true for {{FuncArg|op}} = &amp;quot;darken&amp;quot;, &amp;quot;lighten&amp;quot;, &amp;quot;add.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:{{Par2|opacity|float|1.0}}&lt;br /&gt;
::{{AvsPluscon}} usable for all bit depths, replaces the previous {{FuncArg|level}} parameter. Similar to &amp;quot;opacity&amp;quot; in &amp;quot;Overlay&amp;quot;&lt;br /&gt;
::valid values are 0.0 to 1.0. Default value is 1.0 if {{FuncArg|level}} does not exist (full transparency)&lt;br /&gt;
::If {{FuncArg|level}} parameter is given then opacity is calculated as: &lt;br /&gt;
:::for color spaces having alpha: opacity = level / ((1 &amp;lt;&amp;lt; bits_per_pixel) + 1) which gives 1.0 for level=257 (@8bit) and 65537 (@16 bits) &lt;br /&gt;
:::for color spaces not having alpha: opacity = level / ((1 &amp;lt;&amp;lt; bits_per_pixel)) e.g. for YUY2 or other non-Alpha, gives 1.0 for level=256 (@8bit)&lt;br /&gt;
:::Note: originally level was used in formula: (alpha*level + 1) / range_size, now level is calculated from opacity as: level = opacity * ((1 &amp;lt;&amp;lt; bits_per_pixel) + 1)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|placement|string|&amp;quot;mpeg2&amp;quot;}}&lt;br /&gt;
::{{AvsPluscon}} Possible values: &amp;quot;mpeg2&amp;quot; (default), &amp;quot;mpeg1&amp;quot;.&lt;br /&gt;
::Used in &amp;quot;mul&amp;quot;, &amp;quot;darken&amp;quot; and &amp;quot;lighten&amp;quot;, &amp;quot;add&amp;quot; and &amp;quot;subtract&amp;quot; modes with planar YUV 4:2:0 or 4:2:2 color spaces (not available for YUY2) in order to properly apply luma/overlay mask on U and V chroma channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Audio, [[Clip_properties|FrameRate]] and [[Clip_properties|FrameCount]] are taken from the first clip.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some differences in the behaviour and the allowed parameter depending on the color format and the operation; here are the details:&lt;br /&gt;
&lt;br /&gt;
*There is no mask (alpha channel) in [[YUY2]], so the alpha channel is assumed to be fully opaque (255{{D}}) everywhere.&lt;br /&gt;
&lt;br /&gt;
*In [[RGB32]] the {{FuncArg|overlay_clip}} alpha channel is multiplied with {{FuncArg|level}}, so the resulting alpha is&lt;br /&gt;
:: (alpha * {{FuncArg|level}} + 1) / 256. &lt;br /&gt;
:This means for full strength of operation, alpha has to be 255{{D}} and {{FuncArg|level}} has to be 257.&lt;br /&gt;
&lt;br /&gt;
*{{AvsPluscon}} in alpha-aware color spaces alpha channel is multiplied with {{FuncArg|opacity}}, so the resulting alpha is&lt;br /&gt;
:: alpha * opacity  &lt;br /&gt;
:This means for full strength of operation, alpha has to be 255{{D}} and {{FuncArg|opacity}} has to be 1.0.&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
*'''Layer''' can be used to combine two captures of different broadcasts for reducing noise. A discussion of this idea can be found {{doom9|28438}}. Of course you have to ensure that the frames of the two clips match exactly -- use [[Trim]] or [[DeleteFrame]] as necessary. A sample script:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|46|1.5}} &amp;gt;&lt;br /&gt;
 clip1 = [[AviSource]](&amp;quot;capture-pass-1.avi&amp;quot;).[[ConvertToYUY2]]&lt;br /&gt;
 clip2 = [[AviSource]](&amp;quot;capture-pass-2.avi&amp;quot;).[[ConvertToYUY2]].[[Trim]](101, 0)&lt;br /&gt;
 return Layer(clip1, clip2, &amp;quot;fast&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mask ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BlueBox2|40|0|3px solid purple}} &amp;gt;&lt;br /&gt;
{{AvsPlusFullname}}&amp;lt;br&amp;gt;&lt;br /&gt;
Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/mask.html#mask https://avisynthplus.readthedocs.io]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Applies a defined alpha-mask to a clip, by converting [[RGB32]]-only {{FuncArg|mask_clip}} to greyscale and copying that greyscale information to the alpha channel of RGB32-only {{FuncArg|clip}}. In the alpha channel, &amp;quot;black&amp;quot; means transparent and &amp;quot;white&amp;quot; means opaque. For those of you who familiar with Photoshop masks, the concept is the same. In fact you can create a black and white photo in Photoshop, load it in your script and use it as a mask.&lt;br /&gt;
&lt;br /&gt;
{{FuncDef|Mask(clip ''clip'', clip ''mask_clip'')}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
:: The base clip, which determines the size and all other video and audio properties of the result. &lt;br /&gt;
:: Color format must be [[RGB32]].&lt;br /&gt;
::{{AvsPluscon}} also supports [[RGB64]] and [[PlanarRGBA]].&lt;br /&gt;
&lt;br /&gt;
:{{Par2|mask_clip|clip|}}&lt;br /&gt;
:: Alpha-mask source, as described above. Size and color format must match {{FuncArg|clip}}. &lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
Suppose &amp;quot;ss.jpg&amp;quot; is a snapshot from a video clip, which served as a guideline to create the mask using Paint. We use [[ImageSource]] to load the image in the script and '''Mask''' to apply it.&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|68|1}} &amp;gt;&lt;br /&gt;
 bg  = [[AviSource]](&amp;quot;01gray.avi&amp;quot;).[[ConvertToRGB32]]      # here is the background clip&lt;br /&gt;
 mk  = [[ImageSource]](&amp;quot;ss.jpg&amp;quot;).ConvertToRGB32        # load the image&lt;br /&gt;
 top = AviSource(&amp;quot;k3.avi&amp;quot;).ConvertToRGB32.Mask(mk) # load the top layer clip and apply the mask to it&lt;br /&gt;
 Layer(bg, top)                                    # layer the background and the top layer with mask&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ResetMask ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BlueBox2|40|0|3px solid purple}} &amp;gt;&lt;br /&gt;
{{AvsPlusFullname}}&amp;lt;br&amp;gt;&lt;br /&gt;
Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/mask.html#resetmask https://avisynthplus.readthedocs.io]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Applies an opaque (white) alpha channel to a clip. The alpha channel of an [[RGB32]] clip is not always well-defined, depending on the source (it may contain random data); this filter is a fast way to apply an all-white mask. &lt;br /&gt;
&lt;br /&gt;
{{FuncDef|ResetMask(clip ''clip'')}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef|ResetMask(clip ''clip'', float ''mask'')}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
:: Source clip. Alpha channel will be set to opaque. Color format must be [[RGB32]].&lt;br /&gt;
::{{AvsPluscon}} also supports [[RGB64]], [[PlanarRGBA]] and [[YUVA]].&lt;br /&gt;
&lt;br /&gt;
:{{Par2|float|mask|}}&lt;br /&gt;
::{{AvsPluscon}} Optional mask value to set. No bit-depth scaling occurs, but value is clipped to be between 0 and maximum_pixel_value.&lt;br /&gt;
::Maximum opacity is 1.0 for 32 bit float formats, and (1^bit_depth) - 1 for 8-16 bit formats&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ColorKeyMask ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BlueBox2|40|0|3px solid purple}} &amp;gt;&lt;br /&gt;
{{AvsPlusFullname}}&amp;lt;br&amp;gt;&lt;br /&gt;
Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/mask.html#colorkeymask https://avisynthplus.readthedocs.io]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clears pixels in the alpha channel by comparing to a transparent {{FuncArg|color}} (default black). &lt;br /&gt;
&lt;br /&gt;
Each pixel with a color differing less than ({{FuncArg|tolB}},{{FuncArg|tolR}},{{FuncArg|tolG}}) (default 10{{D}}) is set to transparent (black); otherwise it is left unchanged &amp;amp;ndash; note, it is NOT set to opaque (white). That's why you might need '''ResetMask''' before applying this filter. This behaviour allows an aggregate mask to be constructed with multiple calls to '''ColorKeyMask'''. &lt;br /&gt;
&lt;br /&gt;
When {{FuncArg|tolR}} or {{FuncArg|tolG}} are not set, they get the value of {{FuncArg|tolB}} by default. Normally you start with a '''ResetMask''', then chain a few calls to '''ColorKeyMask''' to cause transparent holes where each color of interest occurs. See [[Overlay]] for examples.&lt;br /&gt;
&lt;br /&gt;
{{FuncDef|ColorKeyMask(clip ''clip'', int ''color'' [, int ''tolB'', int ''tolG'', int ''tolR''])}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::Source clip. Color format must be [[RGB32]].&lt;br /&gt;
::{{AvsPluscon}} also supports [[RGB64]] and [[PlanarRGBA]].&lt;br /&gt;
&lt;br /&gt;
:{{Par2|color|int|black}}&lt;br /&gt;
::Transparent color. Default black.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|tolB|int|10{{Template:D}}}}&lt;br /&gt;
:{{Par2|tolG|int|(tolB)}}&lt;br /&gt;
:{{Par2|tolR|int|(tolB)}}&lt;br /&gt;
::Color tolerance. See description above.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
 | v2.58&lt;br /&gt;
 | ColorKeyMask: Added separate tolerance levels.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/RemoveDirt</id>
		<title>RemoveDirt</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/RemoveDirt"/>
				<updated>2025-01-09T07:20:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* SCSelect */ mention YUY2 unsupport, cache hints&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Restoration_filters|Luma_equalization|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
| {{Author/kassandro}}, {{Author/pinterf}}&lt;br /&gt;
| v1.1&lt;br /&gt;
| [http://github.com/pinterf/RemoveDirt/releases RemoveDirt-1.1.7z]&lt;br /&gt;
| Luma Equalization  &lt;br /&gt;
| [http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=70856 Doom9 Thread (original)], [http://forum.doom9.org/showthread.php?t=176199 Doom9 Thread (update)]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
RemoveDirt is a temporal cleaner for AviSynth 2.6, [[AviSynth+]] and VapourSynth. It has now become a script function which involves RestoreMotionBlocks and various filters from the [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The plugin contains 2 filters:&lt;br /&gt;
*[[#RestoreMotionBlocks|RestoreMotionBlocks]] which is the main function used in the [[#RemoveDirt Script|RemoveDirt script]].&lt;br /&gt;
*[[#SCSelect|SCSelect]] is a scence change detention filter meant to be use with RestoreMotionBlocks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
**AviSynth+: All [[planar]]  Y and YUV formats (8/10/12/14/16-bit) are supported. [[#SCSelect|SCSelect]] also supports 32-bit float and planar RGB. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
===RestoreMotionBlocks===&lt;br /&gt;
:{{Template:FuncDef|RestoreMotionBlocks (clip filtered, clip restore, clip &amp;quot;neighbour&amp;quot;, clip &amp;quot;neighbour2&amp;quot;, clip &amp;quot;alternative&amp;quot;, bool &amp;quot;planar&amp;quot;, bool &amp;quot;show&amp;quot;, bool &amp;quot;debug&amp;quot;, int &amp;quot;gmthreshold&amp;quot;, int &amp;quot;mthreshold&amp;quot;, int &amp;quot;noise&amp;quot;, int &amp;quot;noisy&amp;quot;, int &amp;quot;dist&amp;quot;, int &amp;quot;tolerance&amp;quot;, int &amp;quot;dmode&amp;quot;, int &amp;quot;pthreshold&amp;quot;, int &amp;quot;cthreshold&amp;quot;, bool &amp;quot;grey&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2|neighbour|clip| }}&lt;br /&gt;
::{{Par2|neighbour2|clip| }}&lt;br /&gt;
::{{Par2|alternative|clip| }}&lt;br /&gt;
:::The first five variables are clip variables. All clips must be of the same type (same width, height and color space). The number of frames is the minimum of the length of all these five clips. The first two variables are mandatory and are unnamed. &amp;quot;filtered&amp;quot; is usually an aggressively filtered clip, from which motion artifacts have to removed. If RestoreMotionBlocks identfies an 8x8 block as a motion block, it copies this block from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. This is the basic operation of RestoreMotionBlocks. To identify motion blocks RestoreMotionBlocks uses the clip &amp;quot;neighbour&amp;quot;. The default value for neighbour is the &amp;quot;restore&amp;quot; clip. However, in the RemoveDirt script &amp;quot;neighbour&amp;quot; is different from &amp;quot;restore&amp;quot;. &lt;br /&gt;
:::*The &amp;quot;neighbour2&amp;quot; is for using RemoveDirt in combination with motion compensation filters like [[MVTools]] (see RemoveDirtMC below). Finally, if the number of motion blocks exceeds the percentage specified in the &amp;quot;gmthreshold&amp;quot; variable, then RestoreMotionBlocks simply takes the frame from the clip &amp;quot;alternative&amp;quot;. In this way, scene switches or global motion can be handled specifically. The clip &amp;quot;restore&amp;quot; is the default value  for &amp;quot;alternative&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value). The parameter is ineffective from v1.0 since YUY2 is no longer supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|show|bool|false}}&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::The boolean variables &amp;quot;show&amp;quot; and &amp;quot;debug&amp;quot; are used for debugging (see section Debugging). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|gmthreshold|int|80}}&lt;br /&gt;
:::The default value for gmthreshold is 80, i.e. if 80% of the blocks are motion blocks, then the frame is taken from &amp;quot;alternative&amp;quot; clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|mthreshold|int|160}}&lt;br /&gt;
:::&amp;quot;mthreshold&amp;quot; is similar as in the old RemoveDirt. However, because we now use the ordinary SAD for block comparison, the values should be somewhat higher, especially if the value of noise is low. The default value for &amp;quot;mthreshold&amp;quot; is 160&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|noise|int|0}}&lt;br /&gt;
::{{Par2|noisy|int|-1}}&lt;br /&gt;
:::With the variable &amp;quot;noise&amp;quot; one can specify a noise level, which should be ignored by the motion detection. The default value of &amp;quot;noise&amp;quot; is 0. &lt;br /&gt;
:::The variable &amp;quot;noisy&amp;quot; is used to specify the number of noisy pixels of an 8x8 block, which must be exceeded for a motion block. The default value of &amp;quot;noisy&amp;quot; is -1.&lt;br /&gt;
:::If noisy &amp;gt;= 0 and noise &amp;gt; 0, then the value of &amp;quot;mthreshold&amp;quot; is ignored.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dist|int|1}}&lt;br /&gt;
::{{Par2|tolerance|int|12}}&lt;br /&gt;
:::dist and tolerance control basic motion detection. dist=1 and tolerance=12 are the default values. A block B is considered a  neighbor of a block A by RestoreMotionBlocks, if both horizontally and vertically both blocks are only dist blocks apart. For dist=0 a block has only one neighbor, the block itself. If dist=1, then a block has 9 neighbors, if it is not located at the boundary. If dist=2, then each inner block has 25 neighbors and if dist= 3 then it has 49 neighbors etc.. Now for a given block RestoreMotionBlocks counts all the neighbor blocks which are marked as motion blocks. If the percentage of motion blocks among all neighbor blocks exceeds the value of tolerance, then the block is not cleaned. Thus in the default case of 9 neighbor blocks and tolerance=12 one motion block is allowed and cleaning will nevertheless be allowed. In particular, a motion block is cleaned, if it has no other motion blocks as neighbors. This is reasonable, because motion rarely occurs on one tiny block alone. On the other, if motion blocks have a certain density then also the neighbors should not be cleaned. This is the idea behind the variables dist and tolerance. A higher value of dist results in less cleaning. The higher the value of tolerance, the more cleaning. If tolerance &amp;gt;=100 then all blocks are cleaned.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dmode|int|0}}&lt;br /&gt;
:::*If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. &lt;br /&gt;
:::*If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is discarded if there exists no further phase 1 motion block with a distance less than 1. &lt;br /&gt;
:::*Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|pthreshold|int|10}}&lt;br /&gt;
::{{Par2|cthreshold|int|pthreshold}}&lt;br /&gt;
:::Parameters &amp;quot;pthreshold&amp;quot; and &amp;quot;cthreshold&amp;quot; are thresholds for luma and chroma, respectively. For 10-16 bits (where actual pixel values and thus SAD values are larger) the parameter is automatically normalized internally. You can keep it the same across different formats for the same effect.&amp;lt;br&amp;gt;For postprocessing RestoreMotionBlocks uses the variable pthreshold and cthreshold. If the total luma difference of the two adjacent border line increases by more than pthreshold, then cleaning of the block is undone by RestoreMotionBlocks. Similarily cleaning is undone, if the chroma difference exceedes cthreshold. The maximal difference of 8 pixels is 8*255. If cthreshold is larger than this value, then chroma postprocessing is disabled. If both, pthreshold and cthreshold,  are larger than the maximal value, then postprocessing is completely disabled. pthreshold=10 is the default value and if nothing else is specified cthreshold has the same value as pthreshold. Clearly luma postprocessing is much more important than chroma postprocessing. If cthreshold and especially pthreshold, then rather unpleasant blocky artifacts become visible. These are much more likely in areas with very flat contrast. Of course, there must be motion as well to get such artifacts. If you see these typical blocky artifacts, you should lower the thresholds. Postprocessing should only be disabled if all the cleaned frames are checked for artifacts. By the very nature of the algorithm no postprocessing will occur if all blocks were cleaned. There must be at least one block, which has not been cleaned to trigger postprocessing. The postprocessing algorithm loops through all the blocks as long as it can find blocks to be restored, nevertheless it is quite efficient. It is the basic philosophy of RestoreMotionBlocks, that motion detection needs only detect at least one but not all blocks of a moving object. The rest is then taken care by postprocessing. &lt;br /&gt;
&lt;br /&gt;
:::Negative values are allowed for pthreshold and cthreshold, but are not very reasonable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|grey|bool|false}}&lt;br /&gt;
:::If grey=true the chroma of the clip &amp;quot;filtered&amp;quot; is not touched by RestoreMotionBlocks. Also for postprocessing only the luma is used. This is slightly faster than grey=false. If you use grey=false for b&amp;amp;w clips, then it not only takes longer but also the quality may degrade, because chroma noise may trigger false postprocessing. Thus &amp;quot;grey=true&amp;quot; is highly recommended for b&amp;amp;w clips. &amp;lt;br&amp;gt;Greyscale (Y8..Y16) clips are automatically treated as grey=true.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====How RestoreMotionBlocks works====&lt;br /&gt;
To use the above variables properly, one has to understand how RestoreMotionBlocks works. It consists of three phases. For the first phase only the clip &amp;quot;neighbour&amp;quot; is used. Each frame is divided into a grid of 8x8 blocks. If  n is the number of the current frame, then for each block of this grid RestoreMotionBlocks looks at the luma of this block in neighbour(n-1) and neighbour(n+1). Note that we don't use the frame neighbour(n). There are three comparison methods (the old RemoveDirt has only one). &lt;br /&gt;
#If noise= 0, then simply the SAD of each block in  neighbour(n-1) and neighbour(n+1) is computed. If it is &amp;gt;= mthreshold, the block is identified as a motion block of frame n. This is the fasted method and a similar method was used in the old RemoveDirt. Its key disadvantage is that it may easily misled by noise.&lt;br /&gt;
#If noise &amp;gt;=0, then instead of SUM(|y-x|) RestoerMotionBlocks calculates SUM(| |y-x|-noise |). In particular, differences with absolute value &amp;lt;= noise are ignored. If it is &amp;gt;= mthreshold, then this block is identified as a motion block. We call this the noise adjusted SAD. From the way how the noise adjusted SAD is calculated, it is clear, that &amp;quot;mthreshold&amp;quot; should be decreased if  &amp;quot;noise&amp;quot; is increased. &lt;br /&gt;
#If noise &amp;gt;= 0 and noisy &amp;gt;= 0, then RestoreMotionblocks counts the number of pixels of a block, for which the absolute difference between neighbour(n-1) and neighbour(n+1) is &amp;gt;= noise. If this number is &amp;gt;=  value of &amp;quot;noisy&amp;quot;, then the block is identified as a motion block. We call this the NPC (= noisy pixel counting) method. The value of mthreshold is ignored, if NPC is selected.&lt;br /&gt;
Note that a block has 64 pixels. Thus, if noisy &amp;gt; 64, then there can't be any motion blocks. In my view NPC is clearly the best method. It has likely about half the speed of SAD and about the same speed as NSAD.  Noise=-1 and noisy=-1 are the default values. Thus SAD is the default method for the first phase. I ran most of my RemoveDirt tests with noise=8 or 10 and noisy= 12. &lt;br /&gt;
&lt;br /&gt;
In the sequel the motion blocks found in the first phase are called phase 1 motion blocks.  In the second phase, for each block all the motion blocks found in the first phase which have a distance &amp;lt;= dist are counted. If the result is &amp;gt;= (tolerance /100) * (the number of all first phase blocks with distance &amp;lt;= dist) , then this block is called a motion neighbour  block. For instance, if dist = 1 and tolerance= 12 (the default values), then there are 9 blocks with a distance &amp;lt;= 1. Since 1 &amp;lt; (12/100)*9 &amp;lt; 2, there must be at least 2 phase 1 motion blocks among the 9 neighbour blocks such that the block is marked as a motion neighbour block. If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is dicarded if there exists no further phase 1 motion block with a distance less than 1. Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. If dist=0 or dmode=2 gmthreshold should be lowered to 60 or even 50. &lt;br /&gt;
&lt;br /&gt;
The third phase, called the postprocessing phase, starts with restoring the phase 2 motion blocks by copying them from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. All phase 2 motion blocks become also phase 3 motion blocks. Then the edges between motion and non-motion blocks are inspected. To this end the SAD of the two adjacent border line segments is calculated twice (these line segments are either horizontal or vertical and are 8 pixels long). It is calculated first in the clip &amp;quot;restore&amp;quot; and then in the clip &amp;quot;filtered&amp;quot;. In the clip &amp;quot;filtered&amp;quot; the two blocks are from two different sources, one block, the motion block was restored from the clip &amp;quot;restore&amp;quot; and the non-motion block is from the original clip &amp;quot;filtered&amp;quot;. Since the frames of the clip &amp;quot;restore&amp;quot; are not changed at all, both blocks are from the same source and should therefore fit together. If the edge SAD in the clip &amp;quot;filtered&amp;quot; &amp;gt; (edge SAD in the clip restore) + pthreshold, then the block is marked as a new (additional) phase 3 motion block and the block is restored by copying it from &amp;quot;restore&amp;quot; to &amp;quot;filtered&amp;quot;, because the two blocks in &amp;quot;filtered&amp;quot; don't fit together well enough compared with the two blocks in &amp;quot;restore&amp;quot;. In other words,  in this phase, it is checked whether a restored block fits to the yet unrestored blocks. If it doesn't, the not yet restored blocks, which do not fit well, are marked as phase 3 motion blocks and are restored as well. This procedure is repeated until there are no more blocks, which can be tested. If the value of the grey variable is false, then the same is done for the luma and the chroma (for the chroma the variable cthreshold is used instead of pthreshold). If grey= true, then postprocessing is only done for the luma.&lt;br /&gt;
Finally, if the percentage of all phase 3 motion blocks with respect to all blocks exceeds the value of gmthreshold, then the &amp;quot;filtered&amp;quot; frame is discarded and replaced by the corresponding frame in &amp;quot;alternative&amp;quot;.  In this way, we can give special treatments for sharp scene switches and scenes with a moving or zooming camera.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====Debugging====&lt;br /&gt;
&lt;br /&gt;
The boolean variable debug and show are used for debugging. If show=true, then the blocks, which are marked as motion blocks in the first phase are colored red, those found in the second phase are colored green and finally the motion blocks marked by postprocessing are colored blue. In this way, one can easily check whether the above variables were selected appropriately. if debug=true, then RestoreMotionBlocks sends  output of the following kind to the debugview  utility:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[348] [21495] RemoveDirt: motion blocks =  942(14%), 1652(25%),  635( 9%), loops = 31&lt;br /&gt;
[348] [21496] RemoveDirt: motion blocks = 1745(26%), 2330(35%),   64( 0%), loops = 3&lt;br /&gt;
[348] [21497] RemoveDirt: motion blocks = 1480(22%), 1973(30%),   45( 0%), loops = 4&lt;br /&gt;
[348] [21498] RemoveDirt: motion blocks = 1081(16%), 1915(29%),   65( 1%), loops = 2&lt;br /&gt;
[348] [21499] RemoveDirt: motion blocks = 1403(21%), 2380(36%),  235( 3%), loops = 10&lt;br /&gt;
[348] [21500] RemoveDirt: motion blocks = 2618(40%), 2204(34%),   59( 0%), loops = 5&lt;br /&gt;
[348] [21501] RemoveDirt: motion blocks =  986(15%), 2065(31%),   75( 1%), loops = 3&lt;br /&gt;
[348] [21502] RemoveDirt: motion blocks = 1214(18%), 2291(35%),   78( 1%), loops = 3&lt;br /&gt;
[348] [21503] RemoveDirt: motion blocks = 1348(20%), 2179(33%),   57( 0%), loops = 4&lt;br /&gt;
[348] [21504] RemoveDirt: motion blocks =  961(14%), 1957(30%),   71( 1%), loops = 3&lt;br /&gt;
[348] [21505] RemoveDirt: motion blocks = 1833(28%), 2201(33%),   38( 0%), loops = 3&lt;br /&gt;
[348] [21506] RemoveDirt: motion blocks = 1644(25%), 2183(33%),   53( 0%), loops = 5&lt;br /&gt;
[348] [21507] RemoveDirt: motion blocks = 1420(21%), 2541(39%),  132( 2%), loops = 5&lt;br /&gt;
[348] [21508] RemoveDirt: motion blocks = 2238(34%), 2229(34%),  104( 1%), loops = 4&lt;br /&gt;
[348] [21509] RemoveDirt: motion blocks = 1351(20%), 2294(35%),  181( 2%), loops = 6&lt;br /&gt;
[348] [21510] RemoveDirt: motion blocks =  931(14%), 1800(27%),  229( 3%), loops = 5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number in brackets on the left hand side is the id of the process, which runs the script, the second number in brackets is the frame number. The first number (with percentages in brackets) after &amp;quot;motion blocks =&amp;quot;  is the number of phase 1 motion blocks, the second is the difference between phase 2 and phase 1 motion blocks (always &amp;gt;=0 if dmode=0, always &amp;lt;= 0 if dmode= 2) and the third is the difference between phase 3 and phase 2 motion blocks (always &amp;gt;= 0). Finally the number after &amp;quot;loops =&amp;quot; is the number of postprocessing loops used for this frame. Debug=true can be used to monitor RestoreMotionBlocks in an encoding process. Of course, show=true can only be used before an encoding process to find the right values for the various variables. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===SCSelect===&lt;br /&gt;
SCSelect is a special filter, which distinguishes between scene begins, scene ends and global motion. The output of SCClense is used as an &amp;quot;alternative&amp;quot; clip for RestoreMotionBlocks. It can hardly used for other purposes, because it can only make proper decisions if there are a lot of motion blocks. Only if the percentage of motion blocks is &amp;gt; gmthreshold, then RestoreMotionBlocks chooses a frame from the clip specified with the alternative variable and then there are always a lot of motion blocks, if gmthreshold is not too small (gmthreshold &amp;gt;= 30 should be sufficiently large). SCSelect yields nonsense results if there are only few motion blocks. SCSelect is used as follows:&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|SCSelect (clip input, clip scene_begin, clip scene_end, clip global_motion, float &amp;quot;dfactor&amp;quot;, bool &amp;quot;debug&amp;quot;, bool &amp;quot;planar&amp;quot;, int &amp;quot;cache&amp;quot;, int &amp;quot;gcache&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::The first four clip variables are mandatory and have no name. All four clips must have the same color space, width and height. The first clip is the clip, on which SCSelect bases its decision. Usually it should be the same clip, which was specified with the &amp;quot;neighbour&amp;quot; variable in RestoreMotionBlocks. If SCSelect realises a scene begin, it selects its output frame from the clip scene_begin. If SCSelect realises a scene end, it selects its output frame from the clip scene_end. If SCSelect realises a global motion, it selects its output frame from the clip global motion. Thus SCSelect doesn't produce any new frames. It only makes a selection from three different sources.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dfactor|float|4.0}}&lt;br /&gt;
:::Dfactor is the key variable for scene switch sensitivity. The higher dfactor the less scene begins and scene ends and the more global motion frames are detected. Dfactor=4.0 is the default value. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::If debug=true, then SCSelect sends output of the following type to the [http://technet.microsoft.com/en-us/library/bb896647.aspx DebugView]  utility:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 47em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[3416] [67865] SCSelect: global motion&lt;br /&gt;
[3416] [67866] SCSelect: global motion&lt;br /&gt;
[3416] [67870] SCSelect: global motion&lt;br /&gt;
[3416] [67871] SCSelect: global motion&lt;br /&gt;
[3416] [67873] SCSelect: global motion&lt;br /&gt;
[3416] [67874] SCSelect: global motion&lt;br /&gt;
[3416] [67877] SCSelect: global motion&lt;br /&gt;
[3416] [68318] SCSelect: global motion&lt;br /&gt;
[3416] [68319] SCSelect: global motion&lt;br /&gt;
[3416] [68557] SCSelect: scene end&lt;br /&gt;
[3416] [68558] SCSelect: scene begin&lt;br /&gt;
[3416] [69481] SCSelect: scene end&lt;br /&gt;
[3416] [69482] SCSelect: scene begin&lt;br /&gt;
[3416] [70240] SCSelect: scene end&lt;br /&gt;
[3416] [70241] SCSelect: scene begin&lt;br /&gt;
[3416] [70406] SCSelect: global motion&lt;br /&gt;
[3416] [70407] SCSelect: global motion&lt;br /&gt;
[3416] [70408] SCSelect: global motion&lt;br /&gt;
[3416] [70409] SCSelect: global motion&lt;br /&gt;
[3416] [70410] SCSelect: global motion&lt;br /&gt;
[3416] [72032] SCSelect: global motion&lt;br /&gt;
[3416] [72164] SCSelect: global motion&lt;br /&gt;
[3416] [72165] SCSelect: global motion		&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:::To describe the basic idea  behind SCSelect let SAD(n)  be the SAD difference between the frames input(n) and input(n+1). Now, if SAD(n) &amp;gt; dfactor * SAD(n-1), then SCSelect recognizes a scene end and pulls the frame from the clip scene_end. If SAD(n-1) &amp;gt; dfactor * SAD(n), then SCSelect recognizes a scene begin and pulls the frame from the clip scene_begin. If both SAD(n) &amp;lt;= dfactor * SAD(n-1) and SAD(n-1) &amp;lt;= dfactor * SAD(n), then SCSelect recognizes a global motion and pulls the frame from the clip global_motion. From this description it is clear that dfactor must be &amp;gt; 1 for getting reasonable results. The above algorithm is optimized such that often only one and not two SADs are calculated for one requested frame. However, there are certain shortcomings. If a scene ends with global motion, then SCSelect often can't detect the scene end. If a scene begins with global motion, then SCSelect often can't detect the scene begin. These two effects are usually responsible if lonely scene begins and scene ends are detected by SCSelected, otherwise each scene begin should be preceded by a scene end. By refining the above algorithm we could avoid lonely scene begins and scene ends, but there is one situation, where even such a refinement fails. Namely if the scene ends with global motion and the new scene starts with global motion. Then a sharp scene switch can only be detected reliably with a good motion analysis, which would result in an extreme slow down of the filter. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value). The parameter is ineffective from v1.0 since YUY2 is no longer supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|cache|int|2}}&lt;br /&gt;
::{{Par2|gcache|int|0}}&lt;br /&gt;
:::Undocumented parameters, meant to add Avisynth video cache hints (up to Avisynth 2.6).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RemoveDirt Script ==&lt;br /&gt;
RemoveDirt has now become a script function, which involves RestoreMotionBlocks and various filters from [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&lt;br /&gt;
During the tests I used the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function RemoveDirt(clip input, bool &amp;quot;_grey&amp;quot;, int &amp;quot;repmode&amp;quot;) &lt;br /&gt;
{&lt;br /&gt;
    _grey=default(_grey, false)&lt;br /&gt;
	repmode=default(repmode, 16)&lt;br /&gt;
	clmode=17&lt;br /&gt;
	clensed=Clense(input, grey=_grey, cache=4)&lt;br /&gt;
	sbegin = ForwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	send = BackwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode ) &lt;br /&gt;
	restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)&lt;br /&gt;
	corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)&lt;br /&gt;
	return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us discuss this script in some detail. Firstly, we apply the brutal temporal clenser from the RemoveGrain package to obtain the clip &amp;quot;clensed&amp;quot;. Then we use the filters ForwardClense and BackwardClense from RemoveGrain to construct the clip &amp;quot;alt&amp;quot;, which is then used as the &amp;quot;alternative&amp;quot; variable in the subsequent RestoreMotionBlocks. While Clense does a lot of cleaning it certainly creates a lot of artifacts in motion areas. In RemoveDirt this repair is only made in motion areas. The static areas are not repaired. Since the clip is used only for restoring motion areas, we can use the much stronger Repair mode 16, which restores thin lines destroyed by clense. Finally, because there may be some left over from temporal cleaning especially when grain is dense, we use the spatial denoiser RemoveGrain(mode=17) to remove these dirt or grain rests.&lt;br /&gt;
&lt;br /&gt;
=== Optimal Usage ===&lt;br /&gt;
&lt;br /&gt;
1. If possible, crop after RestoreMotionBlocks. Modern codecs divide the frames in the same way as RemoveDirt into a grid of 8x8 pixel blocks to perform the crucial discret cosine transform for such blocks. Now if the clip is cropped after RemoveDirt, then the grid of RemoveDirt and the codec are likely to be different resulting in inferior compression. There is one exception, though: cropping afterwards does not hurt, if all four sides are cropped by a multiple of 8. For instance, crop(8,64,0,-72) is ok. On the other hand, one should crop after RemoveGrain/Repair if possible, because this filters cannot process the boundary pixels. Thus the optimal solution is to crop afterwards and then only by multiples of 8, which unfortunately is not always possible.&lt;br /&gt;
&lt;br /&gt;
2. Avisynth 2.6 hint: Crop only with &amp;quot;align=true&amp;quot;. RestoreMotionBlocks uses SSE2 instructions. If you crop without &amp;quot;align= true&amp;quot; before RestoreMotionBlocks, then the data on the frames may not be properly aligned and RemoveDirt will execute substantially slower. As a consequence you should always crop with Avisynth and not with DVD2AVI or DGIndex.&lt;br /&gt;
For Avisynth+ there is no need for such precautions, Crop is always producing aligned frames.&lt;br /&gt;
&lt;br /&gt;
3. Telecined movies must be inverse telecined before RemoveDirt. If a film is telecined some fields are doubled in order to increase the frame rate from 24fps to 30fps. Hence on such doubled fields the basic property of dirt, described above, is no more valid and no temporal cleaner can ever spot dirt on such doubled fields. On the other hand, after an inverse telecine usually every fourth frame is composed of fields, which originate from two different frames. Visually these two fields fit together well but both are from a different compression context, which can mislead RemoveDirt to false motion detection. In extreme cases, one field may be from an I- or P-frame, while the other is from a B-frame. But even if the fields are from from frames of identical type, the different compression context has a substantial effect. Consequently RemoveDirt performes less well on inverse telecined movies than on natively progressive movies. By the same reason also compression of inverse telcined movies is worse than of natively progressive movies. We in Europe should thank god every day that we are not getting telecined. However, here in Germany we have digital tv broadcasters, which like to comb progressive films (about 5% of all progressive movies from ARD and especially ZDF are combed). Fortunately these idiots are not able to double fields, so RemoveDirt should work, but on combed films the dirt is always split over two frames which clearly hurts RemoveDirt. On the other hand, if these combed films are uncombed, then we have the compression context problem for any frame and not only for any fourth frame. Stepping through the video with the builtin filter Bob() one can decide with near absolute certainty, whether the video is truely progressive, interlaced, telecined, field blended or progressive with a field shift.&lt;br /&gt;
&lt;br /&gt;
4. Put other filters after RemoveDirt. Except those filters mentioned before, like crop and inverse telecine, all other filters should be put after RemoveDirt in the Avisynth script, because most filters have a negative rather than a positive impact on dirt detection.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Change Log ==&lt;br /&gt;
&lt;br /&gt;
* v1.1 (20250108)&lt;br /&gt;
  - Fix SCSelect (VapourSynth)&lt;br /&gt;
&lt;br /&gt;
* v1.0 (20250108)&lt;br /&gt;
  - Remove YUY2 support (not even with &amp;quot;planar hack&amp;quot;)&lt;br /&gt;
  - VapourSynth support (API 4) (dual Avisynth/VapourSynth plugin)&lt;br /&gt;
    VS version supports the very same basic parameters like the Avisynth version except&lt;br /&gt;
    some historical compatibility parameters:&lt;br /&gt;
    - RestoreMotionBlocks is omitting &amp;quot;planar&amp;quot;&lt;br /&gt;
    - SCSelect is omitting &amp;quot;planar&amp;quot;, &amp;quot;cache&amp;quot;, &amp;quot;gcache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* v0.9.3 (20210223)&lt;br /&gt;
  - Fix a crash, which can occur on non mod8 sources&lt;br /&gt;
&lt;br /&gt;
* v0.9.2 (20190324)&lt;br /&gt;
  - RestoreMotionBlocks: 10-16 bit support. Relevant threshold and noise parameters are bit depth independent.&lt;br /&gt;
  - minor speedup&lt;br /&gt;
  - SCSelect: add support for 10-16 bits and 32 bit float clips&lt;br /&gt;
  - SCSelect: add support for planar RGB&lt;br /&gt;
  - FIX: SCSelect: make it work properly for large frames (&amp;gt;8MPixel)&lt;br /&gt;
  - FIX: SCSelect: Makes use the whole frame: now counts the rightmost non-mod32 pixels as well.&lt;br /&gt;
  - Clang support (LLVM) with Visual Studio 2017&lt;br /&gt;
  - update html docs&lt;br /&gt;
  - add clang-built DLLs to the released version&lt;br /&gt;
&lt;br /&gt;
* v0.9.1 (20190314)&lt;br /&gt;
  - project moved to github: https://github.com/pinterf/RemoveDirt&lt;br /&gt;
  - built using Visual Studio 2017&lt;br /&gt;
  - x64 build for Avisynth+&lt;br /&gt;
  - Added version resource to DLL&lt;br /&gt;
  - Changed to AVS 2.6 plugin interface&lt;br /&gt;
  - Fix: RestoreMotionBlocks: grey=false: it was copying 8x4 chroma pixels for YV12 and 8x8 for YUY2 instead of 4x4 and 8x4 blocks&lt;br /&gt;
  - Fix: SCSelect: Old v0.9 SSE2 code omitted difference checking for every second 8 columns&lt;br /&gt;
  - Removed MMX code, now requires SSE2&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_SERIALIZED]] for SCSelect&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_MULTI_INSTANCE]] for RestoreMotionBlocks (may not be any faster)&lt;br /&gt;
  - Added Y, YV16 and YV24 support besides existing YV12 and planar-hacked-YUY2&lt;br /&gt;
&lt;br /&gt;
* v0.9 (20050507)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Mirror&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Comments&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Source code&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|[http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|[https://web.archive.org/web/20150405173333if_/http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|includes statically and dynamically linked [[SSE2]] binaries compiled with MSVC2010. Dynamically linked binaries requires the [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 Redistributable Package (x86)] to be installed.&lt;br /&gt;
|Included with the binaries.&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|&amp;lt;strike&amp;gt;[https://web.archive.org/web/20140723074402if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.zip ReduceDirt.zip]&amp;lt;/strike&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|includes 3 binaries: one statically linked (&amp;lt;tt&amp;gt;RemoveDirtS.dll&amp;lt;/tt&amp;gt;) and two dynamically linked (&amp;lt;tt&amp;gt;RemoveDirt.dll, RemoveDirtSSE2.dll&amp;lt;/tt&amp;gt;). &lt;br /&gt;
SSE2 version is recommended but unfortunately it requires the &amp;lt;tt&amp;gt;Msvcr71.dll&amp;lt;/tt&amp;gt; runtime component from the very ancient Microsoft Visual C++ .NET 2003. For this reason this package is considered deprecated!&lt;br /&gt;
|[https://web.archive.org/web/20141121054131if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt-src.zip  ReduceDirt-src.zip]&lt;br /&gt;
|-&lt;br /&gt;
!v0.6.1&lt;br /&gt;
|[https://web.archive.org/web/20050215121957if_/http://home.pages.at/kassandro/RemoveDirt/RemoveDirt.zip RemoveDirt.zip]&lt;br /&gt;
|&lt;br /&gt;
|Old archived documentation: [https://web.archive.org/web/20050311122626/http://www.removedirt.de.tf www.removedirt.de.tf]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[https://web.archive.org/web/20160610102940/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.htm RemoveDirt.htm] - official v0.9 documentation. &lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=641337#post641337&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1560013&amp;amp;highlight=scselect#post1560013&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1564754&amp;amp;highlight=scselect#post1564754&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1518730&amp;amp;highlight=scselect#post1518730&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1409324#post1409324&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1483843&amp;amp;highlight=scselect#post1483843&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1488392&amp;amp;highlight=scselect#post1488392&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1479632&amp;amp;highlight=scselect#post1479632&lt;br /&gt;
*http://forum.doom9.org/showthread.php?t=145753&amp;amp;highlight=scselect&amp;amp;page=2&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1206869&amp;amp;highlight=scselect#post1206869&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1351709&amp;amp;highlight=scselect#post1351709&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1405939&amp;amp;highlight=scselect#post1405939&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1205317&amp;amp;highlight=scselect#post1205317&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1507954&amp;amp;highlight=scselect#post1507954&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#Luma_Equalization|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/RemoveDirt</id>
		<title>RemoveDirt</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/RemoveDirt"/>
				<updated>2025-01-09T07:18:23Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* RestoreMotionBlocks */ YUY2 planar not supported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Restoration_filters|Luma_equalization|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
| {{Author/kassandro}}, {{Author/pinterf}}&lt;br /&gt;
| v1.1&lt;br /&gt;
| [http://github.com/pinterf/RemoveDirt/releases RemoveDirt-1.1.7z]&lt;br /&gt;
| Luma Equalization  &lt;br /&gt;
| [http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=70856 Doom9 Thread (original)], [http://forum.doom9.org/showthread.php?t=176199 Doom9 Thread (update)]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
RemoveDirt is a temporal cleaner for AviSynth 2.6, [[AviSynth+]] and VapourSynth. It has now become a script function which involves RestoreMotionBlocks and various filters from the [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The plugin contains 2 filters:&lt;br /&gt;
*[[#RestoreMotionBlocks|RestoreMotionBlocks]] which is the main function used in the [[#RemoveDirt Script|RemoveDirt script]].&lt;br /&gt;
*[[#SCSelect|SCSelect]] is a scence change detention filter meant to be use with RestoreMotionBlocks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
**AviSynth+: All [[planar]]  Y and YUV formats (8/10/12/14/16-bit) are supported. [[#SCSelect|SCSelect]] also supports 32-bit float and planar RGB. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
===RestoreMotionBlocks===&lt;br /&gt;
:{{Template:FuncDef|RestoreMotionBlocks (clip filtered, clip restore, clip &amp;quot;neighbour&amp;quot;, clip &amp;quot;neighbour2&amp;quot;, clip &amp;quot;alternative&amp;quot;, bool &amp;quot;planar&amp;quot;, bool &amp;quot;show&amp;quot;, bool &amp;quot;debug&amp;quot;, int &amp;quot;gmthreshold&amp;quot;, int &amp;quot;mthreshold&amp;quot;, int &amp;quot;noise&amp;quot;, int &amp;quot;noisy&amp;quot;, int &amp;quot;dist&amp;quot;, int &amp;quot;tolerance&amp;quot;, int &amp;quot;dmode&amp;quot;, int &amp;quot;pthreshold&amp;quot;, int &amp;quot;cthreshold&amp;quot;, bool &amp;quot;grey&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2|neighbour|clip| }}&lt;br /&gt;
::{{Par2|neighbour2|clip| }}&lt;br /&gt;
::{{Par2|alternative|clip| }}&lt;br /&gt;
:::The first five variables are clip variables. All clips must be of the same type (same width, height and color space). The number of frames is the minimum of the length of all these five clips. The first two variables are mandatory and are unnamed. &amp;quot;filtered&amp;quot; is usually an aggressively filtered clip, from which motion artifacts have to removed. If RestoreMotionBlocks identfies an 8x8 block as a motion block, it copies this block from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. This is the basic operation of RestoreMotionBlocks. To identify motion blocks RestoreMotionBlocks uses the clip &amp;quot;neighbour&amp;quot;. The default value for neighbour is the &amp;quot;restore&amp;quot; clip. However, in the RemoveDirt script &amp;quot;neighbour&amp;quot; is different from &amp;quot;restore&amp;quot;. &lt;br /&gt;
:::*The &amp;quot;neighbour2&amp;quot; is for using RemoveDirt in combination with motion compensation filters like [[MVTools]] (see RemoveDirtMC below). Finally, if the number of motion blocks exceeds the percentage specified in the &amp;quot;gmthreshold&amp;quot; variable, then RestoreMotionBlocks simply takes the frame from the clip &amp;quot;alternative&amp;quot;. In this way, scene switches or global motion can be handled specifically. The clip &amp;quot;restore&amp;quot; is the default value  for &amp;quot;alternative&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value). The parameter is ineffective from v1.0 since YUY2 is no longer supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|show|bool|false}}&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::The boolean variables &amp;quot;show&amp;quot; and &amp;quot;debug&amp;quot; are used for debugging (see section Debugging). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|gmthreshold|int|80}}&lt;br /&gt;
:::The default value for gmthreshold is 80, i.e. if 80% of the blocks are motion blocks, then the frame is taken from &amp;quot;alternative&amp;quot; clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|mthreshold|int|160}}&lt;br /&gt;
:::&amp;quot;mthreshold&amp;quot; is similar as in the old RemoveDirt. However, because we now use the ordinary SAD for block comparison, the values should be somewhat higher, especially if the value of noise is low. The default value for &amp;quot;mthreshold&amp;quot; is 160&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|noise|int|0}}&lt;br /&gt;
::{{Par2|noisy|int|-1}}&lt;br /&gt;
:::With the variable &amp;quot;noise&amp;quot; one can specify a noise level, which should be ignored by the motion detection. The default value of &amp;quot;noise&amp;quot; is 0. &lt;br /&gt;
:::The variable &amp;quot;noisy&amp;quot; is used to specify the number of noisy pixels of an 8x8 block, which must be exceeded for a motion block. The default value of &amp;quot;noisy&amp;quot; is -1.&lt;br /&gt;
:::If noisy &amp;gt;= 0 and noise &amp;gt; 0, then the value of &amp;quot;mthreshold&amp;quot; is ignored.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dist|int|1}}&lt;br /&gt;
::{{Par2|tolerance|int|12}}&lt;br /&gt;
:::dist and tolerance control basic motion detection. dist=1 and tolerance=12 are the default values. A block B is considered a  neighbor of a block A by RestoreMotionBlocks, if both horizontally and vertically both blocks are only dist blocks apart. For dist=0 a block has only one neighbor, the block itself. If dist=1, then a block has 9 neighbors, if it is not located at the boundary. If dist=2, then each inner block has 25 neighbors and if dist= 3 then it has 49 neighbors etc.. Now for a given block RestoreMotionBlocks counts all the neighbor blocks which are marked as motion blocks. If the percentage of motion blocks among all neighbor blocks exceeds the value of tolerance, then the block is not cleaned. Thus in the default case of 9 neighbor blocks and tolerance=12 one motion block is allowed and cleaning will nevertheless be allowed. In particular, a motion block is cleaned, if it has no other motion blocks as neighbors. This is reasonable, because motion rarely occurs on one tiny block alone. On the other, if motion blocks have a certain density then also the neighbors should not be cleaned. This is the idea behind the variables dist and tolerance. A higher value of dist results in less cleaning. The higher the value of tolerance, the more cleaning. If tolerance &amp;gt;=100 then all blocks are cleaned.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dmode|int|0}}&lt;br /&gt;
:::*If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. &lt;br /&gt;
:::*If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is discarded if there exists no further phase 1 motion block with a distance less than 1. &lt;br /&gt;
:::*Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|pthreshold|int|10}}&lt;br /&gt;
::{{Par2|cthreshold|int|pthreshold}}&lt;br /&gt;
:::Parameters &amp;quot;pthreshold&amp;quot; and &amp;quot;cthreshold&amp;quot; are thresholds for luma and chroma, respectively. For 10-16 bits (where actual pixel values and thus SAD values are larger) the parameter is automatically normalized internally. You can keep it the same across different formats for the same effect.&amp;lt;br&amp;gt;For postprocessing RestoreMotionBlocks uses the variable pthreshold and cthreshold. If the total luma difference of the two adjacent border line increases by more than pthreshold, then cleaning of the block is undone by RestoreMotionBlocks. Similarily cleaning is undone, if the chroma difference exceedes cthreshold. The maximal difference of 8 pixels is 8*255. If cthreshold is larger than this value, then chroma postprocessing is disabled. If both, pthreshold and cthreshold,  are larger than the maximal value, then postprocessing is completely disabled. pthreshold=10 is the default value and if nothing else is specified cthreshold has the same value as pthreshold. Clearly luma postprocessing is much more important than chroma postprocessing. If cthreshold and especially pthreshold, then rather unpleasant blocky artifacts become visible. These are much more likely in areas with very flat contrast. Of course, there must be motion as well to get such artifacts. If you see these typical blocky artifacts, you should lower the thresholds. Postprocessing should only be disabled if all the cleaned frames are checked for artifacts. By the very nature of the algorithm no postprocessing will occur if all blocks were cleaned. There must be at least one block, which has not been cleaned to trigger postprocessing. The postprocessing algorithm loops through all the blocks as long as it can find blocks to be restored, nevertheless it is quite efficient. It is the basic philosophy of RestoreMotionBlocks, that motion detection needs only detect at least one but not all blocks of a moving object. The rest is then taken care by postprocessing. &lt;br /&gt;
&lt;br /&gt;
:::Negative values are allowed for pthreshold and cthreshold, but are not very reasonable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|grey|bool|false}}&lt;br /&gt;
:::If grey=true the chroma of the clip &amp;quot;filtered&amp;quot; is not touched by RestoreMotionBlocks. Also for postprocessing only the luma is used. This is slightly faster than grey=false. If you use grey=false for b&amp;amp;w clips, then it not only takes longer but also the quality may degrade, because chroma noise may trigger false postprocessing. Thus &amp;quot;grey=true&amp;quot; is highly recommended for b&amp;amp;w clips. &amp;lt;br&amp;gt;Greyscale (Y8..Y16) clips are automatically treated as grey=true.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====How RestoreMotionBlocks works====&lt;br /&gt;
To use the above variables properly, one has to understand how RestoreMotionBlocks works. It consists of three phases. For the first phase only the clip &amp;quot;neighbour&amp;quot; is used. Each frame is divided into a grid of 8x8 blocks. If  n is the number of the current frame, then for each block of this grid RestoreMotionBlocks looks at the luma of this block in neighbour(n-1) and neighbour(n+1). Note that we don't use the frame neighbour(n). There are three comparison methods (the old RemoveDirt has only one). &lt;br /&gt;
#If noise= 0, then simply the SAD of each block in  neighbour(n-1) and neighbour(n+1) is computed. If it is &amp;gt;= mthreshold, the block is identified as a motion block of frame n. This is the fasted method and a similar method was used in the old RemoveDirt. Its key disadvantage is that it may easily misled by noise.&lt;br /&gt;
#If noise &amp;gt;=0, then instead of SUM(|y-x|) RestoerMotionBlocks calculates SUM(| |y-x|-noise |). In particular, differences with absolute value &amp;lt;= noise are ignored. If it is &amp;gt;= mthreshold, then this block is identified as a motion block. We call this the noise adjusted SAD. From the way how the noise adjusted SAD is calculated, it is clear, that &amp;quot;mthreshold&amp;quot; should be decreased if  &amp;quot;noise&amp;quot; is increased. &lt;br /&gt;
#If noise &amp;gt;= 0 and noisy &amp;gt;= 0, then RestoreMotionblocks counts the number of pixels of a block, for which the absolute difference between neighbour(n-1) and neighbour(n+1) is &amp;gt;= noise. If this number is &amp;gt;=  value of &amp;quot;noisy&amp;quot;, then the block is identified as a motion block. We call this the NPC (= noisy pixel counting) method. The value of mthreshold is ignored, if NPC is selected.&lt;br /&gt;
Note that a block has 64 pixels. Thus, if noisy &amp;gt; 64, then there can't be any motion blocks. In my view NPC is clearly the best method. It has likely about half the speed of SAD and about the same speed as NSAD.  Noise=-1 and noisy=-1 are the default values. Thus SAD is the default method for the first phase. I ran most of my RemoveDirt tests with noise=8 or 10 and noisy= 12. &lt;br /&gt;
&lt;br /&gt;
In the sequel the motion blocks found in the first phase are called phase 1 motion blocks.  In the second phase, for each block all the motion blocks found in the first phase which have a distance &amp;lt;= dist are counted. If the result is &amp;gt;= (tolerance /100) * (the number of all first phase blocks with distance &amp;lt;= dist) , then this block is called a motion neighbour  block. For instance, if dist = 1 and tolerance= 12 (the default values), then there are 9 blocks with a distance &amp;lt;= 1. Since 1 &amp;lt; (12/100)*9 &amp;lt; 2, there must be at least 2 phase 1 motion blocks among the 9 neighbour blocks such that the block is marked as a motion neighbour block. If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is dicarded if there exists no further phase 1 motion block with a distance less than 1. Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. If dist=0 or dmode=2 gmthreshold should be lowered to 60 or even 50. &lt;br /&gt;
&lt;br /&gt;
The third phase, called the postprocessing phase, starts with restoring the phase 2 motion blocks by copying them from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. All phase 2 motion blocks become also phase 3 motion blocks. Then the edges between motion and non-motion blocks are inspected. To this end the SAD of the two adjacent border line segments is calculated twice (these line segments are either horizontal or vertical and are 8 pixels long). It is calculated first in the clip &amp;quot;restore&amp;quot; and then in the clip &amp;quot;filtered&amp;quot;. In the clip &amp;quot;filtered&amp;quot; the two blocks are from two different sources, one block, the motion block was restored from the clip &amp;quot;restore&amp;quot; and the non-motion block is from the original clip &amp;quot;filtered&amp;quot;. Since the frames of the clip &amp;quot;restore&amp;quot; are not changed at all, both blocks are from the same source and should therefore fit together. If the edge SAD in the clip &amp;quot;filtered&amp;quot; &amp;gt; (edge SAD in the clip restore) + pthreshold, then the block is marked as a new (additional) phase 3 motion block and the block is restored by copying it from &amp;quot;restore&amp;quot; to &amp;quot;filtered&amp;quot;, because the two blocks in &amp;quot;filtered&amp;quot; don't fit together well enough compared with the two blocks in &amp;quot;restore&amp;quot;. In other words,  in this phase, it is checked whether a restored block fits to the yet unrestored blocks. If it doesn't, the not yet restored blocks, which do not fit well, are marked as phase 3 motion blocks and are restored as well. This procedure is repeated until there are no more blocks, which can be tested. If the value of the grey variable is false, then the same is done for the luma and the chroma (for the chroma the variable cthreshold is used instead of pthreshold). If grey= true, then postprocessing is only done for the luma.&lt;br /&gt;
Finally, if the percentage of all phase 3 motion blocks with respect to all blocks exceeds the value of gmthreshold, then the &amp;quot;filtered&amp;quot; frame is discarded and replaced by the corresponding frame in &amp;quot;alternative&amp;quot;.  In this way, we can give special treatments for sharp scene switches and scenes with a moving or zooming camera.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====Debugging====&lt;br /&gt;
&lt;br /&gt;
The boolean variable debug and show are used for debugging. If show=true, then the blocks, which are marked as motion blocks in the first phase are colored red, those found in the second phase are colored green and finally the motion blocks marked by postprocessing are colored blue. In this way, one can easily check whether the above variables were selected appropriately. if debug=true, then RestoreMotionBlocks sends  output of the following kind to the debugview  utility:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[348] [21495] RemoveDirt: motion blocks =  942(14%), 1652(25%),  635( 9%), loops = 31&lt;br /&gt;
[348] [21496] RemoveDirt: motion blocks = 1745(26%), 2330(35%),   64( 0%), loops = 3&lt;br /&gt;
[348] [21497] RemoveDirt: motion blocks = 1480(22%), 1973(30%),   45( 0%), loops = 4&lt;br /&gt;
[348] [21498] RemoveDirt: motion blocks = 1081(16%), 1915(29%),   65( 1%), loops = 2&lt;br /&gt;
[348] [21499] RemoveDirt: motion blocks = 1403(21%), 2380(36%),  235( 3%), loops = 10&lt;br /&gt;
[348] [21500] RemoveDirt: motion blocks = 2618(40%), 2204(34%),   59( 0%), loops = 5&lt;br /&gt;
[348] [21501] RemoveDirt: motion blocks =  986(15%), 2065(31%),   75( 1%), loops = 3&lt;br /&gt;
[348] [21502] RemoveDirt: motion blocks = 1214(18%), 2291(35%),   78( 1%), loops = 3&lt;br /&gt;
[348] [21503] RemoveDirt: motion blocks = 1348(20%), 2179(33%),   57( 0%), loops = 4&lt;br /&gt;
[348] [21504] RemoveDirt: motion blocks =  961(14%), 1957(30%),   71( 1%), loops = 3&lt;br /&gt;
[348] [21505] RemoveDirt: motion blocks = 1833(28%), 2201(33%),   38( 0%), loops = 3&lt;br /&gt;
[348] [21506] RemoveDirt: motion blocks = 1644(25%), 2183(33%),   53( 0%), loops = 5&lt;br /&gt;
[348] [21507] RemoveDirt: motion blocks = 1420(21%), 2541(39%),  132( 2%), loops = 5&lt;br /&gt;
[348] [21508] RemoveDirt: motion blocks = 2238(34%), 2229(34%),  104( 1%), loops = 4&lt;br /&gt;
[348] [21509] RemoveDirt: motion blocks = 1351(20%), 2294(35%),  181( 2%), loops = 6&lt;br /&gt;
[348] [21510] RemoveDirt: motion blocks =  931(14%), 1800(27%),  229( 3%), loops = 5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number in brackets on the left hand side is the id of the process, which runs the script, the second number in brackets is the frame number. The first number (with percentages in brackets) after &amp;quot;motion blocks =&amp;quot;  is the number of phase 1 motion blocks, the second is the difference between phase 2 and phase 1 motion blocks (always &amp;gt;=0 if dmode=0, always &amp;lt;= 0 if dmode= 2) and the third is the difference between phase 3 and phase 2 motion blocks (always &amp;gt;= 0). Finally the number after &amp;quot;loops =&amp;quot; is the number of postprocessing loops used for this frame. Debug=true can be used to monitor RestoreMotionBlocks in an encoding process. Of course, show=true can only be used before an encoding process to find the right values for the various variables. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===SCSelect===&lt;br /&gt;
SCSelect is a special filter, which distinguishes between scene begins, scene ends and global motion. The output of SCClense is used as an &amp;quot;alternative&amp;quot; clip for RestoreMotionBlocks. It can hardly used for other purposes, because it can only make proper decisions if there are a lot of motion blocks. Only if the percentage of motion blocks is &amp;gt; gmthreshold, then RestoreMotionBlocks chooses a frame from the clip specified with the alternative variable and then there are always a lot of motion blocks, if gmthreshold is not too small (gmthreshold &amp;gt;= 30 should be sufficiently large). SCSelect yields nonsense results if there are only few motion blocks. SCSelect is used as follows:&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|SCSelect (clip input, clip scene_begin, clip scene_end, clip global_motion, float &amp;quot;dfactor&amp;quot;, bool &amp;quot;debug&amp;quot;, bool &amp;quot;planar&amp;quot;, int &amp;quot;cache&amp;quot;, int &amp;quot;gcache&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::The first four clip variables are mandatory and have no name. All four clips must have the same color space, width and height. The first clip is the clip, on which SCSelect bases its decision. Usually it should be the same clip, which was specified with the &amp;quot;neighbour&amp;quot; variable in RestoreMotionBlocks. If SCSelect realises a scene begin, it selects its output frame from the clip scene_begin. If SCSelect realises a scene end, it selects its output frame from the clip scene_end. If SCSelect realises a global motion, it selects its output frame from the clip global motion. Thus SCSelect doesn't produce any new frames. It only makes a selection from three different sources.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dfactor|float|4.0}}&lt;br /&gt;
:::Dfactor is the key variable for scene switch sensitivity. The higher dfactor the less scene begins and scene ends and the more global motion frames are detected. Dfactor=4.0 is the default value. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::If debug=true, then SCSelect sends output of the following type to the [http://technet.microsoft.com/en-us/library/bb896647.aspx DebugView]  utility:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 47em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[3416] [67865] SCSelect: global motion&lt;br /&gt;
[3416] [67866] SCSelect: global motion&lt;br /&gt;
[3416] [67870] SCSelect: global motion&lt;br /&gt;
[3416] [67871] SCSelect: global motion&lt;br /&gt;
[3416] [67873] SCSelect: global motion&lt;br /&gt;
[3416] [67874] SCSelect: global motion&lt;br /&gt;
[3416] [67877] SCSelect: global motion&lt;br /&gt;
[3416] [68318] SCSelect: global motion&lt;br /&gt;
[3416] [68319] SCSelect: global motion&lt;br /&gt;
[3416] [68557] SCSelect: scene end&lt;br /&gt;
[3416] [68558] SCSelect: scene begin&lt;br /&gt;
[3416] [69481] SCSelect: scene end&lt;br /&gt;
[3416] [69482] SCSelect: scene begin&lt;br /&gt;
[3416] [70240] SCSelect: scene end&lt;br /&gt;
[3416] [70241] SCSelect: scene begin&lt;br /&gt;
[3416] [70406] SCSelect: global motion&lt;br /&gt;
[3416] [70407] SCSelect: global motion&lt;br /&gt;
[3416] [70408] SCSelect: global motion&lt;br /&gt;
[3416] [70409] SCSelect: global motion&lt;br /&gt;
[3416] [70410] SCSelect: global motion&lt;br /&gt;
[3416] [72032] SCSelect: global motion&lt;br /&gt;
[3416] [72164] SCSelect: global motion&lt;br /&gt;
[3416] [72165] SCSelect: global motion		&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:::To describe the basic idea  behind SCSelect let SAD(n)  be the SAD difference between the frames input(n) and input(n+1). Now, if SAD(n) &amp;gt; dfactor * SAD(n-1), then SCSelect recognizes a scene end and pulls the frame from the clip scene_end. If SAD(n-1) &amp;gt; dfactor * SAD(n), then SCSelect recognizes a scene begin and pulls the frame from the clip scene_begin. If both SAD(n) &amp;lt;= dfactor * SAD(n-1) and SAD(n-1) &amp;lt;= dfactor * SAD(n), then SCSelect recognizes a global motion and pulls the frame from the clip global_motion. From this description it is clear that dfactor must be &amp;gt; 1 for getting reasonable results. The above algorithm is optimized such that often only one and not two SADs are calculated for one requested frame. However, there are certain shortcomings. If a scene ends with global motion, then SCSelect often can't detect the scene end. If a scene begins with global motion, then SCSelect often can't detect the scene begin. These two effects are usually responsible if lonely scene begins and scene ends are detected by SCSelected, otherwise each scene begin should be preceded by a scene end. By refining the above algorithm we could avoid lonely scene begins and scene ends, but there is one situation, where even such a refinement fails. Namely if the scene ends with global motion and the new scene starts with global motion. Then a sharp scene switch can only be detected reliably with a good motion analysis, which would result in an extreme slow down of the filter. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|cache|int|2}}&lt;br /&gt;
::{{Par2|gcache|int|0}}&lt;br /&gt;
:::Undocumented parameters.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RemoveDirt Script ==&lt;br /&gt;
RemoveDirt has now become a script function, which involves RestoreMotionBlocks and various filters from [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&lt;br /&gt;
During the tests I used the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function RemoveDirt(clip input, bool &amp;quot;_grey&amp;quot;, int &amp;quot;repmode&amp;quot;) &lt;br /&gt;
{&lt;br /&gt;
    _grey=default(_grey, false)&lt;br /&gt;
	repmode=default(repmode, 16)&lt;br /&gt;
	clmode=17&lt;br /&gt;
	clensed=Clense(input, grey=_grey, cache=4)&lt;br /&gt;
	sbegin = ForwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	send = BackwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode ) &lt;br /&gt;
	restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)&lt;br /&gt;
	corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)&lt;br /&gt;
	return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us discuss this script in some detail. Firstly, we apply the brutal temporal clenser from the RemoveGrain package to obtain the clip &amp;quot;clensed&amp;quot;. Then we use the filters ForwardClense and BackwardClense from RemoveGrain to construct the clip &amp;quot;alt&amp;quot;, which is then used as the &amp;quot;alternative&amp;quot; variable in the subsequent RestoreMotionBlocks. While Clense does a lot of cleaning it certainly creates a lot of artifacts in motion areas. In RemoveDirt this repair is only made in motion areas. The static areas are not repaired. Since the clip is used only for restoring motion areas, we can use the much stronger Repair mode 16, which restores thin lines destroyed by clense. Finally, because there may be some left over from temporal cleaning especially when grain is dense, we use the spatial denoiser RemoveGrain(mode=17) to remove these dirt or grain rests.&lt;br /&gt;
&lt;br /&gt;
=== Optimal Usage ===&lt;br /&gt;
&lt;br /&gt;
1. If possible, crop after RestoreMotionBlocks. Modern codecs divide the frames in the same way as RemoveDirt into a grid of 8x8 pixel blocks to perform the crucial discret cosine transform for such blocks. Now if the clip is cropped after RemoveDirt, then the grid of RemoveDirt and the codec are likely to be different resulting in inferior compression. There is one exception, though: cropping afterwards does not hurt, if all four sides are cropped by a multiple of 8. For instance, crop(8,64,0,-72) is ok. On the other hand, one should crop after RemoveGrain/Repair if possible, because this filters cannot process the boundary pixels. Thus the optimal solution is to crop afterwards and then only by multiples of 8, which unfortunately is not always possible.&lt;br /&gt;
&lt;br /&gt;
2. Avisynth 2.6 hint: Crop only with &amp;quot;align=true&amp;quot;. RestoreMotionBlocks uses SSE2 instructions. If you crop without &amp;quot;align= true&amp;quot; before RestoreMotionBlocks, then the data on the frames may not be properly aligned and RemoveDirt will execute substantially slower. As a consequence you should always crop with Avisynth and not with DVD2AVI or DGIndex.&lt;br /&gt;
For Avisynth+ there is no need for such precautions, Crop is always producing aligned frames.&lt;br /&gt;
&lt;br /&gt;
3. Telecined movies must be inverse telecined before RemoveDirt. If a film is telecined some fields are doubled in order to increase the frame rate from 24fps to 30fps. Hence on such doubled fields the basic property of dirt, described above, is no more valid and no temporal cleaner can ever spot dirt on such doubled fields. On the other hand, after an inverse telecine usually every fourth frame is composed of fields, which originate from two different frames. Visually these two fields fit together well but both are from a different compression context, which can mislead RemoveDirt to false motion detection. In extreme cases, one field may be from an I- or P-frame, while the other is from a B-frame. But even if the fields are from from frames of identical type, the different compression context has a substantial effect. Consequently RemoveDirt performes less well on inverse telecined movies than on natively progressive movies. By the same reason also compression of inverse telcined movies is worse than of natively progressive movies. We in Europe should thank god every day that we are not getting telecined. However, here in Germany we have digital tv broadcasters, which like to comb progressive films (about 5% of all progressive movies from ARD and especially ZDF are combed). Fortunately these idiots are not able to double fields, so RemoveDirt should work, but on combed films the dirt is always split over two frames which clearly hurts RemoveDirt. On the other hand, if these combed films are uncombed, then we have the compression context problem for any frame and not only for any fourth frame. Stepping through the video with the builtin filter Bob() one can decide with near absolute certainty, whether the video is truely progressive, interlaced, telecined, field blended or progressive with a field shift.&lt;br /&gt;
&lt;br /&gt;
4. Put other filters after RemoveDirt. Except those filters mentioned before, like crop and inverse telecine, all other filters should be put after RemoveDirt in the Avisynth script, because most filters have a negative rather than a positive impact on dirt detection.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Change Log ==&lt;br /&gt;
&lt;br /&gt;
* v1.1 (20250108)&lt;br /&gt;
  - Fix SCSelect (VapourSynth)&lt;br /&gt;
&lt;br /&gt;
* v1.0 (20250108)&lt;br /&gt;
  - Remove YUY2 support (not even with &amp;quot;planar hack&amp;quot;)&lt;br /&gt;
  - VapourSynth support (API 4) (dual Avisynth/VapourSynth plugin)&lt;br /&gt;
    VS version supports the very same basic parameters like the Avisynth version except&lt;br /&gt;
    some historical compatibility parameters:&lt;br /&gt;
    - RestoreMotionBlocks is omitting &amp;quot;planar&amp;quot;&lt;br /&gt;
    - SCSelect is omitting &amp;quot;planar&amp;quot;, &amp;quot;cache&amp;quot;, &amp;quot;gcache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* v0.9.3 (20210223)&lt;br /&gt;
  - Fix a crash, which can occur on non mod8 sources&lt;br /&gt;
&lt;br /&gt;
* v0.9.2 (20190324)&lt;br /&gt;
  - RestoreMotionBlocks: 10-16 bit support. Relevant threshold and noise parameters are bit depth independent.&lt;br /&gt;
  - minor speedup&lt;br /&gt;
  - SCSelect: add support for 10-16 bits and 32 bit float clips&lt;br /&gt;
  - SCSelect: add support for planar RGB&lt;br /&gt;
  - FIX: SCSelect: make it work properly for large frames (&amp;gt;8MPixel)&lt;br /&gt;
  - FIX: SCSelect: Makes use the whole frame: now counts the rightmost non-mod32 pixels as well.&lt;br /&gt;
  - Clang support (LLVM) with Visual Studio 2017&lt;br /&gt;
  - update html docs&lt;br /&gt;
  - add clang-built DLLs to the released version&lt;br /&gt;
&lt;br /&gt;
* v0.9.1 (20190314)&lt;br /&gt;
  - project moved to github: https://github.com/pinterf/RemoveDirt&lt;br /&gt;
  - built using Visual Studio 2017&lt;br /&gt;
  - x64 build for Avisynth+&lt;br /&gt;
  - Added version resource to DLL&lt;br /&gt;
  - Changed to AVS 2.6 plugin interface&lt;br /&gt;
  - Fix: RestoreMotionBlocks: grey=false: it was copying 8x4 chroma pixels for YV12 and 8x8 for YUY2 instead of 4x4 and 8x4 blocks&lt;br /&gt;
  - Fix: SCSelect: Old v0.9 SSE2 code omitted difference checking for every second 8 columns&lt;br /&gt;
  - Removed MMX code, now requires SSE2&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_SERIALIZED]] for SCSelect&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_MULTI_INSTANCE]] for RestoreMotionBlocks (may not be any faster)&lt;br /&gt;
  - Added Y, YV16 and YV24 support besides existing YV12 and planar-hacked-YUY2&lt;br /&gt;
&lt;br /&gt;
* v0.9 (20050507)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Mirror&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Comments&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Source code&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|[http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|[https://web.archive.org/web/20150405173333if_/http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|includes statically and dynamically linked [[SSE2]] binaries compiled with MSVC2010. Dynamically linked binaries requires the [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 Redistributable Package (x86)] to be installed.&lt;br /&gt;
|Included with the binaries.&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|&amp;lt;strike&amp;gt;[https://web.archive.org/web/20140723074402if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.zip ReduceDirt.zip]&amp;lt;/strike&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|includes 3 binaries: one statically linked (&amp;lt;tt&amp;gt;RemoveDirtS.dll&amp;lt;/tt&amp;gt;) and two dynamically linked (&amp;lt;tt&amp;gt;RemoveDirt.dll, RemoveDirtSSE2.dll&amp;lt;/tt&amp;gt;). &lt;br /&gt;
SSE2 version is recommended but unfortunately it requires the &amp;lt;tt&amp;gt;Msvcr71.dll&amp;lt;/tt&amp;gt; runtime component from the very ancient Microsoft Visual C++ .NET 2003. For this reason this package is considered deprecated!&lt;br /&gt;
|[https://web.archive.org/web/20141121054131if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt-src.zip  ReduceDirt-src.zip]&lt;br /&gt;
|-&lt;br /&gt;
!v0.6.1&lt;br /&gt;
|[https://web.archive.org/web/20050215121957if_/http://home.pages.at/kassandro/RemoveDirt/RemoveDirt.zip RemoveDirt.zip]&lt;br /&gt;
|&lt;br /&gt;
|Old archived documentation: [https://web.archive.org/web/20050311122626/http://www.removedirt.de.tf www.removedirt.de.tf]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[https://web.archive.org/web/20160610102940/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.htm RemoveDirt.htm] - official v0.9 documentation. &lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=641337#post641337&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1560013&amp;amp;highlight=scselect#post1560013&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1564754&amp;amp;highlight=scselect#post1564754&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1518730&amp;amp;highlight=scselect#post1518730&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1409324#post1409324&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1483843&amp;amp;highlight=scselect#post1483843&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1488392&amp;amp;highlight=scselect#post1488392&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1479632&amp;amp;highlight=scselect#post1479632&lt;br /&gt;
*http://forum.doom9.org/showthread.php?t=145753&amp;amp;highlight=scselect&amp;amp;page=2&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1206869&amp;amp;highlight=scselect#post1206869&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1351709&amp;amp;highlight=scselect#post1351709&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1405939&amp;amp;highlight=scselect#post1405939&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1205317&amp;amp;highlight=scselect#post1205317&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1507954&amp;amp;highlight=scselect#post1507954&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#Luma_Equalization|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/RemoveDirt</id>
		<title>RemoveDirt</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/RemoveDirt"/>
				<updated>2025-01-09T07:14:58Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: New version 1.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Restoration_filters|Luma_equalization|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
| {{Author/kassandro}}, {{Author/pinterf}}&lt;br /&gt;
| v1.1&lt;br /&gt;
| [http://github.com/pinterf/RemoveDirt/releases RemoveDirt-1.1.7z]&lt;br /&gt;
| Luma Equalization  &lt;br /&gt;
| [http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=70856 Doom9 Thread (original)], [http://forum.doom9.org/showthread.php?t=176199 Doom9 Thread (update)]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
RemoveDirt is a temporal cleaner for AviSynth 2.6, [[AviSynth+]] and VapourSynth. It has now become a script function which involves RestoreMotionBlocks and various filters from the [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The plugin contains 2 filters:&lt;br /&gt;
*[[#RestoreMotionBlocks|RestoreMotionBlocks]] which is the main function used in the [[#RemoveDirt Script|RemoveDirt script]].&lt;br /&gt;
*[[#SCSelect|SCSelect]] is a scence change detention filter meant to be use with RestoreMotionBlocks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
**AviSynth+: All [[planar]]  Y and YUV formats (8/10/12/14/16-bit) are supported. [[#SCSelect|SCSelect]] also supports 32-bit float and planar RGB. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
===RestoreMotionBlocks===&lt;br /&gt;
:{{Template:FuncDef|RestoreMotionBlocks (clip filtered, clip restore, clip &amp;quot;neighbour&amp;quot;, clip &amp;quot;neighbour2&amp;quot;, clip &amp;quot;alternative&amp;quot;, bool &amp;quot;planar&amp;quot;, bool &amp;quot;show&amp;quot;, bool &amp;quot;debug&amp;quot;, int &amp;quot;gmthreshold&amp;quot;, int &amp;quot;mthreshold&amp;quot;, int &amp;quot;noise&amp;quot;, int &amp;quot;noisy&amp;quot;, int &amp;quot;dist&amp;quot;, int &amp;quot;tolerance&amp;quot;, int &amp;quot;dmode&amp;quot;, int &amp;quot;pthreshold&amp;quot;, int &amp;quot;cthreshold&amp;quot;, bool &amp;quot;grey&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2|neighbour|clip| }}&lt;br /&gt;
::{{Par2|neighbour2|clip| }}&lt;br /&gt;
::{{Par2|alternative|clip| }}&lt;br /&gt;
:::The first five variables are clip variables. All clips must be of the same type (same width, height and color space). The number of frames is the minimum of the length of all these five clips. The first two variables are mandatory and are unnamed. &amp;quot;filtered&amp;quot; is usually an aggressively filtered clip, from which motion artifacts have to removed. If RestoreMotionBlocks identfies an 8x8 block as a motion block, it copies this block from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. This is the basic operation of RestoreMotionBlocks. To identify motion blocks RestoreMotionBlocks uses the clip &amp;quot;neighbour&amp;quot;. The default value for neighbour is the &amp;quot;restore&amp;quot; clip. However, in the RemoveDirt script &amp;quot;neighbour&amp;quot; is different from &amp;quot;restore&amp;quot;. &lt;br /&gt;
:::*The &amp;quot;neighbour2&amp;quot; is for using RemoveDirt in combination with motion compensation filters like [[MVTools]] (see RemoveDirtMC below). Finally, if the number of motion blocks exceeds the percentage specified in the &amp;quot;gmthreshold&amp;quot; variable, then RestoreMotionBlocks simply takes the frame from the clip &amp;quot;alternative&amp;quot;. In this way, scene switches or global motion can be handled specifically. The clip &amp;quot;restore&amp;quot; is the default value  for &amp;quot;alternative&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value).  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|show|bool|false}}&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::The boolean variables &amp;quot;show&amp;quot; and &amp;quot;debug&amp;quot; are used for debugging (see section Debugging). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|gmthreshold|int|80}}&lt;br /&gt;
:::The default value for gmthreshold is 80, i.e. if 80% of the blocks are motion blocks, then the frame is taken from &amp;quot;alternative&amp;quot; clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|mthreshold|int|160}}&lt;br /&gt;
:::&amp;quot;mthreshold&amp;quot; is similar as in the old RemoveDirt. However, because we now use the ordinary SAD for block comparison, the values should be somewhat higher, especially if the value of noise is low. The default value for &amp;quot;mthreshold&amp;quot; is 160&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|noise|int|0}}&lt;br /&gt;
::{{Par2|noisy|int|-1}}&lt;br /&gt;
:::With the variable &amp;quot;noise&amp;quot; one can specify a noise level, which should be ignored by the motion detection. The default value of &amp;quot;noise&amp;quot; is 0. &lt;br /&gt;
:::The variable &amp;quot;noisy&amp;quot; is used to specify the number of noisy pixels of an 8x8 block, which must be exceeded for a motion block. The default value of &amp;quot;noisy&amp;quot; is -1.&lt;br /&gt;
:::If noisy &amp;gt;= 0 and noise &amp;gt; 0, then the value of &amp;quot;mthreshold&amp;quot; is ignored.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dist|int|1}}&lt;br /&gt;
::{{Par2|tolerance|int|12}}&lt;br /&gt;
:::dist and tolerance control basic motion detection. dist=1 and tolerance=12 are the default values. A block B is considered a  neighbor of a block A by RestoreMotionBlocks, if both horizontally and vertically both blocks are only dist blocks apart. For dist=0 a block has only one neighbor, the block itself. If dist=1, then a block has 9 neighbors, if it is not located at the boundary. If dist=2, then each inner block has 25 neighbors and if dist= 3 then it has 49 neighbors etc.. Now for a given block RestoreMotionBlocks counts all the neighbor blocks which are marked as motion blocks. If the percentage of motion blocks among all neighbor blocks exceeds the value of tolerance, then the block is not cleaned. Thus in the default case of 9 neighbor blocks and tolerance=12 one motion block is allowed and cleaning will nevertheless be allowed. In particular, a motion block is cleaned, if it has no other motion blocks as neighbors. This is reasonable, because motion rarely occurs on one tiny block alone. On the other, if motion blocks have a certain density then also the neighbors should not be cleaned. This is the idea behind the variables dist and tolerance. A higher value of dist results in less cleaning. The higher the value of tolerance, the more cleaning. If tolerance &amp;gt;=100 then all blocks are cleaned.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dmode|int|0}}&lt;br /&gt;
:::*If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. &lt;br /&gt;
:::*If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is discarded if there exists no further phase 1 motion block with a distance less than 1. &lt;br /&gt;
:::*Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|pthreshold|int|10}}&lt;br /&gt;
::{{Par2|cthreshold|int|pthreshold}}&lt;br /&gt;
:::Parameters &amp;quot;pthreshold&amp;quot; and &amp;quot;cthreshold&amp;quot; are thresholds for luma and chroma, respectively. For 10-16 bits (where actual pixel values and thus SAD values are larger) the parameter is automatically normalized internally. You can keep it the same across different formats for the same effect.&amp;lt;br&amp;gt;For postprocessing RestoreMotionBlocks uses the variable pthreshold and cthreshold. If the total luma difference of the two adjacent border line increases by more than pthreshold, then cleaning of the block is undone by RestoreMotionBlocks. Similarily cleaning is undone, if the chroma difference exceedes cthreshold. The maximal difference of 8 pixels is 8*255. If cthreshold is larger than this value, then chroma postprocessing is disabled. If both, pthreshold and cthreshold,  are larger than the maximal value, then postprocessing is completely disabled. pthreshold=10 is the default value and if nothing else is specified cthreshold has the same value as pthreshold. Clearly luma postprocessing is much more important than chroma postprocessing. If cthreshold and especially pthreshold, then rather unpleasant blocky artifacts become visible. These are much more likely in areas with very flat contrast. Of course, there must be motion as well to get such artifacts. If you see these typical blocky artifacts, you should lower the thresholds. Postprocessing should only be disabled if all the cleaned frames are checked for artifacts. By the very nature of the algorithm no postprocessing will occur if all blocks were cleaned. There must be at least one block, which has not been cleaned to trigger postprocessing. The postprocessing algorithm loops through all the blocks as long as it can find blocks to be restored, nevertheless it is quite efficient. It is the basic philosophy of RestoreMotionBlocks, that motion detection needs only detect at least one but not all blocks of a moving object. The rest is then taken care by postprocessing. &lt;br /&gt;
&lt;br /&gt;
:::Negative values are allowed for pthreshold and cthreshold, but are not very reasonable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|grey|bool|false}}&lt;br /&gt;
:::If grey=true the chroma of the clip &amp;quot;filtered&amp;quot; is not touched by RestoreMotionBlocks. Also for postprocessing only the luma is used. This is slightly faster than grey=false. If you use grey=false for b&amp;amp;w clips, then it not only takes longer but also the quality may degrade, because chroma noise may trigger false postprocessing. Thus &amp;quot;grey=true&amp;quot; is highly recommended for b&amp;amp;w clips. &amp;lt;br&amp;gt;Greyscale (Y8..Y16) clips are automatically treated as grey=true.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====How RestoreMotionBlocks works====&lt;br /&gt;
To use the above variables properly, one has to understand how RestoreMotionBlocks works. It consists of three phases. For the first phase only the clip &amp;quot;neighbour&amp;quot; is used. Each frame is divided into a grid of 8x8 blocks. If  n is the number of the current frame, then for each block of this grid RestoreMotionBlocks looks at the luma of this block in neighbour(n-1) and neighbour(n+1). Note that we don't use the frame neighbour(n). There are three comparison methods (the old RemoveDirt has only one). &lt;br /&gt;
#If noise= 0, then simply the SAD of each block in  neighbour(n-1) and neighbour(n+1) is computed. If it is &amp;gt;= mthreshold, the block is identified as a motion block of frame n. This is the fasted method and a similar method was used in the old RemoveDirt. Its key disadvantage is that it may easily misled by noise.&lt;br /&gt;
#If noise &amp;gt;=0, then instead of SUM(|y-x|) RestoerMotionBlocks calculates SUM(| |y-x|-noise |). In particular, differences with absolute value &amp;lt;= noise are ignored. If it is &amp;gt;= mthreshold, then this block is identified as a motion block. We call this the noise adjusted SAD. From the way how the noise adjusted SAD is calculated, it is clear, that &amp;quot;mthreshold&amp;quot; should be decreased if  &amp;quot;noise&amp;quot; is increased. &lt;br /&gt;
#If noise &amp;gt;= 0 and noisy &amp;gt;= 0, then RestoreMotionblocks counts the number of pixels of a block, for which the absolute difference between neighbour(n-1) and neighbour(n+1) is &amp;gt;= noise. If this number is &amp;gt;=  value of &amp;quot;noisy&amp;quot;, then the block is identified as a motion block. We call this the NPC (= noisy pixel counting) method. The value of mthreshold is ignored, if NPC is selected.&lt;br /&gt;
Note that a block has 64 pixels. Thus, if noisy &amp;gt; 64, then there can't be any motion blocks. In my view NPC is clearly the best method. It has likely about half the speed of SAD and about the same speed as NSAD.  Noise=-1 and noisy=-1 are the default values. Thus SAD is the default method for the first phase. I ran most of my RemoveDirt tests with noise=8 or 10 and noisy= 12. &lt;br /&gt;
&lt;br /&gt;
In the sequel the motion blocks found in the first phase are called phase 1 motion blocks.  In the second phase, for each block all the motion blocks found in the first phase which have a distance &amp;lt;= dist are counted. If the result is &amp;gt;= (tolerance /100) * (the number of all first phase blocks with distance &amp;lt;= dist) , then this block is called a motion neighbour  block. For instance, if dist = 1 and tolerance= 12 (the default values), then there are 9 blocks with a distance &amp;lt;= 1. Since 1 &amp;lt; (12/100)*9 &amp;lt; 2, there must be at least 2 phase 1 motion blocks among the 9 neighbour blocks such that the block is marked as a motion neighbour block. If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is dicarded if there exists no further phase 1 motion block with a distance less than 1. Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. If dist=0 or dmode=2 gmthreshold should be lowered to 60 or even 50. &lt;br /&gt;
&lt;br /&gt;
The third phase, called the postprocessing phase, starts with restoring the phase 2 motion blocks by copying them from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. All phase 2 motion blocks become also phase 3 motion blocks. Then the edges between motion and non-motion blocks are inspected. To this end the SAD of the two adjacent border line segments is calculated twice (these line segments are either horizontal or vertical and are 8 pixels long). It is calculated first in the clip &amp;quot;restore&amp;quot; and then in the clip &amp;quot;filtered&amp;quot;. In the clip &amp;quot;filtered&amp;quot; the two blocks are from two different sources, one block, the motion block was restored from the clip &amp;quot;restore&amp;quot; and the non-motion block is from the original clip &amp;quot;filtered&amp;quot;. Since the frames of the clip &amp;quot;restore&amp;quot; are not changed at all, both blocks are from the same source and should therefore fit together. If the edge SAD in the clip &amp;quot;filtered&amp;quot; &amp;gt; (edge SAD in the clip restore) + pthreshold, then the block is marked as a new (additional) phase 3 motion block and the block is restored by copying it from &amp;quot;restore&amp;quot; to &amp;quot;filtered&amp;quot;, because the two blocks in &amp;quot;filtered&amp;quot; don't fit together well enough compared with the two blocks in &amp;quot;restore&amp;quot;. In other words,  in this phase, it is checked whether a restored block fits to the yet unrestored blocks. If it doesn't, the not yet restored blocks, which do not fit well, are marked as phase 3 motion blocks and are restored as well. This procedure is repeated until there are no more blocks, which can be tested. If the value of the grey variable is false, then the same is done for the luma and the chroma (for the chroma the variable cthreshold is used instead of pthreshold). If grey= true, then postprocessing is only done for the luma.&lt;br /&gt;
Finally, if the percentage of all phase 3 motion blocks with respect to all blocks exceeds the value of gmthreshold, then the &amp;quot;filtered&amp;quot; frame is discarded and replaced by the corresponding frame in &amp;quot;alternative&amp;quot;.  In this way, we can give special treatments for sharp scene switches and scenes with a moving or zooming camera.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====Debugging====&lt;br /&gt;
&lt;br /&gt;
The boolean variable debug and show are used for debugging. If show=true, then the blocks, which are marked as motion blocks in the first phase are colored red, those found in the second phase are colored green and finally the motion blocks marked by postprocessing are colored blue. In this way, one can easily check whether the above variables were selected appropriately. if debug=true, then RestoreMotionBlocks sends  output of the following kind to the debugview  utility:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[348] [21495] RemoveDirt: motion blocks =  942(14%), 1652(25%),  635( 9%), loops = 31&lt;br /&gt;
[348] [21496] RemoveDirt: motion blocks = 1745(26%), 2330(35%),   64( 0%), loops = 3&lt;br /&gt;
[348] [21497] RemoveDirt: motion blocks = 1480(22%), 1973(30%),   45( 0%), loops = 4&lt;br /&gt;
[348] [21498] RemoveDirt: motion blocks = 1081(16%), 1915(29%),   65( 1%), loops = 2&lt;br /&gt;
[348] [21499] RemoveDirt: motion blocks = 1403(21%), 2380(36%),  235( 3%), loops = 10&lt;br /&gt;
[348] [21500] RemoveDirt: motion blocks = 2618(40%), 2204(34%),   59( 0%), loops = 5&lt;br /&gt;
[348] [21501] RemoveDirt: motion blocks =  986(15%), 2065(31%),   75( 1%), loops = 3&lt;br /&gt;
[348] [21502] RemoveDirt: motion blocks = 1214(18%), 2291(35%),   78( 1%), loops = 3&lt;br /&gt;
[348] [21503] RemoveDirt: motion blocks = 1348(20%), 2179(33%),   57( 0%), loops = 4&lt;br /&gt;
[348] [21504] RemoveDirt: motion blocks =  961(14%), 1957(30%),   71( 1%), loops = 3&lt;br /&gt;
[348] [21505] RemoveDirt: motion blocks = 1833(28%), 2201(33%),   38( 0%), loops = 3&lt;br /&gt;
[348] [21506] RemoveDirt: motion blocks = 1644(25%), 2183(33%),   53( 0%), loops = 5&lt;br /&gt;
[348] [21507] RemoveDirt: motion blocks = 1420(21%), 2541(39%),  132( 2%), loops = 5&lt;br /&gt;
[348] [21508] RemoveDirt: motion blocks = 2238(34%), 2229(34%),  104( 1%), loops = 4&lt;br /&gt;
[348] [21509] RemoveDirt: motion blocks = 1351(20%), 2294(35%),  181( 2%), loops = 6&lt;br /&gt;
[348] [21510] RemoveDirt: motion blocks =  931(14%), 1800(27%),  229( 3%), loops = 5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number in brackets on the left hand side is the id of the process, which runs the script, the second number in brackets is the frame number. The first number (with percentages in brackets) after &amp;quot;motion blocks =&amp;quot;  is the number of phase 1 motion blocks, the second is the difference between phase 2 and phase 1 motion blocks (always &amp;gt;=0 if dmode=0, always &amp;lt;= 0 if dmode= 2) and the third is the difference between phase 3 and phase 2 motion blocks (always &amp;gt;= 0). Finally the number after &amp;quot;loops =&amp;quot; is the number of postprocessing loops used for this frame. Debug=true can be used to monitor RestoreMotionBlocks in an encoding process. Of course, show=true can only be used before an encoding process to find the right values for the various variables. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===SCSelect===&lt;br /&gt;
SCSelect is a special filter, which distinguishes between scene begins, scene ends and global motion. The output of SCClense is used as an &amp;quot;alternative&amp;quot; clip for RestoreMotionBlocks. It can hardly used for other purposes, because it can only make proper decisions if there are a lot of motion blocks. Only if the percentage of motion blocks is &amp;gt; gmthreshold, then RestoreMotionBlocks chooses a frame from the clip specified with the alternative variable and then there are always a lot of motion blocks, if gmthreshold is not too small (gmthreshold &amp;gt;= 30 should be sufficiently large). SCSelect yields nonsense results if there are only few motion blocks. SCSelect is used as follows:&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|SCSelect (clip input, clip scene_begin, clip scene_end, clip global_motion, float &amp;quot;dfactor&amp;quot;, bool &amp;quot;debug&amp;quot;, bool &amp;quot;planar&amp;quot;, int &amp;quot;cache&amp;quot;, int &amp;quot;gcache&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::The first four clip variables are mandatory and have no name. All four clips must have the same color space, width and height. The first clip is the clip, on which SCSelect bases its decision. Usually it should be the same clip, which was specified with the &amp;quot;neighbour&amp;quot; variable in RestoreMotionBlocks. If SCSelect realises a scene begin, it selects its output frame from the clip scene_begin. If SCSelect realises a scene end, it selects its output frame from the clip scene_end. If SCSelect realises a global motion, it selects its output frame from the clip global motion. Thus SCSelect doesn't produce any new frames. It only makes a selection from three different sources.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dfactor|float|4.0}}&lt;br /&gt;
:::Dfactor is the key variable for scene switch sensitivity. The higher dfactor the less scene begins and scene ends and the more global motion frames are detected. Dfactor=4.0 is the default value. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::If debug=true, then SCSelect sends output of the following type to the [http://technet.microsoft.com/en-us/library/bb896647.aspx DebugView]  utility:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 47em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[3416] [67865] SCSelect: global motion&lt;br /&gt;
[3416] [67866] SCSelect: global motion&lt;br /&gt;
[3416] [67870] SCSelect: global motion&lt;br /&gt;
[3416] [67871] SCSelect: global motion&lt;br /&gt;
[3416] [67873] SCSelect: global motion&lt;br /&gt;
[3416] [67874] SCSelect: global motion&lt;br /&gt;
[3416] [67877] SCSelect: global motion&lt;br /&gt;
[3416] [68318] SCSelect: global motion&lt;br /&gt;
[3416] [68319] SCSelect: global motion&lt;br /&gt;
[3416] [68557] SCSelect: scene end&lt;br /&gt;
[3416] [68558] SCSelect: scene begin&lt;br /&gt;
[3416] [69481] SCSelect: scene end&lt;br /&gt;
[3416] [69482] SCSelect: scene begin&lt;br /&gt;
[3416] [70240] SCSelect: scene end&lt;br /&gt;
[3416] [70241] SCSelect: scene begin&lt;br /&gt;
[3416] [70406] SCSelect: global motion&lt;br /&gt;
[3416] [70407] SCSelect: global motion&lt;br /&gt;
[3416] [70408] SCSelect: global motion&lt;br /&gt;
[3416] [70409] SCSelect: global motion&lt;br /&gt;
[3416] [70410] SCSelect: global motion&lt;br /&gt;
[3416] [72032] SCSelect: global motion&lt;br /&gt;
[3416] [72164] SCSelect: global motion&lt;br /&gt;
[3416] [72165] SCSelect: global motion		&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:::To describe the basic idea  behind SCSelect let SAD(n)  be the SAD difference between the frames input(n) and input(n+1). Now, if SAD(n) &amp;gt; dfactor * SAD(n-1), then SCSelect recognizes a scene end and pulls the frame from the clip scene_end. If SAD(n-1) &amp;gt; dfactor * SAD(n), then SCSelect recognizes a scene begin and pulls the frame from the clip scene_begin. If both SAD(n) &amp;lt;= dfactor * SAD(n-1) and SAD(n-1) &amp;lt;= dfactor * SAD(n), then SCSelect recognizes a global motion and pulls the frame from the clip global_motion. From this description it is clear that dfactor must be &amp;gt; 1 for getting reasonable results. The above algorithm is optimized such that often only one and not two SADs are calculated for one requested frame. However, there are certain shortcomings. If a scene ends with global motion, then SCSelect often can't detect the scene end. If a scene begins with global motion, then SCSelect often can't detect the scene begin. These two effects are usually responsible if lonely scene begins and scene ends are detected by SCSelected, otherwise each scene begin should be preceded by a scene end. By refining the above algorithm we could avoid lonely scene begins and scene ends, but there is one situation, where even such a refinement fails. Namely if the scene ends with global motion and the new scene starts with global motion. Then a sharp scene switch can only be detected reliably with a good motion analysis, which would result in an extreme slow down of the filter. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|cache|int|2}}&lt;br /&gt;
::{{Par2|gcache|int|0}}&lt;br /&gt;
:::Undocumented parameters.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RemoveDirt Script ==&lt;br /&gt;
RemoveDirt has now become a script function, which involves RestoreMotionBlocks and various filters from [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&lt;br /&gt;
During the tests I used the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function RemoveDirt(clip input, bool &amp;quot;_grey&amp;quot;, int &amp;quot;repmode&amp;quot;) &lt;br /&gt;
{&lt;br /&gt;
    _grey=default(_grey, false)&lt;br /&gt;
	repmode=default(repmode, 16)&lt;br /&gt;
	clmode=17&lt;br /&gt;
	clensed=Clense(input, grey=_grey, cache=4)&lt;br /&gt;
	sbegin = ForwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	send = BackwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode ) &lt;br /&gt;
	restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)&lt;br /&gt;
	corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)&lt;br /&gt;
	return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us discuss this script in some detail. Firstly, we apply the brutal temporal clenser from the RemoveGrain package to obtain the clip &amp;quot;clensed&amp;quot;. Then we use the filters ForwardClense and BackwardClense from RemoveGrain to construct the clip &amp;quot;alt&amp;quot;, which is then used as the &amp;quot;alternative&amp;quot; variable in the subsequent RestoreMotionBlocks. While Clense does a lot of cleaning it certainly creates a lot of artifacts in motion areas. In RemoveDirt this repair is only made in motion areas. The static areas are not repaired. Since the clip is used only for restoring motion areas, we can use the much stronger Repair mode 16, which restores thin lines destroyed by clense. Finally, because there may be some left over from temporal cleaning especially when grain is dense, we use the spatial denoiser RemoveGrain(mode=17) to remove these dirt or grain rests.&lt;br /&gt;
&lt;br /&gt;
=== Optimal Usage ===&lt;br /&gt;
&lt;br /&gt;
1. If possible, crop after RestoreMotionBlocks. Modern codecs divide the frames in the same way as RemoveDirt into a grid of 8x8 pixel blocks to perform the crucial discret cosine transform for such blocks. Now if the clip is cropped after RemoveDirt, then the grid of RemoveDirt and the codec are likely to be different resulting in inferior compression. There is one exception, though: cropping afterwards does not hurt, if all four sides are cropped by a multiple of 8. For instance, crop(8,64,0,-72) is ok. On the other hand, one should crop after RemoveGrain/Repair if possible, because this filters cannot process the boundary pixels. Thus the optimal solution is to crop afterwards and then only by multiples of 8, which unfortunately is not always possible.&lt;br /&gt;
&lt;br /&gt;
2. Avisynth 2.6 hint: Crop only with &amp;quot;align=true&amp;quot;. RestoreMotionBlocks uses SSE2 instructions. If you crop without &amp;quot;align= true&amp;quot; before RestoreMotionBlocks, then the data on the frames may not be properly aligned and RemoveDirt will execute substantially slower. As a consequence you should always crop with Avisynth and not with DVD2AVI or DGIndex.&lt;br /&gt;
For Avisynth+ there is no need for such precautions, Crop is always producing aligned frames.&lt;br /&gt;
&lt;br /&gt;
3. Telecined movies must be inverse telecined before RemoveDirt. If a film is telecined some fields are doubled in order to increase the frame rate from 24fps to 30fps. Hence on such doubled fields the basic property of dirt, described above, is no more valid and no temporal cleaner can ever spot dirt on such doubled fields. On the other hand, after an inverse telecine usually every fourth frame is composed of fields, which originate from two different frames. Visually these two fields fit together well but both are from a different compression context, which can mislead RemoveDirt to false motion detection. In extreme cases, one field may be from an I- or P-frame, while the other is from a B-frame. But even if the fields are from from frames of identical type, the different compression context has a substantial effect. Consequently RemoveDirt performes less well on inverse telecined movies than on natively progressive movies. By the same reason also compression of inverse telcined movies is worse than of natively progressive movies. We in Europe should thank god every day that we are not getting telecined. However, here in Germany we have digital tv broadcasters, which like to comb progressive films (about 5% of all progressive movies from ARD and especially ZDF are combed). Fortunately these idiots are not able to double fields, so RemoveDirt should work, but on combed films the dirt is always split over two frames which clearly hurts RemoveDirt. On the other hand, if these combed films are uncombed, then we have the compression context problem for any frame and not only for any fourth frame. Stepping through the video with the builtin filter Bob() one can decide with near absolute certainty, whether the video is truely progressive, interlaced, telecined, field blended or progressive with a field shift.&lt;br /&gt;
&lt;br /&gt;
4. Put other filters after RemoveDirt. Except those filters mentioned before, like crop and inverse telecine, all other filters should be put after RemoveDirt in the Avisynth script, because most filters have a negative rather than a positive impact on dirt detection.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Change Log ==&lt;br /&gt;
&lt;br /&gt;
* v1.1 (20250108)&lt;br /&gt;
  - Fix SCSelect (VapourSynth)&lt;br /&gt;
&lt;br /&gt;
* v1.0 (20250108)&lt;br /&gt;
  - Remove YUY2 support (not even with &amp;quot;planar hack&amp;quot;)&lt;br /&gt;
  - VapourSynth support (API 4) (dual Avisynth/VapourSynth plugin)&lt;br /&gt;
    VS version supports the very same basic parameters like the Avisynth version except&lt;br /&gt;
    some historical compatibility parameters:&lt;br /&gt;
    - RestoreMotionBlocks is omitting &amp;quot;planar&amp;quot;&lt;br /&gt;
    - SCSelect is omitting &amp;quot;planar&amp;quot;, &amp;quot;cache&amp;quot;, &amp;quot;gcache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* v0.9.3 (20210223)&lt;br /&gt;
  - Fix a crash, which can occur on non mod8 sources&lt;br /&gt;
&lt;br /&gt;
* v0.9.2 (20190324)&lt;br /&gt;
  - RestoreMotionBlocks: 10-16 bit support. Relevant threshold and noise parameters are bit depth independent.&lt;br /&gt;
  - minor speedup&lt;br /&gt;
  - SCSelect: add support for 10-16 bits and 32 bit float clips&lt;br /&gt;
  - SCSelect: add support for planar RGB&lt;br /&gt;
  - FIX: SCSelect: make it work properly for large frames (&amp;gt;8MPixel)&lt;br /&gt;
  - FIX: SCSelect: Makes use the whole frame: now counts the rightmost non-mod32 pixels as well.&lt;br /&gt;
  - Clang support (LLVM) with Visual Studio 2017&lt;br /&gt;
  - update html docs&lt;br /&gt;
  - add clang-built DLLs to the released version&lt;br /&gt;
&lt;br /&gt;
* v0.9.1 (20190314)&lt;br /&gt;
  - project moved to github: https://github.com/pinterf/RemoveDirt&lt;br /&gt;
  - built using Visual Studio 2017&lt;br /&gt;
  - x64 build for Avisynth+&lt;br /&gt;
  - Added version resource to DLL&lt;br /&gt;
  - Changed to AVS 2.6 plugin interface&lt;br /&gt;
  - Fix: RestoreMotionBlocks: grey=false: it was copying 8x4 chroma pixels for YV12 and 8x8 for YUY2 instead of 4x4 and 8x4 blocks&lt;br /&gt;
  - Fix: SCSelect: Old v0.9 SSE2 code omitted difference checking for every second 8 columns&lt;br /&gt;
  - Removed MMX code, now requires SSE2&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_SERIALIZED]] for SCSelect&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_MULTI_INSTANCE]] for RestoreMotionBlocks (may not be any faster)&lt;br /&gt;
  - Added Y, YV16 and YV24 support besides existing YV12 and planar-hacked-YUY2&lt;br /&gt;
&lt;br /&gt;
* v0.9 (20050507)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Mirror&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Comments&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Source code&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|[http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|[https://web.archive.org/web/20150405173333if_/http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|includes statically and dynamically linked [[SSE2]] binaries compiled with MSVC2010. Dynamically linked binaries requires the [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 Redistributable Package (x86)] to be installed.&lt;br /&gt;
|Included with the binaries.&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|&amp;lt;strike&amp;gt;[https://web.archive.org/web/20140723074402if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.zip ReduceDirt.zip]&amp;lt;/strike&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|includes 3 binaries: one statically linked (&amp;lt;tt&amp;gt;RemoveDirtS.dll&amp;lt;/tt&amp;gt;) and two dynamically linked (&amp;lt;tt&amp;gt;RemoveDirt.dll, RemoveDirtSSE2.dll&amp;lt;/tt&amp;gt;). &lt;br /&gt;
SSE2 version is recommended but unfortunately it requires the &amp;lt;tt&amp;gt;Msvcr71.dll&amp;lt;/tt&amp;gt; runtime component from the very ancient Microsoft Visual C++ .NET 2003. For this reason this package is considered deprecated!&lt;br /&gt;
|[https://web.archive.org/web/20141121054131if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt-src.zip  ReduceDirt-src.zip]&lt;br /&gt;
|-&lt;br /&gt;
!v0.6.1&lt;br /&gt;
|[https://web.archive.org/web/20050215121957if_/http://home.pages.at/kassandro/RemoveDirt/RemoveDirt.zip RemoveDirt.zip]&lt;br /&gt;
|&lt;br /&gt;
|Old archived documentation: [https://web.archive.org/web/20050311122626/http://www.removedirt.de.tf www.removedirt.de.tf]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[https://web.archive.org/web/20160610102940/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.htm RemoveDirt.htm] - official v0.9 documentation. &lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=641337#post641337&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1560013&amp;amp;highlight=scselect#post1560013&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1564754&amp;amp;highlight=scselect#post1564754&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1518730&amp;amp;highlight=scselect#post1518730&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1409324#post1409324&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1483843&amp;amp;highlight=scselect#post1483843&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1488392&amp;amp;highlight=scselect#post1488392&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1479632&amp;amp;highlight=scselect#post1479632&lt;br /&gt;
*http://forum.doom9.org/showthread.php?t=145753&amp;amp;highlight=scselect&amp;amp;page=2&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1206869&amp;amp;highlight=scselect#post1206869&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1351709&amp;amp;highlight=scselect#post1351709&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1405939&amp;amp;highlight=scselect#post1405939&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1205317&amp;amp;highlight=scselect#post1205317&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1507954&amp;amp;highlight=scselect#post1507954&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#Luma_Equalization|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/RemoveDirt</id>
		<title>RemoveDirt</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/RemoveDirt"/>
				<updated>2025-01-09T07:11:57Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Restoration_filters|Luma_equalization|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
| {{Author/kassandro}}, {{Author/pinterf}}&lt;br /&gt;
| v0.9.2&lt;br /&gt;
| [http://github.com/pinterf/RemoveDirt/releases RemoveDirt-0.9.2.7z]&lt;br /&gt;
| Luma Equalization  &lt;br /&gt;
| [http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[http://forum.doom9.org/showthread.php?t=70856 Doom9 Thread (original)], [http://forum.doom9.org/showthread.php?t=176199 Doom9 Thread (update)]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
RemoveDirt is a temporal cleaner for AviSynth 2.6, [[AviSynth+]] and VapourSynth. It has now become a script function which involves RestoreMotionBlocks and various filters from the [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The plugin contains 2 filters:&lt;br /&gt;
*[[#RestoreMotionBlocks|RestoreMotionBlocks]] which is the main function used in the [[#RemoveDirt Script|RemoveDirt script]].&lt;br /&gt;
*[[#SCSelect|SCSelect]] is a scence change detention filter meant to be use with RestoreMotionBlocks.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
**AviSynth+: All [[planar]]  Y and YUV formats (8/10/12/14/16-bit) are supported. [[#SCSelect|SCSelect]] also supports 32-bit float and planar RGB. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
===RestoreMotionBlocks===&lt;br /&gt;
:{{Template:FuncDef|RestoreMotionBlocks (clip filtered, clip restore, clip &amp;quot;neighbour&amp;quot;, clip &amp;quot;neighbour2&amp;quot;, clip &amp;quot;alternative&amp;quot;, bool &amp;quot;planar&amp;quot;, bool &amp;quot;show&amp;quot;, bool &amp;quot;debug&amp;quot;, int &amp;quot;gmthreshold&amp;quot;, int &amp;quot;mthreshold&amp;quot;, int &amp;quot;noise&amp;quot;, int &amp;quot;noisy&amp;quot;, int &amp;quot;dist&amp;quot;, int &amp;quot;tolerance&amp;quot;, int &amp;quot;dmode&amp;quot;, int &amp;quot;pthreshold&amp;quot;, int &amp;quot;cthreshold&amp;quot;, bool &amp;quot;grey&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2|neighbour|clip| }}&lt;br /&gt;
::{{Par2|neighbour2|clip| }}&lt;br /&gt;
::{{Par2|alternative|clip| }}&lt;br /&gt;
:::The first five variables are clip variables. All clips must be of the same type (same width, height and color space). The number of frames is the minimum of the length of all these five clips. The first two variables are mandatory and are unnamed. &amp;quot;filtered&amp;quot; is usually an aggressively filtered clip, from which motion artifacts have to removed. If RestoreMotionBlocks identfies an 8x8 block as a motion block, it copies this block from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. This is the basic operation of RestoreMotionBlocks. To identify motion blocks RestoreMotionBlocks uses the clip &amp;quot;neighbour&amp;quot;. The default value for neighbour is the &amp;quot;restore&amp;quot; clip. However, in the RemoveDirt script &amp;quot;neighbour&amp;quot; is different from &amp;quot;restore&amp;quot;. &lt;br /&gt;
:::*The &amp;quot;neighbour2&amp;quot; is for using RemoveDirt in combination with motion compensation filters like [[MVTools]] (see RemoveDirtMC below). Finally, if the number of motion blocks exceeds the percentage specified in the &amp;quot;gmthreshold&amp;quot; variable, then RestoreMotionBlocks simply takes the frame from the clip &amp;quot;alternative&amp;quot;. In this way, scene switches or global motion can be handled specifically. The clip &amp;quot;restore&amp;quot; is the default value  for &amp;quot;alternative&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value).  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|show|bool|false}}&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::The boolean variables &amp;quot;show&amp;quot; and &amp;quot;debug&amp;quot; are used for debugging (see section Debugging). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|gmthreshold|int|80}}&lt;br /&gt;
:::The default value for gmthreshold is 80, i.e. if 80% of the blocks are motion blocks, then the frame is taken from &amp;quot;alternative&amp;quot; clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|mthreshold|int|160}}&lt;br /&gt;
:::&amp;quot;mthreshold&amp;quot; is similar as in the old RemoveDirt. However, because we now use the ordinary SAD for block comparison, the values should be somewhat higher, especially if the value of noise is low. The default value for &amp;quot;mthreshold&amp;quot; is 160&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|noise|int|0}}&lt;br /&gt;
::{{Par2|noisy|int|-1}}&lt;br /&gt;
:::With the variable &amp;quot;noise&amp;quot; one can specify a noise level, which should be ignored by the motion detection. The default value of &amp;quot;noise&amp;quot; is 0. &lt;br /&gt;
:::The variable &amp;quot;noisy&amp;quot; is used to specify the number of noisy pixels of an 8x8 block, which must be exceeded for a motion block. The default value of &amp;quot;noisy&amp;quot; is -1.&lt;br /&gt;
:::If noisy &amp;gt;= 0 and noise &amp;gt; 0, then the value of &amp;quot;mthreshold&amp;quot; is ignored.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dist|int|1}}&lt;br /&gt;
::{{Par2|tolerance|int|12}}&lt;br /&gt;
:::dist and tolerance control basic motion detection. dist=1 and tolerance=12 are the default values. A block B is considered a  neighbor of a block A by RestoreMotionBlocks, if both horizontally and vertically both blocks are only dist blocks apart. For dist=0 a block has only one neighbor, the block itself. If dist=1, then a block has 9 neighbors, if it is not located at the boundary. If dist=2, then each inner block has 25 neighbors and if dist= 3 then it has 49 neighbors etc.. Now for a given block RestoreMotionBlocks counts all the neighbor blocks which are marked as motion blocks. If the percentage of motion blocks among all neighbor blocks exceeds the value of tolerance, then the block is not cleaned. Thus in the default case of 9 neighbor blocks and tolerance=12 one motion block is allowed and cleaning will nevertheless be allowed. In particular, a motion block is cleaned, if it has no other motion blocks as neighbors. This is reasonable, because motion rarely occurs on one tiny block alone. On the other, if motion blocks have a certain density then also the neighbors should not be cleaned. This is the idea behind the variables dist and tolerance. A higher value of dist results in less cleaning. The higher the value of tolerance, the more cleaning. If tolerance &amp;gt;=100 then all blocks are cleaned.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dmode|int|0}}&lt;br /&gt;
:::*If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. &lt;br /&gt;
:::*If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is discarded if there exists no further phase 1 motion block with a distance less than 1. &lt;br /&gt;
:::*Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|pthreshold|int|10}}&lt;br /&gt;
::{{Par2|cthreshold|int|pthreshold}}&lt;br /&gt;
:::Parameters &amp;quot;pthreshold&amp;quot; and &amp;quot;cthreshold&amp;quot; are thresholds for luma and chroma, respectively. For 10-16 bits (where actual pixel values and thus SAD values are larger) the parameter is automatically normalized internally. You can keep it the same across different formats for the same effect.&amp;lt;br&amp;gt;For postprocessing RestoreMotionBlocks uses the variable pthreshold and cthreshold. If the total luma difference of the two adjacent border line increases by more than pthreshold, then cleaning of the block is undone by RestoreMotionBlocks. Similarily cleaning is undone, if the chroma difference exceedes cthreshold. The maximal difference of 8 pixels is 8*255. If cthreshold is larger than this value, then chroma postprocessing is disabled. If both, pthreshold and cthreshold,  are larger than the maximal value, then postprocessing is completely disabled. pthreshold=10 is the default value and if nothing else is specified cthreshold has the same value as pthreshold. Clearly luma postprocessing is much more important than chroma postprocessing. If cthreshold and especially pthreshold, then rather unpleasant blocky artifacts become visible. These are much more likely in areas with very flat contrast. Of course, there must be motion as well to get such artifacts. If you see these typical blocky artifacts, you should lower the thresholds. Postprocessing should only be disabled if all the cleaned frames are checked for artifacts. By the very nature of the algorithm no postprocessing will occur if all blocks were cleaned. There must be at least one block, which has not been cleaned to trigger postprocessing. The postprocessing algorithm loops through all the blocks as long as it can find blocks to be restored, nevertheless it is quite efficient. It is the basic philosophy of RestoreMotionBlocks, that motion detection needs only detect at least one but not all blocks of a moving object. The rest is then taken care by postprocessing. &lt;br /&gt;
&lt;br /&gt;
:::Negative values are allowed for pthreshold and cthreshold, but are not very reasonable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|grey|bool|false}}&lt;br /&gt;
:::If grey=true the chroma of the clip &amp;quot;filtered&amp;quot; is not touched by RestoreMotionBlocks. Also for postprocessing only the luma is used. This is slightly faster than grey=false. If you use grey=false for b&amp;amp;w clips, then it not only takes longer but also the quality may degrade, because chroma noise may trigger false postprocessing. Thus &amp;quot;grey=true&amp;quot; is highly recommended for b&amp;amp;w clips. &amp;lt;br&amp;gt;Greyscale (Y8..Y16) clips are automatically treated as grey=true.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====How RestoreMotionBlocks works====&lt;br /&gt;
To use the above variables properly, one has to understand how RestoreMotionBlocks works. It consists of three phases. For the first phase only the clip &amp;quot;neighbour&amp;quot; is used. Each frame is divided into a grid of 8x8 blocks. If  n is the number of the current frame, then for each block of this grid RestoreMotionBlocks looks at the luma of this block in neighbour(n-1) and neighbour(n+1). Note that we don't use the frame neighbour(n). There are three comparison methods (the old RemoveDirt has only one). &lt;br /&gt;
#If noise= 0, then simply the SAD of each block in  neighbour(n-1) and neighbour(n+1) is computed. If it is &amp;gt;= mthreshold, the block is identified as a motion block of frame n. This is the fasted method and a similar method was used in the old RemoveDirt. Its key disadvantage is that it may easily misled by noise.&lt;br /&gt;
#If noise &amp;gt;=0, then instead of SUM(|y-x|) RestoerMotionBlocks calculates SUM(| |y-x|-noise |). In particular, differences with absolute value &amp;lt;= noise are ignored. If it is &amp;gt;= mthreshold, then this block is identified as a motion block. We call this the noise adjusted SAD. From the way how the noise adjusted SAD is calculated, it is clear, that &amp;quot;mthreshold&amp;quot; should be decreased if  &amp;quot;noise&amp;quot; is increased. &lt;br /&gt;
#If noise &amp;gt;= 0 and noisy &amp;gt;= 0, then RestoreMotionblocks counts the number of pixels of a block, for which the absolute difference between neighbour(n-1) and neighbour(n+1) is &amp;gt;= noise. If this number is &amp;gt;=  value of &amp;quot;noisy&amp;quot;, then the block is identified as a motion block. We call this the NPC (= noisy pixel counting) method. The value of mthreshold is ignored, if NPC is selected.&lt;br /&gt;
Note that a block has 64 pixels. Thus, if noisy &amp;gt; 64, then there can't be any motion blocks. In my view NPC is clearly the best method. It has likely about half the speed of SAD and about the same speed as NSAD.  Noise=-1 and noisy=-1 are the default values. Thus SAD is the default method for the first phase. I ran most of my RemoveDirt tests with noise=8 or 10 and noisy= 12. &lt;br /&gt;
&lt;br /&gt;
In the sequel the motion blocks found in the first phase are called phase 1 motion blocks.  In the second phase, for each block all the motion blocks found in the first phase which have a distance &amp;lt;= dist are counted. If the result is &amp;gt;= (tolerance /100) * (the number of all first phase blocks with distance &amp;lt;= dist) , then this block is called a motion neighbour  block. For instance, if dist = 1 and tolerance= 12 (the default values), then there are 9 blocks with a distance &amp;lt;= 1. Since 1 &amp;lt; (12/100)*9 &amp;lt; 2, there must be at least 2 phase 1 motion blocks among the 9 neighbour blocks such that the block is marked as a motion neighbour block. If dmode= 0, then all the motion neighbour blocks become phase 2 motion blocks. Thus if dmode=0 the number of motion blocks is increased quite a bit. If dmode= 2, then quite the opposite happens: a phase 1 motion block only becomes a phase 2 motion block, if it is also a motion neighbour block. In particular, there are less phase 2 motion blocks than phase1 motion blocks. For instance, if dist=1, tolerance= 2, dmode= 2, then a single phase 1 motion block is dicarded if there exists no further phase 1 motion block with a distance less than 1. Dmode=1 is just in the middle between dmode=0 and dmode= 2: the motion neighbour blocks become the phase 2 motion blocks. Thus, if dmode=1, the phase 1 motion blocks are only relevant for detecting motion neighbour blocks. After this task is completed the phase 1 information is discarded. If dist=0 or dmode=2 gmthreshold should be lowered to 60 or even 50. &lt;br /&gt;
&lt;br /&gt;
The third phase, called the postprocessing phase, starts with restoring the phase 2 motion blocks by copying them from the clip &amp;quot;restore&amp;quot; to the clip &amp;quot;filtered&amp;quot;. All phase 2 motion blocks become also phase 3 motion blocks. Then the edges between motion and non-motion blocks are inspected. To this end the SAD of the two adjacent border line segments is calculated twice (these line segments are either horizontal or vertical and are 8 pixels long). It is calculated first in the clip &amp;quot;restore&amp;quot; and then in the clip &amp;quot;filtered&amp;quot;. In the clip &amp;quot;filtered&amp;quot; the two blocks are from two different sources, one block, the motion block was restored from the clip &amp;quot;restore&amp;quot; and the non-motion block is from the original clip &amp;quot;filtered&amp;quot;. Since the frames of the clip &amp;quot;restore&amp;quot; are not changed at all, both blocks are from the same source and should therefore fit together. If the edge SAD in the clip &amp;quot;filtered&amp;quot; &amp;gt; (edge SAD in the clip restore) + pthreshold, then the block is marked as a new (additional) phase 3 motion block and the block is restored by copying it from &amp;quot;restore&amp;quot; to &amp;quot;filtered&amp;quot;, because the two blocks in &amp;quot;filtered&amp;quot; don't fit together well enough compared with the two blocks in &amp;quot;restore&amp;quot;. In other words,  in this phase, it is checked whether a restored block fits to the yet unrestored blocks. If it doesn't, the not yet restored blocks, which do not fit well, are marked as phase 3 motion blocks and are restored as well. This procedure is repeated until there are no more blocks, which can be tested. If the value of the grey variable is false, then the same is done for the luma and the chroma (for the chroma the variable cthreshold is used instead of pthreshold). If grey= true, then postprocessing is only done for the luma.&lt;br /&gt;
Finally, if the percentage of all phase 3 motion blocks with respect to all blocks exceeds the value of gmthreshold, then the &amp;quot;filtered&amp;quot; frame is discarded and replaced by the corresponding frame in &amp;quot;alternative&amp;quot;.  In this way, we can give special treatments for sharp scene switches and scenes with a moving or zooming camera.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
====Debugging====&lt;br /&gt;
&lt;br /&gt;
The boolean variable debug and show are used for debugging. If show=true, then the blocks, which are marked as motion blocks in the first phase are colored red, those found in the second phase are colored green and finally the motion blocks marked by postprocessing are colored blue. In this way, one can easily check whether the above variables were selected appropriately. if debug=true, then RestoreMotionBlocks sends  output of the following kind to the debugview  utility:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[348] [21495] RemoveDirt: motion blocks =  942(14%), 1652(25%),  635( 9%), loops = 31&lt;br /&gt;
[348] [21496] RemoveDirt: motion blocks = 1745(26%), 2330(35%),   64( 0%), loops = 3&lt;br /&gt;
[348] [21497] RemoveDirt: motion blocks = 1480(22%), 1973(30%),   45( 0%), loops = 4&lt;br /&gt;
[348] [21498] RemoveDirt: motion blocks = 1081(16%), 1915(29%),   65( 1%), loops = 2&lt;br /&gt;
[348] [21499] RemoveDirt: motion blocks = 1403(21%), 2380(36%),  235( 3%), loops = 10&lt;br /&gt;
[348] [21500] RemoveDirt: motion blocks = 2618(40%), 2204(34%),   59( 0%), loops = 5&lt;br /&gt;
[348] [21501] RemoveDirt: motion blocks =  986(15%), 2065(31%),   75( 1%), loops = 3&lt;br /&gt;
[348] [21502] RemoveDirt: motion blocks = 1214(18%), 2291(35%),   78( 1%), loops = 3&lt;br /&gt;
[348] [21503] RemoveDirt: motion blocks = 1348(20%), 2179(33%),   57( 0%), loops = 4&lt;br /&gt;
[348] [21504] RemoveDirt: motion blocks =  961(14%), 1957(30%),   71( 1%), loops = 3&lt;br /&gt;
[348] [21505] RemoveDirt: motion blocks = 1833(28%), 2201(33%),   38( 0%), loops = 3&lt;br /&gt;
[348] [21506] RemoveDirt: motion blocks = 1644(25%), 2183(33%),   53( 0%), loops = 5&lt;br /&gt;
[348] [21507] RemoveDirt: motion blocks = 1420(21%), 2541(39%),  132( 2%), loops = 5&lt;br /&gt;
[348] [21508] RemoveDirt: motion blocks = 2238(34%), 2229(34%),  104( 1%), loops = 4&lt;br /&gt;
[348] [21509] RemoveDirt: motion blocks = 1351(20%), 2294(35%),  181( 2%), loops = 6&lt;br /&gt;
[348] [21510] RemoveDirt: motion blocks =  931(14%), 1800(27%),  229( 3%), loops = 5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number in brackets on the left hand side is the id of the process, which runs the script, the second number in brackets is the frame number. The first number (with percentages in brackets) after &amp;quot;motion blocks =&amp;quot;  is the number of phase 1 motion blocks, the second is the difference between phase 2 and phase 1 motion blocks (always &amp;gt;=0 if dmode=0, always &amp;lt;= 0 if dmode= 2) and the third is the difference between phase 3 and phase 2 motion blocks (always &amp;gt;= 0). Finally the number after &amp;quot;loops =&amp;quot; is the number of postprocessing loops used for this frame. Debug=true can be used to monitor RestoreMotionBlocks in an encoding process. Of course, show=true can only be used before an encoding process to find the right values for the various variables. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===SCSelect===&lt;br /&gt;
SCSelect is a special filter, which distinguishes between scene begins, scene ends and global motion. The output of SCClense is used as an &amp;quot;alternative&amp;quot; clip for RestoreMotionBlocks. It can hardly used for other purposes, because it can only make proper decisions if there are a lot of motion blocks. Only if the percentage of motion blocks is &amp;gt; gmthreshold, then RestoreMotionBlocks chooses a frame from the clip specified with the alternative variable and then there are always a lot of motion blocks, if gmthreshold is not too small (gmthreshold &amp;gt;= 30 should be sufficiently large). SCSelect yields nonsense results if there are only few motion blocks. SCSelect is used as follows:&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|SCSelect (clip input, clip scene_begin, clip scene_end, clip global_motion, float &amp;quot;dfactor&amp;quot;, bool &amp;quot;debug&amp;quot;, bool &amp;quot;planar&amp;quot;, int &amp;quot;cache&amp;quot;, int &amp;quot;gcache&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::The first four clip variables are mandatory and have no name. All four clips must have the same color space, width and height. The first clip is the clip, on which SCSelect bases its decision. Usually it should be the same clip, which was specified with the &amp;quot;neighbour&amp;quot; variable in RestoreMotionBlocks. If SCSelect realises a scene begin, it selects its output frame from the clip scene_begin. If SCSelect realises a scene end, it selects its output frame from the clip scene_end. If SCSelect realises a global motion, it selects its output frame from the clip global motion. Thus SCSelect doesn't produce any new frames. It only makes a selection from three different sources.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|dfactor|float|4.0}}&lt;br /&gt;
:::Dfactor is the key variable for scene switch sensitivity. The higher dfactor the less scene begins and scene ends and the more global motion frames are detected. Dfactor=4.0 is the default value. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debug|bool|false}}&lt;br /&gt;
:::If debug=true, then SCSelect sends output of the following type to the [http://technet.microsoft.com/en-us/library/bb896647.aspx DebugView]  utility:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 47em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[3416] [67865] SCSelect: global motion&lt;br /&gt;
[3416] [67866] SCSelect: global motion&lt;br /&gt;
[3416] [67870] SCSelect: global motion&lt;br /&gt;
[3416] [67871] SCSelect: global motion&lt;br /&gt;
[3416] [67873] SCSelect: global motion&lt;br /&gt;
[3416] [67874] SCSelect: global motion&lt;br /&gt;
[3416] [67877] SCSelect: global motion&lt;br /&gt;
[3416] [68318] SCSelect: global motion&lt;br /&gt;
[3416] [68319] SCSelect: global motion&lt;br /&gt;
[3416] [68557] SCSelect: scene end&lt;br /&gt;
[3416] [68558] SCSelect: scene begin&lt;br /&gt;
[3416] [69481] SCSelect: scene end&lt;br /&gt;
[3416] [69482] SCSelect: scene begin&lt;br /&gt;
[3416] [70240] SCSelect: scene end&lt;br /&gt;
[3416] [70241] SCSelect: scene begin&lt;br /&gt;
[3416] [70406] SCSelect: global motion&lt;br /&gt;
[3416] [70407] SCSelect: global motion&lt;br /&gt;
[3416] [70408] SCSelect: global motion&lt;br /&gt;
[3416] [70409] SCSelect: global motion&lt;br /&gt;
[3416] [70410] SCSelect: global motion&lt;br /&gt;
[3416] [72032] SCSelect: global motion&lt;br /&gt;
[3416] [72164] SCSelect: global motion&lt;br /&gt;
[3416] [72165] SCSelect: global motion		&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:::To describe the basic idea  behind SCSelect let SAD(n)  be the SAD difference between the frames input(n) and input(n+1). Now, if SAD(n) &amp;gt; dfactor * SAD(n-1), then SCSelect recognizes a scene end and pulls the frame from the clip scene_end. If SAD(n-1) &amp;gt; dfactor * SAD(n), then SCSelect recognizes a scene begin and pulls the frame from the clip scene_begin. If both SAD(n) &amp;lt;= dfactor * SAD(n-1) and SAD(n-1) &amp;lt;= dfactor * SAD(n), then SCSelect recognizes a global motion and pulls the frame from the clip global_motion. From this description it is clear that dfactor must be &amp;gt; 1 for getting reasonable results. The above algorithm is optimized such that often only one and not two SADs are calculated for one requested frame. However, there are certain shortcomings. If a scene ends with global motion, then SCSelect often can't detect the scene end. If a scene begins with global motion, then SCSelect often can't detect the scene begin. These two effects are usually responsible if lonely scene begins and scene ends are detected by SCSelected, otherwise each scene begin should be preceded by a scene end. By refining the above algorithm we could avoid lonely scene begins and scene ends, but there is one situation, where even such a refinement fails. Namely if the scene ends with global motion and the new scene starts with global motion. Then a sharp scene switch can only be detected reliably with a good motion analysis, which would result in an extreme slow down of the filter. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|planar|bool|false}}&lt;br /&gt;
:::If you use planar YUY2 then you have to set &amp;quot;planar=true&amp;quot; (false is the default value).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|cache|int|2}}&lt;br /&gt;
::{{Par2|gcache|int|0}}&lt;br /&gt;
:::Undocumented parameters.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RemoveDirt Script ==&lt;br /&gt;
RemoveDirt has now become a script function, which involves RestoreMotionBlocks and various filters from [[RgTools|RemoveGrain]] package.&lt;br /&gt;
&lt;br /&gt;
During the tests I used the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function RemoveDirt(clip input, bool &amp;quot;_grey&amp;quot;, int &amp;quot;repmode&amp;quot;) &lt;br /&gt;
{&lt;br /&gt;
    _grey=default(_grey, false)&lt;br /&gt;
	repmode=default(repmode, 16)&lt;br /&gt;
	clmode=17&lt;br /&gt;
	clensed=Clense(input, grey=_grey, cache=4)&lt;br /&gt;
	sbegin = ForwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	send = BackwardClense(input, grey=_grey, cache=-1)&lt;br /&gt;
	alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode ) &lt;br /&gt;
	restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)&lt;br /&gt;
	corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)&lt;br /&gt;
	return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us discuss this script in some detail. Firstly, we apply the brutal temporal clenser from the RemoveGrain package to obtain the clip &amp;quot;clensed&amp;quot;. Then we use the filters ForwardClense and BackwardClense from RemoveGrain to construct the clip &amp;quot;alt&amp;quot;, which is then used as the &amp;quot;alternative&amp;quot; variable in the subsequent RestoreMotionBlocks. While Clense does a lot of cleaning it certainly creates a lot of artifacts in motion areas. In RemoveDirt this repair is only made in motion areas. The static areas are not repaired. Since the clip is used only for restoring motion areas, we can use the much stronger Repair mode 16, which restores thin lines destroyed by clense. Finally, because there may be some left over from temporal cleaning especially when grain is dense, we use the spatial denoiser RemoveGrain(mode=17) to remove these dirt or grain rests.&lt;br /&gt;
&lt;br /&gt;
=== Optimal Usage ===&lt;br /&gt;
&lt;br /&gt;
1. If possible, crop after RestoreMotionBlocks. Modern codecs divide the frames in the same way as RemoveDirt into a grid of 8x8 pixel blocks to perform the crucial discret cosine transform for such blocks. Now if the clip is cropped after RemoveDirt, then the grid of RemoveDirt and the codec are likely to be different resulting in inferior compression. There is one exception, though: cropping afterwards does not hurt, if all four sides are cropped by a multiple of 8. For instance, crop(8,64,0,-72) is ok. On the other hand, one should crop after RemoveGrain/Repair if possible, because this filters cannot process the boundary pixels. Thus the optimal solution is to crop afterwards and then only by multiples of 8, which unfortunately is not always possible.&lt;br /&gt;
&lt;br /&gt;
2. Avisynth 2.6 hint: Crop only with &amp;quot;align=true&amp;quot;. RestoreMotionBlocks uses SSE2 instructions. If you crop without &amp;quot;align= true&amp;quot; before RestoreMotionBlocks, then the data on the frames may not be properly aligned and RemoveDirt will execute substantially slower. As a consequence you should always crop with Avisynth and not with DVD2AVI or DGIndex.&lt;br /&gt;
For Avisynth+ there is no need for such precautions, Crop is always producing aligned frames.&lt;br /&gt;
&lt;br /&gt;
3. Telecined movies must be inverse telecined before RemoveDirt. If a film is telecined some fields are doubled in order to increase the frame rate from 24fps to 30fps. Hence on such doubled fields the basic property of dirt, described above, is no more valid and no temporal cleaner can ever spot dirt on such doubled fields. On the other hand, after an inverse telecine usually every fourth frame is composed of fields, which originate from two different frames. Visually these two fields fit together well but both are from a different compression context, which can mislead RemoveDirt to false motion detection. In extreme cases, one field may be from an I- or P-frame, while the other is from a B-frame. But even if the fields are from from frames of identical type, the different compression context has a substantial effect. Consequently RemoveDirt performes less well on inverse telecined movies than on natively progressive movies. By the same reason also compression of inverse telcined movies is worse than of natively progressive movies. We in Europe should thank god every day that we are not getting telecined. However, here in Germany we have digital tv broadcasters, which like to comb progressive films (about 5% of all progressive movies from ARD and especially ZDF are combed). Fortunately these idiots are not able to double fields, so RemoveDirt should work, but on combed films the dirt is always split over two frames which clearly hurts RemoveDirt. On the other hand, if these combed films are uncombed, then we have the compression context problem for any frame and not only for any fourth frame. Stepping through the video with the builtin filter Bob() one can decide with near absolute certainty, whether the video is truely progressive, interlaced, telecined, field blended or progressive with a field shift.&lt;br /&gt;
&lt;br /&gt;
4. Put other filters after RemoveDirt. Except those filters mentioned before, like crop and inverse telecine, all other filters should be put after RemoveDirt in the Avisynth script, because most filters have a negative rather than a positive impact on dirt detection.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Change Log ==&lt;br /&gt;
&lt;br /&gt;
* v0.9.2 (20190324)&lt;br /&gt;
  - RestoreMotionBlocks: 10-16 bit support. Relevant threshold and noise parameters are bit depth independent.&lt;br /&gt;
  - minor speedup&lt;br /&gt;
  - SCSelect: add support for 10-16 bits and 32 bit float clips&lt;br /&gt;
  - SCSelect: add support for planar RGB&lt;br /&gt;
  - FIX: SCSelect: make it work properly for large frames (&amp;gt;8MPixel)&lt;br /&gt;
  - FIX: SCSelect: Makes use the whole frame: now counts the rightmost non-mod32 pixels as well.&lt;br /&gt;
  - Clang support (LLVM) with Visual Studio 2017&lt;br /&gt;
  - update html docs&lt;br /&gt;
  - add clang-built DLLs to the released version&lt;br /&gt;
&lt;br /&gt;
* v0.9.1 (20190314)&lt;br /&gt;
  - project moved to github: https://github.com/pinterf/RemoveDirt&lt;br /&gt;
  - built using Visual Studio 2017&lt;br /&gt;
  - x64 build for Avisynth+&lt;br /&gt;
  - Added version resource to DLL&lt;br /&gt;
  - Changed to AVS 2.6 plugin interface&lt;br /&gt;
  - Fix: RestoreMotionBlocks: grey=false: it was copying 8x4 chroma pixels for YV12 and 8x8 for YUY2 instead of 4x4 and 8x4 blocks&lt;br /&gt;
  - Fix: SCSelect: Old v0.9 SSE2 code omitted difference checking for every second 8 columns&lt;br /&gt;
  - Removed MMX code, now requires SSE2&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_SERIALIZED]] for SCSelect&lt;br /&gt;
  - Reports MT Modes for Avisynth+: [[MT_MULTI_INSTANCE]] for RestoreMotionBlocks (may not be any faster)&lt;br /&gt;
  - Added Y, YV16 and YV24 support besides existing YV12 and planar-hacked-YUY2&lt;br /&gt;
&lt;br /&gt;
* v0.9 (20050507)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;300px&amp;quot;| Mirror&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Comments&lt;br /&gt;
!!width=&amp;quot;500px&amp;quot;| Source code&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|[http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|[https://web.archive.org/web/20150405173333if_/http://xhmikosr.1f0.de/_old/avisynth/plugins/RemoveDirt_0.9.zip RemoveDirt_0.9.zip]&lt;br /&gt;
|includes statically and dynamically linked [[SSE2]] binaries compiled with MSVC2010. Dynamically linked binaries requires the [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 Redistributable Package (x86)] to be installed.&lt;br /&gt;
|Included with the binaries.&lt;br /&gt;
|-&lt;br /&gt;
!v0.9&lt;br /&gt;
|&amp;lt;strike&amp;gt;[https://web.archive.org/web/20140723074402if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.zip ReduceDirt.zip]&amp;lt;/strike&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|includes 3 binaries: one statically linked (&amp;lt;tt&amp;gt;RemoveDirtS.dll&amp;lt;/tt&amp;gt;) and two dynamically linked (&amp;lt;tt&amp;gt;RemoveDirt.dll, RemoveDirtSSE2.dll&amp;lt;/tt&amp;gt;). &lt;br /&gt;
SSE2 version is recommended but unfortunately it requires the &amp;lt;tt&amp;gt;Msvcr71.dll&amp;lt;/tt&amp;gt; runtime component from the very ancient Microsoft Visual C++ .NET 2003. For this reason this package is considered deprecated!&lt;br /&gt;
|[https://web.archive.org/web/20141121054131if_/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt-src.zip  ReduceDirt-src.zip]&lt;br /&gt;
|-&lt;br /&gt;
!v0.6.1&lt;br /&gt;
|[https://web.archive.org/web/20050215121957if_/http://home.pages.at/kassandro/RemoveDirt/RemoveDirt.zip RemoveDirt.zip]&lt;br /&gt;
|&lt;br /&gt;
|Old archived documentation: [https://web.archive.org/web/20050311122626/http://www.removedirt.de.tf www.removedirt.de.tf]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[https://web.archive.org/web/20160610102940/http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.htm RemoveDirt.htm] - official v0.9 documentation. &lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=641337#post641337&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1560013&amp;amp;highlight=scselect#post1560013&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1564754&amp;amp;highlight=scselect#post1564754&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1518730&amp;amp;highlight=scselect#post1518730&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1409324#post1409324&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1483843&amp;amp;highlight=scselect#post1483843&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1488392&amp;amp;highlight=scselect#post1488392&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1479632&amp;amp;highlight=scselect#post1479632&lt;br /&gt;
*http://forum.doom9.org/showthread.php?t=145753&amp;amp;highlight=scselect&amp;amp;page=2&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1206869&amp;amp;highlight=scselect#post1206869&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1351709&amp;amp;highlight=scselect#post1351709&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1405939&amp;amp;highlight=scselect#post1405939&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1205317&amp;amp;highlight=scselect#post1205317&lt;br /&gt;
*http://forum.doom9.org/showthread.php?p=1507954&amp;amp;highlight=scselect#post1507954&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#Luma_Equalization|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2024-12-19T12:04:31Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: Update ConvertToXXXX, 3.7.3 change log, mention param1,param2,param3, Add YUVA versions, PC601,PC709 related additions, link to avs+ docs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div {{BlueBox2|40|0|3px solid purple}} &amp;gt;&lt;br /&gt;
{{AvsPlusFullname}}&amp;lt;br&amp;gt;&lt;br /&gt;
Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/convert.html https://avisynthplus.readthedocs.io]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' or '''ConvertToYV16''' (and high bit depth variants) where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different, or the target placement is different from the source chroma placement read from _ChromaLocation frame property.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 {{AvsPluscon}} ] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 {{AvsPluscon}} ] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 {{AvsPluscon}} ] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUVA444(clip, [ string ''matrix'', bool ''interlaced'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'', {{AvsPluscon}} &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 {{AvsPluscon}} ] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUVA422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'',  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] )  {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUVA420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'',  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3  {{AvsPluscon}}] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
|ConvertToYUV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float param1, float param2, float param3 ] )  {{AvsPluscon}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:l&amp;quot; means the same as the old &amp;quot;Rec709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited, except &amp;quot;PC.601&amp;quot; and &amp;quot;PC.709&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;470bg:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;470bg:f&amp;quot; but only if source has _ColorRange = 0 (full) &lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; but only if source has _ColorRange = 0 (full)  &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot; but only if source has _ColorRange = 0 (full) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot;, &amp;quot;sinc&amp;quot;, &amp;quot;sinpow&amp;quot;, &amp;quot;sinclin2&amp;quot; and &amp;quot;userdefined2&amp;quot;). Default is &amp;quot;bicubic&amp;quot;. Latter three is for {{AvsPluscon}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resampler parameters}}&lt;br /&gt;
{{Par2|param1|float|default depends on resampler type}}&lt;br /&gt;
{{Par2|param2|float|default depends on resampler type}}&lt;br /&gt;
{{Par2|param3|float|default depends on resampler type}}&lt;br /&gt;
&lt;br /&gt;
:These 'float' type parameters can be the additional parameters for the chroma resamplers. Some resizer algorithms would need and can be fine tuned with up to 3 parameters. Their default values depend on the selected chromaresample resizer kernel,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Frame properties {{AvsPluscon}} ===== &lt;br /&gt;
&lt;br /&gt;
In Avisynth v3.7.1. frame property (_ChromaLocation) support appears in selected filters (e.g. ConvertToYUV422).&lt;br /&gt;
Property can be read and/or set.&lt;br /&gt;
A frame property can replace default behaviour of location parameters and is set (or deleted) upon finishing conversion.&lt;br /&gt;
Since a format without subsampling such as 4:4:4 (YV24) does not have chroma location, the property is deleted automatically when converting to 4:4:4 or RGB.&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;ChromaInLocation&amp;quot; rules:&lt;br /&gt;
::* if source has _ChromaLocation frame property it will be used else the default is &amp;quot;mpeg2&amp;quot; (&amp;quot;left&amp;quot;)&lt;br /&gt;
::* if parameter is &amp;quot;auto&amp;quot; or not given at all, ChromaInLocation will be set to the above mentioned default value&lt;br /&gt;
::* if parameter is explicitely given, it will be used&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;ChromaOutLocation&amp;quot; rules:&lt;br /&gt;
::* default is &amp;quot;mpeg2&amp;quot; (&amp;quot;left&amp;quot;)&lt;br /&gt;
::* if parameter is &amp;quot;auto&amp;quot; or not given at all, ChromaOutLocation will be set to the above mentioned default value&lt;br /&gt;
::* if parameter is explicitely given, it will be used&lt;br /&gt;
&lt;br /&gt;
: Accepted values for &amp;quot;ChromaInLocation&amp;quot; and &amp;quot;ChromaOutLocation&amp;quot; (when source/target is a chroma subsampled format)&lt;br /&gt;
: (full list):&lt;br /&gt;
::* &amp;quot;left&amp;quot; or &amp;quot;mpeg2&amp;quot;&lt;br /&gt;
::* &amp;quot;center&amp;quot; or &amp;quot;jpeg&amp;quot; or &amp;quot;mpeg1&amp;quot;&lt;br /&gt;
::* &amp;quot;top_left&amp;quot;&lt;br /&gt;
::* &amp;quot;dv&amp;quot;&lt;br /&gt;
::* &amp;quot;top&amp;quot; &lt;br /&gt;
::* &amp;quot;bottom_left&amp;quot;&lt;br /&gt;
::* &amp;quot;bottom&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: _ChromaLocation constants - as seen in propShow()&lt;br /&gt;
  &lt;br /&gt;
::* AVS_CHROMA_LEFT        = 0&lt;br /&gt;
::* AVS_CHROMA_CENTER      = 1&lt;br /&gt;
::* AVS_CHROMA_TOP_LEFT    = 2 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_TOP         = 3 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_BOTTOM_LEFT = 4 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_BOTTOM      = 5 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_DV          = 6  Special to Avisynth&lt;br /&gt;
&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.3&lt;br /&gt;
| Added &amp;quot;sinpow&amp;quot;, &amp;quot;sinclin2&amp;quot; and &amp;quot;userdefined2&amp;quot; to chromaresampler options&amp;lt;br&amp;gt;Add &amp;quot;param1&amp;quot;, &amp;quot;param2&amp;quot; and &amp;quot;param3&amp;quot; to ConvertToXXXX where 'chromaresample' exists (b,c,s,taps and p parameters can be set, depending on the resizer.)&amp;lt;br&amp;gt;Add ConvertToYUVA420, ConvertToYUVA422, ConvertToYUVA444&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.1&lt;br /&gt;
| Added ChromaOutPlacement to 4:2:2 related functions&amp;lt;br&amp;gt;Added new matrix constants, optional new syntax&amp;lt;br&amp;gt;Added new chroma location constants&amp;lt;br&amp;gt;Added _ChromaLocation frame property&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</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>2024-12-11T12:13:07Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Film Damage correction */ update Descratch authors and color formats&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;
*[https://web.archive.org/web/20130803185015/http://www.64k.it:80/andres/dettaglio.php?sez=avisynth Andres' Filter Collection] &lt;br /&gt;
*[https://chaosking.de/repo/avsfilters/ AviSynth Filter DB by ChaosKing] | [https://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;
'''[[AviSynth%2B_x64_plugins|Comprehensive list of AviSynth+ 64-bit filters]] &amp;amp;rarr;'''&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;
| [https://forum.doom9.org/showthread.php?t=135855 BassAudio]&lt;br /&gt;
| [https://www.un4seen.com/ 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;
| [https://forum.doom9.org/showthread.php?t=135855 Plugin]&lt;br /&gt;
| dimzon&lt;br /&gt;
|-&lt;br /&gt;
|[[BestAudioSource]]&lt;br /&gt;
|A new sample accurate but somewhat slow FFmpeg based audio source filter for AviSynth+. No indexing required and only available in 64-bit. &lt;br /&gt;
|N/A&lt;br /&gt;
|[[BestAudioSource|Plugin]]&lt;br /&gt;
|{{Author/Myrsloik}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DGDecNV]] &lt;br /&gt;
| DGDecNV is a decoder/frameserver for AVC, HEVC, MPEG2, and VC1 streams that runs on the GPU of Nvidia graphics cards that support CUDA video decoding. &lt;br /&gt;
| [[I420]], [[YV12]], [[YUV420P16]] &lt;br /&gt;
| [[DGDecNV|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/dgmvcsource100b26.zip Plugin]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DSS2mod]]&lt;br /&gt;
| DirectShowSource2 mod, this version does not require Haali Media Splitter. &lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[DSS2mod|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;
| [[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;
| [[ImageSequence|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;
|[https://forum.doom9.org/showthread.php?t=184825 ImageSourceNV]&lt;br /&gt;
|CUDA accelerated plugin that uses the [https://docs.nvidia.com/cuda/nvjpeg/index.html nvJPEG API] to decode jpeg source files and convert their color space to YUV444.&lt;br /&gt;
|[[YUV444P8]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=184825 Plugin]&lt;br /&gt;
|[https://github.com/ArturAlekseev Argaricolm]&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;
|[[MPEG2DecPlus]]&lt;br /&gt;
|MPEG2DecPlus is a MPEG-1/2 decoder plug-in. MPEG2DecPlus is a project to modernize &amp;quot;[[DGDecode]].dll&amp;quot; for AviSynth+.&lt;br /&gt;
|[[YV12]], [[YV16]]&lt;br /&gt;
|[[MPEG2DecPlus|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&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;
| [[NicAudio|Plugin]]&lt;br /&gt;
| {{Author/Nic}}&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).&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[RawSource26|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[VapourSource]]&lt;br /&gt;
| VapourSynth script reader for AviSynth+ and AviSynth2.6x.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[VapourSource|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;
|[[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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[ColorMatrix|Plugin]]&lt;br /&gt;
| {{Author/Wilbert Dijkhof}}, {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeBlot]]&lt;br /&gt;
| Color bleed reduction plugin. &lt;br /&gt;
| [[YUY2]],[[YV12]]&lt;br /&gt;
| [[DeBlot|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&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;
| [[MoveChroma|Plugin]]&lt;br /&gt;
| [http://noraneco.ddo.jp/apechironnup apechironnup]&lt;br /&gt;
|-&lt;br /&gt;
| [[PixelShiftPlus]]&lt;br /&gt;
| Set of functions to independently shift any RGB(A) or YUV(A) plane with subpixel precision.&lt;br /&gt;
| All colorspaces&lt;br /&gt;
| [[PixelShiftPlus|Script]]&lt;br /&gt;
| reel.deal&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. See [http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&amp;amp;t=512 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [https://web.archive.org/web/20131111114822/http://www.nmm-hd.org/upload/get~ikKt5ZZhD94/AdaptDBMC_beta.rar Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GradFun2db]]&lt;br /&gt;
| A simple and fast debanding filter.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[GradFun2db|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;
| [[Dither_tools#GradFun3|GradFun3]]&lt;br /&gt;
| This debanding script, part of the [[Dither_tools|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;
| [[Dither_tools|Script]]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[f3kdb|flash3kyuu_deband]]&lt;br /&gt;
| Fast debanding plugin ported from AviUtl.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[YV16]], [[YV24]], [[Y8]], [[YV411]]&lt;br /&gt;
| [[f3kdb|Plugin]]&lt;br /&gt;
| [http://github.com/SAPikachu/ SAPikachu]&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Deband|libplacebo_Deband]]&lt;br /&gt;
|Tunable debanding. Based on flash3kyuu, expanded to provide high quality by combining multiple debanding passes.&lt;br /&gt;
|8, 16 or 32-bit planar RGB/YUV formats. &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
| [[Neo_f3kdb]]&lt;br /&gt;
| Fast debanding plugin for AviSynth+.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YUY2]], [[YV16]], [[YV24]], [[YV411]], 8-16bit [[planar]] Y/YUV&lt;br /&gt;
| [[Neo_f3kdb|Plugin]]&lt;br /&gt;
| [https://github.com/msg7086 MeteorRain]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deblocking ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlockDetect BlockDetect]&lt;br /&gt;
|Determines blockiness of frames.&lt;br /&gt;
|All 8-32 bit [[planar]] formats.&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlockDetect/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&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. DGDecode also uses DeBlock.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], &amp;lt;br&amp;gt;all 8-32bit Y/YUV [[planar]] colorspaces &lt;br /&gt;
| [[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.&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[[DeblockPP7|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[MDeblock|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[SmoothD2|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://www.avisynth.nl/users/fizick/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://www.avisynth.nl/users/fizick/unblock/unblock11.zip Plugin]&lt;br /&gt;
|{{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsDeblockPP7]]&lt;br /&gt;
|A port of the MPlayer PP7 deblocking filter. Includes high bit-depth support.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], &amp;lt;br&amp;gt;all 8-32bit [[planar]] colorspaces &lt;br /&gt;
|[[vsDeblockPP7|Plugin]]&lt;br /&gt;
|Asd-d&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;
|[https://forum.doom9.org/showthread.php?t=172599 HaloBuster]&lt;br /&gt;
|Really slow high quality halo remover.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=172599 Script]&lt;br /&gt;
|feisty2&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;
| {{Author/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;
|[https://gist.github.com/acuozzo/940869257cc79016215600a2392b33eb Deemphasize]&lt;br /&gt;
|This AviSynth function deemphasizes ringing common to SD video signals resulting from a playback device in the transfer chain poorly compensating for pre-emphasis baked into the source signal.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://gist.github.com/acuozzo/940869257cc79016215600a2392b33eb Script]&lt;br /&gt;
|[https://github.com/acuozzo acuozzo]&lt;br /&gt;
|-&lt;br /&gt;
|[[Dering]]&lt;br /&gt;
|Deringing filter intended for deringing VHS captured video.&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[[Dering|C-Plugin]]&lt;br /&gt;
|[https://sourceforge.net/u/alexrayne/profile/ alexrayne]&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;
| {{Author/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;
| [[MosquitoNR|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;
|[[WDFPlus]]&lt;br /&gt;
|Faster version of mirkosp's warpdering_faster script for AviSynth+.&lt;br /&gt;
|All 8-16 bit Y/YUV colorspaces, except YV411&lt;br /&gt;
|[https://github.com/Reel-Deal/AviSynthPlus-Scripts/blob/main/wdfplus.avsi Script]&lt;br /&gt;
|reel.deal&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deinterlacing ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[BWDIF]]&lt;br /&gt;
|Motion adaptive deinterlacing based on yadif with the use of w3fdif and cubic interpolation algorithms.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all 8-32bit [[planar]] colorspaces &lt;br /&gt;
|[[BWDIF|Plugin]]&lt;br /&gt;
|Asd-g&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;
| [[Decomb|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;
| [[EEDI2|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EEDI2CUDA]]&lt;br /&gt;
| EEDI2 filter using CUDA.&lt;br /&gt;
| All [[planar]] Y/YUV/RGB 8 to 16-bit colorspaces &lt;br /&gt;
| [[EEDI2CUDA|Plugin]]&lt;br /&gt;
| [https://github.com/misakikasumi misakikasumi], [https://github.com/WolframRhodium WolframRhodium]&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;
| [[eedi3|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EEDI3CL]]&lt;br /&gt;
| OpenCL implementation of eedi3. For AviSynth+ only.&lt;br /&gt;
| all 8-32bit [[planar]] colorspaces &lt;br /&gt;
| [[EEDI3CL|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [[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;
| [[nnedi3|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[NNEDI3CL]]&lt;br /&gt;
| OpenCL implementation of nnedi3. For AviSynth+ only.&lt;br /&gt;
| all 8-32bit [[planar]] colorspaces &lt;br /&gt;
| [[NNEDI3CL|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [[QTGMC|Script]]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
| [[SangNom2]]&lt;br /&gt;
| Reimplementation of the old [[SangNom]] plugin.&lt;br /&gt;
| [[Y8]],[[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[SangNom2|Plugin]]&lt;br /&gt;
| {{Author/tp7}}&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;
| [[TDeint|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;
| [[TempGaussMC|Script]]&lt;br /&gt;
| {{Author/Didée}}&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;
| [[yadifmod|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[yadifmod2]]&lt;br /&gt;
| Yadif + yadifmod for avisynth2.6/avisynth+. &lt;br /&gt;
| [[YV24]], [[YV16]], [[YV12]], [[YV411]], [[Y8]]&lt;br /&gt;
| [[yadifmod2|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;
| [[ApparentFPS|Plugin]]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [[DeDup]]&lt;br /&gt;
| Remove (drop) duplicate frames in the interest of compression quality and speed. Resulting clip will have a variable frame rate.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[DeDup]]&lt;br /&gt;
| {{Author/akupenguin}}&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. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[Dup|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=175357 Duplicity2/DropDeadGorgeous]&lt;br /&gt;
|A two faced scheming and double dealing [on your behalf] dupe tool.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=175357 Script]&lt;br /&gt;
|StainlessS&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.&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;
| [https://github.com/eparsons Corran]&lt;br /&gt;
|-&lt;br /&gt;
| [[DupStep]]&lt;br /&gt;
| Duplicate frame detector/decimator filter for [[AviSynth+]], 64-bit version only.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Avisynthplus_color_formats|8-16 bits]]&lt;br /&gt;
| [[DupStep|Plugin]]&lt;br /&gt;
| [http://github.com/Orum Orum]&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.&lt;br /&gt;
| [[RGB24]] [[RGB32]], [[Y8]], [[YV12]] [[YV16]], [[YV24]]&lt;br /&gt;
| [[ExactDedup|Plugin]]&lt;br /&gt;
|Steve Melenchuk, Arick Chan, StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/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://www.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;
| [[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.&lt;br /&gt;
| [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[ExBlend|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;
|[[DePulse]]&lt;br /&gt;
|DePulse is dropout remover, removes white/black noise horizontal streaking in analogue captures.&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[[DePulse|Plugin]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[DeScratch]]&lt;br /&gt;
| DeScratch removes vertical scratches from films. Also it can be used for removing of horizontal noise lines such as drop-outs from analog VHS captures (after image rotation). &lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[DeScratch|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}, {{Author/Myrsloik}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeSpot]]&lt;br /&gt;
| This filter is designed to remove temporal noise in the form of dots (spots) and streaks found in some videos. The filter is also useful for restoration (cleaning) of old telecined 8mm (and other) films from spots (from dust) and some stripes (scratches).&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[DeSpot|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.&lt;br /&gt;
| 8-bit RGB/YUV&lt;br /&gt;
| [[DeVCR#Script|Script]]&lt;br /&gt;
| Ricardo Garcia&lt;br /&gt;
|-&lt;br /&gt;
|[[KillPulse]]&lt;br /&gt;
|KillPulse is dropout remover, removes white/black noise horizontal streaking in analogue captures.&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[[KillPulse|Plugin]]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.net/showthread.php?p=1402690 KillerSpots]&lt;br /&gt;
|Spot removal function based on Didée's idea from 2010 that makes use of MVTools analysis and RemoveDirt to detect and clean up spots with adiacent pixels.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|[https://github.com/FranceBB/KillerSpots Script]&lt;br /&gt;
|Didée, GMJCZP and John Meyer.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveDirt]]&lt;br /&gt;
| RemoveDirt is a temporal cleaner for AviSynth 2.6 and AviSynth+.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[RemoveDirt|Plugin]]&lt;br /&gt;
| {{Author/kassandro}}, {{Author/pinterf}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=121197 RemoveLine]&lt;br /&gt;
|Script for removal of horizontal stripes.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|Script&lt;br /&gt;
|Yup&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=181777 SpotLess]&lt;br /&gt;
|Script filter to remove spots and noise using mvTools2 and Medianblur2. Copes with spots on multiple consecutive frames, setting RadT accordingly.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182407 SpotRemover]&lt;br /&gt;
|This script is designed to clean video from spots. Based on SpotLess script by StainlessS.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|Arx1meD&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;
&lt;br /&gt;
=== Frequency Interference removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/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://www.avisynth.nl/users/fizick/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;
| [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;
| [[FDecimate|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FDecimate2]]&lt;br /&gt;
| FDecimate2 is based on FDecimate v1.0.2. FDecimate2, fixes some problems with bugged metrics in FDecimate v1.0.2.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[FDecimate2|Plugin]]&lt;br /&gt;
| {{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IT]]&lt;br /&gt;
| Inverse Telecine plugin.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[IT|Plugin]]&lt;br /&gt;
| {{Author/thejam79}} / {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IVTC_txt60mc|ivtc_txt60mc]]&lt;br /&gt;
| Deinterlaces telecined footage with that has been overlayed scrolling text at 60i.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[IVTC_txt60mc|Script]]&lt;br /&gt;
| {{Author/cretindesalpes}}&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;
|[[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;
|[[MDec2|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;
| 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;
| [[Decomb]]&lt;br /&gt;
| The Telecide and Decimate filters can be combined to implement IVTC.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Decomb|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182369 TelecineBob]&lt;br /&gt;
|If your source soffers from field blending, as long as no deinterlacing is made you will find out that conveniently the blended fields are often paired with a clean one. FieldDeBlend takes advantage of that and checks for frames whose fields don't match to replace the frame with a clean one as long there is one.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://www.mediafire.com/file/sa1oae96m63mkje/TelecineBob.zip/file Plugin]&lt;br /&gt;
|Ceppo&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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TIVTC|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;
| [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|Ghostbuster]]&lt;br /&gt;
| A filter for the removal of ghosting.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [[GhostBuster|Plugin]]&lt;br /&gt;
| {{Author/SansGrip}}&lt;br /&gt;
|-&lt;br /&gt;
| [[LGhost]]&lt;br /&gt;
| Plugin intended for ghost removal but can also reduce edge (ringing) artifacts.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[LGhost|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsLGhost]]&lt;br /&gt;
| Luminance Ghost reduction filter. Can be used for removing luminance ghost or edge ghost (ringing). &lt;br /&gt;
| All [[Planar]] colorspaces (8-32bit)&lt;br /&gt;
| [[vsLGhost|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logo Removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AvsInpaint]]&lt;br /&gt;
| This plugin comes with the intention to provide a suit for the removal of logos, whether opaque or transparent. It provides algorithms for these tasks: logo detection, deblending, and logo inpainting.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[AvsInpaint|C-Plugin]]&lt;br /&gt;
| AMSS0815, {{Author/pinterf}}&lt;br /&gt;
|-&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;
|[[DelogoHD]]&lt;br /&gt;
|DelogoHD is an overhaul of the original delogo filter, which was originally written by MakKi many years ago. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], &amp;lt;br&amp;gt; 8-16bit planar YUV&lt;br /&gt;
|[[DelogoHD|Plugin]]&lt;br /&gt;
|MeteorRain&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=184881 DoomDelogo]&lt;br /&gt;
| DoomDelogo meant to be simpler and perform better than deKafka, s_ExLogo, x-Logo and similar.&lt;br /&gt;
| Any&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=184881 Script]&lt;br /&gt;
| VoodooFX&lt;br /&gt;
|-&lt;br /&gt;
| [[ExInpaint]]&lt;br /&gt;
| Exemplar-Based Image Inpainting. See [http://forum.doom9.org/showthread.php?t=133773 discussion] &lt;br /&gt;
| [[RGB24]] [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[ExInpaint|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 InpaintDelogo]&lt;br /&gt;
|InpaintDelogo is an advanced logo and watermark removal function using inpainting and deblending with an adjustable fine process to hide artifacts and get best delogo results.&lt;br /&gt;
Can remove opaque, transparent, semi-transparent and some dynamic logos from video.&lt;br /&gt;
Can be used to remove hardcoded subtitles or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 Script]&lt;br /&gt;
|VoodooFX&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;
| [[InpaintFunc|Script]]&lt;br /&gt;
| Reuf Toc&lt;br /&gt;
|-&lt;br /&gt;
| LogoNR&lt;br /&gt;
| Post-denoise filter for EraseLogo or [[DelogoHD]]. See [https://web.archive.org/web/20210915185704/https://www.nmm-hd.org/newbbs/viewtopic.php?t=649 discussion]&lt;br /&gt;
| All [[planar]] colorspaces&lt;br /&gt;
| [https://web.archive.org/web/20220702130736/https://pastebin.com/raw/qZBU3NQA Script]&lt;br /&gt;
| {{Author/06_taro}}&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;
| [[Uglarm]]&lt;br /&gt;
| Filter for blurring a logo, using LogoAway style Uglarm Interpolation method.&lt;br /&gt;
| [[RGB24]] [[RGB32]],[[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Uglarm|Plugin]]&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.&lt;br /&gt;
| [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[X-Logo|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;
| [[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;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]]&lt;br /&gt;
| [[DeFlicker|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}, {{Author/pinterf}}&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;
| [[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;
| [[EquLines|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[LMFlicker|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;
| Plugin to reduce temporal oscillations.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[ReduceFlicker|Plugin]]&lt;br /&gt;
| {{Author/kassandro}}, {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[TimeLapseDF|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]], 8-16bit planar Y/YUV&lt;br /&gt;
| [[Vinverse|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;
| [[Bifrost|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[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;
| [[DDCR]]&lt;br /&gt;
| A purely spatial dot crawl removal script for AviSynth+.&lt;br /&gt;
| all 8 bit Y/YUV colorspaces&lt;br /&gt;
| [[DDCR|Script]]&lt;br /&gt;
| Reel.Deal&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;
| [[DeCross|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;
| all planar Y, YUV, and YUVA (8-16 bit)&lt;br /&gt;
| [[DeDot|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;
|[[DotKill]]&lt;br /&gt;
|Spatio-temporal dotcrawl and rainbow remover.&lt;br /&gt;
|[[YV12]], [[YV16]], [[YV24]], [[YV411]], 8-16bits&lt;br /&gt;
|[[DotKill|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=170328 FadeDeRainbow]&lt;br /&gt;
|Another de-rainbowing script.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=170328 Script]&lt;br /&gt;
|bxyhxyh&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).&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[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).&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[DePan|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|Script]]&lt;br /&gt;
|[http://pastebin.com/u/tophf tophf]&lt;br /&gt;
|-&lt;br /&gt;
| [[Deshaker3D]]&lt;br /&gt;
| Experimental 3D image stabilizer (VDub [http://www.guthspot.se/video/deshaker.htm Deshaker] required).&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Deshaker3D|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;
|[https://github.com/arnean/PerfPan PerfPan]&lt;br /&gt;
|PerfPan is an AviSynth plugin to stabilize scanned film using perforation as a reference.&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://github.com/arnean/PerfPan/tree/master/windows Plugin]&lt;br /&gt;
|[https://github.com/arnean arnean]&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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[Stab|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;
|{{Author/Dogway}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182532 Stab_Light]&lt;br /&gt;
|Another stabilization script; based on Stab3.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|Arx1meD&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;
| [[AdaptiveMedian|Plugin]]&lt;br /&gt;
|{{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Deathray]]&lt;br /&gt;
|OpenCL GPU accelerated spatial/temporal non-local means de-noising.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[Deathray|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;
| [[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;
| [[DeSaltPepper|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFTQuiver]]&lt;br /&gt;
| Remove periodic noise. Useful for analog interference.&lt;br /&gt;
| [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[FFTQuiver|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TNLMeans]]&lt;br /&gt;
| TNLMeans is an implementation of the NL-means denoising algorithm.&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;
| [[TNLMeans|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.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[KNLMeansCL|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;
| [[_2DCleanYUY2|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;
| [[DctFilter|Plugin]]&lt;br /&gt;
| {{Author/Tom Barry}}&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;
| [[Frfun7|Plugin]]&lt;br /&gt;
| prunedtree&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;
|[[MiniDeen]]&lt;br /&gt;
|MiniDeen is a spatial denoising filter. It replaces every pixel with the average of its neighbourhood. This is a port of the &amp;quot;a2d&amp;quot; method from the AviSynth plugin [[Deen]], version beta 2.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar YUV in AviSynth+&lt;br /&gt;
|[[MiniDeen|Plugin]]&lt;br /&gt;
|{{Author/dubhater}} / MeteorRain&lt;br /&gt;
|-&lt;br /&gt;
|[[Neo_VagueDenoiser]]&lt;br /&gt;
|Wavelet based Denoiser. Refactored version of the original VagueDenoiser; includes optimizations, additional colorspaces, and high bit depth support.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar YUV in AviSynth+&lt;br /&gt;
|[[Neo_VagueDenoiser|Plugin]]&lt;br /&gt;
| HolyWu, [https://github.com/msg7086 MeteorRain]&lt;br /&gt;
|-&lt;br /&gt;
|[[sbr]]&lt;br /&gt;
|sbr is helper function to make a highpass on a blur's difference.&lt;br /&gt;
|All YUV [[planar]] 8 to 16-bit colorspaces &lt;br /&gt;
|[[sbr|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothUV2]]&lt;br /&gt;
| SmoothUV2 is a spatial derainbow filter. This filter performs structure-preserving smoothing (blurring) on the U/V (chrominance or colour) information of the image, leaving Y (luminance) intact.  &lt;br /&gt;
| All YUV, YUVA [[planar]] 8 to 16-bit colorspaces &lt;br /&gt;
| [[SmoothUV2|Plugin]]&lt;br /&gt;
| {{Author/dubhater}}, {{Author/Asd-g}}&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;
|[[SPresso|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;
| [[TBilateral|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[VagueDenoiser|Plugin]]&lt;br /&gt;
| {{Author/Lefungus}}, {{Author/Kurosu}}, {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsMSmooth]]&lt;br /&gt;
|vsMSmooth is a spatial smoother that doesn't touch edges. &lt;br /&gt;
||[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all planar Y, YUV, and RGB formats,  8 to 16 bit&lt;br /&gt;
|[[vsMSmooth|Plugin]]&lt;br /&gt;
|{{Author/dubhater}}, {{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsTBilateral]]&lt;br /&gt;
|vsTBilateral is a spatial smoothing filter that uses the bilateral filtering algorithm.&lt;br /&gt;
|All [[planar]] 8 to 16-bit colorspaces&lt;br /&gt;
|[[vsTBilateral |Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[Cnr2|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;
| [[FluxSmooth|Plugin]]&lt;br /&gt;
| {{Author/SansGrip}}, {{Author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| MDegrain&lt;br /&gt;
| Strong and effective temporal denoiser. Part of the [[MVTools]] package.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[MVTools|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&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;
| [[TemporalDegrain2]]&lt;br /&gt;
| Temporal Degrain enhanced with parts of QTGMC, potentially slower but more effective at removing grain from video sources while retaining more details.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]] (8-16 bit)&lt;br /&gt;
| [[TemporalDegrain2|Script]]&lt;br /&gt;
| Didée, Sagekilla, Vit, real.finder, ErazorTT&lt;br /&gt;
|-&lt;br /&gt;
|[[vsCnr2]]&lt;br /&gt;
|vsCnr2 is a temporal denoiser designed to denoise only the chroma. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV, and YUVA (8-16 bit) &lt;br /&gt;
|[[vsCnr2|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsTTempSmooth]]&lt;br /&gt;
|vsTTempSmooth is a motion adaptive (it only works on stationary parts of the picture), temporal smoothing filter. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV, and YUVA (8-32 bit) &lt;br /&gt;
|[[vsTTempSmooth|Plugin]]&lt;br /&gt;
|HolyWu, {{Author/Asd-g}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spatio-Temporal Denoisers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[BM3DCUDA]]&lt;br /&gt;
|BM3D denoising filter for AviSynth+, implemented in CUDA.&lt;br /&gt;
|32-bit [[planar]] colorspaces&lt;br /&gt;
|[[BM3DCUDA|Plugin]]&lt;br /&gt;
|[https://github.com/WolframRhodium WolframRhodium]&lt;br /&gt;
|-&lt;br /&gt;
| [[Convolution3D]]&lt;br /&gt;
| Convolution3D is a spatio-temporal smoother, it applies a 3D convolution filter to all pixels of consecutive frames.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[Convolution3D|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;
| [[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;
| [https://web.archive.org/web/20160604213634/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.&lt;br /&gt;
| [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[dfttest|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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[DeGrainMedian|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DFilter]]&lt;br /&gt;
| A 3D Frequency Domain filter - gives strong denoising and moderate sharpening.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]], any Y, YUV and Planar RGB 8-32 bit&lt;br /&gt;
| [[FFT3DFilter|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}, martin53, {{Author/pinterf}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DGPU]]&lt;br /&gt;
| Similar algorithm to FFT3DFilter, but uses graphics hardware for increased speed.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]], Planar RGB 8 bit&lt;br /&gt;
| [[FFT3DGPU|Plugin]]&lt;br /&gt;
| {{Author/tsp}}, {{Author/pinterf}}&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;
| 8-16bit planar YUV&lt;br /&gt;
| [[hqdn3d|Plugin]]&lt;br /&gt;
| {{Author/akupenguin}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174804 mclean]&lt;br /&gt;
|Typical spatial filters work by removing large variations in the image on a small scale, reducing noise but also making the image less sharp or temporally stable. mClean removes noise whilst retaining as much detail as possible, as well as provide optional image enhancement.&lt;br /&gt;
|[[YV12]], [[HBD]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174804 Script]&lt;br /&gt;
|burfadel&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;
| [[MC_Spuds|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;
| [[MCTemporalDenoise|Script]]&lt;br /&gt;
| {{Author/LaTo}}&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;
| [https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/RemoveDirtMC_SE.avsi Script]&lt;br /&gt;
| Nephilis/A.SONY&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;
| [[RemoveGrainHD|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;
| [[RgTools|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;
|[[SMDegrain|Script]]&lt;br /&gt;
|{{Author/Dogway}}&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.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[STPresso|Script]]&lt;br /&gt;
|{{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsDeGrainMedian]]&lt;br /&gt;
|vsDeGrainMedian is a spatio-temporal limited median denoiser.&lt;br /&gt;
|All [[planar]] 8 to 16bit colorspaces&lt;br /&gt;
|[[vsDeGrainMedian|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
| [[Average|Plugin]]&lt;br /&gt;
| {{Author/tp7}}, {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[[AviSynthGimpLayer]]&lt;br /&gt;
|AviSynth Gimp-style Layer merge plugin.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[AviSynthGimpLayer|Plugin]]&lt;br /&gt;
| [http://sourceforge.net/u/panzerboy66/profile/ panzerboy66]&lt;br /&gt;
|-&lt;br /&gt;
|[[AVS_SoftLight]]&lt;br /&gt;
|AviSynth+ plugin. It makes a softlight blend with a negative of average. Only x64 version available and with CUDA support. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[AVS_SoftLight|Plugin]]&lt;br /&gt;
|Argaricolm&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 satisfies 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;
|[[ClipBlend]]&lt;br /&gt;
|Filter to blend consecutive frames in a clip. &lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[ClipBlend|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/colorkeyframe/colorkeyframe.html ColorKeyFrame]&lt;br /&gt;
| Linear interpolation of color correction with key frames. &lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/colorkeyframe/colorkeyframe03.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[ColorScreenMask|Plugin]]&lt;br /&gt;
|Grandpa Oddball&lt;br /&gt;
|-&lt;br /&gt;
|[[ColourMask]]&lt;br /&gt;
|Creates colour masks.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[ColourMask|Plugin]]&lt;br /&gt;
|{{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[CombMask|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;
|[[Fusion|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;
| [[GraMaMa|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/8c4rxlwbs020ib1/MaskCrop0.1.2.7z?dl=1 Plugin] &amp;lt;!--[http://www.dropbox.com/s/98bcjuiy2ojkz75/MaskCrop0.1.1.7z?dl=1 Old v0.1.1 plugin] [http://www.dropbox.com/s/xcrlno31jqavqob/MaskCrop.7z?dl=1 Old v0.1.0 plugin]--&amp;gt;&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;
|{{Author/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.&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[Median|Plugin]]&lt;br /&gt;
|{{Author/ajk}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MTCombMask]]&lt;br /&gt;
|This filter produces a mask showing areas that are combed, it uses 3-point sampling to determine combing in a pixel. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], 8-32bit planar Y/YUV/YUVA&lt;br /&gt;
|[[MTCombMask|Plugin]]&lt;br /&gt;
|{{Author/Manao}}, [https://github.com/Asd-g Asd-g]&lt;br /&gt;
|-&lt;br /&gt;
|[[OverlayPlus]]&lt;br /&gt;
|Layering scrip similar to AviSynth's internal Overlay but includes more blending modes and some additional features.&lt;br /&gt;
|All 8-32bit colorspaces&lt;br /&gt;
|[[OverlayPlus|Script]]&lt;br /&gt;
|reel.deel &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;
| [https://web.archive.org/web/20201020085042/https://sites.google.com/site/ourenthusiasmsasham/soft#TOC-ParameterisedBlendd Plugin]&lt;br /&gt;
| [https://web.archive.org/web/20201020085035/https://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;
|[[RedAverage]]&lt;br /&gt;
|Frame-by-frame averaging/merging of multiple clips. Includes a masked average, weighted average, and a merge filter. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[RedAverage|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;
|[[TColorMask]]&lt;br /&gt;
|A simple color masking plugin for AviSynth.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]], 8/16bit planar YUV&lt;br /&gt;
|[[TColorMask|Plugin]]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[TCombMask|Plugin]]&lt;br /&gt;
|{{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
|[[TempLinearApproximate]]&lt;br /&gt;
|TempLinearApproximate takes several frames and for each pixel calculates linear approximation of its values through time, then returns its value in the middle (unless close to beginning or end of clip) of that line.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[TempLinearApproximate|Plugin]]&lt;br /&gt;
|Mystery Keeper&lt;br /&gt;
|-&lt;br /&gt;
|[[TMaskCleaner]]&lt;br /&gt;
|A really simple mask cleaning plugin for AviSynth based on mt_hysteresis.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[TMaskCleaner|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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TMM|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TMM2]]&lt;br /&gt;
| A rewrite of TMM&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[TMM2|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.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Unpremultiply|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;
|[[Watermark2]]&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;
|[[Watermark2|Plugin]]&lt;br /&gt;
|[http://sourceforge.net/u/phillvanleersum/profile/ DrPhill], {{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[YRangeMask]]&lt;br /&gt;
| AviSynth script to create a mask by specifying the range of the brightness. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[YRangeMask|Script]]&lt;br /&gt;
| Chikuzen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blurring ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlurDetect BlurDetect]&lt;br /&gt;
|Determines blurriness of frames.&lt;br /&gt;
|All 8-16 bit [[planar]] formats.&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlurDetect/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.animemusicvideos.org/forum/viewtopic.php?t=101724 BlurMod/ApplyOnAngle]&lt;br /&gt;
|BlurMod() shrinks, blurs, then resizes; resulting in a very strong blur. ApplyonAngle() rotates, filters, then rotates back; making any filter appear as if applied on an angle.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|Script&lt;br /&gt;
|Phantasmagoriat&lt;br /&gt;
|-&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;
| [[BucketMedian|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FastBlur]]&lt;br /&gt;
| Fast approximate Gaussian blurs.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[FastBlur|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GBlur]]&lt;br /&gt;
| Gaussian blur.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[GBlur|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[MedianBlur|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;
| [[MedianBlur2|Plugin]]&lt;br /&gt;
| {{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[[neo_TMedian]]&lt;br /&gt;
|Temporal denoising filter that replaces every pixel with the median of its temporal neighbourhood. &lt;br /&gt;
|8-16 and 32-bit planar&lt;br /&gt;
|[[neo_TMedian|Plugin]]&lt;br /&gt;
|[https://github.com/msg7086 MeteorRain]&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;
| [[VariableBlur|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/20091027134543if_/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;
|[[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;
|[[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;
|[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;
|CropEven&lt;br /&gt;
|Script to crop evenly based on the dimensions given. It will crop the extra pixels off the bottom and right sides if the target resolution is odd. See [https://forum.doom9.org/showthread.php?t=172577 discussion].&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1739589#post1739589 Script]&lt;br /&gt;
|Desbreko&lt;br /&gt;
|-&lt;br /&gt;
|[[EdgeFixer]]&lt;br /&gt;
|EdgeFixer repairs bright and dark line artifacts near the border of an image. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[EdgeFixer]]&lt;br /&gt;
|[https://github.com/sekrit-twc sekrit-twc]&lt;br /&gt;
|-&lt;br /&gt;
|[[FillBorders]]&lt;br /&gt;
|This is a simple filter that fills the borders of a clip, without changing the clip's dimensions.&lt;br /&gt;
|All [[planar]] colorspaces &lt;br /&gt;
|[[FillBorders]]&lt;br /&gt;
|[http://github.com/dubhater dubhater] / Asd&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;
|PadFFT&lt;br /&gt;
|A simple plugin to add borders evenly on each side. See [https://forum.doom9.org/showthread.php?p=1769503#post1769503 discussion]&lt;br /&gt;
|[[Y8]], [[YV12]]&lt;br /&gt;
|[https://web.archive.org/web/20221113033752if_/https://files.videohelp.com/u/223002/PaddFFT_dll_v0.02_20160604.zip Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|PadToMod&lt;br /&gt;
|Script to pad to a specified mod. See [https://forum.doom9.org/showthread.php?t=172577 discussion].&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1746579#post1746579 Script]&lt;br /&gt;
|Desbreko&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;
| [[RoboCrop|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;
|[https://forum.doom9.org/showthread.php?t=183453 ColorMatrixTransform]&lt;br /&gt;
|AviSynth+ plugin for applying a color matrix transform to 32 bit floating point clips.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[https://github.com/TomArrow/ColorMatrixTransform/releases Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&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;
|[https://forum.doom9.org/showthread.php?t=183990 LabConvert]&lt;br /&gt;
|AviSynth+ plugin to convert to LChab (derivative of LAB) color space and back for beautiful color manipulations. &lt;br /&gt;
|[[RGBPS]], [[YUV444PS]]&lt;br /&gt;
|[https://github.com/TomArrow/LabConvertAVS/releases/ Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&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;
|[[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;
|[[PlanarTools|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[[YV12To422]]&lt;br /&gt;
|YV12 to YV16/YUY2 converter for AviSynth 2.6.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[YV12To422|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;
| [[AddGrainC|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;
|[[AGM]]&lt;br /&gt;
|Uses an adaptive mask based on frame and pixels brightness to apply grain.&lt;br /&gt;
|All YUV [[planar]] colorspaces &lt;br /&gt;
|[[AGM|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=167217 Checker]&lt;br /&gt;
|Checkerboard combining filter.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://www.mediafire.com/?ewq8rc0aprzmk8r Plugin] /// [https://web.archive.org/web/20230206191644if_/https://files.videohelp.com/u/223002/checker.zip Archived]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=184052 ChickenDream]&lt;br /&gt;
|Realistic film-grain rendering for AviSynth+.&lt;br /&gt;
|[[Y32]], [[RGBPS]]&lt;br /&gt;
|[https://github.com/EleonoreMizo/chickendream/releases Plugin]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[ColorLooks|Plugin]]&lt;br /&gt;
| {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[crt_display|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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[EffectsMany|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EffectsPlus]]&lt;br /&gt;
| '''AviSynth+ only'''. Creates 26 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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] colorspaces&lt;br /&gt;
| [[EffectsPlus|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;
| [[f3kgrainPlus]]&lt;br /&gt;
| Another 8/16-bit luma adaptive grain generator for AviSynth+.&lt;br /&gt;
| All 8-16 bit Y/YUV colorspaces, except YV411 &lt;br /&gt;
| [[f3kgrainPlus|Script]]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Fingerprint]]&lt;br /&gt;
|Video fingerprint filter. &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[Fingerprint|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&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;
| [[GrainFactory3|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;
| [[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;
|[[ShufflessS]]&lt;br /&gt;
|Shuffle spacial columns or rows (1D), or blocks(2D) of frames, or temporal shuffle (frame order), all shuffles Inversable, ie undoable.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[HBD]] formats in AviSynth+&lt;br /&gt;
|[[ShufflessS|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/sorayuki/TawawaFilter TawawaFilter]&lt;br /&gt;
|An AviSynth plugin to make video in blue color.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[https://github.com/sorayuki/TawawaFilter/releases/ Plugin]&lt;br /&gt;
|[https://github.com/sorayuki sorayuki]&lt;br /&gt;
|-&lt;br /&gt;
| [[TurnsTile]]&lt;br /&gt;
| Applies mosaic and/or palette effects to a clip.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[TurnsTile|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;
|[[FixFPS]]&lt;br /&gt;
|Fix the frames to a more consistent pattern with the help of Matroska Version 2 Timecodes.  Mostly useful for fixing weird framerate from using a third party program to capture (ex. .kkapture with Mupen).  Generally used with the plugin ExactDedup.  It should be noted that FixFPS would try it's best not to lose any frames from the source.  It does this by pushing frames to the next available spot, if possible, but it can cause side effects. See [http://tasvideos.org/forum/viewtopic.php?t=18914 discussion].&lt;br /&gt;
|Any&lt;br /&gt;
|[https://www.mediafire.com/?7bip52hu7v1pps2 Plugin]&lt;br /&gt;
|Aktan&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;
| [[FrameRateConverter]]&lt;br /&gt;
| FrameRateConverter uses motion interpolation with fine artifact removal.&lt;br /&gt;
| [[YV24]], [[YV16]], [[YV12]], [[Y8]]&lt;br /&gt;
| [[FrameRateConverter|Plugin]]&lt;br /&gt;
| [https://github.com/mysteryx93 MysteryX]&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;
|[[JohnFPS]]&lt;br /&gt;
|Frame Rate Converter based on the example from the MVTools documentation with some modifications. This script is also known as &amp;quot;jm_fps&amp;quot;. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[JohnFPS|Script]]&lt;br /&gt;
|johnmeyer, StainlessS &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;
|[[RIFE]]&lt;br /&gt;
|Real-Time Intermediate Flow Estimation for Video Frame Interpolation.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[[RIFE|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SickJumps]]&lt;br /&gt;
| Speed ramping, aka time-remapping (smooth speed changes). Processes both video and audio.&lt;br /&gt;
| [[RGB]], [[YUV]]&lt;br /&gt;
| [[SickJumps|Plugin]]&lt;br /&gt;
| {{Author/Robert Martens}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SVPflow]]&lt;br /&gt;
| SVPflow provides fast and high quality GPU accelerated frame rate interpolation.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[SVPflow|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. Note: only supports Matroska V1 timecodes.&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;
| [[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;
| [[TimecodeFPS|C-Plugin]]&lt;br /&gt;
| natt&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[VFRtoCFR|Plugin]]&lt;br /&gt;
| Aktan&lt;br /&gt;
|-&lt;br /&gt;
| [[VfrToCfr]]&lt;br /&gt;
| This plugin converts variable frame rate clips to constant frame rate by introducing null frames.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[VfrToCfr|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;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[ApplyEvery]]&lt;br /&gt;
|A collection of AviSynth functions that operate at regular intervals in a clip. &lt;br /&gt;
|&lt;br /&gt;
|[[ApplyEvery|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;
|[[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;
|[[ClipClop|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[FrameRepeat]]&lt;br /&gt;
|FrameRepeat() is a simple plugin to select frames to repeat. Requires AviSynth 2.6.&lt;br /&gt;
|&lt;br /&gt;
|[[FrameRepeat|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[FrameSel|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;
|[[FrameSel|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 Script]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[Prune|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[RemapFrames|Plugin]]&lt;br /&gt;
|{{Author/stickboy}}, {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/TomArrow/SelectRangeEveryReversing SelectRangeEveryReversing]&lt;br /&gt;
|Modified version of the internal [[SelectRangeEvery]] filter, except every second range is reversed in direction. See [https://forum.doom9.org/showthread.php?t=183239 discussion] for more information.&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/TomArrow/SelectRangeEveryReversing/releases Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Levels and Chroma ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[AutoAdjust|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;
| [[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.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Autolevels|Plugin]]&lt;br /&gt;
| {{Author/frustum}} &amp;amp; Theodor Anschütz &amp;amp; StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[AVSCube]]&lt;br /&gt;
|[[AviSynth+]] plugin to load and apply .cube [http://en.wikipedia.org/wiki/3D_lookup_table 3D LUTs].&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBP16]]&lt;br /&gt;
|[[AVSCube|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=168062 AWB]&lt;br /&gt;
| Automatic white balance for real world footage, similar to the known function in digital cameras.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=168062 Script]&lt;br /&gt;
| martin53&lt;br /&gt;
|-&lt;br /&gt;
|Brightness&lt;br /&gt;
|Restore dark and bright zones.&lt;br /&gt;
|8-16 planar Y/YUV&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182411 Script]&lt;br /&gt;
|Arx1meD&lt;br /&gt;
|-&lt;br /&gt;
| ChangeColour&lt;br /&gt;
| Simple plugin to replace one specified color to another, see [https://forum.doom9.org/showthread.php?t=88727 discussion] for additional information.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [https://web.archive.org/web/20220322043620/https://files.videohelp.com/u/223002/changecolour01.zip Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&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;
| [[ChanMix|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;
| [[ChannelMixer|Plugin]]&lt;br /&gt;
| Gustaf Ullberg&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=173364 ChromaJig]&lt;br /&gt;
| Automatic Colorization.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1775733#post1775733 Script]&lt;br /&gt;
| MWilson&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorBalance]]&lt;br /&gt;
| Same tool that is found in Gimp &amp;amp; Cinepaint.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ColorBalance|Plugin]]&lt;br /&gt;
| Gavino &amp;amp; mikeytown2&lt;br /&gt;
|-&lt;br /&gt;
|[[ColorLooks]]&lt;br /&gt;
| The plugin contains the following filters: Technicolor, Colorize, Sepia and Posterize.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[ColorLooks|Plugin]]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[[ColorYUV2]]&lt;br /&gt;
|YUV color adjustment plugin with a graffer. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[ColorYUV2|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ColourLike]]&lt;br /&gt;
| Makes a clip look like a 'reference' clip by adjusting each colour mask.&lt;br /&gt;
| [[RGB32]], [[YV12]]&lt;br /&gt;
| [[ColourLike|Plugin]]&lt;br /&gt;
| {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ColourWarp]]&lt;br /&gt;
| Smooth remapping of UV colour values using control points for colour correction.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[ColourWarp|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGCube]]&lt;br /&gt;
|[[AviSynth+]] plugin to load and apply .cube [http://en.wikipedia.org/wiki/3D_lookup_table 3D LUTs]. (GPU accelerated - CUDA)&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBP16]]&lt;br /&gt;
|[[DGCube|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGHDRtoSDR]]&lt;br /&gt;
|[[AviSynth+]] plugin to convert UHD BluRay HDR10 to SDR. (GPU accelerated - CUDA)&lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P16]]&lt;br /&gt;
|[[DGHDRtoSDR|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGPQtoHLG]]&lt;br /&gt;
|[[AviSynth+]] plugin to convert UHD BluRay HDR10 PQ to HDR10 HLG. GPU accelerated - CUDA) &lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P16]]&lt;br /&gt;
|[[DGPQtoHLG|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGTonemap]]&lt;br /&gt;
|[[AviSynth+]] plugin for basic Reinhard tonemapping for HDR-&amp;gt;SDR.&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBPS]]&lt;br /&gt;
|[[DGTonemap|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/erazortt/DoViBaker DoViBaker]&lt;br /&gt;
|This plugin reads the Base Layer, Enhancement Layer and RPU data from a profile 7 DolbyVision stream to create a clip with the DolbyVision data baked in. Additionally it provides static and dynamic tonemapping of HDR PQ sources to lower dynamic range targets. Conversions from PQ to HLG and SDR (BT.2020 and BT.709) are also supported.&lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P10-16, YUV444P10-16]]&lt;br /&gt;
|[https://github.com/erazortt/DoViBaker/releases Plugin]&lt;br /&gt;
|[https://github.com/erazortt erazortt]&lt;br /&gt;
|-&lt;br /&gt;
| [[ExpLabo]]&lt;br /&gt;
| ExpLabo is a multi-filters plugin, focused on the non-linear transformation of image color space.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ExpLabo|Plugin]]&lt;br /&gt;
| brabbudu&lt;br /&gt;
|-&lt;br /&gt;
|[https://web.archive.org/web/20180916224719/http://mpierce.pie2k.com/pages/211.php Exposure]&lt;br /&gt;
|Exposure function for AviSynth.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[https://web.archive.org/web/20171023011558if_/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;
|[[GamMac]]&lt;br /&gt;
|Useful to correct color cast on old 8mm films.&lt;br /&gt;
|[[RGB32]], [[RGB24]]&lt;br /&gt;
|[[GamMac|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[GamMatch]]&lt;br /&gt;
|Gamma Matcher; useful to correct bad color clip where there is a better color source of perhaps lower rez available.&lt;br /&gt;
|[[RGB32]], [[RGB24]]&lt;br /&gt;
|[[GamMatch|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GiCocu]]&lt;br /&gt;
| Use GIMP/Photoshop curve files.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[GiCocu|Plugin]]&lt;br /&gt;
| E-Male&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/magiblot/gradation Gradation]&lt;br /&gt;
|Gradation Curves filter for VirtualDub and AviSynth+ &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[https://github.com/magiblot/gradation/releases Plugin]&lt;br /&gt;
|[https://github.com/magiblot magiblot]&lt;br /&gt;
|-&lt;br /&gt;
|[[GradationCurve]]&lt;br /&gt;
|[[AviSynth+]] plugin that loads Photoshop ACV and GIMP crv curve files. Also can compute the gradation curve through given anchor points. Like what Photoshop and Gimp do in the Curves setting.&lt;br /&gt;
|[[Avisynthplus_color_formats|PlanarRGB, PlanarYUV]]&lt;br /&gt;
|[[GradationCurve|Plugin+Script]]&lt;br /&gt;
|ErazorTT&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;
|[https://github.com/Asd-g/AviSynthPlus-grayworld grayworld]&lt;br /&gt;
|Port of [https://ffmpeg.org/ffmpeg-filters.html#grayworld FFmpeg's grayworld] filter to AviSynth+. See [https://forum.doom9.org/showthread.php?t=183750 discussion]&lt;br /&gt;
|[[RGBPS]], [[RGBAPS]]&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-grayworld/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[HDRAGC|Plugin]]&lt;br /&gt;
| {{Author/paviko}}&lt;br /&gt;
|-&lt;br /&gt;
|[[HDRTools]]&lt;br /&gt;
|HDR color conversion plugin for AviSynth+.&lt;br /&gt;
|[[RGB32]], [[RGB64]], Planar YUV/RGB (8-16 and 32bit)&lt;br /&gt;
|[[HDRTools|Plugin]]&lt;br /&gt;
|[https://github.com/jpsdr jpsdr]&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;
| [[HistogramAdjust|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;
| [[Histograms in RGB &amp;amp; CMY|Script]]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/magiblot/HSLTint HSLTint]&lt;br /&gt;
|An [[AviSynth+]] filter for creating monochromatic tints with user-defined hue and saturation.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]] - all bit-depths&lt;br /&gt;
|[https://github.com/magiblot/HSLTint/blob/master/HSLTint.avsi Script]&lt;br /&gt;
|magiblot&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.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[HSVAdjust|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.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[Hue|Plugin]]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Tonemap|libplacebo_Tonemap]]&lt;br /&gt;
|Dynamic HDR tone mapping, includes peak and scene-change detection, chroma-preserving (luma-only) tone mapping, highlight desaturation, dynamic exposure control and a variety of industry-standard EETFs including BT.2390. &lt;br /&gt;
|16-bit planar RGB or YUV444P16 &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176091 LinearTransformation]&lt;br /&gt;
|This script performs Linear Transformations based on a matrix conversion. Matrices are made by Francesco Bucciantini (FranceBB).&lt;br /&gt;
|[[YV12]], [[YV16]], [[YV24]], [[RGB24]], [[RGB32]], [[RGB32]], [[RGB48]],[[RGBPS]]&lt;br /&gt;
|[https://github.com/FranceBB/LinearTransformation Linear Transformation]&lt;br /&gt;
|[https://forum.doom9.org/member.php?u=219051 FranceBB]&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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[MatchHistogram|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;
| [[OutRange|Script]]&lt;br /&gt;
| 06_taro&lt;br /&gt;
|-&lt;br /&gt;
|[[RGBAdapt]]&lt;br /&gt;
|Another RGB color correction plugin, it also also includes a graffer.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[RGBAdapt|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[RgbAmplifier]]&lt;br /&gt;
|An AviSynth forensic plugin to amplify color shifts.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[RgbAmplifier|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=181857 SafeColorLimiter]&lt;br /&gt;
| Automatic Clipping to get a broadcast safe output in Limited TV Range.&lt;br /&gt;
| [[Y8]], [[Y10]], [[Y12]], [[Y14]], [[Y16]], [[Y32]], [[YV12]], [[YV411]], [[YUY2]], [[YV16]], [[YV24]]&lt;br /&gt;
| [https://github.com/FranceBB/SafeColorLimiter Script]&lt;br /&gt;
| [http://forum.doom9.org/member.php?u=219051 FranceBB]&lt;br /&gt;
|-&lt;br /&gt;
|[[SelectiveColour]]&lt;br /&gt;
|AviSynth implementation of Photoshop's selective colour adjustment. &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[SelectiveColour|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&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;
|[[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;
|[[ShowChannels|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;
| [[ShowOverRange|Plugin]]&lt;br /&gt;
| {{Author/SAPikachu}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothAdjust]]&lt;br /&gt;
| SmoothAdjust is a set of 5 plugins to make YUV adjustments. These 5 plugins have a smoothing &amp;amp; dithering algorithm to avoid banding issue. SmoothAdjust is [[SmoothLevels|SmoothLevels']] successor. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[SmoothAdjust|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;
| [[TweakColor]]&lt;br /&gt;
| Target specific hue and saturation ranges for hue and saturation adjustments.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[TweakColor|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;
| [[VideoScope|Plugin]]&lt;br /&gt;
| {{Author/Randy French}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1832763#post1832763 VideoTek]&lt;br /&gt;
| VideoTek is a Tektronix-like waveform monitor for AviSynth.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [https://github.com/FranceBB/VideoTek/blob/master/VideoTek.avsi Script]&lt;br /&gt;
| [http://forum.doom9.org/member.php?u=219051 FranceBB]&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.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[WhiteBalance|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;
|[https://forum.doom9.org/showthread.php?t=181665 AiUpscale]&lt;br /&gt;
|An AviSynth+ implementation of some Super-Resolution Convolutional Neural Networks.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[https://github.com/Alexkral/AviSynthAiUpscale Script]&lt;br /&gt;
|[https://github.com/Alexkral Alexkral]&lt;br /&gt;
|-&lt;br /&gt;
|[[Anime4KCPP]]&lt;br /&gt;
|Anime4K is a simple high-quality anime upscale algorithm with GPU acceleration support. [[AviSynth+]] x64 only.&lt;br /&gt;
|[[RGB24]], [[YV24]], [[YV16]], [[YV12]]&lt;br /&gt;
|[[Anime4KCPP|Plugin]]&lt;br /&gt;
|TianZerL&lt;br /&gt;
|-&lt;br /&gt;
| [[avsresize]]&lt;br /&gt;
| [http://github.com/sekrit-twc/zimg z.lib] resizers for [[AviSynth+]]. avsresize provides resizing, colorspace and bit depth conversation. &lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
| [[avsresize|Plugin]]&lt;br /&gt;
| [http://github.com/sekrit-twc sekrit-twc]&lt;br /&gt;
|-&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;
| [[AreaResize|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}, Aktanusa&lt;br /&gt;
|-&lt;br /&gt;
|[https://gist.github.com/kgrabs/b042214d715176ac9ab563c188995457 Desample]&lt;br /&gt;
|Desampling functions for AviSynth+, replaces DebilinearM and lineart_rpow2. Also includes DeCrossConversionMT which is a replacement for ccc, ccc_720.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[https://gist.github.com/kgrabs/b042214d715176ac9ab563c188995457 Script]&lt;br /&gt;
|[https://github.com/kgrabs kgrabs]&lt;br /&gt;
|-&lt;br /&gt;
|[[Descale]]&lt;br /&gt;
|AviSynth+ filter to undo upscaling.&lt;br /&gt;
|All planar Y/YUV/RGB color formats&lt;br /&gt;
|[[Descale|Plugin]]&lt;br /&gt;
|[https://github.com/Frechdachs Frechdachs]&lt;br /&gt;
|-&lt;br /&gt;
|[[DPID]]&lt;br /&gt;
|DPID is an algorithm that preserves visually important details in downscaled images and is especially suited for large downscaling factors. &lt;br /&gt;
|All [[planar]] colorspaces&lt;br /&gt;
|[[DPID|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[FCBI]]&lt;br /&gt;
|Fast Curvature Based Interpolation.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar clips&lt;br /&gt;
|[[FCBI|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[fmtconv]]&lt;br /&gt;
| fmtconv is a format-conversion plug-in, it provides resizing, colorspace and bitdepth conversation. &lt;br /&gt;
| All [[planar]] 8 to 32-bit colorspaces&lt;br /&gt;
| [[fmtconv|Plugin]]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[JincResize]]&lt;br /&gt;
| Jinc (EWA Lanczos) Resampler Plugin for AviSynth/AviSynth+.&lt;br /&gt;
| All 8-32bit [[planar]] colorspaces&lt;br /&gt;
| [[JincResize|Plugin]]&lt;br /&gt;
| innocenat&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Resample|libplacebo_Resample]]&lt;br /&gt;
|High-quality, optimized upscaling and downscaling including support for polar filters (&amp;quot;Jinc&amp;quot;), anti-aliasing, anti-ringing and gamma correct scaling&lt;br /&gt;
|8, 16 or 32-bit planar RGB/YUV formats. &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[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;
|[[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).&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[PointSize|Plugin]]&lt;br /&gt;
| `Orum&lt;br /&gt;
|-&lt;br /&gt;
| [[ResampleHQ]]&lt;br /&gt;
| ResampleHQ provides gamma-aware resizing and colorspace conversion.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ResampleHQ|Plugin]]&lt;br /&gt;
| Cory Nelson&lt;br /&gt;
|-&lt;br /&gt;
|[[ResampleMT]]&lt;br /&gt;
|Internaly multi-threaded resampling functions, also includes desampling functions (DeBilinear, DeBicubic,...).&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[[ResampleMT|Plugin]]&lt;br /&gt;
|[http://github.com/jpsdr jpsdr]&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;
| [[SimpleResize|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://forum.doom9.org/showthread.php?t=175945 Unwiden/Widen]&lt;br /&gt;
|Resize filters to unwiden/widen, see discussion. &lt;br /&gt;
|[[RGB32]], [[YV24]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=175945 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[w2xncnnvk]]&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Waifu2x waifu2x] implemented in Vulkan.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[[w2xncnnvk|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[aSharp|Plugin]]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AVSShock|C-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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV formats,  8 to 16-bit&lt;br /&gt;
| [[aWarpSharp2|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;
|[[CAS]]&lt;br /&gt;
|Contrast Adaptive Sharpening.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV(A), RGB(A) formats,  8 to 32-bit&lt;br /&gt;
|[[CAS|Plugin]]&lt;br /&gt;
|Asd-g&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 old &amp;lt;tt&amp;gt;MSharpen&amp;lt;/tt&amp;gt; plugin.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TUnsharp|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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[UnFilter|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. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[UnsharpHQ|Plugin]]&lt;br /&gt;
| list&lt;br /&gt;
|-&lt;br /&gt;
|[[vsMSharpen]]&lt;br /&gt;
|vsMSharpen is a sharpener that tries to sharpen only edges. This plugin is a port of the VapourSynth plugin MSharpen. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all planar Y, YUV, and RGB formats,  8 to 16 bit&lt;br /&gt;
|[[vsMSharpen|Plugin]]&lt;br /&gt;
|Dubhater, Asd-g&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;
| [[WarpSharp|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;
| [[RGB24]], [[RGB32]], [[Y8]]&lt;br /&gt;
| [[DeBarrel|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Defish]]&lt;br /&gt;
|Barrel and pincushion distortion correction filter.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[Defish|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.&lt;br /&gt;
| [[Y8]], [[YV12]],[[YV24]]&lt;br /&gt;
| [[FTurn|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. Quad is now superseded by [[warp]].&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;
| [[Reform]]&lt;br /&gt;
| Skewed images are corrected or vice versa, useful if video is recorded with slightly incorrectly located camera. Sometimes referred to as perspective correction.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Reform|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Reformer]]&lt;br /&gt;
| Perspective correction and warping.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Reformer|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Rotate]]&lt;br /&gt;
| Rotate or shear on any given angle.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[Rotate|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]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Spinner/Spinner_2_6.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[warp]]&lt;br /&gt;
|A collection of geometry correction filters (also includes new version of Quad).&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[warp|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[xyremap|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Zoom]]&lt;br /&gt;
| Zoom, Pan &amp;amp; Rotate Clip. Adds alpha layer to clip.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Zoom|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. &lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YV24]], [[YV12]], [[Y8]]&lt;br /&gt;
| [[AssRender|C-Plugin]]&lt;br /&gt;
| lachs0r, TheFluff&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183148 DetSub]&lt;br /&gt;
|Can be used to remove hardcoded subtitles with halo from video or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183148 Script]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FreeSub]]&lt;br /&gt;
|Subtitle with bdf fonts.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YV24]]&lt;br /&gt;
|[[FreeSub|C-Plugin]]&lt;br /&gt;
|Natt&lt;br /&gt;
|-&lt;br /&gt;
|[[FreeSubPlus]]&lt;br /&gt;
|Script that adds support for additional colorspaces to the FreeSub plugin. &lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[[FreeSubPlus|Script]]&lt;br /&gt;
|reel.deel&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 InpaintDelogo]&lt;br /&gt;
|Can be used to remove hardcoded subtitles from video or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 Script]&lt;br /&gt;
|VoodooFX&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;
|[https://github.com/Asd-g/AviSynthPlus-SubImageFile SubImageFile]&lt;br /&gt;
|AviSynth+ plugin that renders image-based subtitles such as VOBSUB and PGS.&lt;br /&gt;
|[[RGB24]], [[Y8]]&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-SubImageFile/releases/ Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SubtitleEx]]&lt;br /&gt;
| Similar to the original [[Subtitle]] function but can do more: apply text to range; effects - bold, underline, italic, center, fading, motion, blur, emboss, etc...; alpha channel.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[SubtitleEx|Plugin]]&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;
| [[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;
| [[SupTitle|Plugin]]&lt;br /&gt;
| {{Author/ZachSaw}}&lt;br /&gt;
|-&lt;br /&gt;
|[[tcasFilter]]&lt;br /&gt;
|Renders TCAS subtitle effects.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[tcasFilter|Plugin]]&lt;br /&gt;
|milkyjing&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;
| [[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;
|[[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
| [[VSFilterMod|Plugin]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|[[xy-VSFilter]]&lt;br /&gt;
|High performance VSFilter compatible subtitle filters.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
|[[xy-VSFilter|Plugin]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Transitions ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| DissolveAGG&lt;br /&gt;
| Wipe Transition with a soft edge. See [http://forum.doom9.org/showthread.php?t=118016 discussion]. &lt;br /&gt;
'''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)], [http://forum.doom9.org/showthread.php?p=1152440#post1152440 Script (v2)], [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;
| [[TransAll|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition_AlbertGasset|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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Transition_AlbertGasset|C-Plugin]]&lt;br /&gt;
| {{Author/Albert Gasset}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition_Shubin|Transition (Shubin)]]&lt;br /&gt;
| Contains 2 transition modes: circle and line.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Transition_Shubin|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=174797 AVSMeter]&lt;br /&gt;
| AVSMeter is a CLI (command line interface) tool which measures the speed/efficiency of Avisynth scripts and checks if Avisynth and its plugin sub-system are set up and working correctly. Documentation for usage and features is included in the distribution package.&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=176079 Avisynth Info Tool]&lt;br /&gt;
| This program performs a thorough test of your Avisynth installation and associated plugins, checking if external dependencies are installed, etc.&lt;br /&gt;
|&lt;br /&gt;
| Windows application with graphical user interface&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=173259 avsr]&lt;br /&gt;
|CLI (command line interface) tool which simply executes an Avisynth script. This is useful when, for example, you want to write an image sequence to the disk by using &amp;quot;ImageWriter&amp;quot;.&lt;br /&gt;
|&lt;br /&gt;
| Command line executable&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[[Butteraugli]]&lt;br /&gt;
|Butteraugli is an estimating filter for the psychovisual similarity of two images.&lt;br /&gt;
|8-32bit planar RGB/RGBA&lt;br /&gt;
|[[Butteraugli|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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.&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]] &lt;br /&gt;
|[[ColorDiff|C-Plugin]]&lt;br /&gt;
|Ignus2&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182817 DebugColourSpaces]&lt;br /&gt;
|Debugging filter which applies a specified filter to multiple Avisynth+ colourspaces and displays a labelled grid of the results.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://horman.net/avisynth/download/DebugColourSpaces.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&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;
|[[FFTSpectrum]]&lt;br /&gt;
|FFTSpectrum is a filter that displays the FFT frequency spectrum of a given clip.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[FFTSpectrum|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[Info2]]&lt;br /&gt;
| A faster, prettier alternative to info().&lt;br /&gt;
|Any&lt;br /&gt;
|[[Info2|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[KPassFilterCL|Plugin]]&lt;br /&gt;
|[http://github.com/Khanattila Khanattila ]&lt;br /&gt;
|-&lt;br /&gt;
|[[LinesLumaDiff]]&lt;br /&gt;
|AviSynth+ plugin to check if luma difference between lines are below or above given threshold and writes frame number in text file.&lt;br /&gt;
|[[Planar]] YUV&lt;br /&gt;
|[[LinesLumaDiff|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MaxCLLFind]]&lt;br /&gt;
| PQ HDR Analyzer plugin for [[AviSynth+]], analyzes MaxCLL and MaxFALL and writes it to a text file.&lt;br /&gt;
|[[RGB64]]&lt;br /&gt;
|[[MaxCLLFind|Plugin]]&lt;br /&gt;
|Tom Arrow&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;
|[[Pixelscope]]&lt;br /&gt;
|This debugging filter displays individual pixel values.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=175688 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/EmiyaSyahriel/RollCompare RollCompare]&lt;br /&gt;
|AviSynth Plugin to create rolling comparison between videos.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[https://github.com/EmiyaSyahriel/RollCompare/releases Plugin]&lt;br /&gt;
|EmiyaSyahriel&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;
|[[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;
|[[SSIM|Plugin]]&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;
|[https://forum.doom9.org/showthread.php?t=176131 SysInfo]&lt;br /&gt;
|This plugin returns info about OS/CPU*/Memory/Screen/AviSynth.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176131 Plugin]&lt;br /&gt;
|Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=168241 Timer]&lt;br /&gt;
|AviSynth script to add a highly customizable timer to your video.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=168241 Script]&amp;lt;!-- https://gist.github.com/darealshinji/9770276 --&amp;gt;&lt;br /&gt;
|djcj&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;
|[[VMAF]]&lt;br /&gt;
|VMAF is a perceptual video quality assessment algorithm developed by Netflix. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]],&amp;lt;br&amp;gt; 8-10bit planar YUV&lt;br /&gt;
|[[VMAF|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[scharr]]&lt;br /&gt;
|Edge detection using the [https://en.wikipedia.org/wiki/Sobel_operator#Alternative_operators Scharr operator].&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[scharr|Script]]&lt;br /&gt;
|zorr &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;
| [[tcanny|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;
| [[TCannyMod|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;
| [[TEdgeMask|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;
| [[TEMmod|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsTCanny]]&lt;br /&gt;
| Builds an edge map using canny edge detection. &lt;br /&gt;
| All 8-32bit [[planar]] colorspaces&lt;br /&gt;
| [[vsTCanny|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsTEdgeMask]]&lt;br /&gt;
| vsTEdgeMask is an edge detection filter. This is a port of the TEdgeMask/TEMmod AviSynth plugins.&lt;br /&gt;
| All 8-16bit [[planar]] colorspaces&lt;br /&gt;
| [[vsTEdgeMask|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [https://github.com/Asd-g/AviSynth-TWriteAVI/releases Plugin]&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;
|[[AVSTP]]&lt;br /&gt;
|A library for multithreaded plug-in development&lt;br /&gt;
|Any&lt;br /&gt;
|[[AVSTP|Plugin]]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MP_Pipeline]]&lt;br /&gt;
|Run parts of an AviSynth script in external processes.&lt;br /&gt;
|Any&lt;br /&gt;
|[[MP_Pipeline|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=174433 amDCT]&lt;br /&gt;
|amDCT() is an adaptive video filter providing deblocking, sharpening, local range expansion, smoothing, and bright noise removal in a single filter that can be used on video of any level of quality. These four operations work synergistically to drastically reduce block artifacts while maintaining detail and increasing local contrast.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[https://github.com/pinterf/amDCT Plugin]&lt;br /&gt;
|jconklin, [https://github.com/pinterf pinterf]&lt;br /&gt;
|-&lt;br /&gt;
|[[AVExtensions]]&lt;br /&gt;
|Audio-video extensions is a collection of various AviSynth filters used to modify audio or video. &lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[AVExtensions|Plugin]]&lt;br /&gt;
|nutbread&lt;br /&gt;
|-&lt;br /&gt;
|[[AviSynthShader]]&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;
|[[AviSynthShader|Plugin]]&lt;br /&gt;
|[http://github.com/mysteryx93 MysteryX]&lt;br /&gt;
|-&lt;br /&gt;
|[[avs-mlrt]]&lt;br /&gt;
|This project provides AviSynth+ ML filter runtimes for variety of platforms. &lt;br /&gt;
|Y32, RGPS&lt;br /&gt;
|[[avs-mlrt|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[CLExpr|Plugin]]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183823 CTools]&lt;br /&gt;
|Includes various filters for IVTC, deinterlacing, denoising, dehalo and duplicate frames.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://github.com/CeppoTools/CTools/releases Plugin]&lt;br /&gt;
|Ceppo&lt;br /&gt;
|-&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;
| [[MaskTools2|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;
| [[MVTools|Plugin]]&lt;br /&gt;
| Various&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Shader|Shader]]&lt;br /&gt;
|Loads GLSL shaders written in mpv's .hook syntax.&lt;br /&gt;
|16-bit planar YUV&lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[AvsFilterNet]]&lt;br /&gt;
|The main objective of AvsFilterNet is to provide a wrapper for AviSynth, making it possible to write simple filter in any .Net languages. &lt;br /&gt;
|N/A&lt;br /&gt;
|[[AvsFilterNet|Plugin]]&lt;br /&gt;
|SAPikachu&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AvsMotion|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;
|[[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;
|[[CallCmd|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[ClipBoard]]&lt;br /&gt;
|Get text from Clipboard.&lt;br /&gt;
|N/A&lt;br /&gt;
|[[ClipBoard|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182910 Feedback]&lt;br /&gt;
|A filter that lets you use a filter chain's output as its own input.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://horman.net/avisynth/download/feedback.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FileSize]]&lt;br /&gt;
|Plugin to get filesize.&lt;br /&gt;
|N/A&lt;br /&gt;
|[[FileSize|Plugin]]&lt;br /&gt;
|pureexe&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.roelofs-coaching.nl/blobs/downloads/ProgramName.html GetProgramName]&lt;br /&gt;
|An AviSynth plug-in to retrieve the name of the calling application.&lt;br /&gt;
|N/A&lt;br /&gt;
|[https://www.roelofs-coaching.nl/blobs/downloads/ProgramName.zip Plugin]&lt;br /&gt;
|[http://www.roelofs-coaching.nl/J.M. Roelofs]&lt;br /&gt;
|-&lt;br /&gt;
|[[GetProgramName2]]&lt;br /&gt;
|GetProgramName2 is similar to GetProgramName by JM Roelofs, but this plugin is a newly written.  &lt;br /&gt;
|N/A&lt;br /&gt;
|[[GetProgramName2|Plugin]]&lt;br /&gt;
|[https://github.com/enccc enccc]&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;
| [[GRunT|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;
| [[GScript|Plugin]]&lt;br /&gt;
| {{Author/Gavino}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
| [[LoadDLL|Plugin]]&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=162790 MinMax]&lt;br /&gt;
|Finds the min or max value in each line or column and then sets the entire line or column to that value. Only processes the luma (Y) plane.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[https://web.archive.org/web/20160610142230if_/http://latoninf.free.fr/div/minmax.7z Plugin]&lt;br /&gt;
|{{Author/LaTo}}&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;
|[https://web.archive.org/web/20160606142540if_/http://www.tsp.person.dk/pop.zip Plugin]&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RT_Stats]]&lt;br /&gt;
| Compile-time/Runtime Functions.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[RT_Stats|Plugin]]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[StrFmt]]&lt;br /&gt;
|Simple plugin to produce formatted string, and additional function to string replace with another string.&lt;br /&gt;
|Any&lt;br /&gt;
|[[StrFmt|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174387 StrResolve]&lt;br /&gt;
|String Variables Resolving Plugin (for masktools expressions)&lt;br /&gt;
|Any&lt;br /&gt;
|[http://www.mediafire.com/file/wu6zexhssd0y77i/170310_StrResolve_v050.zip Plugin]&lt;br /&gt;
|martin53&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;
&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;
| [[Dither_tools|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;
|[https://sourceforge.net/projects/voix/files/2d3/ 2Dto3D]&lt;br /&gt;
|2Dto3D is a collection of scripts for 2D to 3D conversion. Conversion is good but not perfect.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://sourceforge.net/projects/voix/files/2d3/ Script]&lt;br /&gt;
|[https://sourceforge.net/u/brankoj/profile/ brankoj]&lt;br /&gt;
|-&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;
|[http://forum.doom9.org/showthread.php?p=1861891#post1861891 Audiofix]&lt;br /&gt;
|Plugin to fix a specific audio problem, see [http://forum.doom9.org/showthread.php?t=175991 discussion].&lt;br /&gt;
|&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1861891#post1861891 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&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.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV24]], 8-bit [[Planar]] RGB&lt;br /&gt;
| [[AudioGraph|Plugin]]&lt;br /&gt;
| Richard Ling, {{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AudioLimiter|Plugin]]&lt;br /&gt;
|dimzon&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AudioTimeline|Plugin]]&lt;br /&gt;
|martin53&lt;br /&gt;
|-&lt;br /&gt;
| [[BeFa]]&lt;br /&gt;
| Band Eliminate Filter for Audio.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[BeFa|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. It's a conditional audio filter, so the computation is done framewise.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[MinMaxAudio|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;
|[[Normalize2|Plugin]]&lt;br /&gt;
|[http://sourceforge.net/u/jcsston/profile/ jcsston]&lt;br /&gt;
|-&lt;br /&gt;
| [[SoxFilter]]&lt;br /&gt;
| Use [http://sox.sourceforge.net/ SOX] audio effects within AviSynth. Most effects are supported, and multiple effects can be stacked after each other.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[SoxFilter|Plugin]]&lt;br /&gt;
| {{author/Sh0dan}}, [https://github.com/pinterf pinterf]&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;
|[[Spectrogram|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;
| [[ViewAudio|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| VUmeter&lt;br /&gt;
| Classic analog-style VU meter; see [https://forum.doom9.org/showthread.php?t=175370 discussion]. Uses MinMaxAudio.&lt;br /&gt;
| Any&lt;br /&gt;
| [https://github.com/raffriff42/AvisynthPlusUtilities script]&lt;br /&gt;
| raffriff42&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.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]  &lt;br /&gt;
| [[Waveform|Plugin]]&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;
|[[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;
| [[amp|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[AutoOverlay]]&lt;br /&gt;
|Auto-aligned optimal overlay of one video clip onto another with color adjustment.&lt;br /&gt;
| [[RGB32]], [[YV24]], [[YV12]]&lt;br /&gt;
| [https://github.com/introspected/AutoOverlay/releases Plugin]&lt;br /&gt;
| [https://github.com/introspected introspected]&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://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://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=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;
|[[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/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]. [https://github.com/Youka/LVS GitHub]&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://web.archive.org/web/20160610103945/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;
|[https://sourceforge.net/projects/ssbrenderer/ SSBRenderer]&lt;br /&gt;
|SSBRenderer is a plugin for AviSynth to render 2D graphics and subtitles by SSB (Substation Beta) data on frames of video streams. [https://forum.doom9.org/showthread.php?t=169951 Doom9 Forum discussion], [https://github.com/Youka/SSBRenderer GitHub]&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[https://sourceforge.net/projects/ssbrenderer/files/ C-Plugin]&lt;br /&gt;
|[https://github.com/Youka Youka ]&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://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>Pinterf</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>2024-12-11T12:07:58Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Multipurpose Filters */ amDCT version update&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;
*[https://web.archive.org/web/20130803185015/http://www.64k.it:80/andres/dettaglio.php?sez=avisynth Andres' Filter Collection] &lt;br /&gt;
*[https://chaosking.de/repo/avsfilters/ AviSynth Filter DB by ChaosKing] | [https://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;
'''[[AviSynth%2B_x64_plugins|Comprehensive list of AviSynth+ 64-bit filters]] &amp;amp;rarr;'''&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;
| [https://forum.doom9.org/showthread.php?t=135855 BassAudio]&lt;br /&gt;
| [https://www.un4seen.com/ 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;
| [https://forum.doom9.org/showthread.php?t=135855 Plugin]&lt;br /&gt;
| dimzon&lt;br /&gt;
|-&lt;br /&gt;
|[[BestAudioSource]]&lt;br /&gt;
|A new sample accurate but somewhat slow FFmpeg based audio source filter for AviSynth+. No indexing required and only available in 64-bit. &lt;br /&gt;
|N/A&lt;br /&gt;
|[[BestAudioSource|Plugin]]&lt;br /&gt;
|{{Author/Myrsloik}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DGDecNV]] &lt;br /&gt;
| DGDecNV is a decoder/frameserver for AVC, HEVC, MPEG2, and VC1 streams that runs on the GPU of Nvidia graphics cards that support CUDA video decoding. &lt;br /&gt;
| [[I420]], [[YV12]], [[YUV420P16]] &lt;br /&gt;
| [[DGDecNV|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/dgmvcsource100b26.zip Plugin]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DSS2mod]]&lt;br /&gt;
| DirectShowSource2 mod, this version does not require Haali Media Splitter. &lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[DSS2mod|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;
| [[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;
| [[ImageSequence|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;
|[https://forum.doom9.org/showthread.php?t=184825 ImageSourceNV]&lt;br /&gt;
|CUDA accelerated plugin that uses the [https://docs.nvidia.com/cuda/nvjpeg/index.html nvJPEG API] to decode jpeg source files and convert their color space to YUV444.&lt;br /&gt;
|[[YUV444P8]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=184825 Plugin]&lt;br /&gt;
|[https://github.com/ArturAlekseev Argaricolm]&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;
|[[MPEG2DecPlus]]&lt;br /&gt;
|MPEG2DecPlus is a MPEG-1/2 decoder plug-in. MPEG2DecPlus is a project to modernize &amp;quot;[[DGDecode]].dll&amp;quot; for AviSynth+.&lt;br /&gt;
|[[YV12]], [[YV16]]&lt;br /&gt;
|[[MPEG2DecPlus|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&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;
| [[NicAudio|Plugin]]&lt;br /&gt;
| {{Author/Nic}}&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).&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[RawSource26|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[VapourSource]]&lt;br /&gt;
| VapourSynth script reader for AviSynth+ and AviSynth2.6x.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[VapourSource|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;
|[[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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[ColorMatrix|Plugin]]&lt;br /&gt;
| {{Author/Wilbert Dijkhof}}, {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeBlot]]&lt;br /&gt;
| Color bleed reduction plugin. &lt;br /&gt;
| [[YUY2]],[[YV12]]&lt;br /&gt;
| [[DeBlot|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&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;
| [[MoveChroma|Plugin]]&lt;br /&gt;
| [http://noraneco.ddo.jp/apechironnup apechironnup]&lt;br /&gt;
|-&lt;br /&gt;
| [[PixelShiftPlus]]&lt;br /&gt;
| Set of functions to independently shift any RGB(A) or YUV(A) plane with subpixel precision.&lt;br /&gt;
| All colorspaces&lt;br /&gt;
| [[PixelShiftPlus|Script]]&lt;br /&gt;
| reel.deal&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. See [http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&amp;amp;t=512 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [https://web.archive.org/web/20131111114822/http://www.nmm-hd.org/upload/get~ikKt5ZZhD94/AdaptDBMC_beta.rar Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GradFun2db]]&lt;br /&gt;
| A simple and fast debanding filter.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[GradFun2db|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;
| [[Dither_tools#GradFun3|GradFun3]]&lt;br /&gt;
| This debanding script, part of the [[Dither_tools|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;
| [[Dither_tools|Script]]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[f3kdb|flash3kyuu_deband]]&lt;br /&gt;
| Fast debanding plugin ported from AviUtl.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[YV16]], [[YV24]], [[Y8]], [[YV411]]&lt;br /&gt;
| [[f3kdb|Plugin]]&lt;br /&gt;
| [http://github.com/SAPikachu/ SAPikachu]&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Deband|libplacebo_Deband]]&lt;br /&gt;
|Tunable debanding. Based on flash3kyuu, expanded to provide high quality by combining multiple debanding passes.&lt;br /&gt;
|8, 16 or 32-bit planar RGB/YUV formats. &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
| [[Neo_f3kdb]]&lt;br /&gt;
| Fast debanding plugin for AviSynth+.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YUY2]], [[YV16]], [[YV24]], [[YV411]], 8-16bit [[planar]] Y/YUV&lt;br /&gt;
| [[Neo_f3kdb|Plugin]]&lt;br /&gt;
| [https://github.com/msg7086 MeteorRain]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deblocking ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlockDetect BlockDetect]&lt;br /&gt;
|Determines blockiness of frames.&lt;br /&gt;
|All 8-32 bit [[planar]] formats.&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlockDetect/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&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. DGDecode also uses DeBlock.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], &amp;lt;br&amp;gt;all 8-32bit Y/YUV [[planar]] colorspaces &lt;br /&gt;
| [[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.&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[[DeblockPP7|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[MDeblock|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[SmoothD2|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://www.avisynth.nl/users/fizick/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://www.avisynth.nl/users/fizick/unblock/unblock11.zip Plugin]&lt;br /&gt;
|{{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsDeblockPP7]]&lt;br /&gt;
|A port of the MPlayer PP7 deblocking filter. Includes high bit-depth support.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], &amp;lt;br&amp;gt;all 8-32bit [[planar]] colorspaces &lt;br /&gt;
|[[vsDeblockPP7|Plugin]]&lt;br /&gt;
|Asd-d&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;
|[https://forum.doom9.org/showthread.php?t=172599 HaloBuster]&lt;br /&gt;
|Really slow high quality halo remover.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=172599 Script]&lt;br /&gt;
|feisty2&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;
| {{Author/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;
|[https://gist.github.com/acuozzo/940869257cc79016215600a2392b33eb Deemphasize]&lt;br /&gt;
|This AviSynth function deemphasizes ringing common to SD video signals resulting from a playback device in the transfer chain poorly compensating for pre-emphasis baked into the source signal.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://gist.github.com/acuozzo/940869257cc79016215600a2392b33eb Script]&lt;br /&gt;
|[https://github.com/acuozzo acuozzo]&lt;br /&gt;
|-&lt;br /&gt;
|[[Dering]]&lt;br /&gt;
|Deringing filter intended for deringing VHS captured video.&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[[Dering|C-Plugin]]&lt;br /&gt;
|[https://sourceforge.net/u/alexrayne/profile/ alexrayne]&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;
| {{Author/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;
| [[MosquitoNR|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;
|[[WDFPlus]]&lt;br /&gt;
|Faster version of mirkosp's warpdering_faster script for AviSynth+.&lt;br /&gt;
|All 8-16 bit Y/YUV colorspaces, except YV411&lt;br /&gt;
|[https://github.com/Reel-Deal/AviSynthPlus-Scripts/blob/main/wdfplus.avsi Script]&lt;br /&gt;
|reel.deal&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deinterlacing ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[BWDIF]]&lt;br /&gt;
|Motion adaptive deinterlacing based on yadif with the use of w3fdif and cubic interpolation algorithms.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all 8-32bit [[planar]] colorspaces &lt;br /&gt;
|[[BWDIF|Plugin]]&lt;br /&gt;
|Asd-g&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;
| [[Decomb|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;
| [[EEDI2|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EEDI2CUDA]]&lt;br /&gt;
| EEDI2 filter using CUDA.&lt;br /&gt;
| All [[planar]] Y/YUV/RGB 8 to 16-bit colorspaces &lt;br /&gt;
| [[EEDI2CUDA|Plugin]]&lt;br /&gt;
| [https://github.com/misakikasumi misakikasumi], [https://github.com/WolframRhodium WolframRhodium]&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;
| [[eedi3|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EEDI3CL]]&lt;br /&gt;
| OpenCL implementation of eedi3. For AviSynth+ only.&lt;br /&gt;
| all 8-32bit [[planar]] colorspaces &lt;br /&gt;
| [[EEDI3CL|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [[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;
| [[nnedi3|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[NNEDI3CL]]&lt;br /&gt;
| OpenCL implementation of nnedi3. For AviSynth+ only.&lt;br /&gt;
| all 8-32bit [[planar]] colorspaces &lt;br /&gt;
| [[NNEDI3CL|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [[QTGMC|Script]]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
| [[SangNom2]]&lt;br /&gt;
| Reimplementation of the old [[SangNom]] plugin.&lt;br /&gt;
| [[Y8]],[[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[SangNom2|Plugin]]&lt;br /&gt;
| {{Author/tp7}}&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;
| [[TDeint|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;
| [[TempGaussMC|Script]]&lt;br /&gt;
| {{Author/Didée}}&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;
| [[yadifmod|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[yadifmod2]]&lt;br /&gt;
| Yadif + yadifmod for avisynth2.6/avisynth+. &lt;br /&gt;
| [[YV24]], [[YV16]], [[YV12]], [[YV411]], [[Y8]]&lt;br /&gt;
| [[yadifmod2|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;
| [[ApparentFPS|Plugin]]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [[DeDup]]&lt;br /&gt;
| Remove (drop) duplicate frames in the interest of compression quality and speed. Resulting clip will have a variable frame rate.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[DeDup]]&lt;br /&gt;
| {{Author/akupenguin}}&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. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[Dup|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=175357 Duplicity2/DropDeadGorgeous]&lt;br /&gt;
|A two faced scheming and double dealing [on your behalf] dupe tool.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=175357 Script]&lt;br /&gt;
|StainlessS&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.&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;
| [https://github.com/eparsons Corran]&lt;br /&gt;
|-&lt;br /&gt;
| [[DupStep]]&lt;br /&gt;
| Duplicate frame detector/decimator filter for [[AviSynth+]], 64-bit version only.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Avisynthplus_color_formats|8-16 bits]]&lt;br /&gt;
| [[DupStep|Plugin]]&lt;br /&gt;
| [http://github.com/Orum Orum]&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.&lt;br /&gt;
| [[RGB24]] [[RGB32]], [[Y8]], [[YV12]] [[YV16]], [[YV24]]&lt;br /&gt;
| [[ExactDedup|Plugin]]&lt;br /&gt;
|Steve Melenchuk, Arick Chan, StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/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://www.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;
| [[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.&lt;br /&gt;
| [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[ExBlend|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;
|[[DePulse]]&lt;br /&gt;
|DePulse is dropout remover, removes white/black noise horizontal streaking in analogue captures.&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[[DePulse|Plugin]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[DeScratch]]&lt;br /&gt;
| DeScratch removes vertical scratches from films. Also it can be used for removing of horizontal noise lines such as drop-outs from analog VHS captures (after image rotation). &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[DeScratch|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeSpot]]&lt;br /&gt;
| This filter is designed to remove temporal noise in the form of dots (spots) and streaks found in some videos. The filter is also useful for restoration (cleaning) of old telecined 8mm (and other) films from spots (from dust) and some stripes (scratches).&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[DeSpot|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.&lt;br /&gt;
| 8-bit RGB/YUV&lt;br /&gt;
| [[DeVCR#Script|Script]]&lt;br /&gt;
| Ricardo Garcia&lt;br /&gt;
|-&lt;br /&gt;
|[[KillPulse]]&lt;br /&gt;
|KillPulse is dropout remover, removes white/black noise horizontal streaking in analogue captures.&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[[KillPulse|Plugin]]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.net/showthread.php?p=1402690 KillerSpots]&lt;br /&gt;
|Spot removal function based on Didée's idea from 2010 that makes use of MVTools analysis and RemoveDirt to detect and clean up spots with adiacent pixels.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|[https://github.com/FranceBB/KillerSpots Script]&lt;br /&gt;
|Didée, GMJCZP and John Meyer.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveDirt]]&lt;br /&gt;
| RemoveDirt is a temporal cleaner for AviSynth 2.6 and AviSynth+.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[RemoveDirt|Plugin]]&lt;br /&gt;
| {{Author/kassandro}}, {{Author/pinterf}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=121197 RemoveLine]&lt;br /&gt;
|Script for removal of horizontal stripes.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|Script&lt;br /&gt;
|Yup&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=181777 SpotLess]&lt;br /&gt;
|Script filter to remove spots and noise using mvTools2 and Medianblur2. Copes with spots on multiple consecutive frames, setting RadT accordingly.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182407 SpotRemover]&lt;br /&gt;
|This script is designed to clean video from spots. Based on SpotLess script by StainlessS.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|Arx1meD&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;
&lt;br /&gt;
=== Frequency Interference removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/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://www.avisynth.nl/users/fizick/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;
| [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;
| [[FDecimate|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FDecimate2]]&lt;br /&gt;
| FDecimate2 is based on FDecimate v1.0.2. FDecimate2, fixes some problems with bugged metrics in FDecimate v1.0.2.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[FDecimate2|Plugin]]&lt;br /&gt;
| {{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IT]]&lt;br /&gt;
| Inverse Telecine plugin.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[IT|Plugin]]&lt;br /&gt;
| {{Author/thejam79}} / {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IVTC_txt60mc|ivtc_txt60mc]]&lt;br /&gt;
| Deinterlaces telecined footage with that has been overlayed scrolling text at 60i.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[IVTC_txt60mc|Script]]&lt;br /&gt;
| {{Author/cretindesalpes}}&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;
|[[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;
|[[MDec2|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;
| 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;
| [[Decomb]]&lt;br /&gt;
| The Telecide and Decimate filters can be combined to implement IVTC.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Decomb|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182369 TelecineBob]&lt;br /&gt;
|If your source soffers from field blending, as long as no deinterlacing is made you will find out that conveniently the blended fields are often paired with a clean one. FieldDeBlend takes advantage of that and checks for frames whose fields don't match to replace the frame with a clean one as long there is one.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://www.mediafire.com/file/sa1oae96m63mkje/TelecineBob.zip/file Plugin]&lt;br /&gt;
|Ceppo&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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TIVTC|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;
| [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|Ghostbuster]]&lt;br /&gt;
| A filter for the removal of ghosting.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [[GhostBuster|Plugin]]&lt;br /&gt;
| {{Author/SansGrip}}&lt;br /&gt;
|-&lt;br /&gt;
| [[LGhost]]&lt;br /&gt;
| Plugin intended for ghost removal but can also reduce edge (ringing) artifacts.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[LGhost|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsLGhost]]&lt;br /&gt;
| Luminance Ghost reduction filter. Can be used for removing luminance ghost or edge ghost (ringing). &lt;br /&gt;
| All [[Planar]] colorspaces (8-32bit)&lt;br /&gt;
| [[vsLGhost|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logo Removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AvsInpaint]]&lt;br /&gt;
| This plugin comes with the intention to provide a suit for the removal of logos, whether opaque or transparent. It provides algorithms for these tasks: logo detection, deblending, and logo inpainting.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[AvsInpaint|C-Plugin]]&lt;br /&gt;
| AMSS0815, {{Author/pinterf}}&lt;br /&gt;
|-&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;
|[[DelogoHD]]&lt;br /&gt;
|DelogoHD is an overhaul of the original delogo filter, which was originally written by MakKi many years ago. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], &amp;lt;br&amp;gt; 8-16bit planar YUV&lt;br /&gt;
|[[DelogoHD|Plugin]]&lt;br /&gt;
|MeteorRain&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=184881 DoomDelogo]&lt;br /&gt;
| DoomDelogo meant to be simpler and perform better than deKafka, s_ExLogo, x-Logo and similar.&lt;br /&gt;
| Any&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=184881 Script]&lt;br /&gt;
| VoodooFX&lt;br /&gt;
|-&lt;br /&gt;
| [[ExInpaint]]&lt;br /&gt;
| Exemplar-Based Image Inpainting. See [http://forum.doom9.org/showthread.php?t=133773 discussion] &lt;br /&gt;
| [[RGB24]] [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[ExInpaint|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 InpaintDelogo]&lt;br /&gt;
|InpaintDelogo is an advanced logo and watermark removal function using inpainting and deblending with an adjustable fine process to hide artifacts and get best delogo results.&lt;br /&gt;
Can remove opaque, transparent, semi-transparent and some dynamic logos from video.&lt;br /&gt;
Can be used to remove hardcoded subtitles or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 Script]&lt;br /&gt;
|VoodooFX&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;
| [[InpaintFunc|Script]]&lt;br /&gt;
| Reuf Toc&lt;br /&gt;
|-&lt;br /&gt;
| LogoNR&lt;br /&gt;
| Post-denoise filter for EraseLogo or [[DelogoHD]]. See [https://web.archive.org/web/20210915185704/https://www.nmm-hd.org/newbbs/viewtopic.php?t=649 discussion]&lt;br /&gt;
| All [[planar]] colorspaces&lt;br /&gt;
| [https://web.archive.org/web/20220702130736/https://pastebin.com/raw/qZBU3NQA Script]&lt;br /&gt;
| {{Author/06_taro}}&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;
| [[Uglarm]]&lt;br /&gt;
| Filter for blurring a logo, using LogoAway style Uglarm Interpolation method.&lt;br /&gt;
| [[RGB24]] [[RGB32]],[[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Uglarm|Plugin]]&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.&lt;br /&gt;
| [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[X-Logo|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;
| [[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;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]]&lt;br /&gt;
| [[DeFlicker|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}, {{Author/pinterf}}&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;
| [[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;
| [[EquLines|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[LMFlicker|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;
| Plugin to reduce temporal oscillations.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[ReduceFlicker|Plugin]]&lt;br /&gt;
| {{Author/kassandro}}, {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[TimeLapseDF|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]], 8-16bit planar Y/YUV&lt;br /&gt;
| [[Vinverse|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;
| [[Bifrost|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[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;
| [[DDCR]]&lt;br /&gt;
| A purely spatial dot crawl removal script for AviSynth+.&lt;br /&gt;
| all 8 bit Y/YUV colorspaces&lt;br /&gt;
| [[DDCR|Script]]&lt;br /&gt;
| Reel.Deal&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;
| [[DeCross|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;
| all planar Y, YUV, and YUVA (8-16 bit)&lt;br /&gt;
| [[DeDot|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;
|[[DotKill]]&lt;br /&gt;
|Spatio-temporal dotcrawl and rainbow remover.&lt;br /&gt;
|[[YV12]], [[YV16]], [[YV24]], [[YV411]], 8-16bits&lt;br /&gt;
|[[DotKill|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=170328 FadeDeRainbow]&lt;br /&gt;
|Another de-rainbowing script.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=170328 Script]&lt;br /&gt;
|bxyhxyh&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).&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[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).&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[DePan|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|Script]]&lt;br /&gt;
|[http://pastebin.com/u/tophf tophf]&lt;br /&gt;
|-&lt;br /&gt;
| [[Deshaker3D]]&lt;br /&gt;
| Experimental 3D image stabilizer (VDub [http://www.guthspot.se/video/deshaker.htm Deshaker] required).&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Deshaker3D|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;
|[https://github.com/arnean/PerfPan PerfPan]&lt;br /&gt;
|PerfPan is an AviSynth plugin to stabilize scanned film using perforation as a reference.&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://github.com/arnean/PerfPan/tree/master/windows Plugin]&lt;br /&gt;
|[https://github.com/arnean arnean]&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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[Stab|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;
|{{Author/Dogway}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182532 Stab_Light]&lt;br /&gt;
|Another stabilization script; based on Stab3.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|Arx1meD&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;
| [[AdaptiveMedian|Plugin]]&lt;br /&gt;
|{{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Deathray]]&lt;br /&gt;
|OpenCL GPU accelerated spatial/temporal non-local means de-noising.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[Deathray|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;
| [[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;
| [[DeSaltPepper|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFTQuiver]]&lt;br /&gt;
| Remove periodic noise. Useful for analog interference.&lt;br /&gt;
| [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[FFTQuiver|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TNLMeans]]&lt;br /&gt;
| TNLMeans is an implementation of the NL-means denoising algorithm.&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;
| [[TNLMeans|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.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[KNLMeansCL|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;
| [[_2DCleanYUY2|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;
| [[DctFilter|Plugin]]&lt;br /&gt;
| {{Author/Tom Barry}}&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;
| [[Frfun7|Plugin]]&lt;br /&gt;
| prunedtree&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;
|[[MiniDeen]]&lt;br /&gt;
|MiniDeen is a spatial denoising filter. It replaces every pixel with the average of its neighbourhood. This is a port of the &amp;quot;a2d&amp;quot; method from the AviSynth plugin [[Deen]], version beta 2.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar YUV in AviSynth+&lt;br /&gt;
|[[MiniDeen|Plugin]]&lt;br /&gt;
|{{Author/dubhater}} / MeteorRain&lt;br /&gt;
|-&lt;br /&gt;
|[[Neo_VagueDenoiser]]&lt;br /&gt;
|Wavelet based Denoiser. Refactored version of the original VagueDenoiser; includes optimizations, additional colorspaces, and high bit depth support.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar YUV in AviSynth+&lt;br /&gt;
|[[Neo_VagueDenoiser|Plugin]]&lt;br /&gt;
| HolyWu, [https://github.com/msg7086 MeteorRain]&lt;br /&gt;
|-&lt;br /&gt;
|[[sbr]]&lt;br /&gt;
|sbr is helper function to make a highpass on a blur's difference.&lt;br /&gt;
|All YUV [[planar]] 8 to 16-bit colorspaces &lt;br /&gt;
|[[sbr|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothUV2]]&lt;br /&gt;
| SmoothUV2 is a spatial derainbow filter. This filter performs structure-preserving smoothing (blurring) on the U/V (chrominance or colour) information of the image, leaving Y (luminance) intact.  &lt;br /&gt;
| All YUV, YUVA [[planar]] 8 to 16-bit colorspaces &lt;br /&gt;
| [[SmoothUV2|Plugin]]&lt;br /&gt;
| {{Author/dubhater}}, {{Author/Asd-g}}&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;
|[[SPresso|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;
| [[TBilateral|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[VagueDenoiser|Plugin]]&lt;br /&gt;
| {{Author/Lefungus}}, {{Author/Kurosu}}, {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsMSmooth]]&lt;br /&gt;
|vsMSmooth is a spatial smoother that doesn't touch edges. &lt;br /&gt;
||[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all planar Y, YUV, and RGB formats,  8 to 16 bit&lt;br /&gt;
|[[vsMSmooth|Plugin]]&lt;br /&gt;
|{{Author/dubhater}}, {{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsTBilateral]]&lt;br /&gt;
|vsTBilateral is a spatial smoothing filter that uses the bilateral filtering algorithm.&lt;br /&gt;
|All [[planar]] 8 to 16-bit colorspaces&lt;br /&gt;
|[[vsTBilateral |Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[Cnr2|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;
| [[FluxSmooth|Plugin]]&lt;br /&gt;
| {{Author/SansGrip}}, {{Author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| MDegrain&lt;br /&gt;
| Strong and effective temporal denoiser. Part of the [[MVTools]] package.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[MVTools|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&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;
| [[TemporalDegrain2]]&lt;br /&gt;
| Temporal Degrain enhanced with parts of QTGMC, potentially slower but more effective at removing grain from video sources while retaining more details.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]] (8-16 bit)&lt;br /&gt;
| [[TemporalDegrain2|Script]]&lt;br /&gt;
| Didée, Sagekilla, Vit, real.finder, ErazorTT&lt;br /&gt;
|-&lt;br /&gt;
|[[vsCnr2]]&lt;br /&gt;
|vsCnr2 is a temporal denoiser designed to denoise only the chroma. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV, and YUVA (8-16 bit) &lt;br /&gt;
|[[vsCnr2|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsTTempSmooth]]&lt;br /&gt;
|vsTTempSmooth is a motion adaptive (it only works on stationary parts of the picture), temporal smoothing filter. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV, and YUVA (8-32 bit) &lt;br /&gt;
|[[vsTTempSmooth|Plugin]]&lt;br /&gt;
|HolyWu, {{Author/Asd-g}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spatio-Temporal Denoisers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[BM3DCUDA]]&lt;br /&gt;
|BM3D denoising filter for AviSynth+, implemented in CUDA.&lt;br /&gt;
|32-bit [[planar]] colorspaces&lt;br /&gt;
|[[BM3DCUDA|Plugin]]&lt;br /&gt;
|[https://github.com/WolframRhodium WolframRhodium]&lt;br /&gt;
|-&lt;br /&gt;
| [[Convolution3D]]&lt;br /&gt;
| Convolution3D is a spatio-temporal smoother, it applies a 3D convolution filter to all pixels of consecutive frames.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[Convolution3D|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;
| [[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;
| [https://web.archive.org/web/20160604213634/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.&lt;br /&gt;
| [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[dfttest|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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[DeGrainMedian|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DFilter]]&lt;br /&gt;
| A 3D Frequency Domain filter - gives strong denoising and moderate sharpening.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]], any Y, YUV and Planar RGB 8-32 bit&lt;br /&gt;
| [[FFT3DFilter|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}, martin53, {{Author/pinterf}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DGPU]]&lt;br /&gt;
| Similar algorithm to FFT3DFilter, but uses graphics hardware for increased speed.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]], Planar RGB 8 bit&lt;br /&gt;
| [[FFT3DGPU|Plugin]]&lt;br /&gt;
| {{Author/tsp}}, {{Author/pinterf}}&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;
| 8-16bit planar YUV&lt;br /&gt;
| [[hqdn3d|Plugin]]&lt;br /&gt;
| {{Author/akupenguin}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174804 mclean]&lt;br /&gt;
|Typical spatial filters work by removing large variations in the image on a small scale, reducing noise but also making the image less sharp or temporally stable. mClean removes noise whilst retaining as much detail as possible, as well as provide optional image enhancement.&lt;br /&gt;
|[[YV12]], [[HBD]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174804 Script]&lt;br /&gt;
|burfadel&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;
| [[MC_Spuds|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;
| [[MCTemporalDenoise|Script]]&lt;br /&gt;
| {{Author/LaTo}}&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;
| [https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/RemoveDirtMC_SE.avsi Script]&lt;br /&gt;
| Nephilis/A.SONY&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;
| [[RemoveGrainHD|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;
| [[RgTools|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;
|[[SMDegrain|Script]]&lt;br /&gt;
|{{Author/Dogway}}&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.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[STPresso|Script]]&lt;br /&gt;
|{{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsDeGrainMedian]]&lt;br /&gt;
|vsDeGrainMedian is a spatio-temporal limited median denoiser.&lt;br /&gt;
|All [[planar]] 8 to 16bit colorspaces&lt;br /&gt;
|[[vsDeGrainMedian|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
| [[Average|Plugin]]&lt;br /&gt;
| {{Author/tp7}}, {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[[AviSynthGimpLayer]]&lt;br /&gt;
|AviSynth Gimp-style Layer merge plugin.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[AviSynthGimpLayer|Plugin]]&lt;br /&gt;
| [http://sourceforge.net/u/panzerboy66/profile/ panzerboy66]&lt;br /&gt;
|-&lt;br /&gt;
|[[AVS_SoftLight]]&lt;br /&gt;
|AviSynth+ plugin. It makes a softlight blend with a negative of average. Only x64 version available and with CUDA support. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[AVS_SoftLight|Plugin]]&lt;br /&gt;
|Argaricolm&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 satisfies 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;
|[[ClipBlend]]&lt;br /&gt;
|Filter to blend consecutive frames in a clip. &lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[ClipBlend|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/colorkeyframe/colorkeyframe.html ColorKeyFrame]&lt;br /&gt;
| Linear interpolation of color correction with key frames. &lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/colorkeyframe/colorkeyframe03.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[ColorScreenMask|Plugin]]&lt;br /&gt;
|Grandpa Oddball&lt;br /&gt;
|-&lt;br /&gt;
|[[ColourMask]]&lt;br /&gt;
|Creates colour masks.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[ColourMask|Plugin]]&lt;br /&gt;
|{{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[CombMask|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;
|[[Fusion|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;
| [[GraMaMa|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/8c4rxlwbs020ib1/MaskCrop0.1.2.7z?dl=1 Plugin] &amp;lt;!--[http://www.dropbox.com/s/98bcjuiy2ojkz75/MaskCrop0.1.1.7z?dl=1 Old v0.1.1 plugin] [http://www.dropbox.com/s/xcrlno31jqavqob/MaskCrop.7z?dl=1 Old v0.1.0 plugin]--&amp;gt;&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;
|{{Author/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.&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[Median|Plugin]]&lt;br /&gt;
|{{Author/ajk}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MTCombMask]]&lt;br /&gt;
|This filter produces a mask showing areas that are combed, it uses 3-point sampling to determine combing in a pixel. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], 8-32bit planar Y/YUV/YUVA&lt;br /&gt;
|[[MTCombMask|Plugin]]&lt;br /&gt;
|{{Author/Manao}}, [https://github.com/Asd-g Asd-g]&lt;br /&gt;
|-&lt;br /&gt;
|[[OverlayPlus]]&lt;br /&gt;
|Layering scrip similar to AviSynth's internal Overlay but includes more blending modes and some additional features.&lt;br /&gt;
|All 8-32bit colorspaces&lt;br /&gt;
|[[OverlayPlus|Script]]&lt;br /&gt;
|reel.deel &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;
| [https://web.archive.org/web/20201020085042/https://sites.google.com/site/ourenthusiasmsasham/soft#TOC-ParameterisedBlendd Plugin]&lt;br /&gt;
| [https://web.archive.org/web/20201020085035/https://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;
|[[RedAverage]]&lt;br /&gt;
|Frame-by-frame averaging/merging of multiple clips. Includes a masked average, weighted average, and a merge filter. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[RedAverage|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;
|[[TColorMask]]&lt;br /&gt;
|A simple color masking plugin for AviSynth.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]], 8/16bit planar YUV&lt;br /&gt;
|[[TColorMask|Plugin]]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[TCombMask|Plugin]]&lt;br /&gt;
|{{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
|[[TempLinearApproximate]]&lt;br /&gt;
|TempLinearApproximate takes several frames and for each pixel calculates linear approximation of its values through time, then returns its value in the middle (unless close to beginning or end of clip) of that line.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[TempLinearApproximate|Plugin]]&lt;br /&gt;
|Mystery Keeper&lt;br /&gt;
|-&lt;br /&gt;
|[[TMaskCleaner]]&lt;br /&gt;
|A really simple mask cleaning plugin for AviSynth based on mt_hysteresis.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[TMaskCleaner|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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TMM|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TMM2]]&lt;br /&gt;
| A rewrite of TMM&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[TMM2|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.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Unpremultiply|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;
|[[Watermark2]]&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;
|[[Watermark2|Plugin]]&lt;br /&gt;
|[http://sourceforge.net/u/phillvanleersum/profile/ DrPhill], {{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[YRangeMask]]&lt;br /&gt;
| AviSynth script to create a mask by specifying the range of the brightness. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[YRangeMask|Script]]&lt;br /&gt;
| Chikuzen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blurring ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlurDetect BlurDetect]&lt;br /&gt;
|Determines blurriness of frames.&lt;br /&gt;
|All 8-16 bit [[planar]] formats.&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlurDetect/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.animemusicvideos.org/forum/viewtopic.php?t=101724 BlurMod/ApplyOnAngle]&lt;br /&gt;
|BlurMod() shrinks, blurs, then resizes; resulting in a very strong blur. ApplyonAngle() rotates, filters, then rotates back; making any filter appear as if applied on an angle.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|Script&lt;br /&gt;
|Phantasmagoriat&lt;br /&gt;
|-&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;
| [[BucketMedian|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FastBlur]]&lt;br /&gt;
| Fast approximate Gaussian blurs.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[FastBlur|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GBlur]]&lt;br /&gt;
| Gaussian blur.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[GBlur|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[MedianBlur|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;
| [[MedianBlur2|Plugin]]&lt;br /&gt;
| {{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[[neo_TMedian]]&lt;br /&gt;
|Temporal denoising filter that replaces every pixel with the median of its temporal neighbourhood. &lt;br /&gt;
|8-16 and 32-bit planar&lt;br /&gt;
|[[neo_TMedian|Plugin]]&lt;br /&gt;
|[https://github.com/msg7086 MeteorRain]&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;
| [[VariableBlur|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/20091027134543if_/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;
|[[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;
|[[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;
|[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;
|CropEven&lt;br /&gt;
|Script to crop evenly based on the dimensions given. It will crop the extra pixels off the bottom and right sides if the target resolution is odd. See [https://forum.doom9.org/showthread.php?t=172577 discussion].&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1739589#post1739589 Script]&lt;br /&gt;
|Desbreko&lt;br /&gt;
|-&lt;br /&gt;
|[[EdgeFixer]]&lt;br /&gt;
|EdgeFixer repairs bright and dark line artifacts near the border of an image. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[EdgeFixer]]&lt;br /&gt;
|[https://github.com/sekrit-twc sekrit-twc]&lt;br /&gt;
|-&lt;br /&gt;
|[[FillBorders]]&lt;br /&gt;
|This is a simple filter that fills the borders of a clip, without changing the clip's dimensions.&lt;br /&gt;
|All [[planar]] colorspaces &lt;br /&gt;
|[[FillBorders]]&lt;br /&gt;
|[http://github.com/dubhater dubhater] / Asd&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;
|PadFFT&lt;br /&gt;
|A simple plugin to add borders evenly on each side. See [https://forum.doom9.org/showthread.php?p=1769503#post1769503 discussion]&lt;br /&gt;
|[[Y8]], [[YV12]]&lt;br /&gt;
|[https://web.archive.org/web/20221113033752if_/https://files.videohelp.com/u/223002/PaddFFT_dll_v0.02_20160604.zip Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|PadToMod&lt;br /&gt;
|Script to pad to a specified mod. See [https://forum.doom9.org/showthread.php?t=172577 discussion].&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1746579#post1746579 Script]&lt;br /&gt;
|Desbreko&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;
| [[RoboCrop|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;
|[https://forum.doom9.org/showthread.php?t=183453 ColorMatrixTransform]&lt;br /&gt;
|AviSynth+ plugin for applying a color matrix transform to 32 bit floating point clips.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[https://github.com/TomArrow/ColorMatrixTransform/releases Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&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;
|[https://forum.doom9.org/showthread.php?t=183990 LabConvert]&lt;br /&gt;
|AviSynth+ plugin to convert to LChab (derivative of LAB) color space and back for beautiful color manipulations. &lt;br /&gt;
|[[RGBPS]], [[YUV444PS]]&lt;br /&gt;
|[https://github.com/TomArrow/LabConvertAVS/releases/ Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&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;
|[[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;
|[[PlanarTools|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[[YV12To422]]&lt;br /&gt;
|YV12 to YV16/YUY2 converter for AviSynth 2.6.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[YV12To422|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;
| [[AddGrainC|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;
|[[AGM]]&lt;br /&gt;
|Uses an adaptive mask based on frame and pixels brightness to apply grain.&lt;br /&gt;
|All YUV [[planar]] colorspaces &lt;br /&gt;
|[[AGM|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=167217 Checker]&lt;br /&gt;
|Checkerboard combining filter.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://www.mediafire.com/?ewq8rc0aprzmk8r Plugin] /// [https://web.archive.org/web/20230206191644if_/https://files.videohelp.com/u/223002/checker.zip Archived]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=184052 ChickenDream]&lt;br /&gt;
|Realistic film-grain rendering for AviSynth+.&lt;br /&gt;
|[[Y32]], [[RGBPS]]&lt;br /&gt;
|[https://github.com/EleonoreMizo/chickendream/releases Plugin]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[ColorLooks|Plugin]]&lt;br /&gt;
| {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[crt_display|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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[EffectsMany|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EffectsPlus]]&lt;br /&gt;
| '''AviSynth+ only'''. Creates 26 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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] colorspaces&lt;br /&gt;
| [[EffectsPlus|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;
| [[f3kgrainPlus]]&lt;br /&gt;
| Another 8/16-bit luma adaptive grain generator for AviSynth+.&lt;br /&gt;
| All 8-16 bit Y/YUV colorspaces, except YV411 &lt;br /&gt;
| [[f3kgrainPlus|Script]]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Fingerprint]]&lt;br /&gt;
|Video fingerprint filter. &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[Fingerprint|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&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;
| [[GrainFactory3|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;
| [[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;
|[[ShufflessS]]&lt;br /&gt;
|Shuffle spacial columns or rows (1D), or blocks(2D) of frames, or temporal shuffle (frame order), all shuffles Inversable, ie undoable.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[HBD]] formats in AviSynth+&lt;br /&gt;
|[[ShufflessS|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/sorayuki/TawawaFilter TawawaFilter]&lt;br /&gt;
|An AviSynth plugin to make video in blue color.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[https://github.com/sorayuki/TawawaFilter/releases/ Plugin]&lt;br /&gt;
|[https://github.com/sorayuki sorayuki]&lt;br /&gt;
|-&lt;br /&gt;
| [[TurnsTile]]&lt;br /&gt;
| Applies mosaic and/or palette effects to a clip.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[TurnsTile|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;
|[[FixFPS]]&lt;br /&gt;
|Fix the frames to a more consistent pattern with the help of Matroska Version 2 Timecodes.  Mostly useful for fixing weird framerate from using a third party program to capture (ex. .kkapture with Mupen).  Generally used with the plugin ExactDedup.  It should be noted that FixFPS would try it's best not to lose any frames from the source.  It does this by pushing frames to the next available spot, if possible, but it can cause side effects. See [http://tasvideos.org/forum/viewtopic.php?t=18914 discussion].&lt;br /&gt;
|Any&lt;br /&gt;
|[https://www.mediafire.com/?7bip52hu7v1pps2 Plugin]&lt;br /&gt;
|Aktan&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;
| [[FrameRateConverter]]&lt;br /&gt;
| FrameRateConverter uses motion interpolation with fine artifact removal.&lt;br /&gt;
| [[YV24]], [[YV16]], [[YV12]], [[Y8]]&lt;br /&gt;
| [[FrameRateConverter|Plugin]]&lt;br /&gt;
| [https://github.com/mysteryx93 MysteryX]&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;
|[[JohnFPS]]&lt;br /&gt;
|Frame Rate Converter based on the example from the MVTools documentation with some modifications. This script is also known as &amp;quot;jm_fps&amp;quot;. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[JohnFPS|Script]]&lt;br /&gt;
|johnmeyer, StainlessS &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;
|[[RIFE]]&lt;br /&gt;
|Real-Time Intermediate Flow Estimation for Video Frame Interpolation.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[[RIFE|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SickJumps]]&lt;br /&gt;
| Speed ramping, aka time-remapping (smooth speed changes). Processes both video and audio.&lt;br /&gt;
| [[RGB]], [[YUV]]&lt;br /&gt;
| [[SickJumps|Plugin]]&lt;br /&gt;
| {{Author/Robert Martens}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SVPflow]]&lt;br /&gt;
| SVPflow provides fast and high quality GPU accelerated frame rate interpolation.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[SVPflow|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. Note: only supports Matroska V1 timecodes.&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;
| [[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;
| [[TimecodeFPS|C-Plugin]]&lt;br /&gt;
| natt&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[VFRtoCFR|Plugin]]&lt;br /&gt;
| Aktan&lt;br /&gt;
|-&lt;br /&gt;
| [[VfrToCfr]]&lt;br /&gt;
| This plugin converts variable frame rate clips to constant frame rate by introducing null frames.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[VfrToCfr|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;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[ApplyEvery]]&lt;br /&gt;
|A collection of AviSynth functions that operate at regular intervals in a clip. &lt;br /&gt;
|&lt;br /&gt;
|[[ApplyEvery|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;
|[[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;
|[[ClipClop|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[FrameRepeat]]&lt;br /&gt;
|FrameRepeat() is a simple plugin to select frames to repeat. Requires AviSynth 2.6.&lt;br /&gt;
|&lt;br /&gt;
|[[FrameRepeat|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[FrameSel|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;
|[[FrameSel|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 Script]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[Prune|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[RemapFrames|Plugin]]&lt;br /&gt;
|{{Author/stickboy}}, {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/TomArrow/SelectRangeEveryReversing SelectRangeEveryReversing]&lt;br /&gt;
|Modified version of the internal [[SelectRangeEvery]] filter, except every second range is reversed in direction. See [https://forum.doom9.org/showthread.php?t=183239 discussion] for more information.&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/TomArrow/SelectRangeEveryReversing/releases Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Levels and Chroma ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[AutoAdjust|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;
| [[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.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Autolevels|Plugin]]&lt;br /&gt;
| {{Author/frustum}} &amp;amp; Theodor Anschütz &amp;amp; StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[AVSCube]]&lt;br /&gt;
|[[AviSynth+]] plugin to load and apply .cube [http://en.wikipedia.org/wiki/3D_lookup_table 3D LUTs].&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBP16]]&lt;br /&gt;
|[[AVSCube|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=168062 AWB]&lt;br /&gt;
| Automatic white balance for real world footage, similar to the known function in digital cameras.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=168062 Script]&lt;br /&gt;
| martin53&lt;br /&gt;
|-&lt;br /&gt;
|Brightness&lt;br /&gt;
|Restore dark and bright zones.&lt;br /&gt;
|8-16 planar Y/YUV&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182411 Script]&lt;br /&gt;
|Arx1meD&lt;br /&gt;
|-&lt;br /&gt;
| ChangeColour&lt;br /&gt;
| Simple plugin to replace one specified color to another, see [https://forum.doom9.org/showthread.php?t=88727 discussion] for additional information.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [https://web.archive.org/web/20220322043620/https://files.videohelp.com/u/223002/changecolour01.zip Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&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;
| [[ChanMix|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;
| [[ChannelMixer|Plugin]]&lt;br /&gt;
| Gustaf Ullberg&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=173364 ChromaJig]&lt;br /&gt;
| Automatic Colorization.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1775733#post1775733 Script]&lt;br /&gt;
| MWilson&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorBalance]]&lt;br /&gt;
| Same tool that is found in Gimp &amp;amp; Cinepaint.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ColorBalance|Plugin]]&lt;br /&gt;
| Gavino &amp;amp; mikeytown2&lt;br /&gt;
|-&lt;br /&gt;
|[[ColorLooks]]&lt;br /&gt;
| The plugin contains the following filters: Technicolor, Colorize, Sepia and Posterize.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[ColorLooks|Plugin]]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[[ColorYUV2]]&lt;br /&gt;
|YUV color adjustment plugin with a graffer. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[ColorYUV2|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ColourLike]]&lt;br /&gt;
| Makes a clip look like a 'reference' clip by adjusting each colour mask.&lt;br /&gt;
| [[RGB32]], [[YV12]]&lt;br /&gt;
| [[ColourLike|Plugin]]&lt;br /&gt;
| {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ColourWarp]]&lt;br /&gt;
| Smooth remapping of UV colour values using control points for colour correction.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[ColourWarp|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGCube]]&lt;br /&gt;
|[[AviSynth+]] plugin to load and apply .cube [http://en.wikipedia.org/wiki/3D_lookup_table 3D LUTs]. (GPU accelerated - CUDA)&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBP16]]&lt;br /&gt;
|[[DGCube|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGHDRtoSDR]]&lt;br /&gt;
|[[AviSynth+]] plugin to convert UHD BluRay HDR10 to SDR. (GPU accelerated - CUDA)&lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P16]]&lt;br /&gt;
|[[DGHDRtoSDR|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGPQtoHLG]]&lt;br /&gt;
|[[AviSynth+]] plugin to convert UHD BluRay HDR10 PQ to HDR10 HLG. GPU accelerated - CUDA) &lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P16]]&lt;br /&gt;
|[[DGPQtoHLG|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGTonemap]]&lt;br /&gt;
|[[AviSynth+]] plugin for basic Reinhard tonemapping for HDR-&amp;gt;SDR.&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBPS]]&lt;br /&gt;
|[[DGTonemap|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/erazortt/DoViBaker DoViBaker]&lt;br /&gt;
|This plugin reads the Base Layer, Enhancement Layer and RPU data from a profile 7 DolbyVision stream to create a clip with the DolbyVision data baked in. Additionally it provides static and dynamic tonemapping of HDR PQ sources to lower dynamic range targets. Conversions from PQ to HLG and SDR (BT.2020 and BT.709) are also supported.&lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P10-16, YUV444P10-16]]&lt;br /&gt;
|[https://github.com/erazortt/DoViBaker/releases Plugin]&lt;br /&gt;
|[https://github.com/erazortt erazortt]&lt;br /&gt;
|-&lt;br /&gt;
| [[ExpLabo]]&lt;br /&gt;
| ExpLabo is a multi-filters plugin, focused on the non-linear transformation of image color space.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ExpLabo|Plugin]]&lt;br /&gt;
| brabbudu&lt;br /&gt;
|-&lt;br /&gt;
|[https://web.archive.org/web/20180916224719/http://mpierce.pie2k.com/pages/211.php Exposure]&lt;br /&gt;
|Exposure function for AviSynth.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[https://web.archive.org/web/20171023011558if_/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;
|[[GamMac]]&lt;br /&gt;
|Useful to correct color cast on old 8mm films.&lt;br /&gt;
|[[RGB32]], [[RGB24]]&lt;br /&gt;
|[[GamMac|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[GamMatch]]&lt;br /&gt;
|Gamma Matcher; useful to correct bad color clip where there is a better color source of perhaps lower rez available.&lt;br /&gt;
|[[RGB32]], [[RGB24]]&lt;br /&gt;
|[[GamMatch|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GiCocu]]&lt;br /&gt;
| Use GIMP/Photoshop curve files.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[GiCocu|Plugin]]&lt;br /&gt;
| E-Male&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/magiblot/gradation Gradation]&lt;br /&gt;
|Gradation Curves filter for VirtualDub and AviSynth+ &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[https://github.com/magiblot/gradation/releases Plugin]&lt;br /&gt;
|[https://github.com/magiblot magiblot]&lt;br /&gt;
|-&lt;br /&gt;
|[[GradationCurve]]&lt;br /&gt;
|[[AviSynth+]] plugin that loads Photoshop ACV and GIMP crv curve files. Also can compute the gradation curve through given anchor points. Like what Photoshop and Gimp do in the Curves setting.&lt;br /&gt;
|[[Avisynthplus_color_formats|PlanarRGB, PlanarYUV]]&lt;br /&gt;
|[[GradationCurve|Plugin+Script]]&lt;br /&gt;
|ErazorTT&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;
|[https://github.com/Asd-g/AviSynthPlus-grayworld grayworld]&lt;br /&gt;
|Port of [https://ffmpeg.org/ffmpeg-filters.html#grayworld FFmpeg's grayworld] filter to AviSynth+. See [https://forum.doom9.org/showthread.php?t=183750 discussion]&lt;br /&gt;
|[[RGBPS]], [[RGBAPS]]&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-grayworld/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[HDRAGC|Plugin]]&lt;br /&gt;
| {{Author/paviko}}&lt;br /&gt;
|-&lt;br /&gt;
|[[HDRTools]]&lt;br /&gt;
|HDR color conversion plugin for AviSynth+.&lt;br /&gt;
|[[RGB32]], [[RGB64]], Planar YUV/RGB (8-16 and 32bit)&lt;br /&gt;
|[[HDRTools|Plugin]]&lt;br /&gt;
|[https://github.com/jpsdr jpsdr]&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;
| [[HistogramAdjust|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;
| [[Histograms in RGB &amp;amp; CMY|Script]]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/magiblot/HSLTint HSLTint]&lt;br /&gt;
|An [[AviSynth+]] filter for creating monochromatic tints with user-defined hue and saturation.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]] - all bit-depths&lt;br /&gt;
|[https://github.com/magiblot/HSLTint/blob/master/HSLTint.avsi Script]&lt;br /&gt;
|magiblot&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.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[HSVAdjust|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.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[Hue|Plugin]]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Tonemap|libplacebo_Tonemap]]&lt;br /&gt;
|Dynamic HDR tone mapping, includes peak and scene-change detection, chroma-preserving (luma-only) tone mapping, highlight desaturation, dynamic exposure control and a variety of industry-standard EETFs including BT.2390. &lt;br /&gt;
|16-bit planar RGB or YUV444P16 &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176091 LinearTransformation]&lt;br /&gt;
|This script performs Linear Transformations based on a matrix conversion. Matrices are made by Francesco Bucciantini (FranceBB).&lt;br /&gt;
|[[YV12]], [[YV16]], [[YV24]], [[RGB24]], [[RGB32]], [[RGB32]], [[RGB48]],[[RGBPS]]&lt;br /&gt;
|[https://github.com/FranceBB/LinearTransformation Linear Transformation]&lt;br /&gt;
|[https://forum.doom9.org/member.php?u=219051 FranceBB]&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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[MatchHistogram|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;
| [[OutRange|Script]]&lt;br /&gt;
| 06_taro&lt;br /&gt;
|-&lt;br /&gt;
|[[RGBAdapt]]&lt;br /&gt;
|Another RGB color correction plugin, it also also includes a graffer.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[RGBAdapt|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[RgbAmplifier]]&lt;br /&gt;
|An AviSynth forensic plugin to amplify color shifts.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[RgbAmplifier|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=181857 SafeColorLimiter]&lt;br /&gt;
| Automatic Clipping to get a broadcast safe output in Limited TV Range.&lt;br /&gt;
| [[Y8]], [[Y10]], [[Y12]], [[Y14]], [[Y16]], [[Y32]], [[YV12]], [[YV411]], [[YUY2]], [[YV16]], [[YV24]]&lt;br /&gt;
| [https://github.com/FranceBB/SafeColorLimiter Script]&lt;br /&gt;
| [http://forum.doom9.org/member.php?u=219051 FranceBB]&lt;br /&gt;
|-&lt;br /&gt;
|[[SelectiveColour]]&lt;br /&gt;
|AviSynth implementation of Photoshop's selective colour adjustment. &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[SelectiveColour|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&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;
|[[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;
|[[ShowChannels|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;
| [[ShowOverRange|Plugin]]&lt;br /&gt;
| {{Author/SAPikachu}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothAdjust]]&lt;br /&gt;
| SmoothAdjust is a set of 5 plugins to make YUV adjustments. These 5 plugins have a smoothing &amp;amp; dithering algorithm to avoid banding issue. SmoothAdjust is [[SmoothLevels|SmoothLevels']] successor. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[SmoothAdjust|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;
| [[TweakColor]]&lt;br /&gt;
| Target specific hue and saturation ranges for hue and saturation adjustments.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[TweakColor|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;
| [[VideoScope|Plugin]]&lt;br /&gt;
| {{Author/Randy French}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1832763#post1832763 VideoTek]&lt;br /&gt;
| VideoTek is a Tektronix-like waveform monitor for AviSynth.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [https://github.com/FranceBB/VideoTek/blob/master/VideoTek.avsi Script]&lt;br /&gt;
| [http://forum.doom9.org/member.php?u=219051 FranceBB]&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.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[WhiteBalance|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;
|[https://forum.doom9.org/showthread.php?t=181665 AiUpscale]&lt;br /&gt;
|An AviSynth+ implementation of some Super-Resolution Convolutional Neural Networks.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[https://github.com/Alexkral/AviSynthAiUpscale Script]&lt;br /&gt;
|[https://github.com/Alexkral Alexkral]&lt;br /&gt;
|-&lt;br /&gt;
|[[Anime4KCPP]]&lt;br /&gt;
|Anime4K is a simple high-quality anime upscale algorithm with GPU acceleration support. [[AviSynth+]] x64 only.&lt;br /&gt;
|[[RGB24]], [[YV24]], [[YV16]], [[YV12]]&lt;br /&gt;
|[[Anime4KCPP|Plugin]]&lt;br /&gt;
|TianZerL&lt;br /&gt;
|-&lt;br /&gt;
| [[avsresize]]&lt;br /&gt;
| [http://github.com/sekrit-twc/zimg z.lib] resizers for [[AviSynth+]]. avsresize provides resizing, colorspace and bit depth conversation. &lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
| [[avsresize|Plugin]]&lt;br /&gt;
| [http://github.com/sekrit-twc sekrit-twc]&lt;br /&gt;
|-&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;
| [[AreaResize|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}, Aktanusa&lt;br /&gt;
|-&lt;br /&gt;
|[https://gist.github.com/kgrabs/b042214d715176ac9ab563c188995457 Desample]&lt;br /&gt;
|Desampling functions for AviSynth+, replaces DebilinearM and lineart_rpow2. Also includes DeCrossConversionMT which is a replacement for ccc, ccc_720.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[https://gist.github.com/kgrabs/b042214d715176ac9ab563c188995457 Script]&lt;br /&gt;
|[https://github.com/kgrabs kgrabs]&lt;br /&gt;
|-&lt;br /&gt;
|[[Descale]]&lt;br /&gt;
|AviSynth+ filter to undo upscaling.&lt;br /&gt;
|All planar Y/YUV/RGB color formats&lt;br /&gt;
|[[Descale|Plugin]]&lt;br /&gt;
|[https://github.com/Frechdachs Frechdachs]&lt;br /&gt;
|-&lt;br /&gt;
|[[DPID]]&lt;br /&gt;
|DPID is an algorithm that preserves visually important details in downscaled images and is especially suited for large downscaling factors. &lt;br /&gt;
|All [[planar]] colorspaces&lt;br /&gt;
|[[DPID|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[FCBI]]&lt;br /&gt;
|Fast Curvature Based Interpolation.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar clips&lt;br /&gt;
|[[FCBI|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[fmtconv]]&lt;br /&gt;
| fmtconv is a format-conversion plug-in, it provides resizing, colorspace and bitdepth conversation. &lt;br /&gt;
| All [[planar]] 8 to 32-bit colorspaces&lt;br /&gt;
| [[fmtconv|Plugin]]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[JincResize]]&lt;br /&gt;
| Jinc (EWA Lanczos) Resampler Plugin for AviSynth/AviSynth+.&lt;br /&gt;
| All 8-32bit [[planar]] colorspaces&lt;br /&gt;
| [[JincResize|Plugin]]&lt;br /&gt;
| innocenat&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Resample|libplacebo_Resample]]&lt;br /&gt;
|High-quality, optimized upscaling and downscaling including support for polar filters (&amp;quot;Jinc&amp;quot;), anti-aliasing, anti-ringing and gamma correct scaling&lt;br /&gt;
|8, 16 or 32-bit planar RGB/YUV formats. &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[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;
|[[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).&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[PointSize|Plugin]]&lt;br /&gt;
| `Orum&lt;br /&gt;
|-&lt;br /&gt;
| [[ResampleHQ]]&lt;br /&gt;
| ResampleHQ provides gamma-aware resizing and colorspace conversion.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ResampleHQ|Plugin]]&lt;br /&gt;
| Cory Nelson&lt;br /&gt;
|-&lt;br /&gt;
|[[ResampleMT]]&lt;br /&gt;
|Internaly multi-threaded resampling functions, also includes desampling functions (DeBilinear, DeBicubic,...).&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[[ResampleMT|Plugin]]&lt;br /&gt;
|[http://github.com/jpsdr jpsdr]&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;
| [[SimpleResize|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://forum.doom9.org/showthread.php?t=175945 Unwiden/Widen]&lt;br /&gt;
|Resize filters to unwiden/widen, see discussion. &lt;br /&gt;
|[[RGB32]], [[YV24]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=175945 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[w2xncnnvk]]&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Waifu2x waifu2x] implemented in Vulkan.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[[w2xncnnvk|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[aSharp|Plugin]]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AVSShock|C-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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV formats,  8 to 16-bit&lt;br /&gt;
| [[aWarpSharp2|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;
|[[CAS]]&lt;br /&gt;
|Contrast Adaptive Sharpening.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV(A), RGB(A) formats,  8 to 32-bit&lt;br /&gt;
|[[CAS|Plugin]]&lt;br /&gt;
|Asd-g&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 old &amp;lt;tt&amp;gt;MSharpen&amp;lt;/tt&amp;gt; plugin.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TUnsharp|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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[UnFilter|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. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[UnsharpHQ|Plugin]]&lt;br /&gt;
| list&lt;br /&gt;
|-&lt;br /&gt;
|[[vsMSharpen]]&lt;br /&gt;
|vsMSharpen is a sharpener that tries to sharpen only edges. This plugin is a port of the VapourSynth plugin MSharpen. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all planar Y, YUV, and RGB formats,  8 to 16 bit&lt;br /&gt;
|[[vsMSharpen|Plugin]]&lt;br /&gt;
|Dubhater, Asd-g&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;
| [[WarpSharp|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;
| [[RGB24]], [[RGB32]], [[Y8]]&lt;br /&gt;
| [[DeBarrel|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Defish]]&lt;br /&gt;
|Barrel and pincushion distortion correction filter.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[Defish|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.&lt;br /&gt;
| [[Y8]], [[YV12]],[[YV24]]&lt;br /&gt;
| [[FTurn|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. Quad is now superseded by [[warp]].&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;
| [[Reform]]&lt;br /&gt;
| Skewed images are corrected or vice versa, useful if video is recorded with slightly incorrectly located camera. Sometimes referred to as perspective correction.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Reform|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Reformer]]&lt;br /&gt;
| Perspective correction and warping.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Reformer|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Rotate]]&lt;br /&gt;
| Rotate or shear on any given angle.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[Rotate|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]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Spinner/Spinner_2_6.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[warp]]&lt;br /&gt;
|A collection of geometry correction filters (also includes new version of Quad).&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[warp|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[xyremap|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Zoom]]&lt;br /&gt;
| Zoom, Pan &amp;amp; Rotate Clip. Adds alpha layer to clip.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Zoom|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. &lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YV24]], [[YV12]], [[Y8]]&lt;br /&gt;
| [[AssRender|C-Plugin]]&lt;br /&gt;
| lachs0r, TheFluff&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183148 DetSub]&lt;br /&gt;
|Can be used to remove hardcoded subtitles with halo from video or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183148 Script]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FreeSub]]&lt;br /&gt;
|Subtitle with bdf fonts.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YV24]]&lt;br /&gt;
|[[FreeSub|C-Plugin]]&lt;br /&gt;
|Natt&lt;br /&gt;
|-&lt;br /&gt;
|[[FreeSubPlus]]&lt;br /&gt;
|Script that adds support for additional colorspaces to the FreeSub plugin. &lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[[FreeSubPlus|Script]]&lt;br /&gt;
|reel.deel&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 InpaintDelogo]&lt;br /&gt;
|Can be used to remove hardcoded subtitles from video or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 Script]&lt;br /&gt;
|VoodooFX&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;
|[https://github.com/Asd-g/AviSynthPlus-SubImageFile SubImageFile]&lt;br /&gt;
|AviSynth+ plugin that renders image-based subtitles such as VOBSUB and PGS.&lt;br /&gt;
|[[RGB24]], [[Y8]]&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-SubImageFile/releases/ Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SubtitleEx]]&lt;br /&gt;
| Similar to the original [[Subtitle]] function but can do more: apply text to range; effects - bold, underline, italic, center, fading, motion, blur, emboss, etc...; alpha channel.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[SubtitleEx|Plugin]]&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;
| [[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;
| [[SupTitle|Plugin]]&lt;br /&gt;
| {{Author/ZachSaw}}&lt;br /&gt;
|-&lt;br /&gt;
|[[tcasFilter]]&lt;br /&gt;
|Renders TCAS subtitle effects.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[tcasFilter|Plugin]]&lt;br /&gt;
|milkyjing&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;
| [[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;
|[[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
| [[VSFilterMod|Plugin]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|[[xy-VSFilter]]&lt;br /&gt;
|High performance VSFilter compatible subtitle filters.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
|[[xy-VSFilter|Plugin]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Transitions ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| DissolveAGG&lt;br /&gt;
| Wipe Transition with a soft edge. See [http://forum.doom9.org/showthread.php?t=118016 discussion]. &lt;br /&gt;
'''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)], [http://forum.doom9.org/showthread.php?p=1152440#post1152440 Script (v2)], [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;
| [[TransAll|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition_AlbertGasset|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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Transition_AlbertGasset|C-Plugin]]&lt;br /&gt;
| {{Author/Albert Gasset}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition_Shubin|Transition (Shubin)]]&lt;br /&gt;
| Contains 2 transition modes: circle and line.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Transition_Shubin|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=174797 AVSMeter]&lt;br /&gt;
| AVSMeter is a CLI (command line interface) tool which measures the speed/efficiency of Avisynth scripts and checks if Avisynth and its plugin sub-system are set up and working correctly. Documentation for usage and features is included in the distribution package.&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=176079 Avisynth Info Tool]&lt;br /&gt;
| This program performs a thorough test of your Avisynth installation and associated plugins, checking if external dependencies are installed, etc.&lt;br /&gt;
|&lt;br /&gt;
| Windows application with graphical user interface&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=173259 avsr]&lt;br /&gt;
|CLI (command line interface) tool which simply executes an Avisynth script. This is useful when, for example, you want to write an image sequence to the disk by using &amp;quot;ImageWriter&amp;quot;.&lt;br /&gt;
|&lt;br /&gt;
| Command line executable&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[[Butteraugli]]&lt;br /&gt;
|Butteraugli is an estimating filter for the psychovisual similarity of two images.&lt;br /&gt;
|8-32bit planar RGB/RGBA&lt;br /&gt;
|[[Butteraugli|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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.&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]] &lt;br /&gt;
|[[ColorDiff|C-Plugin]]&lt;br /&gt;
|Ignus2&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182817 DebugColourSpaces]&lt;br /&gt;
|Debugging filter which applies a specified filter to multiple Avisynth+ colourspaces and displays a labelled grid of the results.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://horman.net/avisynth/download/DebugColourSpaces.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&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;
|[[FFTSpectrum]]&lt;br /&gt;
|FFTSpectrum is a filter that displays the FFT frequency spectrum of a given clip.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[FFTSpectrum|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[Info2]]&lt;br /&gt;
| A faster, prettier alternative to info().&lt;br /&gt;
|Any&lt;br /&gt;
|[[Info2|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[KPassFilterCL|Plugin]]&lt;br /&gt;
|[http://github.com/Khanattila Khanattila ]&lt;br /&gt;
|-&lt;br /&gt;
|[[LinesLumaDiff]]&lt;br /&gt;
|AviSynth+ plugin to check if luma difference between lines are below or above given threshold and writes frame number in text file.&lt;br /&gt;
|[[Planar]] YUV&lt;br /&gt;
|[[LinesLumaDiff|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MaxCLLFind]]&lt;br /&gt;
| PQ HDR Analyzer plugin for [[AviSynth+]], analyzes MaxCLL and MaxFALL and writes it to a text file.&lt;br /&gt;
|[[RGB64]]&lt;br /&gt;
|[[MaxCLLFind|Plugin]]&lt;br /&gt;
|Tom Arrow&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;
|[[Pixelscope]]&lt;br /&gt;
|This debugging filter displays individual pixel values.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=175688 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/EmiyaSyahriel/RollCompare RollCompare]&lt;br /&gt;
|AviSynth Plugin to create rolling comparison between videos.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[https://github.com/EmiyaSyahriel/RollCompare/releases Plugin]&lt;br /&gt;
|EmiyaSyahriel&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;
|[[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;
|[[SSIM|Plugin]]&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;
|[https://forum.doom9.org/showthread.php?t=176131 SysInfo]&lt;br /&gt;
|This plugin returns info about OS/CPU*/Memory/Screen/AviSynth.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176131 Plugin]&lt;br /&gt;
|Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=168241 Timer]&lt;br /&gt;
|AviSynth script to add a highly customizable timer to your video.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=168241 Script]&amp;lt;!-- https://gist.github.com/darealshinji/9770276 --&amp;gt;&lt;br /&gt;
|djcj&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;
|[[VMAF]]&lt;br /&gt;
|VMAF is a perceptual video quality assessment algorithm developed by Netflix. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]],&amp;lt;br&amp;gt; 8-10bit planar YUV&lt;br /&gt;
|[[VMAF|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[scharr]]&lt;br /&gt;
|Edge detection using the [https://en.wikipedia.org/wiki/Sobel_operator#Alternative_operators Scharr operator].&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[scharr|Script]]&lt;br /&gt;
|zorr &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;
| [[tcanny|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;
| [[TCannyMod|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;
| [[TEdgeMask|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;
| [[TEMmod|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsTCanny]]&lt;br /&gt;
| Builds an edge map using canny edge detection. &lt;br /&gt;
| All 8-32bit [[planar]] colorspaces&lt;br /&gt;
| [[vsTCanny|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsTEdgeMask]]&lt;br /&gt;
| vsTEdgeMask is an edge detection filter. This is a port of the TEdgeMask/TEMmod AviSynth plugins.&lt;br /&gt;
| All 8-16bit [[planar]] colorspaces&lt;br /&gt;
| [[vsTEdgeMask|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [https://github.com/Asd-g/AviSynth-TWriteAVI/releases Plugin]&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;
|[[AVSTP]]&lt;br /&gt;
|A library for multithreaded plug-in development&lt;br /&gt;
|Any&lt;br /&gt;
|[[AVSTP|Plugin]]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MP_Pipeline]]&lt;br /&gt;
|Run parts of an AviSynth script in external processes.&lt;br /&gt;
|Any&lt;br /&gt;
|[[MP_Pipeline|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=174433 amDCT]&lt;br /&gt;
|amDCT() is an adaptive video filter providing deblocking, sharpening, local range expansion, smoothing, and bright noise removal in a single filter that can be used on video of any level of quality. These four operations work synergistically to drastically reduce block artifacts while maintaining detail and increasing local contrast.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[https://github.com/pinterf/amDCT Plugin]&lt;br /&gt;
|jconklin, [https://github.com/pinterf pinterf]&lt;br /&gt;
|-&lt;br /&gt;
|[[AVExtensions]]&lt;br /&gt;
|Audio-video extensions is a collection of various AviSynth filters used to modify audio or video. &lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[AVExtensions|Plugin]]&lt;br /&gt;
|nutbread&lt;br /&gt;
|-&lt;br /&gt;
|[[AviSynthShader]]&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;
|[[AviSynthShader|Plugin]]&lt;br /&gt;
|[http://github.com/mysteryx93 MysteryX]&lt;br /&gt;
|-&lt;br /&gt;
|[[avs-mlrt]]&lt;br /&gt;
|This project provides AviSynth+ ML filter runtimes for variety of platforms. &lt;br /&gt;
|Y32, RGPS&lt;br /&gt;
|[[avs-mlrt|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[CLExpr|Plugin]]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183823 CTools]&lt;br /&gt;
|Includes various filters for IVTC, deinterlacing, denoising, dehalo and duplicate frames.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://github.com/CeppoTools/CTools/releases Plugin]&lt;br /&gt;
|Ceppo&lt;br /&gt;
|-&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;
| [[MaskTools2|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;
| [[MVTools|Plugin]]&lt;br /&gt;
| Various&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Shader|Shader]]&lt;br /&gt;
|Loads GLSL shaders written in mpv's .hook syntax.&lt;br /&gt;
|16-bit planar YUV&lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[AvsFilterNet]]&lt;br /&gt;
|The main objective of AvsFilterNet is to provide a wrapper for AviSynth, making it possible to write simple filter in any .Net languages. &lt;br /&gt;
|N/A&lt;br /&gt;
|[[AvsFilterNet|Plugin]]&lt;br /&gt;
|SAPikachu&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AvsMotion|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;
|[[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;
|[[CallCmd|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[ClipBoard]]&lt;br /&gt;
|Get text from Clipboard.&lt;br /&gt;
|N/A&lt;br /&gt;
|[[ClipBoard|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182910 Feedback]&lt;br /&gt;
|A filter that lets you use a filter chain's output as its own input.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://horman.net/avisynth/download/feedback.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FileSize]]&lt;br /&gt;
|Plugin to get filesize.&lt;br /&gt;
|N/A&lt;br /&gt;
|[[FileSize|Plugin]]&lt;br /&gt;
|pureexe&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.roelofs-coaching.nl/blobs/downloads/ProgramName.html GetProgramName]&lt;br /&gt;
|An AviSynth plug-in to retrieve the name of the calling application.&lt;br /&gt;
|N/A&lt;br /&gt;
|[https://www.roelofs-coaching.nl/blobs/downloads/ProgramName.zip Plugin]&lt;br /&gt;
|[http://www.roelofs-coaching.nl/J.M. Roelofs]&lt;br /&gt;
|-&lt;br /&gt;
|[[GetProgramName2]]&lt;br /&gt;
|GetProgramName2 is similar to GetProgramName by JM Roelofs, but this plugin is a newly written.  &lt;br /&gt;
|N/A&lt;br /&gt;
|[[GetProgramName2|Plugin]]&lt;br /&gt;
|[https://github.com/enccc enccc]&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;
| [[GRunT|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;
| [[GScript|Plugin]]&lt;br /&gt;
| {{Author/Gavino}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
| [[LoadDLL|Plugin]]&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=162790 MinMax]&lt;br /&gt;
|Finds the min or max value in each line or column and then sets the entire line or column to that value. Only processes the luma (Y) plane.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[https://web.archive.org/web/20160610142230if_/http://latoninf.free.fr/div/minmax.7z Plugin]&lt;br /&gt;
|{{Author/LaTo}}&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;
|[https://web.archive.org/web/20160606142540if_/http://www.tsp.person.dk/pop.zip Plugin]&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RT_Stats]]&lt;br /&gt;
| Compile-time/Runtime Functions.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[RT_Stats|Plugin]]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[StrFmt]]&lt;br /&gt;
|Simple plugin to produce formatted string, and additional function to string replace with another string.&lt;br /&gt;
|Any&lt;br /&gt;
|[[StrFmt|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174387 StrResolve]&lt;br /&gt;
|String Variables Resolving Plugin (for masktools expressions)&lt;br /&gt;
|Any&lt;br /&gt;
|[http://www.mediafire.com/file/wu6zexhssd0y77i/170310_StrResolve_v050.zip Plugin]&lt;br /&gt;
|martin53&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;
&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;
| [[Dither_tools|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;
|[https://sourceforge.net/projects/voix/files/2d3/ 2Dto3D]&lt;br /&gt;
|2Dto3D is a collection of scripts for 2D to 3D conversion. Conversion is good but not perfect.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://sourceforge.net/projects/voix/files/2d3/ Script]&lt;br /&gt;
|[https://sourceforge.net/u/brankoj/profile/ brankoj]&lt;br /&gt;
|-&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;
|[http://forum.doom9.org/showthread.php?p=1861891#post1861891 Audiofix]&lt;br /&gt;
|Plugin to fix a specific audio problem, see [http://forum.doom9.org/showthread.php?t=175991 discussion].&lt;br /&gt;
|&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1861891#post1861891 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&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.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV24]], 8-bit [[Planar]] RGB&lt;br /&gt;
| [[AudioGraph|Plugin]]&lt;br /&gt;
| Richard Ling, {{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AudioLimiter|Plugin]]&lt;br /&gt;
|dimzon&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AudioTimeline|Plugin]]&lt;br /&gt;
|martin53&lt;br /&gt;
|-&lt;br /&gt;
| [[BeFa]]&lt;br /&gt;
| Band Eliminate Filter for Audio.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[BeFa|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. It's a conditional audio filter, so the computation is done framewise.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[MinMaxAudio|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;
|[[Normalize2|Plugin]]&lt;br /&gt;
|[http://sourceforge.net/u/jcsston/profile/ jcsston]&lt;br /&gt;
|-&lt;br /&gt;
| [[SoxFilter]]&lt;br /&gt;
| Use [http://sox.sourceforge.net/ SOX] audio effects within AviSynth. Most effects are supported, and multiple effects can be stacked after each other.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[SoxFilter|Plugin]]&lt;br /&gt;
| {{author/Sh0dan}}, [https://github.com/pinterf pinterf]&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;
|[[Spectrogram|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;
| [[ViewAudio|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| VUmeter&lt;br /&gt;
| Classic analog-style VU meter; see [https://forum.doom9.org/showthread.php?t=175370 discussion]. Uses MinMaxAudio.&lt;br /&gt;
| Any&lt;br /&gt;
| [https://github.com/raffriff42/AvisynthPlusUtilities script]&lt;br /&gt;
| raffriff42&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.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]  &lt;br /&gt;
| [[Waveform|Plugin]]&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;
|[[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;
| [[amp|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[AutoOverlay]]&lt;br /&gt;
|Auto-aligned optimal overlay of one video clip onto another with color adjustment.&lt;br /&gt;
| [[RGB32]], [[YV24]], [[YV12]]&lt;br /&gt;
| [https://github.com/introspected/AutoOverlay/releases Plugin]&lt;br /&gt;
| [https://github.com/introspected introspected]&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://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://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=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;
|[[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/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]. [https://github.com/Youka/LVS GitHub]&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://web.archive.org/web/20160610103945/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;
|[https://sourceforge.net/projects/ssbrenderer/ SSBRenderer]&lt;br /&gt;
|SSBRenderer is a plugin for AviSynth to render 2D graphics and subtitles by SSB (Substation Beta) data on frames of video streams. [https://forum.doom9.org/showthread.php?t=169951 Doom9 Forum discussion], [https://github.com/Youka/SSBRenderer GitHub]&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[https://sourceforge.net/projects/ssbrenderer/files/ C-Plugin]&lt;br /&gt;
|[https://github.com/Youka Youka ]&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://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>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/MVTools</id>
		<title>MVTools</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/MVTools"/>
				<updated>2024-05-03T12:20:24Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: Update version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat5|External_filters|Plugins|Plugins_x64|Other_filters|Support_filters}}&lt;br /&gt;
[[Category:Deep_color_tools]]&lt;br /&gt;
{{Filter&lt;br /&gt;
|Manao, Fizick, Tsp, TSchniede, SEt, cretindesalpes, pinterf&lt;br /&gt;
|v2.7.46&lt;br /&gt;
|'''[https://github.com/pinterf/mvtools/releases mvtools-2.7.46-with-depans.7z]'''&lt;br /&gt;
(8-16(32) bits, 420,422,444 support, x86/x64)&lt;br /&gt;
|[[:Category:Support_filters|Support filters]], [[:Category:Deep_color_tools|Deep color tools]]&lt;br /&gt;
|&lt;br /&gt;
* [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0]&lt;br /&gt;
* AviSynth+ for x64 and native 10+ bits&lt;br /&gt;
* YV12&lt;br /&gt;
* YUY2&lt;br /&gt;
* YV16, YV24 (2.7.1-)&lt;br /&gt;
* YUV 4:2:0, 4:2:2, 4:4:4 10-16 bits (32 bits in selected filters)&lt;br /&gt;
|[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|7=[https://forum.doom9.org/showthread.php?t=84770 Doom9], [https://forum.doom9.org/showthread.php?t=131033 continued]&lt;br /&gt;
------&lt;br /&gt;
[https://forum.doom9.org/showthread.php?p=1386559#post1386559 Doom9 v2.6 mod], [https://forum.doom9.org/showthread.php?t=173356 v2.7mod]}}&lt;br /&gt;
&lt;br /&gt;
== About MVTools ==&lt;br /&gt;
MVTools plugin for AviSynth 2.6 is a collection of functions 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.&lt;br /&gt;
&lt;br /&gt;
The plugin contains the motion estimation server-function MAnalyse to find the motion vectors and several motion compensation client-functions (MCompensate, MMask and others) which use these vectors.&lt;br /&gt;
&lt;br /&gt;
Plugin uses block-matching method of motion estimation (similar methods are used in MPEG2, MPEG4, etc). At analysis stage plugin divides frames by small blocks and try to find for every block in current frame the most similar (matching) block in second frame (previous or next). The relative shift of these blocks is motion vector. The main measure of block similarity is sum of absolute differences (SAD) of all pixels of these two blocks compared. SAD is a value which says how good the motion estimation was.&lt;br /&gt;
&lt;br /&gt;
The output of MAnalyse (server) is special clip with motion vector information in some format.&lt;br /&gt;
&lt;br /&gt;
At compensation stage the plugin client functions read the motion vectors and use them to move blocks and form motion compensated frame (or realize some other full or partial motion compensation or interpolation function). Every object (block) in this (fully) compensated frame is placed in the same position as this object in current frame. So, we may (for example) use strong temporal denoising even for quite fast moving objects without producing annoying artifacts and ghosting (object's features and edges are coincide if compensation is perfect). Plugin can create compensated neighbor frames for every current frame, and denoise it by internal function. Alternatively, you can use compensated and original frames to create interleaved clip, denoise it by any external temporal filter, and select central cleaned original frames for output (see examples).&lt;br /&gt;
&lt;br /&gt;
Of course, the motion estimation and compensation is not ideal and precise. In some complex cases (video with fading, ultra-fast motion, or periodic structures) the motion estimation may be completely wrong, and compensated frame will be blocky and (or) ugly. Severe difficulty is also due to objects mutual screening (occlusion) or reverse opening. Complex Avisynth scripts with many motion compensation functions may eat huge amount of memory and result in very slow processing. It is not simple but quite advanced plugin. Use it for appropriate cases only, and try to tune its parameters. There are many discussions about motion compensation using at doom9 Avisynth forum. In particular see [https://forum.doom9.org/showthread.php?t=76041 old MVTools thread], [https://forum.doom9.org/showthread.php?t=102071 true motion thread], [https://forum.doom9.org/showthread.php?t=84770 new MVTools thread] and some other. Try to read the postings in addition to this documentation and ask for support there. If you really interested in motion estimation and compensation topics, you can easy find numerous scientific publications (use WWW search).&lt;br /&gt;
&lt;br /&gt;
Notes 1: Try to use a smart deinterlacer for interlaced video (SeparateFields may works too with or without SelectEven/SelectOdd). Some complex scripts (MVBOB, MCBOB, TempGaussMC) use MVTools for motion compensated deinterlacing.&lt;br /&gt;
Alternatively you can try to use Motion plugin by mg262.&lt;br /&gt;
&lt;br /&gt;
Notes 2:  Stacked 16 bit output for MDegrain1-6 and MDegrainN are also supported in general.&lt;br /&gt;
Native 10-16 bit colorspaces (and 32 bit float in MDegrain) are available when using MVTools with AviSynth+ r2294-.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Latest documentation:&amp;lt;/span&amp;gt; https://htmlpreview.github.io/?https://github.com/pinterf/mvtools/blob/mvtools-pfmod/Documentation/mvtools2.html'''&lt;br /&gt;
&lt;br /&gt;
== Common parameters ==&lt;br /&gt;
Filters that use motion vectors have common parameters. Those are the scene-change detection thresholds, and the isse MMX flag. They also use one or several vectors stream, which are produced by MAnalyse.&lt;br /&gt;
&lt;br /&gt;
*{{Template:FuncDef2|thSCD1}} (int, 400): threshold which decides whether a block has changed between the previous frame and the current one. When a block has changed, it means that motion estimation for it isn't relevant. It occurs for example at scene changes. So it is one of the thresholds used to tweak the scene changes detection engine. Raising it will lower the number of blocks detected as changed. It may be useful for noisy or flickered video. The threshold is compared to the SAD (Sum of Absolute Differences, a value which says how bad the motion estimation was ) value. For exactly identical blocks we have SAD=0. But real blocks are always different because of objects complex movement (zoom, rotation, deformation), discrete pixels sampling, and noise. Suppose we have two compared 8x8 blocks with every pixel different by 5. It this case SAD will be 8x8x5 = 320 (block will not detected as changed for thSCD1=400). If you use 4x4 blocks, SAD will be 320/4. If you use 16x16 blocks, SAD will be 320*4. Really this parameter is scaled internally in MVTools, and you must always use reduced to block size 8x8 value. Default is 400 (since v.1.4.1).&lt;br /&gt;
&lt;br /&gt;
*{{Template:FuncDef2|thSCD2}} (int, 130): Threshold which sets how many blocks have to change for the frame to be considered as a scene change. It is ranged from 0 to 255, 0 meaning 0 %, 255 meaning 100 %. Default is 130 (which means 51 %).&lt;br /&gt;
&lt;br /&gt;
*{{Template:FuncDef2|isse}} (bool, true): Flag which allows to enable (if set to true) or disable ISSE, MMX and other CPU optimizations (for debugging). If your processor doesn't support CPU optimizations, it will be disabled anyway (and you won't be able to activate them).&lt;br /&gt;
 &lt;br /&gt;
*{{Template:FuncDef2|planar}} (bool, false): Legacy flag to use a hack planar color format for YUY2 clips, both for input and output of functions. It uses a hack to store frames with planar data (separate Y, U, V planes in memory) in normal interleaved YUY2 frames format as a container. This way we can avoid numerous internal interleaved to planar conversions and increase speed. You can convert a normal interleaved YUY2 source clip to planar with Interleaved2planar from SSETools and convert back with Planar2interleaved. This special planar YUY2 format is also supported by Removegrain, MaskTools2 and some others. This trick is not needed in Avisynth 2.6 with native support of planar YV16 format. This parameter is ignored for YV12 clips. Note: super clip is always planar. &lt;br /&gt;
&lt;br /&gt;
*{{Template:FuncDef2|mt}} (bool, true): When true, enables internal multi-threading via AVSTP. Only available in some functions, like [[MVTools2/MSuper]] and [[MVTools2/MSuper]].&amp;lt;br&amp;gt;'''Might''' be better to disable when using AVS+ 3.6 and leting the frameserver do its thing ([http://publishwith.me/ep/pad/view/ro.rDkwcdWn4k9/latest MTmodes.avsi], if loaded, sets the number of AVSTP threads to 1, which should give the same result as mt=false)&lt;br /&gt;
&lt;br /&gt;
== Filters ==&lt;br /&gt;
{{PluginFilterTable}}&lt;br /&gt;
|-&lt;br /&gt;
{{PluginFilterRow|MVTools2|MSuper|&lt;br /&gt;
Get source clip and prepare special &amp;quot;super&amp;quot; clip with multilevel (hierarchical scaled) frames data.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-32 bits 4:2:0, 4:2:2, 4:4:4, Planar RGB&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MAnalyse|&lt;br /&gt;
Get prepared multilevel super clip, estimate motion by block-matching method and produce special output clip with motion vectors data (used by other functions).&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
{{PluginFilterRow|MVTools2|MCompensate|&lt;br /&gt;
Do a full motion compensation of the frame.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-32 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MMask|&lt;br /&gt;
Creates mask clip from source clip with motion vectors data.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MSCDetection|&lt;br /&gt;
Creates scene detection mask clip from motion vectors data.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MShow|&lt;br /&gt;
Shows the motion vectors on padded source by super clip opening.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
{{PluginFilterRow|MVTools2|MDepan|&lt;br /&gt;
Get the motion vectors, estimate global motion and put data to output frame in special format for [[DePan]] plugin.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
{{PluginFilterRow|MVTools2|MFlow|&lt;br /&gt;
Do a motion compensation of the frame not by blocks (like MCompensate), but by pixels.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MFlowInter|&lt;br /&gt;
Motion interpolation function. It is not the same (but similar) as MVInterpolate function of older MVTools version.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MFlowFps|&lt;br /&gt;
Will change the frame rate (fps) of the clip. The function can be used for frame rate conversion, slow-motion effect, etc.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MBlockFps|&lt;br /&gt;
The function uses block-based partial motion compensation to change the framerate (fps) of the clip (and number of frames).&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
|-&lt;br /&gt;
{{PluginFilterRow|MVTools2|MFlowBlur|&lt;br /&gt;
Experimental simple motion blur function. It may be used for FILM-effect (to simulate finite shutter time).&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MDegrain''X''|&lt;br /&gt;
Temporal denoising with motion compensation. MDeGrain''X'' has a temporal radius of ''X'', up to 6.&amp;lt;br&amp;gt;&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-32 bits 4:2:0, 4:2:2, 4:4:4, planar RGB&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MDegrainN|&lt;br /&gt;
Temporal denoising with motion compensation. MDeGrainN has a temporal radius given by the tr parameter, and uses a special motion vector clip.&amp;lt;br&amp;gt;&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-32 bits 4:2:0, 4:2:2, 4:4:4, planar RGB&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MRecalculate|&lt;br /&gt;
Refines and recalculates motion data of previously estimated (by MAnalyse) motion vectors with different super clip or new parameters set (e.g. lesser block size), after divide, etc.&lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MScaleVect|&lt;br /&gt;
Rescales motion vectors / blocksize. Main purpose is to allows vectors to be used on a differently sized clip or on a clip having different bit depth than they were analyzed from. &lt;br /&gt;
| ?&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MStoreVect|&lt;br /&gt;
Stores (multiple) motion vectors in a encodable clip. Allows you to encode vectors to a file (must use a lossless format). Convenient for splitting up very slow scripts. Can also use to process the same footage in multiple ways. Use MRestoreVect to get the motion vectors back out of the clip. &lt;br /&gt;
| ?&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MRestoreVect|&lt;br /&gt;
Fetches a single motion vector clip from a special clip prepared earlier by MStoreVect. Call multiple times if there are several clips stored. The function returns a single motion vectors clip.&lt;br /&gt;
| ?&lt;br /&gt;
}}&lt;br /&gt;
{{PluginFilterRow|MVTools2|MShow|&lt;br /&gt;
Shows the motion vectors on padded source by super clip opening. &lt;br /&gt;
| [[YV12]], [[YUY2]],&amp;lt;br&amp;gt;any 8-16 bits 4:2:0, 4:2:2, 4:4:4&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note1: native 10-16 bits and 4:2:0 and 8-16 bits 4:2:2, 4:4:4 color spaces are supported in 2.7.x branch&lt;br /&gt;
Note2: native 10+ bits only work with Avisynth+&lt;br /&gt;
Note3: MDegrain supports 32 bit float input clips (Super and Input) but motion vectors should be calculated from 8-16 bits&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;border: 1px solid darkgray&amp;quot;&lt;br /&gt;
!Version&lt;br /&gt;
!Date&lt;br /&gt;
!Author&lt;br /&gt;
!Changes&lt;br /&gt;
|-&lt;br /&gt;
|2.7.31- 46&lt;br /&gt;
|20180409-20240503&lt;br /&gt;
|pinterf&lt;br /&gt;
|see documentation&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.30&lt;br /&gt;
|20180405&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: crash in MFlowInter (and possibly other MFlow...). v2.7.29 revealed this additional bug (which was not even 100% reproducible), this fix is basically the 2nd part of the solution.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.29&lt;br /&gt;
|20180403&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: MFlowInter (and possibly other MFlow...) crash with specific combination of analyze parameters (e.g. blkSize=16,overlapv=4,divide=1). Bug existed since at least 2.5.11.22&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.28&lt;br /&gt;
|20180323&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: in MDegrain1-6/N allow Y8 input for out16 parameter&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.27&lt;br /&gt;
|20180318&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: MDepan: use zerow parameter. The parameter had no effect probably since it had been introduced.&amp;lt;br&amp;gt;&lt;br /&gt;
MDepan: report MT mode for Avisynth+. MT_MULTI_INSTANCE, except for logfile writing output mode when it reports MT_SERIALIZED. (other filters already have proper registration, MDepan was missed)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.26&lt;br /&gt;
|20180314&lt;br /&gt;
|pinterf&lt;br /&gt;
|New: MDegrain1-6 and N: new parameter bool &amp;quot;out16&amp;quot; = false. If set, 8 bit input results in native 16bit output (like lsb=true hack but this is native, faster).&amp;lt;br&amp;gt;&lt;br /&gt;
Faster: special 10 bit SAD functions instead of the generic 10-16bit one.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.25&lt;br /&gt;
|20180227&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: x64: not-cleared mmx state in MSuper assembly code would cause crash later, e.g. in x264 encoding, depending on following filters.&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: MSCDetection SC value parameter name to Ysc from Yth (must be an ancient typo), docs are OK, but the fix is mentioned in docs&amp;lt;br&amp;gt;&lt;br /&gt;
MSuper: import 8 bit sse2 interpolators from mvtools-vs. Extend them for 10-16bits (faster super clip). Some filters are still todo.&amp;lt;br&amp;gt;&lt;br /&gt;
MSuper: support 32bit float clips, which can be used later by MDegrains (but not for MAnalyse)&amp;lt;br&amp;gt;&lt;br /&gt;
MDegrains: allow degraining clip with different bit depth from vectors. Clip and Super must be the same bit depth&amp;lt;br&amp;gt;&lt;br /&gt;
MDegrains: consistently use limit and limitC, 255 do nothing, otherwise scale 0-254 value to the current bit-depth range&amp;lt;br&amp;gt;&lt;br /&gt;
Overlaps: more correct internal rounding for 8 bits&amp;lt;br&amp;gt;&lt;br /&gt;
Overlaps: round for 16bits&amp;lt;br&amp;gt;&lt;br /&gt;
Overlaps: 32bit float (but still use the original 11 bit window constants)&amp;lt;br&amp;gt;&lt;br /&gt;
Project: change from yasm to nasm.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.24&lt;br /&gt;
|20171205&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: MFlowBlur: possible access violation crash when nPel&amp;gt;1&amp;lt;br&amp;gt;&lt;br /&gt;
New: MScaleVect parameter 'bits'. e.g. Analyze 8 bit clips, use their vectors for 16 bits&amp;lt;br&amp;gt;&lt;br /&gt;
Move project to VS2017&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.23&lt;br /&gt;
|20171012&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: MScaleVect wrong rounding of scaled motion vectors with negative components. e.g. proper scaling (-1;-2) to (-2;-4) instead of (-1,-3)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.22&lt;br /&gt;
|20170830&lt;br /&gt;
|pinterf&lt;br /&gt;
|Misc: Stop using version suffix .22&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [DCT 8x8@8bit] garbage on x64: internal assembly code did not save xmm6/xmm7&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [DCT 8x8@8bit] safe multithreading for integer DCT (8x8 block size, 8 bit video): assembly had a single working buffer.&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [MDegrain] did not release input motion vector clips in destructor, possible hang at script closing. Bug since 2.7.1.22 (introducing MDegrain4/5)&amp;lt;br&amp;gt;&lt;br /&gt;
Mod: fftw conversion constant of sqrt(2)/2 is more accurate (was:0.707), 16 bit formats may benefit (by feisty2)&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: SSE4 assembly instructions in x64, broke on non-SSE4 processors&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.21.22&lt;br /&gt;
|20170629&lt;br /&gt;
|pinterf&lt;br /&gt;
|Mod: [MMask] Faster: request source frame only for kind=5.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.20.22&lt;br /&gt;
|2017.05.26&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: [MMask] greyscale input resulted in AV when filter exiting&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.19.22&lt;br /&gt;
|2017.05.25&lt;br /&gt;
|pinterf&lt;br /&gt;
|New: [MMask] Support any planar input video formats e.g. greyscale, Planar RGB. Input clip can even be of different bit depth or format from vector's original format. For kind==5 where U and V is filled, the greyscale option is not allowed&amp;lt;br&amp;gt;&lt;br /&gt;
Mod: [MMask] Faster: request source frame only for kind=5.&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [MxxxxFPS,MMask]: MakeVectorOcclusionMaskTime garbage in bottom blocks&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [MMask] bottom padding garbage for padded frame dimension&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [MMask] proper 10+ bits scene change values (for default: 1023, 4095, 16383, 65535. Was: 65535). Parameter is still in 8-bit range&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [MRecalculate] prevent overflow during thSAD scaling in 16 bits or large block sizes (32, 48...)&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [DepanEstimate] Sometimes giving wrong motion instead of scene change detection. Bug only existed in previous pfmod builds.&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: [MAnalyze] Possible overflow in MAnalyze 8 bit, block size 48x48 and above. Overflow-safe predictor recalc for big block sizes.&amp;lt;br&amp;gt;&lt;br /&gt;
New: [General] Add block size 12x3 for SAD, allow 6x24&amp;lt;br&amp;gt;&lt;br /&gt;
List of available block sizes&amp;lt;br&amp;gt;&lt;br /&gt;
- 64x64, 64x48, 64x32, 64x16&amp;lt;br&amp;gt;&lt;br /&gt;
- 48x64, 48x48, 48x24, 48x12&amp;lt;br&amp;gt;&lt;br /&gt;
- 32x64, 32x32, 32x24, 32x16, 32x8&amp;lt;br&amp;gt;&lt;br /&gt;
- 24x48, 24x24, 24x32, 24x12, 24x6&amp;lt;br&amp;gt;&lt;br /&gt;
- 16x64, 16x32, 16x16, 16x12, 16x8, 16x4, 16x2&amp;lt;br&amp;gt;&lt;br /&gt;
- 12x48, 12x24, 12x16, 12x12, 12x6, 12x3&amp;lt;br&amp;gt;&lt;br /&gt;
- 8x32, 8x16, 8x8, 8x4, 8x2, 8x1&amp;lt;br&amp;gt;&lt;br /&gt;
- 6x24, 6x12, 6x6, 6x3&amp;lt;br&amp;gt;&lt;br /&gt;
- 4x8, 4x4, 4x2&amp;lt;br&amp;gt;&lt;br /&gt;
- 3x6, 3x3&amp;lt;br&amp;gt;&lt;br /&gt;
- 2x4, 2x2&amp;lt;br&amp;gt;&lt;br /&gt;
Mod: [Internal] Reorganized 10-16 bit SAD simd intrinsics, faster 8-12% for BlkSize 12-32&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.18.22&lt;br /&gt;
|2017.05.12&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: 10-16 bit: DCT buffer possible overflow&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: DCT is fast again for non 8x8 blocksizes. Regression since 2.7.5.22.&amp;lt;br&amp;gt;&lt;br /&gt;
New: Chroma SAD is now always half of luma SAD, regardless of video format. Without this: YV24's luma:chroma SAD ratio is 4:8 instead of 4:2 (of YV12)&amp;lt;br&amp;gt;&lt;br /&gt;
New: MAnalyze, MRecalculate new parameter: &amp;quot;scaleCSAD&amp;quot; integer, default 0.&amp;lt;br&amp;gt;&lt;br /&gt;
Fine tune chroma SAD weight relative to luma SAD.&amp;lt;br&amp;gt;&lt;br /&gt;
ScaleCSAD values for luma:chroma SAD ratio&amp;lt;br&amp;gt;&lt;br /&gt;
* -2: 4:0.5&amp;lt;br&amp;gt;&lt;br /&gt;
* -1: 4:1&amp;lt;br&amp;gt;&lt;br /&gt;
* 0: 4:2 (default, same as the native ratio for YV12)&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: 4:4&amp;lt;br&amp;gt;&lt;br /&gt;
* 2: 4:8&amp;lt;br&amp;gt;&lt;br /&gt;
New: Block sizes 64, 48, 24, 12, 6.&amp;lt;br&amp;gt;&lt;br /&gt;
MAnalyze/MRecalculate new block sizes (SATD support mod4 sizes)&amp;lt;br&amp;gt;&lt;br /&gt;
Note: some smaller block sizes can only be available in 4:4:4 formats, due to block size division (chroma subsampling)&amp;lt;br&amp;gt;&lt;br /&gt;
New: All block sizes are supported in MDegrain1-6, MDegrainN, and MScaleVect&amp;lt;br&amp;gt;&lt;br /&gt;
New: Changed to 2017 version of asm files for 8 bit SAD/SATD functions from x265 project. Added not implemented asm code for 12, 24, 48 sizes&amp;lt;br&amp;gt;&lt;br /&gt;
For some block sizes AVX2 and SSE4 is supported (AVX2 if reported under AviSynth+) e.g. BlkSize 32 is faster now.&amp;lt;br&amp;gt;&lt;br /&gt;
New: MMask SAD Mask to give identical weights for other-than-YV12 formats, e.g. for YV24&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.17.22&lt;br /&gt;
|2017.04.26&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: Regression in 2.7.16.22: MDegrain right pixel artifacts on non-modulo 16 widths&amp;lt;br&amp;gt;&lt;br /&gt;
Misc: MMask, mode SADMask output is normalized further by video subsampling (YV16/YV24 has larger SAD value due to bigger chroma part that classic YV12)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.16.22&lt;br /&gt;
|2017.04.23&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: MMask 10-16 bits&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: MRecalculate 14-16 bits passed nSCD1=999999 internally which caused overflow (scene change problems later)&amp;lt;br&amp;gt;&lt;br /&gt;
Fix is done by clamping SCD1 to 8*8*(255-0) (maximum value of sum of SADs on a 8x8 block)&amp;lt;br&amp;gt;&lt;br /&gt;
Misc: MDegrainX 8 bits: internal 16 bit buffer to 8 bits: SSE2&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: MFlow access violation in internal mv resizer when resizing factor was big (MCaWarpSharp3 4x supersampling case) (bug possibly introduced in upstream 2.5.11.22)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.15.22&lt;br /&gt;
|2017.03.16&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: 16 bit SAD for non-AVX code path&amp;lt;br&amp;gt;&lt;br /&gt;
Misc: MDegrain1-6: add error on lsb_flag=true for non-8 bit sources&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.14.22&lt;br /&gt;
|2017.02.06&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: MAnalyze divide=2 showed &amp;quot;vector clip is too small&amp;quot; (inherited from 2.6.0.5, sanity check was done but length was not filled for divideextra data)&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: MFlow access violation in internal mv resizer when resizing factor was big (MCaWarpSharp3 4x supersampling case) (bug possibly introduced in upstream 2.5.11.22)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.13.22&lt;br /&gt;
|2017.02.01&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: MDegrain1-6,N 10-16 bit thSCD scaling&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: MVShow: tolerance scaling for 10-16 bits&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.12.22&lt;br /&gt;
|2017.01.20&lt;br /&gt;
|pinterf&lt;br /&gt;
|New: Faster SATD (dct=5..10) 8 bit: updated x264 function selectors, SSE2/4/AVX/AVX2; +10% speed for a whole typical MDegrain3 process on i7-3770&amp;lt;br&amp;gt;&lt;br /&gt;
New: Much Faster SATD (dct=5..10) 10-16 bit: SSE2/SSE4 instead of C +50% speed for a whole typical MDegrain3 process (which is approx half speed of 8 bit)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.11.22&lt;br /&gt;
|2017.01.16&lt;br /&gt;
|pinterf&lt;br /&gt;
|New: MDegrain6&amp;lt;br&amp;gt;&lt;br /&gt;
Mod: MDegrain1-6 SSE4 for 10-16 bit (was: C. 3-5% gain, wasn't bottleneck)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.10.22&lt;br /&gt;
|2016.12.28&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: for YV12 the debug info text chroma part was positioned at wrong place&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.9.22&lt;br /&gt;
|2016.12.20&lt;br /&gt;
|pinterf&lt;br /&gt;
|Apply 2.5.11.9-svp analysis speedup, mainly when chroma is involved&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.8.22&lt;br /&gt;
|2016.12.18&lt;br /&gt;
|pinterf&lt;br /&gt;
|Fix: YUY2 input access violation (regression after 2.7.0.22d) - Fixed also in Depan.dll&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: MDegrain: free up YUY2 planes only if not planar input (bug inherited from 2.5.11.22 MDegrain3) resulting in freeze at script exit&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.7.22&lt;br /&gt;
|2016.12.14&lt;br /&gt;
|pinterf&lt;br /&gt;
|Optimizing 8 bits&amp;lt;br&amp;gt;&lt;br /&gt;
speed: change some 8 bit SAD functions for the better&amp;lt;br&amp;gt;&lt;br /&gt;
speed: separating bottleneck 8 bit/16 bit code paths in order not to use slower int64 calculations for 8 bit, where there are no integer overflow problems&amp;lt;br&amp;gt;&lt;br /&gt;
speed: more __forceinlines for helping the compiler&amp;lt;br&amp;gt;&lt;br /&gt;
info:  general speed gain of 5-15% compared to 2.7.6.22, much reduced speed gap compared to the &amp;quot;classic&amp;quot; YV12 8 bit mvtools2 versions&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.6.22&lt;br /&gt;
|2016.12.04&lt;br /&gt;
|pinterf&lt;br /&gt;
|fix: sumLumaChange underflow (used for dct=2,6,9) (regression during 16 bit support)&amp;lt;br&amp;gt;&lt;br /&gt;
fix: MeanLumaChange scale for 10-16 bits (used for dct=2,6,9)&amp;lt;br&amp;gt;&lt;br /&gt;
fix: Mask fix: 8 bit mask resizer bug in SIMD intrinsics (regression on inline asm -&amp;gt; SIMD transition)&amp;lt;br&amp;gt;&lt;br /&gt;
Fix: dctmode=1,2: pixel distance was not corrected for 16 bit pixel sizes&amp;lt;br&amp;gt;&lt;br /&gt;
speed: Let's help VS2015 with some __forceinline directives to recognize the truth.&amp;lt;br&amp;gt;&lt;br /&gt;
speed: Misc optimizations throughout the code (bit shifts instead of div or mul)&amp;lt;br&amp;gt;&lt;br /&gt;
speed: FFTW DCT: C code replaced with SIMD SSE2/SSE4 (FloatToBytes, BytesToFloat)&amp;lt;br&amp;gt;&lt;br /&gt;
speed: 16 bit SAD: a few optimizations in SSE2, AVX-coded SSE2 and AVX2 codepath&amp;lt;br&amp;gt;&lt;br /&gt;
VS2015 compiler: /MT -&amp;gt; /MD (from static to dynamic dlls - now it reallys need VS2015 redistributables)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.5.22&lt;br /&gt;
|2016.11.19&lt;br /&gt;
|pinterf&lt;br /&gt;
|Milestone release:&lt;br /&gt;
General support of 10-16 bit formats with Avisynth Plus (r2294 or newer recommended) with new MDegrain4 and MDegrain5 filters.&amp;lt;br&amp;gt;&lt;br /&gt;
Fix for MSCDetection: scene change filler pixel default value was always 0 (2.7.1.22 regression)&amp;lt;br&amp;gt;&lt;br /&gt;
MCompensate: possible bugfix bottom padding UV&amp;lt;br&amp;gt;&lt;br /&gt;
Fix SAD for 10-16 bit depths for horizontal block sizes &amp;gt;= 16&amp;lt;br&amp;gt;&lt;br /&gt;
Fix nSCD2 (Scene change threshold block count %) (2.7.1.22 regression)&amp;lt;br&amp;gt;&lt;br /&gt;
MBlockFPS: overlap fixes (right columns and bottom lines)&amp;lt;br&amp;gt;&lt;br /&gt;
MBlockFPS: overlap fix: missing copy buffer to output&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.1.22&lt;br /&gt;
|2016.10.20&lt;br /&gt;
|pinterf&lt;br /&gt;
|YV16 and YV24 avaliable&amp;lt;br&amp;gt;&lt;br /&gt;
dct modes &amp;gt;= 5 now use SATD again (so far it was in dead code, contrary to 2.5.13.1 remarks)&amp;lt;br&amp;gt;&lt;br /&gt;
New: MDegrain4, MDegrain5&amp;lt;br&amp;gt;&lt;br /&gt;
Experimental native 10-16 bit support (MSuper, MAnalyze, MDegrain1-5, MDegrainN) including 16 bit SATD (slow C) and SSE2 optimized regular SAD for 8+ (for 10+ bits you need at least Avisynth+ r2290)&amp;lt;br&amp;gt; &lt;br /&gt;
Inline assembly rewritten to intrinsics -&amp;gt; 64 bit build is possible in VS2015 (External assembly untouched)&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.0.22&lt;br /&gt;
|2016.04.29&lt;br /&gt;
|pinterf&lt;br /&gt;
|Integrate Fizick's upstream changes of 2.5.11.22&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2.7.0.1&lt;br /&gt;
|2016.03.31&lt;br /&gt;
|pinterf&lt;br /&gt;
|MVTools-pfmod&amp;lt;br&amp;gt;&lt;br /&gt;
2.6.0.5 x64 capable version ported under AviSynth 2.6 API&amp;lt;br&amp;gt;&lt;br /&gt;
Fixed access violation in MDepan&amp;lt;br&amp;gt;&lt;br /&gt;
Fixed access violation in x64 asm code&amp;lt;br&amp;gt;&lt;br /&gt;
Built with Visual Studio 2015 Community Edition, v140_xp toolset&amp;lt;br&amp;gt;&lt;br /&gt;
Compiler: Intel C++ 16 (because of inline 64 bit asm code)&amp;lt;br&amp;gt;&lt;br /&gt;
See [https://forum.doom9.org/showthread.php?t=173356 discussion] and [https://github.com/pinterf/mvtools/tree/mvtools-pfmod GitHub page] for more information.&amp;lt;br/&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
|2.6.0.5&lt;br /&gt;
|2012.07.17&lt;br /&gt;
|Firesledge&lt;br /&gt;
|MCompensate, MDegrainN: fixed a bug causing occasionally horizontal magenta stripes in multithreading mode.&lt;br /&gt;
|-&lt;br /&gt;
|2.6.0.4&lt;br /&gt;
|2012.06.14&lt;br /&gt;
|Firesledge&lt;br /&gt;
|MCompensate: fixed artifacts related to overlap with tr &amp;gt; 3 in multithreading mode.&lt;br /&gt;
|-&lt;br /&gt;
|2.6.0.3&lt;br /&gt;
|2012.05.13&lt;br /&gt;
|Firesledge&lt;br /&gt;
|MDegrainN: fixed artifacts related to overlap with tr &amp;gt; 3 in multithreading mode.&lt;br /&gt;
|-&lt;br /&gt;
|2.6.0.2&lt;br /&gt;
|2012.05.01&lt;br /&gt;
|Firesledge&lt;br /&gt;
|MAnalyse: fixed a threading issue when using FFTW.&lt;br /&gt;
|-&lt;br /&gt;
|2.6.0.1&lt;br /&gt;
|2012.03.12&lt;br /&gt;
|Firesledge&lt;br /&gt;
|&lt;br /&gt;
MAnalyse: fixed potential crash in multithreading mode.&amp;lt;br/&amp;gt;&lt;br /&gt;
MDegrainN: fixed systematic crash in multithreading mode.&amp;lt;br/&amp;gt;&lt;br /&gt;
All MDegrain functions: fixed potential crash when thSAD is set to 0.&lt;br /&gt;
|-&lt;br /&gt;
|2.6.0.0&lt;br /&gt;
|2012.03.11&lt;br /&gt;
|Firesledge&lt;br /&gt;
|&lt;br /&gt;
MDegrainN: internally uses MDegrain1/2/3 when tr ≤ 3, for optimal speed.&amp;lt;br/&amp;gt;&lt;br /&gt;
MCompensate: added multi-compensation mode for easy use with temporal filters.&amp;lt;br/&amp;gt;&lt;br /&gt;
MAnalyse, MSuper, MCompensate, MDegrainN: added multithreading (but partially, not for all code paths) using AVSTP.&amp;lt;br/&amp;gt;&lt;br /&gt;
MAnalyse: fixed a corruption of the global motion vector.&amp;lt;br/&amp;gt;&lt;br /&gt;
Improved page setting for this documentation.&lt;br /&gt;
|-&lt;br /&gt;
|2.5.14.2&lt;br /&gt;
|2012.01.10&lt;br /&gt;
|Firesledge&lt;br /&gt;
|Fixed MScaleVect with multi-vector clips.&lt;br /&gt;
|-&lt;br /&gt;
|2.5.14.1&lt;br /&gt;
|2011.12.13&lt;br /&gt;
|Firesledge&lt;br /&gt;
|Fixed crashes in the MDegrain functions when using both planar=true and lsb=true.&lt;br /&gt;
|-&lt;br /&gt;
|2.5.14.0&lt;br /&gt;
|2011.11.28&lt;br /&gt;
|Firesledge and Vit&lt;br /&gt;
|Added MStoreVect, MRestoreVect and MScaleVect from the Vit's [https://forum.doom9.org/showthread.php?t=84770&amp;amp;page=76#post1538821 MVExtras plugin].&lt;br /&gt;
|-&lt;br /&gt;
|2.5.13.1&lt;br /&gt;
|2011.11.09&lt;br /&gt;
|Firesledge&lt;br /&gt;
|&lt;br /&gt;
MAnalyse, MRecalculate: added an SATD approximation for blksize &amp;gt; 16 and dct ≥ 5. Previously, the SATD calculation was silently bypassed and always returned a null SAD value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Functions now check that the pel setting is the same in the superclip and the motion vectors, instead of crashing if not.&lt;br /&gt;
|-&lt;br /&gt;
|2.5.13.0 beta&lt;br /&gt;
|2011.09.11&lt;br /&gt;
|Firesledge&lt;br /&gt;
|&lt;br /&gt;
MRecalculate: Can now process multi-vector clips.&amp;lt;br/&amp;gt;&lt;br /&gt;
All functions: Added the -Vit-'s fix that could improve the multithreading stability.&lt;br /&gt;
|-&lt;br /&gt;
|2.5.12.1 beta&lt;br /&gt;
|2011.09.10&lt;br /&gt;
|Firesledge&lt;br /&gt;
|MAnalyse: Fixed the ghosting bug introduced in the previous version.&lt;br /&gt;
|-&lt;br /&gt;
|2.5.12.0 beta&lt;br /&gt;
|2011.09.10&lt;br /&gt;
|Firesledge&lt;br /&gt;
|&lt;br /&gt;
MDegrainN added.&amp;lt;br/&amp;gt;&lt;br /&gt;
MAnalyse: Added the &amp;quot;multi&amp;quot; mode for MDegrainN.&amp;lt;br/&amp;gt;&lt;br /&gt;
MAnalyse: Documented the negative delta values and fixed some functions accordingly.&amp;lt;br/&amp;gt;&lt;br /&gt;
MFlowInter: Fixed the YUY2 planar mode.&lt;br /&gt;
|-&lt;br /&gt;
|2.5.11.2 beta mod16b&lt;br /&gt;
|2011.05.11&lt;br /&gt;
|Firesledge&lt;br /&gt;
|Fixed a regression in MDegrain1/2/3, related to the mod16 versions. thSADC is now taken into account correctly (instead of using thSAD).&lt;br /&gt;
|-&lt;br /&gt;
|2.5.11.2 beta mod16a&lt;br /&gt;
|2011.04.10&lt;br /&gt;
|Firesledge&lt;br /&gt;
|Merged 2.5.11.2 and 2.5.11 mod16a versions.&lt;br /&gt;
|}&lt;br /&gt;
[http://www.avisynth.nl/users/fizick/mvtools/mvtools2.html#revisions Changelog up to v2.5.11.22]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;500px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v2.6.0.5 (x64)&lt;br /&gt;
|[http://www.dropbox.com/s/swk97z4q834vugk/mvtools_2.6.0.5_x64.zip?dl=1 mvtools_2.6.0.5_x64.zip]&lt;br /&gt;
|[https://web.archive.org/web/20200608154645if_/https://files.videohelp.com/u/223002/mvtools_2.6.0.5_x64.zip mvtools_2.6.0.5_x64.zip]&lt;br /&gt;
|-&lt;br /&gt;
!v2.6.0.5&lt;br /&gt;
|[http://ldesoras.free.fr/src/avs/mvtools-2.6.0.5.zip mvtools-2.6.0.5.zip]&lt;br /&gt;
|[https://web.archive.org/web/20160604063048if_/http://ldesoras.free.fr/src/avs/mvtools-2.6.0.5.zip mvtools-2.6.0.5.zip]&lt;br /&gt;
|-&lt;br /&gt;
!v2.5.11.22&lt;br /&gt;
|[http://www.avisynth.nl/users/fizick/mvtools/mvtools-v2.5.11.22.zip mvtools-v2.5.11.22.zip]&lt;br /&gt;
|[https://web.archive.org/web/20170716135124if_/http://www.avisynth.nl/users/fizick/mvtools/mvtools-v2.5.11.22.zip mvtools-v2.5.11.22.zip]&lt;br /&gt;
|}&lt;br /&gt;
* Note: MVTools v2.6.0.5 (x64) was compiled with Intel Parallel Studio XE 2015 Composer Edition for C++.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==External Links ==&lt;br /&gt;
*[https://forum.doom9.org/showthread.php?t=84770 Doom9 Forum] - MVTools discussion.&lt;br /&gt;
*[http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&amp;amp;t=1918 NMM-HD Forum] - MVTools documentation in Chinese.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/SetFilterMTMode</id>
		<title>SetFilterMTMode</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/SetFilterMTMode"/>
				<updated>2024-01-16T14:54:26Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: Add avs+ readthedocs link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div {{BlueBox2|40|0|3px solid purple}} &amp;gt;&lt;br /&gt;
{{AvsPlusFullname}}&amp;lt;br&amp;gt;&lt;br /&gt;
Up-to-date documentation on multithreading: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/syntax/syntax_internal_functions_multithreading_new.html https://avisynthplus.readthedocs.io]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
By default, AviSynth+ is single-threaded. This page documents how to enable multi-threading.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Syntax and Parameters ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
==== SetFilterMTMode ====&lt;br /&gt;
:{{FuncDef|SetFilterMTMode (string filter, int mode,  bool &amp;quot;force&amp;quot;)}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::{{Par2||string|}}&lt;br /&gt;
:::&amp;lt;code&amp;gt;filter&amp;lt;/code&amp;gt;: name of the filter you want to set an MT Mode for. You cannot set the MT mode on script function calls, only on binary filters.&lt;br /&gt;
:::&amp;lt;code&amp;gt;&amp;quot;DEFAULT_MT_MODE&amp;quot;&amp;lt;/code&amp;gt;, sets the default MT mode for all filters that do not have an MT mode explicitly set. Does not affect for source filters and filters that self-register their own MT mode.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2||int|}}&lt;br /&gt;
:::Sets MT Mode, there are three basic MT modes (1,2,3) and an experimental workaround mode (4). Instead of the numbers, you can also use symbolic names for MT modes: &lt;br /&gt;
:::*1 : MT_NICE_FILTER&lt;br /&gt;
:::*2 : MT_MULTI_INSTANCE&lt;br /&gt;
:::*3 : MT_SERIALIZED&lt;br /&gt;
:::*4 : MT_SPECIAL_MT&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|force|bool|false}}&lt;br /&gt;
:::Force MT mode. Default is false&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Prefetch ====&lt;br /&gt;
:{{FuncDef|Prefetch (clip, int “threads”, int “frames”)}}&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|threads|int|}}&lt;br /&gt;
:::Number of threads to use. If it is 0, it passes without doing anything.&lt;br /&gt;
:::default: (number of logical cores in the system) +1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|frames|int|}}&lt;br /&gt;
:::Number of frames to prefetch. Again, if it is 0, it passes without doing anything.&lt;br /&gt;
:::default: threads * 2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the original Avisynth+ (before v3.6), you could only use one Prefetch, but started from Neo fork you can use as many as you like.&lt;br /&gt;
Also, a &amp;quot;frames&amp;quot; argument has been added to specify the number of frames to prefetch.&lt;br /&gt;
Neo's multithreading enhancements were backported to classic Avisynth+ and are available since v3.6&lt;br /&gt;
&lt;br /&gt;
'''Example: Pipeline parallelization'''&lt;br /&gt;
&lt;br /&gt;
  Filtering A&lt;br /&gt;
  Prefetch(1,4)&lt;br /&gt;
  Filtering B&lt;br /&gt;
  Prefetch(1,4)&lt;br /&gt;
  Filtering C&lt;br /&gt;
  Prefetch(1,4)&lt;br /&gt;
&lt;br /&gt;
Prefetch (1,4) makes one thread stand and read four frames ahead.&lt;br /&gt;
In the above example, the filtering processes A, B, and C are executed in parallel in a pipeline.&lt;br /&gt;
Since the number of threads of each Prefetch is arbitrary, for example, filter processing B is heavy, &lt;br /&gt;
so if you want to increase the number of parallels by that amount, you can increase the number of threads as follows:&lt;br /&gt;
&lt;br /&gt;
  Filtering A&lt;br /&gt;
  Prefetch(1,4)&lt;br /&gt;
  Filtering B&lt;br /&gt;
  Prefetch(4)&lt;br /&gt;
  Filtering C&lt;br /&gt;
  Prefetch(1,4)&lt;br /&gt;
&lt;br /&gt;
==== OnCPU ====&lt;br /&gt;
OnCPU/OnCUDA (collectively called OnDevice)&lt;br /&gt;
&lt;br /&gt;
Since 3.6 AvisynthNeo features were backported to Avisynth+.&lt;br /&gt;
Such as supporting &amp;quot;devices&amp;quot;, like CPU and CUDA (CUDA support needs special build, still experimental after v3.7).&lt;br /&gt;
And the data transfer between them.&lt;br /&gt;
&lt;br /&gt;
If all are valid, the chain will be as follows.&lt;br /&gt;
&lt;br /&gt;
Upstream → Upstream cache → Thread → Transfer → Downstream cache → Downstream&lt;br /&gt;
→ is the flow of frame data (reverse of GetFrame call direction)&lt;br /&gt;
&lt;br /&gt;
Number of prefetch frames&lt;br /&gt;
&lt;br /&gt;
* 0: Synchronous call without all cache&lt;br /&gt;
* 1: Synchronous call, but only transfer is read ahead and executed asynchronously. Downstream cache is enabled.&lt;br /&gt;
* 2 or more: Pre-read upstream processing using threads. Both upstream and downstream caches are valid.&lt;br /&gt;
&lt;br /&gt;
The number of upstream threads is fixed at 1 thread when prefetch = 2 or more, and the number of prefetches is fixed at 2. &lt;br /&gt;
The downstream look-ahead number is set to the specified prefetch sheet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:{{FuncDef|OnCPU(clip, int “num_prefetch”)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2||clip|}}&lt;br /&gt;
::This clip is processed by the CPU. In other words, the processing before this is processed by the CPU.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|num_prefetch|int|}}&lt;br /&gt;
:::Here you specify the number of frames to prefetch. About 2 will give you enough performance. Unlike Prefetch, it has only one thread because it is a prefetch for parallelizing processing on the GPU and CPU. &lt;br /&gt;
:::default: 0&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If 0 is specified, it will be a synchronous call without using threads.&lt;br /&gt;
&lt;br /&gt;
==== OnCUDA ====&lt;br /&gt;
:{{FuncDef|OnCUDA(clip, int “num_prefetch”, int “device_index”)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2||clip|}}&lt;br /&gt;
::This clip is processed by CUDA. In other words, the processing before this is processed by CUDA. A filter that does not support CUDA processing will result in an error. Currently, internal filters are rarely supported, so you can only use external filters that are specially made.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|num_prefetch|int|}}&lt;br /&gt;
:::Same as OnCPU prefetch. Here you specify the number of frames to prefetch. About 2 will give you enough performance. Unlike Prefetch, it has only one thread because it is a prefetch for parallelizing processing on the GPU and CPU. &lt;br /&gt;
:::default: 0&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|device_index|int|}}&lt;br /&gt;
:::Specifies the GPU to run. If you have only one GPU, you can only use 0. If you have two GPUs, you can specify 0 or 1. There is no limit on the number. &lt;br /&gt;
:::default: 0&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course, valid only on Avisynth+ built with CUDA option and works if the system has proper device and driver combination.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot;&amp;gt;&lt;br /&gt;
*Source: [http://forum.doom9.org/showthread.php?p=1666371#post1666371 Doom9 Forum]&amp;lt;br&amp;gt;&lt;br /&gt;
So, how to use MT in AviSynth+?&amp;lt;br&amp;gt;&lt;br /&gt;
By default, your script will run in single-threaded mode, just like with SEt's build. Also, just like in SEt's build, you'll have to make sure that filters use the correct MT mode, or else they might wreak havoc. There are three basic MT modes (1,2,3) and an experimental workaround mode (4) since r2440, and modes 1-3 are the same modes as in (yeah you guessed correctly) SEt's build. Which means you can use the same modes that you have used with AviSynth-MT. &lt;br /&gt;
There are some things though that are different and/or new in AviSynth+. The first difference is *how* you set the MT mode. In AviSynth-MT, you had to use SetMTMode(X), which caused all filters following that line to use mode X (until the next call to SetMTMode()). This meant if you needed to use multiple MT modes, you had to insert all those calls in the middle of your script, littered over many places. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
=== Setting MT Modes ===&lt;br /&gt;
AviSynth+ does it differently. In AviSynth+, you specify the MT-mode for only specific filters, and those filters will then automatically use their own mode, even if there were other MT-modes in between. This means you can specify all the MT modes at the beginning without polluting your script. You can even make a SetMTMode.avsi if you wish and let it autoload for all of your scripts, or import() it from their top. This is much cleaner, and it allows you to maintain all your MT-modes centrally at a single place. To make this distinction clear from AviSynth+, SetMTMode() is called SetFilterMTMode() in AviSynth+. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
=== Enabling MT ===&lt;br /&gt;
The other difference is how you actually enable multithreading. Calling SetFilterMTMode() is not enough, it sets the MT mode, but the MT mode only has an effect if MT is enabled at all. Note this means you can safely include/import/autoload your SetFilterMTMode() calls in even single-threaded scripts, and they will not be messed up. Uhm, onto the point: You enable MT by placing a single call to Prefetch(X) at the '''end''' of your script, where X is the number of threads to use. If there is a return statement in your script it must be placed '''after''' Prefetch().&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:76em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This line causes all filters that don't have an MT mode explicitly use mode 2 by default.&lt;br /&gt;
# Mode 2 is a relatively safe choice until you don't know most of your calls to be either mode 1 or 3.&lt;br /&gt;
# Compared with mode 1, mode 2 trades memory for MT-safety, but only a select few filters will work with mode 1.&lt;br /&gt;
SetFilterMTMode(&amp;quot;DEFAULT_MT_MODE&amp;quot;, 2)&lt;br /&gt;
or&lt;br /&gt;
SetFilterMTMode(&amp;quot;DEFAULT_MT_MODE&amp;quot;, MT_MULTI_INSTANCE)&lt;br /&gt;
&lt;br /&gt;
# FFVideoSource(), like most of all source filters, needs MT mode 3. &lt;br /&gt;
# Note: starting  with AviSynth+ r2069, it will now automatically recognize source filters.&lt;br /&gt;
# If it sees a source filter which has no MT-mode specified at all, it will automatically use &lt;br /&gt;
# mode 3 instead of the default MT mode.&lt;br /&gt;
SetFilterMTMode(&amp;quot;FFVideoSource&amp;quot;, 3)&lt;br /&gt;
or &lt;br /&gt;
SetFilterMTMode(&amp;quot;FFVideoSource&amp;quot;, MT_SERIALIZED)&lt;br /&gt;
&lt;br /&gt;
# Now comes your script as usual&lt;br /&gt;
FFVideoSource(...)&lt;br /&gt;
Trim(...)&lt;br /&gt;
QTGMC(...)&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
# Enable MT!&lt;br /&gt;
Prefetch(4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
=== Help filling MT modes ===&lt;br /&gt;
The following script contains MT modes for various plugins, save it as &amp;lt;tt&amp;gt;mtmodes.avsi&amp;lt;/tt&amp;gt; and place in your auto-load folder. The script is a work-in-progess, there's still lots of plugins that need to be tested and validated. When the script is finalized, the only thing the user will have to write in his script is the &amp;lt;code&amp;gt;Prefetch&amp;lt;/code&amp;gt; call, all &amp;lt;code&amp;gt;SetFilterMtMode&amp;lt;/code&amp;gt; calls will be hidden in a single &amp;lt;tt&amp;gt;.avsi&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
*You can find the latest revision here: [http://publishwith.me/ep/pad/view/ro.rDkwcdWn4k9/latest AviSynth+ MT modes], if you like to contribute please do so [http://publishwith.me/ooiV92hupl here]. Report any issues [https://forum.doom9.org/showthread.php?t=181351 here].&lt;br /&gt;
&lt;br /&gt;
Note for filter writers: filters can report their mt modes in their SetCacheHint, in this case the manual setting is not necessary.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
=== Choosing the correct MT mode ===&lt;br /&gt;
Please do check if the actual output is correct. Fast but corrupted output is useless. Easy way of checking would be using something like &amp;lt;code&amp;gt;[[ColorBars]](1920, 1080, &amp;quot;YV12&amp;quot;).[[AddGrainC]](10000, 10000, seed=1)&amp;lt;/code&amp;gt; as a source filter. It doesn't always work right but will do for most stuff.[http://forum.doom9.org/showthread.php?p=1667434#post1667434] &lt;br /&gt;
&lt;br /&gt;
Source: http://forum.doom9.org/showthread.php?p=1667439#post1667439&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;MT_NICE_FILTER&amp;lt;/code&amp;gt;: Some filters (like nnedi3) use some buffers to do their dirty work and with mode 1 you get multiple threads writing data from different frames to the same buffer. This causes corruption when later someone tries to read from this buffer and gets not what was expected. Most of the &amp;quot;more complicated&amp;quot; filters use some kind of temporary storage thus won't work well with this mode. Simple filters might.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;MT_MULTI_INSTANCE&amp;lt;/code&amp;gt;: Mode 2 doesn't have this issue because multiple threads will get their own buffers and no data will be shared. Hence mode 2 is the &amp;quot;default&amp;quot; mode which should work with ''most'' filters, but it wastes memory like crazy (take SangNom2 for example - for 1080p YV12 frame, size of temporary buffers is about 10MB, so with 4 threads you get 40MBs on single filter invocation. Now add some usual supersampling to this and multiple invocations in most aa scripts and... you get the idea).&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;MT_SERIALIZED&amp;lt;/code&amp;gt;: If the filter requires sequential access or uses some global storage, then mode 3 is the only way to go. Source filter (filters without clip parameter) are autodetected, they do not need an explicit MT mode setting, they will automatically use MT_SERIALIZED.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;MT_SPECIAL_MT&amp;lt;/code&amp;gt;: Experimental. Now use only for MP_Pipeline, the filter is like a source filter (no input clip parameter), internally multithreaded, and suffer heavy performance degradation from any of the three regular mt modes. Really, this is a workaround. Available from AviSynth+ version r2440. Avisynth+ 3.6 has serious mt fixes, maybe this mode is not needed anymore.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
=== Closing notes (don't skip!) ===&lt;br /&gt;
*Remember that MT is only stable as long as you have specified a correct MT mode for all filters.&lt;br /&gt;
*Instead of the numbers 1-2-3-4, you can also use symbolic names for MT modes: MT_NICE_FILTER (1), MT_MULTI_INSTANCE (2), MT_SERIALIZED (3), MT_SPECIAL_MT (4)&lt;br /&gt;
*Mode 3 (MT_SERIALIZED) is evil. It is necessary for some filters, and it is usually no problem for source filters, but it can literally completely negate all advantages of MT, if such a filter is placed near the end of your script. Let us know if you meet a non-source mode 3 filter, we might be able to do something about it, but in general, avoid such calls if you want performance. (And of course, insert what you have found into here.)&lt;br /&gt;
*The new caches will save you a lot of memory in single-threaded scripts, but due to the way they work, they will also use more memory than before with MT enabled. The memory usage will scale much closer with the number of threads you have. Just something to keep in mind.&lt;br /&gt;
*MT-enabled AviSynth+ triggers a latent bug in AvsPmod v2.5.1. [https://github.com/gispos/AvsPmod/releases Use AvsPmod v2.6.x].&lt;br /&gt;
*Using too many threads can easily hurt performance a lot, because there are other bottlenecks too in your PC than just the CPU. For example, if you have a quad-core machine with 8 logical cores, less than 8 threads will often work much better than 8 or more.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Changes ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| xxxxx&lt;br /&gt;
| xxxxx&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Multithreading]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</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>2024-01-04T09:09:48Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Audio Filters */ refresh SoxFilter&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;
*[https://web.archive.org/web/20130803185015/http://www.64k.it:80/andres/dettaglio.php?sez=avisynth Andres' Filter Collection] &lt;br /&gt;
*[https://chaosking.de/repo/avsfilters/ AviSynth Filter DB by ChaosKing] | [https://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;
'''[[AviSynth%2B_x64_plugins|Comprehensive list of AviSynth+ 64-bit filters]] &amp;amp;rarr;'''&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;
| [https://forum.doom9.org/showthread.php?t=135855 BassAudio]&lt;br /&gt;
| [https://www.un4seen.com/ 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;
| [https://forum.doom9.org/showthread.php?t=135855 Plugin]&lt;br /&gt;
| dimzon&lt;br /&gt;
|-&lt;br /&gt;
|[[BestAudioSource]]&lt;br /&gt;
|A new sample accurate but somewhat slow FFmpeg based audio source filter for AviSynth+. No indexing required and only available in 64-bit. &lt;br /&gt;
|N/A&lt;br /&gt;
|[[BestAudioSource|Plugin]]&lt;br /&gt;
|{{Author/Myrsloik}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DGDecNV]] &lt;br /&gt;
| DGDecNV is a decoder/frameserver for AVC, HEVC, MPEG2, and VC1 streams that runs on the GPU of Nvidia graphics cards that support CUDA video decoding. &lt;br /&gt;
| [[I420]], [[YV12]], [[YUV420P16]] &lt;br /&gt;
| [[DGDecNV|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/dgmvcsource100b26.zip Plugin]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DSS2mod]]&lt;br /&gt;
| DirectShowSource2 mod, this version does not require Haali Media Splitter. &lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[DSS2mod|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;
| [[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;
| [[ImageSequence|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;
|[https://forum.doom9.org/showthread.php?t=184825 ImageSourceNV]&lt;br /&gt;
|CUDA accelerated plugin that uses the [https://docs.nvidia.com/cuda/nvjpeg/index.html nvJPEG API] to decode jpeg source files and convert their color space to YUV444.&lt;br /&gt;
|[[YUV444P8]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=184825 Plugin]&lt;br /&gt;
|[https://github.com/ArturAlekseev Argaricolm]&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;
|[[MPEG2DecPlus]]&lt;br /&gt;
|MPEG2DecPlus is a MPEG-1/2 decoder plug-in. MPEG2DecPlus is a project to modernize &amp;quot;[[DGDecode]].dll&amp;quot; for AviSynth+.&lt;br /&gt;
|[[YV12]], [[YV16]]&lt;br /&gt;
|[[MPEG2DecPlus|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&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;
| [[NicAudio|Plugin]]&lt;br /&gt;
| {{Author/Nic}}&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).&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[RawSource26|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[VapourSource]]&lt;br /&gt;
| VapourSynth script reader for AviSynth+ and AviSynth2.6x.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[VapourSource|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;
|[[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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[ColorMatrix|Plugin]]&lt;br /&gt;
| {{Author/Wilbert Dijkhof}}, {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeBlot]]&lt;br /&gt;
| Color bleed reduction plugin. &lt;br /&gt;
| [[YUY2]],[[YV12]]&lt;br /&gt;
| [[DeBlot|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&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;
| [[MoveChroma|Plugin]]&lt;br /&gt;
| [http://noraneco.ddo.jp/apechironnup apechironnup]&lt;br /&gt;
|-&lt;br /&gt;
| [[PixelShiftPlus]]&lt;br /&gt;
| Set of functions to independently shift any RGB(A) or YUV(A) plane with subpixel precision.&lt;br /&gt;
| All colorspaces&lt;br /&gt;
| [[PixelShiftPlus|Script]]&lt;br /&gt;
| reel.deal&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. See [http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&amp;amp;t=512 discussion]&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [https://web.archive.org/web/20131111114822/http://www.nmm-hd.org/upload/get~ikKt5ZZhD94/AdaptDBMC_beta.rar Script]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GradFun2db]]&lt;br /&gt;
| A simple and fast debanding filter.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[GradFun2db|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;
| [[Dither_tools#GradFun3|GradFun3]]&lt;br /&gt;
| This debanding script, part of the [[Dither_tools|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;
| [[Dither_tools|Script]]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[f3kdb|flash3kyuu_deband]]&lt;br /&gt;
| Fast debanding plugin ported from AviUtl.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[YV16]], [[YV24]], [[Y8]], [[YV411]]&lt;br /&gt;
| [[f3kdb|Plugin]]&lt;br /&gt;
| [http://github.com/SAPikachu/ SAPikachu]&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Deband|libplacebo_Deband]]&lt;br /&gt;
|Tunable debanding. Based on flash3kyuu, expanded to provide high quality by combining multiple debanding passes.&lt;br /&gt;
|8, 16 or 32-bit planar RGB/YUV formats. &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
| [[Neo_f3kdb]]&lt;br /&gt;
| Fast debanding plugin for AviSynth+.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YUY2]], [[YV16]], [[YV24]], [[YV411]], 8-16bit [[planar]] Y/YUV&lt;br /&gt;
| [[Neo_f3kdb|Plugin]]&lt;br /&gt;
| [https://github.com/msg7086 MeteorRain]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deblocking ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlockDetect BlockDetect]&lt;br /&gt;
|Determines blockiness of frames.&lt;br /&gt;
|All 8-32 bit [[planar]] formats.&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlockDetect/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&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. DGDecode also uses DeBlock.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], &amp;lt;br&amp;gt;all 8-32bit Y/YUV [[planar]] colorspaces &lt;br /&gt;
| [[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.&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[[DeblockPP7|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[MDeblock|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[SmoothD2|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://www.avisynth.nl/users/fizick/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://www.avisynth.nl/users/fizick/unblock/unblock11.zip Plugin]&lt;br /&gt;
|{{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsDeblockPP7]]&lt;br /&gt;
|A port of the MPlayer PP7 deblocking filter. Includes high bit-depth support.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], &amp;lt;br&amp;gt;all 8-32bit [[planar]] colorspaces &lt;br /&gt;
|[[vsDeblockPP7|Plugin]]&lt;br /&gt;
|Asd-d&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;
|[https://forum.doom9.org/showthread.php?t=172599 HaloBuster]&lt;br /&gt;
|Really slow high quality halo remover.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=172599 Script]&lt;br /&gt;
|feisty2&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;
| {{Author/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;
|[https://gist.github.com/acuozzo/940869257cc79016215600a2392b33eb Deemphasize]&lt;br /&gt;
|This AviSynth function deemphasizes ringing common to SD video signals resulting from a playback device in the transfer chain poorly compensating for pre-emphasis baked into the source signal.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://gist.github.com/acuozzo/940869257cc79016215600a2392b33eb Script]&lt;br /&gt;
|[https://github.com/acuozzo acuozzo]&lt;br /&gt;
|-&lt;br /&gt;
|[[Dering]]&lt;br /&gt;
|Deringing filter intended for deringing VHS captured video.&lt;br /&gt;
|[[YUY2]], [[YV12]]&lt;br /&gt;
|[[Dering|C-Plugin]]&lt;br /&gt;
|[https://sourceforge.net/u/alexrayne/profile/ alexrayne]&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;
| {{Author/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;
| [[MosquitoNR|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;
|[[WDFPlus]]&lt;br /&gt;
|Faster version of mirkosp's warpdering_faster script for AviSynth+.&lt;br /&gt;
|All 8-16 bit Y/YUV colorspaces, except YV411&lt;br /&gt;
|[https://github.com/Reel-Deal/AviSynthPlus-Scripts/blob/main/wdfplus.avsi Script]&lt;br /&gt;
|reel.deal&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deinterlacing ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[BWDIF]]&lt;br /&gt;
|Motion adaptive deinterlacing based on yadif with the use of w3fdif and cubic interpolation algorithms.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all 8-32bit [[planar]] colorspaces &lt;br /&gt;
|[[BWDIF|Plugin]]&lt;br /&gt;
|Asd-g&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;
| [[Decomb|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;
| [[EEDI2|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EEDI2CUDA]]&lt;br /&gt;
| EEDI2 filter using CUDA.&lt;br /&gt;
| All [[planar]] Y/YUV/RGB 8 to 16-bit colorspaces &lt;br /&gt;
| [[EEDI2CUDA|Plugin]]&lt;br /&gt;
| [https://github.com/misakikasumi misakikasumi], [https://github.com/WolframRhodium WolframRhodium]&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;
| [[eedi3|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EEDI3CL]]&lt;br /&gt;
| OpenCL implementation of eedi3. For AviSynth+ only.&lt;br /&gt;
| all 8-32bit [[planar]] colorspaces &lt;br /&gt;
| [[EEDI3CL|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [[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;
| [[nnedi3|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[NNEDI3CL]]&lt;br /&gt;
| OpenCL implementation of nnedi3. For AviSynth+ only.&lt;br /&gt;
| all 8-32bit [[planar]] colorspaces &lt;br /&gt;
| [[NNEDI3CL|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [[QTGMC|Script]]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
| [[SangNom2]]&lt;br /&gt;
| Reimplementation of the old [[SangNom]] plugin.&lt;br /&gt;
| [[Y8]],[[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[SangNom2|Plugin]]&lt;br /&gt;
| {{Author/tp7}}&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;
| [[TDeint|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;
| [[TempGaussMC|Script]]&lt;br /&gt;
| {{Author/Didée}}&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;
| [[yadifmod|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[yadifmod2]]&lt;br /&gt;
| Yadif + yadifmod for avisynth2.6/avisynth+. &lt;br /&gt;
| [[YV24]], [[YV16]], [[YV12]], [[YV411]], [[Y8]]&lt;br /&gt;
| [[yadifmod2|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;
| [[ApparentFPS|Plugin]]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [[DeDup]]&lt;br /&gt;
| Remove (drop) duplicate frames in the interest of compression quality and speed. Resulting clip will have a variable frame rate.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[DeDup]]&lt;br /&gt;
| {{Author/akupenguin}}&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. &lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[Dup|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=175357 Duplicity2/DropDeadGorgeous]&lt;br /&gt;
|A two faced scheming and double dealing [on your behalf] dupe tool.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=175357 Script]&lt;br /&gt;
|StainlessS&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.&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;
| [https://github.com/eparsons Corran]&lt;br /&gt;
|-&lt;br /&gt;
| [[DupStep]]&lt;br /&gt;
| Duplicate frame detector/decimator filter for [[AviSynth+]], 64-bit version only.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Avisynthplus_color_formats|8-16 bits]]&lt;br /&gt;
| [[DupStep|Plugin]]&lt;br /&gt;
| [http://github.com/Orum Orum]&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.&lt;br /&gt;
| [[RGB24]] [[RGB32]], [[Y8]], [[YV12]] [[YV16]], [[YV24]]&lt;br /&gt;
| [[ExactDedup|Plugin]]&lt;br /&gt;
|Steve Melenchuk, Arick Chan, StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/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://www.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;
| [[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.&lt;br /&gt;
| [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[ExBlend|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;
|[[DePulse]]&lt;br /&gt;
|DePulse is dropout remover, removes white/black noise horizontal streaking in analogue captures.&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[[DePulse|Plugin]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[DeScratch]]&lt;br /&gt;
| DeScratch removes vertical scratches from films. Also it can be used for removing of horizontal noise lines such as drop-outs from analog VHS captures (after image rotation). &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[DeScratch|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[DeSpot]]&lt;br /&gt;
| This filter is designed to remove temporal noise in the form of dots (spots) and streaks found in some videos. The filter is also useful for restoration (cleaning) of old telecined 8mm (and other) films from spots (from dust) and some stripes (scratches).&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[DeSpot|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.&lt;br /&gt;
| 8-bit RGB/YUV&lt;br /&gt;
| [[DeVCR#Script|Script]]&lt;br /&gt;
| Ricardo Garcia&lt;br /&gt;
|-&lt;br /&gt;
|[[KillPulse]]&lt;br /&gt;
|KillPulse is dropout remover, removes white/black noise horizontal streaking in analogue captures.&lt;br /&gt;
|[[YUY2]]&lt;br /&gt;
|[[KillPulse|Plugin]]&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.net/showthread.php?p=1402690 KillerSpots]&lt;br /&gt;
|Spot removal function based on Didée's idea from 2010 that makes use of MVTools analysis and RemoveDirt to detect and clean up spots with adiacent pixels.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|[https://github.com/FranceBB/KillerSpots Script]&lt;br /&gt;
|Didée, GMJCZP and John Meyer.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[RemoveDirt]]&lt;br /&gt;
| RemoveDirt is a temporal cleaner for AviSynth 2.6 and AviSynth+.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[RemoveDirt|Plugin]]&lt;br /&gt;
| {{Author/kassandro}}, {{Author/pinterf}}&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=121197 RemoveLine]&lt;br /&gt;
|Script for removal of horizontal stripes.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|Script&lt;br /&gt;
|Yup&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=181777 SpotLess]&lt;br /&gt;
|Script filter to remove spots and noise using mvTools2 and Medianblur2. Copes with spots on multiple consecutive frames, setting RadT accordingly.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182407 SpotRemover]&lt;br /&gt;
|This script is designed to clean video from spots. Based on SpotLess script by StainlessS.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|Arx1meD&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;
&lt;br /&gt;
=== Frequency Interference removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/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://www.avisynth.nl/users/fizick/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;
| [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;
| [[FDecimate|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FDecimate2]]&lt;br /&gt;
| FDecimate2 is based on FDecimate v1.0.2. FDecimate2, fixes some problems with bugged metrics in FDecimate v1.0.2.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[FDecimate2|Plugin]]&lt;br /&gt;
| {{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IT]]&lt;br /&gt;
| Inverse Telecine plugin.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[IT|Plugin]]&lt;br /&gt;
| {{Author/thejam79}} / {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[IVTC_txt60mc|ivtc_txt60mc]]&lt;br /&gt;
| Deinterlaces telecined footage with that has been overlayed scrolling text at 60i.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[IVTC_txt60mc|Script]]&lt;br /&gt;
| {{Author/cretindesalpes}}&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;
|[[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;
|[[MDec2|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;
| 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;
| [[Decomb]]&lt;br /&gt;
| The Telecide and Decimate filters can be combined to implement IVTC.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Decomb|Plugin]]&lt;br /&gt;
| {{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182369 TelecineBob]&lt;br /&gt;
|If your source soffers from field blending, as long as no deinterlacing is made you will find out that conveniently the blended fields are often paired with a clean one. FieldDeBlend takes advantage of that and checks for frames whose fields don't match to replace the frame with a clean one as long there is one.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://www.mediafire.com/file/sa1oae96m63mkje/TelecineBob.zip/file Plugin]&lt;br /&gt;
|Ceppo&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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TIVTC|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;
| [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|Ghostbuster]]&lt;br /&gt;
| A filter for the removal of ghosting.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
| [[GhostBuster|Plugin]]&lt;br /&gt;
| {{Author/SansGrip}}&lt;br /&gt;
|-&lt;br /&gt;
| [[LGhost]]&lt;br /&gt;
| Plugin intended for ghost removal but can also reduce edge (ringing) artifacts.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[LGhost|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsLGhost]]&lt;br /&gt;
| Luminance Ghost reduction filter. Can be used for removing luminance ghost or edge ghost (ringing). &lt;br /&gt;
| All [[Planar]] colorspaces (8-32bit)&lt;br /&gt;
| [[vsLGhost|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logo Removal ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[AvsInpaint]]&lt;br /&gt;
| This plugin comes with the intention to provide a suit for the removal of logos, whether opaque or transparent. It provides algorithms for these tasks: logo detection, deblending, and logo inpainting.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[AvsInpaint|C-Plugin]]&lt;br /&gt;
| AMSS0815, {{Author/pinterf}}&lt;br /&gt;
|-&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;
|[[DelogoHD]]&lt;br /&gt;
|DelogoHD is an overhaul of the original delogo filter, which was originally written by MakKi many years ago. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], &amp;lt;br&amp;gt; 8-16bit planar YUV&lt;br /&gt;
|[[DelogoHD|Plugin]]&lt;br /&gt;
|MeteorRain&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=184881 DoomDelogo]&lt;br /&gt;
| DoomDelogo meant to be simpler and perform better than deKafka, s_ExLogo, x-Logo and similar.&lt;br /&gt;
| Any&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=184881 Script]&lt;br /&gt;
| VoodooFX&lt;br /&gt;
|-&lt;br /&gt;
| [[ExInpaint]]&lt;br /&gt;
| Exemplar-Based Image Inpainting. See [http://forum.doom9.org/showthread.php?t=133773 discussion] &lt;br /&gt;
| [[RGB24]] [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[ExInpaint|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 InpaintDelogo]&lt;br /&gt;
|InpaintDelogo is an advanced logo and watermark removal function using inpainting and deblending with an adjustable fine process to hide artifacts and get best delogo results.&lt;br /&gt;
Can remove opaque, transparent, semi-transparent and some dynamic logos from video.&lt;br /&gt;
Can be used to remove hardcoded subtitles or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 Script]&lt;br /&gt;
|VoodooFX&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;
| [[InpaintFunc|Script]]&lt;br /&gt;
| Reuf Toc&lt;br /&gt;
|-&lt;br /&gt;
| LogoNR&lt;br /&gt;
| Post-denoise filter for EraseLogo or [[DelogoHD]]. See [https://web.archive.org/web/20210915185704/https://www.nmm-hd.org/newbbs/viewtopic.php?t=649 discussion]&lt;br /&gt;
| All [[planar]] colorspaces&lt;br /&gt;
| [https://web.archive.org/web/20220702130736/https://pastebin.com/raw/qZBU3NQA Script]&lt;br /&gt;
| {{Author/06_taro}}&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;
| [[Uglarm]]&lt;br /&gt;
| Filter for blurring a logo, using LogoAway style Uglarm Interpolation method.&lt;br /&gt;
| [[RGB24]] [[RGB32]],[[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Uglarm|Plugin]]&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.&lt;br /&gt;
| [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[X-Logo|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;
| [[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;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]]&lt;br /&gt;
| [[DeFlicker|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}, {{Author/pinterf}}&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;
| [[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;
| [[EquLines|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[LMFlicker|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;
| Plugin to reduce temporal oscillations.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[ReduceFlicker|Plugin]]&lt;br /&gt;
| {{Author/kassandro}}, {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[TimeLapseDF|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]], 8-16bit planar Y/YUV&lt;br /&gt;
| [[Vinverse|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;
| [[Bifrost|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[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;
| [[DDCR]]&lt;br /&gt;
| A purely spatial dot crawl removal script for AviSynth+.&lt;br /&gt;
| all 8 bit Y/YUV colorspaces&lt;br /&gt;
| [[DDCR|Script]]&lt;br /&gt;
| Reel.Deal&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;
| [[DeCross|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;
| all planar Y, YUV, and YUVA (8-16 bit)&lt;br /&gt;
| [[DeDot|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;
|[[DotKill]]&lt;br /&gt;
|Spatio-temporal dotcrawl and rainbow remover.&lt;br /&gt;
|[[YV12]], [[YV16]], [[YV24]], [[YV411]], 8-16bits&lt;br /&gt;
|[[DotKill|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=170328 FadeDeRainbow]&lt;br /&gt;
|Another de-rainbowing script.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=170328 Script]&lt;br /&gt;
|bxyhxyh&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).&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[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).&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[DePan|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|Script]]&lt;br /&gt;
|[http://pastebin.com/u/tophf tophf]&lt;br /&gt;
|-&lt;br /&gt;
| [[Deshaker3D]]&lt;br /&gt;
| Experimental 3D image stabilizer (VDub [http://www.guthspot.se/video/deshaker.htm Deshaker] required).&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Deshaker3D|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;
|[https://github.com/arnean/PerfPan PerfPan]&lt;br /&gt;
|PerfPan is an AviSynth plugin to stabilize scanned film using perforation as a reference.&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://github.com/arnean/PerfPan/tree/master/windows Plugin]&lt;br /&gt;
|[https://github.com/arnean arnean]&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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[Stab|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;
|{{Author/Dogway}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182532 Stab_Light]&lt;br /&gt;
|Another stabilization script; based on Stab3.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] &lt;br /&gt;
|Script&lt;br /&gt;
|Arx1meD&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;
| [[AdaptiveMedian|Plugin]]&lt;br /&gt;
|{{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Deathray]]&lt;br /&gt;
|OpenCL GPU accelerated spatial/temporal non-local means de-noising.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[Deathray|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;
| [[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;
| [[DeSaltPepper|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFTQuiver]]&lt;br /&gt;
| Remove periodic noise. Useful for analog interference.&lt;br /&gt;
| [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[FFTQuiver|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TNLMeans]]&lt;br /&gt;
| TNLMeans is an implementation of the NL-means denoising algorithm.&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;
| [[TNLMeans|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.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[KNLMeansCL|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;
| [[_2DCleanYUY2|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;
| [[DctFilter|Plugin]]&lt;br /&gt;
| {{Author/Tom Barry}}&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;
| [[Frfun7|Plugin]]&lt;br /&gt;
| prunedtree&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;
|[[MiniDeen]]&lt;br /&gt;
|MiniDeen is a spatial denoising filter. It replaces every pixel with the average of its neighbourhood. This is a port of the &amp;quot;a2d&amp;quot; method from the AviSynth plugin [[Deen]], version beta 2.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar YUV in AviSynth+&lt;br /&gt;
|[[MiniDeen|Plugin]]&lt;br /&gt;
|{{Author/dubhater}} / MeteorRain&lt;br /&gt;
|-&lt;br /&gt;
|[[Neo_VagueDenoiser]]&lt;br /&gt;
|Wavelet based Denoiser. Refactored version of the original VagueDenoiser; includes optimizations, additional colorspaces, and high bit depth support.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar YUV in AviSynth+&lt;br /&gt;
|[[Neo_VagueDenoiser|Plugin]]&lt;br /&gt;
| HolyWu, [https://github.com/msg7086 MeteorRain]&lt;br /&gt;
|-&lt;br /&gt;
|[[sbr]]&lt;br /&gt;
|sbr is helper function to make a highpass on a blur's difference.&lt;br /&gt;
|All YUV [[planar]] 8 to 16-bit colorspaces &lt;br /&gt;
|[[sbr|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothUV2]]&lt;br /&gt;
| SmoothUV2 is a spatial derainbow filter. This filter performs structure-preserving smoothing (blurring) on the U/V (chrominance or colour) information of the image, leaving Y (luminance) intact.  &lt;br /&gt;
| All YUV, YUVA [[planar]] 8 to 16-bit colorspaces &lt;br /&gt;
| [[SmoothUV2|Plugin]]&lt;br /&gt;
| {{Author/dubhater}}, {{Author/Asd-g}}&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;
|[[SPresso|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;
| [[TBilateral|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[VagueDenoiser|Plugin]]&lt;br /&gt;
| {{Author/Lefungus}}, {{Author/Kurosu}}, {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsMSmooth]]&lt;br /&gt;
|vsMSmooth is a spatial smoother that doesn't touch edges. &lt;br /&gt;
||[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all planar Y, YUV, and RGB formats,  8 to 16 bit&lt;br /&gt;
|[[vsMSmooth|Plugin]]&lt;br /&gt;
|{{Author/dubhater}}, {{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsTBilateral]]&lt;br /&gt;
|vsTBilateral is a spatial smoothing filter that uses the bilateral filtering algorithm.&lt;br /&gt;
|All [[planar]] 8 to 16-bit colorspaces&lt;br /&gt;
|[[vsTBilateral |Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[Cnr2|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;
| [[FluxSmooth|Plugin]]&lt;br /&gt;
| {{Author/SansGrip}}, {{Author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
| MDegrain&lt;br /&gt;
| Strong and effective temporal denoiser. Part of the [[MVTools]] package.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[MVTools|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&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;
| [[TemporalDegrain2]]&lt;br /&gt;
| Temporal Degrain enhanced with parts of QTGMC, potentially slower but more effective at removing grain from video sources while retaining more details.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]] (8-16 bit)&lt;br /&gt;
| [[TemporalDegrain2|Script]]&lt;br /&gt;
| Didée, Sagekilla, Vit, real.finder, ErazorTT&lt;br /&gt;
|-&lt;br /&gt;
|[[vsCnr2]]&lt;br /&gt;
|vsCnr2 is a temporal denoiser designed to denoise only the chroma. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV, and YUVA (8-16 bit) &lt;br /&gt;
|[[vsCnr2|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsTTempSmooth]]&lt;br /&gt;
|vsTTempSmooth is a motion adaptive (it only works on stationary parts of the picture), temporal smoothing filter. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV, and YUVA (8-32 bit) &lt;br /&gt;
|[[vsTTempSmooth|Plugin]]&lt;br /&gt;
|HolyWu, {{Author/Asd-g}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spatio-Temporal Denoisers ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[BM3DCUDA]]&lt;br /&gt;
|BM3D denoising filter for AviSynth+, implemented in CUDA.&lt;br /&gt;
|32-bit [[planar]] colorspaces&lt;br /&gt;
|[[BM3DCUDA|Plugin]]&lt;br /&gt;
|[https://github.com/WolframRhodium WolframRhodium]&lt;br /&gt;
|-&lt;br /&gt;
| [[Convolution3D]]&lt;br /&gt;
| Convolution3D is a spatio-temporal smoother, it applies a 3D convolution filter to all pixels of consecutive frames.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[Convolution3D|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;
| [[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;
| [https://web.archive.org/web/20160604213634/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.&lt;br /&gt;
| [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[dfttest|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.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[DeGrainMedian|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DFilter]]&lt;br /&gt;
| A 3D Frequency Domain filter - gives strong denoising and moderate sharpening.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]], any Y, YUV and Planar RGB 8-32 bit&lt;br /&gt;
| [[FFT3DFilter|Plugin]]&lt;br /&gt;
| {{Author/Fizick}}, martin53, {{Author/pinterf}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FFT3DGPU]]&lt;br /&gt;
| Similar algorithm to FFT3DFilter, but uses graphics hardware for increased speed.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[YUY2]], Planar RGB 8 bit&lt;br /&gt;
| [[FFT3DGPU|Plugin]]&lt;br /&gt;
| {{Author/tsp}}, {{Author/pinterf}}&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;
| 8-16bit planar YUV&lt;br /&gt;
| [[hqdn3d|Plugin]]&lt;br /&gt;
| {{Author/akupenguin}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174804 mclean]&lt;br /&gt;
|Typical spatial filters work by removing large variations in the image on a small scale, reducing noise but also making the image less sharp or temporally stable. mClean removes noise whilst retaining as much detail as possible, as well as provide optional image enhancement.&lt;br /&gt;
|[[YV12]], [[HBD]]&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174804 Script]&lt;br /&gt;
|burfadel&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;
| [[MC_Spuds|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;
| [[MCTemporalDenoise|Script]]&lt;br /&gt;
| {{Author/LaTo}}&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;
| [https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/RemoveDirtMC_SE.avsi Script]&lt;br /&gt;
| Nephilis/A.SONY&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;
| [[RemoveGrainHD|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;
| [[RgTools|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;
|[[SMDegrain|Script]]&lt;br /&gt;
|{{Author/Dogway}}&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.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[STPresso|Script]]&lt;br /&gt;
|{{Author/Didée}}&lt;br /&gt;
|-&lt;br /&gt;
|[[vsDeGrainMedian]]&lt;br /&gt;
|vsDeGrainMedian is a spatio-temporal limited median denoiser.&lt;br /&gt;
|All [[planar]] 8 to 16bit colorspaces&lt;br /&gt;
|[[vsDeGrainMedian|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
| [[Average|Plugin]]&lt;br /&gt;
| {{Author/tp7}}, {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[[AviSynthGimpLayer]]&lt;br /&gt;
|AviSynth Gimp-style Layer merge plugin.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[AviSynthGimpLayer|Plugin]]&lt;br /&gt;
| [http://sourceforge.net/u/panzerboy66/profile/ panzerboy66]&lt;br /&gt;
|-&lt;br /&gt;
|[[AVS_SoftLight]]&lt;br /&gt;
|AviSynth+ plugin. It makes a softlight blend with a negative of average. Only x64 version available and with CUDA support. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[AVS_SoftLight|Plugin]]&lt;br /&gt;
|Argaricolm&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 satisfies 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;
|[[ClipBlend]]&lt;br /&gt;
|Filter to blend consecutive frames in a clip. &lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[ClipBlend|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/colorkeyframe/colorkeyframe.html ColorKeyFrame]&lt;br /&gt;
| Linear interpolation of color correction with key frames. &lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [http://www.avisynth.nl/users/fizick/colorkeyframe/colorkeyframe03.zip Plugin]&lt;br /&gt;
| {{Author/Fizick}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[ColorScreenMask|Plugin]]&lt;br /&gt;
|Grandpa Oddball&lt;br /&gt;
|-&lt;br /&gt;
|[[ColourMask]]&lt;br /&gt;
|Creates colour masks.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[ColourMask|Plugin]]&lt;br /&gt;
|{{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[CombMask|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;
|[[Fusion|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;
| [[GraMaMa|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/8c4rxlwbs020ib1/MaskCrop0.1.2.7z?dl=1 Plugin] &amp;lt;!--[http://www.dropbox.com/s/98bcjuiy2ojkz75/MaskCrop0.1.1.7z?dl=1 Old v0.1.1 plugin] [http://www.dropbox.com/s/xcrlno31jqavqob/MaskCrop.7z?dl=1 Old v0.1.0 plugin]--&amp;gt;&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;
|{{Author/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.&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[Median|Plugin]]&lt;br /&gt;
|{{Author/ajk}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MTCombMask]]&lt;br /&gt;
|This filter produces a mask showing areas that are combed, it uses 3-point sampling to determine combing in a pixel. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], 8-32bit planar Y/YUV/YUVA&lt;br /&gt;
|[[MTCombMask|Plugin]]&lt;br /&gt;
|{{Author/Manao}}, [https://github.com/Asd-g Asd-g]&lt;br /&gt;
|-&lt;br /&gt;
|[[OverlayPlus]]&lt;br /&gt;
|Layering scrip similar to AviSynth's internal Overlay but includes more blending modes and some additional features.&lt;br /&gt;
|All 8-32bit colorspaces&lt;br /&gt;
|[[OverlayPlus|Script]]&lt;br /&gt;
|reel.deel &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;
| [https://web.archive.org/web/20201020085042/https://sites.google.com/site/ourenthusiasmsasham/soft#TOC-ParameterisedBlendd Plugin]&lt;br /&gt;
| [https://web.archive.org/web/20201020085035/https://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;
|[[RedAverage]]&lt;br /&gt;
|Frame-by-frame averaging/merging of multiple clips. Includes a masked average, weighted average, and a merge filter. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[RedAverage|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;
|[[TColorMask]]&lt;br /&gt;
|A simple color masking plugin for AviSynth.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]], [[YV411]], 8/16bit planar YUV&lt;br /&gt;
|[[TColorMask|Plugin]]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[TCombMask|Plugin]]&lt;br /&gt;
|{{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
|[[TempLinearApproximate]]&lt;br /&gt;
|TempLinearApproximate takes several frames and for each pixel calculates linear approximation of its values through time, then returns its value in the middle (unless close to beginning or end of clip) of that line.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[TempLinearApproximate|Plugin]]&lt;br /&gt;
|Mystery Keeper&lt;br /&gt;
|-&lt;br /&gt;
|[[TMaskCleaner]]&lt;br /&gt;
|A really simple mask cleaning plugin for AviSynth based on mt_hysteresis.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[TMaskCleaner|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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TMM|Plugin]]&lt;br /&gt;
| {{Author/tritical}}&lt;br /&gt;
|-&lt;br /&gt;
| [[TMM2]]&lt;br /&gt;
| A rewrite of TMM&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[TMM2|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.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Unpremultiply|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;
|[[Watermark2]]&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;
|[[Watermark2|Plugin]]&lt;br /&gt;
|[http://sourceforge.net/u/phillvanleersum/profile/ DrPhill], {{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[YRangeMask]]&lt;br /&gt;
| AviSynth script to create a mask by specifying the range of the brightness. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[YRangeMask|Script]]&lt;br /&gt;
| Chikuzen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blurring ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlurDetect BlurDetect]&lt;br /&gt;
|Determines blurriness of frames.&lt;br /&gt;
|All 8-16 bit [[planar]] formats.&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-BlurDetect/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.animemusicvideos.org/forum/viewtopic.php?t=101724 BlurMod/ApplyOnAngle]&lt;br /&gt;
|BlurMod() shrinks, blurs, then resizes; resulting in a very strong blur. ApplyonAngle() rotates, filters, then rotates back; making any filter appear as if applied on an angle.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|Script&lt;br /&gt;
|Phantasmagoriat&lt;br /&gt;
|-&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;
| [[BucketMedian|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FastBlur]]&lt;br /&gt;
| Fast approximate Gaussian blurs.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[FastBlur|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GBlur]]&lt;br /&gt;
| Gaussian blur.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[GBlur|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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[MedianBlur|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;
| [[MedianBlur2|Plugin]]&lt;br /&gt;
| {{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[[neo_TMedian]]&lt;br /&gt;
|Temporal denoising filter that replaces every pixel with the median of its temporal neighbourhood. &lt;br /&gt;
|8-16 and 32-bit planar&lt;br /&gt;
|[[neo_TMedian|Plugin]]&lt;br /&gt;
|[https://github.com/msg7086 MeteorRain]&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;
| [[VariableBlur|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/20091027134543if_/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;
|[[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;
|[[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;
|[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;
|CropEven&lt;br /&gt;
|Script to crop evenly based on the dimensions given. It will crop the extra pixels off the bottom and right sides if the target resolution is odd. See [https://forum.doom9.org/showthread.php?t=172577 discussion].&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1739589#post1739589 Script]&lt;br /&gt;
|Desbreko&lt;br /&gt;
|-&lt;br /&gt;
|[[EdgeFixer]]&lt;br /&gt;
|EdgeFixer repairs bright and dark line artifacts near the border of an image. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[EdgeFixer]]&lt;br /&gt;
|[https://github.com/sekrit-twc sekrit-twc]&lt;br /&gt;
|-&lt;br /&gt;
|[[FillBorders]]&lt;br /&gt;
|This is a simple filter that fills the borders of a clip, without changing the clip's dimensions.&lt;br /&gt;
|All [[planar]] colorspaces &lt;br /&gt;
|[[FillBorders]]&lt;br /&gt;
|[http://github.com/dubhater dubhater] / Asd&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;
|PadFFT&lt;br /&gt;
|A simple plugin to add borders evenly on each side. See [https://forum.doom9.org/showthread.php?p=1769503#post1769503 discussion]&lt;br /&gt;
|[[Y8]], [[YV12]]&lt;br /&gt;
|[https://web.archive.org/web/20221113033752if_/https://files.videohelp.com/u/223002/PaddFFT_dll_v0.02_20160604.zip Plugin]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|PadToMod&lt;br /&gt;
|Script to pad to a specified mod. See [https://forum.doom9.org/showthread.php?t=172577 discussion].&lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?p=1746579#post1746579 Script]&lt;br /&gt;
|Desbreko&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;
| [[RoboCrop|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;
|[https://forum.doom9.org/showthread.php?t=183453 ColorMatrixTransform]&lt;br /&gt;
|AviSynth+ plugin for applying a color matrix transform to 32 bit floating point clips.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[https://github.com/TomArrow/ColorMatrixTransform/releases Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&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;
|[https://forum.doom9.org/showthread.php?t=183990 LabConvert]&lt;br /&gt;
|AviSynth+ plugin to convert to LChab (derivative of LAB) color space and back for beautiful color manipulations. &lt;br /&gt;
|[[RGBPS]], [[YUV444PS]]&lt;br /&gt;
|[https://github.com/TomArrow/LabConvertAVS/releases/ Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&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;
|[[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;
|[[PlanarTools|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[[YV12To422]]&lt;br /&gt;
|YV12 to YV16/YUY2 converter for AviSynth 2.6.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[YV12To422|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;
| [[AddGrainC|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;
|[[AGM]]&lt;br /&gt;
|Uses an adaptive mask based on frame and pixels brightness to apply grain.&lt;br /&gt;
|All YUV [[planar]] colorspaces &lt;br /&gt;
|[[AGM|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=167217 Checker]&lt;br /&gt;
|Checkerboard combining filter.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://www.mediafire.com/?ewq8rc0aprzmk8r Plugin] /// [https://web.archive.org/web/20230206191644if_/https://files.videohelp.com/u/223002/checker.zip Archived]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=184052 ChickenDream]&lt;br /&gt;
|Realistic film-grain rendering for AviSynth+.&lt;br /&gt;
|[[Y32]], [[RGBPS]]&lt;br /&gt;
|[https://github.com/EleonoreMizo/chickendream/releases Plugin]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[ColorLooks|Plugin]]&lt;br /&gt;
| {{author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[crt_display|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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[EffectsMany|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[EffectsPlus]]&lt;br /&gt;
| '''AviSynth+ only'''. Creates 26 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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[HBD]] colorspaces&lt;br /&gt;
| [[EffectsPlus|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;
| [[f3kgrainPlus]]&lt;br /&gt;
| Another 8/16-bit luma adaptive grain generator for AviSynth+.&lt;br /&gt;
| All 8-16 bit Y/YUV colorspaces, except YV411 &lt;br /&gt;
| [[f3kgrainPlus|Script]]&lt;br /&gt;
| {{Author/06_taro}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Fingerprint]]&lt;br /&gt;
|Video fingerprint filter. &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[Fingerprint|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&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;
| [[GrainFactory3|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;
| [[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;
|[[ShufflessS]]&lt;br /&gt;
|Shuffle spacial columns or rows (1D), or blocks(2D) of frames, or temporal shuffle (frame order), all shuffles Inversable, ie undoable.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[HBD]] formats in AviSynth+&lt;br /&gt;
|[[ShufflessS|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/sorayuki/TawawaFilter TawawaFilter]&lt;br /&gt;
|An AviSynth plugin to make video in blue color.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[https://github.com/sorayuki/TawawaFilter/releases/ Plugin]&lt;br /&gt;
|[https://github.com/sorayuki sorayuki]&lt;br /&gt;
|-&lt;br /&gt;
| [[TurnsTile]]&lt;br /&gt;
| Applies mosaic and/or palette effects to a clip.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[TurnsTile|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;
|[[FixFPS]]&lt;br /&gt;
|Fix the frames to a more consistent pattern with the help of Matroska Version 2 Timecodes.  Mostly useful for fixing weird framerate from using a third party program to capture (ex. .kkapture with Mupen).  Generally used with the plugin ExactDedup.  It should be noted that FixFPS would try it's best not to lose any frames from the source.  It does this by pushing frames to the next available spot, if possible, but it can cause side effects. See [http://tasvideos.org/forum/viewtopic.php?t=18914 discussion].&lt;br /&gt;
|Any&lt;br /&gt;
|[https://www.mediafire.com/?7bip52hu7v1pps2 Plugin]&lt;br /&gt;
|Aktan&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;
| [[FrameRateConverter]]&lt;br /&gt;
| FrameRateConverter uses motion interpolation with fine artifact removal.&lt;br /&gt;
| [[YV24]], [[YV16]], [[YV12]], [[Y8]]&lt;br /&gt;
| [[FrameRateConverter|Plugin]]&lt;br /&gt;
| [https://github.com/mysteryx93 MysteryX]&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;
|[[JohnFPS]]&lt;br /&gt;
|Frame Rate Converter based on the example from the MVTools documentation with some modifications. This script is also known as &amp;quot;jm_fps&amp;quot;. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[JohnFPS|Script]]&lt;br /&gt;
|johnmeyer, StainlessS &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;
|[[RIFE]]&lt;br /&gt;
|Real-Time Intermediate Flow Estimation for Video Frame Interpolation.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[[RIFE|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SickJumps]]&lt;br /&gt;
| Speed ramping, aka time-remapping (smooth speed changes). Processes both video and audio.&lt;br /&gt;
| [[RGB]], [[YUV]]&lt;br /&gt;
| [[SickJumps|Plugin]]&lt;br /&gt;
| {{Author/Robert Martens}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SVPflow]]&lt;br /&gt;
| SVPflow provides fast and high quality GPU accelerated frame rate interpolation.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[SVPflow|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. Note: only supports Matroska V1 timecodes.&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;
| [[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;
| [[TimecodeFPS|C-Plugin]]&lt;br /&gt;
| natt&lt;br /&gt;
|-&lt;br /&gt;
| [[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;
| [[VFRtoCFR|Plugin]]&lt;br /&gt;
| Aktan&lt;br /&gt;
|-&lt;br /&gt;
| [[VfrToCfr]]&lt;br /&gt;
| This plugin converts variable frame rate clips to constant frame rate by introducing null frames.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[VfrToCfr|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;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
|[[ApplyEvery]]&lt;br /&gt;
|A collection of AviSynth functions that operate at regular intervals in a clip. &lt;br /&gt;
|&lt;br /&gt;
|[[ApplyEvery|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;
|[[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;
|[[ClipClop|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[FrameRepeat]]&lt;br /&gt;
|FrameRepeat() is a simple plugin to select frames to repeat. Requires AviSynth 2.6.&lt;br /&gt;
|&lt;br /&gt;
|[[FrameRepeat|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[FrameSel|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;
|[[FrameSel|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 Script]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[Prune|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[RemapFrames|Plugin]]&lt;br /&gt;
|{{Author/stickboy}}, {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/TomArrow/SelectRangeEveryReversing SelectRangeEveryReversing]&lt;br /&gt;
|Modified version of the internal [[SelectRangeEvery]] filter, except every second range is reversed in direction. See [https://forum.doom9.org/showthread.php?t=183239 discussion] for more information.&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/TomArrow/SelectRangeEveryReversing/releases Plugin]&lt;br /&gt;
|[https://github.com/TomArrow TomArrow]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Levels and Chroma ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[AutoAdjust|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;
| [[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.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Autolevels|Plugin]]&lt;br /&gt;
| {{Author/frustum}} &amp;amp; Theodor Anschütz &amp;amp; StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[AVSCube]]&lt;br /&gt;
|[[AviSynth+]] plugin to load and apply .cube [http://en.wikipedia.org/wiki/3D_lookup_table 3D LUTs].&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBP16]]&lt;br /&gt;
|[[AVSCube|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=168062 AWB]&lt;br /&gt;
| Automatic white balance for real world footage, similar to the known function in digital cameras.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=168062 Script]&lt;br /&gt;
| martin53&lt;br /&gt;
|-&lt;br /&gt;
|Brightness&lt;br /&gt;
|Restore dark and bright zones.&lt;br /&gt;
|8-16 planar Y/YUV&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182411 Script]&lt;br /&gt;
|Arx1meD&lt;br /&gt;
|-&lt;br /&gt;
| ChangeColour&lt;br /&gt;
| Simple plugin to replace one specified color to another, see [https://forum.doom9.org/showthread.php?t=88727 discussion] for additional information.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [https://web.archive.org/web/20220322043620/https://files.videohelp.com/u/223002/changecolour01.zip Plugin]&lt;br /&gt;
| {{Author/Simon Walters}}&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;
| [[ChanMix|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;
| [[ChannelMixer|Plugin]]&lt;br /&gt;
| Gustaf Ullberg&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=173364 ChromaJig]&lt;br /&gt;
| Automatic Colorization.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1775733#post1775733 Script]&lt;br /&gt;
| MWilson&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorBalance]]&lt;br /&gt;
| Same tool that is found in Gimp &amp;amp; Cinepaint.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ColorBalance|Plugin]]&lt;br /&gt;
| Gavino &amp;amp; mikeytown2&lt;br /&gt;
|-&lt;br /&gt;
|[[ColorLooks]]&lt;br /&gt;
| The plugin contains the following filters: Technicolor, Colorize, Sepia and Posterize.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[ColorLooks|Plugin]]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[[ColorYUV2]]&lt;br /&gt;
|YUV color adjustment plugin with a graffer. &lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[[ColorYUV2|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ColourLike]]&lt;br /&gt;
| Makes a clip look like a 'reference' clip by adjusting each colour mask.&lt;br /&gt;
| [[RGB32]], [[YV12]]&lt;br /&gt;
| [[ColourLike|Plugin]]&lt;br /&gt;
| {{Author/mg262}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ColourWarp]]&lt;br /&gt;
| Smooth remapping of UV colour values using control points for colour correction.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[ColourWarp|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGCube]]&lt;br /&gt;
|[[AviSynth+]] plugin to load and apply .cube [http://en.wikipedia.org/wiki/3D_lookup_table 3D LUTs]. (GPU accelerated - CUDA)&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBP16]]&lt;br /&gt;
|[[DGCube|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGHDRtoSDR]]&lt;br /&gt;
|[[AviSynth+]] plugin to convert UHD BluRay HDR10 to SDR. (GPU accelerated - CUDA)&lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P16]]&lt;br /&gt;
|[[DGHDRtoSDR|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGPQtoHLG]]&lt;br /&gt;
|[[AviSynth+]] plugin to convert UHD BluRay HDR10 PQ to HDR10 HLG. GPU accelerated - CUDA) &lt;br /&gt;
|[[Avisynthplus_color_formats|YUV420P16]]&lt;br /&gt;
|[[DGPQtoHLG|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[[DGTonemap]]&lt;br /&gt;
|[[AviSynth+]] plugin for basic Reinhard tonemapping for HDR-&amp;gt;SDR.&lt;br /&gt;
|[[Avisynthplus_color_formats|RGBPS]]&lt;br /&gt;
|[[DGTonemap|Plugin]]&lt;br /&gt;
|{{Author/Donald Graft}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/erazortt/DoViBaker DoViBaker]&lt;br /&gt;
|This AviSynth plugin reads the Base Layer, Enhancement Layer and RPU data from a profile 7 DolbyVision stream to create a clip with the DolbyVision data baked in.&lt;br /&gt;
|[[YUV444P16]], [[YUV420P16]]&lt;br /&gt;
|[https://github.com/erazortt/DoViBaker/releases Plugin]&lt;br /&gt;
|[https://github.com/erazortt erazortt]&lt;br /&gt;
|-&lt;br /&gt;
| [[ExpLabo]]&lt;br /&gt;
| ExpLabo is a multi-filters plugin, focused on the non-linear transformation of image color space.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ExpLabo|Plugin]]&lt;br /&gt;
| brabbudu&lt;br /&gt;
|-&lt;br /&gt;
|[https://web.archive.org/web/20180916224719/http://mpierce.pie2k.com/pages/211.php Exposure]&lt;br /&gt;
|Exposure function for AviSynth.&lt;br /&gt;
|[[RGB24]]&lt;br /&gt;
|[https://web.archive.org/web/20171023011558if_/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;
|[[GamMac]]&lt;br /&gt;
|Useful to correct color cast on old 8mm films.&lt;br /&gt;
|[[RGB32]], [[RGB24]]&lt;br /&gt;
|[[GamMac|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[GamMatch]]&lt;br /&gt;
|Gamma Matcher; useful to correct bad color clip where there is a better color source of perhaps lower rez available.&lt;br /&gt;
|[[RGB32]], [[RGB24]]&lt;br /&gt;
|[[GamMatch|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [[GiCocu]]&lt;br /&gt;
| Use GIMP/Photoshop curve files.&lt;br /&gt;
| [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[GiCocu|Plugin]]&lt;br /&gt;
| E-Male&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/magiblot/gradation Gradation]&lt;br /&gt;
|Gradation Curves filter for VirtualDub and AviSynth+ &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[https://github.com/magiblot/gradation/releases Plugin]&lt;br /&gt;
|[https://github.com/magiblot magiblot]&lt;br /&gt;
|-&lt;br /&gt;
|[[GradationCurve]]&lt;br /&gt;
|[[AviSynth+]] plugin that loads Photoshop ACV and GIMP crv curve files. Also can compute the gradation curve through given anchor points. Like what Photoshop and Gimp do in the Curves setting.&lt;br /&gt;
|[[Avisynthplus_color_formats|PlanarRGB, PlanarYUV]]&lt;br /&gt;
|[[GradationCurve|Plugin+Script]]&lt;br /&gt;
|ErazorTT&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;
|[https://github.com/Asd-g/AviSynthPlus-grayworld grayworld]&lt;br /&gt;
|Port of [https://ffmpeg.org/ffmpeg-filters.html#grayworld FFmpeg's grayworld] filter to AviSynth+. See [https://forum.doom9.org/showthread.php?t=183750 discussion]&lt;br /&gt;
|[[RGBPS]], [[RGBAPS]]&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-grayworld/releases Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[HDRAGC|Plugin]]&lt;br /&gt;
| {{Author/paviko}}&lt;br /&gt;
|-&lt;br /&gt;
|[[HDRTools]]&lt;br /&gt;
|HDR color conversion plugin for AviSynth+.&lt;br /&gt;
|[[RGB32]], [[RGB64]], Planar YUV/RGB (8-16 and 32bit)&lt;br /&gt;
|[[HDRTools|Plugin]]&lt;br /&gt;
|[https://github.com/jpsdr jpsdr]&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;
| [[HistogramAdjust|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;
| [[Histograms in RGB &amp;amp; CMY|Script]]&lt;br /&gt;
| -Vit-&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/magiblot/HSLTint HSLTint]&lt;br /&gt;
|An [[AviSynth+]] filter for creating monochromatic tints with user-defined hue and saturation.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]] - all bit-depths&lt;br /&gt;
|[https://github.com/magiblot/HSLTint/blob/master/HSLTint.avsi Script]&lt;br /&gt;
|magiblot&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.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[HSVAdjust|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.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[Hue|Plugin]]&lt;br /&gt;
|{{Author/Wilbert Dijkhof}}&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Tonemap|libplacebo_Tonemap]]&lt;br /&gt;
|Dynamic HDR tone mapping, includes peak and scene-change detection, chroma-preserving (luma-only) tone mapping, highlight desaturation, dynamic exposure control and a variety of industry-standard EETFs including BT.2390. &lt;br /&gt;
|16-bit planar RGB or YUV444P16 &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176091 LinearTransformation]&lt;br /&gt;
|This script performs Linear Transformations based on a matrix conversion. Matrices are made by Francesco Bucciantini (FranceBB).&lt;br /&gt;
|[[YV12]], [[YV16]], [[YV24]], [[RGB24]], [[RGB32]], [[RGB32]], [[RGB48]],[[RGBPS]]&lt;br /&gt;
|[https://github.com/FranceBB/LinearTransformation Linear Transformation]&lt;br /&gt;
|[https://forum.doom9.org/member.php?u=219051 FranceBB]&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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[MatchHistogram|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;
| [[OutRange|Script]]&lt;br /&gt;
| 06_taro&lt;br /&gt;
|-&lt;br /&gt;
|[[RGBAdapt]]&lt;br /&gt;
|Another RGB color correction plugin, it also also includes a graffer.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[RGBAdapt|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[RgbAmplifier]]&lt;br /&gt;
|An AviSynth forensic plugin to amplify color shifts.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[RgbAmplifier|Plugin]]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
| [https://forum.doom9.org/showthread.php?t=181857 SafeColorLimiter]&lt;br /&gt;
| Automatic Clipping to get a broadcast safe output in Limited TV Range.&lt;br /&gt;
| [[Y8]], [[Y10]], [[Y12]], [[Y14]], [[Y16]], [[Y32]], [[YV12]], [[YV411]], [[YUY2]], [[YV16]], [[YV24]]&lt;br /&gt;
| [https://github.com/FranceBB/SafeColorLimiter Script]&lt;br /&gt;
| [http://forum.doom9.org/member.php?u=219051 FranceBB]&lt;br /&gt;
|-&lt;br /&gt;
|[[SelectiveColour]]&lt;br /&gt;
|AviSynth implementation of Photoshop's selective colour adjustment. &lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[SelectiveColour|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&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;
|[[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;
|[[ShowChannels|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;
| [[ShowOverRange|Plugin]]&lt;br /&gt;
| {{Author/SAPikachu}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SmoothAdjust]]&lt;br /&gt;
| SmoothAdjust is a set of 5 plugins to make YUV adjustments. These 5 plugins have a smoothing &amp;amp; dithering algorithm to avoid banding issue. SmoothAdjust is [[SmoothLevels|SmoothLevels']] successor. &lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[SmoothAdjust|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;
| [[TweakColor]]&lt;br /&gt;
| Target specific hue and saturation ranges for hue and saturation adjustments.&lt;br /&gt;
| [[YV12]], [[YUY2]]&lt;br /&gt;
| [[TweakColor|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;
| [[VideoScope|Plugin]]&lt;br /&gt;
| {{Author/Randy French}}&lt;br /&gt;
|-&lt;br /&gt;
| [http://forum.doom9.org/showthread.php?p=1832763#post1832763 VideoTek]&lt;br /&gt;
| VideoTek is a Tektronix-like waveform monitor for AviSynth.&lt;br /&gt;
| [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [https://github.com/FranceBB/VideoTek/blob/master/VideoTek.avsi Script]&lt;br /&gt;
| [http://forum.doom9.org/member.php?u=219051 FranceBB]&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.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[WhiteBalance|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;
|[https://forum.doom9.org/showthread.php?t=181665 AiUpscale]&lt;br /&gt;
|An AviSynth+ implementation of some Super-Resolution Convolutional Neural Networks.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[https://github.com/Alexkral/AviSynthAiUpscale Script]&lt;br /&gt;
|[https://github.com/Alexkral Alexkral]&lt;br /&gt;
|-&lt;br /&gt;
|[[Anime4KCPP]]&lt;br /&gt;
|Anime4K is a simple high-quality anime upscale algorithm with GPU acceleration support. [[AviSynth+]] x64 only.&lt;br /&gt;
|[[RGB24]], [[YV24]], [[YV16]], [[YV12]]&lt;br /&gt;
|[[Anime4KCPP|Plugin]]&lt;br /&gt;
|TianZerL&lt;br /&gt;
|-&lt;br /&gt;
| [[avsresize]]&lt;br /&gt;
| [http://github.com/sekrit-twc/zimg z.lib] resizers for [[AviSynth+]]. avsresize provides resizing, colorspace and bit depth conversation. &lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
| [[avsresize|Plugin]]&lt;br /&gt;
| [http://github.com/sekrit-twc sekrit-twc]&lt;br /&gt;
|-&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;
| [[AreaResize|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}, Aktanusa&lt;br /&gt;
|-&lt;br /&gt;
|[https://gist.github.com/kgrabs/b042214d715176ac9ab563c188995457 Desample]&lt;br /&gt;
|Desampling functions for AviSynth+, replaces DebilinearM and lineart_rpow2. Also includes DeCrossConversionMT which is a replacement for ccc, ccc_720.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[https://gist.github.com/kgrabs/b042214d715176ac9ab563c188995457 Script]&lt;br /&gt;
|[https://github.com/kgrabs kgrabs]&lt;br /&gt;
|-&lt;br /&gt;
|[[Descale]]&lt;br /&gt;
|AviSynth+ filter to undo upscaling.&lt;br /&gt;
|All planar Y/YUV/RGB color formats&lt;br /&gt;
|[[Descale|Plugin]]&lt;br /&gt;
|[https://github.com/Frechdachs Frechdachs]&lt;br /&gt;
|-&lt;br /&gt;
|[[DPID]]&lt;br /&gt;
|DPID is an algorithm that preserves visually important details in downscaled images and is especially suited for large downscaling factors. &lt;br /&gt;
|All [[planar]] colorspaces&lt;br /&gt;
|[[DPID|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[FCBI]]&lt;br /&gt;
|Fast Curvature Based Interpolation.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], 8-16bit planar clips&lt;br /&gt;
|[[FCBI|Plugin]]&lt;br /&gt;
|{{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[fmtconv]]&lt;br /&gt;
| fmtconv is a format-conversion plug-in, it provides resizing, colorspace and bitdepth conversation. &lt;br /&gt;
| All [[planar]] 8 to 32-bit colorspaces&lt;br /&gt;
| [[fmtconv|Plugin]]&lt;br /&gt;
| {{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[JincResize]]&lt;br /&gt;
| Jinc (EWA Lanczos) Resampler Plugin for AviSynth/AviSynth+.&lt;br /&gt;
| All 8-32bit [[planar]] colorspaces&lt;br /&gt;
| [[JincResize|Plugin]]&lt;br /&gt;
| innocenat&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Resample|libplacebo_Resample]]&lt;br /&gt;
|High-quality, optimized upscaling and downscaling including support for polar filters (&amp;quot;Jinc&amp;quot;), anti-aliasing, anti-ringing and gamma correct scaling&lt;br /&gt;
|8, 16 or 32-bit planar RGB/YUV formats. &lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[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;
|[[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).&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[PointSize|Plugin]]&lt;br /&gt;
| `Orum&lt;br /&gt;
|-&lt;br /&gt;
| [[ResampleHQ]]&lt;br /&gt;
| ResampleHQ provides gamma-aware resizing and colorspace conversion.&lt;br /&gt;
| [[YV12]], [[YUY2]], [[RGB24]], [[RGB32]]&lt;br /&gt;
| [[ResampleHQ|Plugin]]&lt;br /&gt;
| Cory Nelson&lt;br /&gt;
|-&lt;br /&gt;
|[[ResampleMT]]&lt;br /&gt;
|Internaly multi-threaded resampling functions, also includes desampling functions (DeBilinear, DeBicubic,...).&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[Avisynthplus_color_formats|plus HBD formats in AVS+]]&lt;br /&gt;
|[[ResampleMT|Plugin]]&lt;br /&gt;
|[http://github.com/jpsdr jpsdr]&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;
| [[SimpleResize|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://forum.doom9.org/showthread.php?t=175945 Unwiden/Widen]&lt;br /&gt;
|Resize filters to unwiden/widen, see discussion. &lt;br /&gt;
|[[RGB32]], [[YV24]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=175945 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[w2xncnnvk]]&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Waifu2x waifu2x] implemented in Vulkan.&lt;br /&gt;
|[[RGBPS]]&lt;br /&gt;
|[[w2xncnnvk|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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.&lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[aSharp|Plugin]]&lt;br /&gt;
| {{Author/Marc FD}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AVSShock|C-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.&lt;br /&gt;
| [[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV formats,  8 to 16-bit&lt;br /&gt;
| [[aWarpSharp2|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;
|[[CAS]]&lt;br /&gt;
|Contrast Adaptive Sharpening.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], all planar Y, YUV(A), RGB(A) formats,  8 to 32-bit&lt;br /&gt;
|[[CAS|Plugin]]&lt;br /&gt;
|Asd-g&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 old &amp;lt;tt&amp;gt;MSharpen&amp;lt;/tt&amp;gt; plugin.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[TUnsharp|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.&lt;br /&gt;
| [[YUY2]], [[YV12]]&lt;br /&gt;
| [[UnFilter|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. &lt;br /&gt;
| [[YV12]]&lt;br /&gt;
| [[UnsharpHQ|Plugin]]&lt;br /&gt;
| list&lt;br /&gt;
|-&lt;br /&gt;
|[[vsMSharpen]]&lt;br /&gt;
|vsMSharpen is a sharpener that tries to sharpen only edges. This plugin is a port of the VapourSynth plugin MSharpen. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], all planar Y, YUV, and RGB formats,  8 to 16 bit&lt;br /&gt;
|[[vsMSharpen|Plugin]]&lt;br /&gt;
|Dubhater, Asd-g&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;
| [[WarpSharp|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;
| [[RGB24]], [[RGB32]], [[Y8]]&lt;br /&gt;
| [[DeBarrel|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[Defish]]&lt;br /&gt;
|Barrel and pincushion distortion correction filter.&lt;br /&gt;
|[[RGB32]]&lt;br /&gt;
|[[Defish|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.&lt;br /&gt;
| [[Y8]], [[YV12]],[[YV24]]&lt;br /&gt;
| [[FTurn|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. Quad is now superseded by [[warp]].&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;
| [[Reform]]&lt;br /&gt;
| Skewed images are corrected or vice versa, useful if video is recorded with slightly incorrectly located camera. Sometimes referred to as perspective correction.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Reform|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Reformer]]&lt;br /&gt;
| Perspective correction and warping.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[Reformer|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Rotate]]&lt;br /&gt;
| Rotate or shear on any given angle.&lt;br /&gt;
| [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
| [[Rotate|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]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [http://www.avisynth.nl/users/vcmohan/Spinner/Spinner_2_6.zip Plugin]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[warp]]&lt;br /&gt;
|A collection of geometry correction filters (also includes new version of Quad).&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[[warp|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[xyremap|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Zoom]]&lt;br /&gt;
| Zoom, Pan &amp;amp; Rotate Clip. Adds alpha layer to clip.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
| [[Zoom|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. &lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YV24]], [[YV12]], [[Y8]]&lt;br /&gt;
| [[AssRender|C-Plugin]]&lt;br /&gt;
| lachs0r, TheFluff&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183148 DetSub]&lt;br /&gt;
|Can be used to remove hardcoded subtitles with halo from video or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183148 Script]&lt;br /&gt;
|{{Author/StainlessS}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FreeSub]]&lt;br /&gt;
|Subtitle with bdf fonts.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YV24]]&lt;br /&gt;
|[[FreeSub|C-Plugin]]&lt;br /&gt;
|Natt&lt;br /&gt;
|-&lt;br /&gt;
|[[FreeSubPlus]]&lt;br /&gt;
|Script that adds support for additional colorspaces to the FreeSub plugin. &lt;br /&gt;
|All colorspaces&lt;br /&gt;
|[[FreeSubPlus|Script]]&lt;br /&gt;
|reel.deel&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 InpaintDelogo]&lt;br /&gt;
|Can be used to remove hardcoded subtitles from video or extract them to images for OCR.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176860 Script]&lt;br /&gt;
|VoodooFX&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;
|[https://github.com/Asd-g/AviSynthPlus-SubImageFile SubImageFile]&lt;br /&gt;
|AviSynth+ plugin that renders image-based subtitles such as VOBSUB and PGS.&lt;br /&gt;
|[[RGB24]], [[Y8]]&lt;br /&gt;
|[https://github.com/Asd-g/AviSynthPlus-SubImageFile/releases/ Plugin]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[SubtitleEx]]&lt;br /&gt;
| Similar to the original [[Subtitle]] function but can do more: apply text to range; effects - bold, underline, italic, center, fading, motion, blur, emboss, etc...; alpha channel.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
| [[SubtitleEx|Plugin]]&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;
| [[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;
| [[SupTitle|Plugin]]&lt;br /&gt;
| {{Author/ZachSaw}}&lt;br /&gt;
|-&lt;br /&gt;
|[[tcasFilter]]&lt;br /&gt;
|Renders TCAS subtitle effects.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
|[[tcasFilter|Plugin]]&lt;br /&gt;
|milkyjing&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;
| [[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;
|[[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
| [[VSFilterMod|Plugin]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|[[xy-VSFilter]]&lt;br /&gt;
|High performance VSFilter compatible subtitle filters.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[YV12]]&lt;br /&gt;
|[[xy-VSFilter|Plugin]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Transitions ===&lt;br /&gt;
&lt;br /&gt;
{{FilterTable}}&lt;br /&gt;
| DissolveAGG&lt;br /&gt;
| Wipe Transition with a soft edge. See [http://forum.doom9.org/showthread.php?t=118016 discussion]. &lt;br /&gt;
'''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)], [http://forum.doom9.org/showthread.php?p=1152440#post1152440 Script (v2)], [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;
| [[TransAll|Plugin]]&lt;br /&gt;
| {{Author/vcmohan}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition_AlbertGasset|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;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Transition_AlbertGasset|C-Plugin]]&lt;br /&gt;
| {{Author/Albert Gasset}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Transition_Shubin|Transition (Shubin)]]&lt;br /&gt;
| Contains 2 transition modes: circle and line.&lt;br /&gt;
| [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]]&lt;br /&gt;
| [[Transition_Shubin|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=174797 AVSMeter]&lt;br /&gt;
| AVSMeter is a CLI (command line interface) tool which measures the speed/efficiency of Avisynth scripts and checks if Avisynth and its plugin sub-system are set up and working correctly. Documentation for usage and features is included in the distribution package.&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=176079 Avisynth Info Tool]&lt;br /&gt;
| This program performs a thorough test of your Avisynth installation and associated plugins, checking if external dependencies are installed, etc.&lt;br /&gt;
|&lt;br /&gt;
| Windows application with graphical user interface&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=173259 avsr]&lt;br /&gt;
|CLI (command line interface) tool which simply executes an Avisynth script. This is useful when, for example, you want to write an image sequence to the disk by using &amp;quot;ImageWriter&amp;quot;.&lt;br /&gt;
|&lt;br /&gt;
| Command line executable&lt;br /&gt;
| Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[[Butteraugli]]&lt;br /&gt;
|Butteraugli is an estimating filter for the psychovisual similarity of two images.&lt;br /&gt;
|8-32bit planar RGB/RGBA&lt;br /&gt;
|[[Butteraugli|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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.&lt;br /&gt;
|[[RGB32]], [[RGB24]], [[YUY2]], [[YV12]] &lt;br /&gt;
|[[ColorDiff|C-Plugin]]&lt;br /&gt;
|Ignus2&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182817 DebugColourSpaces]&lt;br /&gt;
|Debugging filter which applies a specified filter to multiple Avisynth+ colourspaces and displays a labelled grid of the results.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://horman.net/avisynth/download/DebugColourSpaces.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&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;
|[[FFTSpectrum]]&lt;br /&gt;
|FFTSpectrum is a filter that displays the FFT frequency spectrum of a given clip.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[FFTSpectrum|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[Info2]]&lt;br /&gt;
| A faster, prettier alternative to info().&lt;br /&gt;
|Any&lt;br /&gt;
|[[Info2|Plugin]]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[KPassFilterCL|Plugin]]&lt;br /&gt;
|[http://github.com/Khanattila Khanattila ]&lt;br /&gt;
|-&lt;br /&gt;
|[[LinesLumaDiff]]&lt;br /&gt;
|AviSynth+ plugin to check if luma difference between lines are below or above given threshold and writes frame number in text file.&lt;br /&gt;
|[[Planar]] YUV&lt;br /&gt;
|[[LinesLumaDiff|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MaxCLLFind]]&lt;br /&gt;
| PQ HDR Analyzer plugin for [[AviSynth+]], analyzes MaxCLL and MaxFALL and writes it to a text file.&lt;br /&gt;
|[[RGB64]]&lt;br /&gt;
|[[MaxCLLFind|Plugin]]&lt;br /&gt;
|Tom Arrow&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;
|[[Pixelscope]]&lt;br /&gt;
|This debugging filter displays individual pixel values.&lt;br /&gt;
|[[RGB24]], [[RGB32]], [[Y8]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?t=175688 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/EmiyaSyahriel/RollCompare RollCompare]&lt;br /&gt;
|AviSynth Plugin to create rolling comparison between videos.&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[https://github.com/EmiyaSyahriel/RollCompare/releases Plugin]&lt;br /&gt;
|EmiyaSyahriel&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;
|[[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;
|[[SSIM|Plugin]]&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;
|[https://forum.doom9.org/showthread.php?t=176131 SysInfo]&lt;br /&gt;
|This plugin returns info about OS/CPU*/Memory/Screen/AviSynth.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=176131 Plugin]&lt;br /&gt;
|Groucho2004&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=168241 Timer]&lt;br /&gt;
|AviSynth script to add a highly customizable timer to your video.&lt;br /&gt;
|Any&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=168241 Script]&amp;lt;!-- https://gist.github.com/darealshinji/9770276 --&amp;gt;&lt;br /&gt;
|djcj&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;
|[[VMAF]]&lt;br /&gt;
|VMAF is a perceptual video quality assessment algorithm developed by Netflix. &lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]],&amp;lt;br&amp;gt; 8-10bit planar YUV&lt;br /&gt;
|[[VMAF|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[scharr]]&lt;br /&gt;
|Edge detection using the [https://en.wikipedia.org/wiki/Sobel_operator#Alternative_operators Scharr operator].&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[scharr|Script]]&lt;br /&gt;
|zorr &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;
| [[tcanny|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;
| [[TCannyMod|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;
| [[TEdgeMask|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;
| [[TEMmod|Plugin]]&lt;br /&gt;
| {{Author/Chikuzen}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsTCanny]]&lt;br /&gt;
| Builds an edge map using canny edge detection. &lt;br /&gt;
| All 8-32bit [[planar]] colorspaces&lt;br /&gt;
| [[vsTCanny|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
| [[vsTEdgeMask]]&lt;br /&gt;
| vsTEdgeMask is an edge detection filter. This is a port of the TEdgeMask/TEMmod AviSynth plugins.&lt;br /&gt;
| All 8-16bit [[planar]] colorspaces&lt;br /&gt;
| [[vsTEdgeMask|Plugin]]&lt;br /&gt;
| {{Author/Asd-g}}&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;
| [https://github.com/Asd-g/AviSynth-TWriteAVI/releases Plugin]&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;
|[[AVSTP]]&lt;br /&gt;
|A library for multithreaded plug-in development&lt;br /&gt;
|Any&lt;br /&gt;
|[[AVSTP|Plugin]]&lt;br /&gt;
|{{Author/cretindesalpes}}&lt;br /&gt;
|-&lt;br /&gt;
|[[MP_Pipeline]]&lt;br /&gt;
|Run parts of an AviSynth script in external processes.&lt;br /&gt;
|Any&lt;br /&gt;
|[[MP_Pipeline|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=174433 amDCT]&lt;br /&gt;
|amDCT() is an adaptive video filter providing deblocking, sharpening, local range expansion, smoothing, and bright noise removal in a single filter that can be used on video of any level of quality. These four operations work synergistically to drastically reduce block artifacts while maintaining detail and increasing local contrast.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[http://sites.google.com/site/amdctfilter/ Plugin]&lt;br /&gt;
|jconklin&lt;br /&gt;
|-&lt;br /&gt;
|[[AVExtensions]]&lt;br /&gt;
|Audio-video extensions is a collection of various AviSynth filters used to modify audio or video. &lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[[AVExtensions|Plugin]]&lt;br /&gt;
|nutbread&lt;br /&gt;
|-&lt;br /&gt;
|[[AviSynthShader]]&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;
|[[AviSynthShader|Plugin]]&lt;br /&gt;
|[http://github.com/mysteryx93 MysteryX]&lt;br /&gt;
|-&lt;br /&gt;
|[[avs-mlrt]]&lt;br /&gt;
|This project provides AviSynth+ ML filter runtimes for variety of platforms. &lt;br /&gt;
|Y32, RGPS&lt;br /&gt;
|[[avs-mlrt|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[[CLExpr|Plugin]]&lt;br /&gt;
|{{Author/tp7}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=183823 CTools]&lt;br /&gt;
|Includes various filters for IVTC, deinterlacing, denoising, dehalo and duplicate frames.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
|[https://github.com/CeppoTools/CTools/releases Plugin]&lt;br /&gt;
|Ceppo&lt;br /&gt;
|-&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;
| [[MaskTools2|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;
| [[MVTools|Plugin]]&lt;br /&gt;
| Various&lt;br /&gt;
|-&lt;br /&gt;
|[[avslibplacebo#Shader|Shader]]&lt;br /&gt;
|Loads GLSL shaders written in mpv's .hook syntax.&lt;br /&gt;
|16-bit planar YUV&lt;br /&gt;
|[[avslibplacebo|Plugin]]&lt;br /&gt;
|{{Author/Asd-g}}&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;
|[[AvsFilterNet]]&lt;br /&gt;
|The main objective of AvsFilterNet is to provide a wrapper for AviSynth, making it possible to write simple filter in any .Net languages. &lt;br /&gt;
|N/A&lt;br /&gt;
|[[AvsFilterNet|Plugin]]&lt;br /&gt;
|SAPikachu&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AvsMotion|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;
|[[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;
|[[CallCmd|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[ClipBoard]]&lt;br /&gt;
|Get text from Clipboard.&lt;br /&gt;
|N/A&lt;br /&gt;
|[[ClipBoard|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=182910 Feedback]&lt;br /&gt;
|A filter that lets you use a filter chain's output as its own input.&lt;br /&gt;
|Any&lt;br /&gt;
|[http://horman.net/avisynth/download/feedback.zip Plugin]&lt;br /&gt;
|{{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[FileSize]]&lt;br /&gt;
|Plugin to get filesize.&lt;br /&gt;
|N/A&lt;br /&gt;
|[[FileSize|Plugin]]&lt;br /&gt;
|pureexe&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.roelofs-coaching.nl/blobs/downloads/ProgramName.html GetProgramName]&lt;br /&gt;
|An AviSynth plug-in to retrieve the name of the calling application.&lt;br /&gt;
|N/A&lt;br /&gt;
|[https://www.roelofs-coaching.nl/blobs/downloads/ProgramName.zip Plugin]&lt;br /&gt;
|[http://www.roelofs-coaching.nl/J.M. Roelofs]&lt;br /&gt;
|-&lt;br /&gt;
|[[GetProgramName2]]&lt;br /&gt;
|GetProgramName2 is similar to GetProgramName by JM Roelofs, but this plugin is a newly written.  &lt;br /&gt;
|N/A&lt;br /&gt;
|[[GetProgramName2|Plugin]]&lt;br /&gt;
|[https://github.com/enccc enccc]&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;
| [[GRunT|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;
| [[GScript|Plugin]]&lt;br /&gt;
| {{Author/Gavino}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
| [[LoadDLL|Plugin]]&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=162790 MinMax]&lt;br /&gt;
|Finds the min or max value in each line or column and then sets the entire line or column to that value. Only processes the luma (Y) plane.&lt;br /&gt;
|[[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]&lt;br /&gt;
|[https://web.archive.org/web/20160610142230if_/http://latoninf.free.fr/div/minmax.7z Plugin]&lt;br /&gt;
|{{Author/LaTo}}&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;
|[https://web.archive.org/web/20160606142540if_/http://www.tsp.person.dk/pop.zip Plugin]&lt;br /&gt;
|{{Author/tsp}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RT_Stats]]&lt;br /&gt;
| Compile-time/Runtime Functions.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[RT_Stats|Plugin]]&lt;br /&gt;
| StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[[StrFmt]]&lt;br /&gt;
|Simple plugin to produce formatted string, and additional function to string replace with another string.&lt;br /&gt;
|Any&lt;br /&gt;
|[[StrFmt|Plugin]]&lt;br /&gt;
|StainlessS&lt;br /&gt;
|-&lt;br /&gt;
|[https://forum.doom9.org/showthread.php?t=174387 StrResolve]&lt;br /&gt;
|String Variables Resolving Plugin (for masktools expressions)&lt;br /&gt;
|Any&lt;br /&gt;
|[http://www.mediafire.com/file/wu6zexhssd0y77i/170310_StrResolve_v050.zip Plugin]&lt;br /&gt;
|martin53&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;
&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;
| [[Dither_tools|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;
|[https://sourceforge.net/projects/voix/files/2d3/ 2Dto3D]&lt;br /&gt;
|2Dto3D is a collection of scripts for 2D to 3D conversion. Conversion is good but not perfect.&lt;br /&gt;
|[[YV12]]&lt;br /&gt;
|[https://sourceforge.net/projects/voix/files/2d3/ Script]&lt;br /&gt;
|[https://sourceforge.net/u/brankoj/profile/ brankoj]&lt;br /&gt;
|-&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;
|[http://forum.doom9.org/showthread.php?p=1861891#post1861891 Audiofix]&lt;br /&gt;
|Plugin to fix a specific audio problem, see [http://forum.doom9.org/showthread.php?t=175991 discussion].&lt;br /&gt;
|&lt;br /&gt;
|[http://forum.doom9.org/showthread.php?p=1861891#post1861891 Plugin]&lt;br /&gt;
|{{Author/David Horman}}&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.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV24]], 8-bit [[Planar]] RGB&lt;br /&gt;
| [[AudioGraph|Plugin]]&lt;br /&gt;
| Richard Ling, {{author/Sh0dan}}&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AudioLimiter|Plugin]]&lt;br /&gt;
|dimzon&lt;br /&gt;
|-&lt;br /&gt;
|[[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;
|[[AudioTimeline|Plugin]]&lt;br /&gt;
|martin53&lt;br /&gt;
|-&lt;br /&gt;
| [[BeFa]]&lt;br /&gt;
| Band Eliminate Filter for Audio.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[BeFa|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. It's a conditional audio filter, so the computation is done framewise.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[MinMaxAudio|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;
|[[Normalize2|Plugin]]&lt;br /&gt;
|[http://sourceforge.net/u/jcsston/profile/ jcsston]&lt;br /&gt;
|-&lt;br /&gt;
| [[SoxFilter]]&lt;br /&gt;
| Use [http://sox.sourceforge.net/ SOX] audio effects within AviSynth. Most effects are supported, and multiple effects can be stacked after each other.&lt;br /&gt;
| N/A&lt;br /&gt;
| [[SoxFilter|Plugin]]&lt;br /&gt;
| {{author/Sh0dan}}, [https://github.com/pinterf pinterf]&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;
|[[Spectrogram|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;
| [[ViewAudio|Plugin]]&lt;br /&gt;
| {{Author/minamina}}&lt;br /&gt;
|-&lt;br /&gt;
| VUmeter&lt;br /&gt;
| Classic analog-style VU meter; see [https://forum.doom9.org/showthread.php?t=175370 discussion]. Uses MinMaxAudio.&lt;br /&gt;
| Any&lt;br /&gt;
| [https://github.com/raffriff42/AvisynthPlusUtilities script]&lt;br /&gt;
| raffriff42&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.&lt;br /&gt;
| [[RGB32]], [[RGB24]], [[YUY2]], [[YV12]]  &lt;br /&gt;
| [[Waveform|Plugin]]&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;
|[[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;
| [[amp|Plugin]]&lt;br /&gt;
| {{Author/David Horman}}&lt;br /&gt;
|-&lt;br /&gt;
|[[AutoOverlay]]&lt;br /&gt;
|Auto-aligned optimal overlay of one video clip onto another with color adjustment.&lt;br /&gt;
| [[RGB32]], [[YV24]], [[YV12]]&lt;br /&gt;
| [https://github.com/introspected/AutoOverlay/releases Plugin]&lt;br /&gt;
| [https://github.com/introspected introspected]&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://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://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=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;
|[[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/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]. [https://github.com/Youka/LVS GitHub]&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://web.archive.org/web/20160610103945/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;
|[https://sourceforge.net/projects/ssbrenderer/ SSBRenderer]&lt;br /&gt;
|SSBRenderer is a plugin for AviSynth to render 2D graphics and subtitles by SSB (Substation Beta) data on frames of video streams. [https://forum.doom9.org/showthread.php?t=169951 Doom9 Forum discussion], [https://github.com/Youka/SSBRenderer GitHub]&lt;br /&gt;
|[[RGB24]], [[RGB32]]&lt;br /&gt;
|[https://sourceforge.net/projects/ssbrenderer/files/ C-Plugin]&lt;br /&gt;
|[https://github.com/Youka Youka ]&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://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>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Xy-VSFilter</id>
		<title>Xy-VSFilter</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Xy-VSFilter"/>
				<updated>2024-01-04T08:29:48Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: new version .809&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Subtitling|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1=Gabest, guliverkli2, [https://github.com/Cyberbeing cyberbeing], {{Author/pinterf}}&lt;br /&gt;
|2=3.2.0.809&lt;br /&gt;
|3=[https://github.com/pinterf/xy-VSFilter/releases xyVSFilterSubFilter-pfmod-3.2.0.809.7z]&lt;br /&gt;
|4=Subtitling&lt;br /&gt;
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6= [https://forum.doom9.org/showthread.php?t=168282 Doom9 Forum]}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
xy-VSFilter Project (High Performance [[VSFilter]] Compatible Subtitle Filters). Based on VSFilter 2.39 Guliverkli2 with various important changes from VSFilter 2.41 MPC-HC. &lt;br /&gt;
&lt;br /&gt;
VSFilter includes the following functions:&lt;br /&gt;
*VobSub&lt;br /&gt;
*TextSub &lt;br /&gt;
*TextSubSwapUV&lt;br /&gt;
*MaskSub &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]], [[YV12]], [[YV16]], [[YV24]]&lt;br /&gt;
**AviSynth+: &amp;lt;code&amp;gt;TextSub&amp;lt;/code&amp;gt; accepts YUV420P10, YUV420P16, YUV422P10 and YUV422P16 formats&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
===TextSub===&lt;br /&gt;
Adds subtitles from text-based subtitle formats.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Format name&amp;lt;br /&amp;gt;&lt;br /&gt;
! Extension&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/SubStation_Alpha SubStation Alpha / Advanced SubStation Alpha]&lt;br /&gt;
|.ssa / .ass&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/SubRip SubRip]&lt;br /&gt;
|.srt&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/MicroDVD MicroDVD]&lt;br /&gt;
|.sub&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/SAMI SAMI]&lt;br /&gt;
|.smi&lt;br /&gt;
|-&lt;br /&gt;
|PowerDivX&lt;br /&gt;
|.psb&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Universal_Subtitle_Format Universal Subtitle Format]&lt;br /&gt;
|.usf&lt;br /&gt;
|-&lt;br /&gt;
|Structured Subtitle Format&lt;br /&gt;
|.ssf&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/WebVTT WebVTT]&lt;br /&gt;
|.vtt&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:{{Template:FuncDef|TextSub (clip, string &amp;quot;file&amp;quot;, int &amp;quot;charset&amp;quot;, float &amp;quot;fps&amp;quot;, string &amp;quot;vfr&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|file|string|}}&lt;br /&gt;
:::Path to subtitles file.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|charset|int|1}}&lt;br /&gt;
:::''charset'' is the encoding to assume the file is in, if it's not Unicode UTF-8 or UTF-16. (If you need to use this you're doing something wrong.)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|fps|float|-1.0}}&lt;br /&gt;
:::''fps'' is the FPS to assume the video is at. You could just as well just use &amp;lt;code&amp;gt;AssumeFPS&amp;lt;/code&amp;gt; instead of using this. VFR overrides this.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|vfr|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::''vfr'' is the path to the VFR timecodes file (format 1 or 2) to use for frame times. If set, overrides all other FPS specifications.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===VobSub===&lt;br /&gt;
Adds image-based subtitles in VobSub format. It consists of an *.idx file that stores the subtitle properties and a .sub file that contains the binary data..&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:{{Template:FuncDef|VobSub (clip, string) }}&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| |string| }}&lt;br /&gt;
:::Path to subtitles file, only .idx and .sub files supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===MaskSub===&lt;br /&gt;
Creates a subtitle mask. &amp;lt;!--See [https://sourceforge.net/p/guliverkli2/patches/1/ here] for more info.--&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:{{Template:FuncDef|MaskSub (string &amp;quot;file&amp;quot;, int &amp;quot;width&amp;quot;, int &amp;quot;height&amp;quot;, float &amp;quot;fps&amp;quot;, int &amp;quot;length&amp;quot;, int &amp;quot;charset&amp;quot;, string &amp;quot;vfr&amp;quot;, string &amp;quot;pixel_type&amp;quot;) }}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|file|string|}}&lt;br /&gt;
:::Path to subtitles file.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|width|int| }}&lt;br /&gt;
::{{Par2|height|int| }}&lt;br /&gt;
:::''width'' and ''height'' specify the size of the generated clip, in pixels.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|fps|float| }}&lt;br /&gt;
:::''fps'' specifies the framerate of the generated clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|length|int| }}&lt;br /&gt;
:::''length'' is the number of frames to produce in the clip.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|charset|int| }}&lt;br /&gt;
:::''charset'' is the encoding to assume the file is in, if it's not Unicode UTF-8 or UTF-16. (If you need to use this you're doing something wrong.)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|vfr|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::''vfr'' is the path to the VFR timecodes file (format 1 or 2) to use for frame times.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|pixel_type|string|&amp;quot;RGB32&amp;quot;}}&lt;br /&gt;
:::Pixel type, can be set to: &amp;lt;code&amp;gt;&amp;quot;RGB32&amp;quot;, &amp;quot;YUV420P10&amp;quot; or &amp;quot;YUV420P16&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
:::&amp;lt;s&amp;gt;'''Note:''' With &amp;quot;RGB32&amp;quot; output the mask is flipped vertically, use &amp;lt;code&amp;gt;[[FlipVertical]]()&amp;lt;/code&amp;gt; to correct it.&amp;lt;/s&amp;gt; - Fixed in v3.2.0.808&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TextSubSwapUV===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:{{Template:FuncDef|TextSubSwapUV (bool) }}&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| |bool|false}}&lt;br /&gt;
:::Toggles (globally) whether to swap assume the U and V planes are swapped in YV12 video when rendering subtitles. Default is false.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 TextSub(file=&amp;quot;subtitle.ass&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
 #Assume clip is 1280x720, 24fps, and 3,000 frames total&lt;br /&gt;
 MaskSub(file=&amp;quot;subtitle.ass&amp;quot;, width=1280, height=720, fps=24, length=3000)&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 #or alternatively you can get the [[Clip_properties|clip properties]]&lt;br /&gt;
 video =  AviSource(&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 MaskSub(file=&amp;quot;subtitle.ass&amp;quot;, width=video.Width(), height=video.Height(), fps=video.FrameRate(), length=video.FrameCount())&lt;br /&gt;
&lt;br /&gt;
 [[AviSource]](&amp;quot;Blah.avi&amp;quot;)&lt;br /&gt;
 VobSub(&amp;quot;subtitle.sub&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
See GitHub releases page: https://github.com/pinterf/xy-VSFilter/releases&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
*[https://github.com/pinterf/xy-VSFilter GitHub] - Source code repository (latest version from pinterf).&lt;br /&gt;
*[https://github.com/HomeOfVapourSynthEvolution/xy-VSFilter GitHub] - xy-VSFilter with VapourSynth interface added, based on pinterf's fork&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#Subtitling|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/SoxFilter</id>
		<title>SoxFilter</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/SoxFilter"/>
				<updated>2024-01-04T08:27:37Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: version 2.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Plugins|Plugins_x64|Audio_filters}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
| pinterf v2.2&lt;br /&gt;
{{author/Sh0dan}} v1.1 beta&lt;br /&gt;
| v2.2&lt;br /&gt;
| 3=[https://github.com/pinterf/SoxFilter/releases SoxFilter 2 releases]&lt;br /&gt;
| 4=Audio filters&lt;br /&gt;
| 5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
| 6=[https://forum.doom9.org/showthread.php?t=104792 Doom9 Forum]&amp;lt;br&amp;gt;[https://forum.doom9.org/showthread.php?t=181566 Doom9 Forum (v1.1 x64 version)]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This plugin will allow you to run [http://sox.sourceforge.net/ SOX] effects within AviSynth. Most effects are supported, and multiple effects can be stacked after each other.&lt;br /&gt;
&amp;lt;br&amp;gt;Version 1.1 is based on SoX library 12.17.9&lt;br /&gt;
&amp;lt;br&amp;gt;Version 2.0 is based on SoX library 14.4.2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SoX library works with 32 bit integer samples internally. All inputs will be automatically converted to this audio format.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
=== v2.x ===&lt;br /&gt;
* [x86/x64]: [[AviSynth+ 3.7.3]]&lt;br /&gt;
=== v1.1 === &lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.5.8 or greater]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: N/A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|SoxFilter (clip, string effect1 [, string effect 2, string effect 3...])}}&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||string|}}&lt;br /&gt;
:::Any number of effects can be entered, and they will be executed in the order they are specified. Effect syntax is just like SOX. See [[#Effect Overview|Effect Overview]] and [[#Filter Reference|Filter Reference]] below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
A simple filter could look like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 500 100&amp;quot;)&lt;br /&gt;
convertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will keep a 100Hz band around 500Hz. SoxFilter converts audio to 32 bit integers. This allows to keep the additional dynamic range of float point samples, but it requires a convertion to 16 bit audio before output, since most codecs only support 16 bit.&lt;br /&gt;
&lt;br /&gt;
Multiple effects can be stacked like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 2000 1000&amp;quot;, &amp;quot;vol 2.0&amp;quot;, &amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
ConvertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which is a faster version of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 2000 1000&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;vol 2.0&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
ConvertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== AviSynth Specifics ==&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Since v1.1 release SoX library internal API has been changed. v2.x was created from scratch.&lt;br /&gt;
Also, some effects were removed, and others added in the past ~15 years. &lt;br /&gt;
The parameters of some effects had been changed as well.&lt;br /&gt;
&lt;br /&gt;
E.g. reverb parameters were modified in 2008; &amp;quot;filter&amp;quot; was removed, use &amp;quot;sinc&amp;quot; instead &lt;br /&gt;
(with a different syntax).&lt;br /&gt;
&lt;br /&gt;
Check SoxFilter_usages.txt in v2.x release pack, or visit &lt;br /&gt;
https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects&lt;br /&gt;
for effect parameters and their actual description.&lt;br /&gt;
&lt;br /&gt;
=== Known Issues ===&lt;br /&gt;
&lt;br /&gt;
* Linear access is heavily recommended. SOX filters doesn't support seeking, so stream is restarted every time a samples previous to the last one is requested.&lt;br /&gt;
* Do not use Avisynth+ versions before 3.7.3 if filter result is used later in the script multiple times. Audio cache (which was reintroduced in Avisynth+ 3.7.3) is a must have in those cases.&lt;br /&gt;
* (v2.1-) none of filters were removed from 14.4.2 SoX library, still, some may be incompatible. Filters can even change sample rate or alter the number of channels. In v1.1 these filters were not allowed.&lt;br /&gt;
* (v1.1 only) The AviSynth version is VERY picky about spaces. If you make double spaces or a space before or after the quotes the command will not be recognized.&lt;br /&gt;
* (v1.1 only) If one filter doesn't support multichannel audio the entire chain is converted to mono filters, this might affect some filters like '''earwax'''. Use multiple filter instances instead.&lt;br /&gt;
* (v1.1 only) Some filters have been removed since they were incompatible with the AviSynth version. All these filters have internal Avisynth equivalents.&lt;br /&gt;
* (v1.1 only) '''compand''' is very unstable in the current interface, and doesn't support restarts (distorted audio). Don't use this together with other effetcs.&lt;br /&gt;
* (v1.1 only) The length of audio cannot be modified.&lt;br /&gt;
&lt;br /&gt;
=== Version 1.1 ===&lt;br /&gt;
&lt;br /&gt;
*Solved issue with earwax refusing to play.&lt;br /&gt;
&lt;br /&gt;
*Solved problem with time alternating effects.&lt;br /&gt;
&lt;br /&gt;
*Solved issues with some filters producing clicks.&lt;br /&gt;
&lt;br /&gt;
*Made sure compand and mcompand doesn't crash. Still quite buggy though.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Effect Overview ==&lt;br /&gt;
&lt;br /&gt;
This section contains effects supported in SoxFilter v1.1 (12.17.9 SoX Library version).&lt;br /&gt;
&lt;br /&gt;
For effects supported by SoxFilter v2.x (SoX Library 14.4.2) visit&lt;br /&gt;
https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects&lt;br /&gt;
for parameters and their actual description.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       Effects:&lt;br /&gt;
           band [ -n ] center [ width ]&lt;br /&gt;
           bandpass frequency bandwidth&lt;br /&gt;
&lt;br /&gt;
           bandreject frequency bandwidth&lt;br /&gt;
           chorus gain-in gain out delay decay speed depth&lt;br /&gt;
&lt;br /&gt;
                  -s | -t [ delay decay speed depth -s | -t ]&lt;br /&gt;
           compand attack1,decay1[,attack2,decay2...]&lt;br /&gt;
                   in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
                   [ gain [ initial-volume [ delay ] ] ]&lt;br /&gt;
&lt;br /&gt;
           dcshift shift [ limitergain ]&lt;br /&gt;
           deemph&lt;br /&gt;
           earwax&lt;br /&gt;
           echo gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
           echos gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
           fade [ type ] fade-in-length&lt;br /&gt;
&lt;br /&gt;
                [ stop-time [ fade-out-length ] ]&lt;br /&gt;
           filter [ low ]-[ high ] [ window-len [ beta ]]&lt;br /&gt;
           flanger gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
           highp frequency&lt;br /&gt;
           highpass frequency&lt;br /&gt;
           lowp frequency&lt;br /&gt;
           lowpass frequency&lt;br /&gt;
&lt;br /&gt;
           mask&lt;br /&gt;
           mcompand &amp;quot;attack1,decay1[,attack2,decay2...]&lt;br /&gt;
              in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
              [ gain [ initial-volume [ delay ] ] ]&amp;quot; xover_freq&lt;br /&gt;
           noiseprof [profile-file]&lt;br /&gt;
           noisered profile-file [threshold]&lt;br /&gt;
           phaser gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
           pitch shift [ width interpole fade ]&lt;br /&gt;
           reverb gain-out reverb-time delay [ delay ... ]&lt;br /&gt;
           silence above_periods [ duration threshold[ d | % ]&lt;br /&gt;
              [ below_periods duration&lt;br /&gt;
              threshold[ d | % ]]&lt;br /&gt;
           speed [ -c ] factor&lt;br /&gt;
           stretch [ factor [ window fade shift fading ]&lt;br /&gt;
           swap [ 1 2 | 1 2 3 4 ]&lt;br /&gt;
           synth [ length ] type mix [ freq [ -freq2 ]&lt;br /&gt;
                 [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]&lt;br /&gt;
           vibro speed [ depth ]&lt;br /&gt;
           vol gain [ type [ limitergain ] ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Filter Reference ==&lt;br /&gt;
&lt;br /&gt;
This section contains effects supported in SoxFilter v1.1 (12.17.9 SoX Library version).&lt;br /&gt;
&lt;br /&gt;
For effects supported by SoxFilter v2.x (SoX Library 14.4.2) visit https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects for parameters and their actual description. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       band [ -n ] center [ width ]&lt;br /&gt;
                 Apply a band-pass filter.  The frequency response drops loga-&lt;br /&gt;
                 rithmically around the center frequency.  The width gives the&lt;br /&gt;
                 slope of the drop.  The frequencies at  center  +  width  and&lt;br /&gt;
                 center  -  width  will  be half of their original amplitudes.&lt;br /&gt;
                 Band defaults to a mode oriented  to  pitched  signals,  i.e.&lt;br /&gt;
                 voice,  singing,  or  instrumental music.  The -n (for noise)&lt;br /&gt;
                 option uses the alternate mode for un-pitched signals.  Warn-&lt;br /&gt;
                 ing:  -n introduces a power-gain of about 11dB in the filter,&lt;br /&gt;
                 so beware of output clipping.  Band introduces noise  in  the&lt;br /&gt;
                 shape of the filter, i.e. peaking at the center frequency and&lt;br /&gt;
                 settling around it.  See filter for a  bandpass  effect  with&lt;br /&gt;
                 steeper shoulders.&lt;br /&gt;
&lt;br /&gt;
       bandpass frequency bandwidth&lt;br /&gt;
                 Butterworth bandpass filter. Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       bandreject frequency bandwidth&lt;br /&gt;
                 Butterworth bandreject filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       chorus gain-in gain-out delay decay speed depth&lt;br /&gt;
&lt;br /&gt;
              -s | -t [ delay decay speed depth -s | -t ... ]&lt;br /&gt;
                 which the absolute value of the input signal is integrated to&lt;br /&gt;
                 determine  its  volume;  attacks refer to increases in volume&lt;br /&gt;
                 and decays refer to decreases.  Where more than one  pair  of&lt;br /&gt;
                 attack/decay   parameters  are  specified,  each  channel  is&lt;br /&gt;
                 treated separately and the number of pairs  must  agree  with&lt;br /&gt;
                 the number of input channels.  The second parameter is a list&lt;br /&gt;
                 of points on the compander's transfer function  specified  in&lt;br /&gt;
                 dB  relative  to  the maximum possible signal amplitude.  The&lt;br /&gt;
                 input values must be in a strictly increasing order  but  the&lt;br /&gt;
                 transfer  function  does not have to be monotonically rising.&lt;br /&gt;
                 The special value -inf may be used to indicate that the input&lt;br /&gt;
                 volume  should  be  associated  output  volume.   The  points&lt;br /&gt;
                 -inf,-inf and 0,0 are assumed; the latter may be  overridden,&lt;br /&gt;
                 but the former may not.&lt;br /&gt;
&lt;br /&gt;
                 The  third  (optional) parameter is a post-processing gain in&lt;br /&gt;
                 dB which is applied after the compression  has  taken  place;&lt;br /&gt;
                 the  fourth  (optional)  parameter is an initial volume to be&lt;br /&gt;
                 assumed for each channel when the effect starts.   This  per-&lt;br /&gt;
                 mits  the  user to supply a nominal level initially, so that,&lt;br /&gt;
                 for example, a very large gain is not applied to initial sig-&lt;br /&gt;
                 nal levels before the companding action has begun to operate:&lt;br /&gt;
                 it is quite probable that in such an event, the output  would&lt;br /&gt;
                 be severely clipped while the compander gain properly adjusts&lt;br /&gt;
                 itself.&lt;br /&gt;
&lt;br /&gt;
                 The fifth (optional) parameter is a delay  in  seconds.   The&lt;br /&gt;
                 input  signal  is analyzed immediately to control the compan-&lt;br /&gt;
                 der, but it  is  delayed  before  being  fed  to  the  volume&lt;br /&gt;
                 adjuster.   Specifying  a  delay  approximately  equal to the&lt;br /&gt;
                 attack/decay times allows the compander to effectively  oper-&lt;br /&gt;
                 ate in a &amp;quot;predictive&amp;quot; rather than a reactive mode.&lt;br /&gt;
&lt;br /&gt;
       dcshift shift [ limitergain ]&lt;br /&gt;
                 DC Shift the audio data, with basic linear amplitude formula.&lt;br /&gt;
                 This  is  most useful if your audio data tends to not be cen-&lt;br /&gt;
                 tered around a value of 0.  Shifting it back will  allow  you&lt;br /&gt;
                 to  get  the  most  volume adjustments without clipping audio&lt;br /&gt;
                 data.&lt;br /&gt;
                 The first option is the dcshift  value.   It  is  a  floating&lt;br /&gt;
                 point number that indicates the amount to shift.&lt;br /&gt;
                 An  option  limtergain  value  can  be specified as well.  It&lt;br /&gt;
                 should have a value much less then 1.0 and is  used  only  on&lt;br /&gt;
                 peaks to prevent clipping.&lt;br /&gt;
&lt;br /&gt;
       deemph    Apply  a  treble  attenuation  shelving  filter to samples in&lt;br /&gt;
                 audio cd format.  The frequency  response  of  pre-emphasized&lt;br /&gt;
                 recordings  is  rectified.   The  filtering is defined in the&lt;br /&gt;
                 standard document ISO 908.&lt;br /&gt;
                 Add a sequence of echos to a sound sample.  Each  delay/decay&lt;br /&gt;
                 part  gives the delay in milliseconds and the decay (relative&lt;br /&gt;
                 to gain-in) of that echo.  Gain-out is the volume of the out-&lt;br /&gt;
                 put.&lt;br /&gt;
       earwax      Makes    sound  easier to listen to on headphones.  Adds audio-&lt;br /&gt;
                 cues to samples in audio cd format so that when  listened  to&lt;br /&gt;
                 on headphones the stereo image is moved from inside your head&lt;br /&gt;
                 (standard for headphones) to outside and in front of the lis-&lt;br /&gt;
                 tener (standard for speakers). See&lt;br /&gt;
                 www.geocities.com/beinges for a full explanation.&lt;br /&gt;
&lt;br /&gt;
       echo gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
                 Add  echoing  to a sound sample.  Each delay/decay part gives&lt;br /&gt;
                 the delay in milliseconds and the decay (relative to gain-in)&lt;br /&gt;
                 of that echo.  Gain-out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       echos gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
                 Add  a sequence of echos to a sound sample.  Each delay/decay&lt;br /&gt;
                 part gives the delay in milliseconds and the decay  (relative&lt;br /&gt;
                 to gain-in) of that echo.  Gain-out is the volume of the out-&lt;br /&gt;
                 put.&lt;br /&gt;
&lt;br /&gt;
       fade [ type ] fade-in-length&lt;br /&gt;
            [ stop-time [ fade-out-length ] ]&lt;br /&gt;
                 Add a fade effect to the beginning, end, or both of the audio&lt;br /&gt;
                 data.&lt;br /&gt;
&lt;br /&gt;
                 For fade-ins, this starts from the first sample and ramps the&lt;br /&gt;
                 volume of the audio from 0 to full volume over fade-in-length&lt;br /&gt;
                 seconds.  Specify 0 seconds if no fade-in is wanted.&lt;br /&gt;
&lt;br /&gt;
                 For fade-outs, the audio data will be truncated at the  stop-&lt;br /&gt;
                 time and the volume will be ramped from full volume down to 0&lt;br /&gt;
                 starting at fade-out-length seconds before the stop-time.  No&lt;br /&gt;
                 fade-out is performed if these options are not specified.&lt;br /&gt;
                 All  times can be specified in either periods of time or sam-&lt;br /&gt;
                 ple  counts.   To  specify  time  periods  use   the   format&lt;br /&gt;
                 hh:mm:ss.frac  format.  To specify using sample counts, spec-&lt;br /&gt;
                 ify the number of samples and append the letter  's'  to  the&lt;br /&gt;
                 sample count (for example 8000s).&lt;br /&gt;
                 An optional type can be specified to change the type of enve-&lt;br /&gt;
                 lope.  Choices are q for quarter of a sinewave, h for half  a&lt;br /&gt;
                 sinewave,  t  for  linear slope, l for logarithmic, and p for&lt;br /&gt;
                 inverted parabola.  The default is a linear slope.&lt;br /&gt;
&lt;br /&gt;
       filter [ low ]-[ high ] [ window-len [ beta ] ]&lt;br /&gt;
                 Apply a Sinc-windowed lowpass, highpass, or  bandpass  filter&lt;br /&gt;
                 of given window length to the signal.  low refers to the fre-&lt;br /&gt;
                 quency of the lower 6dB corner of the filter.  high refers to&lt;br /&gt;
                 the frequency of the upper 6dB corner of the filter.&lt;br /&gt;
&lt;br /&gt;
                 A  lowpass  filter is obtained by leaving low unspecified, or&lt;br /&gt;
                 0.  A highpass filter is obtained by  leaving  high  unspeci-&lt;br /&gt;
                 fied,  or  0,  or  greater  than or equal to the Nyquist fre-&lt;br /&gt;
                 quency.&lt;br /&gt;
&lt;br /&gt;
                 The window-len, if unspecified, defaults to 128.  Longer win-&lt;br /&gt;
                 dows  give  a  sharper cutoff, smaller windows a more gradual&lt;br /&gt;
                 cutoff.&lt;br /&gt;
&lt;br /&gt;
                 The beta, if unspecified, defaults to  16.   This  selects  a&lt;br /&gt;
                 Kaiser window.  You can select a Nuttall window by specifying&lt;br /&gt;
                 anything &amp;lt;= 2.0 here.  For  more  discussion  of  beta,  look&lt;br /&gt;
                 under the resample effect.&lt;br /&gt;
&lt;br /&gt;
       flanger gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
                 Add   a   flanger   to   a   sound   sample.    Each   triple&lt;br /&gt;
                 delay/decay/speed  gives  the  delay  in milliseconds and the&lt;br /&gt;
                 decay (relative to gain-in) with a modulation  speed  in  Hz.&lt;br /&gt;
                 The  modulation  is  either sinodial (-s) or triangular (-t).&lt;br /&gt;
                 Gain-out is the volume of the output.&lt;br /&gt;
       highp frequency&lt;br /&gt;
                 Apply a single pole recursive  high-pass  filter.   The  fre-&lt;br /&gt;
                 quency response drops logarithmically with I frequency in the&lt;br /&gt;
                 middle of the drop.  The slope of the filter is quite gentle.&lt;br /&gt;
                 See filter for a highpass effect with sharper cutoff.&lt;br /&gt;
&lt;br /&gt;
       highpass frequency&lt;br /&gt;
                 Butterworth highpass filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
        lowp frequency&lt;br /&gt;
                 Apply a single pole recursive low-pass filter.  The frequency&lt;br /&gt;
                 response  drops  logarithmically with frequency in the middle&lt;br /&gt;
                 of the drop.  The slope of the filter is quite  gentle.   See&lt;br /&gt;
                 filter for a lowpass effect with sharper cutoff.&lt;br /&gt;
&lt;br /&gt;
       lowpass frequency&lt;br /&gt;
                 Butterworth lowpass filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       mask      Add &amp;quot;masking noise&amp;quot; to signal.  This effect deliberately adds&lt;br /&gt;
                 white noise to a sound in order to mask quantization effects,&lt;br /&gt;
                 created by the process of  playing  a  sound  digitally.   It&lt;br /&gt;
                 tends  to  mask buzzing voices, for example.  It adds 1/2 bit&lt;br /&gt;
                 of noise to the sound file at the output bit depth.&lt;br /&gt;
&lt;br /&gt;
       mcompand &amp;quot;attack1,decay1[,attack2,decay2...]&lt;br /&gt;
                 in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
                 [gain [initial-volume [delay ] ] ]&amp;quot; xover_freq&lt;br /&gt;
&lt;br /&gt;
                 Multi-band compander is similar to the single band  compander&lt;br /&gt;
                 but  the  audio  file is first divided up into bands and then&lt;br /&gt;
                 the compander is ran on each band.  See  the  compand  effect&lt;br /&gt;
                 for definition of its options.  Compand options are specified&lt;br /&gt;
                 between double quotes and the crossover  frequency  for  that&lt;br /&gt;
                 band  is  specefied  seperately  with xover_fre.  This can be&lt;br /&gt;
                 repeated multiple times to create multiple bands.&lt;br /&gt;
&lt;br /&gt;
       noiseprof [profile-file]&lt;br /&gt;
&lt;br /&gt;
       noisered profile-file [threshold]&lt;br /&gt;
                Noise reduction filter with profiling. This filter is   moder-&lt;br /&gt;
                ately   effective at removing consistent background noise such&lt;br /&gt;
                as hiss or hum. To use it, first run the noiseprof effect  on&lt;br /&gt;
                a section of silence (that is, a section which contains noth-&lt;br /&gt;
                ing but noise). The noiseprof effect will print a noise  pro-&lt;br /&gt;
                file  to  profile-file,  or  to  stdout if no profile-file is&lt;br /&gt;
                specified.  If there is sound output on stdout then the  pro-&lt;br /&gt;
                file will instead be directed to stderr.&lt;br /&gt;
&lt;br /&gt;
                To actually remove the noise, run SoX again with the noisered&lt;br /&gt;
                filter. The filter needs one  argument,  profile-file,   which&lt;br /&gt;
                contains  the   noise profile from noiseprof. thershold speci-&lt;br /&gt;
                fies how much noise should be removed, and may be  between  0&lt;br /&gt;
                and  1   with a default of 0.5. Higher values will remove more&lt;br /&gt;
                noise but present a greater  possibility  of  distorting  the&lt;br /&gt;
                desired  audio   signal.   Experiment with different threshold&lt;br /&gt;
                values to find the optimal one for your sample.&lt;br /&gt;
&lt;br /&gt;
       phaser gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
                 Add   a   phaser   to   a   sound   sample.    Each    triple&lt;br /&gt;
                 delay/decay/speed  gives  the  delay  in milliseconds and the&lt;br /&gt;
                 decay (relative to gain-in) with a modulation  speed  in  Hz.&lt;br /&gt;
                 The  modulation  is  either sinodial (-s) or triangular (-t).&lt;br /&gt;
                 The decay should be less than 0.5 to avoid  feedback.   Gain-&lt;br /&gt;
                 out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       pitch shift [ width interpole fade ]&lt;br /&gt;
                 Change  the  pitch  of file without affecting its duration by&lt;br /&gt;
                 cross-fading shifted samples.  shift is given in cents. Use a&lt;br /&gt;
                 positive value to shift to treble, negative value to shift to&lt;br /&gt;
                 bass.  Default shift is 0.  width of window is in ms. Default&lt;br /&gt;
                 width  is  20ms.  Try  30ms to lower pitch, and 10ms to raise&lt;br /&gt;
                 -w  &amp;lt;  nut / ham &amp;gt; : select either a Nuttal (~90 dB stopband)&lt;br /&gt;
                 or Hamming (~43 dB stopband) window.  Default is nut.&lt;br /&gt;
&lt;br /&gt;
                 -width long / short / # : specify the (approximate) width  of&lt;br /&gt;
                 the  filter.   long  is  1024  samples; short is 128 samples.&lt;br /&gt;
                 Alternatively, an exact number can be used.  Default is long.&lt;br /&gt;
                 The  short  option  is  not  recommended, as it produces poor&lt;br /&gt;
                 quality results.&lt;br /&gt;
&lt;br /&gt;
                 -cutoff # : specify the filter cutoff frequency in  terms  of&lt;br /&gt;
                 fraction  of  frequency  bandwidth,  also know as the Nyquist&lt;br /&gt;
                 frequency.  Please see the resample effect for further infor-&lt;br /&gt;
                 mation on Nyquist frequency.  If upsampling, then this is the&lt;br /&gt;
                 fraction of the original signal that should go  through.   If&lt;br /&gt;
                 downsampling,  this  is the fraction of the signal left after&lt;br /&gt;
                 downsampling.  Default is 0.95.   Remember  that  this  is  a&lt;br /&gt;
                 float.&lt;br /&gt;
&lt;br /&gt;
       reverb gain-out reverbe-time delay [ delay ... ]&lt;br /&gt;
                 Add  reverberation to a sound sample.  Each delay is given in&lt;br /&gt;
                 milliseconds and its feedback is depending on the reverb-time&lt;br /&gt;
                 in  milliseconds.   Each delay should be in the range of half&lt;br /&gt;
                 to quarter of reverb-time to get a  realistic  reverberation.&lt;br /&gt;
                 Gain-out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       silence above_periods [ duration threshold[ d | % ]&lt;br /&gt;
               [ below_periods duration threshold[ d | % ]]&lt;br /&gt;
                 Removes silence from the beginning or end of  a  sound  file.&lt;br /&gt;
                 Silence is anything below a specified threshold.&lt;br /&gt;
                 When trimming silence from the beginning of a sound file, you&lt;br /&gt;
                 specify a duration of audio that is  above  a  given  silence&lt;br /&gt;
                 threshold before audio data is processed.  You can also spec-&lt;br /&gt;
                 ify the count of periods of none silence you want  to  detect&lt;br /&gt;
                 before  processing  audio data.  Specify a period of 0 if you&lt;br /&gt;
                 do not want to trim data from the front of the sound file.&lt;br /&gt;
                 When optionally trimming silence form  the  end  of  a  sound&lt;br /&gt;
                 file,  you specify the duration of audio that must be below a&lt;br /&gt;
                 given threshold before stopping to  process  audio  data.   A&lt;br /&gt;
                 count  of  periods that occur below the threshold may also be&lt;br /&gt;
                 specified.  If this options are not specified  then  data  is&lt;br /&gt;
                 not trimmed from the end of the audio file.&lt;br /&gt;
                 Duration  counts may be in the format of time, hh:mm:ss.frac,&lt;br /&gt;
                 or in the exact count of samples.&lt;br /&gt;
                 Threshold may be suffixed with d, or % to indicated the value&lt;br /&gt;
                 is  in  decibels  or  a percentage of max value of the sample&lt;br /&gt;
                 value.  A value of '0%' will look for total silence.&lt;br /&gt;
&lt;br /&gt;
       speed [ -c ] factor&lt;br /&gt;
                 Speed up or down the sound, as a magnetic tape with  a  speed&lt;br /&gt;
                 control.   It  affects  both  pitch and time. A factor of 1.0&lt;br /&gt;
                 means no change, and is the default.  2.0 doubles speed, thus&lt;br /&gt;
                 time  length is cut by a half and pitch is one octave higher.&lt;br /&gt;
                 0.5 halves speed thus time length doubles and  pitch  is  one&lt;br /&gt;
                 octave  lower.  If the optional -c parameter is used then the&lt;br /&gt;
                 factor is specified in &amp;quot;cents&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
       stretch factor [window fade shift fading]&lt;br /&gt;
                 Time  stretch file by a given factor. Change duration without&lt;br /&gt;
                 affecting the pitch.  factor of  stretching:  &amp;gt;1.0  lengthen,&lt;br /&gt;
                 &amp;lt;1.0  shorten  duration.   window  size  is in ms. Default is&lt;br /&gt;
                 20ms. The fade option, can be &amp;quot;lin&amp;quot;.  shift  ratio,  in  [0.0&lt;br /&gt;
                 1.0].  Default depends on stretch factor. 1.0 to shorten, 0.8&lt;br /&gt;
                 to lengthen.  The fading ratio, in [0.0 0.5]. The amount of a&lt;br /&gt;
                 fade's default depends on factor and shift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       synth [ length ] type mix [ freq [ -freq2 ]&lt;br /&gt;
             [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]&lt;br /&gt;
                 The  synth  effect will generate various types of audio data.&lt;br /&gt;
                 Although this effect is used to generate audio data, an input&lt;br /&gt;
                 file  must  be specified.  The length of the input audio file&lt;br /&gt;
                 determines the length of the output audio file.&lt;br /&gt;
                 &amp;lt;length&amp;gt;  length  in  sec  or  hh:mm:ss.frac,  0=inputlength,&lt;br /&gt;
                 default=0&lt;br /&gt;
                 &amp;lt;type&amp;gt;  is  sine,  square,  triangle, sawtooth, trapetz, exp,&lt;br /&gt;
                 whitenoise, pinknoise, brownnoise, default=sine&lt;br /&gt;
                 &amp;lt;mix&amp;gt; is create, mix, amod, default=create&lt;br /&gt;
                 &amp;lt;freq&amp;gt; frequency at beginning in Hz, not used  for noise..&lt;br /&gt;
                 &amp;lt;freq2&amp;gt;  frequency  at  end  in  Hz,  not  used  for  noise..&lt;br /&gt;
                 &amp;lt;freq/2&amp;gt; can be given as %%n, where 'n' is the number of half&lt;br /&gt;
                 notes in respect to A (440Hz)&lt;br /&gt;
                 &amp;lt;off&amp;gt; Bias (DC-offset)  of signal in percent, default=0&lt;br /&gt;
                 &amp;lt;ph&amp;gt; phase shift 0..100 shift phase  0..2*Pi,  not  used  for&lt;br /&gt;
                 noise..&lt;br /&gt;
                 &amp;lt;p1&amp;gt;  square:  Ton/Toff,  triangle+trapetz: rising slope time&lt;br /&gt;
                 (0..100)&lt;br /&gt;
                 &amp;lt;p2&amp;gt; trapetz: ON time (0..100)&lt;br /&gt;
                 the  audio  data.  The format for specifying sample counts is&lt;br /&gt;
                 the number of samples with the letter 's' appended to it.   A&lt;br /&gt;
                 value  of  8000s will wait until 8000 samples are read before&lt;br /&gt;
                 starting to process audio data.&lt;br /&gt;
&lt;br /&gt;
       vibro speed  [ depth ]&lt;br /&gt;
                 Add the world-famous Fender Vibro-Champ  sound  effect  to  a&lt;br /&gt;
                 sound  sample by using a sine wave as the volume knob.  Speed&lt;br /&gt;
                 gives the Hertz value of the wave.  This must  be  under  30.&lt;br /&gt;
                 Depth  gives  the  amount  the volume is cut into by the sine&lt;br /&gt;
                 wave, ranging 0.0 to 1.0 and defaulting to 0.5.&lt;br /&gt;
&lt;br /&gt;
       vol gain [ type [ limitergain ] ]&lt;br /&gt;
                 The vol effect is much like the command line option  -v.   It&lt;br /&gt;
                 allows  you  to adjust the volume of an input file and allows&lt;br /&gt;
                 you to specify  the  adjustment  in  relation  to  amplitude,&lt;br /&gt;
                 power,  or  dB.  If type is not specified then it defaults to&lt;br /&gt;
                 amplitude.&lt;br /&gt;
                 When type is amplitude then a linear change of the  amplitude&lt;br /&gt;
                 is  performed  based  on the gain.  Therefore, a value of 1.0&lt;br /&gt;
                 will keep the volume the same, 0.0 to &amp;lt; 1.0  will  cause  the&lt;br /&gt;
                 volume  to decrease and values of &amp;gt; 1.0 will cause the volume&lt;br /&gt;
                 to increase.  Beware of clipping audio data when the gain  is&lt;br /&gt;
                 greater then 1.0.  A negative value performs the same adjust-&lt;br /&gt;
                 ment while also changing the phase.&lt;br /&gt;
                 When type is power then a value of 1.0 also means  no  change&lt;br /&gt;
                 in volume.&lt;br /&gt;
                 When  type  is  dB  the amplitude is changed logarithmically.&lt;br /&gt;
                 0.0 is constant while +6 doubles the amplitude.&lt;br /&gt;
                 An optional limitergain value can be specified and should  be&lt;br /&gt;
                 a value much less then 1.0 (ie 0.05 or 0.02) and is used only&lt;br /&gt;
                 on peaks to prevent clipping.  Not specifying this  parameter&lt;br /&gt;
                 will  cause  no  limiter  to  be used.  In verbose mode, this&lt;br /&gt;
                 effect will display the percentage of audio data that  needed&lt;br /&gt;
                 to be limited.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       Echo&lt;br /&gt;
&lt;br /&gt;
       An echo(1,3x,1 builtins) effect can be naturally found in(1,8) the mountains, standing  some-&lt;br /&gt;
       where  on  a  mountain and shouting a single word will result in(1,8) one or&lt;br /&gt;
       more repetitions of the word (if(3,n) not, turn a bit around and try  again,&lt;br /&gt;
       or climb to the next mountain).&lt;br /&gt;
&lt;br /&gt;
       However,  the  time(1,2,n)  difference  between  shouting and repeating is the&lt;br /&gt;
       delay (time(1,2,n)), its loudness is the decay. Multiple echos can  have  dif-&lt;br /&gt;
       ferent delays and decays.&lt;br /&gt;
&lt;br /&gt;
       It  is  very  popular  to  use  echos to play an instrument with itself&lt;br /&gt;
       together, like some guitar players (Brain May from Queen) or  vocalists&lt;br /&gt;
       are  doing.  For music samples of more than one instrument, echo(1,3x,1 builtins) can be&lt;br /&gt;
       used to add a second sample shortly after the original one.&lt;br /&gt;
&lt;br /&gt;
       This will sound as if(3,n) you are doubling the number of instruments  play-&lt;br /&gt;
       ing in(1,8) the same sample:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.88 60.0 0.4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If the delay is very short, then it sound like a (metallic) robot play-&lt;br /&gt;
       ing music:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.88 6.0 0.4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Longer delay will sound like an open(2,3,n) air concert in(1,8) the mountains:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.9 1000.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       One mountain more, and:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.9 1000.0 0.3 1800.0 0.25&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Echos&lt;br /&gt;
&lt;br /&gt;
       Like the echo effect, echos stand for &amp;quot;ECHO in  Sequel&amp;quot;,  that  is  the&lt;br /&gt;
       first  echos takes the input, the second the input and the first echos,&lt;br /&gt;
       the third the input and the first and the second echos, ... and so  on.&lt;br /&gt;
       Care  should  be  taken  using  many echos (see introduction); a single&lt;br /&gt;
       echos has the same effect as a single echo.&lt;br /&gt;
&lt;br /&gt;
       The sample will be bounced twice in(1,8) symmetric echos:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 700.0 0.25 700.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample will be bounced twice in(1,8) asymmetric echos:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 700.0 0.25 900.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample will sound as if(3,n) played in(1,8) a garage:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 40.0 0.25 63.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Chorus&lt;br /&gt;
&lt;br /&gt;
       The chorus effect has its name because it will often be used to make  a&lt;br /&gt;
       single  vocal  sound  like  a  chorus.  But  it can be applied to other&lt;br /&gt;
       instrument samples too.&lt;br /&gt;
&lt;br /&gt;
       It works like the echo(1,3x,1 builtins) effect with a short delay, but the  delay  isn't&lt;br /&gt;
       constant.  The delay is varied using a sinusoidal or triangular modula-&lt;br /&gt;
       tion. The modulation depth defines the range  the  modulated  delay  is&lt;br /&gt;
       played  before  or  after the delay. Hence the delayed sound will sound&lt;br /&gt;
       slower or faster, that is the delayed sound tuned around  the  original&lt;br /&gt;
       one, like in(1,8) a chorus where some vocals are a bit out of tune.&lt;br /&gt;
&lt;br /&gt;
       The  typical  delay is around 40ms to 60ms, the speed of the modulation&lt;br /&gt;
       is best near 0.25Hz and the modulation depth around 2ms.&lt;br /&gt;
&lt;br /&gt;
       A single delay will make the sample more overloaded:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;chorus 0.7 0.9 55.0 0.4 0.25 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Two delays of the original samples sound like this:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;chorus 0.6 0.9 50.0 0.4 0.25 2.0 -t 60.0 0.32 0.4 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       A big chorus of the sample is (three additional samples):&lt;br /&gt;
&lt;br /&gt;
              SoxFilter(&amp;quot;chorus 0.5 0.9 50.0 0.4 0.25 2.0 -t 60.0 0.32 0.4 2.3 -t 40.0 0.3 0.3 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Flanger&lt;br /&gt;
&lt;br /&gt;
       The flanger effect is like the chorus  effect,  but  the  delay  varies&lt;br /&gt;
       between  0ms  and  maximal  5ms.  It sound like wind blowing, sometimes&lt;br /&gt;
       faster or slower including changes of the speed.&lt;br /&gt;
&lt;br /&gt;
       The flanger effect is widely used in(1,8) funk and  soul  music,  where  the&lt;br /&gt;
       guitar sound varies frequently slow or a bit faster.&lt;br /&gt;
&lt;br /&gt;
       The  typical delay is around 3ms to 5ms, the speed of the modulation is&lt;br /&gt;
       best near 0.5Hz.&lt;br /&gt;
&lt;br /&gt;
       Now, let's groove the sample:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.6 0.87 3.0 0.9 0.5 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       listen carefully between the difference of  sinusoidal  and  triangular&lt;br /&gt;
       modulation:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.6 0.87 3.0 0.9 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If the decay is a bit lower, than the effect sounds more popular:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.8 0.88 3.0 0.4 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The drunken loudspeaker system:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.9 0.9 4.0 0.23 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Reverb&lt;br /&gt;
&lt;br /&gt;
       The  reverb effect is often used in(1,8) audience hall which are to small or&lt;br /&gt;
       contain too many many visitors which disturb (dampen) the reflection of&lt;br /&gt;
       sound  at  the walls.  Reverb will make the sound be perceived as if(3,n) it&lt;br /&gt;
       were in(1,8) a large hall.  You can try the reverb effect in(1,8)  your  bathroom&lt;br /&gt;
       or  garage  or sport halls by shouting loud some words. You'll hear the&lt;br /&gt;
       words reflected from the walls.&lt;br /&gt;
&lt;br /&gt;
       The biggest problem in(1,8) using the reverb effect is the  correct  setting&lt;br /&gt;
       of the (wall) delays such that the sound is realistic and doesn't sound&lt;br /&gt;
       like music playing in(1,8) a  tin(1,5)  can  or  has  overloaded  feedback  which&lt;br /&gt;
       destroys  any  illusion  of  playing in(1,8) a big hall.  To help you obtain&lt;br /&gt;
       realistic reverb effects, you should decide first how long  the  reverb&lt;br /&gt;
       should  take place until it is not loud enough to be registered by your&lt;br /&gt;
       ears. This is be done by varying the  reverb  time(1,2,n)  &amp;quot;t&amp;quot;.   To  simulate&lt;br /&gt;
       small halls, use 200ms.  To simulate large halls, use 1000ms.  Clearly,&lt;br /&gt;
       the walls of such a hall aren't far away, so you should define its set-&lt;br /&gt;
       ting  be  given  every wall its delay time.  However, if(3,n) the wall is to&lt;br /&gt;
       far away for the reverb time(1,2,n), you won't hear the reverb, so the nearest&lt;br /&gt;
       wall will be best at &amp;quot;t/4&amp;quot; delay and the farthest at &amp;quot;t/2&amp;quot;. You can try&lt;br /&gt;
       other distances as well, but it won't sound very realistic.  The  walls&lt;br /&gt;
       shouldn't  stand  to  close(2,7,n) to each other and not in(1,8) a multiple integer&lt;br /&gt;
       distance to each other ( so avoid wall like: 200.0 and 202.0, or  some-&lt;br /&gt;
       thing like 100.0 and 200.0 ).&lt;br /&gt;
&lt;br /&gt;
       Since  audience  halls  do have a lot of walls, we will start designing&lt;br /&gt;
       one beginning with one wall:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       One wall more:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Next two walls:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Now, why not a futuristic hall with six walls:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0 280.0 300.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If  you  run out of machine power or memory, then stop as many applica-&lt;br /&gt;
       tions as possible (every interrupt will consume a lot of CPU time(1,2,n) which&lt;br /&gt;
       for bigger halls is absolutely necessary).&lt;br /&gt;
&lt;br /&gt;
       Phaser&lt;br /&gt;
&lt;br /&gt;
       The  phaser  effect  is  like  the flanger effect, but it uses a reverb&lt;br /&gt;
       instead of an echo(1,3x,1 builtins) and does phase shifting. You'll hear the  difference&lt;br /&gt;
       in(1,8) the examples comparing both effects (simply change the effect name).&lt;br /&gt;
       The delay modulation can be sinusoidal or triangular, preferable is the&lt;br /&gt;
       later for multiple instruments. For single instrument sounds, the sinu-&lt;br /&gt;
       soidal phaser effect will give a sharper  phasing  effect.   The  decay&lt;br /&gt;
       shouldn't  be  to  close(2,7,n)  to 1.0 which will cause dramatic feedback.  A&lt;br /&gt;
       good range is about 0.5 to 0.1 for the decay.&lt;br /&gt;
&lt;br /&gt;
       We will take a parameter setting as for the flanger before (gain-out is&lt;br /&gt;
       lower since feedback can raise(3,n) the output dramatically):&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.8 0.74 3.0 0.4 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The drunken loudspeaker system (now less(1,3) alcohol):&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.9 0.85 4.0 0.23 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       A popular sound of the sample is as follows:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.89 0.85 1.0 0.24 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample sounds if(3,n) ten springs are in(1,8) your ears:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.6 0.66 3.0 0.6 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Compander&lt;br /&gt;
&lt;br /&gt;
       The  compander  effect  allows the dynamic range of a signal(2,7) to be com-&lt;br /&gt;
       pressed or expanded.  For most situations, the attack time(1,2,n) (response to&lt;br /&gt;
       the music getting louder) should be shorter than the decay time(1,2,n) because&lt;br /&gt;
       our ears are more sensitive to suddenly loud  music  than  to  suddenly&lt;br /&gt;
       soft music.&lt;br /&gt;
&lt;br /&gt;
       For  example,  suppose  you  are  listening  to  Strauss'  &amp;quot;Also Sprach&lt;br /&gt;
       Zarathustra&amp;quot; in(1,8) a noisy environment such as a car.  If you turn up  the&lt;br /&gt;
       volume  enough  to hear the soft passages over the road noise, the loud&lt;br /&gt;
       sections will be too loud.  You could try this:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;compand 0.3,1 -90,-90,-70,-70,-60,-20,0,0 -5 0 0.2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The transfer function (&amp;quot;-90,...&amp;quot;) says that very  soft  sounds  between&lt;br /&gt;
       -90  and  -70 decibels (-90 is about the limit of 16-bit encoding(3,n)) will&lt;br /&gt;
       remain unchanged.  That keeps the compander from boosting the volume on&lt;br /&gt;
       &amp;quot;silent&amp;quot;  passages  such  as between movements.  However, sounds in(1,8) the&lt;br /&gt;
       range -60 decibels to 0 decibels (maximum volume) will  be  boosted  so&lt;br /&gt;
       that  the  60-dB dynamic range of the original music will be compressed&lt;br /&gt;
       3-to-1 into a 20-dB range, which is wide enough to enjoy the music  but&lt;br /&gt;
       narrow  enough  to get around the road noise.  The -5 dB output gain is&lt;br /&gt;
       needed to avoid clipping (the number is inexact,  and  was  derived  by&lt;br /&gt;
       experimentation).   The  0  for the initial volume will work fine for a&lt;br /&gt;
       clip that starts with a bit of silence, and the delay of  0.2  has  the&lt;br /&gt;
       effect  of  causing the compander to react a bit more quickly to sudden&lt;br /&gt;
       volume changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version        Date            Changes&amp;lt;br&amp;gt;&lt;br /&gt;
 v2.2           2024/01/04      - Change the way how the effect chain is reinitialized:&lt;br /&gt;
                                  Fix the &amp;quot;Normalize&amp;quot; after SoxFilter(&amp;quot;compand&amp;quot;) case.&lt;br /&gt;
 v2.1           2023/12/03      - Allow effects which can alter sampling rate&lt;br /&gt;
                                - Allow effects which can change the number of channels&lt;br /&gt;
                                - Add distinct XP build (v141_xp toolset) needed in 2023&lt;br /&gt;
 v2.0           2023/12/02      - Full rewrite, using 14.4.2 libsox library version, moved to github&lt;br /&gt;
 v1.1 beta      2006/01/02      - release (12.17.9 libsox)&lt;br /&gt;
 v1.0           2005/12/29      - initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v1.1&lt;br /&gt;
|[x86]: [https://forum.doom9.org/attachment.php?attachmentid=5193&amp;amp;d=1136242927 SoxFilter_11.zip] /// [https://forum.doom9.org/attachment.php?attachmentid=5194&amp;amp;d=1136242951 SoxFilter_11_src.zip]&lt;br /&gt;
---------&lt;br /&gt;
[x64]: [https://down.7086.in/soxfilter_64_r0.zip soxfilter_64_r0.zip]&lt;br /&gt;
|[x86]: [https://web.archive.org/web/20200626015535if_/https://files.videohelp.com/u/223002/SoxFilter_11.zip SoxFilter_11.zip] (src included)&lt;br /&gt;
---------&lt;br /&gt;
[x64]: [https://web.archive.org/web/20200703223101if_/https://down.7086.in/soxfilter_64_r0.zip soxfilter_64_r0.zip]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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#Audio_Filters|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/SoxFilter</id>
		<title>SoxFilter</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/SoxFilter"/>
				<updated>2023-12-18T09:56:33Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Filter Reference */ Add warning and link for a newer effect reference page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Plugins|Plugins_x64|Audio_filters}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
| pinterf v2.1&lt;br /&gt;
{{author/Sh0dan}} v1.1 beta&lt;br /&gt;
| v2.1&lt;br /&gt;
| 3=[https://github.com/pinterf/SoxFilter/releases SoxFilter 2 releases]&lt;br /&gt;
| 4=Audio filters&lt;br /&gt;
| 5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
| 6=[https://forum.doom9.org/showthread.php?t=104792 Doom9 Forum]&amp;lt;br&amp;gt;[https://forum.doom9.org/showthread.php?t=181566 Doom9 Forum (v1.1 x64 version)]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This plugin will allow you to run [http://sox.sourceforge.net/ SOX] effects within AviSynth. Most effects are supported, and multiple effects can be stacked after each other.&lt;br /&gt;
&amp;lt;br&amp;gt;Version 1.1 is based on SoX library 12.17.9&lt;br /&gt;
&amp;lt;br&amp;gt;Version 2.0 is based on SoX library 14.4.2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SoX library works with 32 bit integer samples internally. All inputs will be automatically converted to this audio format.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
=== v2.1 ===&lt;br /&gt;
* [x86/x64]: [[AviSynth+ 3.7.3]]&lt;br /&gt;
=== v1.1 === &lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.5.8 or greater]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: N/A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|SoxFilter (clip, string effect1 [, string effect 2, string effect 3...])}}&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||string|}}&lt;br /&gt;
:::Any number of effects can be entered, and they will be executed in the order they are specified. Effect syntax is just like SOX. See [[#Effect Overview|Effect Overview]] and [[#Filter Reference|Filter Reference]] below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
A simple filter could look like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 500 100&amp;quot;)&lt;br /&gt;
convertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will keep a 100Hz band around 500Hz. SoxFilter converts audio to 32 bit integers. This allows to keep the additional dynamic range of float point samples, but it requires a convertion to 16 bit audio before output, since most codecs only support 16 bit.&lt;br /&gt;
&lt;br /&gt;
Multiple effects can be stacked like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 2000 1000&amp;quot;, &amp;quot;vol 2.0&amp;quot;, &amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
ConvertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which is a faster version of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 2000 1000&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;vol 2.0&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
ConvertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== AviSynth Specifics ==&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Since v1.1 release SoX library internal API has been changed. v2.x was created from scratch.&lt;br /&gt;
Also, some effects were removed, and others added in the past ~15 years. &lt;br /&gt;
The parameters of some effects had been changed as well.&lt;br /&gt;
&lt;br /&gt;
E.g. reverb parameters were modified in 2008; &amp;quot;filter&amp;quot; was removed, use &amp;quot;sinc&amp;quot; instead &lt;br /&gt;
(with a different syntax).&lt;br /&gt;
&lt;br /&gt;
Check SoxFilter_usages.txt in v2.x release pack, or visit &lt;br /&gt;
https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects&lt;br /&gt;
for effect parameters and their actual description.&lt;br /&gt;
&lt;br /&gt;
=== Known Issues ===&lt;br /&gt;
&lt;br /&gt;
* Linear access is heavily recommended. SOX filters doesn't support seeking, so stream is restarted every time a samples previous to the last one is requested.&lt;br /&gt;
* Do not use Avisynth+ versions before 3.7.3 if filter result is used later in the script multiple times. Audio cache (which was reintroduced in Avisynth+ 3.7.3) is a must have in those cases.&lt;br /&gt;
* (v2.1-) none of filters were removed from 14.4.2 SoX library, still, some may be incompatible. Filters can even change sample rate or alter the number of channels. In v1.1 these filters were not allowed.&lt;br /&gt;
* (v1.1 only) The AviSynth version is VERY picky about spaces. If you make double spaces or a space before or after the quotes the command will not be recognized.&lt;br /&gt;
* (v1.1 only) If one filter doesn't support multichannel audio the entire chain is converted to mono filters, this might affect some filters like '''earwax'''. Use multiple filter instances instead.&lt;br /&gt;
* (v1.1 only) Some filters have been removed since they were incompatible with the AviSynth version. All these filters have internal Avisynth equivalents.&lt;br /&gt;
* (v1.1 only) '''compand''' is very unstable in the current interface, and doesn't support restarts (distorted audio). Don't use this together with other effetcs.&lt;br /&gt;
* (v1.1 only) The length of audio cannot be modified.&lt;br /&gt;
&lt;br /&gt;
=== Version 1.1 ===&lt;br /&gt;
&lt;br /&gt;
*Solved issue with earwax refusing to play.&lt;br /&gt;
&lt;br /&gt;
*Solved problem with time alternating effects.&lt;br /&gt;
&lt;br /&gt;
*Solved issues with some filters producing clicks.&lt;br /&gt;
&lt;br /&gt;
*Made sure compand and mcompand doesn't crash. Still quite buggy though.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Effect Overview ==&lt;br /&gt;
&lt;br /&gt;
This section contains effects supported in SoxFilter v1.1 (12.17.9 SoX Library version).&lt;br /&gt;
&lt;br /&gt;
For effects supported by SoxFilter v2.x (SoX Library 14.4.2) visit&lt;br /&gt;
https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects&lt;br /&gt;
for parameters and their actual description.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       Effects:&lt;br /&gt;
           band [ -n ] center [ width ]&lt;br /&gt;
           bandpass frequency bandwidth&lt;br /&gt;
&lt;br /&gt;
           bandreject frequency bandwidth&lt;br /&gt;
           chorus gain-in gain out delay decay speed depth&lt;br /&gt;
&lt;br /&gt;
                  -s | -t [ delay decay speed depth -s | -t ]&lt;br /&gt;
           compand attack1,decay1[,attack2,decay2...]&lt;br /&gt;
                   in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
                   [ gain [ initial-volume [ delay ] ] ]&lt;br /&gt;
&lt;br /&gt;
           dcshift shift [ limitergain ]&lt;br /&gt;
           deemph&lt;br /&gt;
           earwax&lt;br /&gt;
           echo gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
           echos gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
           fade [ type ] fade-in-length&lt;br /&gt;
&lt;br /&gt;
                [ stop-time [ fade-out-length ] ]&lt;br /&gt;
           filter [ low ]-[ high ] [ window-len [ beta ]]&lt;br /&gt;
           flanger gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
           highp frequency&lt;br /&gt;
           highpass frequency&lt;br /&gt;
           lowp frequency&lt;br /&gt;
           lowpass frequency&lt;br /&gt;
&lt;br /&gt;
           mask&lt;br /&gt;
           mcompand &amp;quot;attack1,decay1[,attack2,decay2...]&lt;br /&gt;
              in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
              [ gain [ initial-volume [ delay ] ] ]&amp;quot; xover_freq&lt;br /&gt;
           noiseprof [profile-file]&lt;br /&gt;
           noisered profile-file [threshold]&lt;br /&gt;
           phaser gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
           pitch shift [ width interpole fade ]&lt;br /&gt;
           reverb gain-out reverb-time delay [ delay ... ]&lt;br /&gt;
           silence above_periods [ duration threshold[ d | % ]&lt;br /&gt;
              [ below_periods duration&lt;br /&gt;
              threshold[ d | % ]]&lt;br /&gt;
           speed [ -c ] factor&lt;br /&gt;
           stretch [ factor [ window fade shift fading ]&lt;br /&gt;
           swap [ 1 2 | 1 2 3 4 ]&lt;br /&gt;
           synth [ length ] type mix [ freq [ -freq2 ]&lt;br /&gt;
                 [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]&lt;br /&gt;
           vibro speed [ depth ]&lt;br /&gt;
           vol gain [ type [ limitergain ] ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Filter Reference ==&lt;br /&gt;
&lt;br /&gt;
This section contains effects supported in SoxFilter v1.1 (12.17.9 SoX Library version).&lt;br /&gt;
&lt;br /&gt;
For effects supported by SoxFilter v2.x (SoX Library 14.4.2) visit https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects for parameters and their actual description. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       band [ -n ] center [ width ]&lt;br /&gt;
                 Apply a band-pass filter.  The frequency response drops loga-&lt;br /&gt;
                 rithmically around the center frequency.  The width gives the&lt;br /&gt;
                 slope of the drop.  The frequencies at  center  +  width  and&lt;br /&gt;
                 center  -  width  will  be half of their original amplitudes.&lt;br /&gt;
                 Band defaults to a mode oriented  to  pitched  signals,  i.e.&lt;br /&gt;
                 voice,  singing,  or  instrumental music.  The -n (for noise)&lt;br /&gt;
                 option uses the alternate mode for un-pitched signals.  Warn-&lt;br /&gt;
                 ing:  -n introduces a power-gain of about 11dB in the filter,&lt;br /&gt;
                 so beware of output clipping.  Band introduces noise  in  the&lt;br /&gt;
                 shape of the filter, i.e. peaking at the center frequency and&lt;br /&gt;
                 settling around it.  See filter for a  bandpass  effect  with&lt;br /&gt;
                 steeper shoulders.&lt;br /&gt;
&lt;br /&gt;
       bandpass frequency bandwidth&lt;br /&gt;
                 Butterworth bandpass filter. Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       bandreject frequency bandwidth&lt;br /&gt;
                 Butterworth bandreject filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       chorus gain-in gain-out delay decay speed depth&lt;br /&gt;
&lt;br /&gt;
              -s | -t [ delay decay speed depth -s | -t ... ]&lt;br /&gt;
                 which the absolute value of the input signal is integrated to&lt;br /&gt;
                 determine  its  volume;  attacks refer to increases in volume&lt;br /&gt;
                 and decays refer to decreases.  Where more than one  pair  of&lt;br /&gt;
                 attack/decay   parameters  are  specified,  each  channel  is&lt;br /&gt;
                 treated separately and the number of pairs  must  agree  with&lt;br /&gt;
                 the number of input channels.  The second parameter is a list&lt;br /&gt;
                 of points on the compander's transfer function  specified  in&lt;br /&gt;
                 dB  relative  to  the maximum possible signal amplitude.  The&lt;br /&gt;
                 input values must be in a strictly increasing order  but  the&lt;br /&gt;
                 transfer  function  does not have to be monotonically rising.&lt;br /&gt;
                 The special value -inf may be used to indicate that the input&lt;br /&gt;
                 volume  should  be  associated  output  volume.   The  points&lt;br /&gt;
                 -inf,-inf and 0,0 are assumed; the latter may be  overridden,&lt;br /&gt;
                 but the former may not.&lt;br /&gt;
&lt;br /&gt;
                 The  third  (optional) parameter is a post-processing gain in&lt;br /&gt;
                 dB which is applied after the compression  has  taken  place;&lt;br /&gt;
                 the  fourth  (optional)  parameter is an initial volume to be&lt;br /&gt;
                 assumed for each channel when the effect starts.   This  per-&lt;br /&gt;
                 mits  the  user to supply a nominal level initially, so that,&lt;br /&gt;
                 for example, a very large gain is not applied to initial sig-&lt;br /&gt;
                 nal levels before the companding action has begun to operate:&lt;br /&gt;
                 it is quite probable that in such an event, the output  would&lt;br /&gt;
                 be severely clipped while the compander gain properly adjusts&lt;br /&gt;
                 itself.&lt;br /&gt;
&lt;br /&gt;
                 The fifth (optional) parameter is a delay  in  seconds.   The&lt;br /&gt;
                 input  signal  is analyzed immediately to control the compan-&lt;br /&gt;
                 der, but it  is  delayed  before  being  fed  to  the  volume&lt;br /&gt;
                 adjuster.   Specifying  a  delay  approximately  equal to the&lt;br /&gt;
                 attack/decay times allows the compander to effectively  oper-&lt;br /&gt;
                 ate in a &amp;quot;predictive&amp;quot; rather than a reactive mode.&lt;br /&gt;
&lt;br /&gt;
       dcshift shift [ limitergain ]&lt;br /&gt;
                 DC Shift the audio data, with basic linear amplitude formula.&lt;br /&gt;
                 This  is  most useful if your audio data tends to not be cen-&lt;br /&gt;
                 tered around a value of 0.  Shifting it back will  allow  you&lt;br /&gt;
                 to  get  the  most  volume adjustments without clipping audio&lt;br /&gt;
                 data.&lt;br /&gt;
                 The first option is the dcshift  value.   It  is  a  floating&lt;br /&gt;
                 point number that indicates the amount to shift.&lt;br /&gt;
                 An  option  limtergain  value  can  be specified as well.  It&lt;br /&gt;
                 should have a value much less then 1.0 and is  used  only  on&lt;br /&gt;
                 peaks to prevent clipping.&lt;br /&gt;
&lt;br /&gt;
       deemph    Apply  a  treble  attenuation  shelving  filter to samples in&lt;br /&gt;
                 audio cd format.  The frequency  response  of  pre-emphasized&lt;br /&gt;
                 recordings  is  rectified.   The  filtering is defined in the&lt;br /&gt;
                 standard document ISO 908.&lt;br /&gt;
                 Add a sequence of echos to a sound sample.  Each  delay/decay&lt;br /&gt;
                 part  gives the delay in milliseconds and the decay (relative&lt;br /&gt;
                 to gain-in) of that echo.  Gain-out is the volume of the out-&lt;br /&gt;
                 put.&lt;br /&gt;
       earwax      Makes    sound  easier to listen to on headphones.  Adds audio-&lt;br /&gt;
                 cues to samples in audio cd format so that when  listened  to&lt;br /&gt;
                 on headphones the stereo image is moved from inside your head&lt;br /&gt;
                 (standard for headphones) to outside and in front of the lis-&lt;br /&gt;
                 tener (standard for speakers). See&lt;br /&gt;
                 www.geocities.com/beinges for a full explanation.&lt;br /&gt;
&lt;br /&gt;
       echo gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
                 Add  echoing  to a sound sample.  Each delay/decay part gives&lt;br /&gt;
                 the delay in milliseconds and the decay (relative to gain-in)&lt;br /&gt;
                 of that echo.  Gain-out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       echos gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
                 Add  a sequence of echos to a sound sample.  Each delay/decay&lt;br /&gt;
                 part gives the delay in milliseconds and the decay  (relative&lt;br /&gt;
                 to gain-in) of that echo.  Gain-out is the volume of the out-&lt;br /&gt;
                 put.&lt;br /&gt;
&lt;br /&gt;
       fade [ type ] fade-in-length&lt;br /&gt;
            [ stop-time [ fade-out-length ] ]&lt;br /&gt;
                 Add a fade effect to the beginning, end, or both of the audio&lt;br /&gt;
                 data.&lt;br /&gt;
&lt;br /&gt;
                 For fade-ins, this starts from the first sample and ramps the&lt;br /&gt;
                 volume of the audio from 0 to full volume over fade-in-length&lt;br /&gt;
                 seconds.  Specify 0 seconds if no fade-in is wanted.&lt;br /&gt;
&lt;br /&gt;
                 For fade-outs, the audio data will be truncated at the  stop-&lt;br /&gt;
                 time and the volume will be ramped from full volume down to 0&lt;br /&gt;
                 starting at fade-out-length seconds before the stop-time.  No&lt;br /&gt;
                 fade-out is performed if these options are not specified.&lt;br /&gt;
                 All  times can be specified in either periods of time or sam-&lt;br /&gt;
                 ple  counts.   To  specify  time  periods  use   the   format&lt;br /&gt;
                 hh:mm:ss.frac  format.  To specify using sample counts, spec-&lt;br /&gt;
                 ify the number of samples and append the letter  's'  to  the&lt;br /&gt;
                 sample count (for example 8000s).&lt;br /&gt;
                 An optional type can be specified to change the type of enve-&lt;br /&gt;
                 lope.  Choices are q for quarter of a sinewave, h for half  a&lt;br /&gt;
                 sinewave,  t  for  linear slope, l for logarithmic, and p for&lt;br /&gt;
                 inverted parabola.  The default is a linear slope.&lt;br /&gt;
&lt;br /&gt;
       filter [ low ]-[ high ] [ window-len [ beta ] ]&lt;br /&gt;
                 Apply a Sinc-windowed lowpass, highpass, or  bandpass  filter&lt;br /&gt;
                 of given window length to the signal.  low refers to the fre-&lt;br /&gt;
                 quency of the lower 6dB corner of the filter.  high refers to&lt;br /&gt;
                 the frequency of the upper 6dB corner of the filter.&lt;br /&gt;
&lt;br /&gt;
                 A  lowpass  filter is obtained by leaving low unspecified, or&lt;br /&gt;
                 0.  A highpass filter is obtained by  leaving  high  unspeci-&lt;br /&gt;
                 fied,  or  0,  or  greater  than or equal to the Nyquist fre-&lt;br /&gt;
                 quency.&lt;br /&gt;
&lt;br /&gt;
                 The window-len, if unspecified, defaults to 128.  Longer win-&lt;br /&gt;
                 dows  give  a  sharper cutoff, smaller windows a more gradual&lt;br /&gt;
                 cutoff.&lt;br /&gt;
&lt;br /&gt;
                 The beta, if unspecified, defaults to  16.   This  selects  a&lt;br /&gt;
                 Kaiser window.  You can select a Nuttall window by specifying&lt;br /&gt;
                 anything &amp;lt;= 2.0 here.  For  more  discussion  of  beta,  look&lt;br /&gt;
                 under the resample effect.&lt;br /&gt;
&lt;br /&gt;
       flanger gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
                 Add   a   flanger   to   a   sound   sample.    Each   triple&lt;br /&gt;
                 delay/decay/speed  gives  the  delay  in milliseconds and the&lt;br /&gt;
                 decay (relative to gain-in) with a modulation  speed  in  Hz.&lt;br /&gt;
                 The  modulation  is  either sinodial (-s) or triangular (-t).&lt;br /&gt;
                 Gain-out is the volume of the output.&lt;br /&gt;
       highp frequency&lt;br /&gt;
                 Apply a single pole recursive  high-pass  filter.   The  fre-&lt;br /&gt;
                 quency response drops logarithmically with I frequency in the&lt;br /&gt;
                 middle of the drop.  The slope of the filter is quite gentle.&lt;br /&gt;
                 See filter for a highpass effect with sharper cutoff.&lt;br /&gt;
&lt;br /&gt;
       highpass frequency&lt;br /&gt;
                 Butterworth highpass filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
        lowp frequency&lt;br /&gt;
                 Apply a single pole recursive low-pass filter.  The frequency&lt;br /&gt;
                 response  drops  logarithmically with frequency in the middle&lt;br /&gt;
                 of the drop.  The slope of the filter is quite  gentle.   See&lt;br /&gt;
                 filter for a lowpass effect with sharper cutoff.&lt;br /&gt;
&lt;br /&gt;
       lowpass frequency&lt;br /&gt;
                 Butterworth lowpass filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       mask      Add &amp;quot;masking noise&amp;quot; to signal.  This effect deliberately adds&lt;br /&gt;
                 white noise to a sound in order to mask quantization effects,&lt;br /&gt;
                 created by the process of  playing  a  sound  digitally.   It&lt;br /&gt;
                 tends  to  mask buzzing voices, for example.  It adds 1/2 bit&lt;br /&gt;
                 of noise to the sound file at the output bit depth.&lt;br /&gt;
&lt;br /&gt;
       mcompand &amp;quot;attack1,decay1[,attack2,decay2...]&lt;br /&gt;
                 in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
                 [gain [initial-volume [delay ] ] ]&amp;quot; xover_freq&lt;br /&gt;
&lt;br /&gt;
                 Multi-band compander is similar to the single band  compander&lt;br /&gt;
                 but  the  audio  file is first divided up into bands and then&lt;br /&gt;
                 the compander is ran on each band.  See  the  compand  effect&lt;br /&gt;
                 for definition of its options.  Compand options are specified&lt;br /&gt;
                 between double quotes and the crossover  frequency  for  that&lt;br /&gt;
                 band  is  specefied  seperately  with xover_fre.  This can be&lt;br /&gt;
                 repeated multiple times to create multiple bands.&lt;br /&gt;
&lt;br /&gt;
       noiseprof [profile-file]&lt;br /&gt;
&lt;br /&gt;
       noisered profile-file [threshold]&lt;br /&gt;
                Noise reduction filter with profiling. This filter is   moder-&lt;br /&gt;
                ately   effective at removing consistent background noise such&lt;br /&gt;
                as hiss or hum. To use it, first run the noiseprof effect  on&lt;br /&gt;
                a section of silence (that is, a section which contains noth-&lt;br /&gt;
                ing but noise). The noiseprof effect will print a noise  pro-&lt;br /&gt;
                file  to  profile-file,  or  to  stdout if no profile-file is&lt;br /&gt;
                specified.  If there is sound output on stdout then the  pro-&lt;br /&gt;
                file will instead be directed to stderr.&lt;br /&gt;
&lt;br /&gt;
                To actually remove the noise, run SoX again with the noisered&lt;br /&gt;
                filter. The filter needs one  argument,  profile-file,   which&lt;br /&gt;
                contains  the   noise profile from noiseprof. thershold speci-&lt;br /&gt;
                fies how much noise should be removed, and may be  between  0&lt;br /&gt;
                and  1   with a default of 0.5. Higher values will remove more&lt;br /&gt;
                noise but present a greater  possibility  of  distorting  the&lt;br /&gt;
                desired  audio   signal.   Experiment with different threshold&lt;br /&gt;
                values to find the optimal one for your sample.&lt;br /&gt;
&lt;br /&gt;
       phaser gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
                 Add   a   phaser   to   a   sound   sample.    Each    triple&lt;br /&gt;
                 delay/decay/speed  gives  the  delay  in milliseconds and the&lt;br /&gt;
                 decay (relative to gain-in) with a modulation  speed  in  Hz.&lt;br /&gt;
                 The  modulation  is  either sinodial (-s) or triangular (-t).&lt;br /&gt;
                 The decay should be less than 0.5 to avoid  feedback.   Gain-&lt;br /&gt;
                 out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       pitch shift [ width interpole fade ]&lt;br /&gt;
                 Change  the  pitch  of file without affecting its duration by&lt;br /&gt;
                 cross-fading shifted samples.  shift is given in cents. Use a&lt;br /&gt;
                 positive value to shift to treble, negative value to shift to&lt;br /&gt;
                 bass.  Default shift is 0.  width of window is in ms. Default&lt;br /&gt;
                 width  is  20ms.  Try  30ms to lower pitch, and 10ms to raise&lt;br /&gt;
                 -w  &amp;lt;  nut / ham &amp;gt; : select either a Nuttal (~90 dB stopband)&lt;br /&gt;
                 or Hamming (~43 dB stopband) window.  Default is nut.&lt;br /&gt;
&lt;br /&gt;
                 -width long / short / # : specify the (approximate) width  of&lt;br /&gt;
                 the  filter.   long  is  1024  samples; short is 128 samples.&lt;br /&gt;
                 Alternatively, an exact number can be used.  Default is long.&lt;br /&gt;
                 The  short  option  is  not  recommended, as it produces poor&lt;br /&gt;
                 quality results.&lt;br /&gt;
&lt;br /&gt;
                 -cutoff # : specify the filter cutoff frequency in  terms  of&lt;br /&gt;
                 fraction  of  frequency  bandwidth,  also know as the Nyquist&lt;br /&gt;
                 frequency.  Please see the resample effect for further infor-&lt;br /&gt;
                 mation on Nyquist frequency.  If upsampling, then this is the&lt;br /&gt;
                 fraction of the original signal that should go  through.   If&lt;br /&gt;
                 downsampling,  this  is the fraction of the signal left after&lt;br /&gt;
                 downsampling.  Default is 0.95.   Remember  that  this  is  a&lt;br /&gt;
                 float.&lt;br /&gt;
&lt;br /&gt;
       reverb gain-out reverbe-time delay [ delay ... ]&lt;br /&gt;
                 Add  reverberation to a sound sample.  Each delay is given in&lt;br /&gt;
                 milliseconds and its feedback is depending on the reverb-time&lt;br /&gt;
                 in  milliseconds.   Each delay should be in the range of half&lt;br /&gt;
                 to quarter of reverb-time to get a  realistic  reverberation.&lt;br /&gt;
                 Gain-out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       silence above_periods [ duration threshold[ d | % ]&lt;br /&gt;
               [ below_periods duration threshold[ d | % ]]&lt;br /&gt;
                 Removes silence from the beginning or end of  a  sound  file.&lt;br /&gt;
                 Silence is anything below a specified threshold.&lt;br /&gt;
                 When trimming silence from the beginning of a sound file, you&lt;br /&gt;
                 specify a duration of audio that is  above  a  given  silence&lt;br /&gt;
                 threshold before audio data is processed.  You can also spec-&lt;br /&gt;
                 ify the count of periods of none silence you want  to  detect&lt;br /&gt;
                 before  processing  audio data.  Specify a period of 0 if you&lt;br /&gt;
                 do not want to trim data from the front of the sound file.&lt;br /&gt;
                 When optionally trimming silence form  the  end  of  a  sound&lt;br /&gt;
                 file,  you specify the duration of audio that must be below a&lt;br /&gt;
                 given threshold before stopping to  process  audio  data.   A&lt;br /&gt;
                 count  of  periods that occur below the threshold may also be&lt;br /&gt;
                 specified.  If this options are not specified  then  data  is&lt;br /&gt;
                 not trimmed from the end of the audio file.&lt;br /&gt;
                 Duration  counts may be in the format of time, hh:mm:ss.frac,&lt;br /&gt;
                 or in the exact count of samples.&lt;br /&gt;
                 Threshold may be suffixed with d, or % to indicated the value&lt;br /&gt;
                 is  in  decibels  or  a percentage of max value of the sample&lt;br /&gt;
                 value.  A value of '0%' will look for total silence.&lt;br /&gt;
&lt;br /&gt;
       speed [ -c ] factor&lt;br /&gt;
                 Speed up or down the sound, as a magnetic tape with  a  speed&lt;br /&gt;
                 control.   It  affects  both  pitch and time. A factor of 1.0&lt;br /&gt;
                 means no change, and is the default.  2.0 doubles speed, thus&lt;br /&gt;
                 time  length is cut by a half and pitch is one octave higher.&lt;br /&gt;
                 0.5 halves speed thus time length doubles and  pitch  is  one&lt;br /&gt;
                 octave  lower.  If the optional -c parameter is used then the&lt;br /&gt;
                 factor is specified in &amp;quot;cents&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
       stretch factor [window fade shift fading]&lt;br /&gt;
                 Time  stretch file by a given factor. Change duration without&lt;br /&gt;
                 affecting the pitch.  factor of  stretching:  &amp;gt;1.0  lengthen,&lt;br /&gt;
                 &amp;lt;1.0  shorten  duration.   window  size  is in ms. Default is&lt;br /&gt;
                 20ms. The fade option, can be &amp;quot;lin&amp;quot;.  shift  ratio,  in  [0.0&lt;br /&gt;
                 1.0].  Default depends on stretch factor. 1.0 to shorten, 0.8&lt;br /&gt;
                 to lengthen.  The fading ratio, in [0.0 0.5]. The amount of a&lt;br /&gt;
                 fade's default depends on factor and shift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       synth [ length ] type mix [ freq [ -freq2 ]&lt;br /&gt;
             [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]&lt;br /&gt;
                 The  synth  effect will generate various types of audio data.&lt;br /&gt;
                 Although this effect is used to generate audio data, an input&lt;br /&gt;
                 file  must  be specified.  The length of the input audio file&lt;br /&gt;
                 determines the length of the output audio file.&lt;br /&gt;
                 &amp;lt;length&amp;gt;  length  in  sec  or  hh:mm:ss.frac,  0=inputlength,&lt;br /&gt;
                 default=0&lt;br /&gt;
                 &amp;lt;type&amp;gt;  is  sine,  square,  triangle, sawtooth, trapetz, exp,&lt;br /&gt;
                 whitenoise, pinknoise, brownnoise, default=sine&lt;br /&gt;
                 &amp;lt;mix&amp;gt; is create, mix, amod, default=create&lt;br /&gt;
                 &amp;lt;freq&amp;gt; frequency at beginning in Hz, not used  for noise..&lt;br /&gt;
                 &amp;lt;freq2&amp;gt;  frequency  at  end  in  Hz,  not  used  for  noise..&lt;br /&gt;
                 &amp;lt;freq/2&amp;gt; can be given as %%n, where 'n' is the number of half&lt;br /&gt;
                 notes in respect to A (440Hz)&lt;br /&gt;
                 &amp;lt;off&amp;gt; Bias (DC-offset)  of signal in percent, default=0&lt;br /&gt;
                 &amp;lt;ph&amp;gt; phase shift 0..100 shift phase  0..2*Pi,  not  used  for&lt;br /&gt;
                 noise..&lt;br /&gt;
                 &amp;lt;p1&amp;gt;  square:  Ton/Toff,  triangle+trapetz: rising slope time&lt;br /&gt;
                 (0..100)&lt;br /&gt;
                 &amp;lt;p2&amp;gt; trapetz: ON time (0..100)&lt;br /&gt;
                 the  audio  data.  The format for specifying sample counts is&lt;br /&gt;
                 the number of samples with the letter 's' appended to it.   A&lt;br /&gt;
                 value  of  8000s will wait until 8000 samples are read before&lt;br /&gt;
                 starting to process audio data.&lt;br /&gt;
&lt;br /&gt;
       vibro speed  [ depth ]&lt;br /&gt;
                 Add the world-famous Fender Vibro-Champ  sound  effect  to  a&lt;br /&gt;
                 sound  sample by using a sine wave as the volume knob.  Speed&lt;br /&gt;
                 gives the Hertz value of the wave.  This must  be  under  30.&lt;br /&gt;
                 Depth  gives  the  amount  the volume is cut into by the sine&lt;br /&gt;
                 wave, ranging 0.0 to 1.0 and defaulting to 0.5.&lt;br /&gt;
&lt;br /&gt;
       vol gain [ type [ limitergain ] ]&lt;br /&gt;
                 The vol effect is much like the command line option  -v.   It&lt;br /&gt;
                 allows  you  to adjust the volume of an input file and allows&lt;br /&gt;
                 you to specify  the  adjustment  in  relation  to  amplitude,&lt;br /&gt;
                 power,  or  dB.  If type is not specified then it defaults to&lt;br /&gt;
                 amplitude.&lt;br /&gt;
                 When type is amplitude then a linear change of the  amplitude&lt;br /&gt;
                 is  performed  based  on the gain.  Therefore, a value of 1.0&lt;br /&gt;
                 will keep the volume the same, 0.0 to &amp;lt; 1.0  will  cause  the&lt;br /&gt;
                 volume  to decrease and values of &amp;gt; 1.0 will cause the volume&lt;br /&gt;
                 to increase.  Beware of clipping audio data when the gain  is&lt;br /&gt;
                 greater then 1.0.  A negative value performs the same adjust-&lt;br /&gt;
                 ment while also changing the phase.&lt;br /&gt;
                 When type is power then a value of 1.0 also means  no  change&lt;br /&gt;
                 in volume.&lt;br /&gt;
                 When  type  is  dB  the amplitude is changed logarithmically.&lt;br /&gt;
                 0.0 is constant while +6 doubles the amplitude.&lt;br /&gt;
                 An optional limitergain value can be specified and should  be&lt;br /&gt;
                 a value much less then 1.0 (ie 0.05 or 0.02) and is used only&lt;br /&gt;
                 on peaks to prevent clipping.  Not specifying this  parameter&lt;br /&gt;
                 will  cause  no  limiter  to  be used.  In verbose mode, this&lt;br /&gt;
                 effect will display the percentage of audio data that  needed&lt;br /&gt;
                 to be limited.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       Echo&lt;br /&gt;
&lt;br /&gt;
       An echo(1,3x,1 builtins) effect can be naturally found in(1,8) the mountains, standing  some-&lt;br /&gt;
       where  on  a  mountain and shouting a single word will result in(1,8) one or&lt;br /&gt;
       more repetitions of the word (if(3,n) not, turn a bit around and try  again,&lt;br /&gt;
       or climb to the next mountain).&lt;br /&gt;
&lt;br /&gt;
       However,  the  time(1,2,n)  difference  between  shouting and repeating is the&lt;br /&gt;
       delay (time(1,2,n)), its loudness is the decay. Multiple echos can  have  dif-&lt;br /&gt;
       ferent delays and decays.&lt;br /&gt;
&lt;br /&gt;
       It  is  very  popular  to  use  echos to play an instrument with itself&lt;br /&gt;
       together, like some guitar players (Brain May from Queen) or  vocalists&lt;br /&gt;
       are  doing.  For music samples of more than one instrument, echo(1,3x,1 builtins) can be&lt;br /&gt;
       used to add a second sample shortly after the original one.&lt;br /&gt;
&lt;br /&gt;
       This will sound as if(3,n) you are doubling the number of instruments  play-&lt;br /&gt;
       ing in(1,8) the same sample:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.88 60.0 0.4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If the delay is very short, then it sound like a (metallic) robot play-&lt;br /&gt;
       ing music:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.88 6.0 0.4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Longer delay will sound like an open(2,3,n) air concert in(1,8) the mountains:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.9 1000.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       One mountain more, and:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.9 1000.0 0.3 1800.0 0.25&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Echos&lt;br /&gt;
&lt;br /&gt;
       Like the echo effect, echos stand for &amp;quot;ECHO in  Sequel&amp;quot;,  that  is  the&lt;br /&gt;
       first  echos takes the input, the second the input and the first echos,&lt;br /&gt;
       the third the input and the first and the second echos, ... and so  on.&lt;br /&gt;
       Care  should  be  taken  using  many echos (see introduction); a single&lt;br /&gt;
       echos has the same effect as a single echo.&lt;br /&gt;
&lt;br /&gt;
       The sample will be bounced twice in(1,8) symmetric echos:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 700.0 0.25 700.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample will be bounced twice in(1,8) asymmetric echos:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 700.0 0.25 900.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample will sound as if(3,n) played in(1,8) a garage:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 40.0 0.25 63.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Chorus&lt;br /&gt;
&lt;br /&gt;
       The chorus effect has its name because it will often be used to make  a&lt;br /&gt;
       single  vocal  sound  like  a  chorus.  But  it can be applied to other&lt;br /&gt;
       instrument samples too.&lt;br /&gt;
&lt;br /&gt;
       It works like the echo(1,3x,1 builtins) effect with a short delay, but the  delay  isn't&lt;br /&gt;
       constant.  The delay is varied using a sinusoidal or triangular modula-&lt;br /&gt;
       tion. The modulation depth defines the range  the  modulated  delay  is&lt;br /&gt;
       played  before  or  after the delay. Hence the delayed sound will sound&lt;br /&gt;
       slower or faster, that is the delayed sound tuned around  the  original&lt;br /&gt;
       one, like in(1,8) a chorus where some vocals are a bit out of tune.&lt;br /&gt;
&lt;br /&gt;
       The  typical  delay is around 40ms to 60ms, the speed of the modulation&lt;br /&gt;
       is best near 0.25Hz and the modulation depth around 2ms.&lt;br /&gt;
&lt;br /&gt;
       A single delay will make the sample more overloaded:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;chorus 0.7 0.9 55.0 0.4 0.25 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Two delays of the original samples sound like this:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;chorus 0.6 0.9 50.0 0.4 0.25 2.0 -t 60.0 0.32 0.4 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       A big chorus of the sample is (three additional samples):&lt;br /&gt;
&lt;br /&gt;
              SoxFilter(&amp;quot;chorus 0.5 0.9 50.0 0.4 0.25 2.0 -t 60.0 0.32 0.4 2.3 -t 40.0 0.3 0.3 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Flanger&lt;br /&gt;
&lt;br /&gt;
       The flanger effect is like the chorus  effect,  but  the  delay  varies&lt;br /&gt;
       between  0ms  and  maximal  5ms.  It sound like wind blowing, sometimes&lt;br /&gt;
       faster or slower including changes of the speed.&lt;br /&gt;
&lt;br /&gt;
       The flanger effect is widely used in(1,8) funk and  soul  music,  where  the&lt;br /&gt;
       guitar sound varies frequently slow or a bit faster.&lt;br /&gt;
&lt;br /&gt;
       The  typical delay is around 3ms to 5ms, the speed of the modulation is&lt;br /&gt;
       best near 0.5Hz.&lt;br /&gt;
&lt;br /&gt;
       Now, let's groove the sample:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.6 0.87 3.0 0.9 0.5 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       listen carefully between the difference of  sinusoidal  and  triangular&lt;br /&gt;
       modulation:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.6 0.87 3.0 0.9 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If the decay is a bit lower, than the effect sounds more popular:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.8 0.88 3.0 0.4 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The drunken loudspeaker system:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.9 0.9 4.0 0.23 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Reverb&lt;br /&gt;
&lt;br /&gt;
       The  reverb effect is often used in(1,8) audience hall which are to small or&lt;br /&gt;
       contain too many many visitors which disturb (dampen) the reflection of&lt;br /&gt;
       sound  at  the walls.  Reverb will make the sound be perceived as if(3,n) it&lt;br /&gt;
       were in(1,8) a large hall.  You can try the reverb effect in(1,8)  your  bathroom&lt;br /&gt;
       or  garage  or sport halls by shouting loud some words. You'll hear the&lt;br /&gt;
       words reflected from the walls.&lt;br /&gt;
&lt;br /&gt;
       The biggest problem in(1,8) using the reverb effect is the  correct  setting&lt;br /&gt;
       of the (wall) delays such that the sound is realistic and doesn't sound&lt;br /&gt;
       like music playing in(1,8) a  tin(1,5)  can  or  has  overloaded  feedback  which&lt;br /&gt;
       destroys  any  illusion  of  playing in(1,8) a big hall.  To help you obtain&lt;br /&gt;
       realistic reverb effects, you should decide first how long  the  reverb&lt;br /&gt;
       should  take place until it is not loud enough to be registered by your&lt;br /&gt;
       ears. This is be done by varying the  reverb  time(1,2,n)  &amp;quot;t&amp;quot;.   To  simulate&lt;br /&gt;
       small halls, use 200ms.  To simulate large halls, use 1000ms.  Clearly,&lt;br /&gt;
       the walls of such a hall aren't far away, so you should define its set-&lt;br /&gt;
       ting  be  given  every wall its delay time.  However, if(3,n) the wall is to&lt;br /&gt;
       far away for the reverb time(1,2,n), you won't hear the reverb, so the nearest&lt;br /&gt;
       wall will be best at &amp;quot;t/4&amp;quot; delay and the farthest at &amp;quot;t/2&amp;quot;. You can try&lt;br /&gt;
       other distances as well, but it won't sound very realistic.  The  walls&lt;br /&gt;
       shouldn't  stand  to  close(2,7,n) to each other and not in(1,8) a multiple integer&lt;br /&gt;
       distance to each other ( so avoid wall like: 200.0 and 202.0, or  some-&lt;br /&gt;
       thing like 100.0 and 200.0 ).&lt;br /&gt;
&lt;br /&gt;
       Since  audience  halls  do have a lot of walls, we will start designing&lt;br /&gt;
       one beginning with one wall:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       One wall more:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Next two walls:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Now, why not a futuristic hall with six walls:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0 280.0 300.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If  you  run out of machine power or memory, then stop as many applica-&lt;br /&gt;
       tions as possible (every interrupt will consume a lot of CPU time(1,2,n) which&lt;br /&gt;
       for bigger halls is absolutely necessary).&lt;br /&gt;
&lt;br /&gt;
       Phaser&lt;br /&gt;
&lt;br /&gt;
       The  phaser  effect  is  like  the flanger effect, but it uses a reverb&lt;br /&gt;
       instead of an echo(1,3x,1 builtins) and does phase shifting. You'll hear the  difference&lt;br /&gt;
       in(1,8) the examples comparing both effects (simply change the effect name).&lt;br /&gt;
       The delay modulation can be sinusoidal or triangular, preferable is the&lt;br /&gt;
       later for multiple instruments. For single instrument sounds, the sinu-&lt;br /&gt;
       soidal phaser effect will give a sharper  phasing  effect.   The  decay&lt;br /&gt;
       shouldn't  be  to  close(2,7,n)  to 1.0 which will cause dramatic feedback.  A&lt;br /&gt;
       good range is about 0.5 to 0.1 for the decay.&lt;br /&gt;
&lt;br /&gt;
       We will take a parameter setting as for the flanger before (gain-out is&lt;br /&gt;
       lower since feedback can raise(3,n) the output dramatically):&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.8 0.74 3.0 0.4 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The drunken loudspeaker system (now less(1,3) alcohol):&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.9 0.85 4.0 0.23 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       A popular sound of the sample is as follows:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.89 0.85 1.0 0.24 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample sounds if(3,n) ten springs are in(1,8) your ears:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.6 0.66 3.0 0.6 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Compander&lt;br /&gt;
&lt;br /&gt;
       The  compander  effect  allows the dynamic range of a signal(2,7) to be com-&lt;br /&gt;
       pressed or expanded.  For most situations, the attack time(1,2,n) (response to&lt;br /&gt;
       the music getting louder) should be shorter than the decay time(1,2,n) because&lt;br /&gt;
       our ears are more sensitive to suddenly loud  music  than  to  suddenly&lt;br /&gt;
       soft music.&lt;br /&gt;
&lt;br /&gt;
       For  example,  suppose  you  are  listening  to  Strauss'  &amp;quot;Also Sprach&lt;br /&gt;
       Zarathustra&amp;quot; in(1,8) a noisy environment such as a car.  If you turn up  the&lt;br /&gt;
       volume  enough  to hear the soft passages over the road noise, the loud&lt;br /&gt;
       sections will be too loud.  You could try this:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;compand 0.3,1 -90,-90,-70,-70,-60,-20,0,0 -5 0 0.2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The transfer function (&amp;quot;-90,...&amp;quot;) says that very  soft  sounds  between&lt;br /&gt;
       -90  and  -70 decibels (-90 is about the limit of 16-bit encoding(3,n)) will&lt;br /&gt;
       remain unchanged.  That keeps the compander from boosting the volume on&lt;br /&gt;
       &amp;quot;silent&amp;quot;  passages  such  as between movements.  However, sounds in(1,8) the&lt;br /&gt;
       range -60 decibels to 0 decibels (maximum volume) will  be  boosted  so&lt;br /&gt;
       that  the  60-dB dynamic range of the original music will be compressed&lt;br /&gt;
       3-to-1 into a 20-dB range, which is wide enough to enjoy the music  but&lt;br /&gt;
       narrow  enough  to get around the road noise.  The -5 dB output gain is&lt;br /&gt;
       needed to avoid clipping (the number is inexact,  and  was  derived  by&lt;br /&gt;
       experimentation).   The  0  for the initial volume will work fine for a&lt;br /&gt;
       clip that starts with a bit of silence, and the delay of  0.2  has  the&lt;br /&gt;
       effect  of  causing the compander to react a bit more quickly to sudden&lt;br /&gt;
       volume changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version        Date            Changes&amp;lt;br&amp;gt;&lt;br /&gt;
 v2.1           2023/12/03      - Allow effects which can alter sampling rate&lt;br /&gt;
                                - Allow effects which can change the number of channels&lt;br /&gt;
                                - Add distinct XP build (v141_xp toolset) needed in 2023&lt;br /&gt;
 v2.0           2023/12/02      - Full rewrite, using 14.4.2 libsox library version, moved to github&lt;br /&gt;
 v1.1 beta      2006/01/02      - release (12.17.9 libsox)&lt;br /&gt;
 v1.0           2005/12/29      - initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v1.1&lt;br /&gt;
|[x86]: [https://forum.doom9.org/attachment.php?attachmentid=5193&amp;amp;d=1136242927 SoxFilter_11.zip] /// [https://forum.doom9.org/attachment.php?attachmentid=5194&amp;amp;d=1136242951 SoxFilter_11_src.zip]&lt;br /&gt;
---------&lt;br /&gt;
[x64]: [https://down.7086.in/soxfilter_64_r0.zip soxfilter_64_r0.zip]&lt;br /&gt;
|[x86]: [https://web.archive.org/web/20200626015535if_/https://files.videohelp.com/u/223002/SoxFilter_11.zip SoxFilter_11.zip] (src included)&lt;br /&gt;
---------&lt;br /&gt;
[x64]: [https://web.archive.org/web/20200703223101if_/https://down.7086.in/soxfilter_64_r0.zip soxfilter_64_r0.zip]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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#Audio_Filters|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/SoxFilter</id>
		<title>SoxFilter</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/SoxFilter"/>
				<updated>2023-12-18T09:50:39Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: New version: SoxFilter v2.1 additions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat4|External_filters|Plugins|Plugins_x64|Audio_filters}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
| pinterf v2.1&lt;br /&gt;
{{author/Sh0dan}} v1.1 beta&lt;br /&gt;
| v2.1&lt;br /&gt;
| 3=[https://github.com/pinterf/SoxFilter/releases SoxFilter 2 releases]&lt;br /&gt;
| 4=Audio filters&lt;br /&gt;
| 5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
| 6=[https://forum.doom9.org/showthread.php?t=104792 Doom9 Forum]&amp;lt;br&amp;gt;[https://forum.doom9.org/showthread.php?t=181566 Doom9 Forum (v1.1 x64 version)]}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This plugin will allow you to run [http://sox.sourceforge.net/ SOX] effects within AviSynth. Most effects are supported, and multiple effects can be stacked after each other.&lt;br /&gt;
&amp;lt;br&amp;gt;Version 1.1 is based on SoX library 12.17.9&lt;br /&gt;
&amp;lt;br&amp;gt;Version 2.0 is based on SoX library 14.4.2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SoX library works with 32 bit integer samples internally. All inputs will be automatically converted to this audio format.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
=== v2.1 ===&lt;br /&gt;
* [x86/x64]: [[AviSynth+ 3.7.3]]&lt;br /&gt;
=== v1.1 === &lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.5.8 or greater]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: N/A&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|SoxFilter (clip, string effect1 [, string effect 2, string effect 3...])}}&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||string|}}&lt;br /&gt;
:::Any number of effects can be entered, and they will be executed in the order they are specified. Effect syntax is just like SOX. See [[#Effect Overview|Effect Overview]] and [[#Filter Reference|Filter Reference]] below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
A simple filter could look like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 500 100&amp;quot;)&lt;br /&gt;
convertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will keep a 100Hz band around 500Hz. SoxFilter converts audio to 32 bit integers. This allows to keep the additional dynamic range of float point samples, but it requires a convertion to 16 bit audio before output, since most codecs only support 16 bit.&lt;br /&gt;
&lt;br /&gt;
Multiple effects can be stacked like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 2000 1000&amp;quot;, &amp;quot;vol 2.0&amp;quot;, &amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
ConvertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which is a faster version of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;AviSource(&amp;quot;movie.avi&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;bandpass 2000 1000&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;vol 2.0&amp;quot;)&lt;br /&gt;
SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
ConvertAudioTo16Bit()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== AviSynth Specifics ==&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Since v1.1 release SoX library internal API has been changed. v2.x was created from scratch.&lt;br /&gt;
Also, some effects were removed, and others added in the past ~15 years. &lt;br /&gt;
The parameters of some effects had been changed as well.&lt;br /&gt;
&lt;br /&gt;
E.g. reverb parameters were modified in 2008; &amp;quot;filter&amp;quot; was removed, use &amp;quot;sinc&amp;quot; instead &lt;br /&gt;
(with a different syntax).&lt;br /&gt;
&lt;br /&gt;
Check SoxFilter_usages.txt in v2.x release pack, or visit &lt;br /&gt;
https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects&lt;br /&gt;
for effect parameters and their actual description.&lt;br /&gt;
&lt;br /&gt;
=== Known Issues ===&lt;br /&gt;
&lt;br /&gt;
* Linear access is heavily recommended. SOX filters doesn't support seeking, so stream is restarted every time a samples previous to the last one is requested.&lt;br /&gt;
* Do not use Avisynth+ versions before 3.7.3 if filter result is used later in the script multiple times. Audio cache (which was reintroduced in Avisynth+ 3.7.3) is a must have in those cases.&lt;br /&gt;
* (v2.1-) none of filters were removed from 14.4.2 SoX library, still, some may be incompatible. Filters can even change sample rate or alter the number of channels. In v1.1 these filters were not allowed.&lt;br /&gt;
* (v1.1 only) The AviSynth version is VERY picky about spaces. If you make double spaces or a space before or after the quotes the command will not be recognized.&lt;br /&gt;
* (v1.1 only) If one filter doesn't support multichannel audio the entire chain is converted to mono filters, this might affect some filters like '''earwax'''. Use multiple filter instances instead.&lt;br /&gt;
* (v1.1 only) Some filters have been removed since they were incompatible with the AviSynth version. All these filters have internal Avisynth equivalents.&lt;br /&gt;
* (v1.1 only) '''compand''' is very unstable in the current interface, and doesn't support restarts (distorted audio). Don't use this together with other effetcs.&lt;br /&gt;
* (v1.1 only) The length of audio cannot be modified.&lt;br /&gt;
&lt;br /&gt;
=== Version 1.1 ===&lt;br /&gt;
&lt;br /&gt;
*Solved issue with earwax refusing to play.&lt;br /&gt;
&lt;br /&gt;
*Solved problem with time alternating effects.&lt;br /&gt;
&lt;br /&gt;
*Solved issues with some filters producing clicks.&lt;br /&gt;
&lt;br /&gt;
*Made sure compand and mcompand doesn't crash. Still quite buggy though.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Effect Overview ==&lt;br /&gt;
&lt;br /&gt;
This section contains effects supported in SoxFilter v1.1 (12.17.9 SoX Library version).&lt;br /&gt;
&lt;br /&gt;
For effects supported by SoxFilter v2.x (SoX Library 14.4.2) visit&lt;br /&gt;
https://manpages.ubuntu.com/manpages/lunar/en/man1/sox.1.html#effects&lt;br /&gt;
for parameters and their actual description.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       Effects:&lt;br /&gt;
           band [ -n ] center [ width ]&lt;br /&gt;
           bandpass frequency bandwidth&lt;br /&gt;
&lt;br /&gt;
           bandreject frequency bandwidth&lt;br /&gt;
           chorus gain-in gain out delay decay speed depth&lt;br /&gt;
&lt;br /&gt;
                  -s | -t [ delay decay speed depth -s | -t ]&lt;br /&gt;
           compand attack1,decay1[,attack2,decay2...]&lt;br /&gt;
                   in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
                   [ gain [ initial-volume [ delay ] ] ]&lt;br /&gt;
&lt;br /&gt;
           dcshift shift [ limitergain ]&lt;br /&gt;
           deemph&lt;br /&gt;
           earwax&lt;br /&gt;
           echo gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
           echos gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
           fade [ type ] fade-in-length&lt;br /&gt;
&lt;br /&gt;
                [ stop-time [ fade-out-length ] ]&lt;br /&gt;
           filter [ low ]-[ high ] [ window-len [ beta ]]&lt;br /&gt;
           flanger gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
           highp frequency&lt;br /&gt;
           highpass frequency&lt;br /&gt;
           lowp frequency&lt;br /&gt;
           lowpass frequency&lt;br /&gt;
&lt;br /&gt;
           mask&lt;br /&gt;
           mcompand &amp;quot;attack1,decay1[,attack2,decay2...]&lt;br /&gt;
              in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
              [ gain [ initial-volume [ delay ] ] ]&amp;quot; xover_freq&lt;br /&gt;
           noiseprof [profile-file]&lt;br /&gt;
           noisered profile-file [threshold]&lt;br /&gt;
           phaser gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
&lt;br /&gt;
           pitch shift [ width interpole fade ]&lt;br /&gt;
           reverb gain-out reverb-time delay [ delay ... ]&lt;br /&gt;
           silence above_periods [ duration threshold[ d | % ]&lt;br /&gt;
              [ below_periods duration&lt;br /&gt;
              threshold[ d | % ]]&lt;br /&gt;
           speed [ -c ] factor&lt;br /&gt;
           stretch [ factor [ window fade shift fading ]&lt;br /&gt;
           swap [ 1 2 | 1 2 3 4 ]&lt;br /&gt;
           synth [ length ] type mix [ freq [ -freq2 ]&lt;br /&gt;
                 [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]&lt;br /&gt;
           vibro speed [ depth ]&lt;br /&gt;
           vol gain [ type [ limitergain ] ]&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Filter Reference ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       band [ -n ] center [ width ]&lt;br /&gt;
                 Apply a band-pass filter.  The frequency response drops loga-&lt;br /&gt;
                 rithmically around the center frequency.  The width gives the&lt;br /&gt;
                 slope of the drop.  The frequencies at  center  +  width  and&lt;br /&gt;
                 center  -  width  will  be half of their original amplitudes.&lt;br /&gt;
                 Band defaults to a mode oriented  to  pitched  signals,  i.e.&lt;br /&gt;
                 voice,  singing,  or  instrumental music.  The -n (for noise)&lt;br /&gt;
                 option uses the alternate mode for un-pitched signals.  Warn-&lt;br /&gt;
                 ing:  -n introduces a power-gain of about 11dB in the filter,&lt;br /&gt;
                 so beware of output clipping.  Band introduces noise  in  the&lt;br /&gt;
                 shape of the filter, i.e. peaking at the center frequency and&lt;br /&gt;
                 settling around it.  See filter for a  bandpass  effect  with&lt;br /&gt;
                 steeper shoulders.&lt;br /&gt;
&lt;br /&gt;
       bandpass frequency bandwidth&lt;br /&gt;
                 Butterworth bandpass filter. Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       bandreject frequency bandwidth&lt;br /&gt;
                 Butterworth bandreject filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       chorus gain-in gain-out delay decay speed depth&lt;br /&gt;
&lt;br /&gt;
              -s | -t [ delay decay speed depth -s | -t ... ]&lt;br /&gt;
                 which the absolute value of the input signal is integrated to&lt;br /&gt;
                 determine  its  volume;  attacks refer to increases in volume&lt;br /&gt;
                 and decays refer to decreases.  Where more than one  pair  of&lt;br /&gt;
                 attack/decay   parameters  are  specified,  each  channel  is&lt;br /&gt;
                 treated separately and the number of pairs  must  agree  with&lt;br /&gt;
                 the number of input channels.  The second parameter is a list&lt;br /&gt;
                 of points on the compander's transfer function  specified  in&lt;br /&gt;
                 dB  relative  to  the maximum possible signal amplitude.  The&lt;br /&gt;
                 input values must be in a strictly increasing order  but  the&lt;br /&gt;
                 transfer  function  does not have to be monotonically rising.&lt;br /&gt;
                 The special value -inf may be used to indicate that the input&lt;br /&gt;
                 volume  should  be  associated  output  volume.   The  points&lt;br /&gt;
                 -inf,-inf and 0,0 are assumed; the latter may be  overridden,&lt;br /&gt;
                 but the former may not.&lt;br /&gt;
&lt;br /&gt;
                 The  third  (optional) parameter is a post-processing gain in&lt;br /&gt;
                 dB which is applied after the compression  has  taken  place;&lt;br /&gt;
                 the  fourth  (optional)  parameter is an initial volume to be&lt;br /&gt;
                 assumed for each channel when the effect starts.   This  per-&lt;br /&gt;
                 mits  the  user to supply a nominal level initially, so that,&lt;br /&gt;
                 for example, a very large gain is not applied to initial sig-&lt;br /&gt;
                 nal levels before the companding action has begun to operate:&lt;br /&gt;
                 it is quite probable that in such an event, the output  would&lt;br /&gt;
                 be severely clipped while the compander gain properly adjusts&lt;br /&gt;
                 itself.&lt;br /&gt;
&lt;br /&gt;
                 The fifth (optional) parameter is a delay  in  seconds.   The&lt;br /&gt;
                 input  signal  is analyzed immediately to control the compan-&lt;br /&gt;
                 der, but it  is  delayed  before  being  fed  to  the  volume&lt;br /&gt;
                 adjuster.   Specifying  a  delay  approximately  equal to the&lt;br /&gt;
                 attack/decay times allows the compander to effectively  oper-&lt;br /&gt;
                 ate in a &amp;quot;predictive&amp;quot; rather than a reactive mode.&lt;br /&gt;
&lt;br /&gt;
       dcshift shift [ limitergain ]&lt;br /&gt;
                 DC Shift the audio data, with basic linear amplitude formula.&lt;br /&gt;
                 This  is  most useful if your audio data tends to not be cen-&lt;br /&gt;
                 tered around a value of 0.  Shifting it back will  allow  you&lt;br /&gt;
                 to  get  the  most  volume adjustments without clipping audio&lt;br /&gt;
                 data.&lt;br /&gt;
                 The first option is the dcshift  value.   It  is  a  floating&lt;br /&gt;
                 point number that indicates the amount to shift.&lt;br /&gt;
                 An  option  limtergain  value  can  be specified as well.  It&lt;br /&gt;
                 should have a value much less then 1.0 and is  used  only  on&lt;br /&gt;
                 peaks to prevent clipping.&lt;br /&gt;
&lt;br /&gt;
       deemph    Apply  a  treble  attenuation  shelving  filter to samples in&lt;br /&gt;
                 audio cd format.  The frequency  response  of  pre-emphasized&lt;br /&gt;
                 recordings  is  rectified.   The  filtering is defined in the&lt;br /&gt;
                 standard document ISO 908.&lt;br /&gt;
                 Add a sequence of echos to a sound sample.  Each  delay/decay&lt;br /&gt;
                 part  gives the delay in milliseconds and the decay (relative&lt;br /&gt;
                 to gain-in) of that echo.  Gain-out is the volume of the out-&lt;br /&gt;
                 put.&lt;br /&gt;
       earwax      Makes    sound  easier to listen to on headphones.  Adds audio-&lt;br /&gt;
                 cues to samples in audio cd format so that when  listened  to&lt;br /&gt;
                 on headphones the stereo image is moved from inside your head&lt;br /&gt;
                 (standard for headphones) to outside and in front of the lis-&lt;br /&gt;
                 tener (standard for speakers). See&lt;br /&gt;
                 www.geocities.com/beinges for a full explanation.&lt;br /&gt;
&lt;br /&gt;
       echo gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
                 Add  echoing  to a sound sample.  Each delay/decay part gives&lt;br /&gt;
                 the delay in milliseconds and the decay (relative to gain-in)&lt;br /&gt;
                 of that echo.  Gain-out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       echos gain-in gain-out delay decay [ delay decay ... ]&lt;br /&gt;
                 Add  a sequence of echos to a sound sample.  Each delay/decay&lt;br /&gt;
                 part gives the delay in milliseconds and the decay  (relative&lt;br /&gt;
                 to gain-in) of that echo.  Gain-out is the volume of the out-&lt;br /&gt;
                 put.&lt;br /&gt;
&lt;br /&gt;
       fade [ type ] fade-in-length&lt;br /&gt;
            [ stop-time [ fade-out-length ] ]&lt;br /&gt;
                 Add a fade effect to the beginning, end, or both of the audio&lt;br /&gt;
                 data.&lt;br /&gt;
&lt;br /&gt;
                 For fade-ins, this starts from the first sample and ramps the&lt;br /&gt;
                 volume of the audio from 0 to full volume over fade-in-length&lt;br /&gt;
                 seconds.  Specify 0 seconds if no fade-in is wanted.&lt;br /&gt;
&lt;br /&gt;
                 For fade-outs, the audio data will be truncated at the  stop-&lt;br /&gt;
                 time and the volume will be ramped from full volume down to 0&lt;br /&gt;
                 starting at fade-out-length seconds before the stop-time.  No&lt;br /&gt;
                 fade-out is performed if these options are not specified.&lt;br /&gt;
                 All  times can be specified in either periods of time or sam-&lt;br /&gt;
                 ple  counts.   To  specify  time  periods  use   the   format&lt;br /&gt;
                 hh:mm:ss.frac  format.  To specify using sample counts, spec-&lt;br /&gt;
                 ify the number of samples and append the letter  's'  to  the&lt;br /&gt;
                 sample count (for example 8000s).&lt;br /&gt;
                 An optional type can be specified to change the type of enve-&lt;br /&gt;
                 lope.  Choices are q for quarter of a sinewave, h for half  a&lt;br /&gt;
                 sinewave,  t  for  linear slope, l for logarithmic, and p for&lt;br /&gt;
                 inverted parabola.  The default is a linear slope.&lt;br /&gt;
&lt;br /&gt;
       filter [ low ]-[ high ] [ window-len [ beta ] ]&lt;br /&gt;
                 Apply a Sinc-windowed lowpass, highpass, or  bandpass  filter&lt;br /&gt;
                 of given window length to the signal.  low refers to the fre-&lt;br /&gt;
                 quency of the lower 6dB corner of the filter.  high refers to&lt;br /&gt;
                 the frequency of the upper 6dB corner of the filter.&lt;br /&gt;
&lt;br /&gt;
                 A  lowpass  filter is obtained by leaving low unspecified, or&lt;br /&gt;
                 0.  A highpass filter is obtained by  leaving  high  unspeci-&lt;br /&gt;
                 fied,  or  0,  or  greater  than or equal to the Nyquist fre-&lt;br /&gt;
                 quency.&lt;br /&gt;
&lt;br /&gt;
                 The window-len, if unspecified, defaults to 128.  Longer win-&lt;br /&gt;
                 dows  give  a  sharper cutoff, smaller windows a more gradual&lt;br /&gt;
                 cutoff.&lt;br /&gt;
&lt;br /&gt;
                 The beta, if unspecified, defaults to  16.   This  selects  a&lt;br /&gt;
                 Kaiser window.  You can select a Nuttall window by specifying&lt;br /&gt;
                 anything &amp;lt;= 2.0 here.  For  more  discussion  of  beta,  look&lt;br /&gt;
                 under the resample effect.&lt;br /&gt;
&lt;br /&gt;
       flanger gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
                 Add   a   flanger   to   a   sound   sample.    Each   triple&lt;br /&gt;
                 delay/decay/speed  gives  the  delay  in milliseconds and the&lt;br /&gt;
                 decay (relative to gain-in) with a modulation  speed  in  Hz.&lt;br /&gt;
                 The  modulation  is  either sinodial (-s) or triangular (-t).&lt;br /&gt;
                 Gain-out is the volume of the output.&lt;br /&gt;
       highp frequency&lt;br /&gt;
                 Apply a single pole recursive  high-pass  filter.   The  fre-&lt;br /&gt;
                 quency response drops logarithmically with I frequency in the&lt;br /&gt;
                 middle of the drop.  The slope of the filter is quite gentle.&lt;br /&gt;
                 See filter for a highpass effect with sharper cutoff.&lt;br /&gt;
&lt;br /&gt;
       highpass frequency&lt;br /&gt;
                 Butterworth highpass filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
        lowp frequency&lt;br /&gt;
                 Apply a single pole recursive low-pass filter.  The frequency&lt;br /&gt;
                 response  drops  logarithmically with frequency in the middle&lt;br /&gt;
                 of the drop.  The slope of the filter is quite  gentle.   See&lt;br /&gt;
                 filter for a lowpass effect with sharper cutoff.&lt;br /&gt;
&lt;br /&gt;
       lowpass frequency&lt;br /&gt;
                 Butterworth lowpass filter.  Description coming soon!&lt;br /&gt;
&lt;br /&gt;
       mask      Add &amp;quot;masking noise&amp;quot; to signal.  This effect deliberately adds&lt;br /&gt;
                 white noise to a sound in order to mask quantization effects,&lt;br /&gt;
                 created by the process of  playing  a  sound  digitally.   It&lt;br /&gt;
                 tends  to  mask buzzing voices, for example.  It adds 1/2 bit&lt;br /&gt;
                 of noise to the sound file at the output bit depth.&lt;br /&gt;
&lt;br /&gt;
       mcompand &amp;quot;attack1,decay1[,attack2,decay2...]&lt;br /&gt;
                 in-dB1,out-dB1[,in-dB2,out-dB2...]&lt;br /&gt;
                 [gain [initial-volume [delay ] ] ]&amp;quot; xover_freq&lt;br /&gt;
&lt;br /&gt;
                 Multi-band compander is similar to the single band  compander&lt;br /&gt;
                 but  the  audio  file is first divided up into bands and then&lt;br /&gt;
                 the compander is ran on each band.  See  the  compand  effect&lt;br /&gt;
                 for definition of its options.  Compand options are specified&lt;br /&gt;
                 between double quotes and the crossover  frequency  for  that&lt;br /&gt;
                 band  is  specefied  seperately  with xover_fre.  This can be&lt;br /&gt;
                 repeated multiple times to create multiple bands.&lt;br /&gt;
&lt;br /&gt;
       noiseprof [profile-file]&lt;br /&gt;
&lt;br /&gt;
       noisered profile-file [threshold]&lt;br /&gt;
                Noise reduction filter with profiling. This filter is   moder-&lt;br /&gt;
                ately   effective at removing consistent background noise such&lt;br /&gt;
                as hiss or hum. To use it, first run the noiseprof effect  on&lt;br /&gt;
                a section of silence (that is, a section which contains noth-&lt;br /&gt;
                ing but noise). The noiseprof effect will print a noise  pro-&lt;br /&gt;
                file  to  profile-file,  or  to  stdout if no profile-file is&lt;br /&gt;
                specified.  If there is sound output on stdout then the  pro-&lt;br /&gt;
                file will instead be directed to stderr.&lt;br /&gt;
&lt;br /&gt;
                To actually remove the noise, run SoX again with the noisered&lt;br /&gt;
                filter. The filter needs one  argument,  profile-file,   which&lt;br /&gt;
                contains  the   noise profile from noiseprof. thershold speci-&lt;br /&gt;
                fies how much noise should be removed, and may be  between  0&lt;br /&gt;
                and  1   with a default of 0.5. Higher values will remove more&lt;br /&gt;
                noise but present a greater  possibility  of  distorting  the&lt;br /&gt;
                desired  audio   signal.   Experiment with different threshold&lt;br /&gt;
                values to find the optimal one for your sample.&lt;br /&gt;
&lt;br /&gt;
       phaser gain-in gain-out delay decay speed &amp;lt; -s | -t &amp;gt;&lt;br /&gt;
                 Add   a   phaser   to   a   sound   sample.    Each    triple&lt;br /&gt;
                 delay/decay/speed  gives  the  delay  in milliseconds and the&lt;br /&gt;
                 decay (relative to gain-in) with a modulation  speed  in  Hz.&lt;br /&gt;
                 The  modulation  is  either sinodial (-s) or triangular (-t).&lt;br /&gt;
                 The decay should be less than 0.5 to avoid  feedback.   Gain-&lt;br /&gt;
                 out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       pitch shift [ width interpole fade ]&lt;br /&gt;
                 Change  the  pitch  of file without affecting its duration by&lt;br /&gt;
                 cross-fading shifted samples.  shift is given in cents. Use a&lt;br /&gt;
                 positive value to shift to treble, negative value to shift to&lt;br /&gt;
                 bass.  Default shift is 0.  width of window is in ms. Default&lt;br /&gt;
                 width  is  20ms.  Try  30ms to lower pitch, and 10ms to raise&lt;br /&gt;
                 -w  &amp;lt;  nut / ham &amp;gt; : select either a Nuttal (~90 dB stopband)&lt;br /&gt;
                 or Hamming (~43 dB stopband) window.  Default is nut.&lt;br /&gt;
&lt;br /&gt;
                 -width long / short / # : specify the (approximate) width  of&lt;br /&gt;
                 the  filter.   long  is  1024  samples; short is 128 samples.&lt;br /&gt;
                 Alternatively, an exact number can be used.  Default is long.&lt;br /&gt;
                 The  short  option  is  not  recommended, as it produces poor&lt;br /&gt;
                 quality results.&lt;br /&gt;
&lt;br /&gt;
                 -cutoff # : specify the filter cutoff frequency in  terms  of&lt;br /&gt;
                 fraction  of  frequency  bandwidth,  also know as the Nyquist&lt;br /&gt;
                 frequency.  Please see the resample effect for further infor-&lt;br /&gt;
                 mation on Nyquist frequency.  If upsampling, then this is the&lt;br /&gt;
                 fraction of the original signal that should go  through.   If&lt;br /&gt;
                 downsampling,  this  is the fraction of the signal left after&lt;br /&gt;
                 downsampling.  Default is 0.95.   Remember  that  this  is  a&lt;br /&gt;
                 float.&lt;br /&gt;
&lt;br /&gt;
       reverb gain-out reverbe-time delay [ delay ... ]&lt;br /&gt;
                 Add  reverberation to a sound sample.  Each delay is given in&lt;br /&gt;
                 milliseconds and its feedback is depending on the reverb-time&lt;br /&gt;
                 in  milliseconds.   Each delay should be in the range of half&lt;br /&gt;
                 to quarter of reverb-time to get a  realistic  reverberation.&lt;br /&gt;
                 Gain-out is the volume of the output.&lt;br /&gt;
&lt;br /&gt;
       silence above_periods [ duration threshold[ d | % ]&lt;br /&gt;
               [ below_periods duration threshold[ d | % ]]&lt;br /&gt;
                 Removes silence from the beginning or end of  a  sound  file.&lt;br /&gt;
                 Silence is anything below a specified threshold.&lt;br /&gt;
                 When trimming silence from the beginning of a sound file, you&lt;br /&gt;
                 specify a duration of audio that is  above  a  given  silence&lt;br /&gt;
                 threshold before audio data is processed.  You can also spec-&lt;br /&gt;
                 ify the count of periods of none silence you want  to  detect&lt;br /&gt;
                 before  processing  audio data.  Specify a period of 0 if you&lt;br /&gt;
                 do not want to trim data from the front of the sound file.&lt;br /&gt;
                 When optionally trimming silence form  the  end  of  a  sound&lt;br /&gt;
                 file,  you specify the duration of audio that must be below a&lt;br /&gt;
                 given threshold before stopping to  process  audio  data.   A&lt;br /&gt;
                 count  of  periods that occur below the threshold may also be&lt;br /&gt;
                 specified.  If this options are not specified  then  data  is&lt;br /&gt;
                 not trimmed from the end of the audio file.&lt;br /&gt;
                 Duration  counts may be in the format of time, hh:mm:ss.frac,&lt;br /&gt;
                 or in the exact count of samples.&lt;br /&gt;
                 Threshold may be suffixed with d, or % to indicated the value&lt;br /&gt;
                 is  in  decibels  or  a percentage of max value of the sample&lt;br /&gt;
                 value.  A value of '0%' will look for total silence.&lt;br /&gt;
&lt;br /&gt;
       speed [ -c ] factor&lt;br /&gt;
                 Speed up or down the sound, as a magnetic tape with  a  speed&lt;br /&gt;
                 control.   It  affects  both  pitch and time. A factor of 1.0&lt;br /&gt;
                 means no change, and is the default.  2.0 doubles speed, thus&lt;br /&gt;
                 time  length is cut by a half and pitch is one octave higher.&lt;br /&gt;
                 0.5 halves speed thus time length doubles and  pitch  is  one&lt;br /&gt;
                 octave  lower.  If the optional -c parameter is used then the&lt;br /&gt;
                 factor is specified in &amp;quot;cents&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
       stretch factor [window fade shift fading]&lt;br /&gt;
                 Time  stretch file by a given factor. Change duration without&lt;br /&gt;
                 affecting the pitch.  factor of  stretching:  &amp;gt;1.0  lengthen,&lt;br /&gt;
                 &amp;lt;1.0  shorten  duration.   window  size  is in ms. Default is&lt;br /&gt;
                 20ms. The fade option, can be &amp;quot;lin&amp;quot;.  shift  ratio,  in  [0.0&lt;br /&gt;
                 1.0].  Default depends on stretch factor. 1.0 to shorten, 0.8&lt;br /&gt;
                 to lengthen.  The fading ratio, in [0.0 0.5]. The amount of a&lt;br /&gt;
                 fade's default depends on factor and shift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       synth [ length ] type mix [ freq [ -freq2 ]&lt;br /&gt;
             [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]&lt;br /&gt;
                 The  synth  effect will generate various types of audio data.&lt;br /&gt;
                 Although this effect is used to generate audio data, an input&lt;br /&gt;
                 file  must  be specified.  The length of the input audio file&lt;br /&gt;
                 determines the length of the output audio file.&lt;br /&gt;
                 &amp;lt;length&amp;gt;  length  in  sec  or  hh:mm:ss.frac,  0=inputlength,&lt;br /&gt;
                 default=0&lt;br /&gt;
                 &amp;lt;type&amp;gt;  is  sine,  square,  triangle, sawtooth, trapetz, exp,&lt;br /&gt;
                 whitenoise, pinknoise, brownnoise, default=sine&lt;br /&gt;
                 &amp;lt;mix&amp;gt; is create, mix, amod, default=create&lt;br /&gt;
                 &amp;lt;freq&amp;gt; frequency at beginning in Hz, not used  for noise..&lt;br /&gt;
                 &amp;lt;freq2&amp;gt;  frequency  at  end  in  Hz,  not  used  for  noise..&lt;br /&gt;
                 &amp;lt;freq/2&amp;gt; can be given as %%n, where 'n' is the number of half&lt;br /&gt;
                 notes in respect to A (440Hz)&lt;br /&gt;
                 &amp;lt;off&amp;gt; Bias (DC-offset)  of signal in percent, default=0&lt;br /&gt;
                 &amp;lt;ph&amp;gt; phase shift 0..100 shift phase  0..2*Pi,  not  used  for&lt;br /&gt;
                 noise..&lt;br /&gt;
                 &amp;lt;p1&amp;gt;  square:  Ton/Toff,  triangle+trapetz: rising slope time&lt;br /&gt;
                 (0..100)&lt;br /&gt;
                 &amp;lt;p2&amp;gt; trapetz: ON time (0..100)&lt;br /&gt;
                 the  audio  data.  The format for specifying sample counts is&lt;br /&gt;
                 the number of samples with the letter 's' appended to it.   A&lt;br /&gt;
                 value  of  8000s will wait until 8000 samples are read before&lt;br /&gt;
                 starting to process audio data.&lt;br /&gt;
&lt;br /&gt;
       vibro speed  [ depth ]&lt;br /&gt;
                 Add the world-famous Fender Vibro-Champ  sound  effect  to  a&lt;br /&gt;
                 sound  sample by using a sine wave as the volume knob.  Speed&lt;br /&gt;
                 gives the Hertz value of the wave.  This must  be  under  30.&lt;br /&gt;
                 Depth  gives  the  amount  the volume is cut into by the sine&lt;br /&gt;
                 wave, ranging 0.0 to 1.0 and defaulting to 0.5.&lt;br /&gt;
&lt;br /&gt;
       vol gain [ type [ limitergain ] ]&lt;br /&gt;
                 The vol effect is much like the command line option  -v.   It&lt;br /&gt;
                 allows  you  to adjust the volume of an input file and allows&lt;br /&gt;
                 you to specify  the  adjustment  in  relation  to  amplitude,&lt;br /&gt;
                 power,  or  dB.  If type is not specified then it defaults to&lt;br /&gt;
                 amplitude.&lt;br /&gt;
                 When type is amplitude then a linear change of the  amplitude&lt;br /&gt;
                 is  performed  based  on the gain.  Therefore, a value of 1.0&lt;br /&gt;
                 will keep the volume the same, 0.0 to &amp;lt; 1.0  will  cause  the&lt;br /&gt;
                 volume  to decrease and values of &amp;gt; 1.0 will cause the volume&lt;br /&gt;
                 to increase.  Beware of clipping audio data when the gain  is&lt;br /&gt;
                 greater then 1.0.  A negative value performs the same adjust-&lt;br /&gt;
                 ment while also changing the phase.&lt;br /&gt;
                 When type is power then a value of 1.0 also means  no  change&lt;br /&gt;
                 in volume.&lt;br /&gt;
                 When  type  is  dB  the amplitude is changed logarithmically.&lt;br /&gt;
                 0.0 is constant while +6 doubles the amplitude.&lt;br /&gt;
                 An optional limitergain value can be specified and should  be&lt;br /&gt;
                 a value much less then 1.0 (ie 0.05 or 0.02) and is used only&lt;br /&gt;
                 on peaks to prevent clipping.  Not specifying this  parameter&lt;br /&gt;
                 will  cause  no  limiter  to  be used.  In verbose mode, this&lt;br /&gt;
                 effect will display the percentage of audio data that  needed&lt;br /&gt;
                 to be limited.&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       Echo&lt;br /&gt;
&lt;br /&gt;
       An echo(1,3x,1 builtins) effect can be naturally found in(1,8) the mountains, standing  some-&lt;br /&gt;
       where  on  a  mountain and shouting a single word will result in(1,8) one or&lt;br /&gt;
       more repetitions of the word (if(3,n) not, turn a bit around and try  again,&lt;br /&gt;
       or climb to the next mountain).&lt;br /&gt;
&lt;br /&gt;
       However,  the  time(1,2,n)  difference  between  shouting and repeating is the&lt;br /&gt;
       delay (time(1,2,n)), its loudness is the decay. Multiple echos can  have  dif-&lt;br /&gt;
       ferent delays and decays.&lt;br /&gt;
&lt;br /&gt;
       It  is  very  popular  to  use  echos to play an instrument with itself&lt;br /&gt;
       together, like some guitar players (Brain May from Queen) or  vocalists&lt;br /&gt;
       are  doing.  For music samples of more than one instrument, echo(1,3x,1 builtins) can be&lt;br /&gt;
       used to add a second sample shortly after the original one.&lt;br /&gt;
&lt;br /&gt;
       This will sound as if(3,n) you are doubling the number of instruments  play-&lt;br /&gt;
       ing in(1,8) the same sample:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.88 60.0 0.4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If the delay is very short, then it sound like a (metallic) robot play-&lt;br /&gt;
       ing music:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.88 6.0 0.4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Longer delay will sound like an open(2,3,n) air concert in(1,8) the mountains:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.9 1000.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       One mountain more, and:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echo 0.8 0.9 1000.0 0.3 1800.0 0.25&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Echos&lt;br /&gt;
&lt;br /&gt;
       Like the echo effect, echos stand for &amp;quot;ECHO in  Sequel&amp;quot;,  that  is  the&lt;br /&gt;
       first  echos takes the input, the second the input and the first echos,&lt;br /&gt;
       the third the input and the first and the second echos, ... and so  on.&lt;br /&gt;
       Care  should  be  taken  using  many echos (see introduction); a single&lt;br /&gt;
       echos has the same effect as a single echo.&lt;br /&gt;
&lt;br /&gt;
       The sample will be bounced twice in(1,8) symmetric echos:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 700.0 0.25 700.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample will be bounced twice in(1,8) asymmetric echos:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 700.0 0.25 900.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample will sound as if(3,n) played in(1,8) a garage:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;echos 0.8 0.7 40.0 0.25 63.0 0.3&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Chorus&lt;br /&gt;
&lt;br /&gt;
       The chorus effect has its name because it will often be used to make  a&lt;br /&gt;
       single  vocal  sound  like  a  chorus.  But  it can be applied to other&lt;br /&gt;
       instrument samples too.&lt;br /&gt;
&lt;br /&gt;
       It works like the echo(1,3x,1 builtins) effect with a short delay, but the  delay  isn't&lt;br /&gt;
       constant.  The delay is varied using a sinusoidal or triangular modula-&lt;br /&gt;
       tion. The modulation depth defines the range  the  modulated  delay  is&lt;br /&gt;
       played  before  or  after the delay. Hence the delayed sound will sound&lt;br /&gt;
       slower or faster, that is the delayed sound tuned around  the  original&lt;br /&gt;
       one, like in(1,8) a chorus where some vocals are a bit out of tune.&lt;br /&gt;
&lt;br /&gt;
       The  typical  delay is around 40ms to 60ms, the speed of the modulation&lt;br /&gt;
       is best near 0.25Hz and the modulation depth around 2ms.&lt;br /&gt;
&lt;br /&gt;
       A single delay will make the sample more overloaded:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;chorus 0.7 0.9 55.0 0.4 0.25 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Two delays of the original samples sound like this:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;chorus 0.6 0.9 50.0 0.4 0.25 2.0 -t 60.0 0.32 0.4 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       A big chorus of the sample is (three additional samples):&lt;br /&gt;
&lt;br /&gt;
              SoxFilter(&amp;quot;chorus 0.5 0.9 50.0 0.4 0.25 2.0 -t 60.0 0.32 0.4 2.3 -t 40.0 0.3 0.3 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Flanger&lt;br /&gt;
&lt;br /&gt;
       The flanger effect is like the chorus  effect,  but  the  delay  varies&lt;br /&gt;
       between  0ms  and  maximal  5ms.  It sound like wind blowing, sometimes&lt;br /&gt;
       faster or slower including changes of the speed.&lt;br /&gt;
&lt;br /&gt;
       The flanger effect is widely used in(1,8) funk and  soul  music,  where  the&lt;br /&gt;
       guitar sound varies frequently slow or a bit faster.&lt;br /&gt;
&lt;br /&gt;
       The  typical delay is around 3ms to 5ms, the speed of the modulation is&lt;br /&gt;
       best near 0.5Hz.&lt;br /&gt;
&lt;br /&gt;
       Now, let's groove the sample:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.6 0.87 3.0 0.9 0.5 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       listen carefully between the difference of  sinusoidal  and  triangular&lt;br /&gt;
       modulation:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.6 0.87 3.0 0.9 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If the decay is a bit lower, than the effect sounds more popular:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.8 0.88 3.0 0.4 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The drunken loudspeaker system:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;flanger 0.9 0.9 4.0 0.23 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Reverb&lt;br /&gt;
&lt;br /&gt;
       The  reverb effect is often used in(1,8) audience hall which are to small or&lt;br /&gt;
       contain too many many visitors which disturb (dampen) the reflection of&lt;br /&gt;
       sound  at  the walls.  Reverb will make the sound be perceived as if(3,n) it&lt;br /&gt;
       were in(1,8) a large hall.  You can try the reverb effect in(1,8)  your  bathroom&lt;br /&gt;
       or  garage  or sport halls by shouting loud some words. You'll hear the&lt;br /&gt;
       words reflected from the walls.&lt;br /&gt;
&lt;br /&gt;
       The biggest problem in(1,8) using the reverb effect is the  correct  setting&lt;br /&gt;
       of the (wall) delays such that the sound is realistic and doesn't sound&lt;br /&gt;
       like music playing in(1,8) a  tin(1,5)  can  or  has  overloaded  feedback  which&lt;br /&gt;
       destroys  any  illusion  of  playing in(1,8) a big hall.  To help you obtain&lt;br /&gt;
       realistic reverb effects, you should decide first how long  the  reverb&lt;br /&gt;
       should  take place until it is not loud enough to be registered by your&lt;br /&gt;
       ears. This is be done by varying the  reverb  time(1,2,n)  &amp;quot;t&amp;quot;.   To  simulate&lt;br /&gt;
       small halls, use 200ms.  To simulate large halls, use 1000ms.  Clearly,&lt;br /&gt;
       the walls of such a hall aren't far away, so you should define its set-&lt;br /&gt;
       ting  be  given  every wall its delay time.  However, if(3,n) the wall is to&lt;br /&gt;
       far away for the reverb time(1,2,n), you won't hear the reverb, so the nearest&lt;br /&gt;
       wall will be best at &amp;quot;t/4&amp;quot; delay and the farthest at &amp;quot;t/2&amp;quot;. You can try&lt;br /&gt;
       other distances as well, but it won't sound very realistic.  The  walls&lt;br /&gt;
       shouldn't  stand  to  close(2,7,n) to each other and not in(1,8) a multiple integer&lt;br /&gt;
       distance to each other ( so avoid wall like: 200.0 and 202.0, or  some-&lt;br /&gt;
       thing like 100.0 and 200.0 ).&lt;br /&gt;
&lt;br /&gt;
       Since  audience  halls  do have a lot of walls, we will start designing&lt;br /&gt;
       one beginning with one wall:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       One wall more:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Next two walls:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Now, why not a futuristic hall with six walls:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;reverb 1.0 600.0 180.0 200.0 220.0 240.0 280.0 300.0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       If  you  run out of machine power or memory, then stop as many applica-&lt;br /&gt;
       tions as possible (every interrupt will consume a lot of CPU time(1,2,n) which&lt;br /&gt;
       for bigger halls is absolutely necessary).&lt;br /&gt;
&lt;br /&gt;
       Phaser&lt;br /&gt;
&lt;br /&gt;
       The  phaser  effect  is  like  the flanger effect, but it uses a reverb&lt;br /&gt;
       instead of an echo(1,3x,1 builtins) and does phase shifting. You'll hear the  difference&lt;br /&gt;
       in(1,8) the examples comparing both effects (simply change the effect name).&lt;br /&gt;
       The delay modulation can be sinusoidal or triangular, preferable is the&lt;br /&gt;
       later for multiple instruments. For single instrument sounds, the sinu-&lt;br /&gt;
       soidal phaser effect will give a sharper  phasing  effect.   The  decay&lt;br /&gt;
       shouldn't  be  to  close(2,7,n)  to 1.0 which will cause dramatic feedback.  A&lt;br /&gt;
       good range is about 0.5 to 0.1 for the decay.&lt;br /&gt;
&lt;br /&gt;
       We will take a parameter setting as for the flanger before (gain-out is&lt;br /&gt;
       lower since feedback can raise(3,n) the output dramatically):&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.8 0.74 3.0 0.4 0.5 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The drunken loudspeaker system (now less(1,3) alcohol):&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.9 0.85 4.0 0.23 1.3 -s&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       A popular sound of the sample is as follows:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.89 0.85 1.0 0.24 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The sample sounds if(3,n) ten springs are in(1,8) your ears:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;phaser 0.6 0.66 3.0 0.6 2.0 -t&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       Compander&lt;br /&gt;
&lt;br /&gt;
       The  compander  effect  allows the dynamic range of a signal(2,7) to be com-&lt;br /&gt;
       pressed or expanded.  For most situations, the attack time(1,2,n) (response to&lt;br /&gt;
       the music getting louder) should be shorter than the decay time(1,2,n) because&lt;br /&gt;
       our ears are more sensitive to suddenly loud  music  than  to  suddenly&lt;br /&gt;
       soft music.&lt;br /&gt;
&lt;br /&gt;
       For  example,  suppose  you  are  listening  to  Strauss'  &amp;quot;Also Sprach&lt;br /&gt;
       Zarathustra&amp;quot; in(1,8) a noisy environment such as a car.  If you turn up  the&lt;br /&gt;
       volume  enough  to hear the soft passages over the road noise, the loud&lt;br /&gt;
       sections will be too loud.  You could try this:&lt;br /&gt;
&lt;br /&gt;
             SoxFilter(&amp;quot;compand 0.3,1 -90,-90,-70,-70,-60,-20,0,0 -5 0 0.2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
       The transfer function (&amp;quot;-90,...&amp;quot;) says that very  soft  sounds  between&lt;br /&gt;
       -90  and  -70 decibels (-90 is about the limit of 16-bit encoding(3,n)) will&lt;br /&gt;
       remain unchanged.  That keeps the compander from boosting the volume on&lt;br /&gt;
       &amp;quot;silent&amp;quot;  passages  such  as between movements.  However, sounds in(1,8) the&lt;br /&gt;
       range -60 decibels to 0 decibels (maximum volume) will  be  boosted  so&lt;br /&gt;
       that  the  60-dB dynamic range of the original music will be compressed&lt;br /&gt;
       3-to-1 into a 20-dB range, which is wide enough to enjoy the music  but&lt;br /&gt;
       narrow  enough  to get around the road noise.  The -5 dB output gain is&lt;br /&gt;
       needed to avoid clipping (the number is inexact,  and  was  derived  by&lt;br /&gt;
       experimentation).   The  0  for the initial volume will work fine for a&lt;br /&gt;
       clip that starts with a bit of silence, and the delay of  0.2  has  the&lt;br /&gt;
       effect  of  causing the compander to react a bit more quickly to sudden&lt;br /&gt;
       volume changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Changelog ==&lt;br /&gt;
 Version        Date            Changes&amp;lt;br&amp;gt;&lt;br /&gt;
 v2.1           2023/12/03      - Allow effects which can alter sampling rate&lt;br /&gt;
                                - Allow effects which can change the number of channels&lt;br /&gt;
                                - Add distinct XP build (v141_xp toolset) needed in 2023&lt;br /&gt;
 v2.0           2023/12/02      - Full rewrite, using 14.4.2 libsox library version, moved to github&lt;br /&gt;
 v1.1 beta      2006/01/02      - release (12.17.9 libsox)&lt;br /&gt;
 v1.0           2005/12/29      - initial release&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v1.1&lt;br /&gt;
|[x86]: [https://forum.doom9.org/attachment.php?attachmentid=5193&amp;amp;d=1136242927 SoxFilter_11.zip] /// [https://forum.doom9.org/attachment.php?attachmentid=5194&amp;amp;d=1136242951 SoxFilter_11_src.zip]&lt;br /&gt;
---------&lt;br /&gt;
[x64]: [https://down.7086.in/soxfilter_64_r0.zip soxfilter_64_r0.zip]&lt;br /&gt;
|[x86]: [https://web.archive.org/web/20200626015535if_/https://files.videohelp.com/u/223002/SoxFilter_11.zip SoxFilter_11.zip] (src included)&lt;br /&gt;
---------&lt;br /&gt;
[x64]: [https://web.archive.org/web/20200703223101if_/https://down.7086.in/soxfilter_64_r0.zip soxfilter_64_r0.zip]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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#Audio_Filters|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/TIVTC</id>
		<title>TIVTC</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/TIVTC"/>
				<updated>2023-12-13T16:08:37Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: version 1.28&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|IVTC|Decimation|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|1={{Author/tritical}}, {{Author/pinterf}}&lt;br /&gt;
|2=1.0.28&lt;br /&gt;
|3=[https://github.com/pinterf/TIVTC/releases TIVTC-v1.0.28.7z]&lt;br /&gt;
|4=[[:Category:IVTC|IVTC]] &amp;amp; [[:Category:Decimation|Decimation]]&lt;br /&gt;
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=82264 Doom9 Thread]}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
'''TIVTC''' is a plugin package containing 7 different filters and 3 conditional functions. The seven filters included are '''[[TIVTC/TFM|TFM]], [[TIVTC/TDecimate|TDecimate]], [[TIVTC/MergeHints|MergeHints]], [[TIVTC/FrameDiff|FrameDiff]], [[TIVTC/FieldDiff|FieldDiff]], [[TIVTC/ShowCombedTIVTC|ShowCombedTIVTC]],''' and '''[[TIVTC/RequestLinear|RequestLinear]]'''. &lt;br /&gt;
&lt;br /&gt;
*'''TFM''' is a field matching filter that will recreate the original progressive frames in a telecined source, and '''TDecimate''' is a decimation filter that removes duplicates. These filters can be used together to achieve an [http://en.wikipedia.org/wiki/Ivtc IVTC] or separately to accomplish other tasks. &lt;br /&gt;
&lt;br /&gt;
*'''TDecimate''' also provides special options for handling hybrid material which include [[VFR]] via [http://en.wikipedia.org/wiki/Matroska Matroska] (using a timecodes file) and blend decimation/upconversion for CFR solutions. &lt;br /&gt;
&lt;br /&gt;
*'''Mergehints, RequestLinear, FrameDiff, FieldDiff,''' and '''ShowCombedTIVTC''' are special utility filters included to help perform specific functions. &lt;br /&gt;
&lt;br /&gt;
*The conditional functions are '''IsCombedTIVTC, CFieldDiff,''' and '''CFrameDiff''' which can be used via AviSynth's [[ConditionalFilter|conditional filtering]] environment to test if frames are combed, determine how well two fields fit together, or calculate the difference between frames.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0]&lt;br /&gt;
* [x64]: [[AviSynth+]]&lt;br /&gt;
* Supported color formats: [[YUY2]], [[YV12]], [[YV16]], [[YV411]], [[YV24]]&lt;br /&gt;
**AviSynth+: all [[planar]] Y and YUV formats (8/10/12/14/16-bit) are supported.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Usage Examples==&lt;br /&gt;
&lt;br /&gt;
====NTSC cases:====&lt;br /&gt;
&lt;br /&gt;
   1.) NTSC Film, normal source (not anime or cartoon).  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate()&lt;br /&gt;
&lt;br /&gt;
   2.) NTSC Film, anime or cartoon source.  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=1)&lt;br /&gt;
&lt;br /&gt;
   3.) NTSC Hybrid, using blend decimation on video sections (not anime or cartoon).  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(hybrid=1)&lt;br /&gt;
&lt;br /&gt;
   4.) NTSC Hybrid, using blend decimation on video sections, anime or cartoon source.  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=1,hybrid=1)&lt;br /&gt;
&lt;br /&gt;
   5.) NTSC Hybrid, using vfr via mkv (not anime or cartoon).  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=3,hybrid=2,vfrDec=0,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   6.) NTSC Hybrid, using vfr via mkv, anime or cartoon source.  One pass.&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(mode=3,hybrid=2,vfrDec=1,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   7.) NTSC, two pass (enables use of conCycleTP parameter) mkv vfr for hybrid source.&lt;br /&gt;
         First pass:&lt;br /&gt;
             mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
             tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;,output=&amp;quot;matches.txt&amp;quot;)&lt;br /&gt;
             tdecimate(mode=4,output=&amp;quot;metrics.txt&amp;quot;)&lt;br /&gt;
         Second pass (not anime or cartoon):&lt;br /&gt;
             mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
             tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;,input=&amp;quot;matches.txt&amp;quot;)&lt;br /&gt;
             tdecimate(mode=5,hybrid=2,vfrDec=0,input=&amp;quot;metrics.txt&amp;quot;,tfmIn=&amp;quot;matches.txt&amp;quot;,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
         Second pass (anime or cartoon):&lt;br /&gt;
             mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
             tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;,input=&amp;quot;matches.txt&amp;quot;)&lt;br /&gt;
             tdecimate(mode=5,hybrid=2,vfrDec=1,input=&amp;quot;metrics.txt&amp;quot;,tfmIn=&amp;quot;matches.txt&amp;quot;,mkvOut=&amp;quot;mkv-timecodesfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====PAL Cases:====&lt;br /&gt;
&lt;br /&gt;
   1.) PAL, no decimation (just field matching)&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   2.) PAL, decimate 1 in 25 (most similar)&lt;br /&gt;
          mpeg2source(&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tfm(d2v=&amp;quot;c:\oursource.d2v&amp;quot;)&lt;br /&gt;
          tdecimate(cycle=25)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Archived Downloads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;; width=&amp;quot;600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!!width=&amp;quot;100px&amp;quot;| Version&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Download&lt;br /&gt;
!!width=&amp;quot;150px&amp;quot;| Mirror&lt;br /&gt;
|-&lt;br /&gt;
!v1.0.5&lt;br /&gt;
|[https://web.archive.org/web/20140420181748if_/http://bengal.missouri.edu/~kes25c/TIVTCv105.zip TIVTCv105.zip]&lt;br /&gt;
|[https://web.archive.org/web/20120223025813if_/http://ivtc.org/yatta%20support/TIVTCv105.zip TIVTCv105.zip]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--Old versions: https://web.archive.org/web/20081017060943/http://bengal.missouri.edu/~kes25c/old_stuff/--&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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#IVTC_.26_Decimation|External Filters]] &amp;amp;larr;'''&lt;br /&gt;
-----------------------------------------------&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/ConvertBits</id>
		<title>ConvertBits</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/ConvertBits"/>
				<updated>2021-12-09T14:28:50Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changes */  fix table formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;!-- ==== Syntax and Parameters ==== --&amp;gt;&lt;br /&gt;
==== ConvertBits ====&lt;br /&gt;
Changes bit depth while keeping [[Avisynthplus_color_formats|color format]] the same, if possible. &amp;lt;br&amp;gt;&lt;br /&gt;
If the conversion is not possible &amp;amp;ndash; for example, converting [[RGB32]] to 14bit &amp;amp;ndash; an error is raised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBits(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''(older bit-depth conversion filters &amp;amp;ndash; deprecated)''&lt;br /&gt;
&lt;br /&gt;
{{Func3Def&lt;br /&gt;
|ConvertToFloat(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo16bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo8bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:{{Par2||clip|(required)}}&lt;br /&gt;
::Source clip. &lt;br /&gt;
&lt;br /&gt;
:{{Par2|bits|int|(actual bit depth)}}&lt;br /&gt;
::Bit depth of output clip. If provided valid values are: ''8'', ''10'', ''12'', ''14'', ''16'' (integer) or ''32'' (floating point). &lt;br /&gt;
::From 3.7.1 parameter is optional since no bitdepth change is needed when doing only range conversion (fulls-fulld) or artistic dithering (dither_bits&amp;lt;bit depth)&lt;br /&gt;
::&amp;lt;3.7.1: required&lt;br /&gt;
&lt;br /&gt;
:{{Par2|truerange|bool|true}}&lt;br /&gt;
::Hint: forget it. Deprecated, do not use. Maybe once removed.&lt;br /&gt;
::When converting from true 10-16 bit formats, {{FuncArg|truerange}}=false indicates bitdepth of 16 bits regardless of the 10-12-14 bit format. Not applicable for non planar formats.&lt;br /&gt;
&lt;br /&gt;
{{HiddenAnchor|dither}}&lt;br /&gt;
:{{Par2|dither|int|-1}}&lt;br /&gt;
::*If ''-1'' (default), do not add dither;&lt;br /&gt;
::*If ''0'', add [[Ordered_dithering|ordered]] dither;&lt;br /&gt;
::*If ''1'', add [[wikipedia:Floyd–Steinberg_dithering|error diffusion (Floyd-Steinberg)]] dither &amp;lt;sup&amp;gt;[http://forum.doom9.org/showthread.php?p=1838145#post1838145 doom9]&amp;lt;/sup&amp;gt;&lt;br /&gt;
::Dithering is allowed only for scaling down (bit depth reduction), not up. Bit depth can be kept though if a smaller dither_bits is given.&lt;br /&gt;
::From 3.7.1: no limit. Note: (behind the scenese) 32 bit float clips are first converted down to 16 (or less if needed) bits, then are further dithered down from this intermediate clip.&lt;br /&gt;
::&amp;lt;3.7.1: Dithering is allowed only for 10-16bit (not 32bit float) sources.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|dither_bits|int|{{Template:FuncArg|bits}}}}&lt;br /&gt;
::Exaggerated dither effect: dither to a lower color depth than required by {{FuncArg|bits}} argument.&lt;br /&gt;
::Has no effect if {{FuncArg|dither}}=''-1'' (off).&lt;br /&gt;
::* from 3.7.1 Arbitrary number from 1 to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* &amp;lt;3.7.1: Must be an even number from ''2'' to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* &amp;lt;3.7.1: In addition, must be &amp;gt;= ({{FuncArg|clip}}.[[Clip_properties#Color_Format|BitsPerComponent]]-8).&lt;br /&gt;
:{{Par2|fulls|bool|(auto)}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::Default value can come from &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property&lt;br /&gt;
::If ''true'' (RGB default), scale by multiplication: 0-255 &amp;amp;rarr; 0-65535; &amp;lt;p&amp;gt;Note: full scale U and V chroma is specially handled&amp;lt;/p&amp;gt;&lt;br /&gt;
::if ''false'' (YUV default), scale by [[wikipedia:Arithmetic_shift|bit-shifting]].&lt;br /&gt;
::Use case: override greyscale conversion to fullscale instead of bit-shifts.&lt;br /&gt;
::Conversion from and to float is always full-scale.&lt;br /&gt;
::Alpha plane is always treated as full scale.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|fulld|bool|{{Template:FuncArg|fulls}}}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::From 3.7.1: can be any combination with {{FuncArg|fulls}}.&lt;br /&gt;
::&amp;lt;3.7.1: ''must'' match {{FuncArg|fulls}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:ConvertBits writes &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property (0-full or 1-limited)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #combine greyscale clips into YUVA clip&lt;br /&gt;
 U8 = source.UToY8()&lt;br /&gt;
 V8 = source.VToY8()&lt;br /&gt;
 Y8 = source.ConvertToY()&lt;br /&gt;
 A8 = source.AddAlphaPlane(128).AToY8()&lt;br /&gt;
 CombinePlanes(Y8, U8, V8, A8, planes=&amp;quot;YUVA&amp;quot;, source_planes=&amp;quot;YYYY&amp;quot;, &lt;br /&gt;
 \               sample_clip=source) #pixel_type=&amp;quot;YUV444P8&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 # Copy planes between planar RGB(A) and YUV(A) without any conversion&lt;br /&gt;
 # yuv 4:4:4 &amp;lt;-&amp;gt; planar rgb&lt;br /&gt;
 source = last.ConvertBits(32) # 4:4:4&lt;br /&gt;
 cast_to_planarrgb = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBPS&amp;quot;)&lt;br /&gt;
 # get back a clip identical with &amp;quot;source&amp;quot;&lt;br /&gt;
 cast_to_yuv = CombinePlanes(cast_to_planarrgb, planes=&amp;quot;YUV&amp;quot;, source_planes=&amp;quot;RGB&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;YUV444PS&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #create a black and white planar RGB clip using Y channel&lt;br /&gt;
 #source is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YYY&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBP8&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #copy luma from one clip, U and V from another&lt;br /&gt;
 #source is the template&lt;br /&gt;
 #sourceY is a Y or YUV clip&lt;br /&gt;
 #sourceUV is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(sourceY, sourceUV, planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               source_planes=&amp;quot;YUV&amp;quot;, sample_clip = source)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| 3.7.1&lt;br /&gt;
|parameter ''bits'' optional&lt;br /&gt;
&amp;lt;p&amp;gt;_ChromaRange frame property handling&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Free fulls-fulld combination&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Free target dither_bits down to 1&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Allow dithering from 32 bit float&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Allow dithering while keeping actual bit depth (but with a smaller dither_bits)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specially handled full scale chroma&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 20170310 r2440&lt;br /&gt;
| parameter ''dither_bits''&lt;br /&gt;
|-&lt;br /&gt;
| 20170202 r2420&lt;br /&gt;
| parameters ''fulls'', ''fulld''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;br /&gt;
[[Category:Deep_color_tools]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/ConvertBits</id>
		<title>ConvertBits</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/ConvertBits"/>
				<updated>2021-12-09T14:26:49Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changes */ 3.7.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;!-- ==== Syntax and Parameters ==== --&amp;gt;&lt;br /&gt;
==== ConvertBits ====&lt;br /&gt;
Changes bit depth while keeping [[Avisynthplus_color_formats|color format]] the same, if possible. &amp;lt;br&amp;gt;&lt;br /&gt;
If the conversion is not possible &amp;amp;ndash; for example, converting [[RGB32]] to 14bit &amp;amp;ndash; an error is raised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBits(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''(older bit-depth conversion filters &amp;amp;ndash; deprecated)''&lt;br /&gt;
&lt;br /&gt;
{{Func3Def&lt;br /&gt;
|ConvertToFloat(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo16bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo8bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:{{Par2||clip|(required)}}&lt;br /&gt;
::Source clip. &lt;br /&gt;
&lt;br /&gt;
:{{Par2|bits|int|(actual bit depth)}}&lt;br /&gt;
::Bit depth of output clip. If provided valid values are: ''8'', ''10'', ''12'', ''14'', ''16'' (integer) or ''32'' (floating point). &lt;br /&gt;
::From 3.7.1 parameter is optional since no bitdepth change is needed when doing only range conversion (fulls-fulld) or artistic dithering (dither_bits&amp;lt;bit depth)&lt;br /&gt;
::&amp;lt;3.7.1: required&lt;br /&gt;
&lt;br /&gt;
:{{Par2|truerange|bool|true}}&lt;br /&gt;
::Hint: forget it. Deprecated, do not use. Maybe once removed.&lt;br /&gt;
::When converting from true 10-16 bit formats, {{FuncArg|truerange}}=false indicates bitdepth of 16 bits regardless of the 10-12-14 bit format. Not applicable for non planar formats.&lt;br /&gt;
&lt;br /&gt;
{{HiddenAnchor|dither}}&lt;br /&gt;
:{{Par2|dither|int|-1}}&lt;br /&gt;
::*If ''-1'' (default), do not add dither;&lt;br /&gt;
::*If ''0'', add [[Ordered_dithering|ordered]] dither;&lt;br /&gt;
::*If ''1'', add [[wikipedia:Floyd–Steinberg_dithering|error diffusion (Floyd-Steinberg)]] dither &amp;lt;sup&amp;gt;[http://forum.doom9.org/showthread.php?p=1838145#post1838145 doom9]&amp;lt;/sup&amp;gt;&lt;br /&gt;
::Dithering is allowed only for scaling down (bit depth reduction), not up. Bit depth can be kept though if a smaller dither_bits is given.&lt;br /&gt;
::From 3.7.1: no limit. Note: (behind the scenese) 32 bit float clips are first converted down to 16 (or less if needed) bits, then are further dithered down from this intermediate clip.&lt;br /&gt;
::&amp;lt;3.7.1: Dithering is allowed only for 10-16bit (not 32bit float) sources.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|dither_bits|int|{{Template:FuncArg|bits}}}}&lt;br /&gt;
::Exaggerated dither effect: dither to a lower color depth than required by {{FuncArg|bits}} argument.&lt;br /&gt;
::Has no effect if {{FuncArg|dither}}=''-1'' (off).&lt;br /&gt;
::* from 3.7.1 Arbitrary number from 1 to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* &amp;lt;3.7.1: Must be an even number from ''2'' to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* &amp;lt;3.7.1: In addition, must be &amp;gt;= ({{FuncArg|clip}}.[[Clip_properties#Color_Format|BitsPerComponent]]-8).&lt;br /&gt;
:{{Par2|fulls|bool|(auto)}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::Default value can come from &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property&lt;br /&gt;
::If ''true'' (RGB default), scale by multiplication: 0-255 &amp;amp;rarr; 0-65535; &amp;lt;p&amp;gt;Note: full scale U and V chroma is specially handled&amp;lt;/p&amp;gt;&lt;br /&gt;
::if ''false'' (YUV default), scale by [[wikipedia:Arithmetic_shift|bit-shifting]].&lt;br /&gt;
::Use case: override greyscale conversion to fullscale instead of bit-shifts.&lt;br /&gt;
::Conversion from and to float is always full-scale.&lt;br /&gt;
::Alpha plane is always treated as full scale.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|fulld|bool|{{Template:FuncArg|fulls}}}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::From 3.7.1: can be any combination with {{FuncArg|fulls}}.&lt;br /&gt;
::&amp;lt;3.7.1: ''must'' match {{FuncArg|fulls}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:ConvertBits writes &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property (0-full or 1-limited)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #combine greyscale clips into YUVA clip&lt;br /&gt;
 U8 = source.UToY8()&lt;br /&gt;
 V8 = source.VToY8()&lt;br /&gt;
 Y8 = source.ConvertToY()&lt;br /&gt;
 A8 = source.AddAlphaPlane(128).AToY8()&lt;br /&gt;
 CombinePlanes(Y8, U8, V8, A8, planes=&amp;quot;YUVA&amp;quot;, source_planes=&amp;quot;YYYY&amp;quot;, &lt;br /&gt;
 \               sample_clip=source) #pixel_type=&amp;quot;YUV444P8&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 # Copy planes between planar RGB(A) and YUV(A) without any conversion&lt;br /&gt;
 # yuv 4:4:4 &amp;lt;-&amp;gt; planar rgb&lt;br /&gt;
 source = last.ConvertBits(32) # 4:4:4&lt;br /&gt;
 cast_to_planarrgb = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBPS&amp;quot;)&lt;br /&gt;
 # get back a clip identical with &amp;quot;source&amp;quot;&lt;br /&gt;
 cast_to_yuv = CombinePlanes(cast_to_planarrgb, planes=&amp;quot;YUV&amp;quot;, source_planes=&amp;quot;RGB&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;YUV444PS&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #create a black and white planar RGB clip using Y channel&lt;br /&gt;
 #source is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YYY&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBP8&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #copy luma from one clip, U and V from another&lt;br /&gt;
 #source is the template&lt;br /&gt;
 #sourceY is a Y or YUV clip&lt;br /&gt;
 #sourceUV is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(sourceY, sourceUV, planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               source_planes=&amp;quot;YUV&amp;quot;, sample_clip = source)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| 3.7.1&lt;br /&gt;
| parameter ''bits'' optional&lt;br /&gt;
| _ChromaRange frame property handling&lt;br /&gt;
| Free fulls-fulld combination&lt;br /&gt;
| Free target dither_bits down to 1&lt;br /&gt;
| Allow dithering from 32 bit float&lt;br /&gt;
| Allow dithering while keeping actual bit depth (but with a smaller dither_bits)&lt;br /&gt;
| Specially handled full scale chroma&lt;br /&gt;
|-&lt;br /&gt;
| 20170310 r2440&lt;br /&gt;
| parameter ''dither_bits''&lt;br /&gt;
|-&lt;br /&gt;
| 20170202 r2420&lt;br /&gt;
| parameters ''fulls'', ''fulld''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;br /&gt;
[[Category:Deep_color_tools]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/ConvertBits</id>
		<title>ConvertBits</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/ConvertBits"/>
				<updated>2021-12-09T14:23:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* ConvertBits */ bit parameter made optional&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;!-- ==== Syntax and Parameters ==== --&amp;gt;&lt;br /&gt;
==== ConvertBits ====&lt;br /&gt;
Changes bit depth while keeping [[Avisynthplus_color_formats|color format]] the same, if possible. &amp;lt;br&amp;gt;&lt;br /&gt;
If the conversion is not possible &amp;amp;ndash; for example, converting [[RGB32]] to 14bit &amp;amp;ndash; an error is raised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBits(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''(older bit-depth conversion filters &amp;amp;ndash; deprecated)''&lt;br /&gt;
&lt;br /&gt;
{{Func3Def&lt;br /&gt;
|ConvertToFloat(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo16bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo8bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:{{Par2||clip|(required)}}&lt;br /&gt;
::Source clip. &lt;br /&gt;
&lt;br /&gt;
:{{Par2|bits|int|(actual bit depth)}}&lt;br /&gt;
::Bit depth of output clip. If provided valid values are: ''8'', ''10'', ''12'', ''14'', ''16'' (integer) or ''32'' (floating point). &lt;br /&gt;
::From 3.7.1 parameter is optional since no bitdepth change is needed when doing only range conversion (fulls-fulld) or artistic dithering (dither_bits&amp;lt;bit depth)&lt;br /&gt;
::&amp;lt;3.7.1: required&lt;br /&gt;
&lt;br /&gt;
:{{Par2|truerange|bool|true}}&lt;br /&gt;
::Hint: forget it. Deprecated, do not use. Maybe once removed.&lt;br /&gt;
::When converting from true 10-16 bit formats, {{FuncArg|truerange}}=false indicates bitdepth of 16 bits regardless of the 10-12-14 bit format. Not applicable for non planar formats.&lt;br /&gt;
&lt;br /&gt;
{{HiddenAnchor|dither}}&lt;br /&gt;
:{{Par2|dither|int|-1}}&lt;br /&gt;
::*If ''-1'' (default), do not add dither;&lt;br /&gt;
::*If ''0'', add [[Ordered_dithering|ordered]] dither;&lt;br /&gt;
::*If ''1'', add [[wikipedia:Floyd–Steinberg_dithering|error diffusion (Floyd-Steinberg)]] dither &amp;lt;sup&amp;gt;[http://forum.doom9.org/showthread.php?p=1838145#post1838145 doom9]&amp;lt;/sup&amp;gt;&lt;br /&gt;
::Dithering is allowed only for scaling down (bit depth reduction), not up. Bit depth can be kept though if a smaller dither_bits is given.&lt;br /&gt;
::From 3.7.1: no limit. Note: (behind the scenese) 32 bit float clips are first converted down to 16 (or less if needed) bits, then are further dithered down from this intermediate clip.&lt;br /&gt;
::&amp;lt;3.7.1: Dithering is allowed only for 10-16bit (not 32bit float) sources.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|dither_bits|int|{{Template:FuncArg|bits}}}}&lt;br /&gt;
::Exaggerated dither effect: dither to a lower color depth than required by {{FuncArg|bits}} argument.&lt;br /&gt;
::Has no effect if {{FuncArg|dither}}=''-1'' (off).&lt;br /&gt;
::* from 3.7.1 Arbitrary number from 1 to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* &amp;lt;3.7.1: Must be an even number from ''2'' to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* &amp;lt;3.7.1: In addition, must be &amp;gt;= ({{FuncArg|clip}}.[[Clip_properties#Color_Format|BitsPerComponent]]-8).&lt;br /&gt;
:{{Par2|fulls|bool|(auto)}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::Default value can come from &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property&lt;br /&gt;
::If ''true'' (RGB default), scale by multiplication: 0-255 &amp;amp;rarr; 0-65535; &amp;lt;p&amp;gt;Note: full scale U and V chroma is specially handled&amp;lt;/p&amp;gt;&lt;br /&gt;
::if ''false'' (YUV default), scale by [[wikipedia:Arithmetic_shift|bit-shifting]].&lt;br /&gt;
::Use case: override greyscale conversion to fullscale instead of bit-shifts.&lt;br /&gt;
::Conversion from and to float is always full-scale.&lt;br /&gt;
::Alpha plane is always treated as full scale.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|fulld|bool|{{Template:FuncArg|fulls}}}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::From 3.7.1: can be any combination with {{FuncArg|fulls}}.&lt;br /&gt;
::&amp;lt;3.7.1: ''must'' match {{FuncArg|fulls}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:ConvertBits writes &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property (0-full or 1-limited)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #combine greyscale clips into YUVA clip&lt;br /&gt;
 U8 = source.UToY8()&lt;br /&gt;
 V8 = source.VToY8()&lt;br /&gt;
 Y8 = source.ConvertToY()&lt;br /&gt;
 A8 = source.AddAlphaPlane(128).AToY8()&lt;br /&gt;
 CombinePlanes(Y8, U8, V8, A8, planes=&amp;quot;YUVA&amp;quot;, source_planes=&amp;quot;YYYY&amp;quot;, &lt;br /&gt;
 \               sample_clip=source) #pixel_type=&amp;quot;YUV444P8&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 # Copy planes between planar RGB(A) and YUV(A) without any conversion&lt;br /&gt;
 # yuv 4:4:4 &amp;lt;-&amp;gt; planar rgb&lt;br /&gt;
 source = last.ConvertBits(32) # 4:4:4&lt;br /&gt;
 cast_to_planarrgb = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBPS&amp;quot;)&lt;br /&gt;
 # get back a clip identical with &amp;quot;source&amp;quot;&lt;br /&gt;
 cast_to_yuv = CombinePlanes(cast_to_planarrgb, planes=&amp;quot;YUV&amp;quot;, source_planes=&amp;quot;RGB&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;YUV444PS&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #create a black and white planar RGB clip using Y channel&lt;br /&gt;
 #source is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YYY&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBP8&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #copy luma from one clip, U and V from another&lt;br /&gt;
 #source is the template&lt;br /&gt;
 #sourceY is a Y or YUV clip&lt;br /&gt;
 #sourceUV is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(sourceY, sourceUV, planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               source_planes=&amp;quot;YUV&amp;quot;, sample_clip = source)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| 20170310 r2440&lt;br /&gt;
| parameter ''dither_bits''&lt;br /&gt;
|-&lt;br /&gt;
| 20170202 r2420&lt;br /&gt;
| parameters ''fulls'', ''fulld''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;br /&gt;
[[Category:Deep_color_tools]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/ConvertBits</id>
		<title>ConvertBits</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/ConvertBits"/>
				<updated>2021-12-09T14:16:18Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* ConvertBits */ 3.7.1. changes, allowed parameters, frame props&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;!-- ==== Syntax and Parameters ==== --&amp;gt;&lt;br /&gt;
==== ConvertBits ====&lt;br /&gt;
Changes bit depth while keeping [[Avisynthplus_color_formats|color format]] the same, if possible. &amp;lt;br&amp;gt;&lt;br /&gt;
If the conversion is not possible &amp;amp;ndash; for example, converting [[RGB32]] to 14bit &amp;amp;ndash; an error is raised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBits(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''(older bit-depth conversion filters &amp;amp;ndash; deprecated)''&lt;br /&gt;
&lt;br /&gt;
{{Func3Def&lt;br /&gt;
|ConvertToFloat(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo16bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )&lt;br /&gt;
|ConvertTo8bit(clip, int bits [, bool ''truerange'', int ''dither'', int ''dither_bits'', bool ''fulls'', bool ''fulld'' ] )}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:{{Par2||clip|(required)}}&lt;br /&gt;
::Source clip. &lt;br /&gt;
&lt;br /&gt;
:{{Par2||bits|(required)}}&lt;br /&gt;
::Bit depth of output clip. Valid values: ''8'', ''10'', ''12'', ''14'', ''16'' (integer) or ''32'' (floating point). &lt;br /&gt;
&lt;br /&gt;
:{{Par2|truerange|bool|true}}&lt;br /&gt;
::Hint: forget it. Deprecated, do not use. Maybe once removed.&lt;br /&gt;
::When converting from true 10-16 bit formats, {{FuncArg|truerange}}=false indicates bitdepth of 16 bits regardless of the 10-12-14 bit format. Not applicable for non planar formats.&lt;br /&gt;
&lt;br /&gt;
{{HiddenAnchor|dither}}&lt;br /&gt;
:{{Par2|dither|int|-1}}&lt;br /&gt;
::*If ''-1'' (default), do not add dither;&lt;br /&gt;
::*If ''0'', add [[Ordered_dithering|ordered]] dither;&lt;br /&gt;
::*If ''1'', add [[wikipedia:Floyd–Steinberg_dithering|error diffusion (Floyd-Steinberg)]] dither &amp;lt;sup&amp;gt;[http://forum.doom9.org/showthread.php?p=1838145#post1838145 doom9]&amp;lt;/sup&amp;gt;&lt;br /&gt;
::Dithering is allowed only for scaling down (bit depth reduction), not up. Bit depth can be kept though if a smaller dither_bits is given.&lt;br /&gt;
::Until 3.7.1: Dithering is allowed only for 10-16bit (not 32bit float) sources.&lt;br /&gt;
::From 3.7.1: no limit. Note: (behind the scenese) 32 bit float clips are first converted down to 16 (or less if needed) bits, then are further dithered down from this intermediate clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|dither_bits|int|{{Template:FuncArg|bits}}}}&lt;br /&gt;
::Exaggerated dither effect: dither to a lower color depth than required by {{FuncArg|bits}} argument.&lt;br /&gt;
::Has no effect if {{FuncArg|dither}}=''-1'' (off).&lt;br /&gt;
::* from 3.7.1 Arbitrary number from 1 to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* until 3.7.1: Must be an even number from ''2'' to {{FuncArg|bits}}, inclusive.&lt;br /&gt;
::* until 3.7.1: In addition, must be &amp;gt;= ({{FuncArg|clip}}.[[Clip_properties#Color_Format|BitsPerComponent]]-8).&lt;br /&gt;
:{{Par2|fulls|bool|(auto)}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::Default value can come from &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property&lt;br /&gt;
::If ''true'' (RGB default), scale by multiplication: 0-255 &amp;amp;rarr; 0-65535; &amp;lt;p&amp;gt;Note: full scale U and V chroma is specially handled&amp;lt;/p&amp;gt;&lt;br /&gt;
::if ''false'' (YUV default), scale by [[wikipedia:Arithmetic_shift|bit-shifting]].&lt;br /&gt;
::Use case: override greyscale conversion to fullscale instead of bit-shifts.&lt;br /&gt;
::Conversion from and to float is always full-scale.&lt;br /&gt;
::Alpha plane is always treated as full scale.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|fulld|bool|{{Template:FuncArg|fulls}}}}&lt;br /&gt;
::''Use the default value unless you know what you are doing.''&lt;br /&gt;
::From 3.7.1: can be any combination with {{FuncArg|fulls}}.&lt;br /&gt;
::Until 3.7.1: ''must'' match {{FuncArg|fulls}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:ConvertBits writes &amp;lt;code&amp;gt;_ChromaRange&amp;lt;/code&amp;gt; frame property (0-full or 1-limited)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #combine greyscale clips into YUVA clip&lt;br /&gt;
 U8 = source.UToY8()&lt;br /&gt;
 V8 = source.VToY8()&lt;br /&gt;
 Y8 = source.ConvertToY()&lt;br /&gt;
 A8 = source.AddAlphaPlane(128).AToY8()&lt;br /&gt;
 CombinePlanes(Y8, U8, V8, A8, planes=&amp;quot;YUVA&amp;quot;, source_planes=&amp;quot;YYYY&amp;quot;, &lt;br /&gt;
 \               sample_clip=source) #pixel_type=&amp;quot;YUV444P8&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 # Copy planes between planar RGB(A) and YUV(A) without any conversion&lt;br /&gt;
 # yuv 4:4:4 &amp;lt;-&amp;gt; planar rgb&lt;br /&gt;
 source = last.ConvertBits(32) # 4:4:4&lt;br /&gt;
 cast_to_planarrgb = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBPS&amp;quot;)&lt;br /&gt;
 # get back a clip identical with &amp;quot;source&amp;quot;&lt;br /&gt;
 cast_to_yuv = CombinePlanes(cast_to_planarrgb, planes=&amp;quot;YUV&amp;quot;, source_planes=&amp;quot;RGB&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;YUV444PS&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #create a black and white planar RGB clip using Y channel&lt;br /&gt;
 #source is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(source, planes=&amp;quot;RGB&amp;quot;, source_planes=&amp;quot;YYY&amp;quot;, &lt;br /&gt;
 \               pixel_type=&amp;quot;RGBP8&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|54|2}} &amp;gt;&lt;br /&gt;
 #copy luma from one clip, U and V from another&lt;br /&gt;
 #source is the template&lt;br /&gt;
 #sourceY is a Y or YUV clip&lt;br /&gt;
 #sourceUV is a YUV clip&lt;br /&gt;
 grey = CombinePlanes(sourceY, sourceUV, planes=&amp;quot;YUV&amp;quot;, &lt;br /&gt;
 \               source_planes=&amp;quot;YUV&amp;quot;, sample_clip = source)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| 20170310 r2440&lt;br /&gt;
| parameter ''dither_bits''&lt;br /&gt;
|-&lt;br /&gt;
| 20170202 r2420&lt;br /&gt;
| parameters ''fulls'', ''fulld''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;br /&gt;
[[Category:Deep_color_tools]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T14:00:25Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changelog */ Frame prop _ChromaLocation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:f&amp;quot; means the same as the old &amp;quot;PC.709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;470bg:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;470bg:f&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Frame properties {{AvsPluscon}} ===== &lt;br /&gt;
&lt;br /&gt;
In Avisynth v3.7.1. frame property (_ChromaLocation) support appears in selected filters (e.g. ConvertToYUV422).&lt;br /&gt;
Property can be read and/or set.&lt;br /&gt;
A frame property can replace default behaviour of location parameters and is set (or deleted) upon finishing conversion.&lt;br /&gt;
Since a format without subsampling such as 4:4:4 (YV24) does not have chroma location, the property is deleted automatically when converting to 4:4:4 or RGB.&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;ChromaInLocation&amp;quot; rules:&lt;br /&gt;
::* if source has _ChromaLocation frame property it will be used else the default is &amp;quot;mpeg2&amp;quot; (&amp;quot;left&amp;quot;)&lt;br /&gt;
::* if parameter is &amp;quot;auto&amp;quot; or not given at all, ChromaInLocation will be set to the above mentioned default value&lt;br /&gt;
::* if parameter is explicitely given, it will be used&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;ChromaOutLocation&amp;quot; rules:&lt;br /&gt;
::* default is &amp;quot;mpeg2&amp;quot; (&amp;quot;left&amp;quot;)&lt;br /&gt;
::* if parameter is &amp;quot;auto&amp;quot; or not given at all, ChromaOutLocation will be set to the above mentioned default value&lt;br /&gt;
::* if parameter is explicitely given, it will be used&lt;br /&gt;
&lt;br /&gt;
: Accepted values for &amp;quot;ChromaInLocation&amp;quot; and &amp;quot;ChromaOutLocation&amp;quot; (when source/target is a chroma subsampled format)&lt;br /&gt;
: (full list):&lt;br /&gt;
::* &amp;quot;left&amp;quot; or &amp;quot;mpeg2&amp;quot;&lt;br /&gt;
::* &amp;quot;center&amp;quot; or &amp;quot;jpeg&amp;quot; or &amp;quot;mpeg1&amp;quot;&lt;br /&gt;
::* &amp;quot;top_left&amp;quot;&lt;br /&gt;
::* &amp;quot;dv&amp;quot;&lt;br /&gt;
::* &amp;quot;top&amp;quot; &lt;br /&gt;
::* &amp;quot;bottom_left&amp;quot;&lt;br /&gt;
::* &amp;quot;bottom&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: _ChromaLocation constants - as seen in propShow()&lt;br /&gt;
  &lt;br /&gt;
::* AVS_CHROMA_LEFT        = 0&lt;br /&gt;
::* AVS_CHROMA_CENTER      = 1&lt;br /&gt;
::* AVS_CHROMA_TOP_LEFT    = 2 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_TOP         = 3 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_BOTTOM_LEFT = 4 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_BOTTOM      = 5 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_DV          = 6  Special to Avisynth&lt;br /&gt;
&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.1&lt;br /&gt;
| Added ChromaOutPlacement to 4:2:2 related functions&amp;lt;br&amp;gt;Added new matrix constants, optional new syntax&amp;lt;br&amp;gt;Added new chroma location constants&amp;lt;br&amp;gt;Added _ChromaLocation frame property&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:59:35Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Frame properties */ Add content&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:f&amp;quot; means the same as the old &amp;quot;PC.709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;470bg:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;470bg:f&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Frame properties {{AvsPluscon}} ===== &lt;br /&gt;
&lt;br /&gt;
In Avisynth v3.7.1. frame property (_ChromaLocation) support appears in selected filters (e.g. ConvertToYUV422).&lt;br /&gt;
Property can be read and/or set.&lt;br /&gt;
A frame property can replace default behaviour of location parameters and is set (or deleted) upon finishing conversion.&lt;br /&gt;
Since a format without subsampling such as 4:4:4 (YV24) does not have chroma location, the property is deleted automatically when converting to 4:4:4 or RGB.&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;ChromaInLocation&amp;quot; rules:&lt;br /&gt;
::* if source has _ChromaLocation frame property it will be used else the default is &amp;quot;mpeg2&amp;quot; (&amp;quot;left&amp;quot;)&lt;br /&gt;
::* if parameter is &amp;quot;auto&amp;quot; or not given at all, ChromaInLocation will be set to the above mentioned default value&lt;br /&gt;
::* if parameter is explicitely given, it will be used&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;ChromaOutLocation&amp;quot; rules:&lt;br /&gt;
::* default is &amp;quot;mpeg2&amp;quot; (&amp;quot;left&amp;quot;)&lt;br /&gt;
::* if parameter is &amp;quot;auto&amp;quot; or not given at all, ChromaOutLocation will be set to the above mentioned default value&lt;br /&gt;
::* if parameter is explicitely given, it will be used&lt;br /&gt;
&lt;br /&gt;
: Accepted values for &amp;quot;ChromaInLocation&amp;quot; and &amp;quot;ChromaOutLocation&amp;quot; (when source/target is a chroma subsampled format)&lt;br /&gt;
: (full list):&lt;br /&gt;
::* &amp;quot;left&amp;quot; or &amp;quot;mpeg2&amp;quot;&lt;br /&gt;
::* &amp;quot;center&amp;quot; or &amp;quot;jpeg&amp;quot; or &amp;quot;mpeg1&amp;quot;&lt;br /&gt;
::* &amp;quot;top_left&amp;quot;&lt;br /&gt;
::* &amp;quot;dv&amp;quot;&lt;br /&gt;
::* &amp;quot;top&amp;quot; &lt;br /&gt;
::* &amp;quot;bottom_left&amp;quot;&lt;br /&gt;
::* &amp;quot;bottom&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: _ChromaLocation constants - as seen in propShow()&lt;br /&gt;
  &lt;br /&gt;
::* AVS_CHROMA_LEFT        = 0&lt;br /&gt;
::* AVS_CHROMA_CENTER      = 1&lt;br /&gt;
::* AVS_CHROMA_TOP_LEFT    = 2 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_TOP         = 3 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_BOTTOM_LEFT = 4 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_BOTTOM      = 5 (4:2:0 only)&lt;br /&gt;
::* AVS_CHROMA_DV          = 6  Special to Avisynth&lt;br /&gt;
&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.1&lt;br /&gt;
| Added ChromaOutPlacement to 4:2:2 related functions&amp;lt;br&amp;gt;Added new matrix constants, optional new syntax&amp;lt;br&amp;gt;Added new chroma location constants&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:51:21Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Notes */ Add section Frame properties&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:f&amp;quot; means the same as the old &amp;quot;PC.709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;470bg:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;470bg:f&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Frame properties =====&lt;br /&gt;
&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.1&lt;br /&gt;
| Added ChromaOutPlacement to 4:2:2 related functions&amp;lt;br&amp;gt;Added new matrix constants, optional new syntax&amp;lt;br&amp;gt;Added new chroma location constants&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:48:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Parameter Details */ Fix rec601 mapping as new-old matrix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:f&amp;quot; means the same as the old &amp;quot;PC.709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;470bg:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;470bg:f&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.1&lt;br /&gt;
| Added ChromaOutPlacement to 4:2:2 related functions&amp;lt;br&amp;gt;Added new matrix constants, optional new syntax&amp;lt;br&amp;gt;Added new chroma location constants&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:45:57Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changelog */ fix table format for recent commit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:f&amp;quot; means the same as the old &amp;quot;PC.709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;170m:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;170m:f&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.1&lt;br /&gt;
| Added ChromaOutPlacement to 4:2:2 related functions&amp;lt;br&amp;gt;Added new matrix constants, optional new syntax&amp;lt;br&amp;gt;Added new chroma location constants&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:44:18Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changelog */ 3.7.1 additions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:f&amp;quot; means the same as the old &amp;quot;PC.709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;170m:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;170m:f&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v3.7.1&lt;br /&gt;
| Added ChromaOutPlacement to 4:2:2 related functions&lt;br /&gt;
| Added new matrix constants, optional new syntax&lt;br /&gt;
| Added new chroma location constants&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:42:36Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Parameter Details */ matrix and ChromaOutPlacement changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; keep range unchanged. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}}&lt;br /&gt;
:New syntax: more matrix string constants with separate full/limited range markers&lt;br /&gt;
:&amp;quot;matrixname:full_or_limited&amp;quot; where&lt;br /&gt;
:&amp;quot;matrixname&amp;quot; can be (internal _Matrix integer constant in parenthesys)&lt;br /&gt;
::* &amp;quot;rgb&amp;quot; (0 - AVS_MATRIX_RGB)&lt;br /&gt;
::* &amp;quot;709&amp;quot; (1 - AVS_MATRIX_BT709)&lt;br /&gt;
::* &amp;quot;unspec&amp;quot; (2 - AVS_MATRIX_UNSPECIFIED)&lt;br /&gt;
::* &amp;quot;170m&amp;quot; (6 - AVS_MATRIX_ST170_M)&lt;br /&gt;
::* &amp;quot;240m&amp;quot; (7 - AVS_MATRIX_ST240_M)&lt;br /&gt;
::* &amp;quot;470bg&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;601&amp;quot; (5 - AVS_MATRIX_BT470_BG)&lt;br /&gt;
::* &amp;quot;fcc&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;bt470m&amp;quot; (4 - AVS_MATRIX_BT470_M)&lt;br /&gt;
::* &amp;quot;ycgco&amp;quot; (8 - AVS_MATRIX_YCGCO      not supported)&lt;br /&gt;
::* &amp;quot;2020ncl&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020&amp;quot; (9 - AVS_MATRIX_BT2020_NCL)&lt;br /&gt;
::* &amp;quot;2020cl&amp;quot; (10 - AVS_MATRIX_BT2020_CL  same as 2020ncl)&lt;br /&gt;
::* &amp;quot;chromacl&amp;quot; (13 - AVS_MATRIX_CHROMATICITY_DERIVED_CL  not supported)&lt;br /&gt;
::* &amp;quot;chromancl&amp;quot; (12 - AVS_MATRIX_CHROMATICITY_DERIVED_NCL not supported)&lt;br /&gt;
::* &amp;quot;ictcp&amp;quot; (14 - AVS_MATRIX_ICTCP      not supported)&lt;br /&gt;
&lt;br /&gt;
:: The above &amp;quot;matrix&amp;quot; parameters can be followed by a &amp;quot;full&amp;quot; or &amp;quot;f&amp;quot; and &amp;quot;limited&amp;quot; or &amp;quot;l&amp;quot; or &amp;quot;auto&amp;quot; marker after a &amp;quot;:&amp;quot;&amp;lt;p&amp;gt;e.g. &amp;quot;709:f&amp;quot; means the same as the old &amp;quot;PC.709&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
:: When there is no limited-ness marker, or is set to &amp;quot;auto&amp;quot; then value of _ColorRange frame property is used&lt;br /&gt;
&lt;br /&gt;
: Note: old-style &amp;quot;matrix&amp;quot; parameters are kept, their name indicate the full/limited&lt;br /&gt;
&lt;br /&gt;
: For memo and the similar new string&lt;br /&gt;
:*   &amp;quot;rec601&amp;quot; same as         &amp;quot;170m:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;rec709&amp;quot;                 &amp;quot;709:l&amp;quot; &lt;br /&gt;
:*   &amp;quot;pc.601&amp;quot; and &amp;quot;pc601&amp;quot;     &amp;quot;170m:f&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.709&amp;quot; and &amp;quot;pc709&amp;quot;     &amp;quot;709:f&amp;quot; &lt;br /&gt;
:*   &amp;quot;average&amp;quot;                - kept for compatibility, really it has no standard _Matrix equivalent&lt;br /&gt;
:*   &amp;quot;rec2020&amp;quot;                &amp;quot;2020cl:l&amp;quot;&lt;br /&gt;
:*   &amp;quot;pc.2020&amp;quot; and &amp;quot;pc2020&amp;quot;   &amp;quot;2020cl:f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12 (4:2:0) or YV16 (4:2:2) {{AvsPluscon}}.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp; ( {{AvsPluscon}} synonyms: &amp;quot;left&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot; ( {{AvsPluscon}} synonyms: &amp;quot;jpeg&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;top_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|Subsampling used in UHD 4:2:0. Chroma samples are located on the top left pixel column of the group&amp;amp;nbsp;. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom_left&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;bottom&amp;quot;&amp;amp;nbsp; {{AvsPluscon}}&lt;br /&gt;
|4:2:0 only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:20:21Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Syntax and Parameters */ Add ChromaOutPlacement in YUV422&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' {{AvsPluscon}} ] ) &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )  {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp;&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot;&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Convert</id>
		<title>Convert</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Convert"/>
				<updated>2021-12-09T13:12:50Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: Converts: mention ConvertBits to have full-limited conversion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
Convert between any of the color formats that AviSynth supports:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB24]]'''&lt;br /&gt;
| [[Interleaved|interleaved]]&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[RGB32]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV24]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV16]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YUY2]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV12]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[YV411]]''' &amp;amp;diams;&lt;br /&gt;
| planar&lt;br /&gt;
| 8&lt;br /&gt;
| 4:1:1&lt;br /&gt;
| (chroma shared between 4 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Y8]]''' &amp;amp;diams;&lt;br /&gt;
| (both)&lt;br /&gt;
| 8&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; (&amp;amp;diams; = not supported in AviSynth version 2.58 or below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} supports all of the above, plus:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Color format&amp;amp;nbsp;&lt;br /&gt;
! Image format&amp;amp;nbsp;&lt;br /&gt;
! Bit depth&amp;amp;nbsp;&lt;br /&gt;
! Sample ratio&amp;amp;nbsp;&lt;br /&gt;
!style=&amp;quot;text-align:left&amp;quot;| &amp;amp;nbsp;Description&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB48]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGB64]]'''&lt;br /&gt;
| interleaved&lt;br /&gt;
| 16&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|RGBAPxx]]'''&lt;br /&gt;
| [[Planar|planar]]&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4&lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4&lt;br /&gt;
| (full chroma)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA444Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:4:4:4 &lt;br /&gt;
| (full chroma + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2&lt;br /&gt;
| (chroma shared between 2 pixels)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA422Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:2:4&lt;br /&gt;
| (chroma shared between 2 pixels + alpha)&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUV420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0&lt;br /&gt;
| (chroma shared between 2x2 pixels)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|YUVA420Pxx]]'''&lt;br /&gt;
| planar&lt;br /&gt;
| 8-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:2:0:4&lt;br /&gt;
| (chroma shared between 2x2 pixels + alpha)&amp;amp;nbsp;&lt;br /&gt;
|- &lt;br /&gt;
| '''[[Avisynthplus_color_formats|Y10..Y32]]''' &lt;br /&gt;
| (both)&lt;br /&gt;
| 10-16, 32 *&amp;amp;nbsp;&lt;br /&gt;
| 4:0:0&lt;br /&gt;
| (no chroma)&lt;br /&gt;
|- &lt;br /&gt;
!colspan=&amp;quot;5&amp;quot; style=&amp;quot;text-align:left; font-weight:normal;&amp;quot;|&amp;amp;nbsp; '''*''' 8-16 = ''8,10,12,14,16 bit integer;''&amp;amp;nbsp; 32 = ''32 bit float''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the target format is the same as the source format, the original clip will be returned unchanged, except for the case of '''ConvertToYV12''' where the {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} parameters are different.&lt;br /&gt;
&lt;br /&gt;
{{BlueBox}}&lt;br /&gt;
There is no unique way of [[Color_conversions|converting]] YUV to RGB or vice-versa. There are different ''conversion matrices'' in use; the two most common ones are available in AviSynth, namely ''Rec.601'' and ''Rec.709'', plus some others. The following should be correct in ''most'' cases (see [[Colorimetry#How_can_I_see_if_the_correct_standard_is_used_upon_playback.3F|'''here''']] for more)&lt;br /&gt;
*Rec.601 should be used when your source is standard definition (usually defined as smaller than [[Wikipedia:720p|720p]]):&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip)&amp;lt;/code&amp;gt; (using default &amp;quot;Rec601&amp;quot;)&lt;br /&gt;
*Rec.709 should be used when your source is DVD or HDTV:&lt;br /&gt;
:&amp;lt;code&amp;gt;ConvertToRGB(clip, matrix=&amp;quot;Rec709&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
*The special-purpose matrices ''PC.601'' and ''PC.709'' keep the ''range'' unchanged, &lt;br /&gt;
:instead of converting between 0{{D}}-255{{D}}&amp;amp;nbsp;RGB and 16{{D}}-235{{D}}&amp;amp;nbsp;YUV, as is the normal practice.&lt;br /&gt;
*The special-purpose matrix ''AVERAGE'' is used for (rarely found) sources with ''unweighted'' luma, &lt;br /&gt;
:where ''Y'' = (R + G + B) / 3.&lt;br /&gt;
{{End_BlueBox}}&lt;br /&gt;
&lt;br /&gt;
Note '''ConvertToRGB''' always converts to [[RGB32]] – unless your source is RGB24, in which case no conversion is done. If you need 24-bit RGB for some reason, use '''ConvertToRGB24''' explicitly.&lt;br /&gt;
&lt;br /&gt;
Use '''ConvertBackToYUY2''' to convert ''back'' to YUY2 with minimal color-blurring when you have previously applied a YUY2&amp;amp;rarr;RGB conversion.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} See also [[ConvertBits]] to convert between bit depths and/or between full-limited range.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== ''RGB interleaved'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] ) &lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB24(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB32(clip [, string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB48(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'', &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToRGB64(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''RGB planar'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGB(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToPlanarRGBA(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV444'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV24(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV444(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV422'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV16(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUY2(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV422(clip, [ string ''matrix'', bool ''interlaced'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertBackToYUY2(clip [, string ''matrix'' ] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV420'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV12(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement''] )&lt;br /&gt;
}} &amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYUV420(clip, [ string ''matrix'', bool ''interlaced'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaOutPlacement'' ] ) {{AvsPluscon}} &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''YUV411'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToYV411(clip [, bool ''interlaced'', string ''matrix'',   &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''ChromaInPlacement'',  &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;string ''chromaresample''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== ''Y-only'' ===== __NOEDITSECTION__&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY8(clip [, string ''matrix''] )&lt;br /&gt;
}}&amp;lt;br&amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|ConvertToY(clip, [ string ''matrix'' ] ) {{AvsPluscon}} &lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
==== Parameter Details ====&lt;br /&gt;
{{HiddenH5|Matrix}}&lt;br /&gt;
{{Par2|matrix|string|&amp;quot;Rec601&amp;quot;}}&lt;br /&gt;
:Controls the colour coefficients and scaling factors used in RGB&amp;amp;harr;YUV conversions.&lt;br /&gt;
:*&amp;quot;Rec601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; scale full range [0{{D}}..255{{D}}] RGB &amp;amp;harr; TV range [16{{D}}..235{{D}}] YUV.&lt;br /&gt;
:*&amp;quot;Rec709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV.&lt;br /&gt;
:*&amp;quot;Rec2020&amp;quot; : Uses Rec.2020 (UHD) coefficients; scale full range RGB &amp;amp;harr; TV range YUV. {{AvsPluscon}}&lt;br /&gt;
:*&amp;quot;PC.601&amp;quot;&amp;amp;nbsp; : Uses Rec.601 coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;PC.709&amp;quot;&amp;amp;nbsp; : Uses Rec.709 (HD) coefficients; keep range unchanged.&lt;br /&gt;
:*&amp;quot;Average&amp;quot;&amp;amp;nbsp; : Uses averaged coefficients (the luma becomes the average of the RGB channels); keep range unchanged.&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Interlaced}}&lt;br /&gt;
{{Par2|interlaced|bool|false}}&lt;br /&gt;
:If true, it is assumed that {{FuncArg|clip}} is interlaced; by default, it is assumed to be progressive. &lt;br /&gt;
:This option is needed because for example, the following (assuming clip is interlaced YV12): &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 [[SeparateFields]](clip)&lt;br /&gt;
 ConvertToYUY2&lt;br /&gt;
 [[Weave]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:...is upsampled incorrectly. Instead it is better to use:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|28|2}} &amp;gt;&lt;br /&gt;
 ConvertToYUY2(clip, interlaced=true)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Note, {{FuncArg|interlaced}}=true has an effect only on YV12&amp;amp;harr;YUY2 or YV12&amp;amp;harr;RGB conversions. More about that can be found [[Interlaced fieldbased|'''here''']].&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma placement}}&lt;br /&gt;
{{Par2|ChromaInPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
{{Par2|ChromaOutPlacement|string|&amp;quot;MPEG2&amp;quot;}}&lt;br /&gt;
:{{FuncArg|ChromaInPlacement}} determines the chroma placement in the clip when converting ''from'' YV12.&lt;br /&gt;
:{{FuncArg|ChromaOutPlacement}} determines the chroma placement in the clip when converting ''to'' YV12.&lt;br /&gt;
:The placement can be one of these strings:&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG2&amp;quot;&amp;amp;nbsp;&lt;br /&gt;
|Subsampling used in MPEG-2 4:2:''x'' and most other formats. Chroma samples are located on the left pixel column of the group&amp;amp;nbsp;(default). &lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;MPEG1&amp;quot;&lt;br /&gt;
|Subsampling used in MPEG-1 4:2:0. Chroma samples are located on the center of each group of 4 pixels.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;DV&amp;quot;&lt;br /&gt;
| Like MPEG-2, but U and V channels are “co-sited” vertically: V on the top row, and U on the bottom row. For 4:1:1, chroma is located on the leftmost column.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenH5|Chroma resample}}&lt;br /&gt;
{{Par2|chromaresample|string|&amp;quot;bicubic&amp;quot;}}&lt;br /&gt;
:Determines which chroma resampler is used in the conversion. Only used when the chroma resolutions of the source and target are different. All AviSynth [[Resize|resizers]] are allowed (&amp;quot;point&amp;quot;, &amp;quot;bilinear&amp;quot;, &amp;quot;bicubic&amp;quot;, &amp;quot;lanczos&amp;quot;, &amp;quot;lanczos4&amp;quot;, &amp;quot;blackman&amp;quot;, &amp;quot;spline16&amp;quot;, &amp;quot;spline36&amp;quot;, &amp;quot;spline64&amp;quot;, &amp;quot;gauss&amp;quot; and &amp;quot;sinc&amp;quot;). Default is &amp;quot;bicubic&amp;quot;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
===== Conversion paths =====&lt;br /&gt;
&lt;br /&gt;
:In v2.60 the following conversion paths occur:&lt;br /&gt;
:* YUV planar &amp;amp;rarr; RGB via YV24&lt;br /&gt;
:* YUV planar &amp;amp;rarr; YUY2 via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YV12 to YUY2)&lt;br /&gt;
:* RGB &amp;amp;rarr; YUV planar via YV24&lt;br /&gt;
:* YUY2 &amp;amp;rarr; YUV planar via YV16 &lt;br /&gt;
::(except for YV12 and chroma options listed above not explicitly set; in that case there is a direct conversion from YUY2 to YV12)&lt;br /&gt;
&lt;br /&gt;
: The chroma options {{FuncArg|chromaresample}}, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} are only used in the 'planar conversion' part of the conversion path.&lt;br /&gt;
&lt;br /&gt;
:Suppose you have a YUY2 clip for example and you convert it to YV24. The YUY2 will be converted to YV16 first without applying the chroma options. Then YV16 will be converted to YV24 while applying {{FuncArg|chromaresample}}. Since YV12 is not involved, {{FuncArg|ChromaInPlacement}} and {{FuncArg|ChromaOutPlacement}} won't be used.&lt;br /&gt;
&lt;br /&gt;
===== Sampling =====&lt;br /&gt;
&lt;br /&gt;
:[[Sampling|'''[This page]''']] covers the sampling methods and color formats in more detail.&lt;br /&gt;
&lt;br /&gt;
===== Color conversions =====&lt;br /&gt;
&lt;br /&gt;
:[[Color_conversions|'''[This page]''']] covers the color conversions in more detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changelog ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added ConvertToY8, ConvertToYV411, ConvertToYV16, ConvertToYV24, ChromaInPlacement, ChromaOutPlacement, chromaresample, matrix=&amp;quot;AVERAGE&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
| v2.50&lt;br /&gt;
| Added ConvertToYV12.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Colourspace_Conversion]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T13:09:49Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Expr language/RPN elements */ fix formatter missing end&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV'', int ''lut''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit integer or 32 bit float for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 or f32 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
:{{Par2|lut|int|0}}&lt;br /&gt;
:: Since v3.7.1&lt;br /&gt;
:: LUT (Look-up Table) mode. LUT is precalculated table. Expression values are calculated for all pixel value combinations in advance.&lt;br /&gt;
:: Then in each frame the resulting pixel value is 'looked up' from the ready-made table, which is indexed by the actual (x) or (x,y) pixel value.&lt;br /&gt;
::* Default is 0, which means the usual realtime calculation. lut=1: 1D LUT (lutx) lut=2: 2D lut (lutxy)&lt;br /&gt;
::* 1D luts are available for 8-16 bit inputs. A 8 bit 1D lut need 256 byte memory. A 16 bit 1D lut needs 65536 2-byte-words (131072 bytes)&lt;br /&gt;
::* 2D luts are available for 8-14 bit inputs. Note: a 14 bit 2D lut needs (2^14)*(2^14)*2 bytes buffer in memory per plane (~1GByte)&lt;br /&gt;
::* When lut is not available for a given bit depth then Expr will silently fallback to realtime (lut=0) mode.&lt;br /&gt;
::* In 1D or 2D lut mode some keywords and features are forbidden in the expression: sx, sy, sxr, syr, frameno, time, relative pixel addressing.&lt;br /&gt;
::* Frame property access works, but is limited to frame #0 which is read before LUT evaluation.&lt;br /&gt;
::* In lut mode the input clip's bit depths must be the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 integer or 32 bit float bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 and f32 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14, 16 or 32 bits by the 'i10'..'i16','f32' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535 (chroma is a bit different, since it is converted by moving into signed domain and back such as in (x-32768)*(127/32767)+128)&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::chroma: &amp;lt;code&amp;gt;result = (calculate_value((input-32768) / 32767.0 * 127.0 + 128 ) - 128) / 127.0 * 32767.0 + 32768&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.7.1&lt;br /&gt;
| new: round, floor, ceil, trunc&amp;lt;br&amp;gt;&lt;br /&gt;
TAB, CR, LF are valid string delimiters inside expr string&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: arbitrary variable names, not only A to Z&amp;lt;br&amp;gt;&lt;br /&gt;
Access clip's frame properties: clipletter.frameProperty syntax&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: sin and cos: SIMD acceleration&amp;lt;br&amp;gt;&lt;br /&gt;
new: atan2&amp;lt;br&amp;gt;&lt;br /&gt;
new: neg, sgn&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: allow ‘f32’ as internal autoscale target besides integer i8..i16&amp;lt;br&amp;gt;&lt;br /&gt;
lut (Lookup table) support 1D and 2D&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: special full scale conversion of chroma plane&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T13:07:45Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changes */ mention special full scale chroma method&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV'', int ''lut''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit integer or 32 bit float for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 or f32 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
:{{Par2|lut|int|0}}&lt;br /&gt;
:: Since v3.7.1&lt;br /&gt;
:: LUT (Look-up Table) mode. LUT is precalculated table. Expression values are calculated for all pixel value combinations in advance.&lt;br /&gt;
:: Then in each frame the resulting pixel value is 'looked up' from the ready-made table, which is indexed by the actual (x) or (x,y) pixel value.&lt;br /&gt;
::* Default is 0, which means the usual realtime calculation. lut=1: 1D LUT (lutx) lut=2: 2D lut (lutxy)&lt;br /&gt;
::* 1D luts are available for 8-16 bit inputs. A 8 bit 1D lut need 256 byte memory. A 16 bit 1D lut needs 65536 2-byte-words (131072 bytes)&lt;br /&gt;
::* 2D luts are available for 8-14 bit inputs. Note: a 14 bit 2D lut needs (2^14)*(2^14)*2 bytes buffer in memory per plane (~1GByte)&lt;br /&gt;
::* When lut is not available for a given bit depth then Expr will silently fallback to realtime (lut=0) mode.&lt;br /&gt;
::* In 1D or 2D lut mode some keywords and features are forbidden in the expression: sx, sy, sxr, syr, frameno, time, relative pixel addressing.&lt;br /&gt;
::* Frame property access works, but is limited to frame #0 which is read before LUT evaluation.&lt;br /&gt;
::* In lut mode the input clip's bit depths must be the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 integer or 32 bit float bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 and f32 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14, 16 or 32 bits by the 'i10'..'i16','f32' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535 (chroma is a bit different, since it is converted by moving into signed domain and back such as in (x-32768)*(127/32767)+128)&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::chroma: &amp;lt;code&amp;gt;result = (calculate_value((input-32768) / 32767.0 * 127.0 + 128 ) - 128) / 127.0 * 32767.0 + 32768&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.7.1&lt;br /&gt;
| new: round, floor, ceil, trunc&amp;lt;br&amp;gt;&lt;br /&gt;
TAB, CR, LF are valid string delimiters inside expr string&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: arbitrary variable names, not only A to Z&amp;lt;br&amp;gt;&lt;br /&gt;
Access clip's frame properties: clipletter.frameProperty syntax&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: sin and cos: SIMD acceleration&amp;lt;br&amp;gt;&lt;br /&gt;
new: atan2&amp;lt;br&amp;gt;&lt;br /&gt;
new: neg, sgn&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: allow ‘f32’ as internal autoscale target besides integer i8..i16&amp;lt;br&amp;gt;&lt;br /&gt;
lut (Lookup table) support 1D and 2D&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: special full scale conversion of chroma plane&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T13:05:41Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; */ some missing f32 mentioning, chroma mode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV'', int ''lut''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit integer or 32 bit float for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 or f32 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
:{{Par2|lut|int|0}}&lt;br /&gt;
:: Since v3.7.1&lt;br /&gt;
:: LUT (Look-up Table) mode. LUT is precalculated table. Expression values are calculated for all pixel value combinations in advance.&lt;br /&gt;
:: Then in each frame the resulting pixel value is 'looked up' from the ready-made table, which is indexed by the actual (x) or (x,y) pixel value.&lt;br /&gt;
::* Default is 0, which means the usual realtime calculation. lut=1: 1D LUT (lutx) lut=2: 2D lut (lutxy)&lt;br /&gt;
::* 1D luts are available for 8-16 bit inputs. A 8 bit 1D lut need 256 byte memory. A 16 bit 1D lut needs 65536 2-byte-words (131072 bytes)&lt;br /&gt;
::* 2D luts are available for 8-14 bit inputs. Note: a 14 bit 2D lut needs (2^14)*(2^14)*2 bytes buffer in memory per plane (~1GByte)&lt;br /&gt;
::* When lut is not available for a given bit depth then Expr will silently fallback to realtime (lut=0) mode.&lt;br /&gt;
::* In 1D or 2D lut mode some keywords and features are forbidden in the expression: sx, sy, sxr, syr, frameno, time, relative pixel addressing.&lt;br /&gt;
::* Frame property access works, but is limited to frame #0 which is read before LUT evaluation.&lt;br /&gt;
::* In lut mode the input clip's bit depths must be the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 integer or 32 bit float bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 and f32 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14, 16 or 32 bits by the 'i10'..'i16','f32' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535 (chroma is a bit different, since it is converted by moving into signed domain and back such as in (x-32768)*(127/32767)+128)&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::chroma: &amp;lt;code&amp;gt;result = (calculate_value((input-32768) / 32767.0 * 127.0 + 128 ) - 128) / 127.0 * 32767.0 + 32768&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.7.1&lt;br /&gt;
| new: round, floor, ceil, trunc&amp;lt;br&amp;gt;&lt;br /&gt;
TAB, CR, LF are valid string delimiters inside expr string&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: arbitrary variable names, not only A to Z&amp;lt;br&amp;gt;&lt;br /&gt;
Access clip's frame properties: clipletter.frameProperty syntax&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: sin and cos: SIMD acceleration&amp;lt;br&amp;gt;&lt;br /&gt;
new: atan2&amp;lt;br&amp;gt;&lt;br /&gt;
new: neg, sgn&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: allow ‘f32’ as internal autoscale target besides integer i8..i16&amp;lt;br&amp;gt;&lt;br /&gt;
lut (Lookup table) support 1D and 2D&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T12:51:37Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changes */ lut in 3.7.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV'', int ''lut''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit integer or 32 bit float for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 or f32 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
:{{Par2|lut|int|0}}&lt;br /&gt;
:: Since v3.7.1&lt;br /&gt;
:: LUT (Look-up Table) mode. LUT is precalculated table. Expression values are calculated for all pixel value combinations in advance.&lt;br /&gt;
:: Then in each frame the resulting pixel value is 'looked up' from the ready-made table, which is indexed by the actual (x) or (x,y) pixel value.&lt;br /&gt;
::* Default is 0, which means the usual realtime calculation. lut=1: 1D LUT (lutx) lut=2: 2D lut (lutxy)&lt;br /&gt;
::* 1D luts are available for 8-16 bit inputs. A 8 bit 1D lut need 256 byte memory. A 16 bit 1D lut needs 65536 2-byte-words (131072 bytes)&lt;br /&gt;
::* 2D luts are available for 8-14 bit inputs. Note: a 14 bit 2D lut needs (2^14)*(2^14)*2 bytes buffer in memory per plane (~1GByte)&lt;br /&gt;
::* When lut is not available for a given bit depth then Expr will silently fallback to realtime (lut=0) mode.&lt;br /&gt;
::* In 1D or 2D lut mode some keywords and features are forbidden in the expression: sx, sy, sxr, syr, frameno, time, relative pixel addressing.&lt;br /&gt;
::* Frame property access works, but is limited to frame #0 which is read before LUT evaluation.&lt;br /&gt;
::* In lut mode the input clip's bit depths must be the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 integer or 32 bit float bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.7.1&lt;br /&gt;
| new: round, floor, ceil, trunc&amp;lt;br&amp;gt;&lt;br /&gt;
TAB, CR, LF are valid string delimiters inside expr string&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: arbitrary variable names, not only A to Z&amp;lt;br&amp;gt;&lt;br /&gt;
Access clip's frame properties: clipletter.frameProperty syntax&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: sin and cos: SIMD acceleration&amp;lt;br&amp;gt;&lt;br /&gt;
new: atan2&amp;lt;br&amp;gt;&lt;br /&gt;
new: neg, sgn&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: allow ‘f32’ as internal autoscale target besides integer i8..i16&amp;lt;br&amp;gt;&lt;br /&gt;
lut (Lookup table) support 1D and 2D&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T12:51:01Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Syntax and Parameters */ lut mode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV'', int ''lut''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit integer or 32 bit float for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 or f32 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
:{{Par2|lut|int|0}}&lt;br /&gt;
:: Since v3.7.1&lt;br /&gt;
:: LUT (Look-up Table) mode. LUT is precalculated table. Expression values are calculated for all pixel value combinations in advance.&lt;br /&gt;
:: Then in each frame the resulting pixel value is 'looked up' from the ready-made table, which is indexed by the actual (x) or (x,y) pixel value.&lt;br /&gt;
::* Default is 0, which means the usual realtime calculation. lut=1: 1D LUT (lutx) lut=2: 2D lut (lutxy)&lt;br /&gt;
::* 1D luts are available for 8-16 bit inputs. A 8 bit 1D lut need 256 byte memory. A 16 bit 1D lut needs 65536 2-byte-words (131072 bytes)&lt;br /&gt;
::* 2D luts are available for 8-14 bit inputs. Note: a 14 bit 2D lut needs (2^14)*(2^14)*2 bytes buffer in memory per plane (~1GByte)&lt;br /&gt;
::* When lut is not available for a given bit depth then Expr will silently fallback to realtime (lut=0) mode.&lt;br /&gt;
::* In 1D or 2D lut mode some keywords and features are forbidden in the expression: sx, sy, sxr, syr, frameno, time, relative pixel addressing.&lt;br /&gt;
::* Frame property access works, but is limited to frame #0 which is read before LUT evaluation.&lt;br /&gt;
::* In lut mode the input clip's bit depths must be the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 integer or 32 bit float bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.7.1&lt;br /&gt;
| new: round, floor, ceil, trunc&amp;lt;br&amp;gt;&lt;br /&gt;
TAB, CR, LF are valid string delimiters inside expr string&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: arbitrary variable names, not only A to Z&amp;lt;br&amp;gt;&lt;br /&gt;
Access clip's frame properties: clipletter.frameProperty syntax&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: sin and cos: SIMD acceleration&amp;lt;br&amp;gt;&lt;br /&gt;
new: atan2&amp;lt;br&amp;gt;&lt;br /&gt;
new: neg, sgn&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: allow ‘f32’ as internal autoscale target besides integer i8..i16&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T11:30:50Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Changes */ Expr 3.7.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 or f32 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 integer or 32 bit float bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.7.1&lt;br /&gt;
| new: round, floor, ceil, trunc&amp;lt;br&amp;gt;&lt;br /&gt;
TAB, CR, LF are valid string delimiters inside expr string&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: arbitrary variable names, not only A to Z&amp;lt;br&amp;gt;&lt;br /&gt;
Access clip's frame properties: clipletter.frameProperty syntax&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: sin and cos: SIMD acceleration&amp;lt;br&amp;gt;&lt;br /&gt;
new: atan2&amp;lt;br&amp;gt;&lt;br /&gt;
new: neg, sgn&amp;lt;br&amp;gt;&lt;br /&gt;
Enhanced: allow ‘f32’ as internal autoscale target besides integer i8..i16&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T11:28:14Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: Expr: allow f32 in all autoscale&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16' and 'f32')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16' and 'f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 or f32 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 integer or 32 bit float bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16','f32')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16','f32') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T11:22:24Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Expr language/RPN elements */ New functions sgn and neg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;neg&amp;lt;/code&amp;gt; simple negates stack top&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;sgn&amp;lt;/code&amp;gt; simple signum function -1 if x&amp;lt;0; 0 when x==0; 1 if x&amp;gt;0&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T11:18:09Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Expr language/RPN elements */ sin and cos to SIMD, new atan2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, neg, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos atan2 tan asin acos atan&amp;lt;/code&amp;gt;&amp;lt;p&amp;gt;On Intel x86/x64 the functions &amp;lt;code&amp;gt;sin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cos&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;atan2&amp;lt;/code&amp;gt; have SSE2/AVX2 optimization, the others have not (they make the whole expression to evaluate without SIMD optimization)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T11:12:11Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: Expr: frame property access&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, neg, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos tan asin acos atan&amp;lt;/code&amp;gt; (no SSE2/AVX2 optimization when they appear in Expr)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Frame property input =====&lt;br /&gt;
:: Frame properties (Integer or 32 bit float type) can be accessed within the expressions.&lt;br /&gt;
:: &amp;lt;code&amp;gt;clipletter.frameProperty&amp;lt;/code&amp;gt; syntax injects actual frame property values into expression&lt;br /&gt;
:: Example:&lt;br /&gt;
:: &amp;lt;code&amp;gt;x._ColorRange&amp;lt;/code&amp;gt; will push the value of _ColorRange frame property on stack (of clip &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T11:02:31Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Internal variables */ arbitrary variable names, 32 bit frameno behaviour as float&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, neg, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos tan asin acos atan&amp;lt;/code&amp;gt; (no SSE2/AVX2 optimization when they appear in Expr)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;User variables&amp;lt;/b&amp;gt;&lt;br /&gt;
: Variables can freely be used during evaluation for storing and loading intermediate results within the expression.&lt;br /&gt;
: Variable names must begin with an English letter (a to z, A to Z) or with _ (underscore), followed by one or more underscore, letters or digits.&lt;br /&gt;
: For example &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;X2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_myvar&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt; etc..&lt;br /&gt;
: (until 3.7.1 only uppercase &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Z&amp;lt;/code&amp;gt; names were allowed)&lt;br /&gt;
&lt;br /&gt;
: Variables names are case sensitive and cannot be already reserved words.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;i&amp;gt;Actions with variables&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
::* Store: &amp;lt;code&amp;gt;varname@&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Store and pop from stack: &amp;lt;code&amp;gt;varname^&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;Actual stack top is assigned to a variable, then is immediately removed from stack top. Use case: when the value assigned to the variable won't be used immediately.&amp;lt;/p&amp;gt;&lt;br /&gt;
::* Variables can be used by simply giving their names: &amp;lt;code&amp;gt;varname&amp;lt;/code&amp;gt; &amp;lt;p&amp;gt;The actual content of the variable is pushed onto the stack top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;b&amp;gt;Special predefined variables&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:* &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. &amp;lt;code&amp;gt;0 &amp;lt;= frameno &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;p&amp;gt;A 32 bit integer converted to float, so it is precise only at approximately 24 bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: &amp;lt;code&amp;gt;time = frameno/clip_frame_count&amp;lt;/code&amp;gt;. Use relative time position in expression. &amp;lt;code&amp;gt;0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T10:20:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Expr language/RPN elements */ Add rounding operators&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, neg, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos tan asin acos atan&amp;lt;/code&amp;gt; (no SSE2/AVX2 optimization when they appear in Expr)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;round, floor, ceil, trunc&amp;lt;/code&amp;gt; operators (nearest integer - banker's rounding, round down, round up, round to zero)&amp;lt;p&amp;gt;On Intel builds acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
: Uppercase ''A'' to ''Z'' for storing and loading intermediate results within the expression&lt;br /&gt;
:: Store: &amp;lt;code&amp;gt;A@ .. Z@&amp;lt;/code&amp;gt; &lt;br /&gt;
:: Store and pop from stack: &amp;lt;code&amp;gt;A^ .. Z^&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Use: A..Z&lt;br /&gt;
:* Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. 0 &amp;lt;= &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: time = frameno/clip_frame_count. Use relative time position in expression. 0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&lt;br /&gt;
: &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Expr</id>
		<title>Expr</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Expr"/>
				<updated>2021-12-09T10:07:48Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Syntax and Parameters */ Expr allow TAB, CR and LF delimiters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
Applies a [[wikipedia:Function_(mathematics)|mathematical function]], defined by an ''expression'' string, on the pixels of the source clip(s). A different expression may be set for each color channel. Users of '''[[MaskTools2|MaskTools]]''' may be familiar with this concept.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==== Syntax and Parameters ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef&lt;br /&gt;
|Expr( [clip ''clip''[, ...], string ''exp''[, ...], string ''format'',&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; bool ''optAvx2'', bool ''optSingleMode'', bool ''optSSE2'', string ''scale_inputs'', bool ''clamp_float'', bool ''clamp_float_UV''] )&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clip|clip|}}&lt;br /&gt;
::One or more source clips. Up to 26 input clips can be specified. &lt;br /&gt;
::* The first three clips are referenced by lowercase letter x, y and z; use 'a', 'b' ... 'w' for the rest.&lt;br /&gt;
::* Clips may be YUV(A), RGB(A), or greyscale; 8-16 bit integer or 32 bit float. &lt;br /&gt;
::* Width, height and [[wikipedia:Chroma_subsampling|color subsampling]] should be the same; bit depths can be different.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|exp|string|}}&lt;br /&gt;
::One or more [[wikipedia:Reverse Polish Notation|RPN]] expressions&lt;br /&gt;
::* A different expression may be set for each color channel (or ''plane''). Plane order is Y-U-V-A or R-G-B-A.&lt;br /&gt;
::(note: due to a bug, versions prior to r2724 used GBRA ordering)&lt;br /&gt;
::* When an expression string is not given, the previous one is used. &lt;br /&gt;
::* The empty string (&amp;quot;&amp;quot;) is a valid expression; it causes the plane to be copied (see [[#Expressions|Expressions]] below).&lt;br /&gt;
::* Keyword delimiters are space, but TAB, CR and LF characters are allowed as whitespace as well since 3.7.1&lt;br /&gt;
&lt;br /&gt;
:{{Par2|format|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: Set color format of the returned clip. &lt;br /&gt;
::* Use [[Avisynthplus_color_formats|pixel format strings]] like &amp;quot;YV12&amp;quot;, &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV444P16&amp;quot;, &amp;quot;RGBP10&amp;quot;. &lt;br /&gt;
::* By default, the output format is the same as the first clip.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optAvx2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:Advanced_Vector_Extensions|AVX2]].&lt;br /&gt;
::* Enables/Disables AVX2 code generation if available. Do nothing if AVX2 is not supported in Avisynth.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSingleMode|bool |false}}&lt;br /&gt;
:: If ''true'', generate assembly code using only one XMM/YMM register set instead of two; default false.&lt;br /&gt;
::* '''Expr''' generates assembly code that normally uses two 128 (SSE2) or 256 bit (AVX2) registers (&amp;quot;lanes&amp;quot;), thus processing 8 (SSE2)/16 (AVX2) pixels per internal cycle.&lt;br /&gt;
::* Experimental parameter, {{FuncArg|optSingleMode}}=true makes the internal compiler generate instructions for only one register (4/8 pixels - SSE2/AVX2). The parameter was introduced to test the speed of x86 code using one working register. Very-very complex expressions would use too many XMM/YMM registers which are then &amp;quot;swapped&amp;quot; to memory slots, that could be slow. Using {{FuncArg|optSingleMode}} = true may result in using less registers with no need for swapping them to memory slots.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|optSSE2|bool |(auto)}}&lt;br /&gt;
:: If false, disable [[wikipedia:SSE2|SSE2]].&lt;br /&gt;
::* Enables/Disables SSE2 code generation when in non-AVX2 mode. Setting {{FuncArg|optSSE2}}=false and {{FuncArg|optAVX2}}=false forces expression processing in a slow interpreted way (C language)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|scale_inputs|string|&amp;quot;none&amp;quot;}}&lt;br /&gt;
:: Autoscale any input bit depths to 8-16 bit for internal expression use, the conversion method is either full range (stretch) or limited YUV range (like bit shift). Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
:: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
::*&amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::*&amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation&lt;br /&gt;
::*&amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::*&amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::*&amp;quot;none&amp;quot;: no magic&lt;br /&gt;
:: E.g. scale_inputs=&amp;quot;float&amp;quot; will automatically convert 32 bit float input to 8 bit range (but keeps the floating point precision)&lt;br /&gt;
:: The default 8 bit target range can be overridden by the i10 .. i16 specifiers at the beginning of the expression string.&lt;br /&gt;
:: The script inside will treat the clip as a 8 bit one. This only affects the internal calculations, the output is properly scaled back.&lt;br /&gt;
:: Note: ymin, ymax, cmin, cmax, range_min, range_max, range_half and range_size internal variables are changed accordingly (this behaviour was fixed in Avs+ &amp;gt; r2900)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float|bool|false}}&lt;br /&gt;
:: if true: clamps 32 bit float to valid ranges, which is 0..1 for luma or for RGB color space and -0.5..0.5 for YUV chroma UV channels&lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
:: Until 3.4: Ignored when scale_inputs scales 32bit-float type pixels&lt;br /&gt;
:: From 3.5: not ignored, even when parameter &amp;quot;scale_inputs&amp;quot; auto-scales 32 bit float type pixels to integer&lt;br /&gt;
&lt;br /&gt;
:{{Par2|clamp_float_UV|bool|false}}&lt;br /&gt;
:: Since v3.5&lt;br /&gt;
:: this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5. &lt;br /&gt;
:: Default false: as usual, 32 bit float pixels are not clamped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
'''Expr''' accepts 1 to 26 '''source clips''', up to four '''expression''' strings (one per color plane), an optional '''output format''' string, and some debug options.&lt;br /&gt;
Output video format is inherited from the first clip, when there is no format override.&lt;br /&gt;
All clips have to match in their width, height and [[wikipedia:Chroma_subsampling|chroma subsampling]].&lt;br /&gt;
&lt;br /&gt;
Expressions are evaluated on each plane, Y, U, V (and A) or R, G, B (,A).&lt;br /&gt;
When an expression string is not specified, the previous expression is used for that plane &amp;amp;ndash; except for plane A (alpha) which is copied by default.&lt;br /&gt;
When an expression is an empty string (&amp;quot;&amp;quot;) then the relevant plane will be copied (if the output clip bit depth is similar).&lt;br /&gt;
When an expression is a single clip reference letter (&amp;quot;x&amp;quot;) and the source/target bit depth is similar, then the relevant plane will be copied.&lt;br /&gt;
When an expression is constant (after constant folding), then the relevant plane will be filled with an optimized memory fill method. &lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;255&amp;quot;, &amp;quot;128, &amp;quot;128&amp;quot;)&amp;lt;/code&amp;gt; fills all three planes.&lt;br /&gt;
* Example: &amp;lt;code&amp;gt;Expr(clip, &amp;quot;x&amp;quot;, &amp;quot;range_half, &amp;quot;range_half&amp;quot;)&amp;lt;/code&amp;gt; copies luma, fills U and V with 128/512/... (bit depth dependent)&lt;br /&gt;
Other optimizations: do not call GetFrame for input clips that are not referenced or plane-copied&lt;br /&gt;
&lt;br /&gt;
Expressions are written in [[wikipedia:Reverse Polish Notation|RPN]].&lt;br /&gt;
&lt;br /&gt;
Expressions use 32 bit float precision internally.&lt;br /&gt;
 &lt;br /&gt;
For 8..16 bit formats output is rounded and clamped from the internal 32 bit float representation to valid 8, 10, ... 16 bits range. 32 bit float output is not clamped at all.&lt;br /&gt;
&lt;br /&gt;
===== Expr language/RPN elements =====&lt;br /&gt;
:* Clips: letters ''x'', ''y'', ''z'', ''a''..''w''. ''x'' is the first clip parameter, ''y'' is the second one, etc.&lt;br /&gt;
:* Math: &amp;lt;code&amp;gt;* / + -&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; (modulo), like fmod. Example: &amp;lt;code&amp;gt;result = x - trunc(x/d)*d&amp;lt;/code&amp;gt;. Note: the internal 32-bit float can hold only a 24 bit integer number (approximately)&lt;br /&gt;
:* Math constant: &amp;lt;code&amp;gt;pi&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;min, max, sqrt, abs, neg, exp, log, pow ^&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Function: &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt; three operand function for clipping. Example: &amp;lt;code&amp;gt;x 16 240 clip&amp;lt;/code&amp;gt; means min((max(x,16),240)&lt;br /&gt;
:* Functions: &amp;lt;code&amp;gt;sin cos tan asin acos atan&amp;lt;/code&amp;gt; (no SSE2/AVX2 optimization when they appear in Expr)&lt;br /&gt;
:* Logical: &amp;lt;code&amp;gt; &amp;gt; &amp;lt; = &amp;gt;= &amp;lt;= and or xor not == &amp;amp; | !=&amp;lt;/code&amp;gt; (synonyms: &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* Ternary operator: &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; Example: &amp;lt;code&amp;gt;x 128 &amp;lt; x y ?&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Duplicate stack elements: &amp;lt;code&amp;gt;dup, dup''n''&amp;lt;/code&amp;gt; (dup1, dup2, ...)&lt;br /&gt;
:* Swap stack elements: &amp;lt;code&amp;gt;swap, swap''n''&amp;lt;/code&amp;gt; (swap1, swap2, ...)&lt;br /&gt;
:* Scale by bit shift: &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
:* Scale by full scale stretch: &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt; (operand is treated as being a number in 8 bit range unless i8..i16 or f32 is specified)&lt;br /&gt;
&lt;br /&gt;
===== Bit-depth aware constants =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;ymin, ymax&amp;lt;/code&amp;gt; (ymin_a .. ymin_z for individual clips) - the usual luma limits (16..235 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;cmin, cmax&amp;lt;/code&amp;gt; (cmin_a .. cmin_z) - chroma limits (16..240 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_half&amp;lt;/code&amp;gt; (range_half_a .. range_half_z) - half of the range, (128 or scaled equivalents)&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_size&amp;lt;/code&amp;gt; (range_size_a .. range_size_z , etc..) 256, 1024, 4096, 16384, 65536 for integer formats, 1.0 for 32 bit float formats&lt;br /&gt;
:* &amp;lt;code&amp;gt;range_min, range_max&amp;lt;/code&amp;gt; (range_min_a .. range_min_z) chroma/luma plane aware constants for the actual min-max limits&lt;br /&gt;
:* &amp;lt;code&amp;gt;yrange_min, yrange_half, yrange_max&amp;lt;/code&amp;gt; Unlike the luma/chroma plane adaptive &amp;quot;range_min&amp;quot;, &amp;quot;range_half&amp;quot;, &amp;quot;range_max&amp;quot; these constants always report the luma (Y) values. Since v3.5&lt;br /&gt;
When the constant name is ended with _x, _y, _z, _a, etc.. the constant is brought from the specified clip (input clips can be of different formats)&lt;br /&gt;
When by using parameter &amp;quot;scale_inputs&amp;quot; the input is converted to e.g. 8 bits, these constants are calculated for this internally used bit depth.&lt;br /&gt;
&lt;br /&gt;
===== Keywords for modifying base bit depth =====&lt;br /&gt;
:* &amp;lt;code&amp;gt;i8, i10, i12, i14, i16, f32&amp;lt;/code&amp;gt; (used with &amp;lt;code&amp;gt;scaleb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;scalef&amp;lt;/code&amp;gt;)&lt;br /&gt;
  &lt;br /&gt;
===== Spatial input variables in expr syntax =====&lt;br /&gt;
:: &amp;lt;code&amp;gt;sx, sy&amp;lt;/code&amp;gt; (absolute x and y coordinates, 0 to width-1 and 0 to height-1)&lt;br /&gt;
:: &amp;lt;code&amp;gt;sxr, syr&amp;lt;/code&amp;gt; (relative x and y coordinates, from 0 to 1.0)&lt;br /&gt;
&lt;br /&gt;
===== Internal variables =====&lt;br /&gt;
: Uppercase ''A'' to ''Z'' for storing and loading intermediate results within the expression&lt;br /&gt;
:: Store: &amp;lt;code&amp;gt;A@ .. Z@&amp;lt;/code&amp;gt; &lt;br /&gt;
:: Store and pop from stack: &amp;lt;code&amp;gt;A^ .. Z^&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Use: A..Z&lt;br /&gt;
:* Example: &amp;lt;code&amp;gt;&amp;quot;x y - A^ x y 0.5 + + B^ A B / C@ x +&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; : use current frame number in expression. 0 &amp;lt;= &amp;lt;code&amp;gt;frameno&amp;lt;/code&amp;gt; &amp;lt; &amp;lt;tt&amp;gt;clip_frame_count&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; : calculation: time = frameno/clip_frame_count. Use relative time position in expression. 0 &amp;lt;= time &amp;lt; frameno/clip_frame_count&lt;br /&gt;
: &amp;lt;code&amp;gt;width, height&amp;lt;/code&amp;gt;: clip width and clip height&lt;br /&gt;
&lt;br /&gt;
===== Pixel addressing =====&lt;br /&gt;
: Indexed, addressable source clip pixels by relative x,y positions. &lt;br /&gt;
:: Syntax: x[a,b] where &lt;br /&gt;
:: 'x': source clip letter a..z&lt;br /&gt;
:: 'a': horizontal shift. -width &amp;lt; a &amp;lt; width&lt;br /&gt;
:: 'b': vertical shift. -height &amp;lt; b &amp;lt; height&lt;br /&gt;
:: 'a' and 'b' should be constant. e.g.: &amp;quot;x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:: When an pixel would come from off-screen, the pixels are cloned from the edge.&lt;br /&gt;
:: Optimized version of indexed pixels require SSSE3, and no AVX2 version is available. Non-SSSE3 falls back to C for the whole expression&lt;br /&gt;
&lt;br /&gt;
==== Auto-scale inputs with &amp;quot;scale_inputs&amp;quot; ====&lt;br /&gt;
: Autoscale works by converting any input bit depths to a common 8-16 bit format for internal expression use, the conversion method is either full range or limited YUV range. Feature is similar to the one in masktools2 v2.2.15&lt;br /&gt;
&lt;br /&gt;
: The primary reason of this feature is the &amp;quot;easy&amp;quot; usage of formerly written expressions optimized for 8 bits.&lt;br /&gt;
&lt;br /&gt;
: Possible values for scale_inputs&lt;br /&gt;
::* &amp;quot;int&amp;quot; : scales limited range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;intf&amp;quot;: scales full range videos, only integer formats (8-16bits) to 8 (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;float&amp;quot; or &amp;quot;floatf&amp;quot; : only scales 32 bit float format to 8 bit range (or bit depth specified by 'i8'..'i16')&lt;br /&gt;
::* &amp;quot;floatUV&amp;quot;: (since v3.5) chroma pre and post shift by 0.5 for 32 bit float pixels, thus having them in the range of 0..1 instead of -0.5..+0.5 during Expr evaluation &lt;br /&gt;
::* &amp;quot;all&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses limited_range logic (mul/div by two's power)&lt;br /&gt;
::* &amp;quot;allf&amp;quot;: scales videos to 8 (or bit depth specified by 'i8'..'i16') - conversion uses full scale logic (stretch)&lt;br /&gt;
::* &amp;quot;none&amp;quot;: no magic&lt;br /&gt;
&lt;br /&gt;
: Usually limited range is for normal YUV videos, full scale is for RGB or known-to-be-fullscale YUV&lt;br /&gt;
&lt;br /&gt;
: By default the internal conversion target is 8 bits, so old expressions written for 8 bit videos will probably work.&lt;br /&gt;
: This internal working bit-depth can be overwritten by the i8, i10, i12, i14, i16 specifiers.&lt;br /&gt;
&lt;br /&gt;
: When using autoscale mode, scaleb and scalef keywords are meaningless for 8-16 bits, because there is nothing to scale. 32 bit (float) values will be scaled however when &amp;quot;float&amp;quot;, &amp;quot;floatUV&amp;quot;, &amp;quot;all&amp;quot;, &amp;quot;allf&amp;quot; is specified.&lt;br /&gt;
: Different conversion methods cannot be set for converting before and after the expression. Neither can you specify different methods for distinct input clips (e.g. x is full, y is limited is not supported).&lt;br /&gt;
&lt;br /&gt;
: How it works:&lt;br /&gt;
:*8-32 bit inputs ar all scaled to a common bit depth value, which bit depth is 8 by default and can be set to 10, 12, 14 and 16 bits by the 'i10'..'i16' keywords.&amp;lt;br&amp;gt;&lt;br /&gt;
:For example: scale_inputs=&amp;quot;all&amp;quot; converts any inputs to 8 bit range. No truncation occurs however (no precision loss), because even a 16 bit data is converted to 8 bit in floating point precision, using division by 256.0 (2^16/2^8). &lt;br /&gt;
:So the conversion is _not_ a simple shift-right-8 in the integer domain, which would lose precision.&lt;br /&gt;
:*Calculates expression (like in masktools2 mt_lut, mt_lutxy, mt_lutxyz and mt_lutxyza do)&lt;br /&gt;
:*Scales the internal result back to the original video bit depth.&amp;lt;br&amp;gt;Clamping (clipping to valid range) and converting to an integer output (if applicable) occurs here.&lt;br /&gt;
&lt;br /&gt;
: The predefined constants such as 'range_max', etc. will behave according to the internal working bit depth&lt;br /&gt;
&lt;br /&gt;
:'''Important note!'''&lt;br /&gt;
::This feature was created for easy porting earlier 8-bit-video-only lut expressions. You have to understand how it works internally.&lt;br /&gt;
::Let's see a 16bit input in &amp;quot;all&amp;quot; and &amp;quot;allf&amp;quot; mode (target is the default 8 bits)&lt;br /&gt;
::Limited range 16-&amp;gt;8 bits conversion has a factor of 1/256.0 (Instead of shift right 8 in integer domain, float-division is used or else it would lose presision)&lt;br /&gt;
::Full range 16-&amp;gt;8 bits conversion has a factor of 255.0/65535&lt;br /&gt;
::Using bit shifts (really it's division and multiplication by 2^8=256.0):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 256.0) * 256.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Full scale 16-8-16 bit mode ('intf', 'allf'):&lt;br /&gt;
::&amp;lt;code&amp;gt;result = calculate_lut_value(input / 65535.0 * 255.0 ) / 255.0 * 65535.0&amp;lt;/code&amp;gt;&lt;br /&gt;
::Use scale_inputs = &amp;quot;all&amp;quot; (&amp;quot;int&amp;quot;, &amp;quot;float&amp;quot;) for YUV videos with 'limited' range e.g. in 8 bits: Y=16..235, UV=16..240).&lt;br /&gt;
::Use scale_inputs = &amp;quot;allf&amp;quot; (intf, floatf) for RGB or YUV videos with 'full' range e.g. in 8 bits: channels 0..255.&lt;br /&gt;
::When input is 32bit float, the 0..1.0 (luma) and -0.5..0.5 (chroma) channel is scaled to 0..255 (8 bits), 0..1023 (i10 mode), 0..4095 (i12 mode), 0..16383(i14 mode), 0..65535(i16 mode) then back.&lt;br /&gt;
&lt;br /&gt;
==== Compared to MaskTools ====&lt;br /&gt;
Compared to [[MaskTools2|MaskTools2]] version 2.2.15, '''Expr''' has functionality similar to &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mt_lutspa&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
MaskTools2 is very slow for 10+ bit clips, when a [[wikipedia:Lookup_table|LUT]] (lookup table) cannot be used for memory size reasons, thus the expression is evaluated/interpreted at runtime for each pixel.&lt;br /&gt;
MaskTools2 (from v2.2.15) however is able to pass the expressions to this Avisynth+ 'Expr' filter with its 'use_expr' parameter, by passing the expression strings, and clamp_float and scale_inputs parameter.&lt;br /&gt;
&lt;br /&gt;
The [[wikipedia:Just-in-time_compilation|JIT compiler]] in '''Expr''' (adapted from [http://www.vapoursynth.com/doc/functions/expr.html VapourSynth]) turns the expression calculation into realtime assembly code which is much faster and basically bit depth independent.&lt;br /&gt;
&lt;br /&gt;
: In '''Expr''':&lt;br /&gt;
:* Up to 26 clips are allowed (x,y,z,a,b,...w). Masktools handles only up to 4 clips with its &amp;lt;tt&amp;gt;mt_lut&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxy&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyz&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;mt_lutxyza&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* Clips with different bit depths are allowed&lt;br /&gt;
:* Works with 32 bit floats instead of 64 bit double internally&lt;br /&gt;
:* Less functions (e.g. no bit shifts)&lt;br /&gt;
:* Logical 'false' is 0 instead of -1&lt;br /&gt;
:* The ymin, ymax, etc built-in constants can have a _X suffix, where X is the corresponding clip designator letter. E.g. cmax_z, range_half_x&lt;br /&gt;
:* mt_lutspa-like functionality is available through &amp;quot;sx&amp;quot;, &amp;quot;sy&amp;quot;, &amp;quot;sxr&amp;quot;, &amp;quot;syr&amp;quot; internal predefined variables&lt;br /&gt;
:* No y= u= v= parameters with negative values for filling plane with constant value, constant expressions are changed into optimized &amp;quot;fill&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
==== Examples ====  &lt;br /&gt;
Average three clips:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip1, clip2, clip3, &amp;quot;x y + z + 3 /&amp;quot;) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When input clips to have more planes than an implicitely specified output format:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
  Expr(aYV12Clip, &amp;quot;x 255.0 /&amp;quot;, format=&amp;quot;Y32&amp;quot;) # target is Y only which needs only Y plane from YV12&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format is specified:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|70|2}} &amp;gt;&lt;br /&gt;
  Expr(Y, &amp;quot;x&amp;quot;, &amp;quot;x 2.0 /&amp;quot;, &amp;quot;x 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
  Expr(Grey_r, Grey_g, Grey_b, &amp;quot;x&amp;quot;, &amp;quot;y 2.0 /&amp;quot;, &amp;quot;z 3.0 /&amp;quot;, format=&amp;quot;RGBPS&amp;quot;) # r, g and b expression uses Y plane&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using spatial feature:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
  c = Expr(clip_for_format, &amp;quot;sxr syr 1 sxr - 1 syr - * * * 4096 scaleb *&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mandelbrot zoomer (original code and idea from here: https://forum.doom9.org/showthread.php?p=1738391#post1738391 )&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|64|2}} &amp;gt;&lt;br /&gt;
 a=&amp;quot;X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ &amp;quot;&lt;br /&gt;
 b=a+a&lt;br /&gt;
 c=b+b&lt;br /&gt;
 blankclip(width=960,height=640,length=1600,pixel_type=&amp;quot;YUV420P8&amp;quot;)&lt;br /&gt;
 Expr(&amp;quot;sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 &amp;quot;&lt;br /&gt;
 \ + &amp;quot;- 1.01 frameno ^ / 0.4399695 + B@ Y^ &amp;quot;+c+c+c+c+c+b+a+&amp;quot;X dup * Y dup * + 4 &amp;lt; 0 255 ?&amp;quot;,&lt;br /&gt;
 \ &amp;quot;128&amp;quot;, &amp;quot;128&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For other ideas of spatial variables, see [http://avisynth.nl/index.php/MaskTools2/mt_lutspa MaskTools2:mt_lutspa]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Changes ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
{|border=1 cellspacing=1 cellpadding=4&lt;br /&gt;
|-&lt;br /&gt;
| r3.5&lt;br /&gt;
| allow &amp;quot;floatUV&amp;quot; for parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float_UV&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2724 (20180702)&lt;br /&gt;
| new three operand function: clip&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;clamp_float&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
new parameter &amp;quot;scale_inputs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| r2574 (20171219)&lt;br /&gt;
| new: Indexable source clip pixels by relative x,y positions like x[-1,1]&lt;br /&gt;
new functions: sin cos tan asin acos atan&lt;br /&gt;
&amp;lt;br&amp;gt;new operator: % (modulo)&lt;br /&gt;
&amp;lt;br&amp;gt;new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.&lt;br /&gt;
&amp;lt;br&amp;gt;new: predefined expr variables 'frameno', 'time', 'width', 'height'&lt;br /&gt;
&amp;lt;br&amp;gt;fix: jitasm code generation at specific circumstances&lt;br /&gt;
|-&lt;br /&gt;
| r2544 (20171115)&lt;br /&gt;
| optimization; fix ''scalef''&lt;br /&gt;
|-&lt;br /&gt;
| r2542 (20171114)&lt;br /&gt;
| first added&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_filters]]&lt;br /&gt;
[[Category:Layering]]&lt;br /&gt;
[[Category:Masking]]&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Internal_functions</id>
		<title>Internal functions</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Internal_functions"/>
				<updated>2021-12-09T10:04:20Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Property get */ propGet for Clip value type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:64em&amp;quot; &amp;gt;&lt;br /&gt;
In addition to [[Internal_filters|internal filters]] AviSynth has a fairly large number of other (non-clip) internal functions. &lt;br /&gt;
&lt;br /&gt;
The input or/and output of these functions are not clips, but some other variables which can be used in a script. &lt;br /&gt;
{| style=&amp;quot;max-width:56em&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:1.0em;padding:2px 8px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid #aaa; background-color:#f9f9f9; padding:5px; font-size:95%; width:20em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin=auto;text-align:center&amp;quot;&amp;gt;'''Short Contents:'''&amp;lt;/div&amp;gt;&lt;br /&gt;
# [[#Boolean_functions|Boolean functions]]&lt;br /&gt;
# [[#Control_functions|Control functions]]&lt;br /&gt;
# [[#Global_options|Global options]]&lt;br /&gt;
# [[#Conversion_functions|Conversion functions]]&lt;br /&gt;
# [[#Numeric_functions|Numeric functions]]&lt;br /&gt;
# [[#Trigonometry_functions|Trigonometry functions]]&lt;br /&gt;
# [[#Bit_functions|Bit functions]]&lt;br /&gt;
# [[#Runtime_functions|Runtime functions]]&lt;br /&gt;
# [[#Functions_for_frame_properties|Functions for frame properties]]&lt;br /&gt;
# [[#Script_functions|Script functions]]&lt;br /&gt;
# [[#String_functions|String functions]]&lt;br /&gt;
# [[#Version_functions|Version functions]]&lt;br /&gt;
# [[#Other_helper_functions|Other helper functions]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;line-height:50%;margin:0;padding:0&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;width:4em;&amp;quot; |&amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right;clear:right;margin:1.0em;padding:2px 8px;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boolean functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These return true or false, if the condition that they test holds or not, respectively.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsBool||IsBool(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the bool type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 b = false&lt;br /&gt;
 IsBool(b) = true&lt;br /&gt;
 IsBool(1 &amp;lt; 2 &amp;amp;&amp;amp; 0 == 1) = true&lt;br /&gt;
 IsBool(123) = false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsClip||IsClip(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the clip type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
&lt;br /&gt;
 c = [[AviSource]](...)&lt;br /&gt;
 IsClip(c) = true&lt;br /&gt;
 IsClip(&amp;quot;c&amp;quot;) = false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsFloat||IsFloat(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the float type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 f = [[Internal_functions/Numeric_functions|Sqrt]](2)&lt;br /&gt;
 IsFloat(f) = true&lt;br /&gt;
 IsFloat(true) = false&lt;br /&gt;
 IsFloat(&amp;quot;42.&amp;quot;) = false&lt;br /&gt;
 IsFloat(2) = true   # ''ints are considered to be floats by this function''&lt;br /&gt;
 IsReallyFloat(2) = false # see below&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: As a workaround for the issue noted above, you may use the following [[User_functions|user function]]:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|46|3}} &amp;gt;&lt;br /&gt;
 ## return true for floats only&lt;br /&gt;
 function IsReallyFloat(val v)&lt;br /&gt;
 {&lt;br /&gt;
     return (IsInt(v)==false) &amp;amp;&amp;amp; IsFloat(v)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsInt||IsInt(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the int type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 IsInt(2) = true&lt;br /&gt;
 IsInt(2.1) = false&lt;br /&gt;
 IsInt(true) = false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsString||IsString(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the string type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 IsString(&amp;quot;test&amp;quot;) = true&lt;br /&gt;
 IsString(2.3) = false&lt;br /&gt;
 IsString([[Internal_functions/Conversion_functions|String]](2.3)) = true&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Exist||Exist(filename)}}&lt;br /&gt;
: Tests if the file specified by {{FuncArg|filename}} exists.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 filename = ...&lt;br /&gt;
 clp = Exist(filename) &lt;br /&gt;
 \ ? [[AviSource]](filename) &lt;br /&gt;
 \ : [[Internal_functions/Control_functions|Assert]](false, &amp;quot;file: &amp;quot; + filename + &amp;quot; does not exist&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Defined||Defined(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is defined. Can be used inside [[Script_functions]] to test if an optional argument has been given an explicit value.&lt;br /&gt;
: More formally, the function returns false if its argument (normally a function argument or variable) has the void ('undefined') type, otherwise it returns true.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 b_arg_supplied = Defined(arg)&lt;br /&gt;
 myvar = b_arg_supplied ? ... : ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|FunctionExists|{{AvsPluscon}}|FunctionExists(name)}}&lt;br /&gt;
: Tests if the function or filter name is defined in the script.&lt;br /&gt;
: {{FuncArg|name}} can be any string &amp;amp;ndash; it does not need to be a [[Script_variables#Variable_Names|legal name]].&lt;br /&gt;
: ''Example'' &amp;amp;ndash; see [[#Apply|Apply]] below&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|InternalFunctionExists|{{AvsPluscon}}|InternalFunctionExists(name)}}&lt;br /&gt;
: Tests if the function, filter or [[Clip_properties|property]] name is defined natively within [[AviSynth+]].&lt;br /&gt;
:* Unlike [[#FunctionExists|FunctionExists]], returns ''false'' for [[Plugins|external plugins]] and [[User_functions|user-defined functions]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|VarExist|{{AvsPluscon}}|VarExist(name)}}&lt;br /&gt;
: Tests if the variable exists or not. Note: if variable exists, it returns true regardless of the &amp;quot;defined&amp;quot; state of the variable&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Control functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These facilitate flow of control (loading of scripts, arguments checks, global settings adjustment, etc.).&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Apply||Apply(string ''func_string'' [, arg1 [, arg2 [, ... [, arg''n'']]]] )}}&lt;br /&gt;
: Calls the function or filter {{FuncArg|func_string}} with arguments {{FuncArg|arg1}}, {{FuncArg|arg2}}, ..., {{FuncArg|arg''n''}} (as many as supplied). &lt;br /&gt;
:* This provides a way to call a function or filter '''by name''', with arguments.&lt;br /&gt;
:* &amp;lt;code&amp;gt;Apply(&amp;quot;f&amp;quot;, x)&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;Apply(&amp;quot;f&amp;quot;, x)&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code&amp;gt;[[#Eval|Eval]](&amp;quot;f(&amp;quot; + String(x) + &amp;quot;)&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Note that the clip argument must be supplied explicitly - the [[Last|special variable ''Last'']] is not used.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Building an expression dynamically  &lt;br /&gt;
 new_width = 352&lt;br /&gt;
 new_height = 288&lt;br /&gt;
 &lt;br /&gt;
 Apply(&amp;quot;[[BicubicResize]]&amp;quot;, Last, new_width, new_height)&lt;br /&gt;
 # Note that the clip argument must be supplied - 'Last' is not implicitly assumed&lt;br /&gt;
 &lt;br /&gt;
 ## the same action, using [[#Eval|Eval]]&lt;br /&gt;
 Eval( &amp;quot;BicubicResize(&amp;quot; + String(new_width) + &amp;quot;,&amp;quot; + String(new_height) + &amp;quot;)&amp;quot; )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## using a filter only if it exists (AviSynth 2.6)&lt;br /&gt;
 function MyFilter(clip C, string s) { &lt;br /&gt;
     return C.[[Subtitle]](&amp;quot;MyFilter: &amp;quot;+s, align=5)&lt;br /&gt;
 }&lt;br /&gt;
 ColorBars &lt;br /&gt;
 [[Control_structures|try]] {&lt;br /&gt;
     Apply(&amp;quot;MyFilter&amp;quot;, Last, &amp;quot;TEST&amp;quot;)&lt;br /&gt;
 } catch (err_msg) {&lt;br /&gt;
     # (ignore)&lt;br /&gt;
 }&lt;br /&gt;
 return Last&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## using a filter only if it exists ([[AviSynth+|AVS+]] only)&lt;br /&gt;
 ColorBars  &lt;br /&gt;
 return [[#FunctionExists|FunctionExists]](&amp;quot;MyFilter&amp;quot;) &lt;br /&gt;
 \ ? Apply(&amp;quot;MyFilter&amp;quot;, Last, &amp;quot;TEST&amp;quot;) &lt;br /&gt;
 \ : Last &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Eval||Eval(expression [, string ''name''])}}&lt;br /&gt;
: Evaluates an arbitrary {{FuncArg|expression}} and returns the result of that evaluation. '''It works exactly like [[#Import|Import]] below''', except&lt;br /&gt;
:* The expression to be evaluated comes from a string instead of a file; &lt;br /&gt;
:* The [[#Script_functions|values of]] ''ScriptName'', ''ScriptFile'' and ''ScriptDir'' are not changed;&lt;br /&gt;
:* The current working directory ([[wikipedia:Working_directory|CWD]]) is not changed.&lt;br /&gt;
: Argument {{FuncArg|name}} will be shown in the error message beside the script name. Both will be followed with the line number in {{FuncArg|expression}} where the error occurred.&lt;br /&gt;
&lt;br /&gt;
: Variables in your calling script are available within {{FuncArg|expression}}; [[Global|global variables]] are not required.&lt;br /&gt;
: Note '''Eval''' can return the result of ''any'' valid expression; usually a clip, but also a string, boolean etc.&lt;br /&gt;
: You can use '''Eval''' to construct and evaluate expressions dynamically inside your scripts, based on variable input data.&lt;br /&gt;
: '''Eval''' is useful as a [[Control_structures|control structure]] for creating multi-line ''block statements'' without requiring [[AviSynth%2B|AviSynth+]].&lt;br /&gt;
: '''Eval''' can be used to put aside the need to install external plugins if they are not actually used.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Building an expression dynamically &lt;br /&gt;
 ## calls [[BicubicResize]](last, 352, 288)&lt;br /&gt;
 settings = &amp;quot;352, 288&amp;quot;&lt;br /&gt;
 Eval( &amp;quot;BicubicResize(&amp;quot; + settings + &amp;quot;)&amp;quot; )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## if...else [[Control_structures|control structure]]&lt;br /&gt;
 option = true&lt;br /&gt;
 option  &lt;br /&gt;
 \ ? '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     [[Levels]](0, 1.2, 255, 20, 235)&lt;br /&gt;
     [[Spline36Resize]](720, 400)&lt;br /&gt;
     [[Sharpen]](0.2)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;) &lt;br /&gt;
 \ : '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     [[BicubicResize]](720, 400)&lt;br /&gt;
     [[Sharpen]](0.3)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## using a filter only if it is needed; &lt;br /&gt;
 ## in this example, [[SMDegrain]] only needs to be installed if the option is ''true''.&lt;br /&gt;
 option = false&lt;br /&gt;
 option &lt;br /&gt;
 \ ? '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     SMDegrain(tr=2, thSAD=250, contrasharp=true, refinemotion=true, lsb=true)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 \ : Last &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## accessing script variables&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=[[Subtitle]](&amp;quot;A&amp;quot;, align=5)&lt;br /&gt;
 '''Eval'''(&amp;quot;A&amp;quot;)&lt;br /&gt;
 return Last ## returns clip 'A'&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## setting script variables&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=Subtitle(&amp;quot;A&amp;quot;, align=5)&lt;br /&gt;
 '''Eval'''(&amp;quot;B = A.Invert&amp;quot;)&lt;br /&gt;
 return B ## returns clip 'A' with colors inverted&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Increment a global variable, based on a local variable&lt;br /&gt;
 Eval(&amp;quot;global my_counter = my_counter + &amp;quot; + [[#String|String]](increment)) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## multi-line example with comment and line continuation&lt;br /&gt;
 '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 [[ColorBars]]&lt;br /&gt;
 [[BicubicResize]](352, 288)&lt;br /&gt;
 #FlipVertical&lt;br /&gt;
 Subtitle(&lt;br /&gt;
 \   &amp;quot;Width  = &amp;quot;  + [[#String|String]]([[Clip_properties|Width]]) + &amp;quot;\n&amp;quot;&lt;br /&gt;
 \ + &amp;quot;Height = &amp;quot; + String(Height)&lt;br /&gt;
 \ , align=7, lsp=0)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Empty expression &lt;br /&gt;
 ## results in error: 'Defined(u) == false'&lt;br /&gt;
 u = Eval(&amp;quot;#&amp;quot;)   &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Error reporting&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=Subtitle(&amp;quot;A&amp;quot;, size=Height, align=2)&lt;br /&gt;
 Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 A&lt;br /&gt;
 foo(&amp;quot;bar&amp;quot;) ## ERROR!&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;, '''&amp;quot;eval_test_1&amp;quot;''') ## name for error reporting purposes&lt;br /&gt;
 return Last&lt;br /&gt;
 &lt;br /&gt;
 ''results in the error message:''&lt;br /&gt;
 Script error: there is no function named &amp;quot;foo&amp;quot;&lt;br /&gt;
 '''(eval_test_1, line 3)'''&lt;br /&gt;
 (E:\_test.avs, line 6)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Import||Import(filename)}}&lt;br /&gt;
{{ScriptFunctionCode|Import||Import(filename [, ...] [, bool utf8])}} {{AvsPluscon}}&lt;br /&gt;
: Evaluates the contents of another script and returns the result of that evaluation. '''It works exactly like [[#Eval|Eval]] above''', except&lt;br /&gt;
:* The expression to be evaluated comes from a file instead of a string; &lt;br /&gt;
:* The [[#Script_functions|values of]] ''ScriptName'', ''ScriptFile'' and ''ScriptDir'' are set to the current (imported) script;&lt;br /&gt;
:* The current working directory ([[wikipedia:Working_directory|CWD]]) is [[Internal_functions#SetWorkingDir|set]] to the current (imported) script.&lt;br /&gt;
:* {{FuncArg|utf8}} {{AvsPluscon}} if true, assumes filename(s) are [[wikipedia:UTF-8|UTF8]], else (default), assume ANSI.&lt;br /&gt;
&lt;br /&gt;
:[[Script_functions|Functions]], [[Script_variables|variables]] and loaded plugins declared inside the imported script are made available to the parent script. &amp;lt;b&amp;gt;Import&amp;lt;/b&amp;gt;'s return value  can be assigned to a variable of the parent script; this is most useful when the imported script ends with a clip.&lt;br /&gt;
&lt;br /&gt;
: Typically '''Import''' is used to make library functions available to the parent script, and the return value is not used. However this is simply a convention; it is not enforced by the [[AviSynth Syntax]]. Some indicative uses of '''Import''' include:&lt;br /&gt;
:* Storing multiple script-functions, variables and global variables for reuse by scripts (creation of script libraries).&lt;br /&gt;
:* Retrieving pre-built streams.&lt;br /&gt;
:* Retrieving dynamically configured pre-built streams (the core idea is that the importing script declares some global variables which the imported script uses to configure the stream that will return).&lt;br /&gt;
:'''Note 1''': Since the contents of the imported script are evaluated at the point of invocation, it is possible by enclosing the '''Import''' call in a nested scope (for example inside a function) to make available to the importing script the functions and globals of the imported script ''without'' its script-level variables.&lt;br /&gt;
:'''Note 2''': Any script with the [[AVSI]] extension in the AviSynth Plugins folder is automatically imported. This is useful for making script functions available to any new script you create without having to copy and paste.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # ''B.avsi''&lt;br /&gt;
 A.Invert&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=Subtitle(&amp;quot;A&amp;quot;, align=5) ## create clip 'A'&lt;br /&gt;
 Import(&amp;quot;B.avsi&amp;quot;)&lt;br /&gt;
 return Last ## returns clip 'A' with colors inverted&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## here we do not care about the return value (''mylib.avsi'' contains only functions)&lt;br /&gt;
 Import(&amp;quot;mylib.avsi&amp;quot;)  &lt;br /&gt;
 ...&lt;br /&gt;
 ## ''mysources.avsi'' loads predetermined file names from a folder into globals&lt;br /&gt;
 okflag = Import(&amp;quot;mysources.avsi&amp;quot;)  &lt;br /&gt;
 source = okflag ? global1 + global2 + global3 : [[BlankClip]]()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Select||Select(index, item0 [, item1 [, ...[, itemn]]])}}&lt;br /&gt;
: Returns the item selected by the {{FuncArg|index}} argument, which must be of int type (0 returns {{FuncArg|item0}}, 1 returns {{FuncArg|item1}}, ..., etc). Items can be any script [[Script_variables|variable]] or expression of any type and can even be mixed.&lt;br /&gt;
&lt;br /&gt;
:If {{FuncArg|index}} is out of range, an error is raised.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # select a clip-brush from a set of presets&lt;br /&gt;
 idx = 2&lt;br /&gt;
 brush = Select(idx, [[AviSource]](&amp;quot;round.avi&amp;quot;), &lt;br /&gt;
 \        rectangle, diagonal, diagonal.[[FlipHorizontal]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note - all branches are evaluated:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 index=1&lt;br /&gt;
 Select(index, &amp;quot;zero&amp;quot;, &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &lt;br /&gt;
 \        Assert(false, &amp;quot;Select evaluates all branches&amp;quot;)) &lt;br /&gt;
 ## NOTE this code does not run - it throws [[#Assert|Assert]] error&lt;br /&gt;
 ## because Select evaluates all branches&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is not desired, use the [[Ternary_operator|conditional execution]] operator: &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 index=1&lt;br /&gt;
 x = (index==0) ? &amp;quot;zero&amp;quot;&lt;br /&gt;
 \ : (index==1) ? &amp;quot;one&amp;quot;&lt;br /&gt;
 \ : (index==2) ? &amp;quot;two&amp;quot;&lt;br /&gt;
 \ : Assert(false, &amp;quot;index out of range&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Default||Default(x, d)}}&lt;br /&gt;
: Returns {{FuncArg|x}} if '''Defined'''(x) is true, {{FuncArg|d}} otherwise. {{FuncArg|x}} must either be a function's argument or an already declared script variable (ie a variable which has been assigned a value) else an error will occur.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 function myfunc(clip c, ..., int &amp;quot;strength&amp;quot;) {&lt;br /&gt;
     ...&lt;br /&gt;
     strength = Default(strength, 4) # if not supplied make it 4&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Assert||Assert(condition [, err_msg])}}&lt;br /&gt;
: Does nothing if {{FuncArg|condition}} is true; throws an error, immediately terminating script execution, if {{FuncArg|condition}} is false. In the later case {{FuncArg|err_msg}}, if supplied, is presented to the user through a dialog box; else the standard message &amp;quot;Assert: assertion failed&amp;quot; shows up.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 function myfunc(clip c, ..., int &amp;quot;strength&amp;quot;) {&lt;br /&gt;
     ...&lt;br /&gt;
     strength = Default(strength, 4) # if not supplied make it 4&lt;br /&gt;
     Assert(strength &amp;gt; 0, &amp;quot;'strength' must be positive&amp;quot;)&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|NOP||NOP()}}&lt;br /&gt;
: This is a no-operation function provided mainly for conditional execution with non-return value items such as [[Import]], when no &amp;quot;else&amp;quot; condition is desired. That is, use it whenever the [[AviSynth Syntax]] requires an operation (such as with the ?: [[Operators#For_Booleans|operator]]) but your script does not need one.&lt;br /&gt;
: Return value: 0 (int type).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 preset = want_presets ? [[AviSource]](&amp;quot;c:\presets\any.avi&amp;quot;) : NOP&lt;br /&gt;
 ... &lt;br /&gt;
 loadlib ? [[Import]](&amp;quot;my_useful_functions.avs&amp;quot;) : NOP&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Undefined|v2.60|Undefined()}}&lt;br /&gt;
: Returns the undefined state.&lt;br /&gt;
: It's the state for which '''Defined'''() returns false.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 x = Undefined()&lt;br /&gt;
 Defined(x) # == false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global Options ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{{ScriptFunctionH5|SetMemoryMax||SetMemoryMax(amount)}}&lt;br /&gt;
: Sets the maximum memory that AviSynth uses (in MB) to the value of {{FuncArg|amount}}. Setting to zero just returns the current Memory Max value. In the 2.5 series the default Memory Max value is 25% of the free physical memory, with a minimum of 16MB.&lt;br /&gt;
: The default Memory Max is also limited to 512MB.&lt;br /&gt;
: {{AvsPluscon}}In Avisynth+ this limit for default Memory Max is 1024MB for 32 bits and 4096MB on the x64 version&lt;br /&gt;
: DefaultMemoryMax = minimum(physical_memory / 4, secondary_memory_max_limit)&lt;br /&gt;
: for classic Avisynth see the table below&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; &amp;lt;!-- width=50% --&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | Free memory&lt;br /&gt;
 | &amp;lt;64&lt;br /&gt;
 | 128&lt;br /&gt;
 | 256&lt;br /&gt;
 | 512&lt;br /&gt;
 | 1024&lt;br /&gt;
 | 2048&lt;br /&gt;
 | 3072&lt;br /&gt;
 |-&lt;br /&gt;
 | Default Max&lt;br /&gt;
 | 16&lt;br /&gt;
 | 32&lt;br /&gt;
 | 64&lt;br /&gt;
 | 192&lt;br /&gt;
 | 448&lt;br /&gt;
 | 512&lt;br /&gt;
 | 512&lt;br /&gt;
 |}&lt;br /&gt;
: In some versions there is a default setting of 5MB, which is quite low. If you encounter problems (e.g. low speed) try to set this values to at least 32MB. Too high values can result in crashes because of 2GB address space limit.&lt;br /&gt;
: Return value: Actual MemoryMax value set.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SetMemoryMax(128)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:{{AvsPluscon}}{{FuncDef|SetMemoryMax(int, int “type”, int “index”)}}&lt;br /&gt;
:With additional arguments for devices such as GPUs. Memory usage is managed individually for devices such as GPUs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2||int|}}&lt;br /&gt;
:::Device (including CPU) memory limit (MB)&lt;br /&gt;
::{{Par2|type|int|}}&lt;br /&gt;
:::Device type. The following values ​​are available:&lt;br /&gt;
::::DEV_TYPE_CPU: CPU (default)&lt;br /&gt;
::::DEV_TYPE_CUDA: GPU&lt;br /&gt;
::{{Par2|index|int|}}&lt;br /&gt;
:::Device number. Same as onCUDA device_index. Only 0 for DEV_TYPE_CPU.&lt;br /&gt;
:::Default value: 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{{ScriptFunctionH5|SetCacheMode||SetCacheMode(mode)}}&lt;br /&gt;
:{{AvsPluscon}}Fine tunes the internal frame caching strategy in AviSynth+.&lt;br /&gt;
: Available values:&lt;br /&gt;
::* 0 or CACHE_FAST_START start up time and size balanced mode (default)&lt;br /&gt;
::* 1 or CACHE_OPTIMAL_SIZE slow start up but optimal speed and cache size&lt;br /&gt;
::&lt;br /&gt;
* since Avisynth+ 3.6.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{{ScriptFunctionH5|SetMaxCPU||SetMaxCPU([string feature1, string feature2, ...])}}&lt;br /&gt;
: {{AvsPluscon}}Limits the CPU capabilities which AviSynth reports to its core and external plugins through GetCPUFlags.&lt;br /&gt;
: Available values:&lt;br /&gt;
::* &amp;quot;&amp;quot; or &amp;quot;none&amp;quot; for zero SIMD support, no processor flags are reported&lt;br /&gt;
::* &amp;quot;mmx&amp;quot;, &amp;quot;sse&amp;quot;, &amp;quot;sse2&amp;quot;, &amp;quot;sse3&amp;quot;, &amp;quot;ssse3&amp;quot;, &amp;quot;sse4&amp;quot; or &amp;quot;sse4.1&amp;quot;, &amp;quot;sse4.2&amp;quot;, &amp;quot;avx, &amp;quot;avx2&amp;quot;&lt;br /&gt;
:: &lt;br /&gt;
::Parameters are case insensitive.&lt;br /&gt;
::Note: &amp;quot;avx2&amp;quot; triggers FMA3 flag as well.&lt;br /&gt;
::&lt;br /&gt;
::*Processor options w/o any modifier will limit the CPU flag report to at most the processor level.&lt;br /&gt;
::*When &amp;quot;feature&amp;quot; is ended by '+', relevant processor feature flag will be switched on&lt;br /&gt;
::*When &amp;quot;feature&amp;quot; is ended by '-', relevant processor feature flag will be removed.&lt;br /&gt;
::Multiple options can be put in a comma separated list. They will evaluate in that order.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|60|2}} &amp;gt;&lt;br /&gt;
 SetMaxCPU(&amp;quot;SSE2&amp;quot;) #reports at most SSE2 processor (even if AVX2 is available)&lt;br /&gt;
 SetMaxCPU(&amp;quot;avx,sse4.1-&amp;quot;) #limits to avx2 but explicitely removes reporting sse4.1 support&lt;br /&gt;
 SetMaxCPU(&amp;quot;none,avx2+&amp;quot;) #limits to plain C, then switches on AVX2-only support&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* since Avisynth+ 3.6&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|SetWorkingDir||SetWorkingDir(path)}}&lt;br /&gt;
: Sets the default directory for AviSynth to the {{FuncArg|path}} argument.&lt;br /&gt;
: This is primarily for easy loading of source clips, [[Import|importing]] scripts, etc. It does not affect plugins' autoloading. &lt;br /&gt;
: Return value is 0 if successful, -1 otherwise.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SetWorkingDir(&amp;quot;c:\my_presets&amp;quot;)&lt;br /&gt;
 [[AviSource]](&amp;quot;border_mask.avi&amp;quot;)  # this loads c:\my_presets\border_mask.avi&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|SetPlanarLegacyAlignment||SetPlanarLegacyAlignment(mode)}}&lt;br /&gt;
: Set alignment mode for [[planar]] frames. {{FuncArg|mode}} can either be true or false.&lt;br /&gt;
: Some older [[External_plugins|plugins]] illegally assume the layout of video frames in memory. This special filter forces the memory layout of planar frames to be compatible with prior versions of AviSynth. The filter works on the [[The_script_execution_model/Evaluation_of_runtime_scripts|GetFrame]]() call stack, so it effects filters '''before''' it in the script.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Example : Using an older version of Mpeg2Source() (1.10 or older):&lt;br /&gt;
 &lt;br /&gt;
 LoadPlugin(&amp;quot;...\Mpeg2Decode.dll&amp;quot;)&lt;br /&gt;
 Mpeg2Source(&amp;quot;test.d2v&amp;quot;)         # A plugin that illegally assumes the layout of memory&lt;br /&gt;
 SetPlanarLegacyAlignment(true)  # Set legacy memory alignment for prior statements&lt;br /&gt;
 [[Convert|ConvertToYUY2]]()     # Statements through to the end of the script have&lt;br /&gt;
 ...                             # advanced memory alignment.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_AllowFloatAudio||global OPT_AllowFloatAudio &amp;amp;#61; true ## default false}}&lt;br /&gt;
: [[Float]] audio is converted to 16 bit when [[Frameserver|frameserving]] through [[ACM]], unless [[Internal_functions#OPT_AllowFloatAudio|OPT_AllowFloatAudio]] is set to true (this option enables WAVE_FORMAT_IEEE_FLOAT audio output&amp;lt;sup&amp;gt;[http://forum.doom9.org/showthread.php?t=109608]&amp;lt;/sup&amp;gt;). In that case the audio is kept as it is. When accessing AviSynth directly (like MeGUI, BeHappy or ffmpeg do for example), there is no automatic conversion.&lt;br /&gt;
&lt;br /&gt;
:The automatic conversion is done for clients that cannot handle [[Float]] audio (in the old days most of them couldn't). Note conversion takes place ''after'' the script processing is finished. [[Float]] audio is always allowed within the script.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_UseWaveExtensible||global OPT_UseWaveExtensible &amp;amp;#61; true ## default false}}&lt;br /&gt;
: This option enables WAVE_FORMAT_EXTENSIBLE audio output. The default is WAVE_FORMAT_EX.&lt;br /&gt;
: '''Note:''' The default DirectShow component for .AVS files, &amp;quot;AVI/WAV File Source&amp;quot;, does not correctly implement WAVE_FORMAT_EXTENSIBLE processing, so many application may not be able to detect the audio track. There are third party DirectShow readers that do work correctly. Intermediate work files written using the AVIFile interface for later DirectShow processing will work correctly if they use the DirectShow &amp;quot;File Source (async)&amp;quot; component or equivalent. &lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_dwChannelMask|v2.60|global OPT_dwChannelMask(int v)}}&lt;br /&gt;
: This option enables you to set ChannelMask. It overrides WAVEFORMATEXTENSIBLE.dwChannelMask&amp;lt;sup&amp;gt;[[http://wiki.multimedia.cx/index.php?title=WAVEFORMATEXTENSIBLE]&amp;lt;/sup&amp;gt; which is set according to this table&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 0x00004, // 1   -- -- Cf&lt;br /&gt;
 0x00003, // 2   Lf Rf&lt;br /&gt;
 0x00007, // 3   Lf Rf Cf&lt;br /&gt;
 0x00033, // 4   Lf Rf -- -- Lr Rr&lt;br /&gt;
 0x00037, // 5   Lf Rf Cf -- Lr Rr&lt;br /&gt;
 0x0003F, // 5.1 Lf Rf Cf Sw Lr Rr&lt;br /&gt;
 0x0013F, // 6.1 Lf Rf Cf Sw Lr Rr -- -- Cr&lt;br /&gt;
 0x0063F, // 7.1 Lf Rf Cf Sw Lr Rr -- -- -- Ls Rs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_AVIPadScanlines|v2.60|global OPT_AVIPadScanlines &amp;amp;#61; true ## default false}}&lt;br /&gt;
: This option enables DWORD aligned planar padding. Default is packed aligned planar padding. See [[AVIFile output emulation|memory alignment used in the AVIFile output emulation]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_VDubPlanarHack|v2.60|global OPT_VDubPlanarHack &amp;amp;#61; true ## default false}}&lt;br /&gt;
: This option enables flipped YV24 and YV16 chroma planes. This is an hack for early versions of Virtualdub with YV24/YV16 support. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_V210|{{AvsPluscon}}|global OPT_Enable_V210 &amp;amp;#61; true ## default false}}&lt;br /&gt;
: For 10bit YUV422, [[Frameserver|Frameserve]] interleaved V210 instead of planar P210. (VfW)&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
{{BoldColor|black|100|§}} ''VfW'' here means [[wikipedia:Video_for_Windows|Video For Windows]] clients such as VirtualDub are affected, but not other clients such as ffmpeg.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_Y3_10_10|{{AvsPluscon}}|global OPT_Enable_Y3_10_10 &amp;amp;#61; true ## default false}}&lt;br /&gt;
: For 10bit YUV422, set the [[FourCC]] to Y3[10][10] ('Y', '3', 10, 10) instead of P210  ('P', '2', '1', '0'). (VfW) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_Y3_10_16|{{AvsPluscon}}|global OPT_Enable_Y3_10_16 &amp;amp;#61; true ## default false}}&lt;br /&gt;
: For 16bit YUV422, use Y3[10][16] instead of P216 (VfW)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_b64a|{{AvsPluscon}}|global OPT_Enable_b64a &amp;amp;#61; true ## default false}}&lt;br /&gt;
: Use b64a instead of BRA[64] (VfW)&lt;br /&gt;
: works for avs+ version above r2636&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_PlanarToPackedRGB|{{AvsPluscon}}|global OPT_Enable_PlanarToPackedRGB &amp;amp;#61; true ## default false}}&lt;br /&gt;
: Convert Planar RGB to packed RGB (VfW)&lt;br /&gt;
: Planar RGB 8, 10, 12, 14 and 16 bits are reported as G3[0][8], G3[0][10], G3[0][12], G3[0][14] and G3[0][16]&lt;br /&gt;
: Planar RGBA 8, 10, 12, 14 and 16 bits are reported as G4[0][8], G4[0][10], G4[0][12], G4[0][14] and G4[0][16]&lt;br /&gt;
: When these [[FourCC]] codes are not handled through VfW, use OPT_Enable_PlanarToPackedRGB=true.&lt;br /&gt;
: Avisynth+ will convert the clip from planar to RGB64 (packed 16bit RGB) and will negotiate this format instead&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conversion functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These convert between different types.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Value||Value(string)}}&lt;br /&gt;
: Converts a decimal string to its associated numeric value.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Value (&amp;quot;-2.7&amp;quot;) = -2.7&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|HexValue||HexValue(string)}}&lt;br /&gt;
{{ScriptFunctionCode|HexValue||HexValue(string [, int pos])}} {{AvsPluscon}}&lt;br /&gt;
: Converts a hexadecimal string to its associated numeric value. &lt;br /&gt;
:* {{FuncArg|pos}} sets the starting point of the numeric parser. All characters to the left of {{FuncArg|pos}} are ignored. Default is 1 (start of string).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 HexValue (&amp;quot;FF00&amp;quot;) = 65280&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Hex|v2.60|Hex(int)}}&lt;br /&gt;
{{ScriptFunctionCode|Hex||Hex(int [, int width])}} {{AvsPluscon}}&lt;br /&gt;
: Converts a numerical value to its hexadecimal value. See [[Colors]] for more information on specifying colors.&lt;br /&gt;
:* {{FuncArg|width}} sets the minimum width of the returned string. &lt;br /&gt;
::Resulting string will be left-padded with zeroes as needed. Allowed range is 0..8; default is 0.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Hex (10824234) = &amp;quot;A52A2A&amp;quot;&lt;br /&gt;
 Hex (15 width=2) = &amp;quot;0F&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|String||String(var [, string format_string])}}&lt;br /&gt;
: Converts a variable to a string. ''String'' arguments are passed along unchanged; ''bools'' are converted to &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;; numbers are formatted as described below; other [[Script_variables#Variable_Types|variable types]] (''clip'', ''val'') are converted to the empty string. &lt;br /&gt;
:The syntax of {{FuncArg|format_string}} is as follows:&lt;br /&gt;
::&amp;lt;code&amp;gt;'''%'''[flags][width][.precision]'''f'''&amp;lt;/code&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;i&amp;gt;the leading &amp;lt;/i&amp;gt;'&amp;lt;tt&amp;gt;%&amp;lt;/tt&amp;gt;'&amp;lt;i&amp;gt; and trailing &amp;lt;/i&amp;gt;'&amp;lt;tt&amp;gt;f&amp;lt;/tt&amp;gt;'&amp;lt;i&amp;gt; are required.&amp;lt;/i&amp;gt;&lt;br /&gt;
:The parts of {{FuncArg|format_string}} are:&lt;br /&gt;
:; ''flags'' &lt;br /&gt;
::{| class=wikitable&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&lt;br /&gt;
|left align (right align by default)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;&lt;br /&gt;
|always print the +/- sign (show only '&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;' by default)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;&lt;br /&gt;
|pad (see ''width'') with leading zeroes (pad with spaces by default)&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;amp;nbsp;'&amp;lt;tt&amp;gt; &amp;lt;/tt&amp;gt;'&amp;amp;nbsp;&lt;br /&gt;
|print a blank instead of a '&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;'&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt;&lt;br /&gt;
|always print the decimal point (dropped by default if there are no decimal digits)&amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
:; ''width''&lt;br /&gt;
:: the minimum width (the string is never truncated if it is wider than ''width'')&lt;br /&gt;
:; ''precision''&lt;br /&gt;
:: the number of decimal digits&lt;br /&gt;
: You can also put arbitrary text around {{FuncArg|format_string}}, similar to the C-language [http://www.tutorialspoint.com/c_standard_library/c_function_sprintf.htm sprintf] function.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
 Subtitle( String(1.23) )                    # '1.230000' (six decimals by default for floats)&lt;br /&gt;
 Subtitle( String(123) )                     # '123'      (no decimals by default for ints)&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%0.2f&amp;quot; ))           # '1.23'&lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%0.1f&amp;quot; ))           # '1.2'&lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%5.1f&amp;quot;) )           # '  1.2'    (padded to 5 characters wide)&lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%1.3f&amp;quot;) )           # '1.230'    (3 decimals; add trailing zeroes)&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(123, &amp;quot;%0.0f&amp;quot;) )            # '123'      (no decimals for precision=0)&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%''#''0.0f&amp;quot;) )           # '123.'     ('#' flag: always show decimal point)&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%0.2f&amp;quot;) )            # '123.00'   (2 decimals: add trailing zeroes)&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%5.0f&amp;quot;) )            # '  123'    (padded to 5 characters wide using ' ')&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%05.0f&amp;quot;) )           # '00123'    (padded to 5 characters wide using '0')&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%0.0f&amp;quot;) )          # 'PI=3'     (text around format_string)&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%''#''0.0f&amp;quot;) )         # 'PI=3.'    ('#' flag: always show decimal point)&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%2.0f&amp;quot;) )          # 'PI= 3'&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%3.2f&amp;quot;) )          # 'PI=3.14'&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%0.5f&amp;quot;) )          # 'PI=3.14159'&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%6.3f&amp;quot;) )          # 'PI= 3.142'&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(32, &amp;quot;%0.0f&amp;quot;) )             # '32'&lt;br /&gt;
 Subtitle( String(32, &amp;quot;%3.0f&amp;quot;) )             # ' 32'&lt;br /&gt;
 Subtitle( String(32, &amp;quot;%8.0f&amp;quot;) )             # '      32'&lt;br /&gt;
 &lt;br /&gt;
 ## arbitrary text around format_string:&lt;br /&gt;
 Subtitle( String(Last.Height, &amp;quot;Clip height is %0.0f&amp;quot;) ) # 'Clip height is 480'&lt;br /&gt;
 ## same output as above but using string concatenation:&lt;br /&gt;
 Subtitle( &amp;quot;Clip height is &amp;quot; + String(Last.Height) )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Numeric functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide common mathematical operations on numeric variables.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Max||Max(float, float [, ...])}}&lt;br /&gt;
: Returns the maximum value of a set of numbers.&lt;br /&gt;
: If all the values are of type Int, the result is an Int. If any of the values are of type Float, the result is a Float.&lt;br /&gt;
: This may cause an unexpected result when an Int value greater than 16777216 is mixed with Float values.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Max (1, 2) = 2&lt;br /&gt;
 Max (5, 3.0, 2) = 5.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Min||Min(float, float [, ...])}}&lt;br /&gt;
: Returns the minimum value of a set of numbers.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Min (1, 2) = 1&lt;br /&gt;
 Min (5, 3.0, 2) = 2.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|MulDiv||MulDiv(int, int, int)}}&lt;br /&gt;
: Multiplies two ints (m, n) and divides the product by a third (d) in a single operation, with 64 bit intermediate result. The actual equation used is &amp;lt;tt&amp;gt; (m * n + d / 2) / d &amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 MulDiv (1, 1, 2) = 1&lt;br /&gt;
 MulDiv (2, 3, 2) = 3&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Floor||Floor(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round down on any fractional amount).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Floor(1.2) = 1&lt;br /&gt;
 Floor(1.6) = 1&lt;br /&gt;
 Floor(-1.2) = -2&lt;br /&gt;
 Floor(-1.6) = -2&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Ceil||Ceil(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round up on any fractional amount).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Ceil(1.2) = 2&lt;br /&gt;
 Ceil(1.6) = 2&lt;br /&gt;
 Ceil(-1.2) = -1&lt;br /&gt;
 Ceil(-1.6) = -1&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Round||Round(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round off to nearest integer).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Round(1.2) = 1&lt;br /&gt;
 Round(1.6) = 2&lt;br /&gt;
 Round(-1.2) = -1&lt;br /&gt;
 Round(-1.6) = -2&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Int||Int(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round towards zero).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Int(1.2) = 1&lt;br /&gt;
 Int(1.6) = 1&lt;br /&gt;
 Int(-1.2) = -1&lt;br /&gt;
 Int(-1.6) = -1&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Float||Float(int)}}&lt;br /&gt;
: Converts int to single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value. Integer values that require more than 24-bits to be represented will have their lower 8-bits truncated yielding unexpected values.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Float(4) = 4.0&lt;br /&gt;
 Float(4) / 3 = 1.333 (while 4 / 3 = 1 , due to integer division)&lt;br /&gt;
 Float(123456789) = 123456792.0 (error = -3, 0.000002%)&lt;br /&gt;
 Float(1234567890) = 1234567936.0 (error = -46, 0.000004%)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Fmod|v2.60|Fmod(float, float)}}&lt;br /&gt;
: Returns the modulo of the argument. Output is float.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Fmod(3.5, 0.5) = 0 (since 3.5 - 7*0.5 = 0)&lt;br /&gt;
 Fmod(3.5, 1.0) = 0.5 (since 3.5 - 3*1.0 = 0.5)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Pi||Pi()}}&lt;br /&gt;
: Returns the value of the {{BoldColor|black|110|π}} constant (the ratio of a circle's circumference to its diameter).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 d = Pi()    # d == 3.141592653&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Exp||Exp(float)}}&lt;br /&gt;
: Returns the natural (base-e) exponent of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Exp(1) = 2.7182818&lt;br /&gt;
 Exp(0) = 1.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Log||Log(float)}}&lt;br /&gt;
: Returns the natural (base-e) logarithm of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Log(1) = 0.0&lt;br /&gt;
 Log(10) = 2.30259&lt;br /&gt;
 Log(Exp(1)) = 1.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Log10|v2.60|Log10(float)}}&lt;br /&gt;
: Returns the common logarithm of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Log10(1.0) = 0&lt;br /&gt;
 Log10(10.0) = 1.0&lt;br /&gt;
 Log10(2.0) = 0.3010299957&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Pow||Pow(float base, float power)}}&lt;br /&gt;
: Returns {{FuncArg|base}} raised to a {{FuncArg|power}}.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Pow(2, 3) = 8&lt;br /&gt;
 Pow(3, 2) = 9&lt;br /&gt;
 Pow(3.45, 1.75) = 8.7334&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sqrt||Sqrt(float)}}&lt;br /&gt;
: Returns the square root of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sqrt(1) = 1.0&lt;br /&gt;
 Sqrt(2) = 1.4142&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Abs||Abs(float or int)}}&lt;br /&gt;
: Returns the absolute value of its argument (returns float for float, integer for integer).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Abs(-3.8) = 3.8&lt;br /&gt;
 Abs(-4) = 4&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sign||Sign(float)}}&lt;br /&gt;
: Returns the sign of the value passed as argument (1, 0 or -1).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sign(-3.5) = -1&lt;br /&gt;
 Sign(3.5) = 1&lt;br /&gt;
 Sign(0) = 0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Frac||Frac(float)}}&lt;br /&gt;
: Returns the fractional portion of the value provided.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Frac(3.7) = 0.7&lt;br /&gt;
 Frac(-1.8) = -0.8&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Rand||Rand([int max] [, bool scale] [, bool seed])}}&lt;br /&gt;
: Returns a random integer value. All parameters are optional. &lt;br /&gt;
:;max&lt;br /&gt;
::sets the maximum value+1 (default 32768) and can be set negative for negative results. It operates either in scaled or modulus mode (default {{FuncArg|scale}}=true only if [[#Abs|Abs]]({{FuncArg|max}}) &amp;gt; 32768, false otherwise). &lt;br /&gt;
:;scale&lt;br /&gt;
::When true, ''scales'' the internal random number generator value to the maximum value, while ''modulus mode'' ({{FuncArg|scale}}=false) uses the remainder from an integer divide of the random generator value by the maximum. Modulus mode is recommended for smaller maximums. &lt;br /&gt;
:;seed&lt;br /&gt;
::When true, seeds the random number generator with the current time. {{FuncArg|seed}} defaults to false and probably isn't necessary, although it's there just in case. &lt;br /&gt;
: Typically, this function would be used with the [[#Select|'''Select''']] function for random clips. &lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Select(Rand(5), clip1, clip2, clip3, clip4, clip5)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Spline||Spline(float X, x1, y1, x2, y2, .... [, bool cubic])}}&lt;br /&gt;
: Interpolates the Y value at point X using the control points {{FuncArg|x1}}/{{FuncArg|y1}}, ... There have to be at least 2 x/y-pairs. The interpolation can be {{FuncArg|cubic}} (the result is a spline) or linear (the result is a polygon). Default is cubic.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Spline(5, 0, 0, 10, 10, 20, 0, false) = 5&lt;br /&gt;
 Spline(5, 0, 0, 10, 10, 20, 0, true) = 7&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Continued Numerator, Denominator =====&lt;br /&gt;
{{ScriptFunctionCode|ContinuedNumerator|v2.60|ContinuedNumerator(float, int limit)}}&lt;br /&gt;
{{ScriptFunctionCode|ContinuedNumerator|v2.60|ContinuedNumerator(int, int, int limit)}}&lt;br /&gt;
{{ScriptFunctionCode|ContinuedDenominator|v2.60|ContinuedDenominator(float, int limit)}}&lt;br /&gt;
{{ScriptFunctionCode|ContinuedDenominator|v2.60|ContinuedDenominator(int, int, int limit)}}&lt;br /&gt;
: The rational pair ('''ContinuedNumerator''', '''ContinuedDenominator''') returned has the smallest possible denominator such that the absolute error is less than 1/{{FuncArg|limit}}. More information can be found on [http://en.wikipedia.org/wiki/Continued_fraction wikipedia].&lt;br /&gt;
: If {{FuncArg|limit}} is not specified in the Float case the rational pair returned is to the limit of the single precision floating point value. Thus (float)((double)Num/(double)Den) == V.&lt;br /&gt;
: In the Int case if {{FuncArg|limit}} is not specified then the normalized original values will be returned, i.e. reduced by the ''GCD'' (greatest common divisor).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ContinuedNumerator(PI(), limit=5000]) = 355&lt;br /&gt;
 ContinuedDenominator(PI(), limit=5000) = 113&lt;br /&gt;
 &lt;br /&gt;
 ContinuedNumerator(PI(), limit=50]) = 22&lt;br /&gt;
 ContinuedDenominator(PI(), limit=50) = 7&lt;br /&gt;
 &lt;br /&gt;
 ContinuedNumerator(355, 113, limit=50]) = 22&lt;br /&gt;
 ContinuedDenominator(355, 113, limit=50) = 7&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Trigonometry functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: relationships involving lengths and angles of triangles. &lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sin||Sin(float)}}&lt;br /&gt;
: Returns the sine of the argument (assumes it is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sin(Pi()/4) = 0.707&lt;br /&gt;
 Sin(Pi()/2) = 1.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Cos||Cos(float)}}&lt;br /&gt;
: Returns the cosine of the argument (assumes it is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Cos(Pi()/4) = 0.707&lt;br /&gt;
 Cos(Pi()/2) = 0.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Tan|v2.60|Tan(float)}}&lt;br /&gt;
: Returns the tangent of the argument (assumes it is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Tan(Pi/4) = 1.0&lt;br /&gt;
 Tan(Pi/2) = not defined&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: 32 bit IEEE floats do not have sufficient resolution to exactly represent&lt;br /&gt;
: pi/2 so AviSynth returns a large positive number for the value slightly less&lt;br /&gt;
: than pi/2 and a large negative value for the next possible value which is&lt;br /&gt;
: slightly greater than pi/2.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Asin|v2.60|Asin(float)}}&lt;br /&gt;
: Returns the inverse of the sine of the argument (output is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Asin(0.707) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Asin(1.0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Acos|v2.60|Acos(float)}}&lt;br /&gt;
: Returns the inverse of the cosine of the argument (output is in radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Acos(0.707) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Acos(0.0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Atan|v2.60|Atan(float)}}&lt;br /&gt;
: Returns the inverse of the tangent of the argument (output is in radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Atan(0.707) = 0.6154085176&lt;br /&gt;
 Atan(1.0) = 0.7853981634 (~ Pi/4)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Atan2|v2.60|Atan2(float, float)}}&lt;br /&gt;
: Returns the angle between the positive x-axis of a plane and the point given by the coordinates (x, y) on it. Output is in radians. See [http://en.wikipedia.org/wiki/Atan2 wikipedia] for more information.&lt;br /&gt;
: y is the first argument and x is the second argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Atan2(1.0, 0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
 Atan2(1.0, 1.0) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Atan2(-1.0, -1.0) = -2.356194490 (~ -3Pi/4)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sinh|v2.60|Sinh(float)}}&lt;br /&gt;
: Returns the hyperbolic sine of the argument. See [http://en.wikipedia.org/wiki/Hyperbolic_function wikipedia] for more information.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sinh(2.0) = 3.626860408&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Cosh|v2.60|Cosh(float)}}&lt;br /&gt;
: Returns the hyperbolic cosine of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Cosh(2.0) = 3.762195691&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Tanh|v2.60|Tanh(float)}}&lt;br /&gt;
: Returns the hyperbolic tangent of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Tanh(2.0) = 0.9640275801&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bit functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: The functions are ''bitwise operators''. They manipulate individual bits within integer variables. This means that their arguments (being integers) are converted to binary numbers, the operation is performed on their bits, and the resulting binary number is converted back again.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitAnd|v2.60|BitAnd(int, int)}}&lt;br /&gt;
: Returns the bitwise AND (sets bit to 1 if both bits are 1 and sets bit to 0 otherwise).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitAnd(5, 6) = 4 # since 5 = 101, 6 = 110, and 101&amp;amp;110 = 100&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitNot|v2.60|BitNot(int)}}&lt;br /&gt;
: Returns the bit-inversion (sets bit to 1 if bit is 0 and vice-versa).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitNOT(5) = -6 &lt;br /&gt;
 # since  5 = 101,  &lt;br /&gt;
 # and ~101 = 1111 1111 1111 1111 1111 1111 1111 1010 = -6&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: Note: 1111 1111 1111 1111 1111 1111 1111 1010 &lt;br /&gt;
::= (2^32-1)-2^0-2^2 = 2^32-(1+2^0+2^2) &lt;br /&gt;
::= (signed) -(1+2^0+2^2) = -6&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitOr|v2.60|BitOr(int, int)}}&lt;br /&gt;
: Returns the bitwise inclusive OR (sets bit to 1 if one of the bits (or both) is 1 and sets bit to 0 otherwise).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitOr(5, 6) = 7 # since 5 = 101, 6 = 110, and 101|110 = 111&lt;br /&gt;
 BitOr(4, 2) = 6 # since 4 = 100, 2 = 010, and 100|010 = 110&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitXor|v2.60|BitXor(int, int)}}&lt;br /&gt;
: Returns the bitwise exclusive OR (sets bit to 1 if exactly one of the bits is 1 and sets bit to 0 otherwise).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitXor(5, 6) = 3 # since 5 = 101, 6 = 110, and 101^110 = 011&lt;br /&gt;
 BitXor(4, 2) = 6 # since 4 = 100, 2 = 010, and 100^010 = 110&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit shift left =====&lt;br /&gt;
{{ScriptFunctionCode|BitLShift|v2.60|BitLShift(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitShl|v2.60|BitShl(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitSal|v2.60|BitSal(int, int)}}&lt;br /&gt;
: Shift the bits of a number to the left.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Shifts the bits of the number 5 two bits to the left:&lt;br /&gt;
 BitLShift(5, 2) = 20 (since 101 &amp;lt;&amp;lt; 2 = 10100)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit shift right =====&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftA|v2.60|BitRShiftA(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftS|v2.60|BitRShiftS(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitSar|v2.60|BitSar(int, int)}}&lt;br /&gt;
: Shift the bits of an integer to the right. (Arithmetic, Sign bit fill, Right Shift)&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Shifts the bits of the number -42 one bit to the right, treating it as signed:&lt;br /&gt;
 BitRShiftA(-42, 1) = -21 &lt;br /&gt;
 # (since 1111 1111 1111 1111 1111 1111 1101 0110 &amp;gt;&amp;gt; 1  &lt;br /&gt;
 #      = 1111 1111 1111 1111 1111 1111 1110 1011)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit shift right, unsigned =====&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftL|v2.60|BitRShiftL(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftU|v2.60|BitRShiftU(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitShr|v2.60|BitShr(int, int)}}&lt;br /&gt;
: Shift the bits of an unsigned integer to the right. (Logical, zero fill, Right Shift)&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Shifts the bits of the number -42 one bit to the right, treating it as unsigned:&lt;br /&gt;
 BitRShiftL(-42, 1) = 2147483627 &lt;br /&gt;
 # (since 1111 1111 1111 1111 1111 1111 1101 0110 &amp;gt;&amp;gt; 1 &lt;br /&gt;
 #      = 0111 1111 1111 1111 1111 1111 1110 1011)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: Note: -42 = -(1+2^0+2^3+2^5) = (unsigned) (2^32-1)-(2^0+2^3+2^5) = &lt;br /&gt;
::1111 1111 1111 1111 1111 1111 1101 0110&lt;br /&gt;
&lt;br /&gt;
===== Bit rotate left =====&lt;br /&gt;
{{ScriptFunctionCode|BitLRotate|v2.60|BitLRotate(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRol|v2.60|BitRol(int, int)}}&lt;br /&gt;
: Rotates the bits of an integer to the left by the number of bits specified in the second operand. For each rotation specified, the high order bit that exits from the left of the operand returns at the right to become the new low order bit.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Rotates the bits of the number -2147483642 one bit to the left:&lt;br /&gt;
 BitLRotate(-2147483642, 1) = 13 &lt;br /&gt;
 # (since 10000000000000000000000000000110 ROL 1&lt;br /&gt;
 #      = 00000000000000000000000000001101)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit rotate right =====&lt;br /&gt;
{{ScriptFunctionCode|BitRRotate|v2.60|BitRRotateL(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRor|v2.60|BitRor(int, int)}}&lt;br /&gt;
: Rotates the bits of an integer to the right by the number of bits specified in the second operand. For each rotation specified, the low order bit that exits from the right of the operand returns at the left to become the new high order bit.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Rotates the bits of the number 13 one bit to the right:&lt;br /&gt;
 BitRRotate(13, 1) = -2147483642 &lt;br /&gt;
 # (since 00000000000000000000000000001101 ROR 1 &lt;br /&gt;
 #      = 10000000000000000000000000000110)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit test =====&lt;br /&gt;
{{ScriptFunctionCode|BitTest|v2.60|BitTest(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitTst|v2.60|BitTst(int, int)}}&lt;br /&gt;
: Tests a single bit (that is, it returns true if its state is one, else it returns false). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Check the state of the fourth bit:&lt;br /&gt;
 BitTest(3, 4) = False&lt;br /&gt;
 BitTest(19, 4) = True&lt;br /&gt;
 &lt;br /&gt;
 Check the state of the sign bit:&lt;br /&gt;
 BitTest(-1, 31) = True&lt;br /&gt;
 BitTest(2147483647, 31) = False&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitSet|v2.60|BitSet(int, int)}}&lt;br /&gt;
: Sets a single bit to one (so it sets its state to one). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Set the state of the fourth bit to one:&lt;br /&gt;
 BitSet(3, 4) = 19&lt;br /&gt;
 BitSet(19, 4) = 19&lt;br /&gt;
 &lt;br /&gt;
 Set the state of the sign bit to one:&lt;br /&gt;
 BitSet(-1, 31) = -1&lt;br /&gt;
 BitSet(2147483647, 31) = -1&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitSetCount||BitSetCount(int [, int...])}} {{AvsPluscon}}&lt;br /&gt;
: Returns the total number of set bits in all supplied integer arguments.&lt;br /&gt;
&lt;br /&gt;
===== Bit clear =====&lt;br /&gt;
{{ScriptFunctionCode|BitClear|v2.60|BitClear(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitClr|v2.60|BitClr(int, int)}}&lt;br /&gt;
: Sets a single bit to zero (so it sets its state to zero). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Clear the bits of the number 5&lt;br /&gt;
 BitClear(5, 0) = 4 (first bit is set to zero)&lt;br /&gt;
 BitClear(5, 1) = 5 (second bit is already zero)&lt;br /&gt;
 BitClear(5, 2) = 1 (third bit is set to zero)&lt;br /&gt;
 BitClear(5, 3) = 5 (fourth bit is already zero)&lt;br /&gt;
 &lt;br /&gt;
 Clear the state of the sign bit:&lt;br /&gt;
 BitClear(-1, 31) = 2147483647&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit change =====&lt;br /&gt;
{{ScriptFunctionCode|BitChange|v2.60|BitChange(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitChg|v2.60|BitChg(int, int)}}&lt;br /&gt;
: Sets a single bit to its complement (so it changes the state of a single bit; 1 becomes 0 and vice versa). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero). The sign bit is bit 31.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Change the state of the a bit of the number 5:&lt;br /&gt;
 BitChange(5, 0) = 4 (first bit is set to zero)&lt;br /&gt;
 BitChange(5, 1) = 7 (second bit is set to one)&lt;br /&gt;
 BitChange(5, 2) = 1 (third bit is set to zero)&lt;br /&gt;
 BitChange(5, 3) = 13 (fourth bit is set to one)&lt;br /&gt;
 &lt;br /&gt;
 Change the state of the sign bit:&lt;br /&gt;
 BitChange(-1, 31) = 2147483647&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Runtime functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These are internal functions which are evaluated at every frame. They can be used inside the scripts passed to runtime filters ([[ConditionalFilter]], [[ScriptClip]], [[FrameEvaluate]]) to return information for a frame.&lt;br /&gt;
&lt;br /&gt;
===== Average ===== &lt;br /&gt;
{{ScriptFunctionCode|AverageLuma||AverageLuma(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|AverageChromaU||AverageChromaU(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|AverageChromaV||AverageChromaV(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|AverageB||AverageB(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|AverageG||AverageG(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|AverageR||AverageR(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return a float value with the average pixel value of a plane (Luma, U-chroma and V-chroma, respectively). They require an [[ISSE]] capable cpu. In v2.61 an {{FuncArg|offset}} argument is added which enables you to access other frames than the current one.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ScriptClip(Last, &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     threshold = 55&lt;br /&gt;
     luma = AverageLuma ## gives the average luma of the current frame&lt;br /&gt;
     #luma = AverageLuma(1) ## gives the average luma of the next frame&lt;br /&gt;
     luma &amp;lt; threshold &lt;br /&gt;
     \ ? Levels(0, 1.0+0.5*(threshold-luma)/threshold, 255, 0, 255) &lt;br /&gt;
     \ : last&lt;br /&gt;
     Subtitle(&amp;quot;luma=&amp;quot; + String(luma), align=2)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Difference =====&lt;br /&gt;
{{ScriptFunctionCode|LumaDifference||LumaDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|ChromaUDifference||ChromaUDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|ChromaVDifference||ChromaVDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|RGBDifference||RGBDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|BDifference||BDifference(clip1, clip2)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GDifference||GDifference(clip1, clip2)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RDifference||RDifference(clip1, clip2)}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return a float value between 0 and 255 of the absolute difference between two planes from two different clips &amp;amp;ndash; either the combined RGB difference or the Luma, U-chroma or V-chroma differences, respectively. They require an [[ISSE]] capable cpu.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ovl = [[Overlay]](last, mov_star, x=some_xvalue, y=some_yvalue, mask=mov_mask)&lt;br /&gt;
 ldif = LumaDifference(ovl) # implicit last for clip1&lt;br /&gt;
 udif = ChromaUDifference([[Tweak]](hue=24), ovl)&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Difference from previous =====&lt;br /&gt;
{{ScriptFunctionCode|YDifferenceFromPrevious||YDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|UDifferenceFromPrevious||UDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|VDifferenceFromPrevious||VDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|RGBDifferenceFromPrevious||RGBDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|BDifferenceFromPrevious||BDifferenceFromPrevious(clip)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GDifferenceFromPrevious||GDifferenceFromPrevious(clip)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RDifferenceFromPrevious||RDifferenceFromPrevious(clip)}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return the absolute difference of pixel value between the current and previous frame of {{FuncArg|clip}} &amp;amp;ndash; either the combined RGB difference or the Luma, U-chroma or V-chroma differences, respectively.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 scene_change = (YDifferenceFromPrevious) &amp;gt; threshold)&lt;br /&gt;
 scene_change ? some_filter(...) : another_filter(...)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Difference to next =====&lt;br /&gt;
{{ScriptFunctionCode|YDifferenceToNext||YDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|UDifferenceToNext||UDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|VDifferenceToNext||VDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|RGBDifferenceToNext||RGBDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|BDifferenceToNext||BDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GDifferenceToNext||GDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RDifferenceToNext||RDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return the absolute difference of pixel value between the current and next frame of {{FuncArg|clip}} &amp;amp;ndash; either the combined RGB difference or the Luma, U-chroma or V-chroma differences, respectively. In v2.61 an {{FuncArg|offset}} argument is added, which enables you to access the difference between the RGB, luma or chroma plane of the current frame and of ''any'' other frame. Note that for example clip.'''RGBDifferenceToNext'''(-1) = clip.'''RGBDifferenceToPrevious''', and clip.'''RGBDifferenceToNext'''(0) = 0.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # both th1, th2 are positive thresholds; th1 is larger enough than th2&lt;br /&gt;
 scene_change = (YDifferenceFromPrevious &amp;gt; th1) &amp;amp;&amp;amp; (YDifferenceToNext &amp;lt; th2)&lt;br /&gt;
 scene_change ? some_filter(...) : another_filter(...)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Color plane median, min, max, range =====&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMedian||YPlaneMedian(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMedian||UPlaneMedian(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMedian||VPlaneMedian(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMedian||BPlaneMedian(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMedian||GPlaneMedian(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RPlaneMedian||RPlaneMedian(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMin||YPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMin||UPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMin||VPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMin||BPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMin||GPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}{{ScriptFunctionCode|RPlaneMin||RPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMax||YPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMax||UPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMax||VPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMax||BPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMax||GPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}{{ScriptFunctionCode|RPlaneMax||RPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMinMaxDifference||YPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMinMaxDifference||UPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMinMaxDifference||VPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMinMaxDifference||BPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMinMaxDifference||GPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RPlaneMinMaxDifference||RPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
: This group of functions return statistics about the distribution of pixel values on a plane (Luma, U-chroma and V-chroma, respectively). The statistics are, in order of presentation: maximum, minimum, median and range (maximum - minimum difference). &lt;br /&gt;
: {{FuncArg|threshold}} is a percentage, stating how many percent of the pixels are allowed above or below minimum. The threshold is optional and defaults to 0. In v2.61 an {{FuncArg|offset}} argument is added, which enables you to access the statistics of other frames than the current one.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # median and average are close only on even distributions; &lt;br /&gt;
 # this can be a useful diagnostic&lt;br /&gt;
 have_intense_brights = YPlaneMedian() - AverageLuma() &amp;lt; threshold&lt;br /&gt;
 ...&lt;br /&gt;
 # a simple per-frame normalizer to [16..235], CCIR, range&lt;br /&gt;
 [[Levels]](YPlaneMin(), 1.0, YPlaneMax(), 16, 235)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functions for frame properties ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: Core and concept ported from VapourSynth.&lt;br /&gt;
: Frame properties are per-frame data. Source or other filters can store useful data into frame properties such as information on colorimetry.&lt;br /&gt;
: Imagine them as an array of zero or more elements of PropertyName=Value&lt;br /&gt;
: Reading them is possible only by runtime functions.&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
: Note:&lt;br /&gt;
: At the moment (v3.6.2test7) Avisynth+ provides only the necessary framework for handling (set, read, clear, pass) such properties. None of its internal functions (such as color space converters) set or work upon frame property values.&lt;br /&gt;
: There are already filters (like avsresize) and source plugins that are already using frame properties. Avisynth+ core will rely on frame in the future as well.&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
: Developer info:&lt;br /&gt;
: On filter level the set of frame properties should be copied from a previous (or specific) input frame. When filter is using env-&amp;gt;MakeWritable in its GetFrame method this happens automatically. &lt;br /&gt;
: But a simple env-&amp;gt;NewVideoFrame means a dead-end for frame property passing mechanism. So filter must either use env-&amp;gt;NewVideoFrameP which has an additional parameter: a source frame of the frame properties.&lt;br /&gt;
: Or frame properties have to be copied later, programatically by the copyFrameProps ScriptEnvironment function.&lt;br /&gt;
: For compatibility reasons NewVideoFrameP should be called adaptively instead of the traditional NewVideoFrame: usable after detecting Avisynth interface version 8 (NewVideoFrameP was introduced in v8).&lt;br /&gt;
: What happens if this copy is not done properly? Then the filter is a dead-end for frame properties since NewVideoFrame constructs new frame with no frame properties. All old filters will behave like this.&amp;lt;br&amp;gt;&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
: Frame property getter functions are evaluated at every frame. They can be used inside the scripts passed to runtime filters ([[ScriptClip]]).&amp;lt;br&amp;gt;&lt;br /&gt;
: Frame property setters can be called both at script level and in runtime. When a property is set on script level it will be constant along the lifetime of the whole clip, unless it is changed in runtime, inside ScriptClip.&lt;br /&gt;
: Though using property setter functions are allowed in [[FrameEvaluate]] but since it does not return an altered frame, writing a frame property there has zero effect.&amp;lt;br&amp;gt;&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
:* frame properties are stored as key-value pairs&lt;br /&gt;
:** Key is an alphanumeric identifier.&lt;br /&gt;
:** Values can be of single value or array of type&lt;br /&gt;
:*** 64 bit integer (32 bit integer when converted to AVSValue inside Avisynth+, AVSValue limitation)&lt;br /&gt;
:*** 64 bit double (32 bit float when converted to AVSValue inside Avisynth+, AVSValue limitation)&lt;br /&gt;
:*** string (or byte data) with given length. Strings are null terminated.&lt;br /&gt;
:*** frame reference (PVideoFrame)&lt;br /&gt;
:*** clip reference (PClip)&lt;br /&gt;
:* property setting has 3 modes: 0-replace 1-append 2-touch (see AVSPropAppendMode in avisynth.h)::&lt;br /&gt;
:** 0 - single value for that key is replaced&lt;br /&gt;
:** 1 - property is appended (make arrays by calling with mode=1 consecutively)&lt;br /&gt;
:** 2 - touch&lt;br /&gt;
&lt;br /&gt;
==== Reserved frame property names ====&lt;br /&gt;
: There are quasi-standard frame property names which are used widespread.&lt;br /&gt;
: As frame properties came from VapourSynth (see &amp;quot;Reserved Frame Properties&amp;quot; at http://www.vapoursynth.com/doc/apireference.html), it is convenient that Avisynth plugins use the same properties and values.&lt;br /&gt;
: Keys starting with _ have strictly defined meanings specified below. It is acceptable to not set any of these keys if they are unknown. It is also a fatal error to set them to a value not specified below.&lt;br /&gt;
{{ScriptFunctionH5|_ChromaLocation||int _ChromaLocation}}&lt;br /&gt;
: Chroma sample position in YUV formats.&lt;br /&gt;
:: 0=left, 1=center, 2=topleft, 3=top, 4=bottomleft, 5=bottom.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_ColorRange||int _ColorRange}}&lt;br /&gt;
: Full or limited range (PC/TV range). Primarily used with YUV formats.&lt;br /&gt;
:: 0=full range, 1=limited range.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Primaries||int _Primaries}}&lt;br /&gt;
: Color primaries as specified in ITU-T H.265 Table E.3.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Matrix||int _Matrix}}&lt;br /&gt;
: Matrix coefficients as specified in ITU-T H.265 Table E.5.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Transfer||int _Transfer}}&lt;br /&gt;
: Transfer characteristics as specified in ITU-T H.265 Table E.4.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_FieldBased||int _FieldBased}}&lt;br /&gt;
: If the frame is composed of two independent fields (interlaced).&lt;br /&gt;
:: 0=frame based (progressive), 1=bottom field first, 2=top field first&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_AbsoluteTime||float _AbsoluteTime}}&lt;br /&gt;
: The frame’s absolute timestamp in seconds if reported by the source filter. Should only be set by the source filter and not be modified. Use durations for all operations that depend on frame length.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_DurationNum||int _DurationNum}}&lt;br /&gt;
{{ScriptFunctionH5|_DurationDen||int _DurationDen}}&lt;br /&gt;
: The frame’s duration in seconds as a rational number. Filters that modify the framerate should also change these values.&lt;br /&gt;
: This fraction should always be normalized.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Combed||int _Combed (boolean)}}&lt;br /&gt;
: Whether or not the frame needs postprocessing, usually hinted from field matching filters.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Field||int _Field}}&lt;br /&gt;
: If the frame was produced by something like core.std.SeparateFields, this property signals which field was used to generate this frame.&lt;br /&gt;
:: 0=from bottom field, 1=from top field.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_PictType||string _PictType}}&lt;br /&gt;
: A single character describing the frame type. It uses the common IPB letters but other letters may also be used for formats with additional frame types.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_SARNum||int _SARNum}}&lt;br /&gt;
{{ScriptFunctionH5|_SARDen||int _SARDen}}&lt;br /&gt;
: Pixel (sample) aspect ratio as a rational number.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_SceneChangeNext||int _SceneChangeNext (boolean)}}&lt;br /&gt;
: If 1, this frame is the last frame of the current scene. The next frame starts a new scene.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_SceneChangePrev||int _SceneChangePrev (boolean)}}&lt;br /&gt;
: If 1, this frame starts a new scene.&lt;br /&gt;
&lt;br /&gt;
==== Property set ====&lt;br /&gt;
: Input value of setter functions are to be come either&lt;br /&gt;
:*from the return value of &amp;quot;function objects&amp;quot;&lt;br /&gt;
:*direct value&lt;br /&gt;
: Property setter function names begin with propSet&lt;br /&gt;
&lt;br /&gt;
: Common parameters:&lt;br /&gt;
::*clip c,&lt;br /&gt;
::*string key_name,&lt;br /&gt;
::*direct value of supported types (integer, float, string, array, clip) or a &amp;quot;function object&amp;quot;&lt;br /&gt;
::*int &amp;quot;mode&amp;quot;: 0=replace (default), 1=append, 2=touch. There is no append mode for inserting a full array into the property.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
: generic property setter, automatic type recognition by the return value of the function object&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, integer value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, float value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, string value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, array value)}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, clip value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
&lt;br /&gt;
: The above four functions are setting a property by a directly passed values&lt;br /&gt;
: note: array must contain only the similarly typed values, e.g. cannot mix strings with integers.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propSetInt|{{AvsPluscon}}|propSetInt(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetFloat|{{AvsPluscon}}|propSetFloat(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetString|{{AvsPluscon}}|propSetString(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetArray|{{AvsPluscon}}|propSetArray(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetClip|{{AvsPluscon}}|propSetClip(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
: these setters accept only the specific type&lt;br /&gt;
&lt;br /&gt;
==== Property get ====&lt;br /&gt;
: Get properties by name or as a whole&lt;br /&gt;
: Common parameters:&lt;br /&gt;
:: clip c,&lt;br /&gt;
:: string key_name,&lt;br /&gt;
:: integer &amp;quot;index&amp;quot;, (default 0): for zero based indexing array access&lt;br /&gt;
:: integer &amp;quot;offset&amp;quot; (default 0), similar to the other runtime functions: frame offset (e.g. -1: previous, 2: next next)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetAny|{{AvsPluscon}}|propGetAny(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the automatically detected type&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetInt|{{AvsPluscon}}|propGetInt(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns only if value is integer, throws an error otherwise (note: unlike Avisynth integer frame properties internally use 64 bit integers)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetFloat|{{AvsPluscon}}|propGetFloat(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns only if value is float, throws an error otherwise (note: unlike Avisynth float frame properties internally use 64 bit doubles)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetString|{{AvsPluscon}}|propGetString(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns only if value is string, throws an error otherwise&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetAsArray|{{AvsPluscon}}|propGetAsArray(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: A frame property can hold multiple values of the same type: it can be an array&lt;br /&gt;
: propGetAsArray returns an array. For a single property array size will be 1. (only in array-aware AviSynth+ versions)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetClip|{{AvsPluscon}}|propGetClip(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns only if value is clip, throws an error otherwise (since 3.7.1)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetAll|{{AvsPluscon}}|propGetAll(clip [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: Returns all frame properties in an array of [key-value] pairs. Array size will be 'numProps'&lt;br /&gt;
: Each key-value pair is contained in a two dimensional subarray.&lt;br /&gt;
: If the property value for a given key is an array again then &amp;quot;value&amp;quot; will be an array as well.&lt;br /&gt;
: Once you have the array with all properties you can access them with the &amp;quot;associative&amp;quot; feature of AviSynth array access&lt;br /&gt;
''Example:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;last.propSet(&amp;quot;cica&amp;quot;,&amp;quot;hello&amp;quot;+String(current_frame)).\&lt;br /&gt;
    propSetInt(&amp;quot;test_i1&amp;quot;,function[](clip c) { return current_frame*3 }).\&lt;br /&gt;
    propSet(&amp;quot;test_i2&amp;quot;, current_frame * 2) &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;p = propGetAll() \&lt;br /&gt;
    SubTitle(&amp;quot;size:&amp;quot; + String(p.ArraySize()) + &amp;quot; &amp;quot; + \&lt;br /&gt;
                       String(p[&amp;quot;test_i1&amp;quot;]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
                       String(p[&amp;quot;cica&amp;quot;]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
                       String(p[&amp;quot;test_i2&amp;quot;]))&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;p = propGetAll() \&lt;br /&gt;
    SubTitle(&amp;quot;size:&amp;quot; + String(p.ArraySize()) + &amp;quot; &amp;quot; + \&lt;br /&gt;
        String(p[0,1]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
        String(p[1,1]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
        String(p[2,1]), x=0, y=20)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Example (read-write basic)''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|80|2}} &amp;gt;&lt;br /&gt;
  ColorBars()&lt;br /&gt;
   &lt;br /&gt;
  # just practicing with function objects&lt;br /&gt;
  ScriptClip(function[](clip c) { c.Subtitle(String(current_frame)) })&lt;br /&gt;
  &lt;br /&gt;
  # write frame properties with function object&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;propSetInt(&amp;quot;frameprop_from_str&amp;quot;,func(YPlaneMax))&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  # write frame properties with traditional script string&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;frameluma_sc_func&amp;quot;,func(AverageLuma)) })&lt;br /&gt;
  &lt;br /&gt;
  # read frame properties (function object, string)&lt;br /&gt;
  ScriptClip(function[](clip c) { SubTitle(string(propGetInt(&amp;quot;frameprop_from_str&amp;quot;)), y=20) })&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;SubTitle(string(propGetInt(&amp;quot;frameluma_sc_func&amp;quot;)), y=40)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
  return last&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Example (nearly everything)''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|92|2}} &amp;gt;&lt;br /&gt;
  ColorBars(width=640, height=480, pixel_type=&amp;quot;yv12&amp;quot;, staticframes=true)&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s&amp;quot;,function[](clip c) { return &amp;quot;Hello &amp;quot; + string(current_frame) }) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s&amp;quot;,function[](clip c) { return &amp;quot;Hello array element #2 &amp;quot; }, mode=1) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s&amp;quot;,function[](clip c) { return &amp;quot;Hello array element #3 &amp;quot;}, mode=1 ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s2&amp;quot;,function[](clip c) { return &amp;quot;Another property &amp;quot;} ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;s_int&amp;quot;,function[](clip c) { return current_frame*1 }) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;s_int&amp;quot;,function[](clip c) { return current_frame*2 }, mode=1) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;s_int&amp;quot;,function[](clip c) { return current_frame*4 }, mode=1 ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetFloat(&amp;quot;s_float&amp;quot;,function[](clip c) { return current_frame*1*3.14 }) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetFloat(&amp;quot;s_float&amp;quot;,function[](clip c) { return current_frame*2*3.14 }, mode=1) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetFloat(&amp;quot;s_float&amp;quot;,function[](clip c) { return current_frame*3*3.14 }, mode=1 ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetArray(&amp;quot;s_float_arr&amp;quot;,function[](clip c) { return [1.1, 2.2] } ) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetArray(&amp;quot;s_int_arr&amp;quot;,function[](clip c) { return [-1,-2,-5] } ) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetArray(&amp;quot;s_string&amp;quot;,function[](clip c) { return [&amp;quot;ArrayElementS_1&amp;quot;, &amp;quot;ArrayElementS_2&amp;quot;] } ) })&lt;br /&gt;
  #ScriptClip(&amp;quot;&amp;quot;&amp;quot;propDelete(&amp;quot;s&amp;quot;)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    y = 0&lt;br /&gt;
    SubTitle(&amp;quot;Prop Key count =&amp;quot; + String(propNumKeys), y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    numKeys = propNumKeys() - 1&lt;br /&gt;
    for ( i = 0 , numKeys) {&lt;br /&gt;
      propName = propGetKeyByIndex(index = i)&lt;br /&gt;
      propType = propGetType(propName)&lt;br /&gt;
      SubTitle(&amp;quot;#&amp;quot;+String(i) + &amp;quot; property: '&amp;quot; + propName + &amp;quot;', Type = &amp;quot; + String(propType) , y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
 &lt;br /&gt;
      for(j=0, propNumElements(propName) - 1) {&lt;br /&gt;
        SubTitle(&amp;quot;element #&amp;quot; + String(j) + &amp;quot;, size = &amp;quot; + String(propType == 3 ? propGetDataSize(propName, index=j) : 0) + &amp;quot;, Value = &amp;quot; + String(propGetAny(propName, index=j)), y = y)&lt;br /&gt;
        #SubTitle(&amp;quot;element #&amp;quot; + String(j) + &amp;quot; size = &amp;quot; + String(propType == 3 ? propGetDataSize(propName, index=j) : 0) + &amp;quot;, Value = &amp;quot; + String(propGetAny(propName, index=j)), y = y)&lt;br /&gt;
        y = y + 15&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s&amp;quot;)&lt;br /&gt;
    y = 100&lt;br /&gt;
    x = 400&lt;br /&gt;
    SubTitle(string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  # get int array one pass&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s_int&amp;quot;)&lt;br /&gt;
    y = 440&lt;br /&gt;
    x = 400&lt;br /&gt;
    SubTitle(&amp;quot;Array size=&amp;quot; + string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  # get float array one pass&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s_float&amp;quot;)&lt;br /&gt;
    y = 440&lt;br /&gt;
    x = 200&lt;br /&gt;
    SubTitle(&amp;quot;Array size=&amp;quot; + string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  # get string array&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s_string&amp;quot;)&lt;br /&gt;
    y = 440&lt;br /&gt;
    x = 000&lt;br /&gt;
    SubTitle(&amp;quot;Array size=&amp;quot; + string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AviSynth 3.7.1''': allow propGetXXX property getter functions called as normal functions, outside runtime.&amp;lt;br&amp;gt;&lt;br /&gt;
By default frame property values are read from frame#0 which index can be overridden by the offset parameter.&lt;br /&gt;
&lt;br /&gt;
''Example:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|92|2}} &amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Colorbars()&lt;br /&gt;
    PropSet(last, &amp;quot;hello&amp;quot;, 1) # Set to 1 for all frames&lt;br /&gt;
    # Override to 2 with runtime function except for frameNo=1&lt;br /&gt;
    ScriptClip(&amp;quot;&amp;quot;&amp;quot;if(current_frame!=1) {propSet(&amp;quot;hello&amp;quot;,2)}&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
    n0 = propGetInt(&amp;quot;hello&amp;quot;) # same as propGetInt(&amp;quot;hello&amp;quot;,offset=0)&lt;br /&gt;
    # or get the frame property from the Nth frame&lt;br /&gt;
    n1 = propGetInt(&amp;quot;hello&amp;quot;,offset=1)&lt;br /&gt;
    n2 = propGetInt(&amp;quot;hello&amp;quot;,offset=2)&lt;br /&gt;
    # n0 and n2 is 2 (overridden in runtime)&lt;br /&gt;
    # n1 will be 1 (keeps global setting)&lt;br /&gt;
    SubTitle(&amp;quot;n0/n1/n2=&amp;quot; + &amp;quot;{n0}/{n1}/{n2}&amp;quot;.Format)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Deleting properties ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: Delete one specific property or all property entries&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propDelete|{{AvsPluscon}}|propDelete(clip, string)}}&lt;br /&gt;
: Deletes a property by name. If property does not exist, do nothing.&lt;br /&gt;
:* {{FuncArg|clip}} (required) specifies clip.&lt;br /&gt;
:* {{FuncArg|string}} (required) key_name (case sensitive) specifies the name of the parameter to delete&lt;br /&gt;
''Example:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;propDelete(&amp;quot;my_spec_prop&amp;quot;)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propClearAll|{{AvsPluscon}}|propClearAll(clip)}}&lt;br /&gt;
: Clears all properties for a given video frame&lt;br /&gt;
:* {{FuncArg|clip}} (required) specifies clip.&lt;br /&gt;
&lt;br /&gt;
==== Other property functions ====&lt;br /&gt;
{{ScriptFunctionH5|propShow|{{AvsPluscon}}|propShow(clip, integer &amp;quot;size&amp;quot;, bool &amp;quot;showtype&amp;quot;)}}&lt;br /&gt;
: This debug filter lists all frame properties on screen.&lt;br /&gt;
: Listing appears as a name = value list. Arrays values are displayed between [ and ]&lt;br /&gt;
: Top line contains the number of properties. If no properties found, nothing is displayed.&lt;br /&gt;
:* {{FuncArg|clip}} (required) specifies clip.&lt;br /&gt;
:* {{FuncArg|integer}} &amp;quot;size&amp;quot; default(16), font size to use (the &amp;quot;Text&amp;quot; filter is used for display, sizes are of limited set)&lt;br /&gt;
:* {{FuncArg|bool}} &amp;quot;showtype&amp;quot; default(false), if true, the data type in parenthesis appears next to the property key name&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetDataSize|{{AvsPluscon}}|propGetDataSize(clip, string key_name [, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the size of the string or underlying data array&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propNumElements|{{AvsPluscon}}|propNumElements(clip, string key_name [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the array size of a given property. 1=single value&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propNumKeys|{{AvsPluscon}}|propNumKeys(clip, [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns number of entries (keys) for a frame&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetKeyByIndex|{{AvsPluscon}}|propGetKeyByIndex(clip, integer &amp;quot;index&amp;quot; [, integer &amp;quot;offset&amp;quot;)}}&lt;br /&gt;
: returns the key name for the Nth property (zero based, 0&amp;lt;=index&amp;lt;propNumKeys)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetType|{{AvsPluscon}}(v3.7.0)|propGetType(clip, string key_name [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the type of the given key&lt;br /&gt;
::*unset: 0&lt;br /&gt;
::*integer: 1&lt;br /&gt;
::*float: 2&lt;br /&gt;
::*string: 3&lt;br /&gt;
::*clip: 4&lt;br /&gt;
::*frame: 5&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propCopy|{{AvsPluscon}}(v3.7.1)|propCopy(clip, clip [,bool &amp;quot;merge&amp;quot;])}}&lt;br /&gt;
: Copies the frame properties of the second clip to the first.&lt;br /&gt;
::*Parameter 'merge' (default false):&lt;br /&gt;
:::*when false: exact copy (original target properties will be lost)&lt;br /&gt;
:::*when true: keeps original properties, appends all parameters from source but overwrite if a parameter with the same name already exists.&lt;br /&gt;
&lt;br /&gt;
== Script functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide AviSynth script information.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptName|v2.60|ScriptName()}}&lt;br /&gt;
: Returns the path and filename of the loaded script as a string.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 name = ScriptName() # name = &amp;quot;F:\ProjectXYZ\video.avs&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptNameUtf8|{{AvsPluscon}}|ScriptNameUtf8()}}&lt;br /&gt;
: Returns the path and filename of the loaded script as a [[wikipedia:Unicode|Unicode]] string, encoded in [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptFile|v2.60|ScriptFile()}}&lt;br /&gt;
: Returns the filename of the loaded script as a string.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 file = ScriptFile() # file = &amp;quot;video.avs&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptFileUtf8|{{AvsPluscon}}|ScriptFileUtf8()}}&lt;br /&gt;
: Returns the filename of the loaded script as a [[wikipedia:Unicode|Unicode]] string, encoded in [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptDir|v2.60|ScriptDir()}}&lt;br /&gt;
: Returns the path of the loaded script as a string.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 folder = ScriptDir() # folder = &amp;quot;F:\ProjectXYZ&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptDirUtf8|{{AvsPluscon}}|ScriptDirUtf8()}}&lt;br /&gt;
: Returns the path of the loaded script as a [[wikipedia:Unicode|Unicode]] string, encoded in [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|SetLogParams|{{AvsPluscon}}|SetLogParams([string ''target'', int ''level''])}}&lt;br /&gt;
: Sets a file path for a log file, used by [[#LogMsg|LogMsg]] and internal error reporting.&lt;br /&gt;
:* {{FuncArg|target}} names a file which will be created when the script loads. If attempting to create or write to {{FuncArg|target}} fails, the script will raise an error immediately. If the file exists, new log entries will be appended to the end. If omitted, {{FuncArg|target}} defaults to [[wikipedia:Stderr|stderr]].&lt;br /&gt;
:* {{FuncArg|level}} sets the log ''verbosity''; it can be one of the following:&lt;br /&gt;
::{| border=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|{{BoldColor|#669999|85|■}} &amp;lt;tt&amp;gt;LOG_ERROR&amp;lt;/tt&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&amp;lt;small&amp;gt;(1)&amp;lt;/small&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|creates the fewest log entries&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|{{BoldColor|#669999|85|■}} &amp;lt;tt&amp;gt;LOG_WARNING&amp;lt;/tt&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&amp;lt;small&amp;gt;(2)&amp;lt;/small&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|{{BoldColor|#669999|85|■}} &amp;lt;tt&amp;gt;LOG_INFO&amp;lt;/tt&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&amp;lt;small&amp;gt;(3)&amp;lt;/small&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|creates the most log entries&lt;br /&gt;
|}&lt;br /&gt;
::If omitted, {{FuncArg|level}} defaults to &amp;lt;tt&amp;gt;LOG_INFO&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
:''Examples'' see [[#LogMsg|LogMsg]] below.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|LogMsg|{{AvsPluscon}}|LogMsg(string, int)}}&lt;br /&gt;
: Creates a new log entry.&lt;br /&gt;
:* {{FuncArg|string}} (required) specifies the log message.&lt;br /&gt;
:* {{FuncArg|int}} (required) specifies the log entry level: see [[#SetLogParams|SetLogParams]] above.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## creating file and set path for future log entries:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test1.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 &lt;br /&gt;
 ...''log contents:''&lt;br /&gt;
 (empty)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## logging an INFO message:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test2.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 LogMsg(&amp;quot;this is a test&amp;quot;, LOG_INFO)&lt;br /&gt;
 &lt;br /&gt;
 ''log contents:''&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 INFO: this is a test&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## logging a script error:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test3.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 foo(&amp;quot;bar&amp;quot;) ## ERROR!&lt;br /&gt;
 &lt;br /&gt;
 ...''log contents (redundant entries are common):''&lt;br /&gt;
 ERROR: Script error: There is no function named 'foo'.&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 ERROR: Script error: There is no function named 'foo'.&lt;br /&gt;
 (&amp;lt;path&amp;gt;\_test.avs, line 35)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## logging INFO context for script error:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test4.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 function MyFunction(clip C)&lt;br /&gt;
 {&lt;br /&gt;
     C&lt;br /&gt;
     [[Control_structures|try]] {&lt;br /&gt;
         foo(&amp;quot;bar&amp;quot;) ## ERROR!&lt;br /&gt;
     } catch (err_msg) {&lt;br /&gt;
         msg2 = &amp;quot;Error in MyFunction: &amp;quot;&lt;br /&gt;
         LogMsg([[#Time|Time]](&amp;quot;%Y-%m-%d %I:%M:%S %p, %z&amp;quot;) + &amp;quot;: &amp;quot; + msg2, LOG_INFO)&lt;br /&gt;
         #[[#Assert|Assert]](false, msg2 + err_msg) ## optional: stop script, else continue&lt;br /&gt;
     }&lt;br /&gt;
     return Last&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ''log contents (redundant entries omitted):''&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 ERROR: Script error: There is no function named 'foo'.&lt;br /&gt;
 (&amp;lt;path&amp;gt;\_test.avs, line 54)&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 INFO: 2017-11-12 11:03:41 AM, -0500: Error in MyFunction:&lt;br /&gt;
 (&amp;lt;path&amp;gt;\_test.avs, line 54)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|GetProcessInfo|{{AvsPluscon}}|GetProcessInfo(int)}}&lt;br /&gt;
: Returns information about the [[wikipedia:Process_(computing)|process]] the script is running in.&lt;br /&gt;
: The ''int'' argument has two legal values:&lt;br /&gt;
:* if ''0'' (default), returns ''64'' for a 64-bit process or ''32'' for a 32-bit process.&lt;br /&gt;
:* else if ''1'',&lt;br /&gt;
:** returns 0 for 32-bit process on 32-bit OS;&lt;br /&gt;
:** returns 1 for 32-bit process on 64-bit OS;&lt;br /&gt;
:** returns 2 for 64-bit process on 64-bit OS;&lt;br /&gt;
:** else returns -1 (unknown)&lt;br /&gt;
:: /// [[TODO]] this is preliminary info&lt;br /&gt;
&lt;br /&gt;
== String functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide common operations on string variables.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|LCase||LCase(string)}}&lt;br /&gt;
: Returns lower case of {{FuncArg|string}}.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 LCase(&amp;quot;AviSynth&amp;quot;) = &amp;quot;avisynth&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|UCase||UCase(string)}}&lt;br /&gt;
: Returns upper case of {{FuncArg|string}}.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 UCase(&amp;quot;AviSynth&amp;quot;) = &amp;quot;AVISYNTH&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrToUtf8||StrToUtf8(string)}} {{AvsPluscon}}&lt;br /&gt;
: Converts {{FuncArg|string}} from ANSI to [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrFromUtf8||StrFromUtf8(string)}} {{AvsPluscon}}&lt;br /&gt;
: Converts {{FuncArg|string}} from [[wikipedia:UTF-8|UTF8]] to ANSI.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrLen||StrLen(string)}}&lt;br /&gt;
: Returns length of {{FuncArg|string}}.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 StrLen(&amp;quot;AviSynth&amp;quot;) = 8&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|RevStr||RevStr(string)}}&lt;br /&gt;
: Returns {{FuncArg|string}} backwards.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 RevStr(&amp;quot;AviSynth&amp;quot;) = &amp;quot;htnySivA&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|LeftStr||LeftStr(string, int)}}&lt;br /&gt;
: Returns first {{FuncArg|int}} count of characters.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 LeftStr(&amp;quot;AviSynth&amp;quot;, 3) = &amp;quot;Avi&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|RightStr||RightStr(string, int)}}&lt;br /&gt;
: Returns last {{FuncArg|int}} count of characters.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 RightStr(&amp;quot;AviSynth&amp;quot;, 5) = &amp;quot;Synth&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|MidStr||MidStr(string, int pos [, int length])}}&lt;br /&gt;
: Returns substring starting at {{FuncArg|pos}} for optional {{FuncArg|length}} or to end. {{FuncArg|pos}}=1 specifies start.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 MidStr(&amp;quot;AviSynth&amp;quot;, 3, 2) = &amp;quot;iS&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|FindStr||FindStr(string, substring)}}&lt;br /&gt;
: Returns (1-based) position of {{FuncArg|substring}} within {{FuncArg|string}} &lt;br /&gt;
:* Note this function is case-sensitive. &lt;br /&gt;
:* Returns 0 if {{FuncArg|substring}} is not found.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Findstr(&amp;quot;AviSynth&amp;quot;, &amp;quot;Syn&amp;quot;) ## returns 4&lt;br /&gt;
 Findstr(&amp;quot;AviSynth&amp;quot;, &amp;quot;SYN&amp;quot;) ## returns 0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ReplaceStr|{{AvsPluscon}}|ReplaceStr(string, substring, replacement_string [, bool sig])}}&lt;br /&gt;
: Replaces occurrences of {{FuncArg|substring}} with {{FuncArg|replacement_string}} and returns the result. &lt;br /&gt;
:* {{FuncArg|sig}} if false (the default), search is case-sensitive; if true, search is not case-sensitive.&lt;br /&gt;
:* Avisynth 2.6.x users have other options, such as the [[User_defined_script_functions|user]] function below, adapted from ''StrReplace'', found [[HDColorBars|here]].&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|46|4}} &amp;gt;&lt;br /&gt;
 function ReplaceStr(string base, string sought, string repstr) {&lt;br /&gt;
     pos = FindStr(base, sought)&lt;br /&gt;
     return (sought==&amp;quot;&amp;quot; || pos==0) ? base : ReplaceStr(&lt;br /&gt;
     \       LeftStr(base, pos-1) + repstr +&lt;br /&gt;
     \       MidStr(base, pos+StrLen(sought)),&lt;br /&gt;
     \       sought, repstr)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ReplaceStr(&amp;quot;FlipHorizontal&amp;quot;, &amp;quot;Horizontal&amp;quot;, &amp;quot;Vertical&amp;quot;)&lt;br /&gt;
 ReplaceStr(&amp;quot;''$a'' x *&amp;quot;, &amp;quot;''$a''&amp;quot;, String(1.5)) ## (a [[MaskTools2|MaskTools]] expression with argument)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Format|{{AvsPluscon}}|Format(formatstring [, value1, value2, ...])}}&lt;br /&gt;
: Mixes the string containing inline placeholders with parameters each converted to strings and returns the result. &lt;br /&gt;
:* {{FuncArg|formatstring}} unnamed parameter, string literal with parameter insertion points marked with {}.&lt;br /&gt;
:* {{FuncArg|value1}}, {{FuncArg|value2}},etc. zero or more values which are inserted into the format string one after another&lt;br /&gt;
:Description:&lt;br /&gt;
::The format string consists of&lt;br /&gt;
::&lt;br /&gt;
:::*ordinary characters (except { and }), which are copied unchanged to the output,&lt;br /&gt;
:::*escape sequences double &amp;quot;{&amp;quot; (&amp;quot;{{&amp;quot;) and double &amp;quot;}&amp;quot; (&amp;quot;}}&amp;quot;), which are replaced with &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot; respectively in the output, and&lt;br /&gt;
:::*replacement fields.&lt;br /&gt;
::: &lt;br /&gt;
:::Each replacement field has the following format:&lt;br /&gt;
::::introductory { character;&lt;br /&gt;
::::(optional)&lt;br /&gt;
::::arg-id, a non-negative number;&lt;br /&gt;
:::::or:&lt;br /&gt;
::::identifier which is used for lookup named parameters. ([&amp;quot;name&amp;quot;, value] construction)&lt;br /&gt;
:::::or:&lt;br /&gt;
::::valid AviSynth variable name&lt;br /&gt;
::::final } character.&lt;br /&gt;
:::&lt;br /&gt;
:::If arg-id is a number it specifies the index of the argument in args whose value is to be used for formatting;&lt;br /&gt;
:::Index is zero based.&lt;br /&gt;
:::&lt;br /&gt;
:::If arg-id is string then it serves as a lookup key from the parameters list given as an array [&amp;quot;name&amp;quot;,value] pair.&lt;br /&gt;
:::If not found, then arg-id is searched among Avisynth variables.&lt;br /&gt;
:::&lt;br /&gt;
:::If arg-id is omitted, the arguments are used in order.&lt;br /&gt;
:::Mixing manual and automatic indexing is not an error.&lt;br /&gt;
:::&lt;br /&gt;
::Notes&lt;br /&gt;
:::It is not an error to provide more arguments than the format string requires:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Format(&amp;quot;{} {}!&amp;quot;, &amp;quot;Hello&amp;quot;, &amp;quot;world&amp;quot;, &amp;quot;something&amp;quot;) # OK, produces &amp;quot;Hello world!&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Example: By Avisynth variable''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 max_pixel_value = 255&lt;br /&gt;
 SubTitle(Format(&amp;quot;max={max_pixel_value}!&amp;quot;)) # no format value given, inserts directly from variable&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Example: By index:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SubTitle(Format(&amp;quot;{0} {1} {0}&amp;quot;, &amp;quot;Home&amp;quot;, &amp;quot;sweet&amp;quot;))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Example: by order:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SubTitle(Format(&amp;quot;{} {} {}&amp;quot;, &amp;quot;AviSynth&amp;quot;, &amp;quot;+&amp;quot;, 2020))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Example: by Array name-value pairs:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SubTitle(Format(&amp;quot;maximum={max} minimum={min} max again {max}!&amp;quot;, [&amp;quot;max&amp;quot;,255], [&amp;quot;min&amp;quot;,0]))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:*since Avisynth+ 3.6&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|FillStr|v2.60|FillStr(int [, string])}}&lt;br /&gt;
: Fills a string. When {{FuncArg|int}}&amp;gt;1 it concatenates the {{FuncArg|string}} {{FuncArg|int}} times. {{FuncArg|string}} is &amp;quot;&amp;lt;tt&amp;gt; &amp;lt;/tt&amp;gt;&amp;quot; (space) by default.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 FillStr(1, &amp;quot;AviSynth&amp;quot;) = &amp;quot;AviSynth&amp;quot;&lt;br /&gt;
 FillStr(2, &amp;quot;AviSynth&amp;quot;) = &amp;quot;AviSynthAviSynth&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrCmp|v2.60|StrCmp(string, string)}}&lt;br /&gt;
: Compares two character strings. The comparison is case-sensitive. If the first string is less than the second string, the return value is negative. If it's greater, the return value is positive. If they are equal, the return value is zero. (The actual value seems to be language dependent so it can't be relied upon.)&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 StrCmp(&amp;quot;AviSynth&amp;quot;, &amp;quot;AviSynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmp(&amp;quot;AviSynth&amp;quot;, &amp;quot;Avisynth&amp;quot;) != 0 # strings are not equal.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrCmpi|v2.60|StrCmpi(string, string)}}&lt;br /&gt;
: Compares two character strings. The comparison is not case-sensitive. If the first string is less than the second string, the return value is negative. If it's greater, the return value is positive. If they are equal, the return value is zero. (The actual value seems to be language dependent so it can't be relied upon.)&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 StrCmpi(&amp;quot;AviSynth&amp;quot;, &amp;quot;AviSynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmpi(&amp;quot;AviSynth&amp;quot;, &amp;quot;Avisynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmpi(&amp;quot;abcz&amp;quot;, &amp;quot;abcdefg&amp;quot;) != 0 &lt;br /&gt;
 # returns the difference betweeen &amp;quot;z&amp;quot; and &amp;quot;d&amp;quot; (which is positive).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== TrimLeft, TrimRight, TrimAll =====&lt;br /&gt;
{{ScriptFunctionCode|TrimLeft||TrimLeft(string)}}&lt;br /&gt;
{{ScriptFunctionCode|TrimRight||TrimRight(string)}}&lt;br /&gt;
{{ScriptFunctionCode|TrimAll||TrimAll(string)}}&lt;br /&gt;
: {{AvsPluscon}} Removes whitespace characters (space, tab, [[wikipedia:Non-breaking_space|nonbreaking space]]) from the ''left, right,'' or ''both'' ends of a string.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Chr||Chr(int)}}&lt;br /&gt;
: Returns the ASCII character. &lt;br /&gt;
: Note that characters above the ASCII character set (ie above 127) are code page dependent and may render different (visual) results in different systems. This has an importance only for user-supplied localised text messages.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Chr(34) returns the quote character&lt;br /&gt;
 Chr(9)  returns the tab   character&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Ord|v2.60|Ord(string)}}&lt;br /&gt;
: Gives the ordinal number (character code) of the first character of {{FuncArg|string}} (works like php [http://php.net/manual/en/function.ord.php ord] or Basic [http://msdn.microsoft.com/en-us/library/xfw01fx4%28v=vs.84%29.aspx Asc])&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Ord(&amp;quot;a&amp;quot;) = 97&lt;br /&gt;
 Ord(&amp;quot;AviSynth&amp;quot;) = Ord(&amp;quot;A&amp;quot;) = 65&lt;br /&gt;
 Ord(&amp;quot;§&amp;quot;) = 167&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Time||Time(string)}}&lt;br /&gt;
: Returns a string with the current system time formatted as defined by {{FuncArg|string}}.&lt;br /&gt;
&lt;br /&gt;
: The string may contain any of the codes for output formatting presented below:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 ! style=&amp;quot;width:9em&amp;quot; | Code&lt;br /&gt;
 ! style=&amp;quot;width:38em&amp;quot; | Description&lt;br /&gt;
 |-&lt;br /&gt;
 |%a&lt;br /&gt;
%A  &lt;br /&gt;
 | Abbreviated weekday name&lt;br /&gt;
Full weekday name&lt;br /&gt;
 |-&lt;br /&gt;
 |%b&lt;br /&gt;
%B  &lt;br /&gt;
 | Abbreviated month name&lt;br /&gt;
Full month name&lt;br /&gt;
 |-&lt;br /&gt;
 |%c  &lt;br /&gt;
 | Date and time representation appropriate for locale&lt;br /&gt;
 |-&lt;br /&gt;
 |%d  &lt;br /&gt;
 | Day of month as decimal number (01 - 31)&lt;br /&gt;
 |-&lt;br /&gt;
 |%H&lt;br /&gt;
%I  &lt;br /&gt;
 | Hour in 24-hour format (00 - 23)&lt;br /&gt;
Hour in 12-hour format (01 - 12)&lt;br /&gt;
 |-&lt;br /&gt;
 |%j  &lt;br /&gt;
 | Day of year as decimal number (001 - 366)&lt;br /&gt;
 |-&lt;br /&gt;
 |%m  &lt;br /&gt;
 | Month as decimal number (01 - 12)&lt;br /&gt;
 |-&lt;br /&gt;
 |%M  &lt;br /&gt;
 | Minute as decimal number (00 - 59)&lt;br /&gt;
 |-&lt;br /&gt;
 |%p  &lt;br /&gt;
 | Current locale's A.M./P.M. indicator for 12-hour clock&lt;br /&gt;
 |-&lt;br /&gt;
 |%S  &lt;br /&gt;
 | Second as decimal number (00 - 59)&lt;br /&gt;
 |-&lt;br /&gt;
 |%U  &lt;br /&gt;
 | Week of year as decimal number, with Sunday as first day of week (00 - 53)&lt;br /&gt;
 |-&lt;br /&gt;
 |%w  &lt;br /&gt;
 | Weekday as decimal number (0 - 6; Sunday is 0)&lt;br /&gt;
 |-&lt;br /&gt;
 |%W  &lt;br /&gt;
 | Week of year as decimal number, with Monday as first day of week (00 - 53)&lt;br /&gt;
 |-&lt;br /&gt;
 |%x  &lt;br /&gt;
 | Date representation for current locale&lt;br /&gt;
 |-&lt;br /&gt;
 |%X  &lt;br /&gt;
 | Time representation for current locale&lt;br /&gt;
 |-&lt;br /&gt;
 |%y&lt;br /&gt;
%Y  &lt;br /&gt;
 | Year without century, as decimal number (00 - 99)&lt;br /&gt;
Year ''with'' century, as decimal number&lt;br /&gt;
 |-&lt;br /&gt;
 |%z, %Z  &lt;br /&gt;
 | Time-zone name or abbreviation; no characters if time zone is unknown&lt;br /&gt;
 |-&lt;br /&gt;
 |%%  &lt;br /&gt;
 | Percent sign &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
: The '#' flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 ! style=&amp;quot;width:9em&amp;quot; |Code with '#' flag&lt;br /&gt;
 ! style=&amp;quot;width:38em&amp;quot; |Change in meaning&lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''a''', %#'''A''', %#'''b''', &lt;br /&gt;
%#'''B''', %#'''p''', %#'''X''', &lt;br /&gt;
%#'''z''', %#'''Z''', %#'''%'''&lt;br /&gt;
 | No change; flag is ignored. &lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''c''' &lt;br /&gt;
 | Long date and time representation, appropriate for current locale. &lt;br /&gt;
For example, ''&amp;quot;Tuesday, March 14, 1995, 12:41:29&amp;quot;'' &lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''x''' &lt;br /&gt;
 | Long date representation, appropriate to current locale. &lt;br /&gt;
For example, ''&amp;quot;Tuesday, March 14, 1995&amp;quot;''&lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''d''', %#'''H''', %#'''I''', &lt;br /&gt;
%#'''j''', %#'''m''', %#'''M''', &lt;br /&gt;
%#'''S''', %#'''U''', %#'''w''', &lt;br /&gt;
%#'''W''', %#'''y''', %#'''Y''' &lt;br /&gt;
 | Remove leading zeroes (if any).&lt;br /&gt;
 |}&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 v = Time(&amp;quot;%Y-%m-%d&amp;quot;)        # &amp;quot;2010-03-01&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%d-%b-%Y&amp;quot;)        # &amp;quot;01-Mar-2010&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%#d/%#m/%y&amp;quot;)      # &amp;quot;1/3/10&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%I:%M:%S %p, %z&amp;quot;) # &amp;quot;08:04:42 PM, GMT Standard Time&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%H:%M:%S %z&amp;quot;)     # &amp;quot;20:04:42 GMT Standard Time&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide AviSynth version information.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|VersionNumber||VersionNumber()}}&lt;br /&gt;
: Returns AviSynth version number as a float.&lt;br /&gt;
:* Note: use [[#VersionString|VersionString]] below to determine if running in [[AviSynth+]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 VersionNumber ## returns 2.60 (release version as of 11/2017)&lt;br /&gt;
 VersionNumber ## returns 2.61 (beta)&lt;br /&gt;
 VersionNumber ## returns 2.60 (AVS+ release 2508)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|VersionString||VersionString()}}&lt;br /&gt;
: Returns AviSynth version info as a string (first line used in [[Version]]() command).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 VersionString ## returns &amp;quot;AviSynth 2.60, build:Mar 31 2015 [16:38:54]&amp;quot;&lt;br /&gt;
 VersionString ## returns &amp;quot;AviSynth 2.61, build:May 17 2016 [16:06:18] VC2008Exp&amp;quot;&lt;br /&gt;
 VersionString ## returns &amp;quot;AviSynth+ 0.1, (r2508, MT, x86_64)&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 function IsAvsPlus()&lt;br /&gt;
 {&lt;br /&gt;
     sVer = [[#LCase|LCase]](VersionString) &lt;br /&gt;
     return ([[#FindStr|FindStr]](sVer, &amp;quot;avisynth+&amp;quot;)    &amp;gt; 0)&lt;br /&gt;
     \   || (FindStr(sVer, &amp;quot;avisynthplus&amp;quot;) &amp;gt; 0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsVersionOrGreater||bool IsVersionOrGreater(int majorVersion, int minorVersion [,int bugfixVersion]) {{AvsPluscon}}}}&lt;br /&gt;
: Returns true if Avisynth+ version is is equal or greater than the required one in the parameters.&lt;br /&gt;
: Since Avisynth+ 3.5&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 isAtLeast3_10 = IsVersionOrGreater(3,10)&lt;br /&gt;
 isAtLeast3_5_1 = IsVersionOrGreater(3,5,1)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other helper functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: Non-categorized functions&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BuildPixelType||string BuildPixelType(string family, int bits, int chroma, bool compat, bool oldnames, clip sample_clip)}} {{AvsPluscon}}&lt;br /&gt;
: Creates a video format (pixel_type) string by giving a colorspace family, bit depth, optional chroma subsampling and/or a &lt;br /&gt;
: template clip, from which the undefined format elements are inherited.&lt;br /&gt;
: &lt;br /&gt;
:* string {{FuncArg|family}}&lt;br /&gt;
:: defines color family: &amp;quot;Y&amp;quot;, &amp;quot;YUV&amp;quot;, &amp;quot;YUVA&amp;quot;, &amp;quot;RGB&amp;quot;, &amp;quot;RGBA&amp;quot;&lt;br /&gt;
:: use &amp;quot;RGB&amp;quot; for both planar RGB and classic packed RGB24 and RGB48 - {{FuncArg|compat}} switches to classic formats &lt;br /&gt;
:* int {{FuncArg|bits}}&lt;br /&gt;
:: intended bit depth: 8, 10, 12, 14, 16, 32. In Avisynth+ 8-16 bits are integer formats, 32 bit is float&lt;br /&gt;
:* int {{FuncArg|chroma}}&lt;br /&gt;
:: chroma subsampling: 411, 420, 422, 444. Applies for YUV(A) formats. Ignored for RGB(A) and Y&lt;br /&gt;
:* bool {{FuncArg|compat}} default false&lt;br /&gt;
:: When set to true, function returns packed RGB(A) formats instead of planar RGB(A) (e.g. &amp;quot;RGB48&amp;quot; instead of &amp;quot;RGBP16&amp;quot;), when applicable&lt;br /&gt;
:* bool {{FuncArg|oldnames}} default false&lt;br /&gt;
:: when true, function returns &amp;quot;YV12&amp;quot;, &amp;quot;YV16&amp;quot;, &amp;quot;YV24&amp;quot; instead of &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV422P8&amp;quot; and &amp;quot;YUV444P8&amp;quot; respectively&lt;br /&gt;
:* clip {{FuncArg|sample_clip}} when given, the clip serves as the base format, all optional parameters (bits, subsampling) will modify only its respective properties&lt;br /&gt;
&lt;br /&gt;
:* see also: use [[#Other_helper_functions|ColorSpaceNameToPixelType]] to convert a colorspace string to an integer pixel_type&lt;br /&gt;
''Examples:'' &lt;br /&gt;
&lt;br /&gt;
:: define &amp;quot;YUV444P10&amp;quot;&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 family = &amp;quot;YUV&amp;quot;&lt;br /&gt;
 bits = 10&lt;br /&gt;
 chroma = 444&lt;br /&gt;
 compat = false&lt;br /&gt;
 oldformat = false&lt;br /&gt;
 s = BuildPixelType(family, bits, chroma, compat, oldformat)&lt;br /&gt;
 BlankClip(width=320,height=200,length=len,pixel_type=s,color=$008080).Info()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Change only bit depth to 16, sample format is of an existing clip&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 newbits = 16&lt;br /&gt;
 c = last&lt;br /&gt;
 s = BuildPixelType(bits=newbits, sample_clip=c)&lt;br /&gt;
 BlankClip(width=320,height=200,length=len,pixel_type=s,color=$008080).Info()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ColorSpaceNameToPixelType||int ColorSpaceNameToPixelType(string)}} {{AvsPluscon}}&lt;br /&gt;
: Creates a video format (pixel_type) by providing a colorspace name&lt;br /&gt;
: &lt;br /&gt;
:* some formats have multiple valid names: &amp;quot;YV12&amp;quot; is identical to &amp;quot;YUV420P8&amp;quot;, &amp;quot;YV16&amp;quot; = &amp;quot;YUV422P8&amp;quot;, &amp;quot;YV24&amp;quot; = &amp;quot;YUV444P8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[AviSynth Syntax]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_functions]]&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Basics]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Internal_functions</id>
		<title>Internal functions</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Internal_functions"/>
				<updated>2021-12-09T10:01:33Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Property set */ propSet for Clip value type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:64em&amp;quot; &amp;gt;&lt;br /&gt;
In addition to [[Internal_filters|internal filters]] AviSynth has a fairly large number of other (non-clip) internal functions. &lt;br /&gt;
&lt;br /&gt;
The input or/and output of these functions are not clips, but some other variables which can be used in a script. &lt;br /&gt;
{| style=&amp;quot;max-width:56em&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:1.0em;padding:2px 8px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid #aaa; background-color:#f9f9f9; padding:5px; font-size:95%; width:20em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin=auto;text-align:center&amp;quot;&amp;gt;'''Short Contents:'''&amp;lt;/div&amp;gt;&lt;br /&gt;
# [[#Boolean_functions|Boolean functions]]&lt;br /&gt;
# [[#Control_functions|Control functions]]&lt;br /&gt;
# [[#Global_options|Global options]]&lt;br /&gt;
# [[#Conversion_functions|Conversion functions]]&lt;br /&gt;
# [[#Numeric_functions|Numeric functions]]&lt;br /&gt;
# [[#Trigonometry_functions|Trigonometry functions]]&lt;br /&gt;
# [[#Bit_functions|Bit functions]]&lt;br /&gt;
# [[#Runtime_functions|Runtime functions]]&lt;br /&gt;
# [[#Functions_for_frame_properties|Functions for frame properties]]&lt;br /&gt;
# [[#Script_functions|Script functions]]&lt;br /&gt;
# [[#String_functions|String functions]]&lt;br /&gt;
# [[#Version_functions|Version functions]]&lt;br /&gt;
# [[#Other_helper_functions|Other helper functions]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;line-height:50%;margin:0;padding:0&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;width:4em;&amp;quot; |&amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right;clear:right;margin:1.0em;padding:2px 8px;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boolean functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These return true or false, if the condition that they test holds or not, respectively.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsBool||IsBool(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the bool type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 b = false&lt;br /&gt;
 IsBool(b) = true&lt;br /&gt;
 IsBool(1 &amp;lt; 2 &amp;amp;&amp;amp; 0 == 1) = true&lt;br /&gt;
 IsBool(123) = false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsClip||IsClip(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the clip type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
&lt;br /&gt;
 c = [[AviSource]](...)&lt;br /&gt;
 IsClip(c) = true&lt;br /&gt;
 IsClip(&amp;quot;c&amp;quot;) = false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsFloat||IsFloat(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the float type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 f = [[Internal_functions/Numeric_functions|Sqrt]](2)&lt;br /&gt;
 IsFloat(f) = true&lt;br /&gt;
 IsFloat(true) = false&lt;br /&gt;
 IsFloat(&amp;quot;42.&amp;quot;) = false&lt;br /&gt;
 IsFloat(2) = true   # ''ints are considered to be floats by this function''&lt;br /&gt;
 IsReallyFloat(2) = false # see below&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: As a workaround for the issue noted above, you may use the following [[User_functions|user function]]:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|46|3}} &amp;gt;&lt;br /&gt;
 ## return true for floats only&lt;br /&gt;
 function IsReallyFloat(val v)&lt;br /&gt;
 {&lt;br /&gt;
     return (IsInt(v)==false) &amp;amp;&amp;amp; IsFloat(v)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsInt||IsInt(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the int type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 IsInt(2) = true&lt;br /&gt;
 IsInt(2.1) = false&lt;br /&gt;
 IsInt(true) = false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsString||IsString(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is of the string type. {{FuncArg|var}} can be any expression allowed by the [[AviSynth Syntax]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 IsString(&amp;quot;test&amp;quot;) = true&lt;br /&gt;
 IsString(2.3) = false&lt;br /&gt;
 IsString([[Internal_functions/Conversion_functions|String]](2.3)) = true&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Exist||Exist(filename)}}&lt;br /&gt;
: Tests if the file specified by {{FuncArg|filename}} exists.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 filename = ...&lt;br /&gt;
 clp = Exist(filename) &lt;br /&gt;
 \ ? [[AviSource]](filename) &lt;br /&gt;
 \ : [[Internal_functions/Control_functions|Assert]](false, &amp;quot;file: &amp;quot; + filename + &amp;quot; does not exist&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Defined||Defined(var)}}&lt;br /&gt;
: Tests if {{FuncArg|var}} is defined. Can be used inside [[Script_functions]] to test if an optional argument has been given an explicit value.&lt;br /&gt;
: More formally, the function returns false if its argument (normally a function argument or variable) has the void ('undefined') type, otherwise it returns true.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 b_arg_supplied = Defined(arg)&lt;br /&gt;
 myvar = b_arg_supplied ? ... : ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|FunctionExists|{{AvsPluscon}}|FunctionExists(name)}}&lt;br /&gt;
: Tests if the function or filter name is defined in the script.&lt;br /&gt;
: {{FuncArg|name}} can be any string &amp;amp;ndash; it does not need to be a [[Script_variables#Variable_Names|legal name]].&lt;br /&gt;
: ''Example'' &amp;amp;ndash; see [[#Apply|Apply]] below&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|InternalFunctionExists|{{AvsPluscon}}|InternalFunctionExists(name)}}&lt;br /&gt;
: Tests if the function, filter or [[Clip_properties|property]] name is defined natively within [[AviSynth+]].&lt;br /&gt;
:* Unlike [[#FunctionExists|FunctionExists]], returns ''false'' for [[Plugins|external plugins]] and [[User_functions|user-defined functions]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|VarExist|{{AvsPluscon}}|VarExist(name)}}&lt;br /&gt;
: Tests if the variable exists or not. Note: if variable exists, it returns true regardless of the &amp;quot;defined&amp;quot; state of the variable&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Control functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These facilitate flow of control (loading of scripts, arguments checks, global settings adjustment, etc.).&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Apply||Apply(string ''func_string'' [, arg1 [, arg2 [, ... [, arg''n'']]]] )}}&lt;br /&gt;
: Calls the function or filter {{FuncArg|func_string}} with arguments {{FuncArg|arg1}}, {{FuncArg|arg2}}, ..., {{FuncArg|arg''n''}} (as many as supplied). &lt;br /&gt;
:* This provides a way to call a function or filter '''by name''', with arguments.&lt;br /&gt;
:* &amp;lt;code&amp;gt;Apply(&amp;quot;f&amp;quot;, x)&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code&amp;gt;f(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:* &amp;lt;code&amp;gt;Apply(&amp;quot;f&amp;quot;, x)&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code&amp;gt;[[#Eval|Eval]](&amp;quot;f(&amp;quot; + String(x) + &amp;quot;)&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:* Note that the clip argument must be supplied explicitly - the [[Last|special variable ''Last'']] is not used.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Building an expression dynamically  &lt;br /&gt;
 new_width = 352&lt;br /&gt;
 new_height = 288&lt;br /&gt;
 &lt;br /&gt;
 Apply(&amp;quot;[[BicubicResize]]&amp;quot;, Last, new_width, new_height)&lt;br /&gt;
 # Note that the clip argument must be supplied - 'Last' is not implicitly assumed&lt;br /&gt;
 &lt;br /&gt;
 ## the same action, using [[#Eval|Eval]]&lt;br /&gt;
 Eval( &amp;quot;BicubicResize(&amp;quot; + String(new_width) + &amp;quot;,&amp;quot; + String(new_height) + &amp;quot;)&amp;quot; )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## using a filter only if it exists (AviSynth 2.6)&lt;br /&gt;
 function MyFilter(clip C, string s) { &lt;br /&gt;
     return C.[[Subtitle]](&amp;quot;MyFilter: &amp;quot;+s, align=5)&lt;br /&gt;
 }&lt;br /&gt;
 ColorBars &lt;br /&gt;
 [[Control_structures|try]] {&lt;br /&gt;
     Apply(&amp;quot;MyFilter&amp;quot;, Last, &amp;quot;TEST&amp;quot;)&lt;br /&gt;
 } catch (err_msg) {&lt;br /&gt;
     # (ignore)&lt;br /&gt;
 }&lt;br /&gt;
 return Last&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## using a filter only if it exists ([[AviSynth+|AVS+]] only)&lt;br /&gt;
 ColorBars  &lt;br /&gt;
 return [[#FunctionExists|FunctionExists]](&amp;quot;MyFilter&amp;quot;) &lt;br /&gt;
 \ ? Apply(&amp;quot;MyFilter&amp;quot;, Last, &amp;quot;TEST&amp;quot;) &lt;br /&gt;
 \ : Last &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Eval||Eval(expression [, string ''name''])}}&lt;br /&gt;
: Evaluates an arbitrary {{FuncArg|expression}} and returns the result of that evaluation. '''It works exactly like [[#Import|Import]] below''', except&lt;br /&gt;
:* The expression to be evaluated comes from a string instead of a file; &lt;br /&gt;
:* The [[#Script_functions|values of]] ''ScriptName'', ''ScriptFile'' and ''ScriptDir'' are not changed;&lt;br /&gt;
:* The current working directory ([[wikipedia:Working_directory|CWD]]) is not changed.&lt;br /&gt;
: Argument {{FuncArg|name}} will be shown in the error message beside the script name. Both will be followed with the line number in {{FuncArg|expression}} where the error occurred.&lt;br /&gt;
&lt;br /&gt;
: Variables in your calling script are available within {{FuncArg|expression}}; [[Global|global variables]] are not required.&lt;br /&gt;
: Note '''Eval''' can return the result of ''any'' valid expression; usually a clip, but also a string, boolean etc.&lt;br /&gt;
: You can use '''Eval''' to construct and evaluate expressions dynamically inside your scripts, based on variable input data.&lt;br /&gt;
: '''Eval''' is useful as a [[Control_structures|control structure]] for creating multi-line ''block statements'' without requiring [[AviSynth%2B|AviSynth+]].&lt;br /&gt;
: '''Eval''' can be used to put aside the need to install external plugins if they are not actually used.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Building an expression dynamically &lt;br /&gt;
 ## calls [[BicubicResize]](last, 352, 288)&lt;br /&gt;
 settings = &amp;quot;352, 288&amp;quot;&lt;br /&gt;
 Eval( &amp;quot;BicubicResize(&amp;quot; + settings + &amp;quot;)&amp;quot; )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## if...else [[Control_structures|control structure]]&lt;br /&gt;
 option = true&lt;br /&gt;
 option  &lt;br /&gt;
 \ ? '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     [[Levels]](0, 1.2, 255, 20, 235)&lt;br /&gt;
     [[Spline36Resize]](720, 400)&lt;br /&gt;
     [[Sharpen]](0.2)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;) &lt;br /&gt;
 \ : '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     [[BicubicResize]](720, 400)&lt;br /&gt;
     [[Sharpen]](0.3)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## using a filter only if it is needed; &lt;br /&gt;
 ## in this example, [[SMDegrain]] only needs to be installed if the option is ''true''.&lt;br /&gt;
 option = false&lt;br /&gt;
 option &lt;br /&gt;
 \ ? '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     SMDegrain(tr=2, thSAD=250, contrasharp=true, refinemotion=true, lsb=true)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 \ : Last &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## accessing script variables&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=[[Subtitle]](&amp;quot;A&amp;quot;, align=5)&lt;br /&gt;
 '''Eval'''(&amp;quot;A&amp;quot;)&lt;br /&gt;
 return Last ## returns clip 'A'&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## setting script variables&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=Subtitle(&amp;quot;A&amp;quot;, align=5)&lt;br /&gt;
 '''Eval'''(&amp;quot;B = A.Invert&amp;quot;)&lt;br /&gt;
 return B ## returns clip 'A' with colors inverted&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Increment a global variable, based on a local variable&lt;br /&gt;
 Eval(&amp;quot;global my_counter = my_counter + &amp;quot; + [[#String|String]](increment)) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## multi-line example with comment and line continuation&lt;br /&gt;
 '''Eval'''(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 [[ColorBars]]&lt;br /&gt;
 [[BicubicResize]](352, 288)&lt;br /&gt;
 #FlipVertical&lt;br /&gt;
 Subtitle(&lt;br /&gt;
 \   &amp;quot;Width  = &amp;quot;  + [[#String|String]]([[Clip_properties|Width]]) + &amp;quot;\n&amp;quot;&lt;br /&gt;
 \ + &amp;quot;Height = &amp;quot; + String(Height)&lt;br /&gt;
 \ , align=7, lsp=0)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Empty expression &lt;br /&gt;
 ## results in error: 'Defined(u) == false'&lt;br /&gt;
 u = Eval(&amp;quot;#&amp;quot;)   &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## Error reporting&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=Subtitle(&amp;quot;A&amp;quot;, size=Height, align=2)&lt;br /&gt;
 Eval(&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 A&lt;br /&gt;
 foo(&amp;quot;bar&amp;quot;) ## ERROR!&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;, '''&amp;quot;eval_test_1&amp;quot;''') ## name for error reporting purposes&lt;br /&gt;
 return Last&lt;br /&gt;
 &lt;br /&gt;
 ''results in the error message:''&lt;br /&gt;
 Script error: there is no function named &amp;quot;foo&amp;quot;&lt;br /&gt;
 '''(eval_test_1, line 3)'''&lt;br /&gt;
 (E:\_test.avs, line 6)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Import||Import(filename)}}&lt;br /&gt;
{{ScriptFunctionCode|Import||Import(filename [, ...] [, bool utf8])}} {{AvsPluscon}}&lt;br /&gt;
: Evaluates the contents of another script and returns the result of that evaluation. '''It works exactly like [[#Eval|Eval]] above''', except&lt;br /&gt;
:* The expression to be evaluated comes from a file instead of a string; &lt;br /&gt;
:* The [[#Script_functions|values of]] ''ScriptName'', ''ScriptFile'' and ''ScriptDir'' are set to the current (imported) script;&lt;br /&gt;
:* The current working directory ([[wikipedia:Working_directory|CWD]]) is [[Internal_functions#SetWorkingDir|set]] to the current (imported) script.&lt;br /&gt;
:* {{FuncArg|utf8}} {{AvsPluscon}} if true, assumes filename(s) are [[wikipedia:UTF-8|UTF8]], else (default), assume ANSI.&lt;br /&gt;
&lt;br /&gt;
:[[Script_functions|Functions]], [[Script_variables|variables]] and loaded plugins declared inside the imported script are made available to the parent script. &amp;lt;b&amp;gt;Import&amp;lt;/b&amp;gt;'s return value  can be assigned to a variable of the parent script; this is most useful when the imported script ends with a clip.&lt;br /&gt;
&lt;br /&gt;
: Typically '''Import''' is used to make library functions available to the parent script, and the return value is not used. However this is simply a convention; it is not enforced by the [[AviSynth Syntax]]. Some indicative uses of '''Import''' include:&lt;br /&gt;
:* Storing multiple script-functions, variables and global variables for reuse by scripts (creation of script libraries).&lt;br /&gt;
:* Retrieving pre-built streams.&lt;br /&gt;
:* Retrieving dynamically configured pre-built streams (the core idea is that the importing script declares some global variables which the imported script uses to configure the stream that will return).&lt;br /&gt;
:'''Note 1''': Since the contents of the imported script are evaluated at the point of invocation, it is possible by enclosing the '''Import''' call in a nested scope (for example inside a function) to make available to the importing script the functions and globals of the imported script ''without'' its script-level variables.&lt;br /&gt;
:'''Note 2''': Any script with the [[AVSI]] extension in the AviSynth Plugins folder is automatically imported. This is useful for making script functions available to any new script you create without having to copy and paste.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # ''B.avsi''&lt;br /&gt;
 A.Invert&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ColorBars&lt;br /&gt;
 A=Subtitle(&amp;quot;A&amp;quot;, align=5) ## create clip 'A'&lt;br /&gt;
 Import(&amp;quot;B.avsi&amp;quot;)&lt;br /&gt;
 return Last ## returns clip 'A' with colors inverted&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## here we do not care about the return value (''mylib.avsi'' contains only functions)&lt;br /&gt;
 Import(&amp;quot;mylib.avsi&amp;quot;)  &lt;br /&gt;
 ...&lt;br /&gt;
 ## ''mysources.avsi'' loads predetermined file names from a folder into globals&lt;br /&gt;
 okflag = Import(&amp;quot;mysources.avsi&amp;quot;)  &lt;br /&gt;
 source = okflag ? global1 + global2 + global3 : [[BlankClip]]()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Select||Select(index, item0 [, item1 [, ...[, itemn]]])}}&lt;br /&gt;
: Returns the item selected by the {{FuncArg|index}} argument, which must be of int type (0 returns {{FuncArg|item0}}, 1 returns {{FuncArg|item1}}, ..., etc). Items can be any script [[Script_variables|variable]] or expression of any type and can even be mixed.&lt;br /&gt;
&lt;br /&gt;
:If {{FuncArg|index}} is out of range, an error is raised.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # select a clip-brush from a set of presets&lt;br /&gt;
 idx = 2&lt;br /&gt;
 brush = Select(idx, [[AviSource]](&amp;quot;round.avi&amp;quot;), &lt;br /&gt;
 \        rectangle, diagonal, diagonal.[[FlipHorizontal]])&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note - all branches are evaluated:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 index=1&lt;br /&gt;
 Select(index, &amp;quot;zero&amp;quot;, &amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &lt;br /&gt;
 \        Assert(false, &amp;quot;Select evaluates all branches&amp;quot;)) &lt;br /&gt;
 ## NOTE this code does not run - it throws [[#Assert|Assert]] error&lt;br /&gt;
 ## because Select evaluates all branches&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is not desired, use the [[Ternary_operator|conditional execution]] operator: &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 index=1&lt;br /&gt;
 x = (index==0) ? &amp;quot;zero&amp;quot;&lt;br /&gt;
 \ : (index==1) ? &amp;quot;one&amp;quot;&lt;br /&gt;
 \ : (index==2) ? &amp;quot;two&amp;quot;&lt;br /&gt;
 \ : Assert(false, &amp;quot;index out of range&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Default||Default(x, d)}}&lt;br /&gt;
: Returns {{FuncArg|x}} if '''Defined'''(x) is true, {{FuncArg|d}} otherwise. {{FuncArg|x}} must either be a function's argument or an already declared script variable (ie a variable which has been assigned a value) else an error will occur.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 function myfunc(clip c, ..., int &amp;quot;strength&amp;quot;) {&lt;br /&gt;
     ...&lt;br /&gt;
     strength = Default(strength, 4) # if not supplied make it 4&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Assert||Assert(condition [, err_msg])}}&lt;br /&gt;
: Does nothing if {{FuncArg|condition}} is true; throws an error, immediately terminating script execution, if {{FuncArg|condition}} is false. In the later case {{FuncArg|err_msg}}, if supplied, is presented to the user through a dialog box; else the standard message &amp;quot;Assert: assertion failed&amp;quot; shows up.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 function myfunc(clip c, ..., int &amp;quot;strength&amp;quot;) {&lt;br /&gt;
     ...&lt;br /&gt;
     strength = Default(strength, 4) # if not supplied make it 4&lt;br /&gt;
     Assert(strength &amp;gt; 0, &amp;quot;'strength' must be positive&amp;quot;)&lt;br /&gt;
     ...&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|NOP||NOP()}}&lt;br /&gt;
: This is a no-operation function provided mainly for conditional execution with non-return value items such as [[Import]], when no &amp;quot;else&amp;quot; condition is desired. That is, use it whenever the [[AviSynth Syntax]] requires an operation (such as with the ?: [[Operators#For_Booleans|operator]]) but your script does not need one.&lt;br /&gt;
: Return value: 0 (int type).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 preset = want_presets ? [[AviSource]](&amp;quot;c:\presets\any.avi&amp;quot;) : NOP&lt;br /&gt;
 ... &lt;br /&gt;
 loadlib ? [[Import]](&amp;quot;my_useful_functions.avs&amp;quot;) : NOP&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Undefined|v2.60|Undefined()}}&lt;br /&gt;
: Returns the undefined state.&lt;br /&gt;
: It's the state for which '''Defined'''() returns false.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 x = Undefined()&lt;br /&gt;
 Defined(x) # == false&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global Options ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{{ScriptFunctionH5|SetMemoryMax||SetMemoryMax(amount)}}&lt;br /&gt;
: Sets the maximum memory that AviSynth uses (in MB) to the value of {{FuncArg|amount}}. Setting to zero just returns the current Memory Max value. In the 2.5 series the default Memory Max value is 25% of the free physical memory, with a minimum of 16MB.&lt;br /&gt;
: The default Memory Max is also limited to 512MB.&lt;br /&gt;
: {{AvsPluscon}}In Avisynth+ this limit for default Memory Max is 1024MB for 32 bits and 4096MB on the x64 version&lt;br /&gt;
: DefaultMemoryMax = minimum(physical_memory / 4, secondary_memory_max_limit)&lt;br /&gt;
: for classic Avisynth see the table below&lt;br /&gt;
:{|class=&amp;quot;wikitable&amp;quot; &amp;lt;!-- width=50% --&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | Free memory&lt;br /&gt;
 | &amp;lt;64&lt;br /&gt;
 | 128&lt;br /&gt;
 | 256&lt;br /&gt;
 | 512&lt;br /&gt;
 | 1024&lt;br /&gt;
 | 2048&lt;br /&gt;
 | 3072&lt;br /&gt;
 |-&lt;br /&gt;
 | Default Max&lt;br /&gt;
 | 16&lt;br /&gt;
 | 32&lt;br /&gt;
 | 64&lt;br /&gt;
 | 192&lt;br /&gt;
 | 448&lt;br /&gt;
 | 512&lt;br /&gt;
 | 512&lt;br /&gt;
 |}&lt;br /&gt;
: In some versions there is a default setting of 5MB, which is quite low. If you encounter problems (e.g. low speed) try to set this values to at least 32MB. Too high values can result in crashes because of 2GB address space limit.&lt;br /&gt;
: Return value: Actual MemoryMax value set.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SetMemoryMax(128)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:{{AvsPluscon}}{{FuncDef|SetMemoryMax(int, int “type”, int “index”)}}&lt;br /&gt;
:With additional arguments for devices such as GPUs. Memory usage is managed individually for devices such as GPUs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2||int|}}&lt;br /&gt;
:::Device (including CPU) memory limit (MB)&lt;br /&gt;
::{{Par2|type|int|}}&lt;br /&gt;
:::Device type. The following values ​​are available:&lt;br /&gt;
::::DEV_TYPE_CPU: CPU (default)&lt;br /&gt;
::::DEV_TYPE_CUDA: GPU&lt;br /&gt;
::{{Par2|index|int|}}&lt;br /&gt;
:::Device number. Same as onCUDA device_index. Only 0 for DEV_TYPE_CPU.&lt;br /&gt;
:::Default value: 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{{ScriptFunctionH5|SetCacheMode||SetCacheMode(mode)}}&lt;br /&gt;
:{{AvsPluscon}}Fine tunes the internal frame caching strategy in AviSynth+.&lt;br /&gt;
: Available values:&lt;br /&gt;
::* 0 or CACHE_FAST_START start up time and size balanced mode (default)&lt;br /&gt;
::* 1 or CACHE_OPTIMAL_SIZE slow start up but optimal speed and cache size&lt;br /&gt;
::&lt;br /&gt;
* since Avisynth+ 3.6.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{{ScriptFunctionH5|SetMaxCPU||SetMaxCPU([string feature1, string feature2, ...])}}&lt;br /&gt;
: {{AvsPluscon}}Limits the CPU capabilities which AviSynth reports to its core and external plugins through GetCPUFlags.&lt;br /&gt;
: Available values:&lt;br /&gt;
::* &amp;quot;&amp;quot; or &amp;quot;none&amp;quot; for zero SIMD support, no processor flags are reported&lt;br /&gt;
::* &amp;quot;mmx&amp;quot;, &amp;quot;sse&amp;quot;, &amp;quot;sse2&amp;quot;, &amp;quot;sse3&amp;quot;, &amp;quot;ssse3&amp;quot;, &amp;quot;sse4&amp;quot; or &amp;quot;sse4.1&amp;quot;, &amp;quot;sse4.2&amp;quot;, &amp;quot;avx, &amp;quot;avx2&amp;quot;&lt;br /&gt;
:: &lt;br /&gt;
::Parameters are case insensitive.&lt;br /&gt;
::Note: &amp;quot;avx2&amp;quot; triggers FMA3 flag as well.&lt;br /&gt;
::&lt;br /&gt;
::*Processor options w/o any modifier will limit the CPU flag report to at most the processor level.&lt;br /&gt;
::*When &amp;quot;feature&amp;quot; is ended by '+', relevant processor feature flag will be switched on&lt;br /&gt;
::*When &amp;quot;feature&amp;quot; is ended by '-', relevant processor feature flag will be removed.&lt;br /&gt;
::Multiple options can be put in a comma separated list. They will evaluate in that order.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|60|2}} &amp;gt;&lt;br /&gt;
 SetMaxCPU(&amp;quot;SSE2&amp;quot;) #reports at most SSE2 processor (even if AVX2 is available)&lt;br /&gt;
 SetMaxCPU(&amp;quot;avx,sse4.1-&amp;quot;) #limits to avx2 but explicitely removes reporting sse4.1 support&lt;br /&gt;
 SetMaxCPU(&amp;quot;none,avx2+&amp;quot;) #limits to plain C, then switches on AVX2-only support&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* since Avisynth+ 3.6&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|SetWorkingDir||SetWorkingDir(path)}}&lt;br /&gt;
: Sets the default directory for AviSynth to the {{FuncArg|path}} argument.&lt;br /&gt;
: This is primarily for easy loading of source clips, [[Import|importing]] scripts, etc. It does not affect plugins' autoloading. &lt;br /&gt;
: Return value is 0 if successful, -1 otherwise.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SetWorkingDir(&amp;quot;c:\my_presets&amp;quot;)&lt;br /&gt;
 [[AviSource]](&amp;quot;border_mask.avi&amp;quot;)  # this loads c:\my_presets\border_mask.avi&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|SetPlanarLegacyAlignment||SetPlanarLegacyAlignment(mode)}}&lt;br /&gt;
: Set alignment mode for [[planar]] frames. {{FuncArg|mode}} can either be true or false.&lt;br /&gt;
: Some older [[External_plugins|plugins]] illegally assume the layout of video frames in memory. This special filter forces the memory layout of planar frames to be compatible with prior versions of AviSynth. The filter works on the [[The_script_execution_model/Evaluation_of_runtime_scripts|GetFrame]]() call stack, so it effects filters '''before''' it in the script.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Example : Using an older version of Mpeg2Source() (1.10 or older):&lt;br /&gt;
 &lt;br /&gt;
 LoadPlugin(&amp;quot;...\Mpeg2Decode.dll&amp;quot;)&lt;br /&gt;
 Mpeg2Source(&amp;quot;test.d2v&amp;quot;)         # A plugin that illegally assumes the layout of memory&lt;br /&gt;
 SetPlanarLegacyAlignment(true)  # Set legacy memory alignment for prior statements&lt;br /&gt;
 [[Convert|ConvertToYUY2]]()     # Statements through to the end of the script have&lt;br /&gt;
 ...                             # advanced memory alignment.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_AllowFloatAudio||global OPT_AllowFloatAudio &amp;amp;#61; true ## default false}}&lt;br /&gt;
: [[Float]] audio is converted to 16 bit when [[Frameserver|frameserving]] through [[ACM]], unless [[Internal_functions#OPT_AllowFloatAudio|OPT_AllowFloatAudio]] is set to true (this option enables WAVE_FORMAT_IEEE_FLOAT audio output&amp;lt;sup&amp;gt;[http://forum.doom9.org/showthread.php?t=109608]&amp;lt;/sup&amp;gt;). In that case the audio is kept as it is. When accessing AviSynth directly (like MeGUI, BeHappy or ffmpeg do for example), there is no automatic conversion.&lt;br /&gt;
&lt;br /&gt;
:The automatic conversion is done for clients that cannot handle [[Float]] audio (in the old days most of them couldn't). Note conversion takes place ''after'' the script processing is finished. [[Float]] audio is always allowed within the script.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_UseWaveExtensible||global OPT_UseWaveExtensible &amp;amp;#61; true ## default false}}&lt;br /&gt;
: This option enables WAVE_FORMAT_EXTENSIBLE audio output. The default is WAVE_FORMAT_EX.&lt;br /&gt;
: '''Note:''' The default DirectShow component for .AVS files, &amp;quot;AVI/WAV File Source&amp;quot;, does not correctly implement WAVE_FORMAT_EXTENSIBLE processing, so many application may not be able to detect the audio track. There are third party DirectShow readers that do work correctly. Intermediate work files written using the AVIFile interface for later DirectShow processing will work correctly if they use the DirectShow &amp;quot;File Source (async)&amp;quot; component or equivalent. &lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_dwChannelMask|v2.60|global OPT_dwChannelMask(int v)}}&lt;br /&gt;
: This option enables you to set ChannelMask. It overrides WAVEFORMATEXTENSIBLE.dwChannelMask&amp;lt;sup&amp;gt;[[http://wiki.multimedia.cx/index.php?title=WAVEFORMATEXTENSIBLE]&amp;lt;/sup&amp;gt; which is set according to this table&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 0x00004, // 1   -- -- Cf&lt;br /&gt;
 0x00003, // 2   Lf Rf&lt;br /&gt;
 0x00007, // 3   Lf Rf Cf&lt;br /&gt;
 0x00033, // 4   Lf Rf -- -- Lr Rr&lt;br /&gt;
 0x00037, // 5   Lf Rf Cf -- Lr Rr&lt;br /&gt;
 0x0003F, // 5.1 Lf Rf Cf Sw Lr Rr&lt;br /&gt;
 0x0013F, // 6.1 Lf Rf Cf Sw Lr Rr -- -- Cr&lt;br /&gt;
 0x0063F, // 7.1 Lf Rf Cf Sw Lr Rr -- -- -- Ls Rs&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_AVIPadScanlines|v2.60|global OPT_AVIPadScanlines &amp;amp;#61; true ## default false}}&lt;br /&gt;
: This option enables DWORD aligned planar padding. Default is packed aligned planar padding. See [[AVIFile output emulation|memory alignment used in the AVIFile output emulation]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_VDubPlanarHack|v2.60|global OPT_VDubPlanarHack &amp;amp;#61; true ## default false}}&lt;br /&gt;
: This option enables flipped YV24 and YV16 chroma planes. This is an hack for early versions of Virtualdub with YV24/YV16 support. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_V210|{{AvsPluscon}}|global OPT_Enable_V210 &amp;amp;#61; true ## default false}}&lt;br /&gt;
: For 10bit YUV422, [[Frameserver|Frameserve]] interleaved V210 instead of planar P210. (VfW)&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
{{BoldColor|black|100|§}} ''VfW'' here means [[wikipedia:Video_for_Windows|Video For Windows]] clients such as VirtualDub are affected, but not other clients such as ffmpeg.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_Y3_10_10|{{AvsPluscon}}|global OPT_Enable_Y3_10_10 &amp;amp;#61; true ## default false}}&lt;br /&gt;
: For 10bit YUV422, set the [[FourCC]] to Y3[10][10] ('Y', '3', 10, 10) instead of P210  ('P', '2', '1', '0'). (VfW) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_Y3_10_16|{{AvsPluscon}}|global OPT_Enable_Y3_10_16 &amp;amp;#61; true ## default false}}&lt;br /&gt;
: For 16bit YUV422, use Y3[10][16] instead of P216 (VfW)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_b64a|{{AvsPluscon}}|global OPT_Enable_b64a &amp;amp;#61; true ## default false}}&lt;br /&gt;
: Use b64a instead of BRA[64] (VfW)&lt;br /&gt;
: works for avs+ version above r2636&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|OPT_Enable_PlanarToPackedRGB|{{AvsPluscon}}|global OPT_Enable_PlanarToPackedRGB &amp;amp;#61; true ## default false}}&lt;br /&gt;
: Convert Planar RGB to packed RGB (VfW)&lt;br /&gt;
: Planar RGB 8, 10, 12, 14 and 16 bits are reported as G3[0][8], G3[0][10], G3[0][12], G3[0][14] and G3[0][16]&lt;br /&gt;
: Planar RGBA 8, 10, 12, 14 and 16 bits are reported as G4[0][8], G4[0][10], G4[0][12], G4[0][14] and G4[0][16]&lt;br /&gt;
: When these [[FourCC]] codes are not handled through VfW, use OPT_Enable_PlanarToPackedRGB=true.&lt;br /&gt;
: Avisynth+ will convert the clip from planar to RGB64 (packed 16bit RGB) and will negotiate this format instead&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conversion functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These convert between different types.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Value||Value(string)}}&lt;br /&gt;
: Converts a decimal string to its associated numeric value.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Value (&amp;quot;-2.7&amp;quot;) = -2.7&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|HexValue||HexValue(string)}}&lt;br /&gt;
{{ScriptFunctionCode|HexValue||HexValue(string [, int pos])}} {{AvsPluscon}}&lt;br /&gt;
: Converts a hexadecimal string to its associated numeric value. &lt;br /&gt;
:* {{FuncArg|pos}} sets the starting point of the numeric parser. All characters to the left of {{FuncArg|pos}} are ignored. Default is 1 (start of string).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 HexValue (&amp;quot;FF00&amp;quot;) = 65280&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Hex|v2.60|Hex(int)}}&lt;br /&gt;
{{ScriptFunctionCode|Hex||Hex(int [, int width])}} {{AvsPluscon}}&lt;br /&gt;
: Converts a numerical value to its hexadecimal value. See [[Colors]] for more information on specifying colors.&lt;br /&gt;
:* {{FuncArg|width}} sets the minimum width of the returned string. &lt;br /&gt;
::Resulting string will be left-padded with zeroes as needed. Allowed range is 0..8; default is 0.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Hex (10824234) = &amp;quot;A52A2A&amp;quot;&lt;br /&gt;
 Hex (15 width=2) = &amp;quot;0F&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|String||String(var [, string format_string])}}&lt;br /&gt;
: Converts a variable to a string. ''String'' arguments are passed along unchanged; ''bools'' are converted to &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;; numbers are formatted as described below; other [[Script_variables#Variable_Types|variable types]] (''clip'', ''val'') are converted to the empty string. &lt;br /&gt;
:The syntax of {{FuncArg|format_string}} is as follows:&lt;br /&gt;
::&amp;lt;code&amp;gt;'''%'''[flags][width][.precision]'''f'''&amp;lt;/code&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;i&amp;gt;the leading &amp;lt;/i&amp;gt;'&amp;lt;tt&amp;gt;%&amp;lt;/tt&amp;gt;'&amp;lt;i&amp;gt; and trailing &amp;lt;/i&amp;gt;'&amp;lt;tt&amp;gt;f&amp;lt;/tt&amp;gt;'&amp;lt;i&amp;gt; are required.&amp;lt;/i&amp;gt;&lt;br /&gt;
:The parts of {{FuncArg|format_string}} are:&lt;br /&gt;
:; ''flags'' &lt;br /&gt;
::{| class=wikitable&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&lt;br /&gt;
|left align (right align by default)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;&lt;br /&gt;
|always print the +/- sign (show only '&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;' by default)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;&lt;br /&gt;
|pad (see ''width'') with leading zeroes (pad with spaces by default)&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;amp;nbsp;'&amp;lt;tt&amp;gt; &amp;lt;/tt&amp;gt;'&amp;amp;nbsp;&lt;br /&gt;
|print a blank instead of a '&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;'&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:center&amp;quot;|&amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt;&lt;br /&gt;
|always print the decimal point (dropped by default if there are no decimal digits)&amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
:; ''width''&lt;br /&gt;
:: the minimum width (the string is never truncated if it is wider than ''width'')&lt;br /&gt;
:; ''precision''&lt;br /&gt;
:: the number of decimal digits&lt;br /&gt;
: You can also put arbitrary text around {{FuncArg|format_string}}, similar to the C-language [http://www.tutorialspoint.com/c_standard_library/c_function_sprintf.htm sprintf] function.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|62|2}} &amp;gt;&lt;br /&gt;
 Subtitle( String(1.23) )                    # '1.230000' (six decimals by default for floats)&lt;br /&gt;
 Subtitle( String(123) )                     # '123'      (no decimals by default for ints)&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%0.2f&amp;quot; ))           # '1.23'&lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%0.1f&amp;quot; ))           # '1.2'&lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%5.1f&amp;quot;) )           # '  1.2'    (padded to 5 characters wide)&lt;br /&gt;
 Subtitle( String(1.23, &amp;quot;%1.3f&amp;quot;) )           # '1.230'    (3 decimals; add trailing zeroes)&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(123, &amp;quot;%0.0f&amp;quot;) )            # '123'      (no decimals for precision=0)&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%''#''0.0f&amp;quot;) )           # '123.'     ('#' flag: always show decimal point)&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%0.2f&amp;quot;) )            # '123.00'   (2 decimals: add trailing zeroes)&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%5.0f&amp;quot;) )            # '  123'    (padded to 5 characters wide using ' ')&lt;br /&gt;
 Subtitle( String(123, &amp;quot;%05.0f&amp;quot;) )           # '00123'    (padded to 5 characters wide using '0')&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%0.0f&amp;quot;) )          # 'PI=3'     (text around format_string)&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%''#''0.0f&amp;quot;) )         # 'PI=3.'    ('#' flag: always show decimal point)&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%2.0f&amp;quot;) )          # 'PI= 3'&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%3.2f&amp;quot;) )          # 'PI=3.14'&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%0.5f&amp;quot;) )          # 'PI=3.14159'&lt;br /&gt;
 Subtitle( String(PI, &amp;quot;PI=%6.3f&amp;quot;) )          # 'PI= 3.142'&lt;br /&gt;
 &lt;br /&gt;
 Subtitle( String(32, &amp;quot;%0.0f&amp;quot;) )             # '32'&lt;br /&gt;
 Subtitle( String(32, &amp;quot;%3.0f&amp;quot;) )             # ' 32'&lt;br /&gt;
 Subtitle( String(32, &amp;quot;%8.0f&amp;quot;) )             # '      32'&lt;br /&gt;
 &lt;br /&gt;
 ## arbitrary text around format_string:&lt;br /&gt;
 Subtitle( String(Last.Height, &amp;quot;Clip height is %0.0f&amp;quot;) ) # 'Clip height is 480'&lt;br /&gt;
 ## same output as above but using string concatenation:&lt;br /&gt;
 Subtitle( &amp;quot;Clip height is &amp;quot; + String(Last.Height) )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Numeric functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide common mathematical operations on numeric variables.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Max||Max(float, float [, ...])}}&lt;br /&gt;
: Returns the maximum value of a set of numbers.&lt;br /&gt;
: If all the values are of type Int, the result is an Int. If any of the values are of type Float, the result is a Float.&lt;br /&gt;
: This may cause an unexpected result when an Int value greater than 16777216 is mixed with Float values.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Max (1, 2) = 2&lt;br /&gt;
 Max (5, 3.0, 2) = 5.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Min||Min(float, float [, ...])}}&lt;br /&gt;
: Returns the minimum value of a set of numbers.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Min (1, 2) = 1&lt;br /&gt;
 Min (5, 3.0, 2) = 2.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|MulDiv||MulDiv(int, int, int)}}&lt;br /&gt;
: Multiplies two ints (m, n) and divides the product by a third (d) in a single operation, with 64 bit intermediate result. The actual equation used is &amp;lt;tt&amp;gt; (m * n + d / 2) / d &amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 MulDiv (1, 1, 2) = 1&lt;br /&gt;
 MulDiv (2, 3, 2) = 3&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Floor||Floor(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round down on any fractional amount).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Floor(1.2) = 1&lt;br /&gt;
 Floor(1.6) = 1&lt;br /&gt;
 Floor(-1.2) = -2&lt;br /&gt;
 Floor(-1.6) = -2&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Ceil||Ceil(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round up on any fractional amount).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Ceil(1.2) = 2&lt;br /&gt;
 Ceil(1.6) = 2&lt;br /&gt;
 Ceil(-1.2) = -1&lt;br /&gt;
 Ceil(-1.6) = -1&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Round||Round(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round off to nearest integer).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Round(1.2) = 1&lt;br /&gt;
 Round(1.6) = 2&lt;br /&gt;
 Round(-1.2) = -1&lt;br /&gt;
 Round(-1.6) = -2&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Int||Int(float)}}&lt;br /&gt;
: Converts from single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value to int (round towards zero).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Int(1.2) = 1&lt;br /&gt;
 Int(1.6) = 1&lt;br /&gt;
 Int(-1.2) = -1&lt;br /&gt;
 Int(-1.6) = -1&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Float||Float(int)}}&lt;br /&gt;
: Converts int to single-precision, [http://en.wikipedia.org/wiki/Floating_point floating-point] value. Integer values that require more than 24-bits to be represented will have their lower 8-bits truncated yielding unexpected values.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Float(4) = 4.0&lt;br /&gt;
 Float(4) / 3 = 1.333 (while 4 / 3 = 1 , due to integer division)&lt;br /&gt;
 Float(123456789) = 123456792.0 (error = -3, 0.000002%)&lt;br /&gt;
 Float(1234567890) = 1234567936.0 (error = -46, 0.000004%)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Fmod|v2.60|Fmod(float, float)}}&lt;br /&gt;
: Returns the modulo of the argument. Output is float.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Fmod(3.5, 0.5) = 0 (since 3.5 - 7*0.5 = 0)&lt;br /&gt;
 Fmod(3.5, 1.0) = 0.5 (since 3.5 - 3*1.0 = 0.5)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Pi||Pi()}}&lt;br /&gt;
: Returns the value of the {{BoldColor|black|110|π}} constant (the ratio of a circle's circumference to its diameter).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 d = Pi()    # d == 3.141592653&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Exp||Exp(float)}}&lt;br /&gt;
: Returns the natural (base-e) exponent of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Exp(1) = 2.7182818&lt;br /&gt;
 Exp(0) = 1.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Log||Log(float)}}&lt;br /&gt;
: Returns the natural (base-e) logarithm of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Log(1) = 0.0&lt;br /&gt;
 Log(10) = 2.30259&lt;br /&gt;
 Log(Exp(1)) = 1.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Log10|v2.60|Log10(float)}}&lt;br /&gt;
: Returns the common logarithm of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Log10(1.0) = 0&lt;br /&gt;
 Log10(10.0) = 1.0&lt;br /&gt;
 Log10(2.0) = 0.3010299957&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Pow||Pow(float base, float power)}}&lt;br /&gt;
: Returns {{FuncArg|base}} raised to a {{FuncArg|power}}.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Pow(2, 3) = 8&lt;br /&gt;
 Pow(3, 2) = 9&lt;br /&gt;
 Pow(3.45, 1.75) = 8.7334&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sqrt||Sqrt(float)}}&lt;br /&gt;
: Returns the square root of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sqrt(1) = 1.0&lt;br /&gt;
 Sqrt(2) = 1.4142&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Abs||Abs(float or int)}}&lt;br /&gt;
: Returns the absolute value of its argument (returns float for float, integer for integer).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Abs(-3.8) = 3.8&lt;br /&gt;
 Abs(-4) = 4&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sign||Sign(float)}}&lt;br /&gt;
: Returns the sign of the value passed as argument (1, 0 or -1).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sign(-3.5) = -1&lt;br /&gt;
 Sign(3.5) = 1&lt;br /&gt;
 Sign(0) = 0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Frac||Frac(float)}}&lt;br /&gt;
: Returns the fractional portion of the value provided.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Frac(3.7) = 0.7&lt;br /&gt;
 Frac(-1.8) = -0.8&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Rand||Rand([int max] [, bool scale] [, bool seed])}}&lt;br /&gt;
: Returns a random integer value. All parameters are optional. &lt;br /&gt;
:;max&lt;br /&gt;
::sets the maximum value+1 (default 32768) and can be set negative for negative results. It operates either in scaled or modulus mode (default {{FuncArg|scale}}=true only if [[#Abs|Abs]]({{FuncArg|max}}) &amp;gt; 32768, false otherwise). &lt;br /&gt;
:;scale&lt;br /&gt;
::When true, ''scales'' the internal random number generator value to the maximum value, while ''modulus mode'' ({{FuncArg|scale}}=false) uses the remainder from an integer divide of the random generator value by the maximum. Modulus mode is recommended for smaller maximums. &lt;br /&gt;
:;seed&lt;br /&gt;
::When true, seeds the random number generator with the current time. {{FuncArg|seed}} defaults to false and probably isn't necessary, although it's there just in case. &lt;br /&gt;
: Typically, this function would be used with the [[#Select|'''Select''']] function for random clips. &lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Select(Rand(5), clip1, clip2, clip3, clip4, clip5)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Spline||Spline(float X, x1, y1, x2, y2, .... [, bool cubic])}}&lt;br /&gt;
: Interpolates the Y value at point X using the control points {{FuncArg|x1}}/{{FuncArg|y1}}, ... There have to be at least 2 x/y-pairs. The interpolation can be {{FuncArg|cubic}} (the result is a spline) or linear (the result is a polygon). Default is cubic.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Spline(5, 0, 0, 10, 10, 20, 0, false) = 5&lt;br /&gt;
 Spline(5, 0, 0, 10, 10, 20, 0, true) = 7&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Continued Numerator, Denominator =====&lt;br /&gt;
{{ScriptFunctionCode|ContinuedNumerator|v2.60|ContinuedNumerator(float, int limit)}}&lt;br /&gt;
{{ScriptFunctionCode|ContinuedNumerator|v2.60|ContinuedNumerator(int, int, int limit)}}&lt;br /&gt;
{{ScriptFunctionCode|ContinuedDenominator|v2.60|ContinuedDenominator(float, int limit)}}&lt;br /&gt;
{{ScriptFunctionCode|ContinuedDenominator|v2.60|ContinuedDenominator(int, int, int limit)}}&lt;br /&gt;
: The rational pair ('''ContinuedNumerator''', '''ContinuedDenominator''') returned has the smallest possible denominator such that the absolute error is less than 1/{{FuncArg|limit}}. More information can be found on [http://en.wikipedia.org/wiki/Continued_fraction wikipedia].&lt;br /&gt;
: If {{FuncArg|limit}} is not specified in the Float case the rational pair returned is to the limit of the single precision floating point value. Thus (float)((double)Num/(double)Den) == V.&lt;br /&gt;
: In the Int case if {{FuncArg|limit}} is not specified then the normalized original values will be returned, i.e. reduced by the ''GCD'' (greatest common divisor).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ContinuedNumerator(PI(), limit=5000]) = 355&lt;br /&gt;
 ContinuedDenominator(PI(), limit=5000) = 113&lt;br /&gt;
 &lt;br /&gt;
 ContinuedNumerator(PI(), limit=50]) = 22&lt;br /&gt;
 ContinuedDenominator(PI(), limit=50) = 7&lt;br /&gt;
 &lt;br /&gt;
 ContinuedNumerator(355, 113, limit=50]) = 22&lt;br /&gt;
 ContinuedDenominator(355, 113, limit=50) = 7&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Trigonometry functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: relationships involving lengths and angles of triangles. &lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sin||Sin(float)}}&lt;br /&gt;
: Returns the sine of the argument (assumes it is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sin(Pi()/4) = 0.707&lt;br /&gt;
 Sin(Pi()/2) = 1.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Cos||Cos(float)}}&lt;br /&gt;
: Returns the cosine of the argument (assumes it is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Cos(Pi()/4) = 0.707&lt;br /&gt;
 Cos(Pi()/2) = 0.0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Tan|v2.60|Tan(float)}}&lt;br /&gt;
: Returns the tangent of the argument (assumes it is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Tan(Pi/4) = 1.0&lt;br /&gt;
 Tan(Pi/2) = not defined&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: 32 bit IEEE floats do not have sufficient resolution to exactly represent&lt;br /&gt;
: pi/2 so AviSynth returns a large positive number for the value slightly less&lt;br /&gt;
: than pi/2 and a large negative value for the next possible value which is&lt;br /&gt;
: slightly greater than pi/2.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Asin|v2.60|Asin(float)}}&lt;br /&gt;
: Returns the inverse of the sine of the argument (output is radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Asin(0.707) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Asin(1.0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Acos|v2.60|Acos(float)}}&lt;br /&gt;
: Returns the inverse of the cosine of the argument (output is in radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Acos(0.707) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Acos(0.0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Atan|v2.60|Atan(float)}}&lt;br /&gt;
: Returns the inverse of the tangent of the argument (output is in radians).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Atan(0.707) = 0.6154085176&lt;br /&gt;
 Atan(1.0) = 0.7853981634 (~ Pi/4)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Atan2|v2.60|Atan2(float, float)}}&lt;br /&gt;
: Returns the angle between the positive x-axis of a plane and the point given by the coordinates (x, y) on it. Output is in radians. See [http://en.wikipedia.org/wiki/Atan2 wikipedia] for more information.&lt;br /&gt;
: y is the first argument and x is the second argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Atan2(1.0, 0) = 1.570796327 (~ Pi/2)&lt;br /&gt;
 Atan2(1.0, 1.0) = 0.7852471634 (~ Pi/4)&lt;br /&gt;
 Atan2(-1.0, -1.0) = -2.356194490 (~ -3Pi/4)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Sinh|v2.60|Sinh(float)}}&lt;br /&gt;
: Returns the hyperbolic sine of the argument. See [http://en.wikipedia.org/wiki/Hyperbolic_function wikipedia] for more information.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Sinh(2.0) = 3.626860408&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Cosh|v2.60|Cosh(float)}}&lt;br /&gt;
: Returns the hyperbolic cosine of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Cosh(2.0) = 3.762195691&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Tanh|v2.60|Tanh(float)}}&lt;br /&gt;
: Returns the hyperbolic tangent of the argument.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Tanh(2.0) = 0.9640275801&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bit functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: The functions are ''bitwise operators''. They manipulate individual bits within integer variables. This means that their arguments (being integers) are converted to binary numbers, the operation is performed on their bits, and the resulting binary number is converted back again.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitAnd|v2.60|BitAnd(int, int)}}&lt;br /&gt;
: Returns the bitwise AND (sets bit to 1 if both bits are 1 and sets bit to 0 otherwise).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitAnd(5, 6) = 4 # since 5 = 101, 6 = 110, and 101&amp;amp;110 = 100&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitNot|v2.60|BitNot(int)}}&lt;br /&gt;
: Returns the bit-inversion (sets bit to 1 if bit is 0 and vice-versa).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitNOT(5) = -6 &lt;br /&gt;
 # since  5 = 101,  &lt;br /&gt;
 # and ~101 = 1111 1111 1111 1111 1111 1111 1111 1010 = -6&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: Note: 1111 1111 1111 1111 1111 1111 1111 1010 &lt;br /&gt;
::= (2^32-1)-2^0-2^2 = 2^32-(1+2^0+2^2) &lt;br /&gt;
::= (signed) -(1+2^0+2^2) = -6&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitOr|v2.60|BitOr(int, int)}}&lt;br /&gt;
: Returns the bitwise inclusive OR (sets bit to 1 if one of the bits (or both) is 1 and sets bit to 0 otherwise).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitOr(5, 6) = 7 # since 5 = 101, 6 = 110, and 101|110 = 111&lt;br /&gt;
 BitOr(4, 2) = 6 # since 4 = 100, 2 = 010, and 100|010 = 110&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitXor|v2.60|BitXor(int, int)}}&lt;br /&gt;
: Returns the bitwise exclusive OR (sets bit to 1 if exactly one of the bits is 1 and sets bit to 0 otherwise).&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 BitXor(5, 6) = 3 # since 5 = 101, 6 = 110, and 101^110 = 011&lt;br /&gt;
 BitXor(4, 2) = 6 # since 4 = 100, 2 = 010, and 100^010 = 110&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit shift left =====&lt;br /&gt;
{{ScriptFunctionCode|BitLShift|v2.60|BitLShift(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitShl|v2.60|BitShl(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitSal|v2.60|BitSal(int, int)}}&lt;br /&gt;
: Shift the bits of a number to the left.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Shifts the bits of the number 5 two bits to the left:&lt;br /&gt;
 BitLShift(5, 2) = 20 (since 101 &amp;lt;&amp;lt; 2 = 10100)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit shift right =====&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftA|v2.60|BitRShiftA(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftS|v2.60|BitRShiftS(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitSar|v2.60|BitSar(int, int)}}&lt;br /&gt;
: Shift the bits of an integer to the right. (Arithmetic, Sign bit fill, Right Shift)&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Shifts the bits of the number -42 one bit to the right, treating it as signed:&lt;br /&gt;
 BitRShiftA(-42, 1) = -21 &lt;br /&gt;
 # (since 1111 1111 1111 1111 1111 1111 1101 0110 &amp;gt;&amp;gt; 1  &lt;br /&gt;
 #      = 1111 1111 1111 1111 1111 1111 1110 1011)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit shift right, unsigned =====&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftL|v2.60|BitRShiftL(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRShiftU|v2.60|BitRShiftU(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitShr|v2.60|BitShr(int, int)}}&lt;br /&gt;
: Shift the bits of an unsigned integer to the right. (Logical, zero fill, Right Shift)&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Shifts the bits of the number -42 one bit to the right, treating it as unsigned:&lt;br /&gt;
 BitRShiftL(-42, 1) = 2147483627 &lt;br /&gt;
 # (since 1111 1111 1111 1111 1111 1111 1101 0110 &amp;gt;&amp;gt; 1 &lt;br /&gt;
 #      = 0111 1111 1111 1111 1111 1111 1110 1011)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
: Note: -42 = -(1+2^0+2^3+2^5) = (unsigned) (2^32-1)-(2^0+2^3+2^5) = &lt;br /&gt;
::1111 1111 1111 1111 1111 1111 1101 0110&lt;br /&gt;
&lt;br /&gt;
===== Bit rotate left =====&lt;br /&gt;
{{ScriptFunctionCode|BitLRotate|v2.60|BitLRotate(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRol|v2.60|BitRol(int, int)}}&lt;br /&gt;
: Rotates the bits of an integer to the left by the number of bits specified in the second operand. For each rotation specified, the high order bit that exits from the left of the operand returns at the right to become the new low order bit.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Rotates the bits of the number -2147483642 one bit to the left:&lt;br /&gt;
 BitLRotate(-2147483642, 1) = 13 &lt;br /&gt;
 # (since 10000000000000000000000000000110 ROL 1&lt;br /&gt;
 #      = 00000000000000000000000000001101)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit rotate right =====&lt;br /&gt;
{{ScriptFunctionCode|BitRRotate|v2.60|BitRRotateL(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitRor|v2.60|BitRor(int, int)}}&lt;br /&gt;
: Rotates the bits of an integer to the right by the number of bits specified in the second operand. For each rotation specified, the low order bit that exits from the right of the operand returns at the left to become the new high order bit.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Rotates the bits of the number 13 one bit to the right:&lt;br /&gt;
 BitRRotate(13, 1) = -2147483642 &lt;br /&gt;
 # (since 00000000000000000000000000001101 ROR 1 &lt;br /&gt;
 #      = 10000000000000000000000000000110)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit test =====&lt;br /&gt;
{{ScriptFunctionCode|BitTest|v2.60|BitTest(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitTst|v2.60|BitTst(int, int)}}&lt;br /&gt;
: Tests a single bit (that is, it returns true if its state is one, else it returns false). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Check the state of the fourth bit:&lt;br /&gt;
 BitTest(3, 4) = False&lt;br /&gt;
 BitTest(19, 4) = True&lt;br /&gt;
 &lt;br /&gt;
 Check the state of the sign bit:&lt;br /&gt;
 BitTest(-1, 31) = True&lt;br /&gt;
 BitTest(2147483647, 31) = False&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitSet|v2.60|BitSet(int, int)}}&lt;br /&gt;
: Sets a single bit to one (so it sets its state to one). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Set the state of the fourth bit to one:&lt;br /&gt;
 BitSet(3, 4) = 19&lt;br /&gt;
 BitSet(19, 4) = 19&lt;br /&gt;
 &lt;br /&gt;
 Set the state of the sign bit to one:&lt;br /&gt;
 BitSet(-1, 31) = -1&lt;br /&gt;
 BitSet(2147483647, 31) = -1&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BitSetCount||BitSetCount(int [, int...])}} {{AvsPluscon}}&lt;br /&gt;
: Returns the total number of set bits in all supplied integer arguments.&lt;br /&gt;
&lt;br /&gt;
===== Bit clear =====&lt;br /&gt;
{{ScriptFunctionCode|BitClear|v2.60|BitClear(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitClr|v2.60|BitClr(int, int)}}&lt;br /&gt;
: Sets a single bit to zero (so it sets its state to zero). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Clear the bits of the number 5&lt;br /&gt;
 BitClear(5, 0) = 4 (first bit is set to zero)&lt;br /&gt;
 BitClear(5, 1) = 5 (second bit is already zero)&lt;br /&gt;
 BitClear(5, 2) = 1 (third bit is set to zero)&lt;br /&gt;
 BitClear(5, 3) = 5 (fourth bit is already zero)&lt;br /&gt;
 &lt;br /&gt;
 Clear the state of the sign bit:&lt;br /&gt;
 BitClear(-1, 31) = 2147483647&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Bit change =====&lt;br /&gt;
{{ScriptFunctionCode|BitChange|v2.60|BitChange(int, int)}}&lt;br /&gt;
{{ScriptFunctionCode|BitChg|v2.60|BitChg(int, int)}}&lt;br /&gt;
: Sets a single bit to its complement (so it changes the state of a single bit; 1 becomes 0 and vice versa). The second operand denotes the location of the bit which is specified as an offset from the low order end of the operand (starting at zero). The sign bit is bit 31.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Change the state of the a bit of the number 5:&lt;br /&gt;
 BitChange(5, 0) = 4 (first bit is set to zero)&lt;br /&gt;
 BitChange(5, 1) = 7 (second bit is set to one)&lt;br /&gt;
 BitChange(5, 2) = 1 (third bit is set to zero)&lt;br /&gt;
 BitChange(5, 3) = 13 (fourth bit is set to one)&lt;br /&gt;
 &lt;br /&gt;
 Change the state of the sign bit:&lt;br /&gt;
 BitChange(-1, 31) = 2147483647&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Runtime functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These are internal functions which are evaluated at every frame. They can be used inside the scripts passed to runtime filters ([[ConditionalFilter]], [[ScriptClip]], [[FrameEvaluate]]) to return information for a frame.&lt;br /&gt;
&lt;br /&gt;
===== Average ===== &lt;br /&gt;
{{ScriptFunctionCode|AverageLuma||AverageLuma(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|AverageChromaU||AverageChromaU(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|AverageChromaV||AverageChromaV(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|AverageB||AverageB(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|AverageG||AverageG(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|AverageR||AverageR(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return a float value with the average pixel value of a plane (Luma, U-chroma and V-chroma, respectively). They require an [[ISSE]] capable cpu. In v2.61 an {{FuncArg|offset}} argument is added which enables you to access other frames than the current one.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ScriptClip(Last, &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     threshold = 55&lt;br /&gt;
     luma = AverageLuma ## gives the average luma of the current frame&lt;br /&gt;
     #luma = AverageLuma(1) ## gives the average luma of the next frame&lt;br /&gt;
     luma &amp;lt; threshold &lt;br /&gt;
     \ ? Levels(0, 1.0+0.5*(threshold-luma)/threshold, 255, 0, 255) &lt;br /&gt;
     \ : last&lt;br /&gt;
     Subtitle(&amp;quot;luma=&amp;quot; + String(luma), align=2)&lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Difference =====&lt;br /&gt;
{{ScriptFunctionCode|LumaDifference||LumaDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|ChromaUDifference||ChromaUDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|ChromaVDifference||ChromaVDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|RGBDifference||RGBDifference(clip1, clip2)}}&lt;br /&gt;
{{ScriptFunctionCode|BDifference||BDifference(clip1, clip2)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GDifference||GDifference(clip1, clip2)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RDifference||RDifference(clip1, clip2)}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return a float value between 0 and 255 of the absolute difference between two planes from two different clips &amp;amp;ndash; either the combined RGB difference or the Luma, U-chroma or V-chroma differences, respectively. They require an [[ISSE]] capable cpu.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ovl = [[Overlay]](last, mov_star, x=some_xvalue, y=some_yvalue, mask=mov_mask)&lt;br /&gt;
 ldif = LumaDifference(ovl) # implicit last for clip1&lt;br /&gt;
 udif = ChromaUDifference([[Tweak]](hue=24), ovl)&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Difference from previous =====&lt;br /&gt;
{{ScriptFunctionCode|YDifferenceFromPrevious||YDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|UDifferenceFromPrevious||UDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|VDifferenceFromPrevious||VDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|RGBDifferenceFromPrevious||RGBDifferenceFromPrevious(clip)}}&lt;br /&gt;
{{ScriptFunctionCode|BDifferenceFromPrevious||BDifferenceFromPrevious(clip)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GDifferenceFromPrevious||GDifferenceFromPrevious(clip)}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RDifferenceFromPrevious||RDifferenceFromPrevious(clip)}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return the absolute difference of pixel value between the current and previous frame of {{FuncArg|clip}} &amp;amp;ndash; either the combined RGB difference or the Luma, U-chroma or V-chroma differences, respectively.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 scene_change = (YDifferenceFromPrevious) &amp;gt; threshold)&lt;br /&gt;
 scene_change ? some_filter(...) : another_filter(...)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Difference to next =====&lt;br /&gt;
{{ScriptFunctionCode|YDifferenceToNext||YDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|UDifferenceToNext||UDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|VDifferenceToNext||VDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|RGBDifferenceToNext||RGBDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}}&lt;br /&gt;
{{ScriptFunctionCode|BDifferenceToNext||BDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GDifferenceToNext||GDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RDifferenceToNext||RDifferenceToNext(clip [, int offset &amp;amp;#61; 1])}} {{AvsPluscon}}&lt;br /&gt;
: This group of functions return the absolute difference of pixel value between the current and next frame of {{FuncArg|clip}} &amp;amp;ndash; either the combined RGB difference or the Luma, U-chroma or V-chroma differences, respectively. In v2.61 an {{FuncArg|offset}} argument is added, which enables you to access the difference between the RGB, luma or chroma plane of the current frame and of ''any'' other frame. Note that for example clip.'''RGBDifferenceToNext'''(-1) = clip.'''RGBDifferenceToPrevious''', and clip.'''RGBDifferenceToNext'''(0) = 0.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # both th1, th2 are positive thresholds; th1 is larger enough than th2&lt;br /&gt;
 scene_change = (YDifferenceFromPrevious &amp;gt; th1) &amp;amp;&amp;amp; (YDifferenceToNext &amp;lt; th2)&lt;br /&gt;
 scene_change ? some_filter(...) : another_filter(...)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Color plane median, min, max, range =====&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMedian||YPlaneMedian(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMedian||UPlaneMedian(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMedian||VPlaneMedian(clip [, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMedian||BPlaneMedian(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMedian||GPlaneMedian(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RPlaneMedian||RPlaneMedian(clip [, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMin||YPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMin||UPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMin||VPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMin||BPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMin||GPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}{{ScriptFunctionCode|RPlaneMin||RPlaneMin(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMax||YPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMax||UPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMax||VPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMax||BPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMax||GPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}{{ScriptFunctionCode|RPlaneMax||RPlaneMax(clip [, float threshold &amp;amp;#61; 0, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionCode|YPlaneMinMaxDifference||YPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|UPlaneMinMaxDifference||UPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|VPlaneMinMaxDifference||VPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}}&lt;br /&gt;
{{ScriptFunctionCode|BPlaneMinMaxDifference||BPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|GPlaneMinMaxDifference||GPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
{{ScriptFunctionCode|RPlaneMinMaxDifference||RPlaneMinMaxDifference(clip [, float threshold, int offset &amp;amp;#61; 0])}} {{AvsPluscon}}&lt;br /&gt;
&lt;br /&gt;
: This group of functions return statistics about the distribution of pixel values on a plane (Luma, U-chroma and V-chroma, respectively). The statistics are, in order of presentation: maximum, minimum, median and range (maximum - minimum difference). &lt;br /&gt;
: {{FuncArg|threshold}} is a percentage, stating how many percent of the pixels are allowed above or below minimum. The threshold is optional and defaults to 0. In v2.61 an {{FuncArg|offset}} argument is added, which enables you to access the statistics of other frames than the current one.&lt;br /&gt;
&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 # median and average are close only on even distributions; &lt;br /&gt;
 # this can be a useful diagnostic&lt;br /&gt;
 have_intense_brights = YPlaneMedian() - AverageLuma() &amp;lt; threshold&lt;br /&gt;
 ...&lt;br /&gt;
 # a simple per-frame normalizer to [16..235], CCIR, range&lt;br /&gt;
 [[Levels]](YPlaneMin(), 1.0, YPlaneMax(), 16, 235)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functions for frame properties ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: Core and concept ported from VapourSynth.&lt;br /&gt;
: Frame properties are per-frame data. Source or other filters can store useful data into frame properties such as information on colorimetry.&lt;br /&gt;
: Imagine them as an array of zero or more elements of PropertyName=Value&lt;br /&gt;
: Reading them is possible only by runtime functions.&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
: Note:&lt;br /&gt;
: At the moment (v3.6.2test7) Avisynth+ provides only the necessary framework for handling (set, read, clear, pass) such properties. None of its internal functions (such as color space converters) set or work upon frame property values.&lt;br /&gt;
: There are already filters (like avsresize) and source plugins that are already using frame properties. Avisynth+ core will rely on frame in the future as well.&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
: Developer info:&lt;br /&gt;
: On filter level the set of frame properties should be copied from a previous (or specific) input frame. When filter is using env-&amp;gt;MakeWritable in its GetFrame method this happens automatically. &lt;br /&gt;
: But a simple env-&amp;gt;NewVideoFrame means a dead-end for frame property passing mechanism. So filter must either use env-&amp;gt;NewVideoFrameP which has an additional parameter: a source frame of the frame properties.&lt;br /&gt;
: Or frame properties have to be copied later, programatically by the copyFrameProps ScriptEnvironment function.&lt;br /&gt;
: For compatibility reasons NewVideoFrameP should be called adaptively instead of the traditional NewVideoFrame: usable after detecting Avisynth interface version 8 (NewVideoFrameP was introduced in v8).&lt;br /&gt;
: What happens if this copy is not done properly? Then the filter is a dead-end for frame properties since NewVideoFrame constructs new frame with no frame properties. All old filters will behave like this.&amp;lt;br&amp;gt;&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
: Frame property getter functions are evaluated at every frame. They can be used inside the scripts passed to runtime filters ([[ScriptClip]]).&amp;lt;br&amp;gt;&lt;br /&gt;
: Frame property setters can be called both at script level and in runtime. When a property is set on script level it will be constant along the lifetime of the whole clip, unless it is changed in runtime, inside ScriptClip.&lt;br /&gt;
: Though using property setter functions are allowed in [[FrameEvaluate]] but since it does not return an altered frame, writing a frame property there has zero effect.&amp;lt;br&amp;gt;&lt;br /&gt;
: &amp;lt;br&amp;gt;&lt;br /&gt;
:* frame properties are stored as key-value pairs&lt;br /&gt;
:** Key is an alphanumeric identifier.&lt;br /&gt;
:** Values can be of single value or array of type&lt;br /&gt;
:*** 64 bit integer (32 bit integer when converted to AVSValue inside Avisynth+, AVSValue limitation)&lt;br /&gt;
:*** 64 bit double (32 bit float when converted to AVSValue inside Avisynth+, AVSValue limitation)&lt;br /&gt;
:*** string (or byte data) with given length. Strings are null terminated.&lt;br /&gt;
:*** frame reference (PVideoFrame)&lt;br /&gt;
:*** clip reference (PClip)&lt;br /&gt;
:* property setting has 3 modes: 0-replace 1-append 2-touch (see AVSPropAppendMode in avisynth.h)::&lt;br /&gt;
:** 0 - single value for that key is replaced&lt;br /&gt;
:** 1 - property is appended (make arrays by calling with mode=1 consecutively)&lt;br /&gt;
:** 2 - touch&lt;br /&gt;
&lt;br /&gt;
==== Reserved frame property names ====&lt;br /&gt;
: There are quasi-standard frame property names which are used widespread.&lt;br /&gt;
: As frame properties came from VapourSynth (see &amp;quot;Reserved Frame Properties&amp;quot; at http://www.vapoursynth.com/doc/apireference.html), it is convenient that Avisynth plugins use the same properties and values.&lt;br /&gt;
: Keys starting with _ have strictly defined meanings specified below. It is acceptable to not set any of these keys if they are unknown. It is also a fatal error to set them to a value not specified below.&lt;br /&gt;
{{ScriptFunctionH5|_ChromaLocation||int _ChromaLocation}}&lt;br /&gt;
: Chroma sample position in YUV formats.&lt;br /&gt;
:: 0=left, 1=center, 2=topleft, 3=top, 4=bottomleft, 5=bottom.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_ColorRange||int _ColorRange}}&lt;br /&gt;
: Full or limited range (PC/TV range). Primarily used with YUV formats.&lt;br /&gt;
:: 0=full range, 1=limited range.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Primaries||int _Primaries}}&lt;br /&gt;
: Color primaries as specified in ITU-T H.265 Table E.3.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Matrix||int _Matrix}}&lt;br /&gt;
: Matrix coefficients as specified in ITU-T H.265 Table E.5.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Transfer||int _Transfer}}&lt;br /&gt;
: Transfer characteristics as specified in ITU-T H.265 Table E.4.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_FieldBased||int _FieldBased}}&lt;br /&gt;
: If the frame is composed of two independent fields (interlaced).&lt;br /&gt;
:: 0=frame based (progressive), 1=bottom field first, 2=top field first&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_AbsoluteTime||float _AbsoluteTime}}&lt;br /&gt;
: The frame’s absolute timestamp in seconds if reported by the source filter. Should only be set by the source filter and not be modified. Use durations for all operations that depend on frame length.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_DurationNum||int _DurationNum}}&lt;br /&gt;
{{ScriptFunctionH5|_DurationDen||int _DurationDen}}&lt;br /&gt;
: The frame’s duration in seconds as a rational number. Filters that modify the framerate should also change these values.&lt;br /&gt;
: This fraction should always be normalized.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Combed||int _Combed (boolean)}}&lt;br /&gt;
: Whether or not the frame needs postprocessing, usually hinted from field matching filters.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_Field||int _Field}}&lt;br /&gt;
: If the frame was produced by something like core.std.SeparateFields, this property signals which field was used to generate this frame.&lt;br /&gt;
:: 0=from bottom field, 1=from top field.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_PictType||string _PictType}}&lt;br /&gt;
: A single character describing the frame type. It uses the common IPB letters but other letters may also be used for formats with additional frame types.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_SARNum||int _SARNum}}&lt;br /&gt;
{{ScriptFunctionH5|_SARDen||int _SARDen}}&lt;br /&gt;
: Pixel (sample) aspect ratio as a rational number.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_SceneChangeNext||int _SceneChangeNext (boolean)}}&lt;br /&gt;
: If 1, this frame is the last frame of the current scene. The next frame starts a new scene.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|_SceneChangePrev||int _SceneChangePrev (boolean)}}&lt;br /&gt;
: If 1, this frame starts a new scene.&lt;br /&gt;
&lt;br /&gt;
==== Property set ====&lt;br /&gt;
: Input value of setter functions are to be come either&lt;br /&gt;
:*from the return value of &amp;quot;function objects&amp;quot;&lt;br /&gt;
:*direct value&lt;br /&gt;
: Property setter function names begin with propSet&lt;br /&gt;
&lt;br /&gt;
: Common parameters:&lt;br /&gt;
::*clip c,&lt;br /&gt;
::*string key_name,&lt;br /&gt;
::*direct value of supported types (integer, float, string, array, clip) or a &amp;quot;function object&amp;quot;&lt;br /&gt;
::*int &amp;quot;mode&amp;quot;: 0=replace (default), 1=append, 2=touch. There is no append mode for inserting a full array into the property.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
: generic property setter, automatic type recognition by the return value of the function object&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, integer value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, float value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, string value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, array value)}}&lt;br /&gt;
{{ScriptFunctionH5|propSet|{{AvsPluscon}}|propSet(clip, string key_name, clip value [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
&lt;br /&gt;
: The above four functions are setting a property by a directly passed values&lt;br /&gt;
: note: array must contain only the similarly typed values, e.g. cannot mix strings with integers.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propSetInt|{{AvsPluscon}}|propSetInt(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetFloat|{{AvsPluscon}}|propSetFloat(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetString|{{AvsPluscon}}|propSetString(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetArray|{{AvsPluscon}}|propSetArray(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
{{ScriptFunctionH5|propSetClip|{{AvsPluscon}}|propSetClip(clip, string key_name, function func_obj [, integer &amp;quot;mode&amp;quot;])}}&lt;br /&gt;
: these setters accept only the specific type&lt;br /&gt;
&lt;br /&gt;
==== Property get ====&lt;br /&gt;
: Get properties by name or as a whole&lt;br /&gt;
: Common parameters:&lt;br /&gt;
:: clip c,&lt;br /&gt;
:: string key_name,&lt;br /&gt;
:: integer &amp;quot;index&amp;quot;, (default 0): for zero based indexing array access&lt;br /&gt;
:: integer &amp;quot;offset&amp;quot; (default 0), similar to the other runtime functions: frame offset (e.g. -1: previous, 2: next next)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetAny|{{AvsPluscon}}|propGetAny(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the automatically detected type&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetInt|{{AvsPluscon}}|propGetInt(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns only if value is integer, throws an error otherwise (note: unlike Avisynth integer frame properties internally use 64 bit integers)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetFloat|{{AvsPluscon}}|propGetFloat(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns only if value is float, throws an error otherwise (note: unlike Avisynth float frame properties internally use 64 bit doubles)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetString|{{AvsPluscon}}|propGetString(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns only if value is string, throws an error otherwise&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetAsArray|{{AvsPluscon}}|propGetAsArray(clip, string key_name[, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: A frame property can hold multiple values of the same type: it can be an array&lt;br /&gt;
: propGetAsArray returns an array. For a single property array size will be 1. (only in array-aware AviSynth+ versions)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetAll|{{AvsPluscon}}|propGetAll(clip [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: Returns all frame properties in an array of [key-value] pairs. Array size will be 'numProps'&lt;br /&gt;
: Each key-value pair is contained in a two dimensional subarray.&lt;br /&gt;
: If the property value for a given key is an array again then &amp;quot;value&amp;quot; will be an array as well.&lt;br /&gt;
: Once you have the array with all properties you can access them with the &amp;quot;associative&amp;quot; feature of AviSynth array access&lt;br /&gt;
''Example:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;last.propSet(&amp;quot;cica&amp;quot;,&amp;quot;hello&amp;quot;+String(current_frame)).\&lt;br /&gt;
    propSetInt(&amp;quot;test_i1&amp;quot;,function[](clip c) { return current_frame*3 }).\&lt;br /&gt;
    propSet(&amp;quot;test_i2&amp;quot;, current_frame * 2) &amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;p = propGetAll() \&lt;br /&gt;
    SubTitle(&amp;quot;size:&amp;quot; + String(p.ArraySize()) + &amp;quot; &amp;quot; + \&lt;br /&gt;
                       String(p[&amp;quot;test_i1&amp;quot;]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
                       String(p[&amp;quot;cica&amp;quot;]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
                       String(p[&amp;quot;test_i2&amp;quot;]))&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;p = propGetAll() \&lt;br /&gt;
    SubTitle(&amp;quot;size:&amp;quot; + String(p.ArraySize()) + &amp;quot; &amp;quot; + \&lt;br /&gt;
        String(p[0,1]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
        String(p[1,1]) + &amp;quot; &amp;quot; + \&lt;br /&gt;
        String(p[2,1]), x=0, y=20)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Example (read-write basic)''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|80|2}} &amp;gt;&lt;br /&gt;
  ColorBars()&lt;br /&gt;
   &lt;br /&gt;
  # just practicing with function objects&lt;br /&gt;
  ScriptClip(function[](clip c) { c.Subtitle(String(current_frame)) })&lt;br /&gt;
  &lt;br /&gt;
  # write frame properties with function object&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;propSetInt(&amp;quot;frameprop_from_str&amp;quot;,func(YPlaneMax))&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  # write frame properties with traditional script string&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;frameluma_sc_func&amp;quot;,func(AverageLuma)) })&lt;br /&gt;
  &lt;br /&gt;
  # read frame properties (function object, string)&lt;br /&gt;
  ScriptClip(function[](clip c) { SubTitle(string(propGetInt(&amp;quot;frameprop_from_str&amp;quot;)), y=20) })&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;SubTitle(string(propGetInt(&amp;quot;frameluma_sc_func&amp;quot;)), y=40)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
  return last&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Example (nearly everything)''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|92|2}} &amp;gt;&lt;br /&gt;
  ColorBars(width=640, height=480, pixel_type=&amp;quot;yv12&amp;quot;, staticframes=true)&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s&amp;quot;,function[](clip c) { return &amp;quot;Hello &amp;quot; + string(current_frame) }) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s&amp;quot;,function[](clip c) { return &amp;quot;Hello array element #2 &amp;quot; }, mode=1) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s&amp;quot;,function[](clip c) { return &amp;quot;Hello array element #3 &amp;quot;}, mode=1 ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetString(&amp;quot;s2&amp;quot;,function[](clip c) { return &amp;quot;Another property &amp;quot;} ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;s_int&amp;quot;,function[](clip c) { return current_frame*1 }) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;s_int&amp;quot;,function[](clip c) { return current_frame*2 }, mode=1) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetInt(&amp;quot;s_int&amp;quot;,function[](clip c) { return current_frame*4 }, mode=1 ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetFloat(&amp;quot;s_float&amp;quot;,function[](clip c) { return current_frame*1*3.14 }) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetFloat(&amp;quot;s_float&amp;quot;,function[](clip c) { return current_frame*2*3.14 }, mode=1) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetFloat(&amp;quot;s_float&amp;quot;,function[](clip c) { return current_frame*3*3.14 }, mode=1 ) })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) { propSetArray(&amp;quot;s_float_arr&amp;quot;,function[](clip c) { return [1.1, 2.2] } ) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetArray(&amp;quot;s_int_arr&amp;quot;,function[](clip c) { return [-1,-2,-5] } ) })&lt;br /&gt;
  ScriptClip(function[](clip c) { propSetArray(&amp;quot;s_string&amp;quot;,function[](clip c) { return [&amp;quot;ArrayElementS_1&amp;quot;, &amp;quot;ArrayElementS_2&amp;quot;] } ) })&lt;br /&gt;
  #ScriptClip(&amp;quot;&amp;quot;&amp;quot;propDelete(&amp;quot;s&amp;quot;)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    y = 0&lt;br /&gt;
    SubTitle(&amp;quot;Prop Key count =&amp;quot; + String(propNumKeys), y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    numKeys = propNumKeys() - 1&lt;br /&gt;
    for ( i = 0 , numKeys) {&lt;br /&gt;
      propName = propGetKeyByIndex(index = i)&lt;br /&gt;
      propType = propGetType(propName)&lt;br /&gt;
      SubTitle(&amp;quot;#&amp;quot;+String(i) + &amp;quot; property: '&amp;quot; + propName + &amp;quot;', Type = &amp;quot; + String(propType) , y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
 &lt;br /&gt;
      for(j=0, propNumElements(propName) - 1) {&lt;br /&gt;
        SubTitle(&amp;quot;element #&amp;quot; + String(j) + &amp;quot;, size = &amp;quot; + String(propType == 3 ? propGetDataSize(propName, index=j) : 0) + &amp;quot;, Value = &amp;quot; + String(propGetAny(propName, index=j)), y = y)&lt;br /&gt;
        #SubTitle(&amp;quot;element #&amp;quot; + String(j) + &amp;quot; size = &amp;quot; + String(propType == 3 ? propGetDataSize(propName, index=j) : 0) + &amp;quot;, Value = &amp;quot; + String(propGetAny(propName, index=j)), y = y)&lt;br /&gt;
        y = y + 15&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s&amp;quot;)&lt;br /&gt;
    y = 100&lt;br /&gt;
    x = 400&lt;br /&gt;
    SubTitle(string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  # get int array one pass&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s_int&amp;quot;)&lt;br /&gt;
    y = 440&lt;br /&gt;
    x = 400&lt;br /&gt;
    SubTitle(&amp;quot;Array size=&amp;quot; + string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  # get float array one pass&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s_float&amp;quot;)&lt;br /&gt;
    y = 440&lt;br /&gt;
    x = 200&lt;br /&gt;
    SubTitle(&amp;quot;Array size=&amp;quot; + string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
 &lt;br /&gt;
  # get string array&lt;br /&gt;
  ScriptClip(function[](clip c) {&lt;br /&gt;
    a = propGetAsArray(&amp;quot;s_string&amp;quot;)&lt;br /&gt;
    y = 440&lt;br /&gt;
    x = 000&lt;br /&gt;
    SubTitle(&amp;quot;Array size=&amp;quot; + string(a.ArraySize()), x=x, y=y)&lt;br /&gt;
    y = y + 15&lt;br /&gt;
    for(i=0, a.ArraySize()-1) {&lt;br /&gt;
      SubTitle(&amp;quot;[&amp;quot;+String(i)+&amp;quot;]=&amp;quot;+ String(a[i]),x=x,y=y)&lt;br /&gt;
      y = y + 15&lt;br /&gt;
    }&lt;br /&gt;
    return last&lt;br /&gt;
  })&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AviSynth 3.7.1''': allow propGetXXX property getter functions called as normal functions, outside runtime.&amp;lt;br&amp;gt;&lt;br /&gt;
By default frame property values are read from frame#0 which index can be overridden by the offset parameter.&lt;br /&gt;
&lt;br /&gt;
''Example:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|92|2}} &amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Colorbars()&lt;br /&gt;
    PropSet(last, &amp;quot;hello&amp;quot;, 1) # Set to 1 for all frames&lt;br /&gt;
    # Override to 2 with runtime function except for frameNo=1&lt;br /&gt;
    ScriptClip(&amp;quot;&amp;quot;&amp;quot;if(current_frame!=1) {propSet(&amp;quot;hello&amp;quot;,2)}&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
    n0 = propGetInt(&amp;quot;hello&amp;quot;) # same as propGetInt(&amp;quot;hello&amp;quot;,offset=0)&lt;br /&gt;
    # or get the frame property from the Nth frame&lt;br /&gt;
    n1 = propGetInt(&amp;quot;hello&amp;quot;,offset=1)&lt;br /&gt;
    n2 = propGetInt(&amp;quot;hello&amp;quot;,offset=2)&lt;br /&gt;
    # n0 and n2 is 2 (overridden in runtime)&lt;br /&gt;
    # n1 will be 1 (keeps global setting)&lt;br /&gt;
    SubTitle(&amp;quot;n0/n1/n2=&amp;quot; + &amp;quot;{n0}/{n1}/{n2}&amp;quot;.Format)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Deleting properties ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: Delete one specific property or all property entries&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propDelete|{{AvsPluscon}}|propDelete(clip, string)}}&lt;br /&gt;
: Deletes a property by name. If property does not exist, do nothing.&lt;br /&gt;
:* {{FuncArg|clip}} (required) specifies clip.&lt;br /&gt;
:* {{FuncArg|string}} (required) key_name (case sensitive) specifies the name of the parameter to delete&lt;br /&gt;
''Example:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
  ScriptClip(&amp;quot;&amp;quot;&amp;quot;propDelete(&amp;quot;my_spec_prop&amp;quot;)&amp;quot;&amp;quot;&amp;quot;)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propClearAll|{{AvsPluscon}}|propClearAll(clip)}}&lt;br /&gt;
: Clears all properties for a given video frame&lt;br /&gt;
:* {{FuncArg|clip}} (required) specifies clip.&lt;br /&gt;
&lt;br /&gt;
==== Other property functions ====&lt;br /&gt;
{{ScriptFunctionH5|propShow|{{AvsPluscon}}|propShow(clip, integer &amp;quot;size&amp;quot;, bool &amp;quot;showtype&amp;quot;)}}&lt;br /&gt;
: This debug filter lists all frame properties on screen.&lt;br /&gt;
: Listing appears as a name = value list. Arrays values are displayed between [ and ]&lt;br /&gt;
: Top line contains the number of properties. If no properties found, nothing is displayed.&lt;br /&gt;
:* {{FuncArg|clip}} (required) specifies clip.&lt;br /&gt;
:* {{FuncArg|integer}} &amp;quot;size&amp;quot; default(16), font size to use (the &amp;quot;Text&amp;quot; filter is used for display, sizes are of limited set)&lt;br /&gt;
:* {{FuncArg|bool}} &amp;quot;showtype&amp;quot; default(false), if true, the data type in parenthesis appears next to the property key name&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetDataSize|{{AvsPluscon}}|propGetDataSize(clip, string key_name [, integer &amp;quot;index&amp;quot;, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the size of the string or underlying data array&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propNumElements|{{AvsPluscon}}|propNumElements(clip, string key_name [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the array size of a given property. 1=single value&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propNumKeys|{{AvsPluscon}}|propNumKeys(clip, [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns number of entries (keys) for a frame&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetKeyByIndex|{{AvsPluscon}}|propGetKeyByIndex(clip, integer &amp;quot;index&amp;quot; [, integer &amp;quot;offset&amp;quot;)}}&lt;br /&gt;
: returns the key name for the Nth property (zero based, 0&amp;lt;=index&amp;lt;propNumKeys)&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propGetType|{{AvsPluscon}}(v3.7.0)|propGetType(clip, string key_name [, integer &amp;quot;offset&amp;quot;])}}&lt;br /&gt;
: returns the type of the given key&lt;br /&gt;
::*unset: 0&lt;br /&gt;
::*integer: 1&lt;br /&gt;
::*float: 2&lt;br /&gt;
::*string: 3&lt;br /&gt;
::*clip: 4&lt;br /&gt;
::*frame: 5&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|propCopy|{{AvsPluscon}}(v3.7.1)|propCopy(clip, clip [,bool &amp;quot;merge&amp;quot;])}}&lt;br /&gt;
: Copies the frame properties of the second clip to the first.&lt;br /&gt;
::*Parameter 'merge' (default false):&lt;br /&gt;
:::*when false: exact copy (original target properties will be lost)&lt;br /&gt;
:::*when true: keeps original properties, appends all parameters from source but overwrite if a parameter with the same name already exists.&lt;br /&gt;
&lt;br /&gt;
== Script functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide AviSynth script information.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptName|v2.60|ScriptName()}}&lt;br /&gt;
: Returns the path and filename of the loaded script as a string.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 name = ScriptName() # name = &amp;quot;F:\ProjectXYZ\video.avs&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptNameUtf8|{{AvsPluscon}}|ScriptNameUtf8()}}&lt;br /&gt;
: Returns the path and filename of the loaded script as a [[wikipedia:Unicode|Unicode]] string, encoded in [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptFile|v2.60|ScriptFile()}}&lt;br /&gt;
: Returns the filename of the loaded script as a string.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 file = ScriptFile() # file = &amp;quot;video.avs&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptFileUtf8|{{AvsPluscon}}|ScriptFileUtf8()}}&lt;br /&gt;
: Returns the filename of the loaded script as a [[wikipedia:Unicode|Unicode]] string, encoded in [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptDir|v2.60|ScriptDir()}}&lt;br /&gt;
: Returns the path of the loaded script as a string.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 folder = ScriptDir() # folder = &amp;quot;F:\ProjectXYZ&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ScriptDirUtf8|{{AvsPluscon}}|ScriptDirUtf8()}}&lt;br /&gt;
: Returns the path of the loaded script as a [[wikipedia:Unicode|Unicode]] string, encoded in [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|SetLogParams|{{AvsPluscon}}|SetLogParams([string ''target'', int ''level''])}}&lt;br /&gt;
: Sets a file path for a log file, used by [[#LogMsg|LogMsg]] and internal error reporting.&lt;br /&gt;
:* {{FuncArg|target}} names a file which will be created when the script loads. If attempting to create or write to {{FuncArg|target}} fails, the script will raise an error immediately. If the file exists, new log entries will be appended to the end. If omitted, {{FuncArg|target}} defaults to [[wikipedia:Stderr|stderr]].&lt;br /&gt;
:* {{FuncArg|level}} sets the log ''verbosity''; it can be one of the following:&lt;br /&gt;
::{| border=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|{{BoldColor|#669999|85|■}} &amp;lt;tt&amp;gt;LOG_ERROR&amp;lt;/tt&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&amp;lt;small&amp;gt;(1)&amp;lt;/small&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|creates the fewest log entries&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|{{BoldColor|#669999|85|■}} &amp;lt;tt&amp;gt;LOG_WARNING&amp;lt;/tt&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&amp;lt;small&amp;gt;(2)&amp;lt;/small&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|{{BoldColor|#669999|85|■}} &amp;lt;tt&amp;gt;LOG_INFO&amp;lt;/tt&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|&amp;lt;small&amp;gt;(3)&amp;lt;/small&amp;gt;&lt;br /&gt;
|style=&amp;quot;line-height:1.0em&amp;quot;|creates the most log entries&lt;br /&gt;
|}&lt;br /&gt;
::If omitted, {{FuncArg|level}} defaults to &amp;lt;tt&amp;gt;LOG_INFO&amp;lt;/tt&amp;gt;.  &lt;br /&gt;
:''Examples'' see [[#LogMsg|LogMsg]] below.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|LogMsg|{{AvsPluscon}}|LogMsg(string, int)}}&lt;br /&gt;
: Creates a new log entry.&lt;br /&gt;
:* {{FuncArg|string}} (required) specifies the log message.&lt;br /&gt;
:* {{FuncArg|int}} (required) specifies the log entry level: see [[#SetLogParams|SetLogParams]] above.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## creating file and set path for future log entries:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test1.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 &lt;br /&gt;
 ...''log contents:''&lt;br /&gt;
 (empty)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## logging an INFO message:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test2.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 LogMsg(&amp;quot;this is a test&amp;quot;, LOG_INFO)&lt;br /&gt;
 &lt;br /&gt;
 ''log contents:''&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 INFO: this is a test&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## logging a script error:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test3.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 foo(&amp;quot;bar&amp;quot;) ## ERROR!&lt;br /&gt;
 &lt;br /&gt;
 ...''log contents (redundant entries are common):''&lt;br /&gt;
 ERROR: Script error: There is no function named 'foo'.&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 ERROR: Script error: There is no function named 'foo'.&lt;br /&gt;
 (&amp;lt;path&amp;gt;\_test.avs, line 35)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ## logging INFO context for script error:&lt;br /&gt;
 SetLogParams(&amp;quot;&amp;lt;path&amp;gt;\_test4.log&amp;quot;, LOG_INFO)&lt;br /&gt;
 function MyFunction(clip C)&lt;br /&gt;
 {&lt;br /&gt;
     C&lt;br /&gt;
     [[Control_structures|try]] {&lt;br /&gt;
         foo(&amp;quot;bar&amp;quot;) ## ERROR!&lt;br /&gt;
     } catch (err_msg) {&lt;br /&gt;
         msg2 = &amp;quot;Error in MyFunction: &amp;quot;&lt;br /&gt;
         LogMsg([[#Time|Time]](&amp;quot;%Y-%m-%d %I:%M:%S %p, %z&amp;quot;) + &amp;quot;: &amp;quot; + msg2, LOG_INFO)&lt;br /&gt;
         #[[#Assert|Assert]](false, msg2 + err_msg) ## optional: stop script, else continue&lt;br /&gt;
     }&lt;br /&gt;
     return Last&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ''log contents (redundant entries omitted):''&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 ERROR: Script error: There is no function named 'foo'.&lt;br /&gt;
 (&amp;lt;path&amp;gt;\_test.avs, line 54)&lt;br /&gt;
 ---------------------------------------------------------------------&lt;br /&gt;
 INFO: 2017-11-12 11:03:41 AM, -0500: Error in MyFunction:&lt;br /&gt;
 (&amp;lt;path&amp;gt;\_test.avs, line 54)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|GetProcessInfo|{{AvsPluscon}}|GetProcessInfo(int)}}&lt;br /&gt;
: Returns information about the [[wikipedia:Process_(computing)|process]] the script is running in.&lt;br /&gt;
: The ''int'' argument has two legal values:&lt;br /&gt;
:* if ''0'' (default), returns ''64'' for a 64-bit process or ''32'' for a 32-bit process.&lt;br /&gt;
:* else if ''1'',&lt;br /&gt;
:** returns 0 for 32-bit process on 32-bit OS;&lt;br /&gt;
:** returns 1 for 32-bit process on 64-bit OS;&lt;br /&gt;
:** returns 2 for 64-bit process on 64-bit OS;&lt;br /&gt;
:** else returns -1 (unknown)&lt;br /&gt;
:: /// [[TODO]] this is preliminary info&lt;br /&gt;
&lt;br /&gt;
== String functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide common operations on string variables.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|LCase||LCase(string)}}&lt;br /&gt;
: Returns lower case of {{FuncArg|string}}.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 LCase(&amp;quot;AviSynth&amp;quot;) = &amp;quot;avisynth&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|UCase||UCase(string)}}&lt;br /&gt;
: Returns upper case of {{FuncArg|string}}.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 UCase(&amp;quot;AviSynth&amp;quot;) = &amp;quot;AVISYNTH&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrToUtf8||StrToUtf8(string)}} {{AvsPluscon}}&lt;br /&gt;
: Converts {{FuncArg|string}} from ANSI to [[wikipedia:UTF-8|UTF8]].&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrFromUtf8||StrFromUtf8(string)}} {{AvsPluscon}}&lt;br /&gt;
: Converts {{FuncArg|string}} from [[wikipedia:UTF-8|UTF8]] to ANSI.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrLen||StrLen(string)}}&lt;br /&gt;
: Returns length of {{FuncArg|string}}.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 StrLen(&amp;quot;AviSynth&amp;quot;) = 8&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|RevStr||RevStr(string)}}&lt;br /&gt;
: Returns {{FuncArg|string}} backwards.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 RevStr(&amp;quot;AviSynth&amp;quot;) = &amp;quot;htnySivA&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|LeftStr||LeftStr(string, int)}}&lt;br /&gt;
: Returns first {{FuncArg|int}} count of characters.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 LeftStr(&amp;quot;AviSynth&amp;quot;, 3) = &amp;quot;Avi&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|RightStr||RightStr(string, int)}}&lt;br /&gt;
: Returns last {{FuncArg|int}} count of characters.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 RightStr(&amp;quot;AviSynth&amp;quot;, 5) = &amp;quot;Synth&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|MidStr||MidStr(string, int pos [, int length])}}&lt;br /&gt;
: Returns substring starting at {{FuncArg|pos}} for optional {{FuncArg|length}} or to end. {{FuncArg|pos}}=1 specifies start.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 MidStr(&amp;quot;AviSynth&amp;quot;, 3, 2) = &amp;quot;iS&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|FindStr||FindStr(string, substring)}}&lt;br /&gt;
: Returns (1-based) position of {{FuncArg|substring}} within {{FuncArg|string}} &lt;br /&gt;
:* Note this function is case-sensitive. &lt;br /&gt;
:* Returns 0 if {{FuncArg|substring}} is not found.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Findstr(&amp;quot;AviSynth&amp;quot;, &amp;quot;Syn&amp;quot;) ## returns 4&lt;br /&gt;
 Findstr(&amp;quot;AviSynth&amp;quot;, &amp;quot;SYN&amp;quot;) ## returns 0&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ReplaceStr|{{AvsPluscon}}|ReplaceStr(string, substring, replacement_string [, bool sig])}}&lt;br /&gt;
: Replaces occurrences of {{FuncArg|substring}} with {{FuncArg|replacement_string}} and returns the result. &lt;br /&gt;
:* {{FuncArg|sig}} if false (the default), search is case-sensitive; if true, search is not case-sensitive.&lt;br /&gt;
:* Avisynth 2.6.x users have other options, such as the [[User_defined_script_functions|user]] function below, adapted from ''StrReplace'', found [[HDColorBars|here]].&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|46|4}} &amp;gt;&lt;br /&gt;
 function ReplaceStr(string base, string sought, string repstr) {&lt;br /&gt;
     pos = FindStr(base, sought)&lt;br /&gt;
     return (sought==&amp;quot;&amp;quot; || pos==0) ? base : ReplaceStr(&lt;br /&gt;
     \       LeftStr(base, pos-1) + repstr +&lt;br /&gt;
     \       MidStr(base, pos+StrLen(sought)),&lt;br /&gt;
     \       sought, repstr)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 ReplaceStr(&amp;quot;FlipHorizontal&amp;quot;, &amp;quot;Horizontal&amp;quot;, &amp;quot;Vertical&amp;quot;)&lt;br /&gt;
 ReplaceStr(&amp;quot;''$a'' x *&amp;quot;, &amp;quot;''$a''&amp;quot;, String(1.5)) ## (a [[MaskTools2|MaskTools]] expression with argument)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Format|{{AvsPluscon}}|Format(formatstring [, value1, value2, ...])}}&lt;br /&gt;
: Mixes the string containing inline placeholders with parameters each converted to strings and returns the result. &lt;br /&gt;
:* {{FuncArg|formatstring}} unnamed parameter, string literal with parameter insertion points marked with {}.&lt;br /&gt;
:* {{FuncArg|value1}}, {{FuncArg|value2}},etc. zero or more values which are inserted into the format string one after another&lt;br /&gt;
:Description:&lt;br /&gt;
::The format string consists of&lt;br /&gt;
::&lt;br /&gt;
:::*ordinary characters (except { and }), which are copied unchanged to the output,&lt;br /&gt;
:::*escape sequences double &amp;quot;{&amp;quot; (&amp;quot;{{&amp;quot;) and double &amp;quot;}&amp;quot; (&amp;quot;}}&amp;quot;), which are replaced with &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot; respectively in the output, and&lt;br /&gt;
:::*replacement fields.&lt;br /&gt;
::: &lt;br /&gt;
:::Each replacement field has the following format:&lt;br /&gt;
::::introductory { character;&lt;br /&gt;
::::(optional)&lt;br /&gt;
::::arg-id, a non-negative number;&lt;br /&gt;
:::::or:&lt;br /&gt;
::::identifier which is used for lookup named parameters. ([&amp;quot;name&amp;quot;, value] construction)&lt;br /&gt;
:::::or:&lt;br /&gt;
::::valid AviSynth variable name&lt;br /&gt;
::::final } character.&lt;br /&gt;
:::&lt;br /&gt;
:::If arg-id is a number it specifies the index of the argument in args whose value is to be used for formatting;&lt;br /&gt;
:::Index is zero based.&lt;br /&gt;
:::&lt;br /&gt;
:::If arg-id is string then it serves as a lookup key from the parameters list given as an array [&amp;quot;name&amp;quot;,value] pair.&lt;br /&gt;
:::If not found, then arg-id is searched among Avisynth variables.&lt;br /&gt;
:::&lt;br /&gt;
:::If arg-id is omitted, the arguments are used in order.&lt;br /&gt;
:::Mixing manual and automatic indexing is not an error.&lt;br /&gt;
:::&lt;br /&gt;
::Notes&lt;br /&gt;
:::It is not an error to provide more arguments than the format string requires:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Format(&amp;quot;{} {}!&amp;quot;, &amp;quot;Hello&amp;quot;, &amp;quot;world&amp;quot;, &amp;quot;something&amp;quot;) # OK, produces &amp;quot;Hello world!&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Example: By Avisynth variable''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 max_pixel_value = 255&lt;br /&gt;
 SubTitle(Format(&amp;quot;max={max_pixel_value}!&amp;quot;)) # no format value given, inserts directly from variable&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Example: By index:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SubTitle(Format(&amp;quot;{0} {1} {0}&amp;quot;, &amp;quot;Home&amp;quot;, &amp;quot;sweet&amp;quot;))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Example: by order:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SubTitle(Format(&amp;quot;{} {} {}&amp;quot;, &amp;quot;AviSynth&amp;quot;, &amp;quot;+&amp;quot;, 2020))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
''Example: by Array name-value pairs:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 SubTitle(Format(&amp;quot;maximum={max} minimum={min} max again {max}!&amp;quot;, [&amp;quot;max&amp;quot;,255], [&amp;quot;min&amp;quot;,0]))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:*since Avisynth+ 3.6&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|FillStr|v2.60|FillStr(int [, string])}}&lt;br /&gt;
: Fills a string. When {{FuncArg|int}}&amp;gt;1 it concatenates the {{FuncArg|string}} {{FuncArg|int}} times. {{FuncArg|string}} is &amp;quot;&amp;lt;tt&amp;gt; &amp;lt;/tt&amp;gt;&amp;quot; (space) by default.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 FillStr(1, &amp;quot;AviSynth&amp;quot;) = &amp;quot;AviSynth&amp;quot;&lt;br /&gt;
 FillStr(2, &amp;quot;AviSynth&amp;quot;) = &amp;quot;AviSynthAviSynth&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrCmp|v2.60|StrCmp(string, string)}}&lt;br /&gt;
: Compares two character strings. The comparison is case-sensitive. If the first string is less than the second string, the return value is negative. If it's greater, the return value is positive. If they are equal, the return value is zero. (The actual value seems to be language dependent so it can't be relied upon.)&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 StrCmp(&amp;quot;AviSynth&amp;quot;, &amp;quot;AviSynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmp(&amp;quot;AviSynth&amp;quot;, &amp;quot;Avisynth&amp;quot;) != 0 # strings are not equal.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|StrCmpi|v2.60|StrCmpi(string, string)}}&lt;br /&gt;
: Compares two character strings. The comparison is not case-sensitive. If the first string is less than the second string, the return value is negative. If it's greater, the return value is positive. If they are equal, the return value is zero. (The actual value seems to be language dependent so it can't be relied upon.)&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 StrCmpi(&amp;quot;AviSynth&amp;quot;, &amp;quot;AviSynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmpi(&amp;quot;AviSynth&amp;quot;, &amp;quot;Avisynth&amp;quot;) = 0 # strings are equal.&lt;br /&gt;
 StrCmpi(&amp;quot;abcz&amp;quot;, &amp;quot;abcdefg&amp;quot;) != 0 &lt;br /&gt;
 # returns the difference betweeen &amp;quot;z&amp;quot; and &amp;quot;d&amp;quot; (which is positive).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== TrimLeft, TrimRight, TrimAll =====&lt;br /&gt;
{{ScriptFunctionCode|TrimLeft||TrimLeft(string)}}&lt;br /&gt;
{{ScriptFunctionCode|TrimRight||TrimRight(string)}}&lt;br /&gt;
{{ScriptFunctionCode|TrimAll||TrimAll(string)}}&lt;br /&gt;
: {{AvsPluscon}} Removes whitespace characters (space, tab, [[wikipedia:Non-breaking_space|nonbreaking space]]) from the ''left, right,'' or ''both'' ends of a string.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Chr||Chr(int)}}&lt;br /&gt;
: Returns the ASCII character. &lt;br /&gt;
: Note that characters above the ASCII character set (ie above 127) are code page dependent and may render different (visual) results in different systems. This has an importance only for user-supplied localised text messages.&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Chr(34) returns the quote character&lt;br /&gt;
 Chr(9)  returns the tab   character&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Ord|v2.60|Ord(string)}}&lt;br /&gt;
: Gives the ordinal number (character code) of the first character of {{FuncArg|string}} (works like php [http://php.net/manual/en/function.ord.php ord] or Basic [http://msdn.microsoft.com/en-us/library/xfw01fx4%28v=vs.84%29.aspx Asc])&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 Ord(&amp;quot;a&amp;quot;) = 97&lt;br /&gt;
 Ord(&amp;quot;AviSynth&amp;quot;) = Ord(&amp;quot;A&amp;quot;) = 65&lt;br /&gt;
 Ord(&amp;quot;§&amp;quot;) = 167&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|Time||Time(string)}}&lt;br /&gt;
: Returns a string with the current system time formatted as defined by {{FuncArg|string}}.&lt;br /&gt;
&lt;br /&gt;
: The string may contain any of the codes for output formatting presented below:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 ! style=&amp;quot;width:9em&amp;quot; | Code&lt;br /&gt;
 ! style=&amp;quot;width:38em&amp;quot; | Description&lt;br /&gt;
 |-&lt;br /&gt;
 |%a&lt;br /&gt;
%A  &lt;br /&gt;
 | Abbreviated weekday name&lt;br /&gt;
Full weekday name&lt;br /&gt;
 |-&lt;br /&gt;
 |%b&lt;br /&gt;
%B  &lt;br /&gt;
 | Abbreviated month name&lt;br /&gt;
Full month name&lt;br /&gt;
 |-&lt;br /&gt;
 |%c  &lt;br /&gt;
 | Date and time representation appropriate for locale&lt;br /&gt;
 |-&lt;br /&gt;
 |%d  &lt;br /&gt;
 | Day of month as decimal number (01 - 31)&lt;br /&gt;
 |-&lt;br /&gt;
 |%H&lt;br /&gt;
%I  &lt;br /&gt;
 | Hour in 24-hour format (00 - 23)&lt;br /&gt;
Hour in 12-hour format (01 - 12)&lt;br /&gt;
 |-&lt;br /&gt;
 |%j  &lt;br /&gt;
 | Day of year as decimal number (001 - 366)&lt;br /&gt;
 |-&lt;br /&gt;
 |%m  &lt;br /&gt;
 | Month as decimal number (01 - 12)&lt;br /&gt;
 |-&lt;br /&gt;
 |%M  &lt;br /&gt;
 | Minute as decimal number (00 - 59)&lt;br /&gt;
 |-&lt;br /&gt;
 |%p  &lt;br /&gt;
 | Current locale's A.M./P.M. indicator for 12-hour clock&lt;br /&gt;
 |-&lt;br /&gt;
 |%S  &lt;br /&gt;
 | Second as decimal number (00 - 59)&lt;br /&gt;
 |-&lt;br /&gt;
 |%U  &lt;br /&gt;
 | Week of year as decimal number, with Sunday as first day of week (00 - 53)&lt;br /&gt;
 |-&lt;br /&gt;
 |%w  &lt;br /&gt;
 | Weekday as decimal number (0 - 6; Sunday is 0)&lt;br /&gt;
 |-&lt;br /&gt;
 |%W  &lt;br /&gt;
 | Week of year as decimal number, with Monday as first day of week (00 - 53)&lt;br /&gt;
 |-&lt;br /&gt;
 |%x  &lt;br /&gt;
 | Date representation for current locale&lt;br /&gt;
 |-&lt;br /&gt;
 |%X  &lt;br /&gt;
 | Time representation for current locale&lt;br /&gt;
 |-&lt;br /&gt;
 |%y&lt;br /&gt;
%Y  &lt;br /&gt;
 | Year without century, as decimal number (00 - 99)&lt;br /&gt;
Year ''with'' century, as decimal number&lt;br /&gt;
 |-&lt;br /&gt;
 |%z, %Z  &lt;br /&gt;
 | Time-zone name or abbreviation; no characters if time zone is unknown&lt;br /&gt;
 |-&lt;br /&gt;
 |%%  &lt;br /&gt;
 | Percent sign &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
: The '#' flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 ! style=&amp;quot;width:9em&amp;quot; |Code with '#' flag&lt;br /&gt;
 ! style=&amp;quot;width:38em&amp;quot; |Change in meaning&lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''a''', %#'''A''', %#'''b''', &lt;br /&gt;
%#'''B''', %#'''p''', %#'''X''', &lt;br /&gt;
%#'''z''', %#'''Z''', %#'''%'''&lt;br /&gt;
 | No change; flag is ignored. &lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''c''' &lt;br /&gt;
 | Long date and time representation, appropriate for current locale. &lt;br /&gt;
For example, ''&amp;quot;Tuesday, March 14, 1995, 12:41:29&amp;quot;'' &lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''x''' &lt;br /&gt;
 | Long date representation, appropriate to current locale. &lt;br /&gt;
For example, ''&amp;quot;Tuesday, March 14, 1995&amp;quot;''&lt;br /&gt;
 |-&lt;br /&gt;
 |%#'''d''', %#'''H''', %#'''I''', &lt;br /&gt;
%#'''j''', %#'''m''', %#'''M''', &lt;br /&gt;
%#'''S''', %#'''U''', %#'''w''', &lt;br /&gt;
%#'''W''', %#'''y''', %#'''Y''' &lt;br /&gt;
 | Remove leading zeroes (if any).&lt;br /&gt;
 |}&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 v = Time(&amp;quot;%Y-%m-%d&amp;quot;)        # &amp;quot;2010-03-01&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%d-%b-%Y&amp;quot;)        # &amp;quot;01-Mar-2010&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%#d/%#m/%y&amp;quot;)      # &amp;quot;1/3/10&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%I:%M:%S %p, %z&amp;quot;) # &amp;quot;08:04:42 PM, GMT Standard Time&amp;quot;&lt;br /&gt;
 v = Time(&amp;quot;%H:%M:%S %z&amp;quot;)     # &amp;quot;20:04:42 GMT Standard Time&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: These provide AviSynth version information.&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|VersionNumber||VersionNumber()}}&lt;br /&gt;
: Returns AviSynth version number as a float.&lt;br /&gt;
:* Note: use [[#VersionString|VersionString]] below to determine if running in [[AviSynth+]].&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 VersionNumber ## returns 2.60 (release version as of 11/2017)&lt;br /&gt;
 VersionNumber ## returns 2.61 (beta)&lt;br /&gt;
 VersionNumber ## returns 2.60 (AVS+ release 2508)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|VersionString||VersionString()}}&lt;br /&gt;
: Returns AviSynth version info as a string (first line used in [[Version]]() command).&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 VersionString ## returns &amp;quot;AviSynth 2.60, build:Mar 31 2015 [16:38:54]&amp;quot;&lt;br /&gt;
 VersionString ## returns &amp;quot;AviSynth 2.61, build:May 17 2016 [16:06:18] VC2008Exp&amp;quot;&lt;br /&gt;
 VersionString ## returns &amp;quot;AviSynth+ 0.1, (r2508, MT, x86_64)&amp;quot;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 function IsAvsPlus()&lt;br /&gt;
 {&lt;br /&gt;
     sVer = [[#LCase|LCase]](VersionString) &lt;br /&gt;
     return ([[#FindStr|FindStr]](sVer, &amp;quot;avisynth+&amp;quot;)    &amp;gt; 0)&lt;br /&gt;
     \   || (FindStr(sVer, &amp;quot;avisynthplus&amp;quot;) &amp;gt; 0)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|IsVersionOrGreater||bool IsVersionOrGreater(int majorVersion, int minorVersion [,int bugfixVersion]) {{AvsPluscon}}}}&lt;br /&gt;
: Returns true if Avisynth+ version is is equal or greater than the required one in the parameters.&lt;br /&gt;
: Since Avisynth+ 3.5&lt;br /&gt;
''Examples:''&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 isAtLeast3_10 = IsVersionOrGreater(3,10)&lt;br /&gt;
 isAtLeast3_5_1 = IsVersionOrGreater(3,5,1)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other helper functions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
: Non-categorized functions&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|BuildPixelType||string BuildPixelType(string family, int bits, int chroma, bool compat, bool oldnames, clip sample_clip)}} {{AvsPluscon}}&lt;br /&gt;
: Creates a video format (pixel_type) string by giving a colorspace family, bit depth, optional chroma subsampling and/or a &lt;br /&gt;
: template clip, from which the undefined format elements are inherited.&lt;br /&gt;
: &lt;br /&gt;
:* string {{FuncArg|family}}&lt;br /&gt;
:: defines color family: &amp;quot;Y&amp;quot;, &amp;quot;YUV&amp;quot;, &amp;quot;YUVA&amp;quot;, &amp;quot;RGB&amp;quot;, &amp;quot;RGBA&amp;quot;&lt;br /&gt;
:: use &amp;quot;RGB&amp;quot; for both planar RGB and classic packed RGB24 and RGB48 - {{FuncArg|compat}} switches to classic formats &lt;br /&gt;
:* int {{FuncArg|bits}}&lt;br /&gt;
:: intended bit depth: 8, 10, 12, 14, 16, 32. In Avisynth+ 8-16 bits are integer formats, 32 bit is float&lt;br /&gt;
:* int {{FuncArg|chroma}}&lt;br /&gt;
:: chroma subsampling: 411, 420, 422, 444. Applies for YUV(A) formats. Ignored for RGB(A) and Y&lt;br /&gt;
:* bool {{FuncArg|compat}} default false&lt;br /&gt;
:: When set to true, function returns packed RGB(A) formats instead of planar RGB(A) (e.g. &amp;quot;RGB48&amp;quot; instead of &amp;quot;RGBP16&amp;quot;), when applicable&lt;br /&gt;
:* bool {{FuncArg|oldnames}} default false&lt;br /&gt;
:: when true, function returns &amp;quot;YV12&amp;quot;, &amp;quot;YV16&amp;quot;, &amp;quot;YV24&amp;quot; instead of &amp;quot;YUV420P8&amp;quot;, &amp;quot;YUV422P8&amp;quot; and &amp;quot;YUV444P8&amp;quot; respectively&lt;br /&gt;
:* clip {{FuncArg|sample_clip}} when given, the clip serves as the base format, all optional parameters (bits, subsampling) will modify only its respective properties&lt;br /&gt;
&lt;br /&gt;
:* see also: use [[#Other_helper_functions|ColorSpaceNameToPixelType]] to convert a colorspace string to an integer pixel_type&lt;br /&gt;
''Examples:'' &lt;br /&gt;
&lt;br /&gt;
:: define &amp;quot;YUV444P10&amp;quot;&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 family = &amp;quot;YUV&amp;quot;&lt;br /&gt;
 bits = 10&lt;br /&gt;
 chroma = 444&lt;br /&gt;
 compat = false&lt;br /&gt;
 oldformat = false&lt;br /&gt;
 s = BuildPixelType(family, bits, chroma, compat, oldformat)&lt;br /&gt;
 BlankClip(width=320,height=200,length=len,pixel_type=s,color=$008080).Info()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: Change only bit depth to 16, sample format is of an existing clip&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 newbits = 16&lt;br /&gt;
 c = last&lt;br /&gt;
 s = BuildPixelType(bits=newbits, sample_clip=c)&lt;br /&gt;
 BlankClip(width=320,height=200,length=len,pixel_type=s,color=$008080).Info()&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ScriptFunctionH5|ColorSpaceNameToPixelType||int ColorSpaceNameToPixelType(string)}} {{AvsPluscon}}&lt;br /&gt;
: Creates a video format (pixel_type) by providing a colorspace name&lt;br /&gt;
: &lt;br /&gt;
:* some formats have multiple valid names: &amp;quot;YV12&amp;quot; is identical to &amp;quot;YUV420P8&amp;quot;, &amp;quot;YV16&amp;quot; = &amp;quot;YUV422P8&amp;quot;, &amp;quot;YV24&amp;quot; = &amp;quot;YUV444P8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[AviSynth Syntax]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal_functions]]&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;br /&gt;
[[Category:Scripting_Basics]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/RGBAdjust</id>
		<title>RGBAdjust</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/RGBAdjust"/>
				<updated>2021-12-09T09:54:00Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: RGBAdjust generally supports 32 bit float&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
'''RGBAdjust''' has many different methods of changing the color and luminance of your [[RGB]] clips. Gain, bias (offset) and gamma can be set independently on each channel. Also included are an analysis function and a dither option.&lt;br /&gt;
&lt;br /&gt;
All settings for this filter are optional. [[ColorYUV]] works in a similar manner for [[YUV]] clips.&lt;br /&gt;
&lt;br /&gt;
* {{AvsPluscon}} all [[RGB]] and [[RGBA]] color formats are supported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax and Parameters ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
{{FuncDef|RGBAdjust(clip ''clip'' [, &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float ''r'', float ''g'', float ''b'', float ''a'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float ''rb'', float ''gb'', float ''bb'', float ''ab'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;float ''rg'', float ''gg'', float ''bg'', float ''ag'', &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bool ''analyze'', bool ''dither'', {{AvsPluscon}} bool ''conditional'', {{AvsPluscon}} bool ''condvarsuffix'' ] )&lt;br /&gt;
}}   &lt;br /&gt;
&lt;br /&gt;
:{{Par2|r|float|1.0}}&lt;br /&gt;
:{{Par2|g|float|1.0}}&lt;br /&gt;
:{{Par2|b|float|1.0}}&lt;br /&gt;
::Red, green and blue scaling factor. Range 0.0 to 255.0&lt;br /&gt;
::For example, {{FuncArg|r}}=3.0 multiplies the red channel pixel values by 3. &lt;br /&gt;
::{{AvsPluscon}} [[Autoscale_parameter|autoscaled]] &amp;amp;ndash; works without changes at all bit depths, gain is bit depth independent.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|a|float|1.0}}&lt;br /&gt;
::Alpha adjustment&amp;amp;mdash;the transparency information on a per-pixel basis. &lt;br /&gt;
::An alpha value of zero represents full transparency, and a value of 1 represents a full opacity. &lt;br /&gt;
&lt;br /&gt;
:{{Par2|rb|float|0.0}}&lt;br /&gt;
:{{Par2|gb|float|0.0}}&lt;br /&gt;
:{{Par2|bb|float|0.0}}&lt;br /&gt;
:{{Par2|ab|float|0.0}}&lt;br /&gt;
::Bias adjustment&amp;amp;mdash;add a fixed positive or negative value to a channel's pixel values. For example, &lt;br /&gt;
::{{FuncArg|rb}}=16 will add 16 to all red pixel values and&lt;br /&gt;
::{{FuncArg|rb}}=-32 will subtract 32 from all red pixel values.&lt;br /&gt;
::{{AvsPluscon}} not [[Autoscale_parameter|autoscaled]] &amp;amp;ndash; caller must scale arguments by 4 for 10-bit, etc.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|rg|float|1.0}}&lt;br /&gt;
:{{Par2|gg|float|1.0}}&lt;br /&gt;
:{{Par2|bg|float|1.0}}&lt;br /&gt;
:{{Par2|ag|float|1.0}}&lt;br /&gt;
::Gamma adjustment&amp;amp;mdash;an [[Wikipedia:Gamma_correction|exponential gain factor]]. For example, &lt;br /&gt;
::{{FuncArg|rg}}=1.2 will brighten the red pixel values and &lt;br /&gt;
::{{FuncArg|gg}}=0.8 will darken the green pixel values.&lt;br /&gt;
&lt;br /&gt;
:{{Par2|analyze|bool|false}}&lt;br /&gt;
::If true, '''RGBAdjust''' will print color channel statistics on the screen (see [[#analyze|example below]])&lt;br /&gt;
::*There are '''Maximum''' and '''Minimum''' values for all channels. &lt;br /&gt;
::*There is an '''Average''' and a '''Standard Deviation''' for all channels. &lt;br /&gt;
::*There is '''Loose Minimum''' and '''Loose Maximum''' which ignore the brightest and darkest 0.4% (1/256) pixels.&lt;br /&gt;
::{{AvsPluscon}} parameter is supported for 32 bit float color spaces as well, but loose min/max is based on a 16bit quantized data (loose min/max is based on an internal histogram)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|dither|bool|false}}&lt;br /&gt;
::If true, [[ordered dithering]] is applied when doing the adjustment.&lt;br /&gt;
::{{AvsPluscon}} parameter is ignored for 32 bit float color spaces&lt;br /&gt;
&lt;br /&gt;
:{{Par2|conditional|bool|false}}&lt;br /&gt;
::{{AvsPluscon}} If true, the global variables &amp;quot;rgbadjust_xxx&amp;quot; with xxx = r, g, b, a, rb, gb, bb, ab, rg, gg, bg, ag are read each frame, and applied. &lt;br /&gt;
::It is possible to modify these variables using FrameEvaluate or ConditionalReader. (functionality similar to ColorYUV)&lt;br /&gt;
&lt;br /&gt;
:{{Par2|condvarsuffix|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:: {{AvsPluscon}} this parameter works similarly in ColorYUV, RGBAdjust, Overlay, ConditionalReader.&lt;br /&gt;
:: Allows multiple filter instances to use differently named conditional parameters, thus preventing collision and overwrite of variables which are used by different ConditionalReader instances.&lt;br /&gt;
:: See Conditional Variables section of http://avisynth.nl/index.php/ColorYUV.&lt;br /&gt;
:: How does it work: when reading the global variables, the &amp;quot;condvarsuffix&amp;quot; parameter is appended to the variable name.&lt;br /&gt;
:: E.g. ColorYUV will read &amp;quot;coloryuv_gain_y_a&amp;quot; instead of &amp;quot;coloryuv_gain_y&amp;quot; when condvarsuffix = &amp;quot;_a&amp;quot; is provided for ColorYUV.&lt;br /&gt;
:: In the matching ConditionalReader one have to use the modified name as well:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|80|2}} &amp;gt;&lt;br /&gt;
  ConditionalReader(&amp;quot;coloryuvoffset.txt&amp;quot;, &amp;quot;coloryuv_gain_y&amp;quot;, false, CondVarSuffix = &amp;quot;_a&amp;quot;) # &amp;quot;_a&amp;quot; is added here by parameter&lt;br /&gt;
  ConditionalReader(&amp;quot;rgbfix.txt&amp;quot;, &amp;quot;rgbadjust_r&amp;quot;, false, CondVarSuffix = &amp;quot;_1&amp;quot;) # &amp;quot;_1&amp;quot; is added here by parameter&lt;br /&gt;
  ConditionalReader(&amp;quot;rgbfix2.txt&amp;quot;, &amp;quot;rgbadjust_r&amp;quot;, false, CondVarSuffix = &amp;quot;_2&amp;quot;) # &amp;quot;_2&amp;quot; is added here by parameter&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: or specify the suffixed name directly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|76|2}} &amp;gt;&lt;br /&gt;
  ConditionalReader(&amp;quot;coloryuvoffset.txt&amp;quot;, &amp;quot;coloryuv_gain_y_a&amp;quot;, false) # &amp;quot;_a&amp;quot; is added here manually&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
*All arguments default&amp;amp;mdash;leaves the clip untouched:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|36|2}} &amp;gt;&lt;br /&gt;
 RGBAdjust'''(1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Keep in mind ALL the channels are not scaled to accommodate changes to one&amp;amp;mdash;for that you should use [[Levels]]. &lt;br /&gt;
:So doing something like: &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|24|2}} &amp;gt;&lt;br /&gt;
 RGBAdjust(2, 1, 1, 1) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:will get you a whole lot of clipped red. If you WANT a whole lot of clipped red, there ya go - but if you want MORE red without clipping you'd do &lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|36|2}} &amp;gt;&lt;br /&gt;
 [[Levels]](0, 1, 255, 0, 128).RGBAdjust(2, 1, 1, 1) &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:This would scale all the levels (and average luminance) by half, then double the red. Or more compact&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|24|2}} &amp;gt;&lt;br /&gt;
 RGBAdjust(1.0, 0.5, 0.5, 1.0)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:This leaves the red and halves the green and blue.&lt;br /&gt;
&lt;br /&gt;
*To invert the alpha channel&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|24|2}} &amp;gt;&lt;br /&gt;
 RGBAdjust(a=-1.0, ab=255)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
:Thus alpha pixels values become a=(255-a).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;analyze&amp;quot; style=&amp;quot;display:inline;font-size:50%;height:0;line-height:0;overflow:hidden;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
*Demonstrating {{FuncArg|analyze}} output&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|24|2}} &amp;gt;&lt;br /&gt;
 [[FFmpegSource|FFmpegSource2]](&amp;quot;[http://www.sintel.org/ sintel].mp4&amp;quot;)&lt;br /&gt;
 [[ConvertToRGB32]]&lt;br /&gt;
 [[BicubicResize]](546, 272)&lt;br /&gt;
 RGBAdjust(analyze=true)&lt;br /&gt;
[[File:RGBAdjust_Ex1.jpg]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changes ==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| {{AvsPluscon}} 3.7.1&lt;br /&gt;
| ''analyze'' for 32bit float color spaces&lt;br /&gt;
|- &lt;br /&gt;
| {{AvsPluscon}} r2915&lt;br /&gt;
| Added ''condvarsuffix''&lt;br /&gt;
|- &lt;br /&gt;
| {{AvsPluscon}} r2724&lt;br /&gt;
| Added 32 bit float.&lt;br /&gt;
Added ''conditional''&lt;br /&gt;
|- &lt;br /&gt;
| v2.60&lt;br /&gt;
| Added dither.&lt;br /&gt;
|- &lt;br /&gt;
| v2.56&lt;br /&gt;
| Added offsets, gamma, analyze.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Internal filters]]&lt;br /&gt;
[[Category:Levels and Chroma filters]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php/Internal_filters</id>
		<title>Internal filters</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php/Internal_filters"/>
				<updated>2021-12-09T09:44:58Z</updated>
		
		<summary type="html">&lt;p&gt;Pinterf: /* Color conversion and adjustment filters */ RGBAdjust to support 32 bit float&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:76em; min-width:48em&amp;quot;&amp;gt;&lt;br /&gt;
The available (internal) filters are listed here and divided into categories. A short description is added, including the supported [[Color_spaces|color formats]] (and sample types for the audio filters). There are some functions which combine two or more clips in different ways. How the video content is calculated is described for each function, but [[filters_with_multiple_input_clips|here is a summary which explains which properties that the resulting clip will have]].&lt;br /&gt;
&lt;br /&gt;
An alphabetical listing of the internal filters can be found [[:Category:Internal_filters|here]].&lt;br /&gt;
&lt;br /&gt;
=== Source filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can read media files and return an AviSynth clip. See [[#Debug_filters|debug filters]] for non-file source filters.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|- &lt;br /&gt;
| [[AviSource]] / [[AviFileSource]] / [[OpenDMLSource]]&lt;br /&gt;
| Opens an AVI file.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DirectShowSource]]&lt;br /&gt;
| Opens a filename using [[DirectShow]].&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ImageReader]] / [[ImageSource]] / [[ImageSourceAnim]]&lt;br /&gt;
| Reads in still or animated images. See [[#Export_filters|ImageWriter]].&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Import]]&lt;br /&gt;
| Imports an AviSynth script into the current script.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SegmentedAviSource]] / [[SegmentedDirectShowSource]]&lt;br /&gt;
| Loads up to 100 avi files per argument.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[WavSource]]&lt;br /&gt;
| Opens a WAV file or the audio of an AVI file.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Color conversion and adjustment filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can be used to change the color format or adjust the colors of a clip.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|- &lt;br /&gt;
| [[ColorYUV]]&lt;br /&gt;
| Adjusts colors and luma independently.&lt;br /&gt;
| [[#Color_formats|YUV &amp;lt;small&amp;gt;{{Sup2|[''8-16bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertBackToYUY2]]&lt;br /&gt;
| Converts a RGB clip back to YUY2.&lt;br /&gt;
| [[#Color_formats|RGB]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToRGB]]&lt;br /&gt;
| Converts to RGB32 unless clip is RGB24.&lt;br /&gt;
| [[#Color_formats|All &amp;lt;small&amp;gt;{{Sup2|[''8bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToRGB24]] / [[ConvertToRGB32]] &lt;br /&gt;
| Converts to 8-bit [[Interleaved]] RGB24 / RGB32.&lt;br /&gt;
| [[#Color_formats|All &amp;lt;small&amp;gt;{{Sup2|[''8bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Convert|ConvertToRGB48]] / [[Convert|ConvertToRGB64]] &lt;br /&gt;
| {{AvsPluscon}} Converts to [[Deep_Color|16-bit]], [[Interleaved]] RGB48 / RGB64 &lt;br /&gt;
| [[#Color_formats|All &amp;lt;small&amp;gt;{{Sup2|[''16bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Convert|ConvertToPlanarRGB]] /&amp;lt;br&amp;gt;[[Convert|ConvertToPlanarRGBA]]&lt;br /&gt;
| {{AvsPluscon}} Converts to [[Planar]] RGB(A) at [[Deep_Color|all bit depths]]&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToYUY2]]&lt;br /&gt;
| Converts to 8-bit [[Interleaved]] [[YUY2]].&lt;br /&gt;
| [[#Color_formats|RGB24/32, YUV &amp;lt;small&amp;gt;{{Sup2|[''8bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToYV24]] / [[ConvertToYV16]] / &amp;lt;br&amp;gt;&lt;br /&gt;
[[ConvertToYV12]] / [[ConvertToY8]] &lt;br /&gt;
| Converts to 8-bit [[Planar]] YV24, YV16, YV12, Y-only.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Convert|ConvertToYUV444]] / [[Convert|ConvertToYUV422]] /&amp;lt;br&amp;gt;[[Convert|ConvertToYUV420]] /&amp;lt;br&amp;gt;&amp;lt;span style=&amp;quot;font-size:96%;letter-spacing:90%&amp;quot;&amp;gt;[[Convert|ConvertToYUVA444]]&amp;amp;nbsp;/&amp;amp;nbsp;[[Convert|ConvertToYUVA422]]&amp;amp;nbsp;/&amp;lt;br&amp;gt;[[Convert|ConvertToYUVA420]]&amp;lt;/span&amp;gt;&lt;br /&gt;
| {{AvsPluscon}} Converts to [[Planar]] YUV(A) at [[Deep_Color|all bit depths]]&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Convert|ConvertToYUV411]]&lt;br /&gt;
| {{AvsPluscon}} Converts to 8-bit [[Planar]] [[YV411]]&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[FixLuminance]]&lt;br /&gt;
| Correct shifting vertical luma offset.&lt;br /&gt;
| YUY2&lt;br /&gt;
|-&lt;br /&gt;
| [[Greyscale]]/[[Grayscale]]&lt;br /&gt;
| Converts a video to greyscale (no color)&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Invert]]&lt;br /&gt;
| Inverts selected color channels of a video.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Levels]]&lt;br /&gt;
| Scales and clamps the black and white levels, and adjusts the gamma.&lt;br /&gt;
| [[#Color_formats|All &amp;lt;small&amp;gt;{{Sup2|[''8-16bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Limiter]]&lt;br /&gt;
| Clips levels to within CCIR-601 range, and optionally highlights pixels outside that range.&lt;br /&gt;
| [[#Color_formats|YUV &amp;lt;small&amp;gt;{{Sup2|[''8-16bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MergeRGB]] / [[MergeARGB]]&lt;br /&gt;
| Select and combine a color channel from each of the input video clips.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MergeLuma]] / [[MergeChroma]]&lt;br /&gt;
| Merge (blend) chroma or luma from one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified.&lt;br /&gt;
| [[#Color_formats|YUV]]&lt;br /&gt;
|-&lt;br /&gt;
| [[RGBAdjust]]&lt;br /&gt;
| Adjusts each color channel separately.&lt;br /&gt;
| [[#Color_formats|RGB &amp;lt;small&amp;gt;{{Sup2|[''8-32bit'']}}&amp;lt;/small&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowRed]] / [[ShowGreen]] / [[ShowBlue]] / [[ShowAlpha]]&lt;br /&gt;
| Shows the selected channel of an (A)RGB clip.&lt;br /&gt;
| [[#Color_formats|RGB]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SwapUV]]&lt;br /&gt;
| Swaps chroma channels.&lt;br /&gt;
| [[#Color_formats|YUV]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Tweak]]&lt;br /&gt;
| Adjusts the hue, saturation, brightness, and contrast.&lt;br /&gt;
| [[#Color_formats|YUV]]&lt;br /&gt;
|-&lt;br /&gt;
| [[UToY]] / [[UToY8]] / [[VToY]] / [[VToY8]]&lt;br /&gt;
| Copies U or V chroma plane to the Y luma plane.&lt;br /&gt;
| [[#Color_formats|YUV]], except [[Y8]]&lt;br /&gt;
|-&lt;br /&gt;
| [[YToUV]]&lt;br /&gt;
| Puts the luma channels of two clips as U and V channels. Luma is now 50% grey.&lt;br /&gt;
| [[#Color_formats|YUV]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Overlay and Mask filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can be used to layer clips with or without using masks and to create masks.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorKeyMask]]&lt;br /&gt;
| Sets the alpha-channel (similar as Mask does) but generates it by comparing the color.&lt;br /&gt;
| [[#Color_formats|RGB32; RGB64 {{AvsPluscon2}}]],&amp;lt;br&amp;gt;[[#Color_formats|All Planar RGB {{AvsPluscon2}}]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Layer]]&lt;br /&gt;
| Puts one clip on top of another using different layer (blend) modes and variable opacity. Supports alpha-channel transparency.&lt;br /&gt;
| [[#Color_formats|YUY2, RGB32]];&amp;lt;br&amp;gt;&lt;br /&gt;
[[#Color_formats|All]] except YV411 {{AvsPluscon2}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Mask]]&lt;br /&gt;
| Applies an alpha-mask to a clip.&lt;br /&gt;
| [[#Color_formats|RGB32; RGB64 {{AvsPluscon2}}]],&amp;lt;br&amp;gt;[[#Color_formats|All Planar RGB {{AvsPluscon2}}]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MaskHS]]&lt;br /&gt;
| This filter returns a mask (as Y8) of clip using a given hue and saturation range.&lt;br /&gt;
| [[#Color_formats|YUV]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Merge]]&lt;br /&gt;
| Merge (blend) one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Overlay]]&lt;br /&gt;
| Puts one clip on top of another with optional XY displacement of the overlaying image, using different overlay (blend) modes and variable opacity. Uses a separate ''mask'' clip for transparency information.&lt;br /&gt;
| [[#Color_formats|All]] except YV411&lt;br /&gt;
|-&lt;br /&gt;
| [[ResetMask]]&lt;br /&gt;
| Applies an &amp;quot;all-opaque&amp;quot; alpha-mask to clip.&lt;br /&gt;
| [[#Color_formats|RGB32; RGB64 {{AvsPluscon2}}]],&lt;br /&gt;
[[#Color_formats|All Planar RGB {{AvsPluscon2}}]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Subtract]]&lt;br /&gt;
| Shows the difference between the corresponding pixels of two clips.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Geometric deformation filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can be used to change image size, process borders or make other deformations of a clip.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|- &lt;br /&gt;
| [[AddBorders]]&lt;br /&gt;
| Adds black or colored borders around the image.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Crop]]&lt;br /&gt;
| Crops excess pixels from each frame.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[CropBottom]]&lt;br /&gt;
| Crops excess pixels from the bottom of each frame.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[FlipHorizontal]] / [[FlipVertical]]&lt;br /&gt;
| Flips the video from left to right/upside-down.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Letterbox]]&lt;br /&gt;
| Blackens out (or colors out) the top and bottom (and optionally left and right) of each frame. &lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[HorizontalReduceBy2]] / [[VerticalReduceBy2]] / [[ReduceBy2]]&lt;br /&gt;
| Reduces the size of each frame by half horizontally, vertically or in both directions.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[BicubicResize]] / [[BilinearResize]] / [[BlackmanResize]] / [[GaussResize]] / [[LanczosResize]] / [[Lanczos4Resize]] / [[PointResize]] / [[SincResize]] / [[Spline16Resize]] / [[Spline36Resize]] / [[Spline64Resize]]&lt;br /&gt;
| Rescale the input video frames to an arbitrary new resolution, using different sampling algorithms.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SkewRows]]&lt;br /&gt;
| Skews (or deskews) the rows of a clip.&lt;br /&gt;
| RGB24, RGB32,&amp;lt;br&amp;gt;YUY2, Y8&lt;br /&gt;
|-&lt;br /&gt;
| [[TurnLeft]] / [[TurnRight]] / [[Turn180]]&lt;br /&gt;
| Rotates the clip 90 degrees counter-clockwise / 90 degrees clockwise.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pixel restoration filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can be used for image detail (pixel) restoration (like denoising, sharpening) of a clip.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|- &lt;br /&gt;
| [[Blur]] / [[Sharpen]]&lt;br /&gt;
| Simple 3x3-kernel blurring/sharpening filter.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[GeneralConvolution]]&lt;br /&gt;
| General 3x3 or 5x5 convolution matrix.&lt;br /&gt;
| [[RGB32]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SpatialSoften]]&lt;br /&gt;
| Removes noise from a video clip by selectively blending pixels spatially.&lt;br /&gt;
| [[YUY2]]&lt;br /&gt;
|-&lt;br /&gt;
| [[TemporalSoften]]&lt;br /&gt;
| Removes noise from a video clip by selectively blending pixels temporally.&lt;br /&gt;
| All except [[RGB24]]&amp;lt;br&amp;gt;and [[Avisynthplus_color_formats|RGB48]] {{AvsPluscon2}}&lt;br /&gt;
|-&lt;br /&gt;
| [[FixBrokenChromaUpsampling]]&lt;br /&gt;
| The free Canopus DV Codec v1.00 upsamples the chroma channels incorrectly (although newer non-free versions appear to work fine). This filter compensates for it.&lt;br /&gt;
| YUY2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Timeline editing filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can be used to arrange frames in time (clip cutting, splicing and other editing).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[AlignedSplice]] / [[UnalignedSplice]]&lt;br /&gt;
| Joins two or more video clips end to end.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeFPS]] / [[AssumeScaledFPS]] / [[ChangeFPS]] / [[ConvertFPS]]&lt;br /&gt;
| Changes framerate and/or video speed in different ways.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DeleteFrame]]&lt;br /&gt;
| Deletes a single frame, given as an argument.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Dissolve]]&lt;br /&gt;
| Like [[AlignedSplice]], except that the clips are combined with some overlap.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DuplicateFrame]]&lt;br /&gt;
| Duplicates a single frame given as an argument.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[FadeIn0]] / [[FadeIn]] / [[FadeIn2]] / [[FadeOut0]] / [[FadeOut]] / [[FadeOut2]] / [[FadeIO0]] / [[FadeIO]] / [[FadeIO2]]&lt;br /&gt;
| Causes the video stream to fade linearly to black at the start or end.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[FreezeFrame]]&lt;br /&gt;
| Replaces all the frames between ''first-frame'' and ''last-frame'' with a selected frame.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Interleave]]&lt;br /&gt;
| Interleaves frames from several clips on a frame-by-frame basis.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Loop]]&lt;br /&gt;
| Loops the segment from ''start_frame'' to ''end_frame'' a given number of times.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Reverse]]&lt;br /&gt;
| Makes a clip play in reverse.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SelectEven]] / [[SelectOdd]]&lt;br /&gt;
| Makes an output video stream using only the even- or odd-numbered frames.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SelectEvery]]&lt;br /&gt;
| Selects frames with a fixed period; a generalization of [[SelectEven]] and [[SelectOdd]].&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SelectRangeEvery]]&lt;br /&gt;
| Selects a range of frames with a fixed period.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Trim]]&lt;br /&gt;
| Trims a video clip so that it includes only the frames ''first_frame'' through ''last_frame''.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Interlace filters ===&lt;br /&gt;
&lt;br /&gt;
These filters can be used for creating and processing field-based material (which is frame-based material separated into fields). AviSynth is capable of dealing with both progressive and interlaced material. The main problem is, that it often doesn't know what it receives from source filters. This is the reason that the field-based flag exists and can be used when dealing with interlaced material. More information about field-based video can be found [[Interlaced_fieldbased|here]].&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeFrameBased]] / [[AssumeFieldBased]]&lt;br /&gt;
| Forces frame-based or field-based material.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeBFF]] / [[AssumeTFF]]&lt;br /&gt;
| Forces field order.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Bob]]&lt;br /&gt;
| Takes a clip and [[Wikipedia:Deinterlacing#Field_extension_deinterlacing|bob-deinterlaces]] it.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ComplementParity]]&lt;br /&gt;
| Changes top fields to bottom fields and vice-versa.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DoubleWeave]]&lt;br /&gt;
| Operates like [[Weave]], except that it produces double the number of frames by combining both the odd and even pairs of fields.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[PeculiarBlend]]&lt;br /&gt;
| Blends each frame with the following frame in a peculiar way.&lt;br /&gt;
| YUY2&lt;br /&gt;
|-&lt;br /&gt;
| [[Pulldown]]&lt;br /&gt;
| Selects two out of every five frames of the source video.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SeparateColumns]] / [[SeparateRows]]&lt;br /&gt;
| Separates the columns or rows of each frame into new frames.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SeparateFields]]&lt;br /&gt;
| Splits each frame into its component top and bottom fields.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[SwapFields]]&lt;br /&gt;
| Swaps the two fields in an interlaced frame.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Weave]]&lt;br /&gt;
| Combines fields together to produce interlaced frames.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[WeaveColumns]] / [[WeaveRows]]&lt;br /&gt;
| Takes a clip and weaves sets of columns or rows together to produce composite frames.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Audio processing filters ===&lt;br /&gt;
&lt;br /&gt;
These filters process audio. Audio samples will be automatically converted if any filters requires a special type of sample. This means that if a filter doesn't support the type of sample it is given, it will automatically convert the samples to something it supports. The internal formats supported in each filter is listed in the sample type column. A specific sample type can be forced by using the [[ConvertAudio]] functions.&lt;br /&gt;
&lt;br /&gt;
{{AvsPluscon}} automatic conversion is ''not'' performed. The new behavior is to raise an error when a sample type is not compatible. It is your responsibility to use [[ConvertAudio]] where needed.&lt;br /&gt;
&lt;br /&gt;
[[Float]] audio is converted to 16 bit when [[Frameserver|frameserving]] through [[ACM]], unless [[Internal_functions#OPT_AllowFloatAudio|OPT_AllowFloatAudio]] is set to true. In that case the audio is kept as it is. When accessing AviSynth directly (like MeGUI, BeHappy or ffmpeg do for example), there is no automatic conversion.&lt;br /&gt;
&lt;br /&gt;
The automatic conversion is done for clients that cannot handle [[Float]] audio (in the old days most of them couldn't). Note conversion takes place ''after'' the script processing is finished. [[Float]] audio is always allowed within the script.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Sample type&lt;br /&gt;
|-&lt;br /&gt;
| [[Amplify]] / [[AmplifydB]]&lt;br /&gt;
| Amplify multiply audio samples by amount.&lt;br /&gt;
| 16 bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[AssumeSampleRate]]&lt;br /&gt;
| Adjusts the playback speed of the audio.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[AudioDub]] / [[AudioDubEx]]&lt;br /&gt;
| ''AudioDub'' takes the video stream from the first argument and the audio stream from the second argument and combines them. ''AudioDubEx'' is similar, but it doesn't throw an exception if both clips don't have a video or audio stream.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[AudioTrim]]&lt;br /&gt;
| Trims an audio clip so that it includes only the ''start_time'' through ''end_time''.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertAudioTo8bit]] / [[ConvertAudioTo16bit]] / [[ConvertAudioTo24bit]] / [[ConvertAudioTo32bit]] / [[ConvertAudioToFloat]]&lt;br /&gt;
| Converts audio samples to 8/16/24/32/Float bits.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[ConvertToMono]]&lt;br /&gt;
| Merges all audio channels.&lt;br /&gt;
| 16 bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[DelayAudio]]&lt;br /&gt;
| Delays the audio track by second seconds.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[EnsureVBRMP3Sync]]&lt;br /&gt;
| Corrects out-of-sync MP3-AVI's, when seeking or trimming.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[GetChannel]] / [[GetLeftChannel]] / [[GetRightChannel]]&lt;br /&gt;
| Returns an audio channel from a clip.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[KillAudio]] / [[KillVideo]]&lt;br /&gt;
| Removes the audio or video from a clip completely.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[MergeChannels]]&lt;br /&gt;
| Merges channels of two audio clips.&lt;br /&gt;
| All&lt;br /&gt;
|-&lt;br /&gt;
| [[MixAudio]]&lt;br /&gt;
| Mixes audio from two clips.&lt;br /&gt;
| 16 bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[MonoToStereo]]&lt;br /&gt;
| Converts two mono signals to one stereo signal.&lt;br /&gt;
| 16 bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[Normalize]]&lt;br /&gt;
| Amplifies the entire waveform as much as possible, without clipping.&lt;br /&gt;
| 16 bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[ResampleAudio]]&lt;br /&gt;
| Performs a high-quality change of audio sample rate.&lt;br /&gt;
| 16 bit, Float&lt;br /&gt;
|-&lt;br /&gt;
| [[SuperEQ]]&lt;br /&gt;
| High quality 18 band sound equalizer.&lt;br /&gt;
| Float&lt;br /&gt;
|-&lt;br /&gt;
| [[SSRC]]&lt;br /&gt;
| Very high quality sample rate conversion.&lt;br /&gt;
| Float&lt;br /&gt;
|-&lt;br /&gt;
| [[TimeStretch]]&lt;br /&gt;
| Change speed of a sound without changing the pitch, and change pitch without changing duration.&lt;br /&gt;
| Float&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Conditional and other meta filters  ===&lt;br /&gt;
&lt;br /&gt;
''Meta'' filters can be used to control other filters' execution. The basic characteristic of conditional filters is that their scripts are evaluated (executed) at every frame instead of when the clip is loaded. This allows for complex video processing that would be difficult or impossible to be performed by a normal AviSynth script. &lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[ConditionalFilter]] / [[FrameEvaluate]] / [[ScriptClip]] / [[ConditionalSelect]]&lt;br /&gt;
| ''ConditionalFilter'' returns source1 if some condition is met, otherwise it returns source2. ''ScriptClip/FrameEvaluate'' returns the clip which is returned by the function evaluated on every frame. ''ConditionalSelect'' returns one frame from several sources based on an integer evaluator.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ConditionalReader]]&lt;br /&gt;
| Import information from a text file, with different values for each frame - or a range of frames.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[WriteFile]] / [[WriteFileIf]] / [[WriteFileStart]] / [[WriteFileEnd]]&lt;br /&gt;
| These filters evaluate expressions and output the results to a text-file.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Animate]] / [[ApplyRange]]&lt;br /&gt;
| ''Animate'' is a meta-filter which evaluates another filter with continuously varying arguments.&lt;br /&gt;
''ApplyRange'' 'is a special case of ''Animate'' where ''start_args'' = ''end_args''.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[TCPServer]] / [[TCPSource]]&lt;br /&gt;
| Send clips over your network. You can connect several clients to the same machine.&lt;br /&gt;
| [[#Color_formats|All]]&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;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[ImageWriter]]&lt;br /&gt;
| Writes frames as images to your hard disk. See [[#Source_filters|ImageReader]].&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Debug filters ===&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; width:95%&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!width=25%| Filter&lt;br /&gt;
!width=50%| Description&lt;br /&gt;
!width=15%| Color format&lt;br /&gt;
|-&lt;br /&gt;
| [[BlankClip]] / [[Blackness]]&lt;br /&gt;
| Produces a solid color, silent video clip of the specified length (in frames).&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ColorBars]] / [[ColorBarsHD]]&lt;br /&gt;
| Produce a video clip containing SMPTE colorbars scaled to any image size.&lt;br /&gt;
| RGB32, YUY2,&amp;lt;br&amp;gt;YV12, YV24&lt;br /&gt;
|-&lt;br /&gt;
| [[Compare]]&lt;br /&gt;
| Compares two clips and prints out information about the differences.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[DumpFilterGraph]] / [[SetGraphAnalysis]]&lt;br /&gt;
| {{AvsPluscon}} This functions are for outputting the flow of filtering as a graph.&lt;br /&gt;
| [[#Color_formats|n/a]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Echo]]&lt;br /&gt;
| Forces internal &amp;lt;tt&amp;gt;GetFrame&amp;lt;/tt&amp;gt; calls to all input clips. Returns only first clip result.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Histogram]]&lt;br /&gt;
| A multipurpose audio/video analysis tool.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Info]]&lt;br /&gt;
| Prints out image and sound information.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[MessageClip]]&lt;br /&gt;
| Produces a clip containing a text message.&lt;br /&gt;
| RGB32&lt;br /&gt;
|-&lt;br /&gt;
| [[Preroll]]&lt;br /&gt;
| Preroll the audio or video on non-linear access.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowFiveVersions]]&lt;br /&gt;
| Takes five video clips and combines them in a staggered arrangement from left to right.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[ShowFrameNumber]] / [[ShowSMPTE]] / [[ShowTime]]&lt;br /&gt;
| Draws text on every frame indicating what number AviSynth thinks it is.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[StackHorizontal]] / [[StackVertical]]&lt;br /&gt;
| Takes two or more video clips and displays them together in left-to-right/up-to-down order.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Subtitle]]&lt;br /&gt;
| Adds anti-aliased text to a range of frames.&lt;br /&gt;
| [[#Color_formats|All]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Tone]]&lt;br /&gt;
| Generates a sound.&lt;br /&gt;
| Float&lt;br /&gt;
|-&lt;br /&gt;
| [[Version]]&lt;br /&gt;
| Generates a video clip with a short AviSynth version and copyright statement.&lt;br /&gt;
| RGB24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{HiddenAnchor|Color_formats}}&lt;br /&gt;
&lt;br /&gt;
=== Footnotes ===&lt;br /&gt;
&lt;br /&gt;
The above filters work with the following named '''[[Avisynthplus_color_formats|color formats]]'''.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;height:100px; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Name&lt;br /&gt;
!Formats&lt;br /&gt;
|-&lt;br /&gt;
| All&lt;br /&gt;
| RGB, YUV (detailed below)&lt;br /&gt;
|-&lt;br /&gt;
| [[RGB]] [[Interleaved]]&amp;amp;nbsp;&lt;br /&gt;
| [[RGB24]], [[RGB32]] &amp;lt;small&amp;gt;{{Sup2|[''8bit'']}}&amp;lt;/small&amp;gt;&amp;lt;br&amp;gt;[[Avisynthplus_color_formats|RGB48, RGB64]] &amp;lt;small&amp;gt;{{Sup2|[''16bit'']}}&amp;lt;/small&amp;gt; {{AvsPluscon2}}&lt;br /&gt;
|-&lt;br /&gt;
| [[RGB]] [[Planar]]&lt;br /&gt;
| [[Avisynthplus_color_formats|RGBP8, RGB'''A'''P8, RGBP'''10''', RGB'''A'''P10 etc]]&amp;amp;nbsp;{{AvsPluscon2}}&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| [[YUV]]&lt;br /&gt;
| [[YUY2]] [[Interleaved]], YUV [[Planar]],&amp;lt;br&amp;gt;[[Avisynthplus_color_formats|YUVA Planar]]&amp;amp;nbsp;{{AvsPluscon2}}  &lt;br /&gt;
|-&lt;br /&gt;
| YUV [[Planar]]&amp;amp;nbsp;&lt;br /&gt;
| [[YV12]], [[YV24]]&amp;amp;Dagger;, [[YV16]]&amp;amp;Dagger;, [[YV411]]&amp;amp;Dagger;, [[Y8]]&amp;amp;Dagger;&amp;amp;nbsp;&amp;lt;br&amp;gt;[[Avisynthplus_color_formats|YUV444P8, YUV444P'''10''', YUV444P'''12''' etc]] {{AvsPluscon2}}&lt;br /&gt;
|-&lt;br /&gt;
| YUVA [[Planar]]&amp;amp;nbsp;&lt;br /&gt;
| [[Avisynthplus_color_formats|YUV'''A'''444P8, YUV'''A'''444P'''10''', YUV'''A'''444P12 etc]]&amp;amp;nbsp;{{AvsPluscon2}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;|''Notes and exceptions.''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:right;padding-right:0.5em;width:4.0em&amp;quot; |&amp;amp;Dagger;&lt;br /&gt;
| Not supported in AviSynth version 2.58 or below&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:right;padding-right:0.5em&amp;quot; |{{AvsPluscon2}}&lt;br /&gt;
| [[AviSynth%2B|AviSynth+]] color space only (Deep Color, Planar RGB, YUVA).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:right;padding-right:0.5em&amp;quot; | &amp;lt;small&amp;gt;{{Sup2|[''8bit'']}}&amp;lt;/small&amp;gt; &lt;br /&gt;
| &amp;amp;nbsp;&amp;amp;nbsp;8-bit only {{AvsPluscon2}}&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:right;padding-right:0.5em&amp;quot; | &amp;lt;small&amp;gt;{{Sup2|[''16bit'']}}&amp;lt;/small&amp;gt; &lt;br /&gt;
| 16-bit only {{AvsPluscon2}}&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:right;padding-right:0.5em&amp;quot; | &amp;lt;small&amp;gt;{{Sup2|[''8-16bit'']}}&amp;lt;/small&amp;gt;&lt;br /&gt;
| 8, 10, 12, 14, 16 bit (excludes 32-bit floating-point) {{AvsPluscon2}}&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:right;padding-right:0.5em&amp;quot; |{{AvsPluscon}}&lt;br /&gt;
| [[AviSynth%2B|AviSynth+]] filter only.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:AviSynth_Usage]]&lt;br /&gt;
[[Category:AviSynth_Syntax]]&lt;/div&gt;</summary>
		<author><name>Pinterf</name></author>	</entry>

	</feed>