From 329d889f4490fc34e92ba098ac650b6e8145e010 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Mon, 10 Jun 2024 12:06:56 +0300 Subject: [PATCH] Math: FFT: Rename setup script function with sof prefix The script function name and help is updated. A README.md is added how to use it. Signed-off-by: Seppo Ingalsuo --- src/math/fft/tune/README.md | 9 +++++++++ src/math/fft/tune/sof_export_twiddle.m | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 src/math/fft/tune/README.md diff --git a/src/math/fft/tune/README.md b/src/math/fft/tune/README.md new file mode 100644 index 000000000000..d0ff5781890e --- /dev/null +++ b/src/math/fft/tune/README.md @@ -0,0 +1,9 @@ +# Export FFT twiddle factors data + +To generate the twiddle factors headers for FFT max size of 1024 +(current assumption) run these shell commands: + +octave -q --eval "sof_export_twiddle(32, 'twiddle_32.h', 1024);" +octave -q --eval "sof_export_twiddle(16, 'twiddle_16.h', 1024);" +cp twiddle_32.h ../../../include/sof/audio/coefficients/fft/ +cp twiddle_16.h ../../../include/sof/audio/coefficients/fft/ diff --git a/src/math/fft/tune/sof_export_twiddle.m b/src/math/fft/tune/sof_export_twiddle.m index f0643b0fac82..48bf069e391f 100644 --- a/src/math/fft/tune/sof_export_twiddle.m +++ b/src/math/fft/tune/sof_export_twiddle.m @@ -1,4 +1,4 @@ -% export_twiddle(bits, fn, fft_size_max) +% sof_export_twiddle(bits, fn, fft_size_max) % % Input % bits - Number of bits for data, 16 or 32 @@ -9,7 +9,7 @@ % % Copyright (c) 2022, Intel Corporation. All rights reserved. -function export_twiddle(bits, fn, fft_size_max) +function sof_export_twiddle(bits, fn, fft_size_max) if nargin < 2 fn = 'twiddle.h';