Skip to content

Commit 562bdcc

Browse files
singalsulgirdwood
authored andcommitted
Math: FFT: Reduce bit reverse lookup table size
The table does not need to be 32 bit since max. FFT size is 1024. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent af26534 commit 562bdcc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/include/sof/math/fft.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct icomplex32 {
2121
struct fft_plan {
2222
uint32_t size; /* fft size */
2323
uint32_t len; /* fft length in exponent of 2 */
24-
uint32_t *bit_reverse_idx; /* pointer to bit reverse index array */
24+
uint16_t *bit_reverse_idx; /* pointer to bit reverse index array */
2525
struct icomplex32 *inb; /* pointer to input integer complex buffer */
2626
struct icomplex32 *outb;/* pointer to output integer complex buffer */
2727
};

src/math/fft/fft.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct fft_plan *fft_plan_new(struct icomplex32 *inb, struct icomplex32 *outb, u
3636
plan->len = len;
3737

3838
plan->bit_reverse_idx = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM,
39-
plan->size * sizeof(uint32_t));
39+
plan->size * sizeof(uint16_t));
4040
if (!plan->bit_reverse_idx) {
4141
rfree(plan);
4242
return NULL;

0 commit comments

Comments
 (0)