Skip to content

Commit

Permalink
Update Nnedi3.interpolate to support sneedif
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Jun 25, 2023
1 parent 3933f22 commit 5ef4cdb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions vsaa/antialiasers/nnedi3.py
Expand Up @@ -32,11 +32,16 @@ def get_aa_args(self, clip: vs.VideoNode, **kwargs: Any) -> dict[str, Any]:
return dict(nsize=self.nsize, nns=self.nns, qual=self.qual, etype=self.etype, pscrn=pscrn)

def interpolate(self, clip: vs.VideoNode, double_y: bool, **kwargs: Any) -> vs.VideoNode:
interpolated: vs.VideoNode = getattr(
core, 'znedi3' if hasattr(core, 'znedi3') else 'nnedi3'
).nnedi3(
clip, self.field, double_y or not self.drop_fields, **kwargs
)
if not (hasattr(core, 'znedi3') or hasattr(core, 'nnedi3')):
interpolated: vs.VideoNode = self.full_interpolate(
clip, double_y or not self.drop_fields, False, **kwargs
)
else:
interpolated = getattr(
core, 'znedi3' if hasattr(core, 'znedi3') else 'nnedi3'
).nnedi3(
clip, self.field, double_y or not self.drop_fields, **kwargs
)

return self.shift_interpolate(clip, interpolated, double_y, **kwargs)

Expand Down

0 comments on commit 5ef4cdb

Please sign in to comment.