Skip to content

filters: fix polar scaler anti-ringing

bjin requested to merge bjin/libplacebo:fix-polar-ar into master

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:

  1. ww.x <= ww.y holds mathmatically with all filter weights (w) being positive.
  2. clamp(x, a, b) where a > b is not UB, it's computed as min(max(x, a), b).

Closes: https://github.com/mpv-player/mpv/issues/12403

Edited by bjin

Merge request reports

Loading