diff mbox series

[FFmpeg-devel] lavc/flacdsp: fix sign extension in R-V V wasted33

Message ID 20240606192254.43845-1-remi@remlab.net
State Accepted
Commit c3dbbb316ee44b1685b6437756a23a545fb31fb1
Headers show
Series [FFmpeg-devel] lavc/flacdsp: fix sign extension in R-V V wasted33 | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont June 6, 2024, 7:22 p.m. UTC
We need to use either VWCVT.X.X.V or VSEXT.VF2. The later is preferable
to avoid changing VTYPE.
---
 libavcodec/riscv/flacdsp_rvv.S | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/riscv/flacdsp_rvv.S b/libavcodec/riscv/flacdsp_rvv.S
index ea42f8bea4..1724aee9d7 100644
--- a/libavcodec/riscv/flacdsp_rvv.S
+++ b/libavcodec/riscv/flacdsp_rvv.S
@@ -163,12 +163,11 @@  func ff_flac_wasted33_rvv, zve64x
         ret
 
 2:      // Pessimistic case: wasted >= 32
-        vsetvli      t0, a3, e32, m4, ta, ma
+        vsetvli      t0, a3, e64, m8, ta, ma
         vle32.v      v8, (a1)
         sub          a3, a3, t0
-        vwcvtu.x.x.v v16, v8
+        vsext.vf2    v16, v8
         sh2add       a1, t0, a1
-        vsetvli      zero, zero, e64, m8, ta, ma
         vsll.vx      v16, v16, a2
         vse64.v      v16, (a0)
         sh3add       a0, t0, a0