Skip to content

Commit

Permalink
Adapt to new vskernels api
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Dec 14, 2023
1 parent e822da4 commit 2c068f0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vsaa/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from .enums import AADirection

__all__ = [
__all__ = __abstract__ = [
'SuperSampler',
'SingleRater', 'DoubleRater',
'Antialiaser'
Expand Down
2 changes: 2 additions & 0 deletions vsaa/antialiasers/eedi2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def full_interpolate(self, clip: vs.VideoNode, double_y: bool, double_x: bool, *

_shift = -0.5

_static_kernel_radius = 2


class Eedi2SS(EEDI2, SuperSampler):
...
Expand Down
6 changes: 5 additions & 1 deletion vsaa/antialiasers/eedi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import field as dc_field
from typing import Any, Literal

from vstools import CustomValueError, core, vs
from vstools import CustomValueError, core, inject_self, vs

from ..abstract import Antialiaser, DoubleRater, SingleRater, SuperSampler, _Antialiaser
from . import nnedi3
Expand Down Expand Up @@ -91,6 +91,10 @@ def interpolate(self, clip: vs.VideoNode, double_y: bool, **kwargs: Any) -> vs.V

_shift = 0.5

@inject_self.property
def kernel_radius(self) -> int:
return self.nrad


class Eedi3SS(EEDI3, SuperSampler):
...
Expand Down
14 changes: 13 additions & 1 deletion vsaa/antialiasers/nnedi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from typing import Any

from vstools import core, vs
from vstools import core, inject_self, vs

from ..abstract import Antialiaser, DoubleRater, SingleRater, SuperSampler, _Antialiaser, _FullInterpolate

Expand Down Expand Up @@ -63,6 +63,18 @@ def full_interpolate(self, clip: vs.VideoNode, double_y: bool, double_x: bool, *

_shift = 0.5

@inject_self.property
def kernel_radius(self) -> int:
match self.nsize:
case 1 | 5:
return 16
case 2 | 6:
return 32
case 3:
return 48
case _:
return 8


class Nnedi3SS(NNEDI3, SuperSampler):
...
Expand Down
2 changes: 2 additions & 0 deletions vsaa/antialiasers/sangnom.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def interpolate(self, clip: vs.VideoNode, double_y: bool, **kwargs: Any) -> vs.V

_shift = -0.5

_static_kernel_radius = 2


class SangNomSS(SANGNOM, SuperSampler):
...
Expand Down

0 comments on commit 2c068f0

Please sign in to comment.