<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_AAF</id>
	<title>Vapoursynth AAF - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_AAF"/>
	<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_AAF&amp;action=history"/>
	<updated>2026-11-19T08:13:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.selur.net/index.php?title=Vapoursynth_AAF&amp;diff=444&amp;oldid=prev</id>
		<title>Selur: New filter page (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_AAF&amp;diff=444&amp;oldid=prev"/>
		<updated>2026-11-16T08:47:20Z</updated>

		<summary type="html">&lt;p&gt;New filter page (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;AAF&amp;#039;&amp;#039;&amp;#039; is a VapourSynth port of MOmonster&amp;#039;s AviSynth anti-aliasing script &amp;#039;&amp;#039;aaf&amp;#039;&amp;#039;. It upscales the picture, lets SangNom rebuild the lines in both directions and scales back, then limits SangNom&amp;#039;s side effects with Repair or an edge mask.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Filtering → Vapoursynth → Line&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Vapoursynth_AAF.png|none|AAF controls in Hybrid]]&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
The clip is upscaled with Lanczos, [[Vapoursynth SangNom|SangNom]] interpolates vertically, the picture is transposed, SangNom interpolates horizontally, and the result is transposed and scaled back to the source size. A post-processing step then keeps the result close to the source: in &amp;#039;&amp;#039;repair&amp;#039;&amp;#039; mode Repair limits the luma against the source, in &amp;#039;&amp;#039;edge&amp;#039;&amp;#039; mode only the edges are taken from the anti-aliased picture. Because of this post-processing AAF can use small scaling factors and stays fast. Use it against stair-stepped diagonals (jaggies).&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Control !! Parameter !! Range / values !! Hybrid default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| Mode || mode || repair, edge || repair || &amp;#039;&amp;#039;repair&amp;#039;&amp;#039;: Repair (mode 18) against the source on the luma; the chroma is anti-aliased but not repaired. &amp;#039;&amp;#039;edge&amp;#039;&amp;#039;: an edge mask from the luma decides where the result is used; keeps detail sharper and uses Strength (edge/flat).&lt;br /&gt;
|-&lt;br /&gt;
| Scaling || aas || −2 – 2 || −0.7 || Quality versus speed. A larger absolute value means a larger internal upscale: better quality, slower, weaker anti-aliasing. Negative values resize only the direction being processed (faster, more artifacts without repair). 1 behaves like the classic aa()/aaa().&lt;br /&gt;
|-&lt;br /&gt;
| Resizing || aar || 0.01 – 2 || 0.7 || Internal resize factor.&lt;br /&gt;
|-&lt;br /&gt;
| Strength (y/x) || aay / aax || 0 – 64 || 28 / 28 || SangNom strength of the vertical (y) and horizontal (x) pass; 0 skips that pass.&lt;br /&gt;
|-&lt;br /&gt;
| Strength (edge/flat) || estr / bstr || 0 – 255 || 255 / 40 || Edge mode only: strength on hard edges and on flat areas, softer edges in between. Edge should be larger than flat. 8-bit scale.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: Expr || – || akarin, cranexpr, std || akarin (std without AVX2) || Expression evaluator.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: RG || – || zsmooth, neo_smo || zsmooth || Repair implementation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Default settings on a 10-bit YUV 4:2:0 source (640x356):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Anti Aliasing using AAF&lt;br /&gt;
clip = antiAliasing.aaf(clip, aar=0.7, aax=28, tools={&amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How Hybrid calls it ==&lt;br /&gt;
* AAF works on 8–16-bit integer YUV and gray clips; other formats are converted first.&lt;br /&gt;
* Mode, Scaling and the edge/flat strengths are only written when they differ from the defaults. Resizing and the x strength are always written, the y strength when it differs from 28 (the script default), so each control acts on its own.&lt;br /&gt;
* SangNom is loaded whenever one of the two strengths is above 0.&lt;br /&gt;
* Strength (edge/flat) is given on the 8-bit scale; the script scales it to the bit depth (255 = format maximum).&lt;br /&gt;
* AAF also offers the [[Vapoursynth common filter options|common options]] (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Origin ===&lt;br /&gt;
&amp;#039;&amp;#039;aaf&amp;#039;&amp;#039; is one of many variations of the classic aaa() idea (upscale, SangNom, downscale). According to the script&amp;#039;s notes its repair post-processing allows smaller sampling values without artifacts, which makes it much faster than its predecessors. Internally Scaling is converted to (aas − 1) × 0.25 for negative and (aas + 1) × 0.25 for positive values. In edge mode an extra Repair runs unless Scaling is above 0.84.&lt;br /&gt;
&lt;br /&gt;
=== SangNom strength ===&lt;br /&gt;
SangNom&amp;#039;s aa parameter is given as if the clip were 8 bit (0–128); the plugin scales it itself.&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [https://github.com/dubhater/vapoursynth-sangnom VapourSynth-SangNom README]&lt;br /&gt;
* [https://github.com/Selur/VapoursynthScriptsInHybrid VapoursynthScriptsInHybrid] (the script collection Hybrid uses)&lt;br /&gt;
* Hybrid&amp;#039;s tooltips&lt;br /&gt;
&lt;br /&gt;
[[Category:Vapoursynth Filters]]&lt;/div&gt;</summary>
		<author><name>Selur</name></author>
	</entry>
</feed>