Vapoursynth HQDN3D

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

HQDN3D ("High Quality DeNoise 3D") is a port of MPlayer's hqdn3d filter: a fast spatial and temporal low-pass filter with separate strengths for luma and chroma. It removes high-frequency noise with few blending artifacts; higher values smooth more and start to ghost.

Filtering → Vapoursynth → DeNoise

HQDN3D controls in Hybrid
HQDN3D controls in Hybrid

What it does

A spatial low-pass works inside the frame, a temporal low-pass follows each pixel over time. Both use a strength for luma and one for chroma. The filter remembers the previous frames; when frames are requested out of order it restarts a few frames earlier.

Settings

Control Parameter Range Hybrid default Meaning
Spatial luma strength lum_spac 0 – 255 4.0 Spatial strength on luma.
Spatial chroma strength chrom_spac 0 – 255 Spatial luma × 0.75 Spatial strength on chroma; set by hand with the check box.
Temporal luma strength lum_tmp 0 – 255 Spatial luma × 1.5 Temporal strength on luma; set by hand with the check box.
Temporal chroma strength chrom_tmp 0 – 255 Temporal luma × Spatial chroma / Spatial luma Temporal strength on chroma; set by hand with the check box.
Restart restart_lap 2 – 256 1 + the larger temporal strength (at least 2) How many frames earlier the filter restarts after a jump.

While a check box is not ticked, its field shows the value the plugin computes.

Example

Default settings on a 10-bit YUV 4:2:0 source:

# denoising using HQDN3D
clip = core.hqdn3d.Hqdn3d(clip)

How Hybrid calls it

  • HQDN3D works on 8–16-bit integer YUV and gray clips; other formats are converted first.
  • The spatial luma strength is written when it differs from 4.0; every other value whenever its check box is ticked. Values are passed unchanged.
  • HQDN3D also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).

Background

vapoursynth-hqdn3d

The plugin is a port of the AviSynth hqdn3d 0.11 filter (GPL v2) with the same default formulas. It is single-threaded; its README suggests splitting long videos into chunks for parallel runs. Seeking can change the output slightly, which restart_lap is meant to make unnoticeable.

Sources