View Single Post
Old 29th October 2016, 21:23   #1  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 327
z.lib resizers for AviSynth+

Code:
z_ConvertFormat(
    clip clip,
    int "width",
    int "height",
    str "pixel_type",
    str "colorspace_op",
    str "chromaloc_op",
    bool "interlaced",
    float "src_left",
    float "src_top",
    float "src_width",
    float "src_height",
    str "resample_filter",
    float "filter_param_a",
    float "filter_param_b",
    str "resample_filter_uv",
    float "filter_param_a_uv",
    float "filter_param_b_uv",
    str "dither_type")

width:                  output width in pixels
height:                 output height in pixels
pixel_type:             output pixel type ("YV12", "YUV420P16", etc.)
colorspace_op:          colorspace operation description
    Format is
        "matS[:transS[:primS[:rangeS]]]=>matD[:transD[:primD[:rangeD]]]"
    Example JPEG to MPEG: "170m:709:709:f=>709:709:709:l"
chromaloc_op:           chroma location operation description
    Format is "[locS]=>[locD]"
    Example JPEG to MPEG2: "center=>left"
interlaced:             whether to use interlaced mode (default: false)
resample_filter:        resampling mode
filter_param_a:         first parameter to resampler
filter_param_b:         second parameter to resampler
    Example Bicubic (Mitchell-Netravali):
        resample_filter="bicubic", filter_param_a=0.333, filter_param_b=0.333
    Example 4-tap Lanczos: resample_filter="lanczos", filter_param_a=4
resample_filter_uv:     resampling mode for chroma
filter_param_a_uv:      first parameter to chroma resampler
filter_param_b_uv:      second parameter to chroma resampler
dither_type:            dithering type

See VapourSynth documentation for valid string constants.
Also has all the AviSynth resizers, but with "z_" prefix.

Download: r2

Last edited by Stephen R. Savage; 7th July 2022 at 15:59.
Stephen R. Savage is offline   Reply With Quote