Skip to content

Commit

Permalink
fix_telecined_fades: Minor fix before rewrite
Browse files Browse the repository at this point in the history
This way it at least functions as-is
  • Loading branch information
LightArrowsEXE committed Aug 24, 2022
1 parent 23e9edf commit cff6dcd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lvsfunc/deinterlace.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def fix_telecined_fades(clip: vs.VideoNode, tff: bool | int | None = None, cuda:
:raises TopFieldFirstError: No automatic ``tff`` can be determined.
"""
bits, clip = expect_bits(clip, 32)
bits, _ = expect_bits(clip, 32)

if isinstance(tff, int):
clip = clip.std.SetFieldBased(tff + 1)
Expand All @@ -496,7 +496,7 @@ def fix_telecined_fades(clip: vs.VideoNode, tff: bool | int | None = None, cuda:
except ModuleNotFoundError:
raise ModuleNotFoundError("fix_telecined_fades: missing dependency `stgfunc`!")

avg_props_clip = mean_plane_value(fields, [0.0, 1.0], 0, cuda=True, prop='psmAvg')
avg_props_clip = mean_plane_value(fields, [0.0, 1.0], cuda=True, prop='psmAvg', single_out=True, planes=0)
else:
avg_props_clip = fields.psm.PlaneAverage(value_exclude=[0.0, 1.0])

Expand All @@ -510,8 +510,8 @@ def props_bodge(f: list[vs.VideoFrame], n: int) -> vs.VideoFrame:
)

output = props_clip.akarin.Expr(
'Y 2 % BF! BF@ x.ftAvg x.fbAvg ? TAVG! '
'TAVG@ 0 = x x TAVG@ BF@ x.fbAvg x.ftAvg ? + 2 / TAVG@ / * ?'
'Y 2 % BF! BF@ x.fbAvg x.ftAvg ? TAVG! '
'TAVG@ 0 = x x TAVG@ BF@ x.ftAvg x.fbAvg ? + 2 / TAVG@ / * ?'
)

return depth(output, bits)
Expand Down

0 comments on commit cff6dcd

Please sign in to comment.