mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc/takdsp: R-V V decorrelate_sm
C908: decorrelate_sm_c: 130.0 decorrelate_sm_rvv_i32: 43.2 Signed-off-by: Rémi Denis-Courmont <remi@remlab.net> (with minor changes)
This commit is contained in:
parent
0c6203c97a
commit
3d39b8d4e7
@ -27,6 +27,7 @@
|
||||
|
||||
void ff_decorrelate_ls_rvv(const int32_t *p1, int32_t *p2, int length);
|
||||
void ff_decorrelate_sr_rvv(int32_t *p1, const int32_t *p2, int length);
|
||||
void ff_decorrelate_sm_rvv(int32_t *p1, int32_t *p2, int length);
|
||||
|
||||
av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp)
|
||||
{
|
||||
@ -36,6 +37,7 @@ av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp)
|
||||
if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
|
||||
dsp->decorrelate_ls = ff_decorrelate_ls_rvv;
|
||||
dsp->decorrelate_sr = ff_decorrelate_sr_rvv;
|
||||
dsp->decorrelate_sm = ff_decorrelate_sm_rvv;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -47,3 +47,21 @@ func ff_decorrelate_sr_rvv, zve32x
|
||||
bnez a2, 1b
|
||||
ret
|
||||
endfunc
|
||||
|
||||
func ff_decorrelate_sm_rvv, zve32x
|
||||
1:
|
||||
vsetvli t0, a2, e32, m8, ta, ma
|
||||
vle32.v v8, (a1)
|
||||
sub a2, a2, t0
|
||||
vle32.v v0, (a0)
|
||||
vsra.vi v16, v8, 1
|
||||
vsub.vv v0, v0, v16
|
||||
vse32.v v0, (a0)
|
||||
sh2add a0, t0, a0
|
||||
vadd.vv v8, v0, v8
|
||||
vse32.v v8, (a1)
|
||||
sh2add a1, t0, a1
|
||||
bnez a2, 1b
|
||||
|
||||
ret
|
||||
endfunc
|
||||
|
Loading…
Reference in New Issue
Block a user