From 67c08e1f061e0ee4cbd9b9fdec11126d00f645d5 Mon Sep 17 00:00:00 2001 From: Setsugennoao <41454651+Setsugennoao@users.noreply.github.com> Date: Fri, 15 Dec 2023 19:51:10 +0100 Subject: [PATCH] Fix fix_telecined_fades for bff clips Fix #24 --- vsdeinterlace/combing.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vsdeinterlace/combing.py b/vsdeinterlace/combing.py index f922e23..71a0941 100644 --- a/vsdeinterlace/combing.py +++ b/vsdeinterlace/combing.py @@ -40,6 +40,8 @@ def fix_telecined_fades( if not complexpr_available: raise ExprVars._get_akarin_err()(func=func) + + tff = FieldBased.from_param_or_video(tff, clip, True, func) clip = FieldBased.ensure_presence(clip, tff, func) @@ -59,9 +61,10 @@ def fix_telecined_fades( ) fix = norm_expr( - props_clip, 'Y 2 % BF! BF@ x.fbAvg{i} x.ftAvg{i} ? AVG! ' - 'AVG@ 0 = x x {color} - AVG@ BF@ x.ftAvg{i} x.fbAvg{i} ? + 2 / AVG@ / * ? {color} +', - planes, i=f.norm_planes, color=colors, force_akarin=func + props_clip, 'Y 2 % BF! BF@ x.f{t1}Avg{i} x.f{t2}Avg{i} ? AVG! ' + 'AVG@ 0 = x x {color} - AVG@ BF@ x.f{t1}Avg{i} x.f{t2}Avg{i} ? + 2 / AVG@ / * ? {color} +', + planes, i=f.norm_planes, color=colors, force_akarin=func, + t1='b' if tff.is_tff else 't', t2='t' if tff.is_tff else 'b' ) return f.return_clip(fix)