From 3a4b0a27d4e705300c035575d3374cca7a021a70 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Wed, 4 Sep 2024 05:14:17 -0700 Subject: [PATCH] Eedi3: Set opt=3 by default if `mclip` is used (#21) * Eedi3: Add opt=3 if `mclip` * Eedi3: Make opt check an elif --- vsaa/antialiasers/eedi3.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vsaa/antialiasers/eedi3.py b/vsaa/antialiasers/eedi3.py index d4139d7..e0919ec 100644 --- a/vsaa/antialiasers/eedi3.py +++ b/vsaa/antialiasers/eedi3.py @@ -29,6 +29,7 @@ class EEDI3(_Antialiaser): vthresh1: float = 64.0 vthresh2: float = 4.0 + opt: int = 0 device: int = -1 opencl: bool = dc_field(default=False, kw_only=True) @@ -58,6 +59,9 @@ def get_aa_args(self, clip: vs.VideoNode, **kwargs: Any) -> dict[str, Any]: if self.opencl: args |= dict(device=self.device) + elif self.mclip is not None or kwargs.get('mclip'): + # opt=3 appears to always give reliable speed boosts if mclip is used. + args |= dict(opt=kwargs.get('opt', self.opt) or 3) return args