MCPcopy Create free account
hub / github.com/LabSound/LabSound / iffts1

Function iffts1

src/core/_SoundPipe_FFT.cpp:2605–2653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2603
2604#if 0
2605static void iffts1(SPFLOAT * ioptr, int M, SPFLOAT * Utbl, int16_t * BRLow)
2606{
2607 /* Compute in-place inverse complex fft on the rows of the input array */
2608 /* INPUTS */
2609 /* *ioptr = input data array */
2610 /* M = log2 of fft size */
2611 /* *Utbl = cosine table */
2612 /* *BRLow = bit reversed counter table */
2613 /* OUTPUTS */
2614 /* *ioptr = output data array */
2615
2616 int StageCnt;
2617 int NDiffU;
2618 const SPFLOAT scale = 1.0 / POW2(M);
2619
2620 switch (M)
2621 {
2622 case 0:
2623 break;
2624 case 1:
2625 ifft2pt(ioptr, scale); /* a 2 pt fft */
2626 break;
2627 case 2:
2628 ifft4pt(ioptr, scale); /* a 4 pt fft */
2629 break;
2630 case 3:
2631 ifft8pt(ioptr, scale); /* an 8 pt fft */
2632 break;
2633 default:
2634 /* bit reverse and first radix 2 stage */
2635 scbitrevR2(ioptr, M, BRLow, scale);
2636 StageCnt = (M - 1) / 3; /* number of radix 8 stages */
2637 NDiffU = 2; /* one radix 2 stage already complete */
2638 if ((M - 1 - (StageCnt * 3)) == 1)
2639 {
2640 ibfR2(ioptr, M, NDiffU); /* 1 radix 2 stage */
2641 NDiffU *= 2;
2642 }
2643 if ((M - 1 - (StageCnt * 3)) == 2)
2644 {
2645 ibfR4(ioptr, M, NDiffU); /* 1 radix 4 stage */
2646 NDiffU *= 4;
2647 }
2648 if (M <= (int) MCACHE)
2649 ibfstages(ioptr, M, Utbl, 1, NDiffU, StageCnt); /* RADIX 8 Stages */
2650 else
2651 ifftrecurs(ioptr, M, Utbl, 1, NDiffU, StageCnt); /* RADIX 8 Stages */
2652 }
2653}
2654#endif
2655
2656/******************

Callers

nothing calls this directly

Calls 9

POW2Function · 0.85
ifft2ptFunction · 0.85
ifft4ptFunction · 0.85
ifft8ptFunction · 0.85
scbitrevR2Function · 0.85
ibfR2Function · 0.85
ibfR4Function · 0.85
ibfstagesFunction · 0.85
ifftrecursFunction · 0.85

Tested by

no test coverage detected