Vapoursynth Checkmate

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

Checkmate reduces dot crawl, the crawling checkerboard dots that composite video leaves along colored edges. It blends spatially, optionally also over time, and limits how far a pixel may change.

Filtering → Vapoursynth → DeCrawl

Checkmate controls in Hybrid
Checkmate controls in Hybrid

What it does

Pixels are blended with their neighbors where the spatial threshold allows it; with a temporal threshold above 0 the neighbor frames are blended in as well. Max Change caps the change per pixel. The filter works best on static or slow scenes; with strong settings fast motion can show artifacts.

Settings

Control Parameter Range / values Hybrid default Meaning
Threshold thr 0 – 255 12 Spatial threshold: higher blends more but risks artifacts; too low leaves lines in static scenes slightly blurrier where crawl was reduced.
Max Change tmax 0 – 255 12 Largest change of a pixel value; higher filters stronger with more risk of artifacts.
Temp. Threshold tthr2 0 – 100 0 Temporal blend threshold; 0 = temporal blending off, which avoids temporal artifacts in high motion.

Example

Default settings on a 10-bit YUV 4:2:0 source (640x356):

# adjusting color space from YUV420P10 to YUV444P8 for vsCheckmate
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, dither_type="error_diffusion")
clip = core.vszip.Checkmate(clip)

How Hybrid calls it

  • Checkmate only works at 8 bit (YUV, gray or RGB); higher bit depths are converted to 8 bit before the filter, so precision is lost around it.
  • All planes are processed.
  • Values are only written when they differ from the defaults, which equal the plugin's own defaults.
  • Checkmate also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).

Background

vszip

The filter comes from vszip (vapoursynth-zip by dnjulek), a plugin collection that ports several AviSynth filters; Checkmate is the port of the AviSynth dot crawl filter of the same name. It is a CPU filter available on Windows, Linux and macOS.

Sources