Commit 0ea5836
Audio: STFT Process: Add Xtensa HiFi function versions
This patch adds to stft_process-hifi3.c the HiFi3 versions of
higher complexity functions stft_process_apply_window() and
stft_process_overlap_add_ifft_buffer().
The functions with no clear HiFi optimization benefit are moved
from stft_process-generic.c to stft_process_common.c. Those
functions move data with practically no processing to samples.
The stft_process_setup() function is changed to allocate buffers
with mod_balloc_align() to ensure a 32-bit sample pair or complex
number is aligned for 64 bit xtensa SIMD. This patch also adds
checks to other parameters to ensure the STFT is set up in a
way that can be executed.
The patch also fixes a too large allocation in setup. The window
function buffer allocation is common for all channels. It should
not be multiplied by channels count.
This change saves 17 MCPS (from 63 MCPS to 46 MCPS). The test
was done with script run:
scripts/rebuild-testbench.sh -p mtl
scripts/sof-testbench-helper.sh -x -m stft_process_1024_256_ \
-p profile-stft_process.txt
The above STFT used FFT length 1024 with hop 256.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent 5d04374 commit 0ea5836
8 files changed
Lines changed: 628 additions & 398 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments