From a1496cc41397572eb21ee50c54f88abf026e5f94 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Thu, 28 Nov 2024 19:48:17 +0100 Subject: [PATCH] unsharpen: Allow kwargs to be passed to gauss_blur --- vsrgtools/sharp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vsrgtools/sharp.py b/vsrgtools/sharp.py index c2ee973..a1a669b 100644 --- a/vsrgtools/sharp.py +++ b/vsrgtools/sharp.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Any + from vsexprtools import norm_expr from vstools import CustomTypeError, PlanesT, VSFunction, check_ref_clip, check_variable, normalize_planes, vs @@ -18,7 +20,7 @@ def unsharpen( clip: vs.VideoNode, strength: float = 1.0, sigma: float | list[float] = 1.5, - prefilter: vs.VideoNode | VSFunction | None = None + prefilter: vs.VideoNode | VSFunction | None = None, **kwargs: Any ) -> vs.VideoNode: assert check_variable(clip, unsharpen) @@ -27,7 +29,7 @@ def unsharpen( check_ref_clip(clip, ref) den = ref or clip - blur = gauss_blur(den, sigma) + blur = gauss_blur(den, sigma, **kwargs) unsharp = norm_expr([den, blur], f'x y - {strength} * x +', 0)