Skip to content

Commit

Permalink
frequency_merge: Use FormatsMismatchError
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Sep 4, 2024
1 parent 8c4d19b commit 67f8d6d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions vsdenoise/freqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from vsrgtools import MeanMode
from vstools import (
CustomValueError, GenericVSFunction, KwargsT, PlanesT, fallback, flatten_vnodes,
get_video_format, normalize_planes, normalize_seq, vs
normalize_planes, normalize_seq, vs, FormatsMismatchError
)

from .fft import DFTTest
Expand Down Expand Up @@ -52,10 +52,7 @@ def frequency_merge(
if not lowpass:
raise CustomValueError('You must pass at least one lowpass filter!', frequency_merge)

formats = {get_video_format(clip).id for clip in clips}

if len(formats) > 1:
raise CustomValueError('All clips must have the same format!', frequency_merge)
FormatsMismatchError.check(frequency_merge, *clips)

blurred_clips = []
for clip, filt in zip(clips, normalize_seq(lowpass, n_clips)):
Expand Down

0 comments on commit 67f8d6d

Please sign in to comment.