Avisynth BiFrost
BiFrost is a temporal filter against rainbows, the cross-colour shimmer that appears in the chroma of composite or poorly decoded video.
Filtering → Avisynth → DeRainbow

What it does
BiFrost works block by block. It looks for blocks where the luma stays almost the same between frames but the chroma flickers. Such blocks are treated as rainbows and their chroma is replaced using the neighbouring frames. Moving areas keep their chroma.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| Conservative mask | conservative_mask | on/off | off | On: only pixels detected as rainbow are processed. Off: pixels with rainbow above and below are processed too. |
| Luma threshold | luma_thresh | 0–255 | 10 | Blocks whose luma changes less than this are treated as static and may be processed. |
| Variation | variation | 1–255 | 5 | Chroma change needed to count as rainbow. Higher values give fewer false positives. |
| Block x/y | blockx / blocky | 4–254 (step 2) | 4 / 4 | Block size used for detection. |
Example
Default settings on a 10-bit YUV 4:2:0 source:
# chroma denoising BiFrost(interlaced=false)
How Hybrid calls it
- Hybrid loads
Bifrost.dlland callsBiFrost. - Accepted input: 8–16 bit YUV 4:2:0 only; other formats are converted first. The example needs no conversion.
luma_thresh,variation,conservative_mask,blockxandblockyare only written when they differ from the defaults, which equal the plugin's.interlacedis always written: true for any non-progressive source, false for progressive.- BiFrost also offers the common options and can be added to the filter queue several times.
Background
- The original AviSynth 1.1 plugin worked on whole frames. The block-based version with the
interlacedandvariationoptions is dubhater's port, which also exists for Vapoursynth. - The block size must be a multiple of the chroma subsampling and at least two chroma samples, so for 4:2:0 the smallest block is 4.
See also: Vapoursynth BiFrost, DeRainbow, DFM DeRainbow
Sources
- The AviSynth+ documentation does not cover BiFrost.
- dubhater/vapoursynth-bifrost (Vapoursynth version, same parameters)
- Hybrid's tooltips