Vapoursynth DGDecNV Crop/Resize
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

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 one plain resize with the kernel chosen on the Crop/Resize tab instead (10-bit YUV 4:2:0 source, 640x356 to 1280x712, kernel "10 - bicubic spline"):
# 'DGDecNV Crop/Resize' is selected, DGDecNV isn't used for the source, using the resize kernel as fallback # Resizing using 10 - bicubic spline clip = core.fmtc.resample(clip, kernel="spline16", w=1280, h=712, interlaced=False, interlacedd=False) # resolution 1280x712 before YUV420P10 after YUV420P16
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 once with the normal resize kernel of the Crop/Resize tab (no NNEDI3, no Stepped Resize).
- 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