Avisynth TDeint

From wiki.selur.net
Revision as of 23:12, 21 November 2026 by Selur (talk | contribs) (Add screenshot (via update-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

TDeint is a motion-adaptive deinterlacer and bobber by tritical. Static areas are rebuilt from neighbouring fields, moving areas are interpolated. It can use another deinterlacer, such as NNEDI3, for the interpolation.

Filtering → (De-)Interlace/Telecine → Deinterlacer (entry "TDeint (Avisynth)")

TDeint settings in Hybrid
TDeint settings in Hybrid


What it does

For every pixel TDeint decides whether it is moving. Static pixels are taken from the neighbouring field (weaving), moving pixels are interpolated with a kernel, cubic, edge-directed (ELA) or blend method. The source should be interlaced with the right field order, set through Order or Hybrid's scan type.

Typical uses:

  • Mode 0: same frame rate (25i to 25p).
  • Mode 1: bob, one frame per field (25i to 50p).
  • Mode 2: smart bob with field matching, same rate.
  • edeint with NNEDI3, EEDI3, QTGMC and others: better edges in moving areas; edeint mask TMM limits the interpolation to moving areas.
  • Full off: only frames detected as combed are deinterlaced, useful after field matching of telecined material.

Requirements

  • CPU only. OpenCL only affects the helper clips NNEDI3, EEDI3 and QTGMC.
  • The edeint choices and the TMM mask use further plugins that ship with Hybrid.

Settings

Control Parameter Range / values Hybrid default Meaning
Mode mode −2–2 0 0: same rate; 1: double rate (bob); 2: smart bob with field matching, same rate; −1 and −2: double the height with ELA-2 or ELA (progressive input only).
Order order −1–1 −1 Field order: −1 = AviSynth's order, 0 = bottom field first, 1 = top field first.
Field field −1–1 −1 Field to interpolate (Mode 0 and 2 only); −1 follows Order.
Motion thresholds L/C mthreshL / mthreshC 0–254 6 / 6 Static/moving decision for luma and chroma. Lower values leave less combing, higher values less flicker. Not used with edeint and edeint mask both set.
Motion mode mtnmode 4 field, 5 field, 4 field - replace, 5 field - replace 5 field 5 fields avoid more artifacts but are slower; the replace variants use the most similar field instead of an average.
Interpolation type kernel, cubic, modified ELA, modified ELA-2, blend kernel Method used for moving pixels.
Sharp sharp on/off on Sharper kernel interpolation (only for kernel).
Display output map map no map, value map, merged map, frame + value map, frame + merged map no map Shows a diagnostic picture instead of the video.
Debug debug on/off off Writes the decisions into the picture.
edeint edeint none, Yadif, BWDIF, QTGMC, EEDI2, NNEDI3, EEDI3 none Takes the interpolated pixels from a helper clip made with the chosen filter. With Mode 1 the double-rate variants are used.
edeint mask emask none, TMM none Motion mask for the helper clip; only with an edeint choice.
OpenCL / device – on/off, 0–15 off / 0 NNEDI3CL/EEDI3CL on the chosen GPU for the NNEDI3, EEDI3 and QTGMC helpers.
Speed slow normal, slow, slowest slow Speed and accuracy of the field matching (as in TFM).
Chroma chroma on/off off Includes chroma in the combing detection.
MI MI 0–256 64 Number of combed pixels in a block that makes the frame count as combed.
Full full on/off on Off: only frames detected as combed are deinterlaced.
Combed threshold cthresh 0–255 6 Line difference for the combing detection; 6–12 are typical.

Example

Default settings on an interlaced PAL 720×576 8-bit source; the filter needs no conversion, Hybrid only converts to 10 bit for the encoder:

# deinterlacing
TDeint()
AssumeFrameBased()
# Converting from 8 to 10bit for encoder
ConvertBits(10)

How Hybrid calls it

  • Only values that differ from the defaults are written. With Mode 1 the frame rate and count double.
  • TDeint works on 8–16-bit YUV 4:2:0, 4:2:2, 4:4:4, YV411 and YUY2 and keeps the color sampling and bit depth of the clip. Some helper choices need a conversion: the TMM mask needs 8-bit planar YUV without YV411, EEDI2 needs 8-bit 4:2:0, BWDIF, EEDI3 and QTGMC need planar formats.
  • The helper clip of edeint is built by Hybrid: Yadif, BWDIF, NNEDI3, EEDI3, EEDI2 or QTGMC at the same rate, or double rate with Mode 1. TMM adds the motion mask TMM2.
  • The result is marked progressive.

Background

TDeint is tritical's plugin, now maintained by pinterf as part of the TIVTC repository. It supports 8–16-bit planar formats. The plugin has more options than Hybrid offers, such as the interpolation type "bi-directional blend".

See also: Avisynth TIVTC, Interlace

Sources