| 3534 | } |
| 3535 | |
| 3536 | static void riffts1(SPFLOAT * ioptr, int M, SPFLOAT * Utbl, int16_t * BRLow) |
| 3537 | { |
| 3538 | /* Compute in-place real ifft on the rows of the input array */ |
| 3539 | /* data order as from rffts1 */ |
| 3540 | /* INPUTS */ |
| 3541 | /* *ioptr = input data array in the following order */ |
| 3542 | /* M = log2 of fft size */ |
| 3543 | /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), */ |
| 3544 | /* Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ |
| 3545 | /* *Utbl = cosine table */ |
| 3546 | /* *BRLow = bit reversed counter table */ |
| 3547 | /* OUTPUTS */ |
| 3548 | /* *ioptr = real output data array */ |
| 3549 | |
| 3550 | SPFLOAT scale; |
| 3551 | int StageCnt; |
| 3552 | int NDiffU; |
| 3553 | |
| 3554 | scale = (SPFLOAT)(1.0 / (double) ((int) POW2(M))); |
| 3555 | M = M - 1; |
| 3556 | switch (M) |
| 3557 | { |
| 3558 | case -1: |
| 3559 | break; |
| 3560 | case 0: |
| 3561 | rifft1pt(ioptr, scale); /* a 2 pt fft */ |
| 3562 | break; |
| 3563 | case 1: |
| 3564 | rifft2pt(ioptr, scale); /* a 4 pt fft */ |
| 3565 | break; |
| 3566 | case 2: |
| 3567 | rifft4pt(ioptr, scale); /* an 8 pt fft */ |
| 3568 | break; |
| 3569 | case 3: |
| 3570 | rifft8pt(ioptr, scale); /* a 16 pt fft */ |
| 3571 | break; |
| 3572 | default: |
| 3573 | ifrstage(ioptr, M + 1, Utbl); |
| 3574 | /* bit reverse and first radix 2 stage */ |
| 3575 | scbitrevR2(ioptr, M, BRLow, scale); |
| 3576 | StageCnt = (M - 1) / 3; /* number of radix 8 stages */ |
| 3577 | NDiffU = 2; /* one radix 2 stage already complete */ |
| 3578 | if ((M - 1 - (StageCnt * 3)) == 1) |
| 3579 | { |
| 3580 | ibfR2(ioptr, M, NDiffU); /* 1 radix 2 stage */ |
| 3581 | NDiffU *= 2; |
| 3582 | } |
| 3583 | if ((M - 1 - (StageCnt * 3)) == 2) |
| 3584 | { |
| 3585 | ibfR4(ioptr, M, NDiffU); /* 1 radix 4 stage */ |
| 3586 | NDiffU *= 4; |
| 3587 | } |
| 3588 | if (M <= (int) MCACHE) |
| 3589 | ibfstages(ioptr, M, Utbl, 2, NDiffU, StageCnt); /* RADIX 8 Stages */ |
| 3590 | else |
| 3591 | ifftrecurs(ioptr, M, Utbl, 2, NDiffU, StageCnt); /* RADIX 8 Stages */ |
| 3592 | } |
| 3593 | } |
no test coverage detected