11.09.2025, 18:36
Before calling the filter it is necessary to convert the clip to RGB24 (as usual)
But the generated code convert the clip in RGBS format (note: limited -> limited).
Now I added this check in the filter
But it is better that the conversion is provided by Hybrid.
Dan
Code:
clip = clip.resize.Bicubic(format=vs.RGB24, matrix_in_s="709", range_in_s="limited", range_s="full")
But the generated code convert the clip in RGBS format (note: limited -> limited).
Code:
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_in_s="limited", range_s="limited")
Now I added this check in the filter
Code:
if clip.format.id != vs.RGB24:
HAVC_LogMessage(MessageType.WARNING, "ColorPostProcessing: clip not in RGB24 format, it will be converted")
# clip not in RGB24 format, it will be converted
if clip.format.color_family == "YUV":
clip = clip.resize.Bicubic(format=vs.RGB24, matrix_in_s="709", range_s="full",
dither_type="error_diffusion")
else:
clip = clip.resize.Bicubic(format=vs.RGB24, range_s="full")
But it is better that the conversion is provided by Hybrid.
Dan