Vapoursynth mClean

From wiki.selur.net
Revision as of 21:53, 14 November 2026 by Selur (talk | contribs) (New filter page (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

mClean is burfadel's denoiser that works mainly in time: motion-compensated multi-frame degraining with a little spatial limiting. Optional extras sharpen edges, put some reshaped noise back so the picture does not look flat, deband, and enhance lines with warp sharpening.

Filtering → Vapoursynth → DeNoise

mClean controls in Hybrid
mClean controls in Hybrid

What it does

Motion vectors are searched (block size, overlap and precision follow the resolution) and the frames are degrained along them; blocks above the SAD threshold keep the source. Chroma is handled separately and can be left out. Afterwards optional sharpening, ReNoise, debanding and depth enhancement run, and Strength blends the result with the source.

Settings

Control Parameter Range / values Hybrid default Meaning
SAD threshold thSAD 1 – 64000 400 Blocks that match worse are not compensated.
Chroma chroma on/off on Also filter chroma (with a median and a temporal median limit).
Sharpening sharp 0 – 24 10 Unsharp mask on edges and detail, scaled by the resolution; 21–24 is an "overboost" for high-quality HD sources.
ReNoise rn 0 – 20 14 Adds reshaped luma noise back; 0 = off.
Deband deband disabled, deband, deband and veed deband f3kdb debanding, optionally with stabilised grain (Veed).
Depth depth 0 – 5 0 Warp sharpening; 1–2 helps lines in animation, higher values distort.
Strength strength 0 – 20 20 Blend with the source: 0 = 20 % of the result, 20 = 100 %.

Tools: MV (mvgpu, mvutensils, mv), Expr, Warp, RG, TMedian, and – depending on the settings – Median (with Chroma), f3kdb (with Deband) and TCanny/BoxBlur (with overboost sharpening).

Example

Default settings on a 10-bit YUV 4:2:0 source (machine with a discrete GPU):

# denoising using mClean
clip = denoise.mClean(clip, deband=1, tools={'mv': 'mvgpu', 'expr': 'akarin', 'warp': 'warp', 'rg': 'zsmooth', 'median': 'zsmooth', 'tmedian': 'zsmooth', 'boxblur': 'vszip', 'tcanny': 'tcanny', 'f3kdb': 'vszip'})

How Hybrid calls it

  • mClean works on YUV clips; other formats are converted first. The output keeps the input bit depth.
  • Values are only written when they differ from the defaults; Deband is always written, because the script's own default is off.
  • "deband and veed" also loads the Veed plugin.
  • mClean also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).

Background

The script

The VapourSynth version is a port of burfadel's AviSynth mClean 3.2 (doom9, 2018). The author describes it as mostly temporal: some spatial artifacts may remain, so deringing, dehaloing or deblocking should only be added when needed. The added noise is kept easy to compress, and it is left out where sharpening applies.

Sources