Skip to content

Commit

Permalink
Eedi3: Add opt=3 if mclip
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Sep 3, 2024
1 parent 45a0224 commit a89805e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vsaa/antialiasers/eedi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -59,6 +60,10 @@ def get_aa_args(self, clip: vs.VideoNode, **kwargs: Any) -> dict[str, Any]:
if self.opencl:
args |= dict(device=self.device)

# opt=3 appears to always give reliable speed boosts if mclip is used.
if self.mclip is not None or kwargs.get('mclip'):
args |= dict(opt=kwargs.get('opt', self.opt) or 3)

return args

def interpolate(self, clip: vs.VideoNode, double_y: bool, **kwargs: Any) -> vs.VideoNode:
Expand Down

0 comments on commit a89805e

Please sign in to comment.