View Single Post
Old 16th September 2021, 13:38   #5  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Quote:
Originally Posted by DTL View Post
Code:
LoadPlugin("avsresize.dll")

ColorBarsHD(9600,1000, pixel_type="YV24")
ConvertBits(16) # YUV 444 16
Crop(0,0,9600,500)
AddBorders(100,100,100,100)

#z_convertformat(pixel_type="rgbps", colorspace_op="709:709:709:l=>rgb:linear:709:f")
z_convertformat(pixel_type="rgbp", colorspace_op="709:709:709:l=>rgb:linear:2020:l") # attempt to have primaries in 2020 before conditioning - no help

GaussResize(width/10,height/10, p=10)

#testing source
#return Crop(300,0, width-300, height).SincResize(width*4, height*4, taps=16).ConvertToRGB24(matrix="PC.709")

z_convertformat(pixel_type="yuv444p16", colorspace_op="rgb:linear:2020:l=>2020ncl:st2084:2020:l")
#PQ HDR here

# attempt to resize in PQ HDR transfer
Crop(300,0, width-300, height).SincResize(width*4, height*4, taps=16)
return z_convertformat(pixel_type="yuv444p16", colorspace_op="2020ncl:st2084:2020:l=>709:709:709:l").ConvertToRGB24(matrix="PC.709")

# attempt to resize in linear
  rgb_lin=z_convertformat(pixel_type="rgbps", colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:f")
  rgb_lin=SincResize(rgb_lin,rgb_lin.width*4, rgb_lin.height*4, taps=16)
  z_convertformat(rgb_lin, pixel_type="YUV444P16", colorspace_op="rgb:linear:2020:f=>709:709:709:l")

return Crop(300,0, width-300, height).ConvertToRGB24(matrix="PC.709")
Replacing sinc kernel with another or using lower taps gives good result.
StvG is offline   Reply With Quote