Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/math/fft/fft_16_hifi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ void fft_execute_16(struct fft_plan *plan, bool ifft)
ae_valign outu = AE_ZALIGN64();
int depth, top, bottom, index;
int i, j, k, m, n;
int size = plan->size;
int len = plan->len;
int size, len;

if (!plan || !plan->bit_reverse_idx)
return;

size = plan->size;
len = plan->len;

outb = plan->outb16;
if (!plan->inb16 || !outb)
return;
Expand Down
15 changes: 10 additions & 5 deletions src/math/fft/fft_32_hifi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,29 @@ void fft_execute_32(struct fft_plan *plan, bool ifft)
ae_int32x2 sample1;
ae_int32x2 sample2;
ae_int32x2 tw;
ae_int32x2 *inx = (ae_int32x2 *)plan->inb32;
ae_int32x2 *outx = (ae_int32x2 *)plan->outb32;
ae_int32x2 *inx;
ae_int32x2 *outx;
ae_int32x2 *top_ptr;
ae_int32x2 *bot_ptr;
uint16_t *idx = &plan->bit_reverse_idx[0];
uint16_t *idx;
const int32_t *tw_r;
const int32_t *tw_i;
int depth, i;
int j, k, m, n;
int size = plan->size;
int len = plan->len;
int size, len;

if (!plan || !plan->bit_reverse_idx)
return;

if (!plan->inb32 || !plan->outb32)
return;

inx = (ae_int32x2 *)plan->inb32;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singalsu do we also check if these are vector aligned somewhere ?

outx = (ae_int32x2 *)plan->outb32;
idx = &plan->bit_reverse_idx[0];
size = plan->size;
len = plan->len;

/* step 1: re-arrange input in bit reverse order, and shrink the level to avoid overflow */
if (ifft) {
/* convert to complex conjugate for ifft */
Expand Down
Loading