From 01f9f0d86f6df66dc737bf2346d9435b2727ff20 Mon Sep 17 00:00:00 2001 From: Setsugennoao <41454651+Setsugennoao@users.noreply.github.com> Date: Tue, 7 Nov 2023 21:48:26 +0100 Subject: [PATCH] Use ColorRange.from_param_or_video --- vsdeband/filters.py | 2 +- vsdeband/funcs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vsdeband/filters.py b/vsdeband/filters.py index 6d1cf95..7fc0ac2 100644 --- a/vsdeband/filters.py +++ b/vsdeband/filters.py @@ -31,7 +31,7 @@ def guided_filter( downscaler = Scaler.ensure_obj(downscaler, guided_filter) upscaler = Scaler.ensure_obj(upscaler, guided_filter) - range_in = ColorRange.from_param(range_in, guided_filter) or ColorRange.from_video(clip) + range_in = ColorRange.from_param_or_video(range_in, clip, False, guided_filter) width, height = clip.width, clip.height diff --git a/vsdeband/funcs.py b/vsdeband/funcs.py index 1fe04cc..b903b9b 100644 --- a/vsdeband/funcs.py +++ b/vsdeband/funcs.py @@ -166,7 +166,7 @@ def guided_deband( planes = normalize_planes(clip, planes) - range_in = ColorRange.from_param(range_in) or ColorRange.from_video(clip) + range_in = ColorRange.from_param_or_video(range_in, clip) rad = fallback(rad, ceil(clip.height / 540))