Vapoursynth IT

From wiki.selur.net
Jump to navigation Jump to search

IT is an inverse telecine filter: it matches fields to rebuild the film frames of 3:2 pulldown material and removes one frame in five (29.97 → 23.976 fps). Frames that cannot be matched are deinterlaced.

Filtering → (De-)Interlace/Telecine → Inverse telecine

IT controls in Hybrid
IT controls in Hybrid

What it does

Telecined NTSC video spreads four film frames over five video frames, two of which mix fields of different film frames. IT finds the field pairing that gives clean progressive frames, drops the duplicate per cycle of five and deinterlaces leftover combed frames by interpolating one field. For field matching without decimation see ITM.

Settings

Control Parameter Range / values Hybrid default Meaning
Threshold (first box) threshold 0 – 100000 20 Sensitivity of the field match decision.
Threshold (second box) pthreshold 0 – 100000 75 Threshold for classifying a frame as progressive or interlaced (combed); the plugin adjusts it to the resolution.
Fix Telecined Fades – group off Repairs fades after IT, see Fix Telecined Fades.

The thresholds are only written when they differ from the defaults.

Example

Default settings on an 8-bit YUV 4:2:0 telecined source (1920x1080, 29.97 fps, detected as top field first):

clip = core.std.AddBorders(clip=clip, left=0, right=0, top=4, bottom=4) # add borders to achieve mod 16 (vs_it) - 1920x1088
# Inverse Telecine using (z)IT
clip = core.zit.IT(clip, fps=24) # new fps: 23.976
clip = core.std.Crop(clip=clip, left=0, right=0, top=4, bottom=4) # removing added borders from mod requirement (vs_it) -  1920x1080
# Making sure content is perceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive

How Hybrid calls it

  • Field order: bottom field first sources (detected scan type or Overwrite input scan type) are matched with reference BOTTOM; top field first and unknown orders use TOP, the plugin default.
  • Decimation: IT always runs with fps 24, so the frame rate becomes 4/5 of the input (29.97 → 23.976 fps).
  • Afterwards the clip counts as progressive.
  • Works on 8/10/12/16-bit YUV 4:2:0, 4:2:2 and 4:4:4. The frame width must be a multiple of 16.

Background

IT was written by thejam79 for AviSynth. The plugin used is zit, a port of VapourSynth-IT with the original AviSynth parameters restored. It accepts widths up to 8192 and even heights (a multiple of 4 for 4:2:0); bit-exactness with the original was only checked for 8-bit 4:2:0. With fps 30 it only matches fields (that is what ITM does). Options Hybrid does not offer: blending of high-motion blocks and the choice of deinterlacing method for leftover combed frames.

Sources