From bd489304c05099f050f9b634fa002ee92fd01564 Mon Sep 17 00:00:00 2001 From: emotion3459 <176516814+emotion3459@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:53:08 -0400 Subject: [PATCH] Update value scaling --- vsdeband/funcs.py | 2 +- vsdeband/noise.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/vsdeband/funcs.py b/vsdeband/funcs.py index af913da..4586375 100644 --- a/vsdeband/funcs.py +++ b/vsdeband/funcs.py @@ -174,7 +174,7 @@ def guided_deband( if clip.format.sample_type is vs.FLOAT: bin_thr = 1.5 / 255 if range_in.is_full else [1.5 / 219, 1.5 / 224] else: - bin_thr = scale_value(0.005859375, 32, clip, range_out=range_in) + bin_thr = scale_value(0.005859375, 32, clip, range_in, range_out=range_in) bin_thr = normalize_seq(bin_thr, clip.format.num_planes) diff --git a/vsdeband/noise.py b/vsdeband/noise.py index a9cf1ba..37f1c2f 100644 --- a/vsdeband/noise.py +++ b/vsdeband/noise.py @@ -262,7 +262,6 @@ def _try_grain(src: vs.VideoNode, stre: tuple[float, float] = strength, **args: low = [ scale_value( threshold, 8, clip.format.bits_per_sample, - scale_offsets=(clip.format.sample_type is vs.FLOAT), chroma=not not plane_index ) for plane_index, threshold in enumerate(normalize_seq(fallback(low, 16))) @@ -271,7 +270,6 @@ def _try_grain(src: vs.VideoNode, stre: tuple[float, float] = strength, **args: high = [ scale_value( threshold, 8, clip.format.bits_per_sample, - scale_offsets=(clip.format.sample_type is vs.FLOAT), chroma=not not plane_index ) for plane_index, threshold in enumerate(normalize_seq(fallback(high, [235, 240])))