Vapoursynth TTempSmooth

From wiki.selur.net
Revision as of 03:24, 15 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

TTempSmooth is a motion-adaptive temporal smoother: it averages each pixel with the same pixel in the neighbor frames, but only where the picture holds still.

Filtering → Vapoursynth → DeNoise

TTempSmooth controls in Hybrid
TTempSmooth controls in Hybrid

What it does

Neighbor pixels that differ by more than Threshold are left out; those that differ less are weighted – the bigger the difference and the farther away in time, the less weight. Scene changes stop the averaging across a cut.

Settings

Control Parameter Range / values Hybrid default Meaning
Planes planes all, chroma only, luma only all Planes that are filtered.
Max. temporal radius maxr 1 – 7 3 Frames on each side; higher is slower and more stable.
Threshold (Y/U/V) thresh 1 – 256 4 / 5 / 5 Largest difference of a neighbor that is still used (8-bit scale).
Diff (Y/U/V) mdiff 0 – 255 2 / 3 / 3 Differences up to this value get full weight; at threshold − 1 or above the difference weighting is off.
Strength strength 1 – 8 2 Where the distance weights start to fall off.
Scene threshold – 0 – 100 12 Scene change detection before the filter (0 = off).
FP fp on/off on Weight not used by the outer pixels goes back to the center pixel; usually better in motion.
Tools: TTempSmooth – zsmooth, neo_smo zsmooth Implementation (nearly identical results).
Tools: SCD – scd, misc, std, mv scd Scene change detection; with mv the motion vector thresholds are used instead of the percentage.

Example

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

clip = misc.SCDetect(clip=clip, threshold=0.12, tools={'ttempsmooth': 'zsmooth', 'scd': 'scd'})
# denoising using TTempSmooth
clip = core.zsmooth.TTempSmooth(clip, scthresh=-1)

How Hybrid calls it

  • TTempSmooth works on 8–16-bit integer YUV and gray clips; other formats are converted first.
  • With a scene threshold above 0 a detection step marks the cuts in the frame properties (threshold as a fraction, 12 % = 0.12), and TTempSmooth reads them (scthresh=-1).
  • Thresholds and differences stay on the 8-bit scale; the plugin scales them. Values are only written when they differ from the defaults.
  • TTempSmooth also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).

Background

zsmooth and neo_smo

zsmooth's TTempSmooth also accepts float clips and a prefiltered reference clip, which Hybrid does not use. Its own scene detection takes a percentage of the largest possible luma change; -1 reads existing scene change properties. neo_smo is a C++ port with the same function, also for AviSynth+.

Sources