Skip to content

Commit

Permalink
based_aa: Fix var name error, add False check
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Sep 24, 2024
1 parent 2679453 commit 9c3a675
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vsaa/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,14 @@ def based_aa(
mclip = Bilinear.scale(mask, aaw, aah) if mask else None

aa = Eedi3(mclip=mclip, sclip_aa=True).aa(ss, **eedi3_kwargs | kwargs)
aa_out = downscaler.scale(aa, func.work_clip.width, func.work_clip.height)
aa = downscaler.scale(aa, func.work_clip.width, func.work_clip.height)

if postfilter is None:
aa_out = MeanMode.MEDIAN(aa_out, func.work_clip, bilateral(aa))
aa_out = MeanMode.MEDIAN(aa, func.work_clip, bilateral(aa))
elif callable(postfilter):
aa_out = postfilter(aa_out)
aa_out = postfilter(aa)
elif postfilter is False:
aa_out = aa
else:
raise CustomValueError('Invalid postfilter!', based_aa, postfilter)

Expand Down

0 comments on commit 9c3a675

Please sign in to comment.