Skip to content

Commit

Permalink
Fix fix_telecined_fades for bff clips
Browse files Browse the repository at this point in the history
Fix #24
  • Loading branch information
Setsugennoao authored and LightArrowsEXE committed May 15, 2024
1 parent 41b8014 commit 37b4fdc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vsdeinterlace/combing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 37b4fdc

Please sign in to comment.