Thread: Avisynth+
View Single Post
Old 7th October 2019, 17:18   #4885  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Does anyone have a suggestion for a downscaling resizer that works in native high bit depth? I've searched about but can't find anything.
If you mean a simple resizing kernel, Avisynth+ built in resizing kernel work with high bit depth, however I suggest you to use the MT version made by Jean-Philippe.
You can find them here: https://forum.doom9.org/showthread.php?t=174248

For instance, this works absolutely fine in 4:4:4 16bit planar:

Code:
ColorBars(3840, 2160, pixel_type="YV24")
ConvertBits(16)

Spline64ResizeMT(848, 480)
You can use other resizing kernel like Bilinear, Bicubic, Lanczos etc.
I actually suggest to use Lanczos for downscale and Spline36 or Spline64 to upscale.

Anyway, since in your script you were using EDI, you may wanna check out NNEDI which also works in 16bit planar:

Code:
ColorBars(3840, 2160, pixel_type="YV24")
ConvertBits(16)

nnedi3_rpow2(cshift="Spline64ResizeMT", rfactor=2, fwidth=848, fheight=480, nsize=4, nns=4, qual=1, etype=0, pscrn=2, threads=0, csresize=true, mpeg2=true, threads_rs=0, logicalCores_rs=true, MaxPhysCore_rs=true, SetAffinity_rs=false, opt=3)
as well as 16bit stacked:

Code:
ColorBars(3840, 2160, pixel_type="YV24")
Dither_convert_8_to_16()

nnedi3_resize16(target_width=848, target_height=480, mixed=true, thr=1.0, elast=1.5, nns=4, qual=2, etype=0, pscrn=4, threads=0, tv_range=true, kernel_d="Spline", kernel_u="Spline", taps=6, f_d=1.0, f_u=2.0, sharp=0, lsb_in=true, lsb=true)
Another resizer that works in 16bit stacked is LinearResize which lets you choose your desired resizing kernel and upscale or downscale with 16bit stacked precision:

Code:
ColorBars(3840, 2160, pixel_type="YV24")
Dither_convert_8_to_16()

LinearResize(848, 480, kernel="spline64", mode=0, lsb_in=true, lsb_out=true, TVrange=true, matrix="709", matrix_out="709", cplace_in="mpeg2", cplace_out="mpeg2", NoRing=false, interlaced=false)
LinearResize is part of the ResizerPack that you can find here: http://www.mediafire.com/file/w8sayu...ck4.5.zip/file


I hope it helps.

Cheers,
Frank.
FranceBB is offline