Skip to content

Commit

Permalink
unsharpen: Allow kwargs to be passed to gauss_blur
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Nov 28, 2024
1 parent 77b63ed commit a1496cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vsrgtools/sharp.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit a1496cc

Please sign in to comment.