History

Revert "lavc/sbrdsp: R-V V neg_odd_64"

While this function can easily be written with vectors, it just fails to get any performance improvement. For reference, this is a simpler loop-free implementation that does get better performance than the current one depending on hardware, but still more or less the same metrics as the C code: func ff_sbr_neg_odd_64_rvv, zve64x li a1, 32 addi a0, a0, 7 li t0, 8 vsetvli zero, a1, e8, m2, ta, ma li t1, 0x80 vlse8.v v8, (a0), t0 vxor.vx v8, v8, t1 vsse8.v v8, (a0), t0 ret endfunc This reverts commit d06fd18f8f4c6a81ef94cbb600620d83ad51269d.

Rémi Denis-Courmont committed 2 years ago

Commit 7591eb41 parent d452db82 files · +0 −22Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/riscv/sbrdsp_init.c +0 −5
  2. libavcodec/riscv/sbrdsp_rvv.S +0 −17
libavcodec/riscv/sbrdsp_init.c+0−5
@@ -26,7 +26,6 @@ · 25 unmodified lines
2626
2727 void ff_sbr_sum64x5_rvv(float *z);
2828 float ff_sbr_sum_square_rvv(float (*x)[2], int n);
29−void ff_sbr_neg_odd_64_rvv(float *x);
3029 void ff_sbr_autocorrelate_rvv(const float x[40][2], float phi[3][2][2]);
3130 void ff_sbr_hf_gen_rvv(float (*X_high)[2], const float (*X_low)[2],
3231 const float alpha0[2], const float alpha1[2],
@@ -64,9 +63,5 @@ av_cold void ff_sbrdsp_init_riscv(SBRDSPContext *c) · 31 unmodified lines
6463 }
6564 c->autocorrelate = ff_sbr_autocorrelate_rvv;
6665 }
67−#if __riscv_xlen >= 64
68− if ((flags & AV_CPU_FLAG_RVV_I64) && (flags & AV_CPU_FLAG_RVB_ADDR))
69− c->neg_odd_64 = ff_sbr_neg_odd_64_rvv;
70−#endif
7166 #endif
7267 }
libavcodec/riscv/sbrdsp_rvv.S+0−17
@@ -68,23 +68,6 @@ NOHWF fmv.x.w a0, fa0 · 67 unmodified lines
6868 ret
6969 endfunc
7070
71−#if __riscv_xlen >= 64
72−func ff_sbr_neg_odd_64_rvv, zve64x
73− li a1, 32
74− li t1, 1 << 63
75−1:
76− vsetvli t0, a1, e64, m8, ta, ma
77− vle64.v v8, (a0)
78− sub a1, a1, t0
79− vxor.vx v8, v8, t1
80− vse64.v v8, (a0)
81− sh3add a0, t0, a0
82− bnez t0, 1b
83−
84− ret
85−endfunc
86−#endif
87−
8871 func ff_sbr_autocorrelate_rvv, zve32f
8972 vsetvli t0, zero, e32, m4, ta, ma
9073 vmv.v.x v0, zero

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