mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 13:28:17 +00:00
The biweight sum (src*weights + dst*weightd + offset) must saturate to S16 after the dot product is complete, like the x86 SSE2 code does (paddsw dot product first, then paddsw offset). The RVV code added the offset first with a wrapping accumulate, so large-magnitude sums wrapped instead of saturating. Use vwmulsu.vv followed by vwmaccsu.vx and vsadd.vx to handle saturation in the correct order. This fixes bi-weight checkasm test for RISCV Signed-off-by: Zuxy Meng <zuxy.meng@gmail.com>