From a0be6337b54bf79258f4bea76b4773759eaaac65 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sun, 16 Oct 2022 23:04:50 +0200 Subject: [PATCH] add Parameter checks --- denoiseMC.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/denoiseMC.py b/denoiseMC.py index e9c5248..7ef74b2 100644 --- a/denoiseMC.py +++ b/denoiseMC.py @@ -1,9 +1,14 @@ def denoiseMC(clip, denoise_fn, radius: int = 2, search: int = 3, blksize: int = 16): from vapoursynth import core - mv = core.mv std = core.std + if clip is None: + raise ValueError('clip is required') + + if denoise_fn is None: + raise ValueError('denoise_fn is required') + if radius < 1: raise ValueError('radius must be greater than 0')