Skip to content
This repository has been archived by the owner on Feb 27, 2025. It is now read-only.

Commit

Permalink
Update scale/descale signature for width/height parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed May 16, 2024
1 parent ac76d9c commit 4a68900
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions vsdenoise/prefilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
from vsmasktools import retinex
from vsrgtools import bilateral, blur, gauss_blur, min_blur, replace_low_frequencies
from vstools import (
MISSING, ColorRange, ConvMode, CustomEnum, CustomIntEnum, CustomRuntimeError, MissingT, PlanesT,
SingleOrArr, SingleOrArrOpt, check_variable, clamp, core, depth, disallow_variable_format,
disallow_variable_resolution, get_depth, get_neutral_value, get_peak_value, get_y, join, normalize_planes,
normalize_seq, scale_8bit, scale_value, split, vs
MISSING, ColorRange, ConvMode, CustomEnum, CustomIntEnum, CustomRuntimeError, MissingT, PlanesT, SingleOrArr,
SingleOrArrOpt, check_variable, clamp, core, depth, disallow_variable_format, disallow_variable_resolution,
get_depth, get_neutral_value, get_peak_value, get_y, join, normalize_planes, normalize_seq, scale_8bit, scale_value,
split, vs
)

from .bm3d import BM3D as BM3DM
Expand Down Expand Up @@ -914,9 +914,11 @@ def __call__(
return PelType.__call__(self.scaler, clip, pel, default, **(self.kwargs | kwargs))

def scale(
self, clip: vs.VideoNode, width: int, height: int, shift: tuple[float, float] = (0, 0), **kwargs: Any
self, clip: vs.VideoNode, width: int | None = None, height: int | None = None,
shift: tuple[float, float] = (0, 0), **kwargs: Any
) -> vs.VideoNode:
self.scaler.scale(clip, width, height, shift, **kwargs)
width, height = Scaler._wh_norm(clip, width, height)
return self.scaler.scale(clip, width, height, shift, **kwargs)

@property
def kernel_radius(self) -> int:
Expand Down Expand Up @@ -956,7 +958,8 @@ def __init__(self, scaler: str | type[Scaler] | Scaler, **kwargs: Any) -> None:
"""

def scale( # type: ignore
self, clip: vs.VideoNode, width: int, height: int, shift: tuple[float, float] = (0, 0), **kwargs: Any
self, clip: vs.VideoNode, width: int | None = None, height: int | None = None,
shift: tuple[float, float] = (0, 0), **kwargs: Any
) -> vs.VideoNode:
...

Expand Down

0 comments on commit 4a68900

Please sign in to comment.