import havsfunc as haf import functools input_clip = src def postprocess(n, f, clip, deinterlaced): if f.props['_Combed'] > 0: return deinterlaced else: return clip matched_clip = core.vivtc.VFM(input_clip, 1) deinterlaced_clip = haf.QTGMC(matched_clip, TFF=True, FPSDivisor=2) postprocessed_clip = core.std.FrameEval(matched_clip, functools.partial(postprocess, clip=matched_clip, deinterlaced=deinterlaced_clip), prop_src=matched_clip) decimated_clip = core.vivtc.VDecimate(postprocessed_clip) src = decimated_clip