From dbba1361be55ada48850e1a19cc41a2c42a44210 Mon Sep 17 00:00:00 2001 From: emotion3459 <176516814+emotion3459@users.noreply.github.com> Date: Sun, 6 Oct 2024 23:50:27 -0400 Subject: [PATCH] fix_interlaced_fades: fix chroma (#45) --- vsdeinterlace/funcs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vsdeinterlace/funcs.py b/vsdeinterlace/funcs.py index c80809a..1d7d27c 100644 --- a/vsdeinterlace/funcs.py +++ b/vsdeinterlace/funcs.py @@ -193,7 +193,7 @@ 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( @@ -201,7 +201,9 @@ def __call__( # 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,