View Single Post
Old 16th May 2021, 03:24   #22  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 450
I appreciate your work and the time you spared but saying "half baked color space function" about zimg is not serious and someone reading this would get completely wrong impression (about zimg).

That precision you're talking about it would matter when you can get the final result in float (still questionable - no visible difference) but in the end you have to go lower integer and to use some rounding.

Also... you have intermediate result with source bit depth (the output from YCbCrToRGB and the intput in RGBToYCbCr) that wipes the precision you're trying to achieve if the input clip is not in float (input bit depth -> float -> input_depth -> float -> input_depth):
Code:
YCbCrToRGB(YCbCrToRGB_mat("601")).RGBToYCbCr(RGBToYCbCr_mat("709"))
avsresize equivalent would be (assuming 8-bit input) (8-bit -> float -> 8-bit -> float -> 8-bit);
Code:
z_ConvertFormat(pixel_type="rgbp", colorspace_op="601:709:709=>rgb:709:709", resample_filter="spline36")
z_ConvertFormat(pixel_type="yv12", colorspace_op="rgb:709:709=>709:709:709", resample_filter="spline36")
But here you have intermediate result in float and this leads to final result with higher precision than above examples (input bit depth -> float -> input_depth):
Code:
z_ConvertFormat(colorspace_op="601:709:709:l=>709:709:709:l",resample_filter="spline36",  dither_type="none")
For ColorSpace("601","709","spline36","spline36",true,false) again the intermediate result is in input_depth.
StvG is offline   Reply With Quote