diff --git a/vsdenoise/bm3d.py b/vsdenoise/bm3d.py index a20834b..8cc0e43 100644 --- a/vsdenoise/bm3d.py +++ b/vsdenoise/bm3d.py @@ -10,7 +10,7 @@ from vstools import ( MISSING, ColorRange, ColorRangeT, Colorspace, ConstantFormatVideoNode, CustomIndexError, CustomRuntimeError, - CustomStrEnum, CustomValueError, DitherType, FuncExceptT, FunctionUtil, KwargsT, Matrix, MatrixT, MissingT, PlanesT, + CustomStrEnum, CustomValueError, FuncExceptT, FunctionUtil, KwargsT, Matrix, MatrixT, MissingT, PlanesT, Self, SingleOrArr, check_variable, core, depth, get_video_format, get_y, join, normalize_seq, vs, vs_object ) @@ -91,13 +91,11 @@ def prepare_clip(self, clip: vs.VideoNode | None) -> vs.VideoNode | None: def post_processing(self, clip: vs.VideoNode) -> vs.VideoNode: assert clip.format - dither = DitherType.ERROR_DIFFUSION if DitherType.should_dither(self.clip.format, clip) else DitherType.NONE - if self.clip.format.color_family is vs.YUV: if clip.format.color_family is vs.GRAY: clip = join(depth(clip, self.clip), self.clip) else: - clip = self.csp.to_yuv(clip, self.fp32, format=self.clip.format, matrix=self.matrix, dither_type=dither) + clip = self.csp.to_yuv(clip, self.fp32, format=self.clip.format, matrix=self.matrix) elif self.clip.format.color_family is vs.RGB: clip = self.csp.to_rgb(clip, self.fp32) diff --git a/vsdenoise/deblock.py b/vsdenoise/deblock.py index fb03077..c61e7d4 100644 --- a/vsdenoise/deblock.py +++ b/vsdenoise/deblock.py @@ -8,7 +8,7 @@ from vsmasktools import FDoG, GenericMaskT, adg_mask, normalize_mask from vsrgtools import gauss_blur from vstools import ( - ColorRange, CustomStrEnum, DependencyNotFoundError, DitherType, FrameRangeN, FrameRangesN, InvalidColorFamilyError, + ColorRange, CustomStrEnum, DependencyNotFoundError, FrameRangeN, FrameRangesN, InvalidColorFamilyError, KwargsT, LengthMismatchError, Matrix, MatrixT, UnsupportedVideoFormatError, check_variable, core, depth, fallback, get_depth, get_nvidia_version, get_y, join, replace_ranges, vs ) @@ -115,7 +115,7 @@ def _norm_str_clip(str_clip: vs.VideoNode) -> vs.VideoNode: targ_format = clip.format.replace(subsampling_w=0, subsampling_h=0) if i444 else clip.format - clip_upsample = depth(clip, 16 if fp16 else 32, vs.FLOAT, dither_type=DitherType.ERROR_DIFFUSION) + clip_upsample = depth(clip, 16 if fp16 else 32, vs.FLOAT) if is_rgb or is_gray: clip_rgb = clip_upsample diff --git a/vsdenoise/prefilters.py b/vsdenoise/prefilters.py index c4d1e13..9f635ec 100644 --- a/vsdenoise/prefilters.py +++ b/vsdenoise/prefilters.py @@ -14,7 +14,7 @@ from vsmasktools import retinex from vsrgtools import bilateral, blur, gauss_blur, min_blur, replace_low_frequencies from vstools import ( - MISSING, ColorRange, ConvMode, CustomEnum, CustomIntEnum, CustomRuntimeError, DitherType, MissingT, PlanesT, + MISSING, ColorRange, ConvMode, CustomEnum, CustomIntEnum, CustomRuntimeError, MissingT, PlanesT, SingleOrArr, SingleOrArrOpt, check_variable, clamp, core, depth, disallow_variable_format, disallow_variable_resolution, get_depth, get_neutral_value, get_peak_value, get_y, join, normalize_planes, normalize_seq, scale_8bit, scale_value, split, vs @@ -884,9 +884,7 @@ def prefilter_to_full_range(pref: vs.VideoNode, range_conversion: float, planes: elif range_conversion > 0.0: pref_full = retinex(work_clip, upper_thr=range_conversion, fast=False) else: - pref_full = depth( - work_clip, bits, range_out=ColorRange.FULL, range_in=ColorRange.LIMITED, dither_type=DitherType.NONE - ) + pref_full = depth(work_clip, bits, range_out=ColorRange.FULL, range_in=ColorRange.LIMITED) if chroma: return join(pref_full, *chroma, family=pref.format.color_family)