<?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_HQDering</id>
	<title>Vapoursynth HQDering - 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_HQDering"/>
	<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_HQDering&amp;action=history"/>
	<updated>2026-11-20T08:17:56Z</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_HQDering&amp;diff=566&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_HQDering&amp;diff=566&amp;oldid=prev"/>
		<updated>2026-11-16T08:50:25Z</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-l44&quot;&gt;Line 44:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&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;# deringing using HQDeringmod&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;# deringing using HQDeringmod&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 = dering.HQDeringmod(clip, nrmode=2, darkthr=3.00, tools={&amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;dfttest&amp;#039;: &amp;#039;neo_fft&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;median&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;edgemasks&amp;#039;: &amp;#039;edgemasks&amp;#039;, &amp;#039;hysteresis&amp;#039;: &amp;#039;hysteresis&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 = dering.HQDeringmod(clip, nrmode=2, darkthr=3.00, tools={&amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;dfttest&amp;#039;: &amp;#039;neo_fft&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;median&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;edgemasks&amp;#039;: &amp;#039;edgemasks&amp;#039;, &amp;#039;hysteresis&amp;#039;: &amp;#039;hysteresis&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;/table&gt;</summary>
		<author><name>Selur</name></author>
	</entry>
	<entry>
		<id>https://wiki.selur.net/index.php?title=Vapoursynth_HQDering&amp;diff=306&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_HQDering&amp;diff=306&amp;oldid=prev"/>
		<updated>2026-11-15T03:39:44Z</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;HQDering&amp;#039;&amp;#039;&amp;#039; (HQDering mod, originally by mawen1250) removes ringing – the ripples next to sharp edges that compression or oversharpening leaves – by smoothing only a narrow area around the edges.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Filtering → Vapoursynth → DeRing&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Vapoursynth_HQDering.png|none|HQDering controls in Hybrid]]&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
The picture is smoothed (MinBlur, or DFTTest with Noise radius 0), optionally sharpened again and repaired against the source, and the change is limited. A ring mask decides where this result is used: a Prewitt edge mask of the luma is thresholded, expanded and inflated, and the edges themselves are cut out again. Flat areas and the edges stay untouched, unless &amp;#039;&amp;#039;Edge&amp;#039;&amp;#039; is on.&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;
| Radius || mrad || 0 – 100 || 1 || Expands the edge mask; higher processes a wider area. 0 = no expansion.&lt;br /&gt;
|-&lt;br /&gt;
| Smooth || msmooth || 0 – 100 || 1 || Inflates the mask and softens its borders. 0 = off.&lt;br /&gt;
|-&lt;br /&gt;
| Prewitt || minp || 0 – 100 || 1 || Shrinks the inner edge mask that is left out; higher processes closer to the edges. Values above 3 act like 4. Only available while Edge is off.&lt;br /&gt;
|-&lt;br /&gt;
| Edge || incedge || on/off || off || Include the edges themselves in the ring mask.&lt;br /&gt;
|-&lt;br /&gt;
| Thresh || mthr || 1 – 100 || 60 || Threshold of the edge mask (8-bit scale). Lower counts more pixels as edge and is more aggressive; with strong ringing a too low value protects the ringing as &amp;quot;edge&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| Noise radius || nrmode || 0 – 3 || 2 || Smoother: 0 = DFTTest, 1 – 3 = MinBlur radius (recommended 1 for SD, 2 for HD, 3 for UHD).&lt;br /&gt;
|-&lt;br /&gt;
| Sharpen || sharp || 0 – 3 || 1 || Radius of the contra-sharpening after smoothing; 0 = off.&lt;br /&gt;
|-&lt;br /&gt;
| Repair mode || drrep || 0 – 24 || 24 || Repair mode that keeps detail; recommended 24, 23, 13, 12 or 1; 0 = off.&lt;br /&gt;
|-&lt;br /&gt;
| Dither thr || thr || 0 – 128 || 12 || Largest change (8-bit scale) that passes fully; limits darkening.&lt;br /&gt;
|-&lt;br /&gt;
| Dither elast || elast || 1 – 1000 || 2 || Elasticity of the limit: changes between thr and thr × elast are blended in gradually.&lt;br /&gt;
|-&lt;br /&gt;
| Dither darkthr || darkthr || 0 – 128 || 3 || Limit for brightening. Changing thr sets it to thr / 4; set it lower if lines suffer.&lt;br /&gt;
|-&lt;br /&gt;
| Planes || planes || all, chroma only, luma only, only U, only V, only Y,U, only Y,V || luma only || Planes that are processed; the mask always comes from luma.&lt;br /&gt;
|-&lt;br /&gt;
| Show || show || on/off || off || Shows the ring mask instead of the result; only in the preview, never in the encode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Tools&amp;#039;&amp;#039;&amp;#039;: Expr (akarin, cranexpr, std), DFTTest (neo_fft, dfttest2cpu, dfttest2, vszipcu, vsfeel; with Noise radius 0), RG (zsmooth, neo_smo; with Sharpen or Repair mode above 0), Median (zsmooth), EdgeMasks (edgemasks, std), Hysteresis (hysteresis, misc – Windows only).&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;
# deringing using HQDeringmod&lt;br /&gt;
clip = dering.HQDeringmod(clip, nrmode=2, darkthr=3.00, tools={&amp;#039;expr&amp;#039;: &amp;#039;akarin&amp;#039;, &amp;#039;dfttest&amp;#039;: &amp;#039;neo_fft&amp;#039;, &amp;#039;rg&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;median&amp;#039;: &amp;#039;zsmooth&amp;#039;, &amp;#039;edgemasks&amp;#039;: &amp;#039;edgemasks&amp;#039;, &amp;#039;hysteresis&amp;#039;: &amp;#039;hysteresis&amp;#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How Hybrid calls it ==&lt;br /&gt;
* HQDering works on 8–16-bit integer YUV clips; other formats are converted first.&lt;br /&gt;
* Thresh, Dither thr and Dither darkthr stay on the 8-bit scale; the script scales them to the bit depth.&lt;br /&gt;
* Noise radius and darkthr are always written, the other values only when they differ from the defaults.&lt;br /&gt;
* With both thr and darkthr at 0 the change is not limited.&lt;br /&gt;
* HQDering also offers the [[Vapoursynth common filter options|common options]] (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== The script ===&lt;br /&gt;
HQDering mod v1.8 (2014) was part of havsfunc, the collection of AviSynth functions ported to VapourSynth; the current havsfunc no longer contains it. Hybrid&amp;#039;s script collection carries the port on, with a Prewitt edge mask. When darkthr differs from thr, thr limits darkening and darkthr brightening.&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [https://github.com/HomeOfVapourSynthEvolution/havsfunc havsfunc] (older releases contain HQDeringmod)&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>