Avisynth DustDenoise

From wiki.selur.net
Jump to navigation Jump to search

DustDenoise is a limit-clipping spatio-temporal denoiser based on Steady's Dust family (FaeryDust, PixieDust, GoldDust, SpaceDust). The Mode selects which one is emulated.

Filtering → Avisynth → DeNoise

DustDenoise controls in Hybrid
DustDenoise controls in Hybrid

What it does

Neighboring samples are averaged (mean or median) in space and/or in neighboring frames, optionally motion compensated with MVTools2. Then every output sample is clipped to the source value ± Limit, so detail cannot be smeared further than that. Strong edges can get a lower limit, and frames from another scene are kept out.

Modes:

  • faery: temporal only.
  • pixie: temporal and spatial, temporal part weighted more.
  • gold: temporal and spatial, spatial part weighted more.
  • space: spatial only, no other frames are read.

Requirements

  • Dust.dll and the Dust script (ship with Hybrid). Motion compensation needs mvtools2.

Settings

Control Parameter Range / values Hybrid default Meaning
Mode mode faery, pixie, gold, space pixie Which Dust variant is used. Changing the mode sets Limit to 2 (faery), 5 (pixie), 8 (gold) or 6 (space).
Limit limit 1–64 5 Maximum change per sample (8-bit scale at every bit depth).
Edge limit limit_edge −1–64 −1 (off) Limit on strong edges; at most Limit.
Edge threshold edge_thresh 1–255 32 Sobel magnitude that counts as a full edge; only used with Edge limit ≥ 0.
Planes planes all, chroma only, luma only all Planes that are processed; the others are copied.
Scene change scthresh −1–255 20 Mean luma difference (8-bit scale) that counts as a cut; 0 uses only frame properties, −1 switches detection off.
Radius tr 1–5 1 Temporal radius; the window is 2 × radius + 1 frames. Not used in space mode.
Temporal temporal mean, median mean How neighboring frames are combined. Not used in space mode.
Motion compensation mc on/off on Motion compensate the neighbor frames. Not used in space mode.
Motion compensation (only with Motion compensation on and mode other than space)
thSAD thSAD 0–10000 300 SAD threshold of the motion compensation.
Block size blksize 4, 8, 16, 32, 64 8 Block size of the motion analysis.
Overlap overlap 0–32 (step 2) 4 Block overlap; limited to half the block size.
Search search one time, nStep, logarithmic, exhaustive, hexagon, uneven multi hexagon, pure horizontal exhaustive, pure vertical exhaustive hexagon Search type of the motion analysis.
Pel pel 1, 2, 4 2 Motion precision.
True motion truemotion on/off on Use MAnalyse's true motion preset.

Example

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

# denoising using DustDenoise
DustDenoise(limit=5)

How Hybrid calls it

  • Hybrid loads Dust.dll, imports the Dust script and calls DustDenoise; mvtools2.dll is loaded only when motion compensation is used.
  • Limit is always written, because the script's own default depends on the mode. The other values are only written when they differ from the defaults. Edge threshold is written only with Edge limit ≥ 0, the motion parameters only with motion compensation on, and Planes only when not all.
  • In space mode Radius, Temporal and Motion compensation are not written.
  • Hybrid splits fields for interlaced input, because the filter does not support interlaced video.
  • Gray and planar YUV (4:2:0, 4:2:2, 4:4:4) with 8–16 bit integer samples are used as they are. Float, RGB and YUY2/4:1:1 are converted first.
  • DustDenoise also offers the common options and can be added to the filter queue several times.

Background

The plugin is Selur's Dust 1.0.0 (MIT licence), a port of Yuri Pronkin's DustPort of Steady's Dust. The DustDenoise wrapper builds the motion compensated clips with MVTools2 (pinterf). The plugin also has an opt parameter to force a CPU instruction set (C, SSE4.1, AVX, AVX2, NEON), which Hybrid does not offer.

See also: Vapoursynth DustDenoise

Sources

  • Dust (Selur) on GitHub (README, parameter descriptions)
  • Hybrid's tooltips
  • The AviSynth+ documentation does not cover DustDenoise.