Avisynth FastLineDarken
FastLineDarken darkens the thin outlines of drawn material such as anime and cartoons. It is a fast alternative to mfToon.
Filtering → Avisynth → Line → Darkening

What it does
Each pixel is compared with a locally expanded-then-shrunk version of the picture. Where a line is darker than its surroundings, it is darkened further. The darkening is proportional: weak lines get less, strong lines more, up to Strength. Optional line thinning can narrow the outlines. Only luma is changed; chroma is passed through.
Typical uses:
- Give washed-out outlines of old animation more contrast.
- Keep Luma Threshold near its default to protect bright edges and grey lines on white.
- Turn on Thinning to counter lines that became too thick.
The filter works on progressive material.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| Strength | strength | 0–256 | 48 | Maximum darkening amount. Weaker lines are darkened proportionally less. |
| Luma Threshold | luma_cap | 0–255 | 191 | Pixels brighter than this value are treated as only that bright. Protects bright edges and grey lines on white; 255 means no cap. |
| Protection | prot | 0–50 | 5 | Keeps the darkest lines from being darkened further. |
| Thinning | thinning | 0–256 | 0 | Line thinning. 0 turns it off and is much faster. |
| Threshold | threshold | 0–255 | 4 | Darkening smaller than this value is skipped, which removes random slight darkening. |
Example
Default settings on a 10-bit YUV 4:2:0 source (no conversion is needed):
FastLineDarkenMOD4()
How Hybrid calls it
- The FastLineDarkenMod script is loaded together with masktools2, RgTools and the shared helper functions it needs.
- The function called is
FastLineDarkenMOD4. Only parameters that differ from the defaults are written. - The script works on gray and planar YUV clips, not on RGB or YUY2.
- FastLineDarken also offers the common options and can be added to the filter queue several times.
Background
- "FastLineDarken 1.48x MT MOD". The original filter is by Vectrangle; Didée sped it up (2007), Dogway added the protection option (2011) and A.SONY added high bit depth support (2017). It needs masktools 2.2.17 or newer.
- The Doom9 thread presents it as a faster alternative to the slow mfToon. Version 1.3 added the optional thinning; users report that edges can get thicker and that gaps between white lines may be darkened.
- The same algorithm exists for VapourSynth: Vapoursynth FastLineDarken.
Sources
- Doom9 thread: FastLineDarken
- Hybrid's tooltips
- The AviSynth+ documentation does not cover FastLineDarken.