diff --git a/vsaa/funcs.py b/vsaa/funcs.py index f97592b..f3eff8f 100644 --- a/vsaa/funcs.py +++ b/vsaa/funcs.py @@ -9,8 +9,9 @@ from vsmasktools import EdgeDetect, EdgeDetectT, Prewitt, ScharrTCanny from vsrgtools import MeanMode, RepairMode, box_blur, contrasharpening_median, repair, unsharp_masked from vstools import ( - MISSING, CustomOverflowError, CustomRuntimeError, 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, CustomOverflowError, 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 ) from .abstract import Antialiaser, SingleRater @@ -402,6 +403,9 @@ def based_aa( and max(aah, func.work_clip.height) % min(aah, func.work_clip.height) == 0 ) else Catrom + if rfactor <= 0.0: + raise CustomValueError('rfactor must be greater than 0!', based_aa, rfactor) + if rfactor < 1.0: downscaler, supersampler = supersampler, downscaler