Vapoursynth DGDecNV Crop/Resize

From wiki.selur.net
Revision as of 09:00, 15 November 2026 by Selur (talk | contribs) (New filter page (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DGDecNV Crop/Resize lets the DGDecNV source filter crop and resize on the NVIDIA GPU while decoding, so the Vapoursynth script needs no separate crop and resize step. It only works when the source is loaded with DGDecNV.

Filtering → Vapoursynth → Frame → Resize

DGDecNV Crop/Resize controls in Hybrid
DGDecNV Crop/Resize controls in Hybrid

What it does

DGDecNV's source function can crop and scale the decoded frames on the GPU; resizing happens after DGDecNV's own deinterlacing. The scaler is DGDecNV's internal one, there is no kernel choice.

Requirements

  • Windows, an NVIDIA GPU with CUDA and a licensed, installed DGDecNV. The method is only offered when DGDecNV is available.
  • The source must be opened with DGDecNV (DGSource).

Settings

Tick Resizer in the Resizer page and pick DGDecNV Crop/Resize as method. The page itself has no controls: the crop values come from the crop and the size from the target size on the Crop/Resize tab. While this method is selected, Stepped Resize is disabled.

Example

With DGDecNV as source filter the crop and resize values go into the DGSource call itself (ct/cb/cl/cr, rw/rh) and no separate resize line is written. When the source is opened with another source filter, Hybrid writes the NNEDI3 fallback instead (10-bit YUV 4:2:0 source, 640x356 to 1280x712):

# 'DGDecNV Crop/Resize' is selected, DGDecNV isn't used for the source using NNEDI3 for resizing as fallback,..
# resizing using ZNEDI3
# current: 640x356 target: 1280x712
clip = edi_rpow2.nnedi3_rpow2(clip, rfactor=2, qual=2, tools={'nnedi3': 'znedi3'}) # 1280x712

How Hybrid calls it

  • Crop and Resize must be the first two active size-changing steps of the filter order; nothing may change the size before them.
  • Then the crop values (top, bottom, left, right) and the target width and height are passed to DGSource, and the normal resize step is skipped with a note in the script.
  • If another source filter is used or the condition is not met, Hybrid writes a note and resizes with NNEDI3 instead, using the settings of the NNEDI3 page.
  • It does not work in the crop view.

Background

DGDecodeNV

According to the DGDecodeNV manual, the crop values default to 0 and the resize only happens when both width and height are non-zero. Older DGDecNV versions used other parameter names for these options. DGDecNV is commercial software.

Sources

  • DGDecodeNV manual (DGDecodeNVManual.html, shipped with DGDecNV)
  • Hybrid's tooltips