<?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_GradFun3Mod</id>
	<title>Vapoursynth GradFun3Mod - 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_GradFun3Mod"/>
	<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_GradFun3Mod&amp;action=history"/>
	<updated>2026-11-19T06:10:13Z</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_GradFun3Mod&amp;diff=564&amp;oldid=prev</id>
		<title>Selur: Update to current Hybrid behaviour; code as &lt;pre&gt; (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_GradFun3Mod&amp;diff=564&amp;oldid=prev"/>
		<updated>2026-11-16T08:50:24Z</updated>

		<summary type="html">&lt;p&gt;Update to current Hybrid behaviour; code as &amp;lt;pre&amp;gt; (via update-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:50, 16 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Elast || elast || 1.00 – 10.00 || 3.0 || Width of the soft zone above the threshold in which changes fade out instead of being cut.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Elast || elast || 1.00 – 10.00 || 3.0 || Width of the soft zone above the threshold in which changes fade out instead of being cut.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Smooth mode || smode || DFTTest, Bilateral, SmoothGrad multi-stage, DFTTest Mod&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, Bilateral GPU &lt;/del&gt;|| Bilateral || Smoothing method. DFTTest Mod is the legacy dfttest variant of GradFun3mod. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/del&gt;Bilateral &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GPU&quot; behaves like &quot;Bilateral&quot;; whether &lt;/del&gt;a GPU &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is used &lt;/del&gt;is chosen in Tools: Bilateral.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Smooth mode || smode || DFTTest, Bilateral, SmoothGrad multi-stage, DFTTest Mod || Bilateral || Smoothing method. DFTTest Mod is the legacy dfttest variant of GradFun3mod. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Whether &lt;/ins&gt;Bilateral &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;runs on the CPU or &lt;/ins&gt;a GPU is chosen in Tools: Bilateral.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Dither mode || mode || ordered (Bayer), round to closest, round, Filter Lite (Sierra-2-4A), Stucki, Atkinson, Floyd-Steinberg, Ostromoukhov, void and cluster || Filter Lite || How the result is brought back to the clip&amp;#039;s bit depth.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Dither mode || mode || ordered (Bayer), round to closest, round, Filter Lite (Sierra-2-4A), Stucki, Atkinson, Floyd-Steinberg, Ostromoukhov, void and cluster || Filter Lite || How the result is brought back to the clip&amp;#039;s bit depth.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Example ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Example ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Default settings on a 10-bit YUV 4:2:0 source (640x356):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Default settings on a 10-bit YUV 4:2:0 source (640x356):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&quot;python&quot;&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# debanding using GradFun3&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# debanding using GradFun3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;clip = deband.GradFun3(clip, tools={&amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;dfttest&amp;#039;: &amp;#039;neo_fft&amp;#039;, &amp;#039;bilateral&amp;#039;: &amp;#039;vszip&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;boxblur&amp;#039;: &amp;#039;vszip&amp;#039;})&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;clip = deband.GradFun3(clip, tools={&amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;dfttest&amp;#039;: &amp;#039;neo_fft&amp;#039;, &amp;#039;bilateral&amp;#039;: &amp;#039;vszip&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;boxblur&amp;#039;: &amp;#039;vszip&amp;#039;})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How Hybrid calls it ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How Hybrid calls it ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* GradFun3Mod works on 8–16-bit integer YUV clips; other formats are converted first.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* GradFun3Mod works on 8–16-bit integer YUV clips; other formats are converted first.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Threshold and amplitudes are passed as entered; the script treats the threshold as 8-bit scale itself.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Threshold and amplitudes are passed as entered; the script treats the threshold as 8-bit scale itself.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* With a GPU implementation chosen in Tools: Bilateral, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;both bilateral entries use &lt;/del&gt;the GPU bilateral (same strength as on the CPU); otherwise &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;they use &lt;/del&gt;the CPU bilateral.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* With a GPU implementation chosen in Tools: Bilateral, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the Bilateral mode uses &lt;/ins&gt;the GPU bilateral (same strength as on the CPU); otherwise &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;it uses &lt;/ins&gt;the CPU bilateral.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Values are only written when they differ from the defaults, which are the script&amp;#039;s and fmtconv&amp;#039;s own.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Values are only written when they differ from the defaults, which are the script&amp;#039;s and fmtconv&amp;#039;s own.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* With a 16-bit clip the script does not dither back, so &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the dither settings &lt;/del&gt;have no effect.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The dither settings stay enabled; they only have an effect when the script dithers back to a lower bit depth. &lt;/ins&gt;With a 16-bit clip the script does not dither back, so &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;they &lt;/ins&gt;have no effect.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* GradFun3Mod also offers the [[Vapoursynth common filter options|common options]] (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* GradFun3Mod also offers the [[Vapoursynth common filter options|common options]] (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Selur</name></author>
	</entry>
	<entry>
		<id>https://wiki.selur.net/index.php?title=Vapoursynth_GradFun3Mod&amp;diff=336&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_GradFun3Mod&amp;diff=336&amp;oldid=prev"/>
		<updated>2026-11-15T04:09:39Z</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;GradFun3Mod&amp;#039;&amp;#039;&amp;#039; removes color banding in flat gradients: it smooths, keeps real detail with an elastic threshold and an edge mask, and dithers the result back to the clip&amp;#039;s bit depth.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Filtering → Vapoursynth → DeBand&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Vapoursynth_GradFun3Mod.png|none|GradFun3Mod controls in Hybrid]]&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
The picture is smoothed (bilateral, DFTTest or multi-stage SmoothGrad). The change is then limited: differences up to &amp;#039;&amp;#039;Threshold&amp;#039;&amp;#039; are taken fully, differences up to &amp;#039;&amp;#039;Threshold&amp;#039;&amp;#039; × &amp;#039;&amp;#039;Elast&amp;#039;&amp;#039; fade out, larger ones keep the source. A detail mask built from the luma protects edges and texture. The script works at 16 bit internally and dithers back to the clip&amp;#039;s bit depth at the end; this dithering (error diffusion, ordered or void and cluster, optionally with noise) keeps the gradient smooth after lossy compression.&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;
| Planes || planes || all, chroma only, Y, U, V, YU, YV || all || Planes that are filtered; the others are only rounded back without noise.&lt;br /&gt;
|-&lt;br /&gt;
| Threshold || thr || 0.10 – 10.00 || 0.35 || Strength in 8-bit units at any bit depth; higher is stronger, with more detail loss and edge artifacts.&lt;br /&gt;
|-&lt;br /&gt;
| Radius || radius || 1 – 100 (2 – 9 with SmoothGrad multi-stage) || 12 || Size of the smoothing.&lt;br /&gt;
|-&lt;br /&gt;
| Elast || elast || 1.00 – 10.00 || 3.0 || Width of the soft zone above the threshold in which changes fade out instead of being cut.&lt;br /&gt;
|-&lt;br /&gt;
| Smooth mode || smode || DFTTest, Bilateral, SmoothGrad multi-stage, DFTTest Mod, Bilateral GPU || Bilateral || Smoothing method. DFTTest Mod is the legacy dfttest variant of GradFun3mod. &amp;quot;Bilateral GPU&amp;quot; behaves like &amp;quot;Bilateral&amp;quot;; whether a GPU is used is chosen in Tools: Bilateral.&lt;br /&gt;
|-&lt;br /&gt;
| Dither mode || mode || ordered (Bayer), round to closest, round, Filter Lite (Sierra-2-4A), Stucki, Atkinson, Floyd-Steinberg, Ostromoukhov, void and cluster || Filter Lite || How the result is brought back to the clip&amp;#039;s bit depth.&lt;br /&gt;
|-&lt;br /&gt;
| Dither amplitude || ampo || 0 – 10 || 1 || Strength of the dither pattern.&lt;br /&gt;
|-&lt;br /&gt;
| Noise amplitude || ampn || 0 – 10 || 0 || Extra noise added while dithering; 0 = off.&lt;br /&gt;
|-&lt;br /&gt;
| Pattern size || pat || 4, 8, 16, 32 || 32 || Pattern width for void and cluster dithering.&lt;br /&gt;
|-&lt;br /&gt;
| dynamic noise || dyn || on/off || off || The ordered dither pattern changes every frame.&lt;br /&gt;
|-&lt;br /&gt;
| static noise || staticnoise || on/off || off || The added noise is the same in every frame.&lt;br /&gt;
|-&lt;br /&gt;
| Debug || debug || on/off || off || Preview only: shows the detail mask instead of the result.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: Expr || – || akarin, cranexpr, std || akarin || Expression plugin; akarin needs AVX2.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: RG || – || zsmooth, neo_smo || zsmooth || RemoveGrain implementation.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: DFTTest || – || neo_fft, dfttest2cpu, dfttest2, vszipcu, vsfeel || – || DFTTest implementation (DFTTest modes): dfttest2cpu needs AVX2, dfttest2 CUDA (Windows), vszipcu CUDA, vsfeel Vulkan.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: Bilateral || – || vszip, vszipcl, vszipcu, vsfeel || – || Bilateral implementation (Bilateral modes): vszip on the CPU, vszipcl OpenCL, vszipcu CUDA, vsfeel Vulkan.&lt;br /&gt;
|-&lt;br /&gt;
| Tools: BoxBlur || – || vszip, std || vszip || Box blur implementation (SmoothGrad multi-stage).&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;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# debanding using GradFun3&lt;br /&gt;
clip = deband.GradFun3(clip, tools={&amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;dfttest&amp;#039;: &amp;#039;neo_fft&amp;#039;, &amp;#039;bilateral&amp;#039;: &amp;#039;vszip&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;boxblur&amp;#039;: &amp;#039;vszip&amp;#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How Hybrid calls it ==&lt;br /&gt;
* GradFun3Mod works on 8–16-bit integer YUV clips; other formats are converted first.&lt;br /&gt;
* Threshold and amplitudes are passed as entered; the script treats the threshold as 8-bit scale itself.&lt;br /&gt;
* With a GPU implementation chosen in Tools: Bilateral, both bilateral entries use the GPU bilateral (same strength as on the CPU); otherwise they use the CPU bilateral.&lt;br /&gt;
* Values are only written when they differ from the defaults, which are the script&amp;#039;s and fmtconv&amp;#039;s own.&lt;br /&gt;
* With a 16-bit clip the script does not dither back, so the dither settings have no effect.&lt;br /&gt;
* GradFun3Mod 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;
GradFun3 comes from Firesledge&amp;#039;s Dither package for AviSynth; Gebbi&amp;#039;s GradFun3mod added the legacy dfttest mode. The VapourSynth version is based on the ports in fvsfunc and muvsfunc. The resizing options of the original (4:4:4 output, resizer, width/height) are not supported.&lt;br /&gt;
&lt;br /&gt;
=== Dithering ===&lt;br /&gt;
The dither settings are those of fmtconv&amp;#039;s bitdepth function. Pattern size only matters for void and cluster, dynamic noise only for ordered dither. fmtconv also knows a quasirandom mode, which Hybrid does not offer.&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [https://github.com/Irrational-Encoding-Wizardry/fvsfunc fvsfunc] (GradFun3 port)&lt;br /&gt;
* [https://github.com/EleonoreMizo/fmtconv fmtconv documentation] (bitdepth)&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>