Skip to content

Commit

Permalink
based_aa: Mask AA areas affected by antialiaser (#22)
Browse files Browse the repository at this point in the history
* based_aa: Quality improvement

* Swap masking order
  • Loading branch information
emotion3459 authored Sep 5, 2024
1 parent 3a4b0a2 commit dc79f32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vsaa/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ def based_aa(
raise CustomValueError('Wrong show_mask value! It can be one of 1 (True), 2, 3', based_aa)

aa = downscaler.scale(aa_x, func.work_clip.width, func.work_clip.height)
no_aa = downscaler.scale(ss_y.std.Transpose(), func.work_clip.width, func.work_clip.height)

aa_merge = func.work_clip.std.MaskedMerge(aa, lpmask)
aa_merge = norm_expr([func.work_clip, aa, no_aa], "y z = x y ?")
aa_merge = func.work_clip.std.MaskedMerge(aa_merge, lpmask)

return func.return_clip(aa_merge)

0 comments on commit dc79f32

Please sign in to comment.