From 8dbbc10436db4d9d29317266242c9b61c06d8fd5 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Sun, 8 Sep 2024 21:11:02 +0200 Subject: [PATCH] transpose_aa, fine_aa: Deprecate functions --- vsaa/funcs.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/vsaa/funcs.py b/vsaa/funcs.py index 503e108..aa45fe6 100644 --- a/vsaa/funcs.py +++ b/vsaa/funcs.py @@ -147,8 +147,17 @@ def transpose_aa(clip: vs.VideoNode, aafunc: SingleRater, planes: PlanesT = 0) - :param aafun: Antialiasing function. :return: Antialiased clip. """ + func = FunctionUtil(clip, transpose_aa, planes) + import warnings + + warnings.warn( + f"{func.func}: 'This function is deprecated and will be removed in future versions. " + "Please use `transpose_first` in your `aafunc` instead.'", + DeprecationWarning, + ) + aafunc = aafunc.copy(transpose_first=True, drop_fields=False) # type: ignore aa = aafunc.aa(func.work_clip) # type: ignore @@ -277,12 +286,20 @@ def fine_aa( :return: Antialiased clip. """ + assert clip.format singlerater = singlerater.copy(shifter=Bilinear()) # type: ignore func = FunctionUtil(clip, fine_aa, planes) + import warnings + + warnings.warn( + f"{func.func}: 'This function is deprecated and will be removed in future versions.'", + DeprecationWarning, + ) + if taa: aa = transpose_aa(func.work_clip, singlerater) else: