Skip to content

Commit

Permalink
based_aa: Remove else, rename vars, check callable
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE committed Sep 24, 2024
1 parent 6a8b59b commit 85c0cb4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vsaa/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,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 = downscaler.scale(aa, func.work_clip.width, func.work_clip.height)
aa_out = downscaler.scale(aa, func.work_clip.width, func.work_clip.height)

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

if pskip:
no_aa = downscaler.scale(ss, func.work_clip.width, func.work_clip.height)
Expand Down

0 comments on commit 85c0cb4

Please sign in to comment.