Vapoursynth DGDecNV Deinterlace

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

DGDecNV deinterlacing uses the hardware deinterlacer of NVIDIA graphics cards that is built into the DGDecNV source filter: the video is deinterlaced while it is decoded, no separate filter runs afterwards.

Filtering → (De-)Interlace/Telecine → Deinterlacer

DGDecNV deinterlace controls in Hybrid
DGDecNV deinterlace controls in Hybrid

What it does

The NVIDIA decoder (NVDec) deinterlaces each decoded frame with its own motion-adaptive method, either to one frame per frame (single rate) or to one frame per field (double rate). It is very fast because it runs on the graphics card during decoding.

Requirements

  • Windows, a licensed DGDecNV and an NVIDIA graphics card with NVDec.
  • DGDecNV must be the Vapoursynth source filter; otherwise the entry is not offered.

Settings

Control Parameter Range / values Hybrid default Meaning
Mode deinterlace 1, 2 1 1: single rate; 2: double rate (one frame per field).
Use frame indication use_pf on/off off Only frames that the stream flags as interlaced are deinterlaced; frames flagged progressive pass unchanged.

Example

Default settings (Mode 1) on an 8-bit YUV 4:2:0 interlaced source (704x576, 25 fps, top field first) loaded with DGDecNV; the deinterlacing happens in the source line, no filter follows:

# Loading 'G:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\1) 420i x264.mp4' using DGSource
#  deinterlace using DGDECNV
clip = core.dgdecodenv.DGSource("J:/tmp/mp4_67cc2457820425435aaeb5548f1e2fc1_853323747.dgi",use_top_field=True,deinterlace=1) # 25 fps, scanorder: progressive

How Hybrid calls it

  • The options go into the source call itself, and only when the source is not progressive.
  • Field order: for single rate the decoder keeps the bottom field for bottom field first sources and the top field otherwise (detected scan type or Overwrite input scan type).
  • Output frame rate: Mode 1 keeps the source rate; Mode 2 doubles frame rate and frame count.
  • Afterwards the clip counts as progressive. No decimation.
  • Output is 8-bit 4:2:0, or 16-bit for sources with more than 8 bits.
  • Soft-telecine handling (honoring or ignoring pulldown flags, forcing film) is a source option, not part of this deinterlacer.

Background

DGDecNV is Donald Graft's commercial source filter for AviSynth and VapourSynth. It needs an index file made by DGIndexNV. According to its manual, deinterlace 0 means no deinterlacing; the field selection for single rate defaults to the top field and is ignored for double rate.

Sources

  • DGDecodeNV manual (shipped with DGDecNV)
  • Hybrid's tooltips