Skip to content

Commit

Permalink
based_aa: Replace deprecated scale_8bit
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Oct 4, 2024
1 parent dd6a9e0 commit 794428c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vsaa/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from vsmasktools import EdgeDetect, EdgeDetectT, Prewitt, ScharrTCanny
from vsrgtools import MeanMode, RepairMode, bilateral, box_blur, contrasharpening_median, repair, unsharp_masked
from vstools import (
MISSING, CustomRuntimeError, CustomValueError, FormatsMismatchError, FunctionUtil, KwargsT, MissingT, PlanesT,
VSFunction, get_h, get_peak_value, get_w, get_y, join, normalize_planes, plane, scale_8bit, scale_value, split, vs
MISSING, ColorRange, CustomRuntimeError, CustomValueError, FormatsMismatchError, FunctionUtil, KwargsT, MissingT,
PlanesT, VSFunction, get_h, get_peak_value, get_w, get_y, join, normalize_planes, plane, scale_value, split, vs
)

from .abstract import Antialiaser, SingleRater
Expand Down Expand Up @@ -423,7 +423,7 @@ def based_aa(
if mask and not isinstance(mask, vs.VideoNode):
mask = EdgeDetect.ensure_obj(mask, based_aa)
mask = mask.edgemask(plane(func.work_clip, 0))
mask = mask.std.Binarize(scale_8bit(func.work_clip, min(mask_thr, 255)))
mask = mask.std.Binarize(scale_value(min(mask_thr, 255), 8, func.work_clip, ColorRange.FULL))
mask = box_blur(mask.std.Maximum()).std.Limiter()

if show_mask:
Expand Down

0 comments on commit 794428c

Please sign in to comment.