01.02.2025, 17:18
Quote:Could you clarify better ?
- I will not start analyzing such clips, since it does not make sense.
- HAVC should check that the clip is RGB24 and has the same frame count and resolution as the source and either convert something compatible with the used clip by itself or throw an error.
# load clip
havc_refclip = core.bs.VideoSource(source="PATH_TO_FILE")
# validate frame count
if clipRef.num_frames != clip.num_frames:
raise vs.Error(f"HAVC: Reference clip ({clipRef.num_frames}) and source clip frame count ({clip.num_frames}) differ!")
# convert if not RGB24
if havc_refclip.format.id != vs.RGB24:
refframe = havc_refclip.get_frame(0)
# when the _ColorRange flag is not set or 'limited', assume that it is 'limited' and convert to 'full'
if frame.props.get('_ColorRange', None) != vs.RANGE_FULL :
clipRef = core.resize.Bicubic(clipRef, range_in_s="limited", range_s="full")
# when the _Matrix-flag isn't set or not '709' assume '470bg' and convert to '709'
if frame.props.get('_Matrix', None) != vs.MATRIX_BT709 :
clipRef = core.resize.Bicubic(clipRef, matrix_in_s="470bg", matrix_s="709")
# resize and convert to RGB24
clipRef = core.resize.Bicubic(clip=havc_refclip, width=clip.width, height= clip.height, format=vs.RGB24, matrix_i_s="709", range_s="full")
else:
# make sure resolution is correct (if the aspect ratio of the source and the reference differ, matching will not work properly)
clipRef = core.resize.Bicubic(clip=havc_refclip, width=clip.width, height= clip.height)
clipRef = core.std.AssumeFPS(clip=clipRef, fpsnum=clip.fps_num, fpsden=clip.fps_den
So the question is: Should Hybrid do this, or do you add (something like) this to HAVC?
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.