Vapoursynth Fix Telecined Fades
Fix Telecined Fades repairs fades that were added after telecining: the two fields of a frame then differ in brightness and leave combing that field matching cannot remove.
Filtering → (De-)Interlace/Telecine → Extras

What it does
During such a fade each field was darkened (or brightened) by a different amount. The filter measures the brightness of both fields and evens them out statistically; frames whose fields differ by less than the threshold are left alone. It is not a deinterlacer of its own but an option of the inverse telecine filters.
Settings
The group is on the pages of IT and VIVTC (both share the same settings) and, with its own settings, on the TIVTC page.
| Control | Parameter | Range / values | Hybrid default | Meaning |
|---|---|---|---|---|
| (group check box) | – | on/off | off | Enables the filter. |
| Mode | mode | average both, darken the brighter field, brighten the darker field | average both | How the fields are equalized: both to their average brightness, or one to the other. |
| Threshold | threshold | 0 – 1 (steps of 0.002) | 0.002 | Average per-pixel difference between the fields (0 – 1 scale) below which a frame is left untouched. |
| To (three values) | color | 0 – 1 each | 0 / 0 / 0 | Base color of the fade (default black). The clip is YUV at this point, so although the boxes are labeled R/G/B the values are Y, U and V (float scale, chroma centered at 0): a fade to white needs 1 / 0 / 0, not 1 / 1 / 1. Only written when not 0 / 0 / 0. |
Values are only written when they differ from the defaults.
Example
VIVTC with default settings and Fix Telecined Fades enabled (default settings) on an 8-bit YUV 4:2:0 telecined source (1920x1080, 29.97 fps, detected as top field first):
clip2clip = clip
clip2clip = qtgmc.QTGMC(Input=clip2clip, Preset="fast", tools={'mv': 'mvutensils', 'expr': 'akarin', 'nnedi3': 'znedi3', 'eedi3': 'vszip', 'dfttest': 'neo_fft', 'nlmeans': 'knlm', 'bm3d': 'bm3d', 'rg': 'zsmooth', 'median': 'zsmooth', 'fft3d': 'neo_fft', 'grain': 'noise'}, TFF=True, FPSDivisor=2)
clip = core.vivtc.VFM(clip, order=1)
# VDecimate helper function
def postprocess(n, f, clip, deinterlaced):
if f.props['_Combed'] > 0:
return deinterlaced
else:
return clip
clip = core.std.FrameEval(clip=clip, eval=functools.partial(postprocess, clip=clip, deinterlaced=clip2clip), prop_src=clip)
clip = core.vivtc.VDecimate(clip) # new fps: 23.976
# Making sure content is perceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive
# adjusting bit depth to 32bit for FixFades
clip = core.fmtc.bitdepth(clip=clip, bits=32)
# Fix telecined fades
clip = core.ftf.FixFades(clip)
# adjusting bit depth back to 8bit for FixFades
clip = core.fmtc.bitdepth(clip=clip, bits=8)
How Hybrid calls it
- Runs after the inverse telecine: with IT after IT, with TIVTC after TDecimate, with VIVTC after VDecimate (before Fix combed with deinterlacer).
- The clip is converted to 32-bit float for the filter and back to its previous bit depth afterwards; the threshold is on the float scale and needs no bit-depth scaling.
- Frame rate and frame count do not change; field order does not matter because the clip is already progressive.
Background
The filter (FixFades) was written by IFeelBloated. Its threshold may also be set above 1. The plugin's documentation does not state the expected format or whether the color is meant per RGB channel or per plane; with Hybrid it applies per YUV plane as described above.
Sources
- Fix-Telecined-Fades README
- Hybrid's tooltips