From 57293b0934449132005e083dd38606ff5101fd8b Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Sat, 5 Oct 2024 02:01:32 +0200 Subject: [PATCH] vinverse: Replace deprecated scale_8bit --- vsdeinterlace/funcs.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/vsdeinterlace/funcs.py b/vsdeinterlace/funcs.py index cfc4d3c..c80809a 100644 --- a/vsdeinterlace/funcs.py +++ b/vsdeinterlace/funcs.py @@ -3,13 +3,12 @@ from typing import Any, Sequence, cast from stgpytools import CustomIntEnum +from vsdenoise import MVTools from vsexprtools import ExprVars, complexpr_available, norm_expr from vsrgtools import BlurMatrix -from vsdenoise import MVTools from vstools import ( - ConvMode, CustomEnum, FormatsMismatchError, InvalidFramerateError, - FunctionUtil, FuncExceptT, GenericVSFunction, KwargsT, PlanesT, - core, vs, scale_8bit, check_variable + ColorRange, ConvMode, CustomEnum, FormatsMismatchError, FuncExceptT, FunctionUtil, GenericVSFunction, + InvalidFramerateError, KwargsT, PlanesT, check_variable, core, scale_value, vs ) __all__ = [ @@ -259,8 +258,8 @@ def vinverse( [func.work_clip, blurred, blurred2], # type:ignore 'x y - D1! D1@ abs D1A! D1A@ {thr} < x y z - {sstr} * D2! D1A@ D2@ abs < D1@ D2@ ? D3! ' 'D1@ D2@ xor D3@ {scl} * D3@ ? y + x {amnt} - x {amnt} + clip ?', - planes, sstr=contra_str, amnt=scale_8bit(func.work_clip, amnt), - scl=scl, thr=scale_8bit(func.work_clip, thr), + planes, sstr=contra_str, amnt=scale_value(amnt, 8, func.work_clip, ColorRange.FULL), + scl=scl, thr=scale_value(thr, 8, func.work_clip, ColorRange.FULL), ) return func.return_clip(combed)