This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit a583639bf03c55240ba79e340dd1ddcec4831bac
Author:     Rémi Denis-Courmont <[email protected]>
AuthorDate: Sun Dec 21 11:58:08 2025 +0200
Commit:     Rémi Denis-Courmont <[email protected]>
CommitDate: Mon Dec 22 18:55:13 2025 +0200

    lavu/fixed_dsp: fix scalarproduct on riscv32
    
    On riscv32, the result must be narrowed from 63 to 32 bit before being
    moved to the scalar side.
---
 libavutil/riscv/fixed_dsp_rvv.S | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavutil/riscv/fixed_dsp_rvv.S b/libavutil/riscv/fixed_dsp_rvv.S
index e60ee8cad5..9424470bad 100644
--- a/libavutil/riscv/fixed_dsp_rvv.S
+++ b/libavutil/riscv/fixed_dsp_rvv.S
@@ -197,8 +197,14 @@ func ff_scalarproduct_fixed_rvv, zve64x, zba
 
         vsetvli t0, zero, e64, m8, ta, ma
         vredsum.vs v0, v8, v0
+#if __riscv_xlen >= 64
         vmv.x.s a0, v0
         srai    a0, a0, 31
+#else
+        vsetivli    zero, 1, e32, mf2, ta, ma
+        vnsra.wi    v1, v0, 31
+        vmv.x.s a0, v1
+#endif
         ret
 endfunc
 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to