Skip to content

Commit

Permalink
DeHalo_alpha: Fix 32-bit float support
Browse files Browse the repository at this point in the history
  • Loading branch information
HolyWu committed Jul 6, 2020
1 parent 54b8a25 commit 7a4f5c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion havsfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def DeHalo_alpha(clp, rx=2.0, ry=2.0, darkstr=1.0, brightstr=1.0, lowsens=50, hi
halos = clp.resize.Bicubic(m4(ox / rx), m4(oy / ry), filter_param_a=1/3, filter_param_b=1/3).resize.Bicubic(ox, oy, filter_param_a=1, filter_param_b=0)
are = core.std.Expr([clp.std.Maximum(), clp.std.Minimum()], expr=['x y -'])
ugly = core.std.Expr([halos.std.Maximum(), halos.std.Minimum()], expr=['x y -'])
expr = f'y x - y 0.000001 + / {peak} * {scale(lowsens, peak)} - y {scale(256, peak)} + {scale(512, peak)} / {highsens / 100} + *'
expr = f'y x - y y 0 = + / {peak} * {scale(lowsens, peak)} - y {scale(256, peak)} + {scale(512, peak)} / {highsens / 100} + *'
so = core.std.Expr([ugly, are], expr=[expr])
lets = core.std.MaskedMerge(halos, clp, so)
if ss <= 1:
Expand Down

0 comments on commit 7a4f5c7

Please sign in to comment.