Skip to content

Commit a543f3b

Browse files
committed
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. 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 678de87 commit a543f3b

6 files changed

Lines changed: 489 additions & 385 deletions

File tree

src/audio/stft_process/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ else()
88
add_local_sources(sof stft_process_setup.c)
99
add_local_sources(sof stft_process_common.c)
1010
add_local_sources(sof stft_process-generic.c)
11+
add_local_sources(sof stft_process-hifi3.c)
1112

1213
if(CONFIG_IPC_MAJOR_4)
1314
add_local_sources(sof stft_process-ipc4.c)

src/audio/stft_process/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3+
rsource "Kconfig.simd"
4+
35
config COMP_STFT_PROCESS
46
tristate "STFT processing component"
57
default n
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
comment "STFT Process optimization level select"
4+
5+
choice "COMP_STFT_PROCESS_SIMD_LEVEL_SELECT"
6+
prompt "choose which SIMD level used for STFT Process module"
7+
depends on COMP_STFT_PROCESS
8+
default COMP_STFT_PROCESS_HIFI_MAX
9+
10+
config COMP_STFT_PROCESS_HIFI_MAX
11+
prompt "SIMD will be selected by toolchain pre-defined header"
12+
bool
13+
help
14+
When this is selected, the optimization level will be
15+
determined by the toolchain pre-defined macros in the
16+
core isa header file.
17+
18+
config COMP_STFT_PROCESS_HIFI_3
19+
prompt "Choose HIFI3 intrinsic optimized STFT Process module"
20+
bool
21+
help
22+
This option is used to build HIFI3 intrinsic optimized
23+
STFT Process code.
24+
25+
config COMP_STFT_PROCESS_HIFI_NONE
26+
prompt "Choose generic C STFT Process module, no HIFI SIMD involved"
27+
bool
28+
help
29+
This option is used to build STFT Process
30+
with generic C code.
31+
endchoice

0 commit comments

Comments
 (0)