[FFmpeg-devel] [PATCH] lavc/aacencdsp: fix rounding in R-V V quantize_bands

Rémi Denis-Courmont remi at remlab.net
Sat Jun 8 15:05:19 EEST 2024


We need to round toward zero here.
---
 libavcodec/riscv/aacencdsp_rvv.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/riscv/aacencdsp_rvv.S b/libavcodec/riscv/aacencdsp_rvv.S
index ddb4155398..21e66a77ae 100644
--- a/libavcodec/riscv/aacencdsp_rvv.S
+++ b/libavcodec/riscv/aacencdsp_rvv.S
@@ -59,7 +59,7 @@ NOHWF   fmv.w.x     fa1, a7
         .if \signed
         vfsgnjx.vv  v16, v16, v8
         .endif
-        vfcvt.x.f.v v16, v16
+        vfcvt.rtz.x.f.v v16, v16
         vse32.v     v16, (a0)
         sh2add      a0, t0, a0
         bnez        a3, .L\signed
-- 
2.45.1



More information about the ffmpeg-devel mailing list