Avisynth MCDegrainSharp

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

MCDegrainSharp is a motion-compensated denoiser based on Didée's MCDegrain: it averages along motion vectors and leans toward a slightly sharpened picture where the motion match is good and toward a slightly blurred one where it is bad.

Filtering → Avisynth → DeGrain

MCDegrainSharp controls in Hybrid
MCDegrainSharp controls in Hybrid

What it does

Motion vectors are searched (optionally on a blurred copy) for 1–3 frames on each side, and MVTools' MDegrain averages along them. The clip that MDegrain renders from is slightly sharpened (Strength (sharp)), and the base clip is slightly blurred (Strength (blur)). Well-matched areas get a little crisper, badly matched areas a little softer.

Requirements

  • mvtools2 (ships with Hybrid).

Settings

Control Parameter Range Hybrid default Meaning
Strength frames 1–3 2 Frames on each side used for degraining.
Strength (blur) bblur 0–1.58 0.60 Blur of the base clip in badly matched areas.
Strength (sharp) csharp 0–1.0 0.60 Sharpening of the clip used to render the degrain, applied where the match is good.
Threshold (blur) thsad 1–10000 400 SAD threshold of MDegrain: low values denoise unevenly, high values cause ghosting.
Motion Search bsrch on/off on Search the motion on the blurred clip.

Example

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

McDegrainSharp()

How Hybrid calls it

  • Hybrid loads mvtools2.dll and imports the MCDegrainSharp script.
  • The script accepts gray and planar YUV (4:2:0, 4:2:2, 4:4:4) with 8–16 bit integer samples, so Hybrid inserts no conversion. Float and interlaced input are not supported.
  • The motion analysis uses block size 16 for clips wider than 960 pixels and 8 otherwise, with half the block size as overlap.
  • Only values that differ from the defaults are written.
  • MCDegrainSharp also offers the common options and can be added to the filter queue several times.

Background

The script (2022) follows Didée's MCDegrain from the Doom9 forum and uses MSuper (pel 2), MAnalyse and MDegrain1/2/3 of the MVTools2 build by pinterf. The blur and sharpen steps use AviSynth's Blur and Sharpen filters. Blur accepts amounts up to 1.58 and Sharpen up to 1.0, which is why the two controls have different maximums.

See also: Vapoursynth MCDegrainSharp, Avisynth MDegrain, Avisynth SMDegrain

Sources