filters: fix polar scaler anti-ringing
Positive filter weights can't be guaranteed by ar_radius
, due to LUT
sampling error. Add an explicit check to avoid negative filter weights.
Also remove the now redundant clamping safety check:
-
ww.x <= ww.y
holds mathmatically with all filter weights (w
) being positive. -
clamp(x, a, b)
wherea > b
is not UB, it's computed asmin(max(x, a), b)
.
Edited by bjin