Skip to content

Commit

Permalink
vinverse: Optimize expr (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
emotion3459 authored Sep 29, 2024
1 parent 0cbcfd5 commit aba4af9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vsdeinterlace/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def __call__(
def vinverse(
clip: vs.VideoNode,
comb_blur: GenericVSFunction | vs.VideoNode | Sequence[int] = [1, 2, 1],
contra_blur: GenericVSFunction | vs.VideoNode | Sequence[int] = [1, 4, 6, 4, 1],
contra_blur: GenericVSFunction | vs.VideoNode | Sequence[int] = [1, 2, 1],
contra_str: float = 2.7, amnt: int = 255, scl: float = 0.25,
thr: int = 0, planes: PlanesT = None,
**kwargs: Any
Expand Down Expand Up @@ -256,8 +256,8 @@ def vinverse(
combed = norm_expr(
[func.work_clip, blurred, blurred2], # type:ignore
'x y - D1! D1@ abs D1A! D1A@ {thr} < x y z - {sstr} * D2! D2@ abs D2A! '
'D2@ D1@ xor D2A@ D1A@ < D2@ D1@ ? {scl} * D2A@ D1A@ < D2@ D1@ ? ? y + '
'LIM! x {amnt} + LIM@ < x {amnt} + x {amnt} - LIM@ > x {amnt} - LIM@ ? ? ?',
'D2@ D1@ xor D2A@ D1A@ < D2@ D1@ ? {scl} * D2A@ D1A@ < D2@ D1@ ? ? '
'y + x {amnt} + min x {amnt} - max ?',
planes, sstr=contra_str, amnt=scale_8bit(func.work_clip, amnt),
scl=scl, thr=scale_8bit(func.work_clip, thr),
)
Expand Down

0 comments on commit aba4af9

Please sign in to comment.