Avisynth Yadifmod
Yadifmod is a Yadif variant (the plugin Yadifmod2) that takes its spatial prediction from a clip interpolated by NNEDI3 or EEDI3. This gives cleaner edges than plain Yadif.
Filtering → (De-)Interlace/Telecine → Deinterlacer (entry "Yadifmod (Avisynth)")
What it does
Yadif decides per pixel between temporal and spatial interpolation. Yadifmod uses a better interpolated clip (Edeint) for the spatial part, so edges and diagonal lines look smoother. The output has the source frame rate or one frame per field. The source must be interlaced and the field order must be right.
Requirements
- OpenCL needs an OpenCL-capable GPU (NVIDIA, AMD or Intel); the control is only enabled when one is found.
Settings
| Control | Parameter | Range / values | Hybrid default | Meaning |
|---|---|---|---|---|
| Mode | mode | 0–3 | 0 | 0: same rate, with spatial check; 1: double rate (bob), with spatial check; 2: same rate, no spatial check; 3: double rate, no spatial check. |
| Order | order | −1–1 | −1 | Field order: −1 = AviSynth's order, 0 = bottom field first, 1 = top field first. Follows the scan type when it is set to bottom or top field first. |
| Edeint | edeint | NNEDI3, EEDI3 | NNEDI3 | Filter that makes the interpolated clip for the spatial prediction. |
| OpenCL | – | on/off | off | Uses NNEDI3CL or EEDI3CL on the GPU instead of the CPU filters. |
| OpenCL device | – | 0–15 | 0 | GPU to use; only with OpenCL, written when above 0. |
Example
Default settings on an interlaced PAL 720×576 8-bit source with top field first (Order is set to 1 from the scan type), and the conversion to 10 bit for the encoder:
# deinterlacing Yadifmod2(order=1,edeint=nnedi3(field=-1)) AssumeFrameBased() # Converting from 8 to 10bit for encoder ConvertBits(10)
How Hybrid calls it
- order and mode are only written when not default; edeint is always written. The helper clip is made with field=−1 (same rate) or field=−2 (double rate, Modes 1 and 3).
- Hybrid loads yadifmod2.dll and nnedi3, or NNEDI3CL; for EEDI3 it uses the EEDI3 plugin (or EEDI3CL with OpenCL).
- Formats offered: 8-bit YV24, YV16, YV12, YV411 and Y8; other formats are converted first.
- The modes 1 and 3 double the frame rate and count. The result is marked progressive.
Background
Yadifmod2 is Asd-g's plugin and merges the ideas of Yadif and Yadifmod; it also supports 16-bit and float planar formats, which Hybrid does not use here. The edeint clip must have the size, format and bit depth of the input and twice the frames for double rate.
See also: Yadif (custom)
Sources
- yadifmod2 on GitHub
- Hybrid's tooltips
- The AviSynth+ documentation does not cover Yadifmod2.