From 0bac0fb5d0289ce6eb51b33986f0eb775fdd7d37 Mon Sep 17 00:00:00 2001 From: Setsugennoao <41454651+Setsugennoao@users.noreply.github.com> Date: Sat, 11 Nov 2023 20:55:34 +0100 Subject: [PATCH] Fix fmtconv taps not being float --- vskernels/kernels/fmtconv.py | 2 +- vskernels/kernels/impulse.py | 2 +- vskernels/kernels/spline.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vskernels/kernels/fmtconv.py b/vskernels/kernels/fmtconv.py index 46600a9..c549d11 100644 --- a/vskernels/kernels/fmtconv.py +++ b/vskernels/kernels/fmtconv.py @@ -88,7 +88,7 @@ def _check_fmt(fmt: int | VideoFormatT) -> tuple[vs.VideoFormat, bool]: 'sh': 'src_height', 'sy': 'src_top' } - def __init__(self, taps: int = 4, **kwargs: Any) -> None: + def __init__(self, taps: float = 4, **kwargs: Any) -> None: self.taps = taps super().__init__(**kwargs) diff --git a/vskernels/kernels/impulse.py b/vskernels/kernels/impulse.py index 8fd710d..78b8d3e 100644 --- a/vskernels/kernels/impulse.py +++ b/vskernels/kernels/impulse.py @@ -36,7 +36,7 @@ def get_params_args( ) -> dict[str, Any]: return super().get_params_args(is_descale, clip, width, height, **kwargs) - def __init__(self, impulse: Sequence[float], oversample: int = 8, taps: int = 1, **kwargs: Any) -> None: + def __init__(self, impulse: Sequence[float], oversample: int = 8, taps: float = 1, **kwargs: Any) -> None: super().__init__(taps, impulse=[*impulse[::-1], *impulse[:-1]], kovrspl=oversample, **kwargs) @inject_self.cached diff --git a/vskernels/kernels/spline.py b/vskernels/kernels/spline.py index 64a5fa3..fa61db9 100644 --- a/vskernels/kernels/spline.py +++ b/vskernels/kernels/spline.py @@ -20,7 +20,7 @@ class Spline(FmtConv): _kernel = 'spline' - def __init__(self, taps: int = 2, **kwargs: Any) -> None: + def __init__(self, taps: float = 2, **kwargs: Any) -> None: super().__init__(taps=taps, **kwargs)