Back at home,...
Reading that post, I'm really thinking about dropping support for HAVC in total.
Wouldn't it make more sense to add something like:
inside HAVC itself?
Hybrid will not start to analyse random reference clips with mediainfo, mplayer, ffmpeg,... like it does for normal inputs.
I can adjust Hybrid to add some generic code like above, but it seems like a bad idea to rely on tons of external code.
So you might want to think about whether this really makes sense, especially since you should do the color, resolution, frame count checks inside HAVC anyway to make sure the input is as expected.
I'll look into adding 'NEW ColorMNet encode_mode=2 -> "remote all-ref" ' and '5) NEW PRESET: BlackWhiteTune'.
Cu Selur
Reading that post, I'm really thinking about dropping support for HAVC in total.
Quote:I think that is time to rename the filter DeOldify in HAVC as shown in the following pictureI'll rename it to 'DeOldify/HAVC'. Not starting to really rename the filter since then I would also have to rename all the existing (~60) parameters for consistency.
- vsUseDeOldify
- vsDeOldifyResizeChroma
- vsDeOldifyDeviceIndex
- vsDeOldifyRenderFactor
- vsDeOldifyModel
- vsDeOldifyDDCCombine
- vsDeOldifyCombineStack
- vsDeoldifyCMCChromaThreshold
- vsDeOdifyLMMLuma
- vsDeOdifyLMMWhite
- vsDeOdifyLMMSaturation
- vsDeOldifyChromaSmoothing
- vsDeOldifyChromaSmoothingValue
- vsDeOldifyChromaStabilizer
- vsDeOldifyChromaStabilizerValue
- vsDeOldifyDDColorModel
- vsDeOldifySat
- vsDeOldifyDDColorSaturation
- vsDeOldifyHue
- vsDeOldifyDDColorHue
- vsDeOldifyDDColorRenderFactor
- vsDeOldifyUseDark
- vsDeOldifyDarkValue
- vsDeOldifySimpleMergeWeight
- vsDeOldifyDDColorTweaks
- vsDeOldifyDDColorTweaksValue
- vsDeOldifyCombineSwitch
- vsDeOldifyDDColorFP16
- vsDeoldifyALMThresh
- vsDeOldifyALMExp
- vsDeoldifyALMWeight
- vsDeOldifyColorMap
- vsDeoldifyColorMapGeneral
- vsDeOldifyPreset
- vsDeoldifyColorFix
- vsDeOldifyDDFP16
- vsDeOldifyDDDebug
- vsDeOldifyColorTune
- vsDeOldifyVideoTune
- vsDeOldifyEnableDeepEx
- vsDeOldifySCThreshold
- vsDeOldifySCMinFreq
- vsDeOldifyDeepExPreset
- vsDeOldifyDeepExVivid
- vsDeOldifyDeepExMethod
- vsDeOldifySceneFramedir
- vsDeOldifyDeepExOnlyRefs
- vsDeOldifyDeepExRefMerge
- vsDeOldifyDeepExModel
- vsDeOldifyDeepExFrames
- vsDeOldifyDeepExRefWeight
- vsDeOldifyDeepExRefThresh
- vsDeOldifyColorMNetMode
- vsDeOldifyScThtSSIM
- vsDeOldifySCNormalize
- vsDeOldifyScThtOffset
- vsDeOldifyScMinInt
- vsDeOldifyColoringMethod
- vsDeOldifyAlternativeModel
Quote:NEW USE of Method=5 "HAVC different_from_video"So you whish Hybrid to create:
....
In this case the clipRef must use the external video selected using "Ref FrameDir", and Hybrid need to provide the necessary conversion code to render clipRef compatible with HAVC.
"Ref FrameDir", and Hybrid need to provide the necessary conversion code to render clipRef compatible with HAVC.
# ---------------- ADDING EXTERNAL COLORED VIDEO -------------------------
# Current color space: YUV420P8, bit depth: 8, resolution: 300x232, frame rate: 25fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, transfer: bt.709, primaries: bt.709, format: AVC
# the frame rate is converted to be the same of B&W clip (should not be relevant)
clipRef = core.lsmas.LWLibavSource(source="test_green_sample.mp4", format="YUV420P8", stream_index=0, cache=0, fpsnum=24000, fpsden=1001, prefer_hw=0)
# Resizing using bicubic spline to the same size of B&W clip
clipRef = core.fmtc.resample(clip=clipRef, kernel="spline16", w=920, h=672, interlaced=False, interlacedd=False)
clipRef = core.std.SetFrameProps(clipRef, _Matrix=vs.MATRIX_BT709)
if validate.transferIsInvalid(clip):
clipRef = core.std.SetFrameProps(clip=clipRef, _Transfer=vs.TRANSFER_BT709)
if validate.primariesIsInvalid(clip):
clipRef = core.std.SetFrameProps(clip=clipRef, _Primaries=vs.PRIMARIES_BT470_BG)
clipRef = core.std.SetFrameProps(clip=clipRef, _ColorRange=vs.RANGE_LIMITED)
clipRef = core.std.AssumeFPS(clip=clipRef, fpsnum=24000, fpsden=1001)
clipRef = core.std.SetFrameProps(clip=clipRef, _FieldBased=vs.FIELD_PROGRESSIVE)# progressive
clipRef = core.std.SetFrameProps(clip=clipRef, _ColorRange=vs.RANGE_FULL)
clipRef = core.resize.Bicubic(clip=clipRef, format=vs.RGB24, matrix_in_s="709", range_s="full")
Wouldn't it make more sense to add something like:
havc_refclip = core.bs.VideoSource(source="PATH_TO_FILE")
if clipRef.num_frames != clip.num_frames:
raise vs.Error('HAVC: Reference clip and source clip frame count differ!')
if havc_refclip.format.id != vs.RGB24:
refframe = havc_refclip.get_frame(0)
if frame.props.get('_ColorRange', None) != vs.RANGE_FULL :
clipRef = core.resize.Bicubic(clipRef, range_in_s="limited", range_s="full")
if frame.props.get('_Matrix', None) != vs.MATRIX_BT709 :
clipRef = core.resize.Bicubic(clipRef, matrix_in_s="470bg", matrix_s="709")
havc_refclip = core.resize.Bicubic(clip=havc_refclip, width=clip.width, height= clip.height, format=vs.RGB24, matrix_i_s="709", range_s="full")
clipRef = core.std.AssumeFPS(clip=clipRef, fpsnum=clip.fps_num, fpsden=clip.fps_den)
Hybrid will not start to analyse random reference clips with mediainfo, mplayer, ffmpeg,... like it does for normal inputs.
I can adjust Hybrid to add some generic code like above, but it seems like a bad idea to rely on tons of external code.
So you might want to think about whether this really makes sense, especially since you should do the color, resolution, frame count checks inside HAVC anyway to make sure the input is as expected.
I'll look into adding 'NEW ColorMNet encode_mode=2 -> "remote all-ref" ' and '5) NEW PRESET: BlackWhiteTune'.
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.