Vapoursynth RemoveSpotsMCX

From wiki.selur.net
Revision as of 09:52, 16 November 2026 by Selur (talk | contribs) (Update to current Hybrid behaviour; code as <pre> (via update-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

RemoveSpotsMCX is the motion-compensated, multi-pass form of RemoveSpots: it removes dirt, spots and impulse noise that show up on one frame only. It cleans more and copes better with motion, but is much slower and can soften fine detail.

Filtering → Vapoursynth → Artifacts

RemoveSpotsMCX controls in Hybrid
RemoveSpotsMCX controls in Hybrid

What it does

For each frame a motion-compensated previous and next frame are built. The three frames are put in a row, RemoveSpots runs on this sequence several times, and only the source frames are kept. Besides film restoration and analog captures it can serve as a prefilter before temporal denoisers.

Settings

Control Parameter Range / values Hybrid default Meaning
Limit limit 1 – 24 6 Repair mode used to limit the cleaned result against the source. The modes are different clipping rules, not a strength scale.
Runs runs 1 – 10 3 Number of RemoveSpots passes on the compensated sequence.
Tools: MV – mvgpu, mvutensils, mv mvgpu with a discrete GPU, else mvutensils Motion vector implementation.
Tools: RG – zsmooth, neo_smo zsmooth Clense/Repair implementation.
Tools: RemoveDirt – removedirt removedirt RemoveDirt plugin (scene change selection and motion detection).

Example

Default settings on a 10-bit YUV 4:2:0 source (machine with a discrete GPU):

# spot/dirt removal using RemoveSpotsMCX
clip = artifacts.RemoveSpotsMCX(clip, tools={'mv': 'mvgpu', 'rg': 'zsmooth', 'removedirt': 'removedirt'})

How Hybrid calls it

  • RemoveSpotsMCX works on 8-, 10-, 12- and 16-bit integer YUV; other formats are converted first.
  • Limit and Runs are only written when they differ from the defaults, which equal the script's. Both are counts or mode numbers, so nothing is scaled. The Tools choice is always written.
  • All planes are processed. The motion search uses fixed values (pel 2, block size 8, overlap 4, true motion).
  • RemoveSpotsMCX also offers the common options (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).

Background

The script

The function is a VapourSynth port of a script by Didée from the Doom9 forum. Its default Repair mode is 6 rather than RemoveSpots' 16, because the several passes and the motion compensation already clean a lot. It is meant for difficult sources where plain RemoveSpots is not enough.

Sources