aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/riscv/lpc_init.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc/riscv: depend on RVB and simplify accordinglyRémi Denis-Courmont2024-08-051-3/+2
| | | | | | | | | | There is no known (real) hardware with V and without the complete B extension. B was indeed required in the RISC-V application profile from 2022, earlier than V. There should not be any relevant hardware in the future either. In practice, different R-V Vector optimisations in FFmpeg already depend on every constituent of the B extension anyhow, so it would not work well.
* lavc/lpc: optimise RVV vector type for compute_autocorrRémi Denis-Courmont2024-05-291-1/+2
| | | | | | | On SpacemiT X60 (with len == 4000): autocorr_10_c: 2303.7 autocorr_10_rvv_f64: 1411.5 (before) autocorr_10_rvv_f64: 842.2 (after)
* lavc/lpc: fix off-by-one in R-V V compute_autocorrRémi Denis-Courmont2024-05-281-1/+1
|
* lavc/lpc: R-V V compute_autocorrRémi Denis-Courmont2023-12-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop iterates over the length of the vector, not the order. This is to avoid reloading the same data for each lag value. However this means the loop only works if the maximum order is no larger than VLENB. The loop is roughly equivalent to: for (size_t j = 0; j < lag; j++) autoc[j] = 1.; while (len > lag) { for (ptrdiff_t j = 0; j < lag; j++) autoc[j] += data[j] * *data; data++; len--; } while (len > 0) { for (ptrdiff_t j = 0; j < len; j++) autoc[j] += data[j] * *data; data++; len--; } Since register pressure is only at 50%, it should be possible to implement the same loop for order up to 2xVLENB. But this is left for future work. Performance numbers are all over the place from ~1.25x to ~4x speedups, but at least they are always noticeably better than nothing.
* lavc/lpc: R-V V apply_welch_windowRémi Denis-Courmont2023-12-111-0/+37
apply_welch_window_even_c: 617.5 apply_welch_window_even_rvv_f64: 235.0 apply_welch_window_odd_c: 709.0 apply_welch_window_odd_rvv_f64: 256.5