Skip to content

Commit

Permalink
Use new Scaler.kernel_radius in SSIM
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Dec 14, 2023
1 parent 46fef83 commit adddf10
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions vsscale/scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,7 @@ def __init__(
self.scaler = Hermite.from_param(scaler)

if smooth is None:
kernel_radius = 1

if isinstance(self.scaler, Bicubic):
if not isinstance(self.scaler, Hermite):
kernel_radius = 2
elif hasattr(self.scaler, 'taps'):
kernel_radius = int(self.scaler.taps)

smooth = (kernel_radius + 1.0) / 3
smooth = (self.scaler.kernel_radius + 1.0) / 3

if callable(smooth):
self.filter_func = smooth
Expand Down

0 comments on commit adddf10

Please sign in to comment.