MSmooth (the Ultimate Detail-Preserving Spatial Smoother) is a classic, highly regarded spatial smoothing and noise-reduction plugin developed by Donald Graft (and later ported or maintained by the community). It is primarily used within video post-production environments like AviSynth and VapourSynth.
It was specifically engineered to solve a common flaw in early digital video noise-reduction filters: the destruction of important image textures and boundaries when trying to clean up flat or noisy areas. Core Mechanics & “The Decoupling”
Traditional smoothers use a single threshold value to control both what gets smoothed and how hard it gets smoothed. If you want a strong blur to clean up flat background noise, you have to raise the threshold, which inadvertently smudges and destroys fine lines and edges.
MSmooth solves this by completely decoupling detail detection from smoothing intensity.
Step 1: It maps the image to identify structural edges and fine details based on your chosen threshold. Step 2: It locks those detailed regions away.
Step 3: It applies a highly aggressive 3 × 3 averaging blur only to the remaining “flat” zones. Crucially, the smoothing algorithm is blocked from crossing over the established detail boundaries. Primary Parameters
The plugin relies on a small, straightforward set of configurations:
threshold (integer): Controls detail detection. A lower threshold classifies more subtle gradients as “detail” to be preserved.
strength (integer): Dictates the number of iterative 3 × 3 blurring passes performed strictly on the non-detail areas. Because details are safely masked, you can set this quite high without ruining lines.
mask (boolean): A vital diagnostic mode. When set to true, the video renders a visual map of the preserved zones. Editors use this to verify exactly what lines are being protected before finalizing the filter.
highq (boolean): Enables a slower but significantly higher-quality detail detection algorithm.
chroma (boolean): Toggles spatial smoothing for the color channels (YV12 space), which adds clean compression benefits but taxes processing speed. Best Use Cases
While it can process live-action footage, MSmooth became an iconic, “gold standard” filter for two specific use cases:
Anime and Cartoon Restorations: Animation typically consists of sharp, distinct outlines and large blocks of solid flat colors. MSmooth handles this perfectly by anchoring the outlines and heavily smoothing the flat zones.
Eliminating “Mosquito Noise”: It is incredibly effective at removing the fuzzy, blocky digital artifacts (mosquito noise) that gather tightly around high-contrast edges in older digital video rips and low-bitrate video compression. Performance Trade-Offs
Encoding Benefits: By smoothing out unnecessary high-frequency noise in flat textures, MSmooth creates highly uniform frames. This requires drastically fewer bits to encode, resulting in significantly smaller final video file sizes without sacrificing edge sharpness.
The Drawback: MSmooth is computationally heavy. As you increase the strength parameter, the filter runs progressively slower because it repeatedly computes multi-pass blurs around complex, masked geometric paths. MSmooth – Avisynth wiki
Leave a Reply