36 template <
typename FFT_TYPE>
39 #define FFT_RECIPLN2 1.442695040888963407359924681001892137426 // 1.0/log(2) 42 #define LOG2(a) (FFT_RECIPLN2*log(a)) // floating point logarithm base 2 43 #define POW2(m) ((unsigned int) 1 << (m)) // integer power of 2 for m<32 46 #define MCACHE (11 - (sizeof(FFT_TYPE) / 8)) 49 #define FFT_PI 3.141592653589793238462643383279502884197 // pi 50 #define FFT_ROOT2 1.414213562373095048801688724209698078569 // sqrt(2) 51 #define FFT_COSPID8 0.9238795325112867561281831893967882868224 // cos(pi/8) 52 #define FFT_SINPID8 0.3826834323650897717284599840303988667613 // sin(pi/8) 67 void riffts1(FFT_TYPE *ioptr,
int M, FFT_TYPE *Utbl,
short *BRLow);
68 void ifrstage(FFT_TYPE *ioptr,
int M, FFT_TYPE *inUtbl);
69 void rifft8pt(FFT_TYPE *ioptr, FFT_TYPE scale);
70 void rifft4pt(FFT_TYPE *ioptr, FFT_TYPE scale);
71 void rifft2pt(FFT_TYPE *ioptr, FFT_TYPE scale);
72 void rifft1pt(FFT_TYPE *ioptr, FFT_TYPE scale);
73 void rffts1(FFT_TYPE *ioptr,
int M, FFT_TYPE *Utbl,
short *BRLow);
74 void frstage(FFT_TYPE *ioptr,
int M, FFT_TYPE *inUtbl);
79 void iffts1(FFT_TYPE *ioptr,
int M, FFT_TYPE *Utbl,
short *BRLow);
80 void ifftrecurs(FFT_TYPE *ioptr,
int M, FFT_TYPE *Utbl,
int Ustride,
81 int NDiffU,
int StageCnt);
82 void ibfstages(FFT_TYPE *ioptr,
int M, FFT_TYPE *inUtbl,
int Ustride,
83 int NDiffU,
int StageCnt);
84 void ibfR4(FFT_TYPE *ioptr,
int M,
int NDiffU);
85 void ibfR2(FFT_TYPE *ioptr,
int M,
int NDiffU);
86 void ifft8pt(FFT_TYPE *ioptr, FFT_TYPE scale);
87 void ifft4pt(FFT_TYPE *ioptr, FFT_TYPE scale);
88 void ifft2pt(FFT_TYPE *ioptr, FFT_TYPE scale);
89 void scbitrevR2(FFT_TYPE *ioptr,
int M,
short *inBRLow, FFT_TYPE scale);
90 void ffts1(FFT_TYPE *ioptr,
int M, FFT_TYPE *Utbl,
short *BRLow);
92 FFT_TYPE *Utbl,
int Ustride,
int NDiffU,
94 void bfstages(FFT_TYPE *ioptr,
int M,
95 FFT_TYPE *inUtbl,
int Ustride,
96 int NDiffU,
int StageCnt);
97 void bfR4(FFT_TYPE *ioptr,
int M,
int NDiffU);
98 void bfR2(FFT_TYPE *ioptr,
int M,
int NDiffU);
99 void fft8pt(FFT_TYPE *ioptr);
100 void fft4pt(FFT_TYPE *ioptr);
101 void fft2pt(FFT_TYPE *ioptr);
102 void bitrevR2(FFT_TYPE *ioptr,
int M,
short *inBRLow);
110 if (M > 268435456) M = 268435456;
117 for (
int i = 0;
i < 32;
i++)
119 if (FFT_table_1[
i] != 0)
delete [] FFT_table_1[
i];
120 if (FFT_table_2[
i] != 0)
delete [] FFT_table_2[
i];
126 void RealFFT(std::complex<FFT_TYPE> *buf);
140 template <
typename FFT_TYPE>
143 unsigned int fftN =
POW2(M);
146 Utbl[0] = FFT_TYPE(1.0);
147 for (i1 = 1; i1 < fftN/4; i1++)
148 Utbl[i1] = (FFT_TYPE)
cos((2.0 *
FFT_PI * (
float)i1) / (
float)fftN);
149 Utbl[fftN/4] = FFT_TYPE(0.0);
160 template <
typename FFT_TYPE>
163 int Mroot_1 = M / 2 - 1;
164 int Nroot_1 =
POW2(Mroot_1);
170 for (i1 = 0; i1 < Nroot_1; i1++) {
173 for (bit = 1; bit <= Mroot_1; bitmask <<= 1, bit++)
175 bitsum = bitsum + (Nroot_1 >> bit);
184 template <
typename FFT_TYPE>
218 const unsigned int Nrems2 =
POW2((M + 3) / 2);
219 const unsigned int Nroot_1_ColInc =
POW2(M) - Nrems2;
220 const unsigned int Nroot_1 =
POW2(M / 2 - 1) - 1;
221 const unsigned int ColstartShift = (M + 1) / 2 + 1;
228 iolimit = ioptr + Nrems2;
229 for (; ioptr < iolimit; ioptr +=
POW2(M / 2 + 1)) {
230 for (Colstart = Nroot_1; Colstart >= 0; Colstart--) {
232 p0r = ioptr + Nroot_1_ColInc + inBRLow[Colstart] * 4;
233 IOP = ioptr + (Colstart << ColstartShift);
234 p1r = IOP + inBRLow[iCol] * 4;
238 f1i = *(p0r + posAi);
239 for (; iCol > Colstart;) {
241 f2i = *(p0r + (2 + 1));
243 f3i = *(p0r + posBi);
247 f5i = *(p1r + posAi);
249 f6i = *(p1r + (2 + 1));
251 f7i = *(p1r + posBi);
273 *(p1r + (2 + 1)) = f1i;
275 *(p1r + posAi) = t1i;
277 *(p1r + posBi) = f3i;
281 *(p0r + (2 + 1)) = f5i;
283 *(p0r + posAi) = f2i;
285 *(p0r + posBi) = f7i;
291 f1i = *(p0r + posAi);
293 p1r = IOP + inBRLow[iCol] * 4;
296 f2i = *(p0r + (2 + 1));
298 f3i = *(p0r + posBi);
312 *(p0r + (2 + 1)) = f1i;
314 *(p0r + posAi) = t1i;
316 *(p0r + posBi) = f3i;
324 template <
typename FFT_TYPE>
327 FFT_TYPE f0r, f0i, f1r, f1i;
355 template <
typename FFT_TYPE>
358 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
359 FFT_TYPE t0r, t0i, t1r, t1i;
411 template <
typename FFT_TYPE>
415 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
416 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
417 FFT_TYPE t0r, t0i, t1r, t1i;
418 const FFT_TYPE Two = 2.0;
498 f4r = f1r - f5r * w0r - f5i * w0r;
499 f4i = f1i + f5r * w0r - f5i * w0r;
500 f1r = f1r * Two - f4r;
501 f1i = f1i * Two - f4i;
503 f6r = f3r + f7r * w0r - f7i * w0r;
504 f6i = f3i + f7r * w0r + f7i * w0r;
505 f3r = f3r * Two - f6r;
506 f3i = f3i * Two - f6i;
530 template <
typename FFT_TYPE>
538 unsigned int SameUCnt;
541 FFT_TYPE *p0r, *p1r, *p2r, *p3r;
543 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
544 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
550 NSameU =
POW2(M) / 4 / NDiffU;
568 for (SameUCnt = NSameU; SameUCnt > 0; SameUCnt--) {
636 template <
typename FFT_TYPE>
645 unsigned int SameUCnt;
648 FFT_TYPE *p0r, *p1r, *p2r, *p3r;
651 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
652 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
654 const FFT_TYPE Two = 2.0;
661 NSameU =
POW2(M) / 4 / NDiffU;
698 for (SameUCnt = NSameU - 1; SameUCnt > 0; SameUCnt--) {
738 f5r = t1r - f7r * w1r + f7i * w1r;
739 f5i = t1i - f7r * w1r - f7i * w1r;
740 f7r = t1r * Two - f5r;
741 f7i = t1i * Two - f5i;
743 f6r = f4r - f2r * w1r - f2i * w1r;
744 f6i = f4i + f2r * w1r - f2i * w1r;
745 f4r = f4r * Two - f6r;
746 f4i = f4i * Two - f6i;
748 f3r = *(p3r + pnext);
749 f0r = *(p0r + pnext);
750 f3i = *(p3r + pnexti);
751 f0i = *(p0r + pnexti);
752 f2r = *(p2r + pnext);
753 f2i = *(p2r + pnexti);
754 f1r = *(p1r + pnext);
755 f1i = *(p1r + pnexti);
819 f5r = t1r - f7r * w1r + f7i * w1r;
820 f5i = t1i - f7r * w1r - f7i * w1r;
821 f7r = t1r * Two - f5r;
822 f7i = t1i * Two - f5i;
824 f6r = f4r - f2r * w1r - f2i * w1r;
825 f6i = f4i + f2r * w1r - f2i * w1r;
826 f4r = f4r * Two - f6r;
827 f4i = f4i * Two - f6i;
842 template <
typename FFT_TYPE>
844 int NDiffU,
int StageCnt)
854 unsigned int DiffUCnt;
855 unsigned int SameUCnt;
859 FFT_TYPE *p0r, *p1r, *p2r, *p3r;
860 FFT_TYPE *u0r, *u0i, *u1r, *u1i, *u2r, *u2i;
862 FFT_TYPE w0r, w0i, w1r, w1i, w2r, w2i, w3r, w3i;
863 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
864 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
865 FFT_TYPE t0r, t0i, t1r, t1i;
866 const FFT_TYPE Two = FFT_TYPE(2.0);
872 NSameU =
POW2(M) / 8 / NDiffU;
873 Uinc = (int) NSameU * Ustride;
876 U2toU3 = (
POW2(M) / 8) * Ustride;
877 for (; StageCnt > 0; StageCnt--) {
880 u0i = &inUtbl[
POW2(M - 2) * Ustride];
892 w3r = *(u2r + U2toU3);
893 w3i = *(u2i - U2toU3);
913 for (DiffUCnt = NDiffU; DiffUCnt > 0; DiffUCnt--) {
918 for (SameUCnt = NSameU - 1; SameUCnt > 0; SameUCnt--) {
924 t0r = f0r + f1r * w0r + f1i * w0i;
925 t0i = f0i - f1r * w0i + f1i * w0r;
926 f1r = f0r * Two - t0r;
927 f1i = f0i * Two - t0i;
939 t1r = f2r - f3r * w0r - f3i * w0i;
940 t1i = f2i + f3r * w0i - f3i * w0r;
941 f2r = f2r * Two - t1r;
942 f2i = f2i * Two - t1i;
944 f0r = t0r + f2r * w1r + f2i * w1i;
945 f0i = t0i - f2r * w1i + f2i * w1r;
946 f2r = t0r * Two - f0r;
947 f2i = t0i * Two - f0i;
949 f3r = f1r + t1r * w1i - t1i * w1r;
950 f3i = f1i + t1r * w1r + t1i * w1i;
951 f1r = f1r * Two - f3r;
952 f1i = f1i * Two - f3i;
954 t0r = f4r + f5r * w0r + f5i * w0i;
955 t0i = f4i - f5r * w0i + f5i * w0r;
956 f5r = f4r * Two - t0r;
957 f5i = f4i * Two - t0i;
959 t1r = f6r - f7r * w0r - f7i * w0i;
960 t1i = f6i + f7r * w0i - f7i * w0r;
961 f6r = f6r * Two - t1r;
962 f6i = f6i * Two - t1i;
964 f4r = t0r + f6r * w1r + f6i * w1i;
965 f4i = t0i - f6r * w1i + f6i * w1r;
966 f6r = t0r * Two - f4r;
967 f6i = t0i * Two - f4i;
969 f7r = f5r + t1r * w1i - t1i * w1r;
970 f7i = f5i + t1r * w1r + t1i * w1i;
971 f5r = f5r * Two - f7r;
972 f5i = f5i * Two - f7i;
974 t0r = f0r - f4r * w2r - f4i * w2i;
975 t0i = f0i + f4r * w2i - f4i * w2r;
976 f0r = f0r * Two - t0r;
977 f0i = f0i * Two - t0i;
979 t1r = f1r - f5r * w3r - f5i * w3i;
980 t1i = f1i + f5r * w3i - f5i * w3r;
981 f1r = f1r * Two - t1r;
982 f1i = f1i * Two - t1i;
1002 f4r = f2r - f6r * w2i + f6i * w2r;
1003 f4i = f2i - f6r * w2r - f6i * w2i;
1004 f6r = f2r * Two - f4r;
1005 f6i = f2i * Two - f4i;
1007 f5r = f3r - f7r * w3i + f7i * w3r;
1008 f5i = f3i - f7r * w3r - f7i * w3i;
1009 f7r = f3r * Two - f5r;
1010 f7i = f3i * Two - f5i;
1018 *(p2r + posi) = f6i;
1019 *(p3r + posi) = f7i;
1030 t0r = f0r + f1r * w0r + f1i * w0i;
1031 t0i = f0i - f1r * w0i + f1i * w0r;
1032 f1r = f0r * Two - t0r;
1033 f1i = f0i * Two - t0i;
1036 f4i = *(p0r + posi);
1038 f5i = *(p1r + posi);
1041 f6i = *(p2r + posi);
1043 f7i = *(p3r + posi);
1045 t1r = f2r - f3r * w0r - f3i * w0i;
1046 t1i = f2i + f3r * w0i - f3i * w0r;
1047 f2r = f2r * Two - t1r;
1048 f2i = f2i * Two - t1i;
1050 f0r = t0r + f2r * w1r + f2i * w1i;
1051 f0i = t0i - f2r * w1i + f2i * w1r;
1052 f2r = t0r * Two - f0r;
1053 f2i = t0i * Two - f0i;
1055 f3r = f1r + t1r * w1i - t1i * w1r;
1056 f3i = f1i + t1r * w1r + t1i * w1i;
1057 f1r = f1r * Two - f3r;
1058 f1i = f1i * Two - f3i;
1060 if ((
int) DiffUCnt == NDiffU / 2)
1072 t0r = f4r + f5r * w0r + f5i * w0i;
1073 t0i = f4i - f5r * w0i + f5i * w0r;
1074 f5r = f4r * Two - t0r;
1075 f5i = f4i * Two - t0i;
1077 t1r = f6r - f7r * w0r - f7i * w0i;
1078 t1i = f6i + f7r * w0i - f7i * w0r;
1079 f6r = f6r * Two - t1r;
1080 f6i = f6i * Two - t1i;
1082 f4r = t0r + f6r * w1r + f6i * w1i;
1083 f4i = t0i - f6r * w1i + f6i * w1r;
1084 f6r = t0r * Two - f4r;
1085 f6i = t0i * Two - f4i;
1087 f7r = f5r + t1r * w1i - t1i * w1r;
1088 f7i = f5i + t1r * w1r + t1i * w1i;
1089 f5r = f5r * Two - f7r;
1090 f5i = f5i * Two - f7i;
1097 if ((
int) DiffUCnt <= NDiffU / 2)
1100 t0r = f0r - f4r * w2r - f4i * w2i;
1101 t0i = f0i + f4r * w2i - f4i * w2r;
1102 f0r = f0r * Two - t0r;
1103 f0i = f0i * Two - t0i;
1105 f4r = f2r - f6r * w2i + f6i * w2r;
1106 f4i = f2i - f6r * w2r - f6i * w2i;
1107 f6r = f2r * Two - f4r;
1108 f6i = f2i * Two - f4i;
1112 *(p0r + posi) = t0i;
1119 *(p2r + posi) = f6i;
1122 p2r = pstrt + pinc + pinc;
1124 t1r = f1r - f5r * w3r - f5i * w3i;
1125 t1i = f1i + f5r * w3i - f5i * w3r;
1126 f1r = f1r * Two - t1r;
1127 f1i = f1i * Two - t1i;
1129 f5r = f3r - f7r * w3i + f7i * w3r;
1130 f5i = f3i - f7r * w3r - f7i * w3i;
1131 f7r = f3r * Two - f5r;
1132 f7i = f3i * Two - f5i;
1136 *(p1r + posi) = t1i;
1138 w3r = *(u2r + U2toU3);
1139 w3i = *(u2i - U2toU3);
1143 *(p3r + posi) = f7i;
1160 template <
typename FFT_TYPE>
1162 FFT_TYPE *
Utbl,
int Ustride,
int NDiffU,
1169 bfstages(ioptr, M, Utbl, Ustride, NDiffU, StageCnt);
1171 for (i1 = 0; i1 < 8; i1++) {
1172 fftrecurs(&ioptr[i1 *
POW2(M - 3) * 2], M - 3, Utbl, 8 * Ustride,
1173 NDiffU, StageCnt - 1);
1189 template <
typename FFT_TYPE>
1209 StageCnt = (M - 1) / 3;
1211 if ((M - 1 - (StageCnt * 3)) == 1) {
1212 bfR2(ioptr, M, NDiffU);
1215 if ((M - 1 - (StageCnt * 3)) == 2) {
1216 bfR4(ioptr, M, NDiffU);
1220 bfstages(ioptr, M, Utbl, 1, NDiffU, StageCnt);
1222 fftrecurs(ioptr, M, Utbl, 1, NDiffU, StageCnt);
1230 template <
typename FFT_TYPE>
1264 const unsigned int Nrems2 =
POW2((M + 3) / 2);
1265 const unsigned int Nroot_1_ColInc =
POW2(M) - Nrems2;
1266 const unsigned int Nroot_1 =
POW2(M / 2 - 1) - 1;
1267 const unsigned int ColstartShift = (M + 1) / 2 + 1;
1274 iolimit = ioptr + Nrems2;
1275 for (; ioptr < iolimit; ioptr +=
POW2(M / 2 + 1)) {
1276 for (Colstart = Nroot_1; Colstart >= 0; Colstart--) {
1278 p0r = ioptr + Nroot_1_ColInc + inBRLow[Colstart] * 4;
1279 IOP = ioptr + (Colstart << ColstartShift);
1280 p1r = IOP + inBRLow[iCol] * 4;
1283 f1r = *(p0r + posA);
1284 f1i = *(p0r + posAi);
1285 for (; iCol > Colstart;) {
1287 f2i = *(p0r + (2 + 1));
1288 f3r = *(p0r + posB);
1289 f3i = *(p0r + posBi);
1292 f5r = *(p1r + posA);
1293 f5i = *(p1r + posAi);
1295 f6i = *(p1r + (2 + 1));
1296 f7r = *(p1r + posB);
1297 f7i = *(p1r + posBi);
1316 *(p1r) = scale * t0r;
1317 *(p1r + 1) = scale * t0i;
1318 *(p1r + 2) = scale * f1r;
1319 *(p1r + (2 + 1)) = scale * f1i;
1320 *(p1r + posA) = scale * t1r;
1321 *(p1r + posAi) = scale * t1i;
1322 *(p1r + posB) = scale * f3r;
1323 *(p1r + posBi) = scale * f3i;
1324 *(p0r) = scale * f0r;
1325 *(p0r + 1) = scale * f0i;
1326 *(p0r + 2) = scale * f5r;
1327 *(p0r + (2 + 1)) = scale * f5i;
1328 *(p0r + posA) = scale * f2r;
1329 *(p0r + posAi) = scale * f2i;
1330 *(p0r + posB) = scale * f7r;
1331 *(p0r + posBi) = scale * f7i;
1336 f1r = *(p0r + posA);
1337 f1i = *(p0r + posAi);
1339 p1r = IOP + inBRLow[iCol] * 4;
1342 f2i = *(p0r + (2 + 1));
1343 f3r = *(p0r + posB);
1344 f3i = *(p0r + posBi);
1355 *(p0r) = scale * t0r;
1356 *(p0r + 1) = scale * t0i;
1357 *(p0r + 2) = scale * f1r;
1358 *(p0r + (2 + 1)) = scale * f1i;
1359 *(p0r + posA) = scale * t1r;
1360 *(p0r + posAi) = scale * t1i;
1361 *(p0r + posB) = scale * f3r;
1362 *(p0r + posBi) = scale * f3i;
1370 template <
typename FFT_TYPE>
1373 FFT_TYPE f0r, f0i, f1r, f1i;
1392 ioptr[0] = scale * t0r;
1393 ioptr[1] = scale * t0i;
1394 ioptr[2] = scale * f1r;
1395 ioptr[3] = scale * f1i;
1401 template <
typename FFT_TYPE>
1404 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
1405 FFT_TYPE t0r, t0i, t1r, t1i;
1444 ioptr[0] = scale * f0r;
1445 ioptr[1] = scale * f0i;
1446 ioptr[2] = scale * f1r;
1447 ioptr[3] = scale * f1i;
1448 ioptr[4] = scale * f2r;
1449 ioptr[5] = scale * f2i;
1450 ioptr[6] = scale * f3r;
1451 ioptr[7] = scale * f3i;
1457 template <
typename FFT_TYPE>
1461 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
1462 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
1463 FFT_TYPE t0r, t0i, t1r, t1i;
1464 const FFT_TYPE Two = 2.0;
1544 f4r = f1r - f5r * w0r + f5i * w0r;
1545 f4i = f1i - f5r * w0r - f5i * w0r;
1546 f1r = f1r * Two - f4r;
1547 f1i = f1i * Two - f4i;
1549 f6r = f3r + f7r * w0r + f7i * w0r;
1550 f6i = f3i - f7r * w0r + f7i * w0r;
1551 f3r = f3r * Two - f6r;
1552 f3i = f3i * Two - f6i;
1555 ioptr[0] = scale * f0r;
1556 ioptr[1] = scale * f0i;
1557 ioptr[2] = scale * f1r;
1558 ioptr[3] = scale * f1i;
1559 ioptr[4] = scale * f2r;
1560 ioptr[5] = scale * f2i;
1561 ioptr[6] = scale * f3r;
1562 ioptr[7] = scale * f3i;
1563 ioptr[8] = scale * t0r;
1564 ioptr[9] = scale * t0i;
1565 ioptr[10] = scale * f4r;
1566 ioptr[11] = scale * f4i;
1567 ioptr[12] = scale * t1r;
1568 ioptr[13] = scale * t1i;
1569 ioptr[14] = scale * f6r;
1570 ioptr[15] = scale * f6i;
1576 template <
typename FFT_TYPE>
1583 unsigned int NSameU;
1584 unsigned int SameUCnt;
1587 FFT_TYPE *p0r, *p1r, *p2r, *p3r;
1589 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
1590 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
1596 NSameU =
POW2(M) / 4 / NDiffU;
1614 for (SameUCnt = NSameU; SameUCnt > 0; SameUCnt--) {
1645 f1i = *(p1r + posi);
1646 f0i = *(p0r + posi);
1649 f3i = *(p3r + posi);
1650 f2i = *(p2r + posi);
1664 *(p0r + posi) = f4i;
1666 *(p1r + posi) = f5i;
1668 *(p2r + posi) = f6i;
1670 *(p3r + posi) = f7i;
1682 template <
typename FFT_TYPE>
1689 unsigned int pnexti;
1690 unsigned int NSameU;
1691 unsigned int SameUCnt;
1694 FFT_TYPE *p0r, *p1r, *p2r, *p3r;
1697 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
1698 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
1700 const FFT_TYPE Two = 2.0;
1707 NSameU =
POW2(M) / 4 / NDiffU;
1744 for (SameUCnt = NSameU - 1; SameUCnt > 0; SameUCnt--) {
1757 f2i = *(p2r + posi);
1759 f1i = *(p1r + posi);
1760 f3i = *(p3r + posi);
1763 f0i = *(p0r + posi);
1784 f5r = t1r - f7r * w1r - f7i * w1r;
1785 f5i = t1i + f7r * w1r - f7i * w1r;
1786 f7r = t1r * Two - f5r;
1787 f7i = t1i * Two - f5i;
1789 f6r = f4r - f2r * w1r + f2i * w1r;
1790 f6i = f4i - f2r * w1r - f2i * w1r;
1791 f4r = f4r * Two - f6r;
1792 f4i = f4i * Two - f6i;
1794 f3r = *(p3r + pnext);
1795 f0r = *(p0r + pnext);
1796 f3i = *(p3r + pnexti);
1797 f0i = *(p0r + pnexti);
1798 f2r = *(p2r + pnext);
1799 f2i = *(p2r + pnexti);
1800 f1r = *(p1r + pnext);
1801 f1i = *(p1r + pnexti);
1805 *(p2r + posi) = f6i;
1806 *(p1r + posi) = f5i;
1809 *(p3r + posi) = f7i;
1810 *(p0r + posi) = f4i;
1838 f2i = *(p2r + posi);
1840 f1i = *(p1r + posi);
1841 f3i = *(p3r + posi);
1844 f0i = *(p0r + posi);
1865 f5r = t1r - f7r * w1r - f7i * w1r;
1866 f5i = t1i + f7r * w1r - f7i * w1r;
1867 f7r = t1r * Two - f5r;
1868 f7i = t1i * Two - f5i;
1870 f6r = f4r - f2r * w1r + f2i * w1r;
1871 f6i = f4i - f2r * w1r - f2i * w1r;
1872 f4r = f4r * Two - f6r;
1873 f4i = f4i * Two - f6i;
1877 *(p2r + posi) = f6i;
1878 *(p1r + posi) = f5i;
1881 *(p3r + posi) = f7i;
1882 *(p0r + posi) = f4i;
1888 template <
typename FFT_TYPE>
1890 int NDiffU,
int StageCnt)
1896 unsigned int NSameU;
1900 unsigned int DiffUCnt;
1901 unsigned int SameUCnt;
1902 unsigned int U2toU3;
1905 FFT_TYPE *p0r, *p1r, *p2r, *p3r;
1906 FFT_TYPE *u0r, *u0i, *u1r, *u1i, *u2r, *u2i;
1908 FFT_TYPE w0r, w0i, w1r, w1i, w2r, w2i, w3r, w3i;
1909 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
1910 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
1911 FFT_TYPE t0r, t0i, t1r, t1i;
1912 const FFT_TYPE Two = 2.0;
1918 NSameU =
POW2(M) / 8 / NDiffU;
1919 Uinc = (int) NSameU * Ustride;
1922 U2toU3 = (
POW2(M) / 8) * Ustride;
1923 for (; StageCnt > 0; StageCnt--) {
1926 u0i = &inUtbl[
POW2(M - 2) * Ustride];
1938 w3r = *(u2r + U2toU3);
1939 w3i = *(u2i - U2toU3);
1958 for (DiffUCnt = NDiffU; DiffUCnt > 0; DiffUCnt--) {
1963 for (SameUCnt = NSameU - 1; SameUCnt > 0; SameUCnt--) {
1969 t0r = f0r + f1r * w0r - f1i * w0i;
1970 t0i = f0i + f1r * w0i + f1i * w0r;
1971 f1r = f0r * Two - t0r;
1972 f1i = f0i * Two - t0i;
1975 f4i = *(p0r + posi);
1977 f5i = *(p1r + posi);
1980 f6i = *(p2r + posi);
1982 f7i = *(p3r + posi);
1984 t1r = f2r - f3r * w0r + f3i * w0i;
1985 t1i = f2i - f3r * w0i - f3i * w0r;
1986 f2r = f2r * Two - t1r;
1987 f2i = f2i * Two - t1i;
1989 f0r = t0r + f2r * w1r - f2i * w1i;
1990 f0i = t0i + f2r * w1i + f2i * w1r;
1991 f2r = t0r * Two - f0r;
1992 f2i = t0i * Two - f0i;
1994 f3r = f1r + t1r * w1i + t1i * w1r;
1995 f3i = f1i - t1r * w1r + t1i * w1i;
1996 f1r = f1r * Two - f3r;
1997 f1i = f1i * Two - f3i;
1999 t0r = f4r + f5r * w0r - f5i * w0i;
2000 t0i = f4i + f5r * w0i + f5i * w0r;
2001 f5r = f4r * Two - t0r;
2002 f5i = f4i * Two - t0i;
2004 t1r = f6r - f7r * w0r + f7i * w0i;
2005 t1i = f6i - f7r * w0i - f7i * w0r;
2006 f6r = f6r * Two - t1r;
2007 f6i = f6i * Two - t1i;
2009 f4r = t0r + f6r * w1r - f6i * w1i;
2010 f4i = t0i + f6r * w1i + f6i * w1r;
2011 f6r = t0r * Two - f4r;
2012 f6i = t0i * Two - f4i;
2014 f7r = f5r + t1r * w1i + t1i * w1r;
2015 f7i = f5i - t1r * w1r + t1i * w1i;
2016 f5r = f5r * Two - f7r;
2017 f5i = f5i * Two - f7i;
2019 t0r = f0r - f4r * w2r + f4i * w2i;
2020 t0i = f0i - f4r * w2i - f4i * w2r;
2021 f0r = f0r * Two - t0r;
2022 f0i = f0i * Two - t0i;
2024 t1r = f1r - f5r * w3r + f5i * w3i;
2025 t1i = f1i - f5r * w3i - f5i * w3r;
2026 f1r = f1r * Two - t1r;
2027 f1i = f1i * Two - t1i;
2030 *(p0r + posi) = t0i;
2039 *(p1r + posi) = t1i;
2048 f4r = f2r - f6r * w2i - f6i * w2r;
2049 f4i = f2i + f6r * w2r - f6i * w2i;
2050 f6r = f2r * Two - f4r;
2051 f6i = f2i * Two - f4i;
2053 f5r = f3r - f7r * w3i - f7i * w3r;
2054 f5i = f3i + f7r * w3r - f7i * w3i;
2055 f7r = f3r * Two - f5r;
2056 f7i = f3i * Two - f5i;
2061 *(p2r + posi) = f6i;
2068 *(p3r + posi) = f7i;
2078 t0r = f0r + f1r * w0r - f1i * w0i;
2079 t0i = f0i + f1r * w0i + f1i * w0r;
2080 f1r = f0r * Two - t0r;
2081 f1i = f0i * Two - t0i;
2084 f4i = *(p0r + posi);
2086 f5i = *(p1r + posi);
2089 f6i = *(p2r + posi);
2091 f7i = *(p3r + posi);
2093 t1r = f2r - f3r * w0r + f3i * w0i;
2094 t1i = f2i - f3r * w0i - f3i * w0r;
2095 f2r = f2r * Two - t1r;
2096 f2i = f2i * Two - t1i;
2098 f0r = t0r + f2r * w1r - f2i * w1i;
2099 f0i = t0i + f2r * w1i + f2i * w1r;
2100 f2r = t0r * Two - f0r;
2101 f2i = t0i * Two - f0i;
2103 f3r = f1r + t1r * w1i + t1i * w1r;
2104 f3i = f1i - t1r * w1r + t1i * w1i;
2105 f1r = f1r * Two - f3r;
2106 f1i = f1i * Two - f3i;
2108 if ((
int) DiffUCnt == NDiffU / 2)
2120 t0r = f4r + f5r * w0r - f5i * w0i;
2121 t0i = f4i + f5r * w0i + f5i * w0r;
2122 f5r = f4r * Two - t0r;
2123 f5i = f4i * Two - t0i;
2125 t1r = f6r - f7r * w0r + f7i * w0i;
2126 t1i = f6i - f7r * w0i - f7i * w0r;
2127 f6r = f6r * Two - t1r;
2128 f6i = f6i * Two - t1i;
2130 f4r = t0r + f6r * w1r - f6i * w1i;
2131 f4i = t0i + f6r * w1i + f6i * w1r;
2132 f6r = t0r * Two - f4r;
2133 f6i = t0i * Two - f4i;
2135 f7r = f5r + t1r * w1i + t1i * w1r;
2136 f7i = f5i - t1r * w1r + t1i * w1i;
2137 f5r = f5r * Two - f7r;
2138 f5i = f5i * Two - f7i;
2145 if ((
int) DiffUCnt <= NDiffU / 2)
2148 t0r = f0r - f4r * w2r + f4i * w2i;
2149 t0i = f0i - f4r * w2i - f4i * w2r;
2150 f0r = f0r * Two - t0r;
2151 f0i = f0i * Two - t0i;
2153 f4r = f2r - f6r * w2i - f6i * w2r;
2154 f4i = f2i + f6r * w2r - f6i * w2i;
2155 f6r = f2r * Two - f4r;
2156 f6i = f2i * Two - f4i;
2160 *(p0r + posi) = t0i;
2167 *(p2r + posi) = f6i;
2170 p2r = pstrt + pinc + pinc;
2172 t1r = f1r - f5r * w3r + f5i * w3i;
2173 t1i = f1i - f5r * w3i - f5i * w3r;
2174 f1r = f1r * Two - t1r;
2175 f1i = f1i * Two - t1i;
2177 f5r = f3r - f7r * w3i - f7i * w3r;
2178 f5i = f3i + f7r * w3r - f7i * w3i;
2179 f7r = f3r * Two - f5r;
2180 f7i = f3i * Two - f5i;
2184 *(p1r + posi) = t1i;
2186 w3r = *(u2r + U2toU3);
2187 w3i = *(u2i - U2toU3);
2191 *(p3r + posi) = f7i;
2211 template <
typename FFT_TYPE>
2213 int NDiffU,
int StageCnt)
2218 ibfstages(ioptr, M, Utbl, Ustride, NDiffU, StageCnt);
2220 for (i1 = 0; i1 < 8; i1++) {
2221 ifftrecurs(&ioptr[i1 *
POW2(M - 3) * 2], M - 3, Utbl, 8 * Ustride,
2222 NDiffU, StageCnt - 1);
2238 template <
typename FFT_TYPE>
2243 const FFT_TYPE scale = 1.0 /
POW2(M);
2260 StageCnt = (M - 1) / 3;
2262 if ((M - 1 - (StageCnt * 3)) == 1) {
2263 ibfR2(ioptr, M, NDiffU);
2266 if ((M - 1 - (StageCnt * 3)) == 2) {
2267 ibfR4(ioptr, M, NDiffU);
2271 ibfstages(ioptr, M, Utbl, 1, NDiffU, StageCnt);
2273 ifftrecurs(ioptr, M, Utbl, 1, NDiffU, StageCnt);
2281 template <
typename FFT_TYPE>
2303 template <
typename FFT_TYPE>
2306 FFT_TYPE f0r, f0i, f1r, f1i;
2337 template <
typename FFT_TYPE>
2340 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
2341 FFT_TYPE t0r, t0i, t1r, t1i;
2343 const FFT_TYPE Two = 2.0;
2344 const FFT_TYPE scale = 0.5;
2391 f1r = t1r + w0r * f0r + w0r * f0i;
2392 f1i = t1i - w0r * f0r + w0r * f0i;
2393 f3r = Two * t1r - f1r;
2394 f3i = f1i - Two * t1i;
2402 ioptr[2] = scale * f1r;
2403 ioptr[3] = scale * f1i;
2404 ioptr[6] = scale * f3r;
2405 ioptr[7] = scale * f3i;
2411 template <
typename FFT_TYPE>
2417 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
2418 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
2419 FFT_TYPE t0r, t0i, t1r, t1i;
2420 const FFT_TYPE Two = 2.0;
2421 const FFT_TYPE scale = 0.5;
2501 f4r = f1r - f5r * w0r - f5i * w0r;
2502 f4i = f1i + f5r * w0r - f5i * w0r;
2503 f1r = f1r * Two - f4r;
2504 f1i = f1i * Two - f4i;
2506 f6r = f3r + f7r * w0r - f7i * w0r;
2507 f6i = f3i + f7r * w0r + f7i * w0r;
2508 f3r = f3r * Two - f6r;
2509 f3i = f3i * Two - f6i;
2520 f2r = f0r + w0r * f7r + w0r * f7i;
2521 f2i = f0i - w0r * f7r + w0r * f7i;
2522 t1r = Two * f0r - f2r;
2523 t1i = f2i - Two * f0i;
2530 f1r = f0r + w1r * f7r + w1i * f7i;
2531 f1i = f0i - w1i * f7r + w1r * f7i;
2532 f6r = Two * f0r - f1r;
2533 f6i = f1i - Two * f0i;
2540 f3r = f0r + w1i * f7r + w1r * f7i;
2541 f3i = f0i - w1r * f7r + w1i * f7i;
2542 f4r = Two * f0r - f3r;
2543 f4i = f3i - Two * f0i;
2551 ioptr[4] = scale * f2r;
2552 ioptr[5] = scale * f2i;
2553 ioptr[12] = scale * t1r;
2554 ioptr[13] = scale * t1i;
2556 ioptr[2] = scale * f1r;
2557 ioptr[3] = scale * f1i;
2558 ioptr[6] = scale * f3r;
2559 ioptr[7] = scale * f3i;
2560 ioptr[10] = scale * f4r;
2561 ioptr[11] = scale * f4i;
2562 ioptr[14] = scale * f6r;
2563 ioptr[15] = scale * f6i;
2569 template <
typename FFT_TYPE>
2574 unsigned int diffUcnt;
2576 FFT_TYPE *p0r, *p1r;
2577 FFT_TYPE *u0r, *u0i;
2580 FFT_TYPE f0r, f0i, f1r, f1i, f4r, f4i, f5r, f5i;
2581 FFT_TYPE t0r, t0i, t1r, t1i;
2582 const FFT_TYPE Two = 2.0;
2588 p1r = ioptr + pos / 2;
2590 u0r = inUtbl +
POW2(M - 3);
2592 w0r = *u0r, f0r = *(p0r);
2595 f4i = *(p0r + posi);
2599 f5i = *(p1r + posi);
2601 t0r = Two * f0r + Two * f0i;
2602 t0i = Two * f0r - Two * f0i;
2611 f1r = f0r + w0r * f4r + w0r * f4i;
2612 f1i = f0i - w0r * f4r + w0r * f4i;
2613 f5r = Two * f0r - f1r;
2614 f5i = f1i - Two * f0i;
2619 *(p0r + posi) = t1i;
2623 *(p1r + posi) = f5i;
2626 u0i = inUtbl + (
POW2(M - 2) - 1);
2628 w0r = *u0r, w0i = *u0i;
2631 p1r = (ioptr + (
POW2(M - 2) - 1) * 2);
2639 for (diffUcnt =
POW2(M - 3) - 1; diffUcnt > 0; diffUcnt--) {
2644 f5i = *(p1r + posi);
2648 f4i = *(p0r + posi);
2655 f0r = t0r + w0r * t1r + w0i * t1i;
2656 f0i = t0i - w0i * t1r + w0r * t1i;
2657 f5r = Two * t0r - f0r;
2658 f5i = f0i - Two * t0i;
2665 f1r = t0r + w0i * t1r + w0r * t1i;
2666 f1i = t0i - w0r * t1r + w0i * t1i;
2667 f4r = Two * t0r - f1r;
2668 f4i = f1i - Two * t0i;
2673 *(p1r + posi) = f5i;
2681 *(p0r + posi) = f4i;
2703 template <
typename FFT_TYPE>
2730 StageCnt = (M - 1) / 3;
2732 if ((M - 1 - (StageCnt * 3)) == 1) {
2733 bfR2(ioptr, M, NDiffU);
2736 if ((M - 1 - (StageCnt * 3)) == 2) {
2737 bfR4(ioptr, M, NDiffU);
2741 bfstages(ioptr, M, Utbl, 2, NDiffU, StageCnt);
2743 fftrecurs(ioptr, M, Utbl, 2, NDiffU, StageCnt);
2755 template <
typename FFT_TYPE>
2770 ioptr[0] = scale * t0r;
2771 ioptr[1] = scale * t0i;
2777 template <
typename FFT_TYPE>
2780 FFT_TYPE f0r, f0i, f1r, f1i;
2782 const FFT_TYPE Two = FFT_TYPE(2.0);
2787 f1r = Two * ioptr[2];
2788 f1i = Two * ioptr[3];
2804 ioptr[0] = scale * t0r;
2805 ioptr[1] = scale * t0i;
2806 ioptr[2] = scale * f1r;
2807 ioptr[3] = scale * f1i;
2813 template <
typename FFT_TYPE>
2816 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
2817 FFT_TYPE t0r, t0i, t1r, t1i;
2819 const FFT_TYPE Two = FFT_TYPE(2.0);
2826 f1r = Two * ioptr[4];
2827 f1i = Two * ioptr[5];
2840 f2r = t1r - w0r * t0r - w0r * t0i;
2841 f2i = t1i + w0r * t0r - w0r * t0i;
2842 f3r = Two * t1r - f2r;
2843 f3i = f2i - Two * t1i;
2872 ioptr[0] = scale * f0r;
2873 ioptr[1] = scale * f0i;
2874 ioptr[2] = scale * f1r;
2875 ioptr[3] = scale * f1i;
2876 ioptr[4] = scale * f2r;
2877 ioptr[5] = scale * f2i;
2878 ioptr[6] = scale * f3r;
2879 ioptr[7] = scale * f3i;
2885 template <
typename FFT_TYPE>
2888 FFT_TYPE w0r = (FFT_TYPE) (1.0 /
FFT_ROOT2);
2891 FFT_TYPE f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
2892 FFT_TYPE f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
2893 FFT_TYPE t0r, t0i, t1r, t1i;
2894 const FFT_TYPE Two = FFT_TYPE(2.0);
2905 f1r = Two * ioptr[8];
2906 f1i = Two * ioptr[9];
2923 f2r = t0r - w0r * t1r - w0r * t1i;
2924 f2i = t0i + w0r * t1r - w0r * t1i;
2925 f3r = Two * t0r - f2r;
2926 f3i = f2i - Two * t0i;
2933 f4r = t0r - w1i * t1r - w1r * t1i;
2934 f4i = t0i + w1r * t1r - w1i * t1i;
2935 f7r = Two * t0r - f4r;
2936 f7i = f4i - Two * t0i;
2943 f6r = t0r - w1r * t1r - w1i * t1i;
2944 f6i = t0i + w1i * t1r - w1r * t1i;
2945 f5r = Two * t0r - f6r;
2946 f5i = f6i - Two * t0i;
3008 f4r = f1r - f5r * w0r + f5i * w0r;
3009 f4i = f1i - f5r * w0r - f5i * w0r;
3010 f1r = f1r * Two - f4r;
3011 f1i = f1i * Two - f4i;
3013 f6r = f3r + f7r * w0r + f7i * w0r;
3014 f6i = f3i - f7r * w0r + f7i * w0r;
3015 f3r = f3r * Two - f6r;
3016 f3i = f3i * Two - f6i;
3019 ioptr[0] = scale * f0r;
3020 ioptr[1] = scale * f0i;
3021 ioptr[2] = scale * f1r;
3022 ioptr[3] = scale * f1i;
3023 ioptr[4] = scale * f2r;
3024 ioptr[5] = scale * f2i;
3025 ioptr[6] = scale * f3r;
3026 ioptr[7] = scale * f3i;
3027 ioptr[8] = scale * t0r;
3028 ioptr[9] = scale * t0i;
3029 ioptr[10] = scale * f4r;
3030 ioptr[11] = scale * f4i;
3031 ioptr[12] = scale * t1r;
3032 ioptr[13] = scale * t1i;
3033 ioptr[14] = scale * f6r;
3034 ioptr[15] = scale * f6i;
3040 template <
typename FFT_TYPE>
3045 unsigned int diffUcnt;
3047 FFT_TYPE *p0r, *p1r;
3048 FFT_TYPE *u0r, *u0i;
3051 FFT_TYPE f0r, f0i, f1r, f1i, f4r, f4i, f5r, f5i;
3052 FFT_TYPE t0r, t0i, t1r, t1i;
3053 const FFT_TYPE Two = FFT_TYPE(2.0);
3059 p1r = ioptr + pos / 2;
3061 u0r = inUtbl +
POW2(M - 3);
3063 w0r = *u0r, f0r = *(p0r);
3066 f4i = *(p0r + posi);
3070 f5i = *(p1r + posi);
3082 f1r = f0r - w0r * f4r - w0r * f4i;
3083 f1i = f0i + w0r * f4r - w0r * f4i;
3084 f5r = Two * f0r - f1r;
3085 f5i = f1i - Two * f0i;
3090 *(p0r + posi) = t1i;
3094 *(p1r + posi) = f5i;
3097 u0i = inUtbl + (
POW2(M - 2) - 1);
3099 w0r = *u0r, w0i = *u0i;
3102 p1r = (ioptr + (
POW2(M - 2) - 1) * 2);
3110 for (diffUcnt =
POW2(M - 3) - 1; diffUcnt > 0; diffUcnt--) {
3115 f5i = *(p1r + posi);
3119 f4i = *(p0r + posi);
3126 f0r = t0r - w0i * t1r - w0r * t1i;
3127 f0i = t0i + w0r * t1r - w0i * t1i;
3128 f5r = Two * t0r - f0r;
3129 f5i = f0i - Two * t0i;
3136 f1r = t0r - w0r * t1r - w0i * t1i;
3137 f1i = t0i + w0i * t1r - w0r * t1i;
3138 f4r = Two * t0r - f1r;
3139 f4i = f1i - Two * t0i;
3144 *(p1r + posi) = f5i;
3152 *(p0r + posi) = f4i;
3172 template <
typename FFT_TYPE>
3179 scale = (FFT_TYPE)(1.0 / (
float)((int)
POW2(M)));
3200 StageCnt = (M - 1) / 3;
3202 if ((M - 1 - (StageCnt * 3)) == 1) {
3203 ibfR2(ioptr, M, NDiffU);
3206 if ((M - 1 - (StageCnt * 3)) == 2) {
3207 ibfR4(ioptr, M, NDiffU);
3211 ibfstages(ioptr, M, Utbl, 2, NDiffU, StageCnt);
3213 ifftrecurs(ioptr, M, Utbl, 2, NDiffU, StageCnt);
3231 template <
typename FFT_TYPE>
3234 for (
int i = 0;
i < 32;
i++)
3250 if ((FFT_N % 2) == 0) {
3263 template <
typename FFT_TYPE>
3269 case 0x00000001:
return 0;
3270 case 0x00000002:
return 1;
3271 case 0x00000004:
return 2;
3272 case 0x00000008:
return 3;
3273 case 0x00000010:
return 4;
3274 case 0x00000020:
return 5;
3275 case 0x00000040:
return 6;
3276 case 0x00000080:
return 7;
3277 case 0x00000100:
return 8;
3278 case 0x00000200:
return 9;
3279 case 0x00000400:
return 10;
3280 case 0x00000800:
return 11;
3281 case 0x00001000:
return 12;
3282 case 0x00002000:
return 13;
3283 case 0x00004000:
return 14;
3284 case 0x00008000:
return 15;
3285 case 0x00010000:
return 16;
3286 case 0x00020000:
return 17;
3287 case 0x00040000:
return 18;
3288 case 0x00080000:
return 19;
3289 case 0x00100000:
return 20;
3290 case 0x00200000:
return 21;
3291 case 0x00400000:
return 22;
3292 case 0x00800000:
return 23;
3293 case 0x01000000:
return 24;
3294 case 0x02000000:
return 25;
3295 case 0x04000000:
return 26;
3296 case 0x08000000:
return 27;
3297 case 0x10000000:
return 28;
3308 template <
typename FFT_TYPE>
3312 FFT_TYPE *nbuf =
static_cast<FFT_TYPE *
>(ptr);
3324 template <
typename FFT_TYPE>
3328 FFT_TYPE *nbuf =
static_cast<FFT_TYPE *
>(ptr);
3339 template <
typename FFT_TYPE>
3343 FFT_TYPE *nbuf =
static_cast<FFT_TYPE *
>(ptr);
3356 template <
typename FFT_TYPE>
3360 FFT_TYPE *nbuf =
static_cast<FFT_TYPE *
>(ptr);
3368 template <
typename FFT_TYPE>
3371 return FFT_TYPE(1.0);
3378 template <
typename FFT_TYPE>
3381 return FFT_TYPE(1.0);
void ifft8pt(FFT_TYPE *ioptr, FFT_TYPE scale)
Fixed< IntType, IntBits > cos(Fixed< IntType, IntBits > const &x)
void rifft8pt(FFT_TYPE *ioptr, FFT_TYPE scale)
void frstage(FFT_TYPE *ioptr, int M, FFT_TYPE *inUtbl)
void ifftrecurs(FFT_TYPE *ioptr, int M, FFT_TYPE *Utbl, int Ustride, int NDiffU, int StageCnt)
FFT_TYPE GetInverseRealFFTScale()
void ifft2pt(FFT_TYPE *ioptr, FFT_TYPE scale)
void InverseComplexFFT(std::complex< FFT_TYPE > *buf)
void InverseRealFFT(std::complex< FFT_TYPE > *buf)
void fft2pt(FFT_TYPE *ioptr)
void ibfR4(FFT_TYPE *ioptr, int M, int NDiffU)
short int * FFT_table_2[32]
void ComplexFFT(std::complex< FFT_TYPE > *buf)
void RealFFT(std::complex< FFT_TYPE > *buf)
void ifft4pt(FFT_TYPE *ioptr, FFT_TYPE scale)
void iffts1(FFT_TYPE *ioptr, int M, FFT_TYPE *Utbl, short *BRLow)
void rifft2pt(FFT_TYPE *ioptr, FFT_TYPE scale)
void bfR4(FFT_TYPE *ioptr, int M, int NDiffU)
void fftrecurs(FFT_TYPE *ioptr, int M, FFT_TYPE *Utbl, int Ustride, int NDiffU, int StageCnt)
FFT_TYPE GetInverseComplexFFTScale()
void rfft1pt(FFT_TYPE *ioptr)
void fftBRInit(int M, short *BRLow)
void ffts1(FFT_TYPE *ioptr, int M, FFT_TYPE *Utbl, short *BRLow)
void fft8pt(FFT_TYPE *ioptr)
void rfft4pt(FFT_TYPE *ioptr)
void bfR2(FFT_TYPE *ioptr, int M, int NDiffU)
void scbitrevR2(FFT_TYPE *ioptr, int M, short *inBRLow, FFT_TYPE scale)
void rfft2pt(FFT_TYPE *ioptr)
void rifft4pt(FFT_TYPE *ioptr, FFT_TYPE scale)
void rfft8pt(FFT_TYPE *ioptr)
void ifrstage(FFT_TYPE *ioptr, int M, FFT_TYPE *inUtbl)
void ibfstages(FFT_TYPE *ioptr, int M, FFT_TYPE *inUtbl, int Ustride, int NDiffU, int StageCnt)
void ibfR2(FFT_TYPE *ioptr, int M, int NDiffU)
void fft4pt(FFT_TYPE *ioptr)
FFT_TYPE * FFT_table_1[32]
void bfstages(FFT_TYPE *ioptr, int M, FFT_TYPE *inUtbl, int Ustride, int NDiffU, int StageCnt)
void rifft1pt(FFT_TYPE *ioptr, FFT_TYPE scale)
void rffts1(FFT_TYPE *ioptr, int M, FFT_TYPE *Utbl, short *BRLow)
void riffts1(FFT_TYPE *ioptr, int M, FFT_TYPE *Utbl, short *BRLow)
void fftCosInit(int M, FFT_TYPE *Utbl)
void bitrevR2(FFT_TYPE *ioptr, int M, short *inBRLow)