From a60792f6745a4125e5d5026aa0928305aab17d2c Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Fri, 1 Nov 2024 20:47:35 +0100 Subject: [PATCH] scale/descale: border_handling.from_param --- vskernels/kernels/abstract.py | 2 +- vskernels/kernels/complex.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vskernels/kernels/abstract.py b/vskernels/kernels/abstract.py index 495a677..bb80627 100644 --- a/vskernels/kernels/abstract.py +++ b/vskernels/kernels/abstract.py @@ -290,7 +290,7 @@ def descale( clip, bits = expect_bits(clip, 32) de_base_args = (width, height // (1 + field_based.is_inter)) - kwargs |= dict(border_handling=border_handling) + kwargs |= dict(border_handling=BorderHandling.from_param(border_handling, self.descale)) if field_based.is_inter: shift_y, shift_x = tuple[tuple[float, float], ...]( diff --git a/vskernels/kernels/complex.py b/vskernels/kernels/complex.py index cd0a009..1c59b62 100644 --- a/vskernels/kernels/complex.py +++ b/vskernels/kernels/complex.py @@ -198,6 +198,7 @@ def scale( # type: ignore[override] kwargs, shift = sample_grid_model.for_dst(clip, width, height, shift, **kwargs) + border_handling = BorderHandling.from_param(border_handling, self.scale) padded = border_handling.prepare_clip(clip, self.kernel_radius) shift, clip = tuple(