Vapoursynth Stepped 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

Stepped Resize reaches the target size in several smaller steps instead of one jump, optionally with denoising and sharpening after each intermediate step. It is meant for large upscales, where one big step enlarges noise and softness.

Filtering → Vapoursynth → Frame → Resize

Stepped Resize controls in Hybrid
Stepped Resize controls in Hybrid

What it does

The distance between the current and the target size is split into equal steps. The selected resize method runs once per step; after every step except the last, the chosen denoiser and sharpener clean up the enlarged picture before it is enlarged again.

Settings

The group is only available with Resizer ticked on the Resizer page and a method other than DGDecNV Crop/Resize.

Control Parameter Range / values Hybrid default Meaning
Stepped Resize – on/off off Resize in steps.
Steps – 2 – 10 2 Number of steps.
Denoise – on/off; RemoveGrain(2), DFTTest off, RemoveGrain(2) Denoiser after each intermediate step; DFTTest runs with Hybrid's DFTTest defaults.
Sharpen – on/off; LSFMod, aWarpSharp2(depth=5), CAS(sharpness=0.6), CAS(sharpness=X), aWarpSharp2(depth=X) off, LSFMod Sharpener after each intermediate step; LSFMod runs with Hybrid's LSFMod defaults.
CAS strength sharpness 0 – 1 0.5 Strength for CAS(sharpness=X).
Warp strength depth -128 – 127 5 Depth for aWarpSharp2(depth=X).

Example

Stepped Resize with default settings and the default method NNEDI3, on a 10-bit YUV 4:2:0 source (640x356), resized to 1280x712:

# Step 1: current: 640x356, target: 960x544
# resizing using ZNEDI3
# current: 640x356 target: 960x544
clip = edi_rpow2.nnedi3_rpow2(clip, rfactor=2, qual=2, tools={'nnedi3': 'znedi3'}) # 1280x712
# resizing 1280x712 to 960x544
clip = core.fmtc.resample(clip, w=960, h=544, kernel="spline64", interlaced=False, interlacedd=False) #  before YUV420P10 after YUV420P16
# Step 2: current: 960x544, target: 1280x712
# resizing using ZNEDI3
# current: 960x544 target: 1280x712
clip = edi_rpow2.nnedi3_rpow2(clip, rfactor=2, qual=2, tools={'nnedi3': 'znedi3'}) # 1920x1088
# resizing 1920x1088 to 1280x712
clip = core.fmtc.resample(clip, w=1280, h=712, kernel="spline64", interlaced=False, interlacedd=False) #  before YUV420P16 after YUV420P16

How Hybrid calls it

  • Step size per dimension = (target − current) / steps. Each intermediate size is rounded up to the next multiple of 16; the last step goes to the exact target size.
  • With fmtconv or the plain resize every step is an fmtconv resize with the chosen kernel; with the other methods (NNEDI3, ResampleHQ, DPID, SSIMD, GLSL Resizer, ML upscalers) the method itself runs per step.
  • After the denoiser and sharpener the color format is restored.
  • Weighted, if on, is applied after the final step.
  • The denoiser and sharpener use Hybrid's defaults of those filters, not the settings on their own filter pages.

Sources