Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frequency_merge: remove mean_diff #123

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions vsdenoise/freqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def frequency_merge(
*_clips: vs.VideoNode | Iterable[vs.VideoNode], tr: int = 0,
mode_high: MeanMode | vs.VideoNode = MeanMode.LEHMER, mode_low: MeanMode | vs.VideoNode = MeanMode.ARITHMETIC,
mode_tr: MeanMode | None = None, lowpass: GenericVSFunction | list[GenericVSFunction] = DFTTest.denoise,
mean_diff: bool = False, planes: PlanesT = None, mv_args: KwargsT | None = None,
planes: PlanesT = None, mv_args: KwargsT | None = None,
**kwargs: Any
) -> vs.VideoNode:
"""
Expand All @@ -35,8 +35,6 @@ def frequency_merge(
If None, it defaults to the value of mode_high.
:param lowpass: The lowpass filter to used to extract high frequency components.
Example: `lowpass = lambda i: vsrgtools.box_blur(i, passes=3)`
:param mean_diff: Whether to use the mean of the lowpass filter and the original clip to
extract the low frequency components. Default is False.
:param planes: The planes to process. If None, all planes will be processed.
:param mv_args: The arguments to pass to the MVTools class.
"""
Expand Down Expand Up @@ -67,7 +65,7 @@ def frequency_merge(
low_freqs = mode_low(blurred_clips, planes=planes, func=frequency_merge)

diffed_clips = []
for clip, blur in zip(clips, normalize_seq(low_freqs if mean_diff else blurred_clips, n_clips)):
for clip, blur in zip(clips, normalize_seq(blurred_clips, n_clips)):
diffed_clips.append(None if clip == blur else clip.std.MakeDiff(blur, planes))

if isinstance(mode_high, vs.VideoNode):
Expand Down
Loading