History

lavc/takdsp: R-V V decorrelate_sm

C908: decorrelate_sm_c: 130.0 decorrelate_sm_rvv_i32: 43.2

sunyuechi committed 2 years ago

Commit 3d39b8d1 parent 0c6203c2 files · +20 −0Browse files

Unified · Split

2 files
  1. libavcodec/riscv/takdsp_init.c +2 −0
  2. libavcodec/riscv/takdsp_rvv.S +18 −0
libavcodec/riscv/takdsp_init.c+2−0
@@ -27,6 +27,7 @@ · 26 unmodified lines
27 27
28void ff_decorrelate_ls_rvv(const int32_t *p1, int32_t *p2, int length);28void ff_decorrelate_ls_rvv(const int32_t *p1, int32_t *p2, int length);
29void ff_decorrelate_sr_rvv(int32_t *p1, const int32_t *p2, int length);29void ff_decorrelate_sr_rvv(int32_t *p1, const int32_t *p2, int length);
30void ff_decorrelate_sm_rvv(int32_t *p1, int32_t *p2, int length);
30 31
31av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp)32av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp)
32{33{
@@ -36,6 +37,7 @@ av_cold void ff_takdsp_init_riscv(TAKDSPContext *dsp) · 3 unmodified lines
36 if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {37 if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
37 dsp->decorrelate_ls = ff_decorrelate_ls_rvv;38 dsp->decorrelate_ls = ff_decorrelate_ls_rvv;
38 dsp->decorrelate_sr = ff_decorrelate_sr_rvv;39 dsp->decorrelate_sr = ff_decorrelate_sr_rvv;
40 dsp->decorrelate_sm = ff_decorrelate_sm_rvv;
39 }41 }
40#endif42#endif
41}43}
libavcodec/riscv/takdsp_rvv.S+18−0
@@ -47,3 +47,21 @@ func ff_decorrelate_sr_rvv, zve32x · 46 unmodified lines
47 bnez a2, 1b47 bnez a2, 1b
48 ret48 ret
49endfunc49endfunc
50
51func ff_decorrelate_sm_rvv, zve32x
521:
53 vsetvli t0, a2, e32, m8, ta, ma
54 vle32.v v8, (a1)
55 sub a2, a2, t0
56 vle32.v v0, (a0)
57 vsra.vi v16, v8, 1
58 vsub.vv v0, v0, v16
59 vse32.v v0, (a0)
60 sh2add a0, t0, a0
61 vadd.vv v8, v0, v8
62 vse32.v v8, (a1)
63 sh2add a1, t0, a1
64 bnez a2, 1b
65
66 ret
67endfunc

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t