Skip to content

Commit

Permalink
fix_interlaced_fades: fix chroma
Browse files Browse the repository at this point in the history
  • Loading branch information
emotion3459 authored Oct 7, 2024
1 parent 57293b0 commit 0790ffe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vsdeinterlace/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,17 @@ def __call__(
expr_footer = ' AVG@ / * ? {color} +'

expr_mode, expr_mode_chroma = (
('+ 2 /', '+ 2 /') if self == self.Average else (('min', '<') if self == self.Darken else ('max', '>'))
('min', '<') if self == self.Darken else ('max', '>') if self == self.Brighten else ('+ 2 /', '+ 2 /')
)

fix = norm_expr(
props_clip, (
# luma
expr_header + 'x.ftAvg{i} x.fbAvg{i} {expr_mode}' + expr_footer,
# chroma
expr_header + 'x.ftAvg{i} abs x.fbAvg{i} abs {expr_mode} x.ftAvg{i} x.fbAvg{i} ?' + expr_footer
expr_header + ('x.ftAvg{i} x.fbAvg{i} {expr_mode}' if (
self == self.Average
) else 'x.ftAvg{i} abs x.fbAvg{i} abs {expr_mode} x.ftAvg{i} x.fbAvg{i} ?') + expr_footer
),
planes, i=f.norm_planes, expr_mode=(expr_mode, expr_mode_chroma),
color=colors, force_akarin=func,
Expand Down

0 comments on commit 0790ffe

Please sign in to comment.