From 71774e873dbbd6fe4b12dbc4756f2e0571efe010 Mon Sep 17 00:00:00 2001 From: emotion3459 <176516814+emotion3459@users.noreply.github.com> Date: Mon, 7 Oct 2024 01:11:58 -0400 Subject: [PATCH] fix clip bounds with temporal averaging --- vsdeband/noise.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/vsdeband/noise.py b/vsdeband/noise.py index 8fb3a6a..effd216 100644 --- a/vsdeband/noise.py +++ b/vsdeband/noise.py @@ -223,14 +223,6 @@ def _try_grain(src: vs.VideoNode, stre: tuple[float, float] = strength, **args: grained = _try_grain(base_clip) - if clip.num_frames != grained.num_frames: - if grained.num_frames == 1: - grained = grained.std.Loop(clip.num_frames) - elif grained.num_frames > clip.num_frames: - grained = grained[:clip.num_frames] - else: - grained = grained + grained[-1].std.Loop(clip.num_frames - grained.num_frames) - if input_dep and neutral_out: grained = clip.std.MakeDiff(grained)