Avisynth mClean

From wiki.selur.net
Revision as of 18:45, 21 November 2026 by Selur (talk | contribs) (Avisynth filter documentation (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 reshaped noise back so the picture does not look flat, deband, and enhance lines with warp sharpening.

Filtering → Avisynth → DeNoise

mClean controls in Hybrid
mClean controls in Hybrid

What it does

Motion vectors are searched and the frames are degrained along them; blocks that match worse than the SAD threshold keep the source. Chroma is handled separately and can be left out. Afterwards the optional steps run: sharpening, ReNoise, debanding and warp sharpening. Denoise strength finally blends the result with the source. The filter is slow.

Settings

Control Parameter Range / values Hybrid default Meaning
Denoise threshold thSAD 0–10240 400 Blocks that match worse than this are not motion compensated.
Chroma chroma on/off on Also filter the chroma planes.
Sharp multiplier sharp 0–24 10 Unsharp mask strength, scaled by the resolution. 21–24 is an "overboost" for HD sources.
ReNoise strength rn 0–20 14 Strength of the luma noise that is added back in a compressible form; 0 switches ReNoise off.
Deband deband disabled, deband, auto balance, deband and auto balance, deband and veed, all deband and veed Debanding with temporally stable grain. Auto balance uses AutoAdjust.
WarpSharp depth 0–5 0 Warp sharpening; 0 = off, 1–2 can help lines in animation.
Denoise strength strength 1–20 20 Blend with the source: 1 = 20 %, 20 = 100 %.

Example

Default settings on a 10-bit YUV 4:2:0 source (no conversions are needed):

mClean()

How Hybrid calls it

  • Hybrid loads manyPlus, FFT3DFilter (with fftw3f), avszip, MaskTools2, MVTools2, AutoAdjust, aWarpSharpMT and RgTools, and imports the mClean script.
  • Accepted formats: YUV 4:2:0, 4:2:2 and 4:4:4 with 8–16 bit integer; other formats are converted first.
  • 8-bit input is processed internally at 12 bit and returned as 8 bit. Higher bit depths stay unchanged.
  • Only values that differ from the defaults are written; with all defaults the call is plain mClean().
  • mClean also offers the common options and can be added to the filter queue several times.

Background

mClean 3.2 was written by burfadel, based on an idea by StainlessS. The version Hybrid uses is the "Jmod" by JKyle (2021). It fixes cropped 4K and 4:2:2/4:4:4 input and uses avszip for debanding.

The script has an additional outbits parameter for the output bit depth that Hybrid does not offer. The Vapoursynth version is a port of the same script with f3kdb debanding and a different threshold range.

Sources

  • Doom9: mClean thread (burfadel; parameters and ranges)
  • Hybrid's tooltips
  • The AviSynth+ documentation does not cover mClean.