Subversion Repositories dashGPS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mjames 1
/* ----------------------------------------------------------------------
2
 * Project:      CMSIS DSP Library
3
 * Title:        arm_common_tables.c
4
 * Description:  common tables like fft twiddle factors, Bitreverse, reciprocal etc
5
 *
6
 * $Date:        27. January 2017
7
 * $Revision:    V.1.5.1
8
 *
9
 * Target Processor: Cortex-M cores
10
 * -------------------------------------------------------------------- */
11
/*
12
 * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
13
 *
14
 * SPDX-License-Identifier: Apache-2.0
15
 *
16
 * Licensed under the Apache License, Version 2.0 (the License); you may
17
 * not use this file except in compliance with the License.
18
 * You may obtain a copy of the License at
19
 *
20
 * www.apache.org/licenses/LICENSE-2.0
21
 *
22
 * Unless required by applicable law or agreed to in writing, software
23
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
 * See the License for the specific language governing permissions and
26
 * limitations under the License.
27
 */
28
 
29
#include "arm_math.h"
30
#include "arm_common_tables.h"
31
 
32
/**
33
 * @ingroup ComplexFFT
34
 */
35
 
36
/**
37
 * @addtogroup CFFT_CIFFT Complex FFT Tables
38
 * @{
39
 */
40
 
41
/**
42
* \par
43
* Pseudo code for Generation of Bit reversal Table is
44
* \par
45
* <pre>for(l=1;l <= N/4;l++)
46
* {
47
*   for(i=0;i<logN2;i++)
48
*   {
49
*     a[i]=l&(1<<i);
50
*   }
51
*   for(j=0; j<logN2; j++)
52
*   {
53
*     if (a[j]!=0)
54
*     y[l]+=(1<<((logN2-1)-j));
55
*   }
56
*   y[l] = y[l] >> 1;
57
*  } </pre>
58
* \par
59
* where N = 4096        logN2 = 12
60
* \par
61
* N is the maximum FFT Size supported
62
*/
63
 
64
/*
65
* @brief  Table for bit reversal process
66
*/
67
const uint16_t armBitRevTable[1024] = {
68
   0x400, 0x200, 0x600, 0x100, 0x500, 0x300, 0x700, 0x80, 0x480, 0x280,
69
   0x680, 0x180, 0x580, 0x380, 0x780, 0x40, 0x440, 0x240, 0x640, 0x140,
70
   0x540, 0x340, 0x740, 0xc0, 0x4c0, 0x2c0, 0x6c0, 0x1c0, 0x5c0, 0x3c0,
71
   0x7c0, 0x20, 0x420, 0x220, 0x620, 0x120, 0x520, 0x320, 0x720, 0xa0,
72
   0x4a0, 0x2a0, 0x6a0, 0x1a0, 0x5a0, 0x3a0, 0x7a0, 0x60, 0x460, 0x260,
73
   0x660, 0x160, 0x560, 0x360, 0x760, 0xe0, 0x4e0, 0x2e0, 0x6e0, 0x1e0,
74
   0x5e0, 0x3e0, 0x7e0, 0x10, 0x410, 0x210, 0x610, 0x110, 0x510, 0x310,
75
   0x710, 0x90, 0x490, 0x290, 0x690, 0x190, 0x590, 0x390, 0x790, 0x50,
76
   0x450, 0x250, 0x650, 0x150, 0x550, 0x350, 0x750, 0xd0, 0x4d0, 0x2d0,
77
   0x6d0, 0x1d0, 0x5d0, 0x3d0, 0x7d0, 0x30, 0x430, 0x230, 0x630, 0x130,
78
   0x530, 0x330, 0x730, 0xb0, 0x4b0, 0x2b0, 0x6b0, 0x1b0, 0x5b0, 0x3b0,
79
   0x7b0, 0x70, 0x470, 0x270, 0x670, 0x170, 0x570, 0x370, 0x770, 0xf0,
80
   0x4f0, 0x2f0, 0x6f0, 0x1f0, 0x5f0, 0x3f0, 0x7f0, 0x8, 0x408, 0x208,
81
   0x608, 0x108, 0x508, 0x308, 0x708, 0x88, 0x488, 0x288, 0x688, 0x188,
82
   0x588, 0x388, 0x788, 0x48, 0x448, 0x248, 0x648, 0x148, 0x548, 0x348,
83
   0x748, 0xc8, 0x4c8, 0x2c8, 0x6c8, 0x1c8, 0x5c8, 0x3c8, 0x7c8, 0x28,
84
   0x428, 0x228, 0x628, 0x128, 0x528, 0x328, 0x728, 0xa8, 0x4a8, 0x2a8,
85
   0x6a8, 0x1a8, 0x5a8, 0x3a8, 0x7a8, 0x68, 0x468, 0x268, 0x668, 0x168,
86
   0x568, 0x368, 0x768, 0xe8, 0x4e8, 0x2e8, 0x6e8, 0x1e8, 0x5e8, 0x3e8,
87
   0x7e8, 0x18, 0x418, 0x218, 0x618, 0x118, 0x518, 0x318, 0x718, 0x98,
88
   0x498, 0x298, 0x698, 0x198, 0x598, 0x398, 0x798, 0x58, 0x458, 0x258,
89
   0x658, 0x158, 0x558, 0x358, 0x758, 0xd8, 0x4d8, 0x2d8, 0x6d8, 0x1d8,
90
   0x5d8, 0x3d8, 0x7d8, 0x38, 0x438, 0x238, 0x638, 0x138, 0x538, 0x338,
91
   0x738, 0xb8, 0x4b8, 0x2b8, 0x6b8, 0x1b8, 0x5b8, 0x3b8, 0x7b8, 0x78,
92
   0x478, 0x278, 0x678, 0x178, 0x578, 0x378, 0x778, 0xf8, 0x4f8, 0x2f8,
93
   0x6f8, 0x1f8, 0x5f8, 0x3f8, 0x7f8, 0x4, 0x404, 0x204, 0x604, 0x104,
94
   0x504, 0x304, 0x704, 0x84, 0x484, 0x284, 0x684, 0x184, 0x584, 0x384,
95
   0x784, 0x44, 0x444, 0x244, 0x644, 0x144, 0x544, 0x344, 0x744, 0xc4,
96
   0x4c4, 0x2c4, 0x6c4, 0x1c4, 0x5c4, 0x3c4, 0x7c4, 0x24, 0x424, 0x224,
97
   0x624, 0x124, 0x524, 0x324, 0x724, 0xa4, 0x4a4, 0x2a4, 0x6a4, 0x1a4,
98
   0x5a4, 0x3a4, 0x7a4, 0x64, 0x464, 0x264, 0x664, 0x164, 0x564, 0x364,
99
   0x764, 0xe4, 0x4e4, 0x2e4, 0x6e4, 0x1e4, 0x5e4, 0x3e4, 0x7e4, 0x14,
100
   0x414, 0x214, 0x614, 0x114, 0x514, 0x314, 0x714, 0x94, 0x494, 0x294,
101
   0x694, 0x194, 0x594, 0x394, 0x794, 0x54, 0x454, 0x254, 0x654, 0x154,
102
   0x554, 0x354, 0x754, 0xd4, 0x4d4, 0x2d4, 0x6d4, 0x1d4, 0x5d4, 0x3d4,
103
   0x7d4, 0x34, 0x434, 0x234, 0x634, 0x134, 0x534, 0x334, 0x734, 0xb4,
104
   0x4b4, 0x2b4, 0x6b4, 0x1b4, 0x5b4, 0x3b4, 0x7b4, 0x74, 0x474, 0x274,
105
   0x674, 0x174, 0x574, 0x374, 0x774, 0xf4, 0x4f4, 0x2f4, 0x6f4, 0x1f4,
106
   0x5f4, 0x3f4, 0x7f4, 0xc, 0x40c, 0x20c, 0x60c, 0x10c, 0x50c, 0x30c,
107
   0x70c, 0x8c, 0x48c, 0x28c, 0x68c, 0x18c, 0x58c, 0x38c, 0x78c, 0x4c,
108
   0x44c, 0x24c, 0x64c, 0x14c, 0x54c, 0x34c, 0x74c, 0xcc, 0x4cc, 0x2cc,
109
   0x6cc, 0x1cc, 0x5cc, 0x3cc, 0x7cc, 0x2c, 0x42c, 0x22c, 0x62c, 0x12c,
110
   0x52c, 0x32c, 0x72c, 0xac, 0x4ac, 0x2ac, 0x6ac, 0x1ac, 0x5ac, 0x3ac,
111
   0x7ac, 0x6c, 0x46c, 0x26c, 0x66c, 0x16c, 0x56c, 0x36c, 0x76c, 0xec,
112
   0x4ec, 0x2ec, 0x6ec, 0x1ec, 0x5ec, 0x3ec, 0x7ec, 0x1c, 0x41c, 0x21c,
113
   0x61c, 0x11c, 0x51c, 0x31c, 0x71c, 0x9c, 0x49c, 0x29c, 0x69c, 0x19c,
114
   0x59c, 0x39c, 0x79c, 0x5c, 0x45c, 0x25c, 0x65c, 0x15c, 0x55c, 0x35c,
115
   0x75c, 0xdc, 0x4dc, 0x2dc, 0x6dc, 0x1dc, 0x5dc, 0x3dc, 0x7dc, 0x3c,
116
   0x43c, 0x23c, 0x63c, 0x13c, 0x53c, 0x33c, 0x73c, 0xbc, 0x4bc, 0x2bc,
117
   0x6bc, 0x1bc, 0x5bc, 0x3bc, 0x7bc, 0x7c, 0x47c, 0x27c, 0x67c, 0x17c,
118
   0x57c, 0x37c, 0x77c, 0xfc, 0x4fc, 0x2fc, 0x6fc, 0x1fc, 0x5fc, 0x3fc,
119
   0x7fc, 0x2, 0x402, 0x202, 0x602, 0x102, 0x502, 0x302, 0x702, 0x82,
120
   0x482, 0x282, 0x682, 0x182, 0x582, 0x382, 0x782, 0x42, 0x442, 0x242,
121
   0x642, 0x142, 0x542, 0x342, 0x742, 0xc2, 0x4c2, 0x2c2, 0x6c2, 0x1c2,
122
   0x5c2, 0x3c2, 0x7c2, 0x22, 0x422, 0x222, 0x622, 0x122, 0x522, 0x322,
123
   0x722, 0xa2, 0x4a2, 0x2a2, 0x6a2, 0x1a2, 0x5a2, 0x3a2, 0x7a2, 0x62,
124
   0x462, 0x262, 0x662, 0x162, 0x562, 0x362, 0x762, 0xe2, 0x4e2, 0x2e2,
125
   0x6e2, 0x1e2, 0x5e2, 0x3e2, 0x7e2, 0x12, 0x412, 0x212, 0x612, 0x112,
126
   0x512, 0x312, 0x712, 0x92, 0x492, 0x292, 0x692, 0x192, 0x592, 0x392,
127
   0x792, 0x52, 0x452, 0x252, 0x652, 0x152, 0x552, 0x352, 0x752, 0xd2,
128
   0x4d2, 0x2d2, 0x6d2, 0x1d2, 0x5d2, 0x3d2, 0x7d2, 0x32, 0x432, 0x232,
129
   0x632, 0x132, 0x532, 0x332, 0x732, 0xb2, 0x4b2, 0x2b2, 0x6b2, 0x1b2,
130
   0x5b2, 0x3b2, 0x7b2, 0x72, 0x472, 0x272, 0x672, 0x172, 0x572, 0x372,
131
   0x772, 0xf2, 0x4f2, 0x2f2, 0x6f2, 0x1f2, 0x5f2, 0x3f2, 0x7f2, 0xa,
132
   0x40a, 0x20a, 0x60a, 0x10a, 0x50a, 0x30a, 0x70a, 0x8a, 0x48a, 0x28a,
133
   0x68a, 0x18a, 0x58a, 0x38a, 0x78a, 0x4a, 0x44a, 0x24a, 0x64a, 0x14a,
134
   0x54a, 0x34a, 0x74a, 0xca, 0x4ca, 0x2ca, 0x6ca, 0x1ca, 0x5ca, 0x3ca,
135
   0x7ca, 0x2a, 0x42a, 0x22a, 0x62a, 0x12a, 0x52a, 0x32a, 0x72a, 0xaa,
136
   0x4aa, 0x2aa, 0x6aa, 0x1aa, 0x5aa, 0x3aa, 0x7aa, 0x6a, 0x46a, 0x26a,
137
   0x66a, 0x16a, 0x56a, 0x36a, 0x76a, 0xea, 0x4ea, 0x2ea, 0x6ea, 0x1ea,
138
   0x5ea, 0x3ea, 0x7ea, 0x1a, 0x41a, 0x21a, 0x61a, 0x11a, 0x51a, 0x31a,
139
   0x71a, 0x9a, 0x49a, 0x29a, 0x69a, 0x19a, 0x59a, 0x39a, 0x79a, 0x5a,
140
   0x45a, 0x25a, 0x65a, 0x15a, 0x55a, 0x35a, 0x75a, 0xda, 0x4da, 0x2da,
141
   0x6da, 0x1da, 0x5da, 0x3da, 0x7da, 0x3a, 0x43a, 0x23a, 0x63a, 0x13a,
142
   0x53a, 0x33a, 0x73a, 0xba, 0x4ba, 0x2ba, 0x6ba, 0x1ba, 0x5ba, 0x3ba,
143
   0x7ba, 0x7a, 0x47a, 0x27a, 0x67a, 0x17a, 0x57a, 0x37a, 0x77a, 0xfa,
144
   0x4fa, 0x2fa, 0x6fa, 0x1fa, 0x5fa, 0x3fa, 0x7fa, 0x6, 0x406, 0x206,
145
   0x606, 0x106, 0x506, 0x306, 0x706, 0x86, 0x486, 0x286, 0x686, 0x186,
146
   0x586, 0x386, 0x786, 0x46, 0x446, 0x246, 0x646, 0x146, 0x546, 0x346,
147
   0x746, 0xc6, 0x4c6, 0x2c6, 0x6c6, 0x1c6, 0x5c6, 0x3c6, 0x7c6, 0x26,
148
   0x426, 0x226, 0x626, 0x126, 0x526, 0x326, 0x726, 0xa6, 0x4a6, 0x2a6,
149
   0x6a6, 0x1a6, 0x5a6, 0x3a6, 0x7a6, 0x66, 0x466, 0x266, 0x666, 0x166,
150
   0x566, 0x366, 0x766, 0xe6, 0x4e6, 0x2e6, 0x6e6, 0x1e6, 0x5e6, 0x3e6,
151
   0x7e6, 0x16, 0x416, 0x216, 0x616, 0x116, 0x516, 0x316, 0x716, 0x96,
152
   0x496, 0x296, 0x696, 0x196, 0x596, 0x396, 0x796, 0x56, 0x456, 0x256,
153
   0x656, 0x156, 0x556, 0x356, 0x756, 0xd6, 0x4d6, 0x2d6, 0x6d6, 0x1d6,
154
   0x5d6, 0x3d6, 0x7d6, 0x36, 0x436, 0x236, 0x636, 0x136, 0x536, 0x336,
155
   0x736, 0xb6, 0x4b6, 0x2b6, 0x6b6, 0x1b6, 0x5b6, 0x3b6, 0x7b6, 0x76,
156
   0x476, 0x276, 0x676, 0x176, 0x576, 0x376, 0x776, 0xf6, 0x4f6, 0x2f6,
157
   0x6f6, 0x1f6, 0x5f6, 0x3f6, 0x7f6, 0xe, 0x40e, 0x20e, 0x60e, 0x10e,
158
   0x50e, 0x30e, 0x70e, 0x8e, 0x48e, 0x28e, 0x68e, 0x18e, 0x58e, 0x38e,
159
   0x78e, 0x4e, 0x44e, 0x24e, 0x64e, 0x14e, 0x54e, 0x34e, 0x74e, 0xce,
160
   0x4ce, 0x2ce, 0x6ce, 0x1ce, 0x5ce, 0x3ce, 0x7ce, 0x2e, 0x42e, 0x22e,
161
   0x62e, 0x12e, 0x52e, 0x32e, 0x72e, 0xae, 0x4ae, 0x2ae, 0x6ae, 0x1ae,
162
   0x5ae, 0x3ae, 0x7ae, 0x6e, 0x46e, 0x26e, 0x66e, 0x16e, 0x56e, 0x36e,
163
   0x76e, 0xee, 0x4ee, 0x2ee, 0x6ee, 0x1ee, 0x5ee, 0x3ee, 0x7ee, 0x1e,
164
   0x41e, 0x21e, 0x61e, 0x11e, 0x51e, 0x31e, 0x71e, 0x9e, 0x49e, 0x29e,
165
   0x69e, 0x19e, 0x59e, 0x39e, 0x79e, 0x5e, 0x45e, 0x25e, 0x65e, 0x15e,
166
   0x55e, 0x35e, 0x75e, 0xde, 0x4de, 0x2de, 0x6de, 0x1de, 0x5de, 0x3de,
167
   0x7de, 0x3e, 0x43e, 0x23e, 0x63e, 0x13e, 0x53e, 0x33e, 0x73e, 0xbe,
168
   0x4be, 0x2be, 0x6be, 0x1be, 0x5be, 0x3be, 0x7be, 0x7e, 0x47e, 0x27e,
169
   0x67e, 0x17e, 0x57e, 0x37e, 0x77e, 0xfe, 0x4fe, 0x2fe, 0x6fe, 0x1fe,
170
   0x5fe, 0x3fe, 0x7fe, 0x1
171
};
172
 
173
 
174
/*
175
* @brief  Floating-point Twiddle factors Table Generation
176
*/
177
 
178
/**
179
* \par
180
* Example code for Floating-point Twiddle factors Generation:
181
* \par
182
* <pre>for(i = 0; i< N/; i++)
183
* {
184
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
185
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
186
* } </pre>
187
* \par
188
* where N = 16  and PI = 3.14159265358979
189
* \par
190
* Cos and Sin values are in interleaved fashion
191
*
192
*/
193
const float32_t twiddleCoef_16[32] = {
194
    1.000000000f,  0.000000000f,
195
    0.923879533f,  0.382683432f,
196
    0.707106781f,  0.707106781f,
197
    0.382683432f,  0.923879533f,
198
    0.000000000f,  1.000000000f,
199
   -0.382683432f,  0.923879533f,
200
   -0.707106781f,  0.707106781f,
201
   -0.923879533f,  0.382683432f,
202
   -1.000000000f,  0.000000000f,
203
   -0.923879533f, -0.382683432f,
204
   -0.707106781f, -0.707106781f,
205
   -0.382683432f, -0.923879533f,
206
   -0.000000000f, -1.000000000f,
207
    0.382683432f, -0.923879533f,
208
    0.707106781f, -0.707106781f,
209
    0.923879533f, -0.382683432f
210
};
211
 
212
/**
213
* \par
214
* Example code for Floating-point Twiddle factors Generation:
215
* \par
216
* <pre>for(i = 0; i< N/; i++)
217
* {
218
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
219
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
220
* } </pre>
221
* \par
222
* where N = 32  and PI = 3.14159265358979
223
* \par
224
* Cos and Sin values are in interleaved fashion
225
*
226
*/
227
const float32_t twiddleCoef_32[64] = {
228
    1.000000000f,  0.000000000f,
229
    0.980785280f,  0.195090322f,
230
    0.923879533f,  0.382683432f,
231
    0.831469612f,  0.555570233f,
232
    0.707106781f,  0.707106781f,
233
    0.555570233f,  0.831469612f,
234
    0.382683432f,  0.923879533f,
235
    0.195090322f,  0.980785280f,
236
    0.000000000f,  1.000000000f,
237
   -0.195090322f,  0.980785280f,
238
   -0.382683432f,  0.923879533f,
239
   -0.555570233f,  0.831469612f,
240
   -0.707106781f,  0.707106781f,
241
   -0.831469612f,  0.555570233f,
242
   -0.923879533f,  0.382683432f,
243
   -0.980785280f,  0.195090322f,
244
   -1.000000000f,  0.000000000f,
245
   -0.980785280f, -0.195090322f,
246
   -0.923879533f, -0.382683432f,
247
   -0.831469612f, -0.555570233f,
248
   -0.707106781f, -0.707106781f,
249
   -0.555570233f, -0.831469612f,
250
   -0.382683432f, -0.923879533f,
251
   -0.195090322f, -0.980785280f,
252
   -0.000000000f, -1.000000000f,
253
    0.195090322f, -0.980785280f,
254
    0.382683432f, -0.923879533f,
255
    0.555570233f, -0.831469612f,
256
    0.707106781f, -0.707106781f,
257
    0.831469612f, -0.555570233f,
258
    0.923879533f, -0.382683432f,
259
    0.980785280f, -0.195090322f
260
};
261
 
262
/**
263
* \par
264
* Example code for Floating-point Twiddle factors Generation:
265
* \par
266
* <pre>for(i = 0; i< N/; i++)
267
* {
268
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
269
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
270
* } </pre>
271
* \par
272
* where N = 64  and PI = 3.14159265358979
273
* \par
274
* Cos and Sin values are in interleaved fashion
275
*
276
*/
277
const float32_t twiddleCoef_64[128] = {
278
    1.000000000f,  0.000000000f,
279
    0.995184727f,  0.098017140f,
280
    0.980785280f,  0.195090322f,
281
    0.956940336f,  0.290284677f,
282
    0.923879533f,  0.382683432f,
283
    0.881921264f,  0.471396737f,
284
    0.831469612f,  0.555570233f,
285
    0.773010453f,  0.634393284f,
286
    0.707106781f,  0.707106781f,
287
    0.634393284f,  0.773010453f,
288
    0.555570233f,  0.831469612f,
289
    0.471396737f,  0.881921264f,
290
    0.382683432f,  0.923879533f,
291
    0.290284677f,  0.956940336f,
292
    0.195090322f,  0.980785280f,
293
    0.098017140f,  0.995184727f,
294
    0.000000000f,  1.000000000f,
295
   -0.098017140f,  0.995184727f,
296
   -0.195090322f,  0.980785280f,
297
   -0.290284677f,  0.956940336f,
298
   -0.382683432f,  0.923879533f,
299
   -0.471396737f,  0.881921264f,
300
   -0.555570233f,  0.831469612f,
301
   -0.634393284f,  0.773010453f,
302
   -0.707106781f,  0.707106781f,
303
   -0.773010453f,  0.634393284f,
304
   -0.831469612f,  0.555570233f,
305
   -0.881921264f,  0.471396737f,
306
   -0.923879533f,  0.382683432f,
307
   -0.956940336f,  0.290284677f,
308
   -0.980785280f,  0.195090322f,
309
   -0.995184727f,  0.098017140f,
310
   -1.000000000f,  0.000000000f,
311
   -0.995184727f, -0.098017140f,
312
   -0.980785280f, -0.195090322f,
313
   -0.956940336f, -0.290284677f,
314
   -0.923879533f, -0.382683432f,
315
   -0.881921264f, -0.471396737f,
316
   -0.831469612f, -0.555570233f,
317
   -0.773010453f, -0.634393284f,
318
   -0.707106781f, -0.707106781f,
319
   -0.634393284f, -0.773010453f,
320
   -0.555570233f, -0.831469612f,
321
   -0.471396737f, -0.881921264f,
322
   -0.382683432f, -0.923879533f,
323
   -0.290284677f, -0.956940336f,
324
   -0.195090322f, -0.980785280f,
325
   -0.098017140f, -0.995184727f,
326
   -0.000000000f, -1.000000000f,
327
    0.098017140f, -0.995184727f,
328
    0.195090322f, -0.980785280f,
329
    0.290284677f, -0.956940336f,
330
    0.382683432f, -0.923879533f,
331
    0.471396737f, -0.881921264f,
332
    0.555570233f, -0.831469612f,
333
    0.634393284f, -0.773010453f,
334
    0.707106781f, -0.707106781f,
335
    0.773010453f, -0.634393284f,
336
    0.831469612f, -0.555570233f,
337
    0.881921264f, -0.471396737f,
338
    0.923879533f, -0.382683432f,
339
    0.956940336f, -0.290284677f,
340
    0.980785280f, -0.195090322f,
341
    0.995184727f, -0.098017140f
342
};
343
 
344
/**
345
* \par
346
* Example code for Floating-point Twiddle factors Generation:
347
* \par
348
* <pre>for(i = 0; i< N/; i++)
349
* {
350
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
351
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
352
* } </pre>
353
* \par
354
* where N = 128 and PI = 3.14159265358979
355
* \par
356
* Cos and Sin values are in interleaved fashion
357
*
358
*/
359
 
360
const float32_t twiddleCoef_128[256] = {
361
    1.000000000f,  0.000000000f,
362
    0.998795456f,  0.049067674f,
363
    0.995184727f,  0.098017140f,
364
    0.989176510f,  0.146730474f,
365
    0.980785280f,  0.195090322f,
366
    0.970031253f,  0.242980180f,
367
    0.956940336f,  0.290284677f,
368
    0.941544065f,  0.336889853f,
369
    0.923879533f,  0.382683432f,
370
    0.903989293f,  0.427555093f,
371
    0.881921264f,  0.471396737f,
372
    0.857728610f,  0.514102744f,
373
    0.831469612f,  0.555570233f,
374
    0.803207531f,  0.595699304f,
375
    0.773010453f,  0.634393284f,
376
    0.740951125f,  0.671558955f,
377
    0.707106781f,  0.707106781f,
378
    0.671558955f,  0.740951125f,
379
    0.634393284f,  0.773010453f,
380
    0.595699304f,  0.803207531f,
381
    0.555570233f,  0.831469612f,
382
    0.514102744f,  0.857728610f,
383
    0.471396737f,  0.881921264f,
384
    0.427555093f,  0.903989293f,
385
    0.382683432f,  0.923879533f,
386
    0.336889853f,  0.941544065f,
387
    0.290284677f,  0.956940336f,
388
    0.242980180f,  0.970031253f,
389
    0.195090322f,  0.980785280f,
390
    0.146730474f,  0.989176510f,
391
    0.098017140f,  0.995184727f,
392
    0.049067674f,  0.998795456f,
393
    0.000000000f,  1.000000000f,
394
   -0.049067674f,  0.998795456f,
395
   -0.098017140f,  0.995184727f,
396
   -0.146730474f,  0.989176510f,
397
   -0.195090322f,  0.980785280f,
398
   -0.242980180f,  0.970031253f,
399
   -0.290284677f,  0.956940336f,
400
   -0.336889853f,  0.941544065f,
401
   -0.382683432f,  0.923879533f,
402
   -0.427555093f,  0.903989293f,
403
   -0.471396737f,  0.881921264f,
404
   -0.514102744f,  0.857728610f,
405
   -0.555570233f,  0.831469612f,
406
   -0.595699304f,  0.803207531f,
407
   -0.634393284f,  0.773010453f,
408
   -0.671558955f,  0.740951125f,
409
   -0.707106781f,  0.707106781f,
410
   -0.740951125f,  0.671558955f,
411
   -0.773010453f,  0.634393284f,
412
   -0.803207531f,  0.595699304f,
413
   -0.831469612f,  0.555570233f,
414
   -0.857728610f,  0.514102744f,
415
   -0.881921264f,  0.471396737f,
416
   -0.903989293f,  0.427555093f,
417
   -0.923879533f,  0.382683432f,
418
   -0.941544065f,  0.336889853f,
419
   -0.956940336f,  0.290284677f,
420
   -0.970031253f,  0.242980180f,
421
   -0.980785280f,  0.195090322f,
422
   -0.989176510f,  0.146730474f,
423
   -0.995184727f,  0.098017140f,
424
   -0.998795456f,  0.049067674f,
425
   -1.000000000f,  0.000000000f,
426
   -0.998795456f, -0.049067674f,
427
   -0.995184727f, -0.098017140f,
428
   -0.989176510f, -0.146730474f,
429
   -0.980785280f, -0.195090322f,
430
   -0.970031253f, -0.242980180f,
431
   -0.956940336f, -0.290284677f,
432
   -0.941544065f, -0.336889853f,
433
   -0.923879533f, -0.382683432f,
434
   -0.903989293f, -0.427555093f,
435
   -0.881921264f, -0.471396737f,
436
   -0.857728610f, -0.514102744f,
437
   -0.831469612f, -0.555570233f,
438
   -0.803207531f, -0.595699304f,
439
   -0.773010453f, -0.634393284f,
440
   -0.740951125f, -0.671558955f,
441
   -0.707106781f, -0.707106781f,
442
   -0.671558955f, -0.740951125f,
443
   -0.634393284f, -0.773010453f,
444
   -0.595699304f, -0.803207531f,
445
   -0.555570233f, -0.831469612f,
446
   -0.514102744f, -0.857728610f,
447
   -0.471396737f, -0.881921264f,
448
   -0.427555093f, -0.903989293f,
449
   -0.382683432f, -0.923879533f,
450
   -0.336889853f, -0.941544065f,
451
   -0.290284677f, -0.956940336f,
452
   -0.242980180f, -0.970031253f,
453
   -0.195090322f, -0.980785280f,
454
   -0.146730474f, -0.989176510f,
455
   -0.098017140f, -0.995184727f,
456
   -0.049067674f, -0.998795456f,
457
   -0.000000000f, -1.000000000f,
458
    0.049067674f, -0.998795456f,
459
    0.098017140f, -0.995184727f,
460
    0.146730474f, -0.989176510f,
461
    0.195090322f, -0.980785280f,
462
    0.242980180f, -0.970031253f,
463
    0.290284677f, -0.956940336f,
464
    0.336889853f, -0.941544065f,
465
    0.382683432f, -0.923879533f,
466
    0.427555093f, -0.903989293f,
467
    0.471396737f, -0.881921264f,
468
    0.514102744f, -0.857728610f,
469
    0.555570233f, -0.831469612f,
470
    0.595699304f, -0.803207531f,
471
    0.634393284f, -0.773010453f,
472
    0.671558955f, -0.740951125f,
473
    0.707106781f, -0.707106781f,
474
    0.740951125f, -0.671558955f,
475
    0.773010453f, -0.634393284f,
476
    0.803207531f, -0.595699304f,
477
    0.831469612f, -0.555570233f,
478
    0.857728610f, -0.514102744f,
479
    0.881921264f, -0.471396737f,
480
    0.903989293f, -0.427555093f,
481
    0.923879533f, -0.382683432f,
482
    0.941544065f, -0.336889853f,
483
    0.956940336f, -0.290284677f,
484
    0.970031253f, -0.242980180f,
485
    0.980785280f, -0.195090322f,
486
    0.989176510f, -0.146730474f,
487
    0.995184727f, -0.098017140f,
488
    0.998795456f, -0.049067674f
489
};
490
 
491
/**
492
* \par
493
* Example code for Floating-point Twiddle factors Generation:
494
* \par
495
* <pre>for(i = 0; i< N/; i++)
496
* {
497
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
498
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
499
* } </pre>
500
* \par
501
* where N = 256 and PI = 3.14159265358979
502
* \par
503
* Cos and Sin values are in interleaved fashion
504
*
505
*//**
506
* \par
507
* Example code for Floating-point Twiddle factors Generation:
508
* \par
509
* <pre>for(i = 0; i< N/; i++)
510
* {
511
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
512
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
513
* } </pre>
514
* \par
515
* where N = 512 and PI = 3.14159265358979
516
* \par
517
* Cos and Sin values are in interleaved fashion
518
*
519
*//**
520
* \par
521
* Example code for Floating-point Twiddle factors Generation:
522
* \par
523
* <pre>for(i = 0; i< N/; i++)
524
* {
525
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
526
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
527
* } </pre>
528
* \par
529
* where N = 1024        and PI = 3.14159265358979
530
* \par
531
* Cos and Sin values are in interleaved fashion
532
*
533
*//**
534
* \par
535
* Example code for Floating-point Twiddle factors Generation:
536
* \par
537
* <pre>for(i = 0; i< N/; i++)
538
* {
539
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
540
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
541
* } </pre>
542
* \par
543
* where N = 2048        and PI = 3.14159265358979
544
* \par
545
* Cos and Sin values are in interleaved fashion
546
*
547
*//**
548
* \par
549
* Example code for Floating-point Twiddle factors Generation:
550
* \par
551
* <pre>for(i = 0; i< N/; i++)
552
* {
553
*       twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
554
*       twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
555
* } </pre>
556
* \par
557
* where N = 4096        and PI = 3.14159265358979
558
* \par
559
* Cos and Sin values are in interleaved fashion
560
*
561
*//*
562
* @brief  Q31 Twiddle factors Table
563
*/
564
565
566
/**
567
* \par
568
* Example code for Q31 Twiddle factors Generation::
569
* \par
570
* <pre>for(i = 0; i< 3N/4; i++)
571
* {
572
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
573
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
574
* } </pre>
575
* \par
576
* where N = 16  and PI = 3.14159265358979
577
* \par
578
* Cos and Sin values are interleaved fashion
579
* \par
580
* Convert Floating point to Q31(Fixed point 1.31):
581
*       round(twiddleCoefQ31(i) * pow(2, 31))
582
*
583
*/
584
const q31_t twiddleCoef_16_q31[24] = {
585
    (q31_t)0x7FFFFFFF, (q31_t)0x00000000,
586
    (q31_t)0x7641AF3C, (q31_t)0x30FBC54D,
587
    (q31_t)0x5A82799A, (q31_t)0x5A82799A,
588
    (q31_t)0x30FBC54D, (q31_t)0x7641AF3C,
589
    (q31_t)0x00000000, (q31_t)0x7FFFFFFF,
590
    (q31_t)0xCF043AB2, (q31_t)0x7641AF3C,
591
    (q31_t)0xA57D8666, (q31_t)0x5A82799A,
592
    (q31_t)0x89BE50C3, (q31_t)0x30FBC54D,
593
    (q31_t)0x80000000, (q31_t)0x00000000,
594
    (q31_t)0x89BE50C3, (q31_t)0xCF043AB2,
595
    (q31_t)0xA57D8666, (q31_t)0xA57D8666,
596
    (q31_t)0xCF043AB2, (q31_t)0x89BE50C3
597
};
598
599
/**
600
* \par
601
* Example code for Q31 Twiddle factors Generation::
602
* \par
603
* <pre>for(i = 0; i< 3N/4; i++)
604
* {
605
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
606
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
607
* } </pre>
608
* \par
609
* where N = 32  and PI = 3.14159265358979
610
* \par
611
* Cos and Sin values are interleaved fashion
612
* \par
613
* Convert Floating point to Q31(Fixed point 1.31):
614
*       round(twiddleCoefQ31(i) * pow(2, 31))
615
*
616
*/
617
const q31_t twiddleCoef_32_q31[48] = {
618
    (q31_t)0x7FFFFFFF, (q31_t)0x00000000,
619
    (q31_t)0x7D8A5F3F, (q31_t)0x18F8B83C,
620
    (q31_t)0x7641AF3C, (q31_t)0x30FBC54D,
621
    (q31_t)0x6A6D98A4, (q31_t)0x471CECE6,
622
    (q31_t)0x5A82799A, (q31_t)0x5A82799A,
623
    (q31_t)0x471CECE6, (q31_t)0x6A6D98A4,
624
    (q31_t)0x30FBC54D, (q31_t)0x7641AF3C,
625
    (q31_t)0x18F8B83C, (q31_t)0x7D8A5F3F,
626
    (q31_t)0x00000000, (q31_t)0x7FFFFFFF,
627
    (q31_t)0xE70747C3, (q31_t)0x7D8A5F3F,
628
    (q31_t)0xCF043AB2, (q31_t)0x7641AF3C,
629
    (q31_t)0xB8E31319, (q31_t)0x6A6D98A4,
630
    (q31_t)0xA57D8666, (q31_t)0x5A82799A,
631
    (q31_t)0x9592675B, (q31_t)0x471CECE6,
632
    (q31_t)0x89BE50C3, (q31_t)0x30FBC54D,
633
    (q31_t)0x8275A0C0, (q31_t)0x18F8B83C,
634
    (q31_t)0x80000000, (q31_t)0x00000000,
635
    (q31_t)0x8275A0C0, (q31_t)0xE70747C3,
636
    (q31_t)0x89BE50C3, (q31_t)0xCF043AB2,
637
    (q31_t)0x9592675B, (q31_t)0xB8E31319,
638
    (q31_t)0xA57D8666, (q31_t)0xA57D8666,
639
    (q31_t)0xB8E31319, (q31_t)0x9592675B,
640
    (q31_t)0xCF043AB2, (q31_t)0x89BE50C3,
641
    (q31_t)0xE70747C3, (q31_t)0x8275A0C0
642
};
643
644
/**
645
* \par
646
* Example code for Q31 Twiddle factors Generation::
647
* \par
648
* <pre>for(i = 0; i< 3N/4; i++)
649
* {
650
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
651
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
652
* } </pre>
653
* \par
654
* where N = 64  and PI = 3.14159265358979
655
* \par
656
* Cos and Sin values are interleaved fashion
657
* \par
658
* Convert Floating point to Q31(Fixed point 1.31):
659
*       round(twiddleCoefQ31(i) * pow(2, 31))
660
*
661
*/
662
const q31_t twiddleCoef_64_q31[96] = {
663
        (q31_t)0x7FFFFFFF, (q31_t)0x00000000, (q31_t)0x7F62368F,
664
        (q31_t)0x0C8BD35E, (q31_t)0x7D8A5F3F, (q31_t)0x18F8B83C,
665
        (q31_t)0x7A7D055B, (q31_t)0x25280C5D, (q31_t)0x7641AF3C,
666
        (q31_t)0x30FBC54D, (q31_t)0x70E2CBC6, (q31_t)0x3C56BA70,
667
        (q31_t)0x6A6D98A4, (q31_t)0x471CECE6, (q31_t)0x62F201AC,
668
        (q31_t)0x5133CC94, (q31_t)0x5A82799A, (q31_t)0x5A82799A,
669
        (q31_t)0x5133CC94, (q31_t)0x62F201AC, (q31_t)0x471CECE6,
670
        (q31_t)0x6A6D98A4, (q31_t)0x3C56BA70, (q31_t)0x70E2CBC6,
671
        (q31_t)0x30FBC54D, (q31_t)0x7641AF3C, (q31_t)0x25280C5D,
672
        (q31_t)0x7A7D055B, (q31_t)0x18F8B83C, (q31_t)0x7D8A5F3F,
673
        (q31_t)0x0C8BD35E, (q31_t)0x7F62368F, (q31_t)0x00000000,
674
        (q31_t)0x7FFFFFFF, (q31_t)0xF3742CA1, (q31_t)0x7F62368F,
675
        (q31_t)0xE70747C3, (q31_t)0x7D8A5F3F, (q31_t)0xDAD7F3A2,
676
        (q31_t)0x7A7D055B, (q31_t)0xCF043AB2, (q31_t)0x7641AF3C,
677
        (q31_t)0xC3A9458F, (q31_t)0x70E2CBC6, (q31_t)0xB8E31319,
678
        (q31_t)0x6A6D98A4, (q31_t)0xAECC336B, (q31_t)0x62F201AC,
679
        (q31_t)0xA57D8666, (q31_t)0x5A82799A, (q31_t)0x9D0DFE53,
680
        (q31_t)0x5133CC94, (q31_t)0x9592675B, (q31_t)0x471CECE6,
681
        (q31_t)0x8F1D343A, (q31_t)0x3C56BA70, (q31_t)0x89BE50C3,
682
        (q31_t)0x30FBC54D, (q31_t)0x8582FAA4, (q31_t)0x25280C5D,
683
        (q31_t)0x8275A0C0, (q31_t)0x18F8B83C, (q31_t)0x809DC970,
684
        (q31_t)0x0C8BD35E, (q31_t)0x80000000, (q31_t)0x00000000,
685
        (q31_t)0x809DC970, (q31_t)0xF3742CA1, (q31_t)0x8275A0C0,
686
        (q31_t)0xE70747C3, (q31_t)0x8582FAA4, (q31_t)0xDAD7F3A2,
687
        (q31_t)0x89BE50C3, (q31_t)0xCF043AB2, (q31_t)0x8F1D343A,
688
        (q31_t)0xC3A9458F, (q31_t)0x9592675B, (q31_t)0xB8E31319,
689
        (q31_t)0x9D0DFE53, (q31_t)0xAECC336B, (q31_t)0xA57D8666,
690
        (q31_t)0xA57D8666, (q31_t)0xAECC336B, (q31_t)0x9D0DFE53,
691
        (q31_t)0xB8E31319, (q31_t)0x9592675B, (q31_t)0xC3A9458F,
692
        (q31_t)0x8F1D343A, (q31_t)0xCF043AB2, (q31_t)0x89BE50C3,
693
        (q31_t)0xDAD7F3A2, (q31_t)0x8582FAA4, (q31_t)0xE70747C3,
694
        (q31_t)0x8275A0C0, (q31_t)0xF3742CA1, (q31_t)0x809DC970
695
};
696
697
/**
698
* \par
699
* Example code for Q31 Twiddle factors Generation::
700
* \par
701
* <pre>for(i = 0; i< 3N/4; i++)
702
* {
703
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
704
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
705
* } </pre>
706
* \par
707
* where N = 128 and PI = 3.14159265358979
708
* \par
709
* Cos and Sin values are interleaved fashion
710
* \par
711
* Convert Floating point to Q31(Fixed point 1.31):
712
*       round(twiddleCoefQ31(i) * pow(2, 31))
713
*
714
*/
715
const q31_t twiddleCoef_128_q31[192] = {
716
        (q31_t)0x7FFFFFFF, (q31_t)0x00000000, (q31_t)0x7FD8878D,
717
        (q31_t)0x0647D97C, (q31_t)0x7F62368F, (q31_t)0x0C8BD35E,
718
        (q31_t)0x7E9D55FC, (q31_t)0x12C8106E, (q31_t)0x7D8A5F3F,
719
        (q31_t)0x18F8B83C, (q31_t)0x7C29FBEE, (q31_t)0x1F19F97B,
720
        (q31_t)0x7A7D055B, (q31_t)0x25280C5D, (q31_t)0x78848413,
721
        (q31_t)0x2B1F34EB, (q31_t)0x7641AF3C, (q31_t)0x30FBC54D,
722
        (q31_t)0x73B5EBD0, (q31_t)0x36BA2013, (q31_t)0x70E2CBC6,
723
        (q31_t)0x3C56BA70, (q31_t)0x6DCA0D14, (q31_t)0x41CE1E64,
724
        (q31_t)0x6A6D98A4, (q31_t)0x471CECE6, (q31_t)0x66CF811F,
725
        (q31_t)0x4C3FDFF3, (q31_t)0x62F201AC, (q31_t)0x5133CC94,
726
        (q31_t)0x5ED77C89, (q31_t)0x55F5A4D2, (q31_t)0x5A82799A,
727
        (q31_t)0x5A82799A, (q31_t)0x55F5A4D2, (q31_t)0x5ED77C89,
728
        (q31_t)0x5133CC94, (q31_t)0x62F201AC, (q31_t)0x4C3FDFF3,
729
        (q31_t)0x66CF811F, (q31_t)0x471CECE6, (q31_t)0x6A6D98A4,
730
        (q31_t)0x41CE1E64, (q31_t)0x6DCA0D14, (q31_t)0x3C56BA70,
731
        (q31_t)0x70E2CBC6, (q31_t)0x36BA2013, (q31_t)0x73B5EBD0,
732
        (q31_t)0x30FBC54D, (q31_t)0x7641AF3C, (q31_t)0x2B1F34EB,
733
        (q31_t)0x78848413, (q31_t)0x25280C5D, (q31_t)0x7A7D055B,
734
        (q31_t)0x1F19F97B, (q31_t)0x7C29FBEE, (q31_t)0x18F8B83C,
735
        (q31_t)0x7D8A5F3F, (q31_t)0x12C8106E, (q31_t)0x7E9D55FC,
736
        (q31_t)0x0C8BD35E, (q31_t)0x7F62368F, (q31_t)0x0647D97C,
737
        (q31_t)0x7FD8878D, (q31_t)0x00000000, (q31_t)0x7FFFFFFF,
738
        (q31_t)0xF9B82683, (q31_t)0x7FD8878D, (q31_t)0xF3742CA1,
739
        (q31_t)0x7F62368F, (q31_t)0xED37EF91, (q31_t)0x7E9D55FC,
740
        (q31_t)0xE70747C3, (q31_t)0x7D8A5F3F, (q31_t)0xE0E60684,
741
        (q31_t)0x7C29FBEE, (q31_t)0xDAD7F3A2, (q31_t)0x7A7D055B,
742
        (q31_t)0xD4E0CB14, (q31_t)0x78848413, (q31_t)0xCF043AB2,
743
        (q31_t)0x7641AF3C, (q31_t)0xC945DFEC, (q31_t)0x73B5EBD0,
744
        (q31_t)0xC3A9458F, (q31_t)0x70E2CBC6, (q31_t)0xBE31E19B,
745
        (q31_t)0x6DCA0D14, (q31_t)0xB8E31319, (q31_t)0x6A6D98A4,
746
        (q31_t)0xB3C0200C, (q31_t)0x66CF811F, (q31_t)0xAECC336B,
747
        (q31_t)0x62F201AC, (q31_t)0xAA0A5B2D, (q31_t)0x5ED77C89,
748
        (q31_t)0xA57D8666, (q31_t)0x5A82799A, (q31_t)0xA1288376,
749
        (q31_t)0x55F5A4D2, (q31_t)0x9D0DFE53, (q31_t)0x5133CC94,
750
        (q31_t)0x99307EE0, (q31_t)0x4C3FDFF3, (q31_t)0x9592675B,
751
        (q31_t)0x471CECE6, (q31_t)0x9235F2EB, (q31_t)0x41CE1E64,
752
        (q31_t)0x8F1D343A, (q31_t)0x3C56BA70, (q31_t)0x8C4A142F,
753
        (q31_t)0x36BA2013, (q31_t)0x89BE50C3, (q31_t)0x30FBC54D,
754
        (q31_t)0x877B7BEC, (q31_t)0x2B1F34EB, (q31_t)0x8582FAA4,
755
        (q31_t)0x25280C5D, (q31_t)0x83D60411, (q31_t)0x1F19F97B,
756
        (q31_t)0x8275A0C0, (q31_t)0x18F8B83C, (q31_t)0x8162AA03,
757
        (q31_t)0x12C8106E, (q31_t)0x809DC970, (q31_t)0x0C8BD35E,
758
        (q31_t)0x80277872, (q31_t)0x0647D97C, (q31_t)0x80000000,
759
        (q31_t)0x00000000, (q31_t)0x80277872, (q31_t)0xF9B82683,
760
        (q31_t)0x809DC970, (q31_t)0xF3742CA1, (q31_t)0x8162AA03,
761
        (q31_t)0xED37EF91, (q31_t)0x8275A0C0, (q31_t)0xE70747C3,
762
        (q31_t)0x83D60411, (q31_t)0xE0E60684, (q31_t)0x8582FAA4,
763
        (q31_t)0xDAD7F3A2, (q31_t)0x877B7BEC, (q31_t)0xD4E0CB14,
764
 
765
        (q31_t)0xC945DFEC, (q31_t)0x8F1D343A, (q31_t)0xC3A9458F,
766
        (q31_t)0x9235F2EB, (q31_t)0xBE31E19B, (q31_t)0x9592675B,
767
        (q31_t)0xB8E31319, (q31_t)0x99307EE0, (q31_t)0xB3C0200C,
768
        (q31_t)0x9D0DFE53, (q31_t)0xAECC336B, (q31_t)0xA1288376,
769
        (q31_t)0xAA0A5B2D, (q31_t)0xA57D8666, (q31_t)0xA57D8666,
770
        (q31_t)0xAA0A5B2D, (q31_t)0xA1288376, (q31_t)0xAECC336B,
771
        (q31_t)0x9D0DFE53, (q31_t)0xB3C0200C, (q31_t)0x99307EE0,
772
        (q31_t)0xB8E31319, (q31_t)0x9592675B, (q31_t)0xBE31E19B,
773
        (q31_t)0x9235F2EB, (q31_t)0xC3A9458F, (q31_t)0x8F1D343A,
774
        (q31_t)0xC945DFEC, (q31_t)0x8C4A142F, (q31_t)0xCF043AB2,
775
        (q31_t)0x89BE50C3, (q31_t)0xD4E0CB14, (q31_t)0x877B7BEC,
776
        (q31_t)0xDAD7F3A2, (q31_t)0x8582FAA4, (q31_t)0xE0E60684,
777
        (q31_t)0x83D60411, (q31_t)0xE70747C3, (q31_t)0x8275A0C0,
778
        (q31_t)0xED37EF91, (q31_t)0x8162AA03, (q31_t)0xF3742CA1,
779
        (q31_t)0x809DC970, (q31_t)0xF9B82683, (q31_t)0x80277872
780
};
781
782
/**
783
* \par
784
* Example code for Q31 Twiddle factors Generation::
785
* \par
786
* <pre>for(i = 0; i< 3N/4; i++)
787
* {
788
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
789
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
790
* } </pre>
791
* \par
792
* where N = 256 and PI = 3.14159265358979
793
* \par
794
* Cos and Sin values are interleaved fashion
795
* \par
796
* Convert Floating point to Q31(Fixed point 1.31):
797
*       round(twiddleCoefQ31(i) * pow(2, 31))
798
*
799
*/
800
const q31_t twiddleCoef_256_q31[384] = {
801
        (q31_t)0x7FFFFFFF, (q31_t)0x00000000, (q31_t)0x7FF62182,
802
        (q31_t)0x03242ABF, (q31_t)0x7FD8878D, (q31_t)0x0647D97C,
803
        (q31_t)0x7FA736B4, (q31_t)0x096A9049, (q31_t)0x7F62368F,
804
        (q31_t)0x0C8BD35E, (q31_t)0x7F0991C3, (q31_t)0x0FAB272B,
805
        (q31_t)0x7E9D55FC, (q31_t)0x12C8106E, (q31_t)0x7E1D93E9,
806
        (q31_t)0x15E21444, (q31_t)0x7D8A5F3F, (q31_t)0x18F8B83C,
807
        (q31_t)0x7CE3CEB1, (q31_t)0x1C0B826A, (q31_t)0x7C29FBEE,
808
        (q31_t)0x1F19F97B, (q31_t)0x7B5D039D, (q31_t)0x2223A4C5,
809
        (q31_t)0x7A7D055B, (q31_t)0x25280C5D, (q31_t)0x798A23B1,
810
        (q31_t)0x2826B928, (q31_t)0x78848413, (q31_t)0x2B1F34EB,
811
        (q31_t)0x776C4EDB, (q31_t)0x2E110A62, (q31_t)0x7641AF3C,
812
        (q31_t)0x30FBC54D, (q31_t)0x7504D345, (q31_t)0x33DEF287,
813
        (q31_t)0x73B5EBD0, (q31_t)0x36BA2013, (q31_t)0x72552C84,
814
        (q31_t)0x398CDD32, (q31_t)0x70E2CBC6, (q31_t)0x3C56BA70,
815
        (q31_t)0x6F5F02B1, (q31_t)0x3F1749B7, (q31_t)0x6DCA0D14,
816
        (q31_t)0x41CE1E64, (q31_t)0x6C242960, (q31_t)0x447ACD50,
817
        (q31_t)0x6A6D98A4, (q31_t)0x471CECE6, (q31_t)0x68A69E81,
818
        (q31_t)0x49B41533, (q31_t)0x66CF811F, (q31_t)0x4C3FDFF3,
819
        (q31_t)0x64E88926, (q31_t)0x4EBFE8A4, (q31_t)0x62F201AC,
820
        (q31_t)0x5133CC94, (q31_t)0x60EC3830, (q31_t)0x539B2AEF,
821
        (q31_t)0x5ED77C89, (q31_t)0x55F5A4D2, (q31_t)0x5CB420DF,
822
        (q31_t)0x5842DD54, (q31_t)0x5A82799A, (q31_t)0x5A82799A,
823
        (q31_t)0x5842DD54, (q31_t)0x5CB420DF, (q31_t)0x55F5A4D2,
824
        (q31_t)0x5ED77C89, (q31_t)0x539B2AEF, (q31_t)0x60EC3830,
825
        (q31_t)0x5133CC94, (q31_t)0x62F201AC, (q31_t)0x4EBFE8A4,
826
        (q31_t)0x64E88926, (q31_t)0x4C3FDFF3, (q31_t)0x66CF811F,
827
        (q31_t)0x49B41533, (q31_t)0x68A69E81, (q31_t)0x471CECE6,
828
        (q31_t)0x6A6D98A4, (q31_t)0x447ACD50, (q31_t)0x6C242960,
829
        (q31_t)0x41CE1E64, (q31_t)0x6DCA0D14, (q31_t)0x3F1749B7,
830
        (q31_t)0x6F5F02B1, (q31_t)0x3C56BA70, (q31_t)0x70E2CBC6,
831
        (q31_t)0x398CDD32, (q31_t)0x72552C84, (q31_t)0x36BA2013,
832
        (q31_t)0x73B5EBD0, (q31_t)0x33DEF287, (q31_t)0x7504D345,
833
        (q31_t)0x30FBC54D, (q31_t)0x7641AF3C, (q31_t)0x2E110A62,
834
        (q31_t)0x776C4EDB, (q31_t)0x2B1F34EB, (q31_t)0x78848413,
835
        (q31_t)0x2826B928, (q31_t)0x798A23B1, (q31_t)0x25280C5D,
836
        (q31_t)0x7A7D055B, (q31_t)0x2223A4C5, (q31_t)0x7B5D039D,
837
        (q31_t)0x1F19F97B, (q31_t)0x7C29FBEE, (q31_t)0x1C0B826A,
838
        (q31_t)0x7CE3CEB1, (q31_t)0x18F8B83C, (q31_t)0x7D8A5F3F,
839
        (q31_t)0x15E21444, (q31_t)0x7E1D93E9, (q31_t)0x12C8106E,
840
        (q31_t)0x7E9D55FC, (q31_t)0x0FAB272B, (q31_t)0x7F0991C3,
841
        (q31_t)0x0C8BD35E, (q31_t)0x7F62368F, (q31_t)0x096A9049,
842
        (q31_t)0x7FA736B4, (q31_t)0x0647D97C, (q31_t)0x7FD8878D,
843
        (q31_t)0x03242ABF, (q31_t)0x7FF62182, (q31_t)0x00000000,
844
        (q31_t)0x7FFFFFFF, (q31_t)0xFCDBD541, (q31_t)0x7FF62182,
845
        (q31_t)0xF9B82683, (q31_t)0x7FD8878D, (q31_t)0xF6956FB6,
846
        (q31_t)0x7FA736B4, (q31_t)0xF3742CA1, (q31_t)0x7F62368F,
847
        (q31_t)0xF054D8D4, (q31_t)0x7F0991C3, (q31_t)0xED37EF91,
848
        (q31_t)0x7E9D55FC, (q31_t)0xEA1DEBBB, (q31_t)0x7E1D93E9,
849
        (q31_t)0xE70747C3, (q31_t)0x7D8A5F3F, (q31_t)0xE3F47D95,
850
        (q31_t)0x7CE3CEB1, (q31_t)0xE0E60684, (q31_t)0x7C29FBEE,
851
        (q31_t)0xDDDC5B3A, (q31_t)0x7B5D039D, (q31_t)0xDAD7F3A2,
852
        (q31_t)0x7A7D055B, (q31_t)0xD7D946D7, (q31_t)0x798A23B1,
853
        (q31_t)0xD4E0CB14, (q31_t)0x78848413, (q31_t)0xD1EEF59E,
854
        (q31_t)0x776C4EDB, (q31_t)0xCF043AB2, (q31_t)0x7641AF3C,
855
        (q31_t)0xCC210D78, (q31_t)0x7504D345, (q31_t)0xC945DFEC,
856
        (q31_t)0x73B5EBD0, (q31_t)0xC67322CD, (q31_t)0x72552C84,
857
        (q31_t)0xC3A9458F, (q31_t)0x70E2CBC6, (q31_t)0xC0E8B648,
858
        (q31_t)0x6F5F02B1, (q31_t)0xBE31E19B, (q31_t)0x6DCA0D14,
859
        (q31_t)0xBB8532AF, (q31_t)0x6C242960, (q31_t)0xB8E31319,
860
        (q31_t)0x6A6D98A4, (q31_t)0xB64BEACC, (q31_t)0x68A69E81,
861
        (q31_t)0xB3C0200C, (q31_t)0x66CF811F, (q31_t)0xB140175B,
862
        (q31_t)0x64E88926, (q31_t)0xAECC336B, (q31_t)0x62F201AC,
863
        (q31_t)0xAC64D510, (q31_t)0x60EC3830, (q31_t)0xAA0A5B2D,
864
        (q31_t)0x5ED77C89, (q31_t)0xA7BD22AB, (q31_t)0x5CB420DF,
865
        (q31_t)0xA57D8666, (q31_t)0x5A82799A, (q31_t)0xA34BDF20,
866
        (q31_t)0x5842DD54, (q31_t)0xA1288376, (q31_t)0x55F5A4D2,
867
        (q31_t)0x9F13C7D0, (q31_t)0x539B2AEF, (q31_t)0x9D0DFE53,
868
        (q31_t)0x5133CC94, (q31_t)0x9B1776D9, (q31_t)0x4EBFE8A4,
869
        (q31_t)0x99307EE0, (q31_t)0x4C3FDFF3, (q31_t)0x9759617E,
870
        (q31_t)0x49B41533, (q31_t)0x9592675B, (q31_t)0x471CECE6,
871
        (q31_t)0x93DBD69F, (q31_t)0x447ACD50, (q31_t)0x9235F2EB,
872
        (q31_t)0x41CE1E64, (q31_t)0x90A0FD4E, (q31_t)0x3F1749B7,
873
        (q31_t)0x8F1D343A, (q31_t)0x3C56BA70, (q31_t)0x8DAAD37B,
874
        (q31_t)0x398CDD32, (q31_t)0x8C4A142F, (q31_t)0x36BA2013,
875
        (q31_t)0x8AFB2CBA, (q31_t)0x33DEF287, (q31_t)0x89BE50C3,
876
        (q31_t)0x30FBC54D, (q31_t)0x8893B124, (q31_t)0x2E110A62,
877
        (q31_t)0x877B7BEC, (q31_t)0x2B1F34EB, (q31_t)0x8675DC4E,
878
        (q31_t)0x2826B928, (q31_t)0x8582FAA4, (q31_t)0x25280C5D,
879
        (q31_t)0x84A2FC62, (q31_t)0x2223A4C5, (q31_t)0x83D60411,
880
        (q31_t)0x1F19F97B, (q31_t)0x831C314E, (q31_t)0x1C0B826A,
881
        (q31_t)0x8275A0C0, (q31_t)0x18F8B83C, (q31_t)0x81E26C16,
882
        (q31_t)0x15E21444, (q31_t)0x8162AA03, (q31_t)0x12C8106E,
883
        (q31_t)0x80F66E3C, (q31_t)0x0FAB272B, (q31_t)0x809DC970,
884
        (q31_t)0x0C8BD35E, (q31_t)0x8058C94C, (q31_t)0x096A9049,
885
        (q31_t)0x80277872, (q31_t)0x0647D97C, (q31_t)0x8009DE7D,
886
        (q31_t)0x03242ABF, (q31_t)0x80000000, (q31_t)0x00000000,
887
        (q31_t)0x8009DE7D, (q31_t)0xFCDBD541, (q31_t)0x80277872,
888
        (q31_t)0xF9B82683, (q31_t)0x8058C94C, (q31_t)0xF6956FB6,
889
        (q31_t)0x809DC970, (q31_t)0xF3742CA1, (q31_t)0x80F66E3C,
890
        (q31_t)0xF054D8D4, (q31_t)0x8162AA03, (q31_t)0xED37EF91,
891
        (q31_t)0x81E26C16, (q31_t)0xEA1DEBBB, (q31_t)0x8275A0C0,
892
        (q31_t)0xE70747C3, (q31_t)0x831C314E, (q31_t)0xE3F47D95,
893
        (q31_t)0x83D60411, (q31_t)0xE0E60684, (q31_t)0x84A2FC62,
894
        (q31_t)0xDDDC5B3A, (q31_t)0x8582FAA4, (q31_t)0xDAD7F3A2,
895
        (q31_t)0x8675DC4E, (q31_t)0xD7D946D7, (q31_t)0x877B7BEC,
896
        (q31_t)0xD4E0CB14, (q31_t)0x8893B124, (q31_t)0xD1EEF59E,
897
        (q31_t)0x89BE50C3, (q31_t)0xCF043AB2, (q31_t)0x8AFB2CBA,
898
        (q31_t)0xCC210D78, (q31_t)0x8C4A142F, (q31_t)0xC945DFEC,
899
        (q31_t)0x8DAAD37B, (q31_t)0xC67322CD, (q31_t)0x8F1D343A,
900
        (q31_t)0xC3A9458F, (q31_t)0x90A0FD4E, (q31_t)0xC0E8B648,
901
        (q31_t)0x9235F2EB, (q31_t)0xBE31E19B, (q31_t)0x93DBD69F,
902
        (q31_t)0xBB8532AF, (q31_t)0x9592675B, (q31_t)0xB8E31319,
903
        (q31_t)0x9759617E, (q31_t)0xB64BEACC, (q31_t)0x99307EE0,
904
        (q31_t)0xB3C0200C, (q31_t)0x9B1776D9, (q31_t)0xB140175B,
905
        (q31_t)0x9D0DFE53, (q31_t)0xAECC336B, (q31_t)0x9F13C7D0,
906
        (q31_t)0xAC64D510, (q31_t)0xA1288376, (q31_t)0xAA0A5B2D,
907
        (q31_t)0xA34BDF20, (q31_t)0xA7BD22AB, (q31_t)0xA57D8666,
908
        (q31_t)0xA57D8666, (q31_t)0xA7BD22AB, (q31_t)0xA34BDF20,
909
        (q31_t)0xAA0A5B2D, (q31_t)0xA1288376, (q31_t)0xAC64D510,
910
        (q31_t)0x9F13C7D0, (q31_t)0xAECC336B, (q31_t)0x9D0DFE53,
911
        (q31_t)0xB140175B, (q31_t)0x9B1776D9, (q31_t)0xB3C0200C,
912
        (q31_t)0x99307EE0, (q31_t)0xB64BEACC, (q31_t)0x9759617E,
913
        (q31_t)0xB8E31319, (q31_t)0x9592675B, (q31_t)0xBB8532AF,
914
        (q31_t)0x93DBD69F, (q31_t)0xBE31E19B, (q31_t)0x9235F2EB,
915
        (q31_t)0xC0E8B648, (q31_t)0x90A0FD4E, (q31_t)0xC3A9458F,
916
        (q31_t)0x8F1D343A, (q31_t)0xC67322CD, (q31_t)0x8DAAD37B,
917
        (q31_t)0xC945DFEC, (q31_t)0x8C4A142F, (q31_t)0xCC210D78,
918
        (q31_t)0x8AFB2CBA, (q31_t)0xCF043AB2, (q31_t)0x89BE50C3,
919
        (q31_t)0xD1EEF59E, (q31_t)0x8893B124, (q31_t)0xD4E0CB14,
920
        (q31_t)0x877B7BEC, (q31_t)0xD7D946D7, (q31_t)0x8675DC4E,
921
        (q31_t)0xDAD7F3A2, (q31_t)0x8582FAA4, (q31_t)0xDDDC5B3A,
922
        (q31_t)0x84A2FC62, (q31_t)0xE0E60684, (q31_t)0x83D60411,
923
        (q31_t)0xE3F47D95, (q31_t)0x831C314E, (q31_t)0xE70747C3,
924
        (q31_t)0x8275A0C0, (q31_t)0xEA1DEBBB, (q31_t)0x81E26C16,
925
        (q31_t)0xED37EF91, (q31_t)0x8162AA03, (q31_t)0xF054D8D4,
926
        (q31_t)0x80F66E3C, (q31_t)0xF3742CA1, (q31_t)0x809DC970,
927
        (q31_t)0xF6956FB6, (q31_t)0x8058C94C, (q31_t)0xF9B82683,
928
        (q31_t)0x80277872, (q31_t)0xFCDBD541, (q31_t)0x8009DE7D
929
};
930
931
/**
932
* \par
933
* Example code for Q31 Twiddle factors Generation::
934
* \par
935
* <pre>for(i = 0; i< 3N/4; i++)
936
* {
937
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
938
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
939
* } </pre>
940
* \par
941
* where N = 512 and PI = 3.14159265358979
942
* \par
943
* Cos and Sin values are interleaved fashion
944
* \par
945
* Convert Floating point to Q31(Fixed point 1.31):
946
*       round(twiddleCoefQ31(i) * pow(2, 31))
947
*
948
*//**
949
* \par
950
* Example code for Q31 Twiddle factors Generation::
951
* \par
952
* <pre>for(i = 0; i< 3N/4; i++)
953
* {
954
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
955
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
956
* } </pre>
957
* \par
958
* where N = 1024        and PI = 3.14159265358979
959
* \par
960
* Cos and Sin values are interleaved fashion
961
* \par
962
* Convert Floating point to Q31(Fixed point 1.31):
963
*       round(twiddleCoefQ31(i) * pow(2, 31))
964
*
965
*//**
966
* \par
967
* Example code for Q31 Twiddle factors Generation::
968
* \par
969
* <pre>for(i = 0; i< 3N/4; i++)
970
* {
971
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
972
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
973
* } </pre>
974
* \par
975
* where N = 2048        and PI = 3.14159265358979
976
* \par
977
* Cos and Sin values are interleaved fashion
978
* \par
979
* Convert Floating point to Q31(Fixed point 1.31):
980
*       round(twiddleCoefQ31(i) * pow(2, 31))
981
*
982
*//**
983
* \par
984
* Example code for Q31 Twiddle factors Generation::
985
* \par
986
* <pre>for(i = 0; i< 3N/4; i++)
987
* {
988
*    twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N);
989
*    twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N);
990
* } </pre>
991
* \par
992
* where N = 4096        and PI = 3.14159265358979
993
* \par
994
* Cos and Sin values are interleaved fashion
995
* \par
996
* Convert Floating point to Q31(Fixed point 1.31):
997
*       round(twiddleCoefQ31(i) * pow(2, 31))
998
*
999
*//*
1000
* @brief  q15 Twiddle factors Table
1001
*/
1002
1003
1004
/**
1005
* \par
1006
* Example code for q15 Twiddle factors Generation::
1007
* \par
1008
* <pre>for(i = 0; i< 3N/4; i++)
1009
* {
1010
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1011
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1012
* } </pre>
1013
* \par
1014
* where N = 16  and PI = 3.14159265358979
1015
* \par
1016
* Cos and Sin values are interleaved fashion
1017
* \par
1018
* Convert Floating point to q15(Fixed point 1.15):
1019
*       round(twiddleCoefq15(i) * pow(2, 15))
1020
*
1021
*/
1022
const q15_t twiddleCoef_16_q15[24] = {
1023
    (q15_t)0x7FFF, (q15_t)0x0000,
1024
    (q15_t)0x7641, (q15_t)0x30FB,
1025
    (q15_t)0x5A82, (q15_t)0x5A82,
1026
    (q15_t)0x30FB, (q15_t)0x7641,
1027
    (q15_t)0x0000, (q15_t)0x7FFF,
1028
    (q15_t)0xCF04, (q15_t)0x7641,
1029
    (q15_t)0xA57D, (q15_t)0x5A82,
1030
    (q15_t)0x89BE, (q15_t)0x30FB,
1031
    (q15_t)0x8000, (q15_t)0x0000,
1032
    (q15_t)0x89BE, (q15_t)0xCF04,
1033
    (q15_t)0xA57D, (q15_t)0xA57D,
1034
    (q15_t)0xCF04, (q15_t)0x89BE
1035
};
1036
1037
/**
1038
* \par
1039
* Example code for q15 Twiddle factors Generation::
1040
* \par
1041
* <pre>for(i = 0; i< 3N/4; i++)
1042
* {
1043
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1044
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1045
* } </pre>
1046
* \par
1047
* where N = 32  and PI = 3.14159265358979
1048
* \par
1049
* Cos and Sin values are interleaved fashion
1050
* \par
1051
* Convert Floating point to q15(Fixed point 1.15):
1052
*       round(twiddleCoefq15(i) * pow(2, 15))
1053
*
1054
*/
1055
const q15_t twiddleCoef_32_q15[48] = {
1056
    (q15_t)0x7FFF, (q15_t)0x0000,
1057
    (q15_t)0x7D8A, (q15_t)0x18F8,
1058
    (q15_t)0x7641, (q15_t)0x30FB,
1059
    (q15_t)0x6A6D, (q15_t)0x471C,
1060
    (q15_t)0x5A82, (q15_t)0x5A82,
1061
    (q15_t)0x471C, (q15_t)0x6A6D,
1062
    (q15_t)0x30FB, (q15_t)0x7641,
1063
    (q15_t)0x18F8, (q15_t)0x7D8A,
1064
    (q15_t)0x0000, (q15_t)0x7FFF,
1065
    (q15_t)0xE707, (q15_t)0x7D8A,
1066
    (q15_t)0xCF04, (q15_t)0x7641,
1067
    (q15_t)0xB8E3, (q15_t)0x6A6D,
1068
    (q15_t)0xA57D, (q15_t)0x5A82,
1069
    (q15_t)0x9592, (q15_t)0x471C,
1070
    (q15_t)0x89BE, (q15_t)0x30FB,
1071
    (q15_t)0x8275, (q15_t)0x18F8,
1072
    (q15_t)0x8000, (q15_t)0x0000,
1073
    (q15_t)0x8275, (q15_t)0xE707,
1074
    (q15_t)0x89BE, (q15_t)0xCF04,
1075
    (q15_t)0x9592, (q15_t)0xB8E3,
1076
    (q15_t)0xA57D, (q15_t)0xA57D,
1077
    (q15_t)0xB8E3, (q15_t)0x9592,
1078
    (q15_t)0xCF04, (q15_t)0x89BE,
1079
    (q15_t)0xE707, (q15_t)0x8275
1080
};
1081
1082
/**
1083
* \par
1084
* Example code for q15 Twiddle factors Generation::
1085
* \par
1086
* <pre>for(i = 0; i< 3N/4; i++)
1087
* {
1088
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1089
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1090
* } </pre>
1091
* \par
1092
* where N = 64  and PI = 3.14159265358979
1093
* \par
1094
* Cos and Sin values are interleaved fashion
1095
* \par
1096
* Convert Floating point to q15(Fixed point 1.15):
1097
*       round(twiddleCoefq15(i) * pow(2, 15))
1098
*
1099
*/
1100
const q15_t twiddleCoef_64_q15[96] = {
1101
        (q15_t)0x7FFF, (q15_t)0x0000, (q15_t)0x7F62, (q15_t)0x0C8B,
1102
        (q15_t)0x7D8A, (q15_t)0x18F8, (q15_t)0x7A7D, (q15_t)0x2528,
1103
        (q15_t)0x7641, (q15_t)0x30FB, (q15_t)0x70E2, (q15_t)0x3C56,
1104
        (q15_t)0x6A6D, (q15_t)0x471C, (q15_t)0x62F2, (q15_t)0x5133,
1105
        (q15_t)0x5A82, (q15_t)0x5A82, (q15_t)0x5133, (q15_t)0x62F2,
1106
        (q15_t)0x471C, (q15_t)0x6A6D, (q15_t)0x3C56, (q15_t)0x70E2,
1107
        (q15_t)0x30FB, (q15_t)0x7641, (q15_t)0x2528, (q15_t)0x7A7D,
1108
        (q15_t)0x18F8, (q15_t)0x7D8A, (q15_t)0x0C8B, (q15_t)0x7F62,
1109
        (q15_t)0x0000, (q15_t)0x7FFF, (q15_t)0xF374, (q15_t)0x7F62,
1110
        (q15_t)0xE707, (q15_t)0x7D8A, (q15_t)0xDAD7, (q15_t)0x7A7D,
1111
        (q15_t)0xCF04, (q15_t)0x7641, (q15_t)0xC3A9, (q15_t)0x70E2,
1112
        (q15_t)0xB8E3, (q15_t)0x6A6D, (q15_t)0xAECC, (q15_t)0x62F2,
1113
        (q15_t)0xA57D, (q15_t)0x5A82, (q15_t)0x9D0D, (q15_t)0x5133,
1114
        (q15_t)0x9592, (q15_t)0x471C, (q15_t)0x8F1D, (q15_t)0x3C56,
1115
        (q15_t)0x89BE, (q15_t)0x30FB, (q15_t)0x8582, (q15_t)0x2528,
1116
        (q15_t)0x8275, (q15_t)0x18F8, (q15_t)0x809D, (q15_t)0x0C8B,
1117
        (q15_t)0x8000, (q15_t)0x0000, (q15_t)0x809D, (q15_t)0xF374,
1118
        (q15_t)0x8275, (q15_t)0xE707, (q15_t)0x8582, (q15_t)0xDAD7,
1119
        (q15_t)0x89BE, (q15_t)0xCF04, (q15_t)0x8F1D, (q15_t)0xC3A9,
1120
        (q15_t)0x9592, (q15_t)0xB8E3, (q15_t)0x9D0D, (q15_t)0xAECC,
1121
        (q15_t)0xA57D, (q15_t)0xA57D, (q15_t)0xAECC, (q15_t)0x9D0D,
1122
        (q15_t)0xB8E3, (q15_t)0x9592, (q15_t)0xC3A9, (q15_t)0x8F1D,
1123
        (q15_t)0xCF04, (q15_t)0x89BE, (q15_t)0xDAD7, (q15_t)0x8582,
1124
        (q15_t)0xE707, (q15_t)0x8275, (q15_t)0xF374, (q15_t)0x809D
1125
};
1126
1127
/**
1128
* \par
1129
* Example code for q15 Twiddle factors Generation::
1130
* \par
1131
* <pre>for(i = 0; i< 3N/4; i++)
1132
* {
1133
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1134
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1135
* } </pre>
1136
* \par
1137
* where N = 128 and PI = 3.14159265358979
1138
* \par
1139
* Cos and Sin values are interleaved fashion
1140
* \par
1141
* Convert Floating point to q15(Fixed point 1.15):
1142
*       round(twiddleCoefq15(i) * pow(2, 15))
1143
*
1144
*/
1145
const q15_t twiddleCoef_128_q15[192] = {
1146
        (q15_t)0x7FFF, (q15_t)0x0000, (q15_t)0x7FD8, (q15_t)0x0647,
1147
        (q15_t)0x7F62, (q15_t)0x0C8B, (q15_t)0x7E9D, (q15_t)0x12C8,
1148
        (q15_t)0x7D8A, (q15_t)0x18F8, (q15_t)0x7C29, (q15_t)0x1F19,
1149
        (q15_t)0x7A7D, (q15_t)0x2528, (q15_t)0x7884, (q15_t)0x2B1F,
1150
        (q15_t)0x7641, (q15_t)0x30FB, (q15_t)0x73B5, (q15_t)0x36BA,
1151
        (q15_t)0x70E2, (q15_t)0x3C56, (q15_t)0x6DCA, (q15_t)0x41CE,
1152
        (q15_t)0x6A6D, (q15_t)0x471C, (q15_t)0x66CF, (q15_t)0x4C3F,
1153
        (q15_t)0x62F2, (q15_t)0x5133, (q15_t)0x5ED7, (q15_t)0x55F5,
1154
        (q15_t)0x5A82, (q15_t)0x5A82, (q15_t)0x55F5, (q15_t)0x5ED7,
1155
        (q15_t)0x5133, (q15_t)0x62F2, (q15_t)0x4C3F, (q15_t)0x66CF,
1156
        (q15_t)0x471C, (q15_t)0x6A6D, (q15_t)0x41CE, (q15_t)0x6DCA,
1157
        (q15_t)0x3C56, (q15_t)0x70E2, (q15_t)0x36BA, (q15_t)0x73B5,
1158
        (q15_t)0x30FB, (q15_t)0x7641, (q15_t)0x2B1F, (q15_t)0x7884,
1159
        (q15_t)0x2528, (q15_t)0x7A7D, (q15_t)0x1F19, (q15_t)0x7C29,
1160
        (q15_t)0x18F8, (q15_t)0x7D8A, (q15_t)0x12C8, (q15_t)0x7E9D,
1161
        (q15_t)0x0C8B, (q15_t)0x7F62, (q15_t)0x0647, (q15_t)0x7FD8,
1162
        (q15_t)0x0000, (q15_t)0x7FFF, (q15_t)0xF9B8, (q15_t)0x7FD8,
1163
        (q15_t)0xF374, (q15_t)0x7F62, (q15_t)0xED37, (q15_t)0x7E9D,
1164
        (q15_t)0xE707, (q15_t)0x7D8A, (q15_t)0xE0E6, (q15_t)0x7C29,
1165
        (q15_t)0xDAD7, (q15_t)0x7A7D, (q15_t)0xD4E0, (q15_t)0x7884,
1166
        (q15_t)0xCF04, (q15_t)0x7641, (q15_t)0xC945, (q15_t)0x73B5,
1167
        (q15_t)0xC3A9, (q15_t)0x70E2, (q15_t)0xBE31, (q15_t)0x6DCA,
1168
        (q15_t)0xB8E3, (q15_t)0x6A6D, (q15_t)0xB3C0, (q15_t)0x66CF,
1169
        (q15_t)0xAECC, (q15_t)0x62F2, (q15_t)0xAA0A, (q15_t)0x5ED7,
1170
        (q15_t)0xA57D, (q15_t)0x5A82, (q15_t)0xA128, (q15_t)0x55F5,
1171
        (q15_t)0x9D0D, (q15_t)0x5133, (q15_t)0x9930, (q15_t)0x4C3F,
1172
        (q15_t)0x9592, (q15_t)0x471C, (q15_t)0x9235, (q15_t)0x41CE,
1173
        (q15_t)0x8F1D, (q15_t)0x3C56, (q15_t)0x8C4A, (q15_t)0x36BA,
1174
        (q15_t)0x89BE, (q15_t)0x30FB, (q15_t)0x877B, (q15_t)0x2B1F,
1175
        (q15_t)0x8582, (q15_t)0x2528, (q15_t)0x83D6, (q15_t)0x1F19,
1176
        (q15_t)0x8275, (q15_t)0x18F8, (q15_t)0x8162, (q15_t)0x12C8,
1177
        (q15_t)0x809D, (q15_t)0x0C8B, (q15_t)0x8027, (q15_t)0x0647,
1178
        (q15_t)0x8000, (q15_t)0x0000, (q15_t)0x8027, (q15_t)0xF9B8,
1179
        (q15_t)0x809D, (q15_t)0xF374, (q15_t)0x8162, (q15_t)0xED37,
1180
        (q15_t)0x8275, (q15_t)0xE707, (q15_t)0x83D6, (q15_t)0xE0E6,
1181
        (q15_t)0x8582, (q15_t)0xDAD7, (q15_t)0x877B, (q15_t)0xD4E0,
1182
        (q15_t)0x89BE, (q15_t)0xCF04, (q15_t)0x8C4A, (q15_t)0xC945,
1183
        (q15_t)0x8F1D, (q15_t)0xC3A9, (q15_t)0x9235, (q15_t)0xBE31,
1184
        (q15_t)0x9592, (q15_t)0xB8E3, (q15_t)0x9930, (q15_t)0xB3C0,
1185
        (q15_t)0x9D0D, (q15_t)0xAECC, (q15_t)0xA128, (q15_t)0xAA0A,
1186
        (q15_t)0xA57D, (q15_t)0xA57D, (q15_t)0xAA0A, (q15_t)0xA128,
1187
        (q15_t)0xAECC, (q15_t)0x9D0D, (q15_t)0xB3C0, (q15_t)0x9930,
1188
        (q15_t)0xB8E3, (q15_t)0x9592, (q15_t)0xBE31, (q15_t)0x9235,
1189
        (q15_t)0xC3A9, (q15_t)0x8F1D, (q15_t)0xC945, (q15_t)0x8C4A,
1190
        (q15_t)0xCF04, (q15_t)0x89BE, (q15_t)0xD4E0, (q15_t)0x877B,
1191
        (q15_t)0xDAD7, (q15_t)0x8582, (q15_t)0xE0E6, (q15_t)0x83D6,
1192
        (q15_t)0xE707, (q15_t)0x8275, (q15_t)0xED37, (q15_t)0x8162,
1193
        (q15_t)0xF374, (q15_t)0x809D, (q15_t)0xF9B8, (q15_t)0x8027
1194
};
1195
1196
/**
1197
* \par
1198
* Example code for q15 Twiddle factors Generation::
1199
* \par
1200
* <pre>for(i = 0; i< 3N/4; i++)
1201
* {
1202
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1203
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1204
* } </pre>
1205
* \par
1206
* where N = 256 and PI = 3.14159265358979
1207
* \par
1208
* Cos and Sin values are interleaved fashion
1209
* \par
1210
* Convert Floating point to q15(Fixed point 1.15):
1211
*       round(twiddleCoefq15(i) * pow(2, 15))
1212
*
1213
*/
1214
const q15_t twiddleCoef_256_q15[384] = {
1215
        (q15_t)0x7FFF, (q15_t)0x0000, (q15_t)0x7FF6, (q15_t)0x0324,
1216
        (q15_t)0x7FD8, (q15_t)0x0647, (q15_t)0x7FA7, (q15_t)0x096A,
1217
        (q15_t)0x7F62, (q15_t)0x0C8B, (q15_t)0x7F09, (q15_t)0x0FAB,
1218
        (q15_t)0x7E9D, (q15_t)0x12C8, (q15_t)0x7E1D, (q15_t)0x15E2,
1219
        (q15_t)0x7D8A, (q15_t)0x18F8, (q15_t)0x7CE3, (q15_t)0x1C0B,
1220
        (q15_t)0x7C29, (q15_t)0x1F19, (q15_t)0x7B5D, (q15_t)0x2223,
1221
        (q15_t)0x7A7D, (q15_t)0x2528, (q15_t)0x798A, (q15_t)0x2826,
1222
        (q15_t)0x7884, (q15_t)0x2B1F, (q15_t)0x776C, (q15_t)0x2E11,
1223
        (q15_t)0x7641, (q15_t)0x30FB, (q15_t)0x7504, (q15_t)0x33DE,
1224
        (q15_t)0x73B5, (q15_t)0x36BA, (q15_t)0x7255, (q15_t)0x398C,
1225
        (q15_t)0x70E2, (q15_t)0x3C56, (q15_t)0x6F5F, (q15_t)0x3F17,
1226
        (q15_t)0x6DCA, (q15_t)0x41CE, (q15_t)0x6C24, (q15_t)0x447A,
1227
        (q15_t)0x6A6D, (q15_t)0x471C, (q15_t)0x68A6, (q15_t)0x49B4,
1228
        (q15_t)0x66CF, (q15_t)0x4C3F, (q15_t)0x64E8, (q15_t)0x4EBF,
1229
        (q15_t)0x62F2, (q15_t)0x5133, (q15_t)0x60EC, (q15_t)0x539B,
1230
        (q15_t)0x5ED7, (q15_t)0x55F5, (q15_t)0x5CB4, (q15_t)0x5842,
1231
        (q15_t)0x5A82, (q15_t)0x5A82, (q15_t)0x5842, (q15_t)0x5CB4,
1232
        (q15_t)0x55F5, (q15_t)0x5ED7, (q15_t)0x539B, (q15_t)0x60EC,
1233
        (q15_t)0x5133, (q15_t)0x62F2, (q15_t)0x4EBF, (q15_t)0x64E8,
1234
        (q15_t)0x4C3F, (q15_t)0x66CF, (q15_t)0x49B4, (q15_t)0x68A6,
1235
        (q15_t)0x471C, (q15_t)0x6A6D, (q15_t)0x447A, (q15_t)0x6C24,
1236
        (q15_t)0x41CE, (q15_t)0x6DCA, (q15_t)0x3F17, (q15_t)0x6F5F,
1237
        (q15_t)0x3C56, (q15_t)0x70E2, (q15_t)0x398C, (q15_t)0x7255,
1238
        (q15_t)0x36BA, (q15_t)0x73B5, (q15_t)0x33DE, (q15_t)0x7504,
1239
        (q15_t)0x30FB, (q15_t)0x7641, (q15_t)0x2E11, (q15_t)0x776C,
1240
        (q15_t)0x2B1F, (q15_t)0x7884, (q15_t)0x2826, (q15_t)0x798A,
1241
        (q15_t)0x2528, (q15_t)0x7A7D, (q15_t)0x2223, (q15_t)0x7B5D,
1242
        (q15_t)0x1F19, (q15_t)0x7C29, (q15_t)0x1C0B, (q15_t)0x7CE3,
1243
        (q15_t)0x18F8, (q15_t)0x7D8A, (q15_t)0x15E2, (q15_t)0x7E1D,
1244
        (q15_t)0x12C8, (q15_t)0x7E9D, (q15_t)0x0FAB, (q15_t)0x7F09,
1245
        (q15_t)0x0C8B, (q15_t)0x7F62, (q15_t)0x096A, (q15_t)0x7FA7,
1246
        (q15_t)0x0647, (q15_t)0x7FD8, (q15_t)0x0324, (q15_t)0x7FF6,
1247
        (q15_t)0x0000, (q15_t)0x7FFF, (q15_t)0xFCDB, (q15_t)0x7FF6,
1248
        (q15_t)0xF9B8, (q15_t)0x7FD8, (q15_t)0xF695, (q15_t)0x7FA7,
1249
        (q15_t)0xF374, (q15_t)0x7F62, (q15_t)0xF054, (q15_t)0x7F09,
1250
        (q15_t)0xED37, (q15_t)0x7E9D, (q15_t)0xEA1D, (q15_t)0x7E1D,
1251
        (q15_t)0xE707, (q15_t)0x7D8A, (q15_t)0xE3F4, (q15_t)0x7CE3,
1252
        (q15_t)0xE0E6, (q15_t)0x7C29, (q15_t)0xDDDC, (q15_t)0x7B5D,
1253
        (q15_t)0xDAD7, (q15_t)0x7A7D, (q15_t)0xD7D9, (q15_t)0x798A,
1254
        (q15_t)0xD4E0, (q15_t)0x7884, (q15_t)0xD1EE, (q15_t)0x776C,
1255
        (q15_t)0xCF04, (q15_t)0x7641, (q15_t)0xCC21, (q15_t)0x7504,
1256
        (q15_t)0xC945, (q15_t)0x73B5, (q15_t)0xC673, (q15_t)0x7255,
1257
        (q15_t)0xC3A9, (q15_t)0x70E2, (q15_t)0xC0E8, (q15_t)0x6F5F,
1258
        (q15_t)0xBE31, (q15_t)0x6DCA, (q15_t)0xBB85, (q15_t)0x6C24,
1259
        (q15_t)0xB8E3, (q15_t)0x6A6D, (q15_t)0xB64B, (q15_t)0x68A6,
1260
        (q15_t)0xB3C0, (q15_t)0x66CF, (q15_t)0xB140, (q15_t)0x64E8,
1261
        (q15_t)0xAECC, (q15_t)0x62F2, (q15_t)0xAC64, (q15_t)0x60EC,
1262
        (q15_t)0xAA0A, (q15_t)0x5ED7, (q15_t)0xA7BD, (q15_t)0x5CB4,
1263
        (q15_t)0xA57D, (q15_t)0x5A82, (q15_t)0xA34B, (q15_t)0x5842,
1264
        (q15_t)0xA128, (q15_t)0x55F5, (q15_t)0x9F13, (q15_t)0x539B,
1265
        (q15_t)0x9D0D, (q15_t)0x5133, (q15_t)0x9B17, (q15_t)0x4EBF,
1266
        (q15_t)0x9930, (q15_t)0x4C3F, (q15_t)0x9759, (q15_t)0x49B4,
1267
        (q15_t)0x9592, (q15_t)0x471C, (q15_t)0x93DB, (q15_t)0x447A,
1268
        (q15_t)0x9235, (q15_t)0x41CE, (q15_t)0x90A0, (q15_t)0x3F17,
1269
        (q15_t)0x8F1D, (q15_t)0x3C56, (q15_t)0x8DAA, (q15_t)0x398C,
1270
        (q15_t)0x8C4A, (q15_t)0x36BA, (q15_t)0x8AFB, (q15_t)0x33DE,
1271
        (q15_t)0x89BE, (q15_t)0x30FB, (q15_t)0x8893, (q15_t)0x2E11,
1272
        (q15_t)0x877B, (q15_t)0x2B1F, (q15_t)0x8675, (q15_t)0x2826,
1273
        (q15_t)0x8582, (q15_t)0x2528, (q15_t)0x84A2, (q15_t)0x2223,
1274
        (q15_t)0x83D6, (q15_t)0x1F19, (q15_t)0x831C, (q15_t)0x1C0B,
1275
        (q15_t)0x8275, (q15_t)0x18F8, (q15_t)0x81E2, (q15_t)0x15E2,
1276
        (q15_t)0x8162, (q15_t)0x12C8, (q15_t)0x80F6, (q15_t)0x0FAB,
1277
        (q15_t)0x809D, (q15_t)0x0C8B, (q15_t)0x8058, (q15_t)0x096A,
1278
        (q15_t)0x8027, (q15_t)0x0647, (q15_t)0x8009, (q15_t)0x0324,
1279
        (q15_t)0x8000, (q15_t)0x0000, (q15_t)0x8009, (q15_t)0xFCDB,
1280
        (q15_t)0x8027, (q15_t)0xF9B8, (q15_t)0x8058, (q15_t)0xF695,
1281
        (q15_t)0x809D, (q15_t)0xF374, (q15_t)0x80F6, (q15_t)0xF054,
1282
        (q15_t)0x8162, (q15_t)0xED37, (q15_t)0x81E2, (q15_t)0xEA1D,
1283
        (q15_t)0x8275, (q15_t)0xE707, (q15_t)0x831C, (q15_t)0xE3F4,
1284
        (q15_t)0x83D6, (q15_t)0xE0E6, (q15_t)0x84A2, (q15_t)0xDDDC,
1285
        (q15_t)0x8582, (q15_t)0xDAD7, (q15_t)0x8675, (q15_t)0xD7D9,
1286
        (q15_t)0x877B, (q15_t)0xD4E0, (q15_t)0x8893, (q15_t)0xD1EE,
1287
        (q15_t)0x89BE, (q15_t)0xCF04, (q15_t)0x8AFB, (q15_t)0xCC21,
1288
        (q15_t)0x8C4A, (q15_t)0xC945, (q15_t)0x8DAA, (q15_t)0xC673,
1289
        (q15_t)0x8F1D, (q15_t)0xC3A9, (q15_t)0x90A0, (q15_t)0xC0E8,
1290
        (q15_t)0x9235, (q15_t)0xBE31, (q15_t)0x93DB, (q15_t)0xBB85,
1291
        (q15_t)0x9592, (q15_t)0xB8E3, (q15_t)0x9759, (q15_t)0xB64B,
1292
        (q15_t)0x9930, (q15_t)0xB3C0, (q15_t)0x9B17, (q15_t)0xB140,
1293
        (q15_t)0x9D0D, (q15_t)0xAECC, (q15_t)0x9F13, (q15_t)0xAC64,
1294
        (q15_t)0xA128, (q15_t)0xAA0A, (q15_t)0xA34B, (q15_t)0xA7BD,
1295
        (q15_t)0xA57D, (q15_t)0xA57D, (q15_t)0xA7BD, (q15_t)0xA34B,
1296
        (q15_t)0xAA0A, (q15_t)0xA128, (q15_t)0xAC64, (q15_t)0x9F13,
1297
        (q15_t)0xAECC, (q15_t)0x9D0D, (q15_t)0xB140, (q15_t)0x9B17,
1298
        (q15_t)0xB3C0, (q15_t)0x9930, (q15_t)0xB64B, (q15_t)0x9759,
1299
        (q15_t)0xB8E3, (q15_t)0x9592, (q15_t)0xBB85, (q15_t)0x93DB,
1300
        (q15_t)0xBE31, (q15_t)0x9235, (q15_t)0xC0E8, (q15_t)0x90A0,
1301
        (q15_t)0xC3A9, (q15_t)0x8F1D, (q15_t)0xC673, (q15_t)0x8DAA,
1302
        (q15_t)0xC945, (q15_t)0x8C4A, (q15_t)0xCC21, (q15_t)0x8AFB,
1303
        (q15_t)0xCF04, (q15_t)0x89BE, (q15_t)0xD1EE, (q15_t)0x8893,
1304
        (q15_t)0xD4E0, (q15_t)0x877B, (q15_t)0xD7D9, (q15_t)0x8675,
1305
        (q15_t)0xDAD7, (q15_t)0x8582, (q15_t)0xDDDC, (q15_t)0x84A2,
1306
        (q15_t)0xE0E6, (q15_t)0x83D6, (q15_t)0xE3F4, (q15_t)0x831C,
1307
        (q15_t)0xE707, (q15_t)0x8275, (q15_t)0xEA1D, (q15_t)0x81E2,
1308
        (q15_t)0xED37, (q15_t)0x8162, (q15_t)0xF054, (q15_t)0x80F6,
1309
        (q15_t)0xF374, (q15_t)0x809D, (q15_t)0xF695, (q15_t)0x8058,
1310
        (q15_t)0xF9B8, (q15_t)0x8027, (q15_t)0xFCDB, (q15_t)0x8009
1311
};
1312
1313
/**
1314
* \par
1315
* Example code for q15 Twiddle factors Generation::
1316
* \par
1317
* <pre>for(i = 0; i< 3N/4; i++)
1318
* {
1319
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1320
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1321
* } </pre>
1322
* \par
1323
* where N = 512 and PI = 3.14159265358979
1324
* \par
1325
* Cos and Sin values are interleaved fashion
1326
* \par
1327
* Convert Floating point to q15(Fixed point 1.15):
1328
*       round(twiddleCoefq15(i) * pow(2, 15))
1329
*
1330
*//**
1331
* \par
1332
* Example code for q15 Twiddle factors Generation::
1333
* \par
1334
* <pre>for(i = 0; i< 3N/4; i++)
1335
* {
1336
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1337
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1338
* } </pre>
1339
* \par
1340
* where N = 1024        and PI = 3.14159265358979
1341
* \par
1342
* Cos and Sin values are interleaved fashion
1343
* \par
1344
* Convert Floating point to q15(Fixed point 1.15):
1345
*       round(twiddleCoefq15(i) * pow(2, 15))
1346
*
1347
*//**
1348
* \par
1349
* Example code for q15 Twiddle factors Generation::
1350
* \par
1351
* <pre>for(i = 0; i< 3N/4; i++)
1352
* {
1353
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1354
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1355
* } </pre>
1356
* \par
1357
* where N = 2048        and PI = 3.14159265358979
1358
* \par
1359
* Cos and Sin values are interleaved fashion
1360
* \par
1361
* Convert Floating point to q15(Fixed point 1.15):
1362
*       round(twiddleCoefq15(i) * pow(2, 15))
1363
*
1364
*//**
1365
* \par
1366
* Example code for q15 Twiddle factors Generation::
1367
* \par
1368
* <pre>for(i = 0; i< 3N/4; i++)
1369
* {
1370
*    twiddleCoefq15[2*i]= cos(i * 2*PI/(float)N);
1371
*    twiddleCoefq15[2*i+1]= sin(i * 2*PI/(float)N);
1372
* } </pre>
1373
* \par
1374
* where N = 4096        and PI = 3.14159265358979
1375
* \par
1376
* Cos and Sin values are interleaved fashion
1377
* \par
1378
* Convert Floating point to q15(Fixed point 1.15):
1379
*       round(twiddleCoefq15(i) * pow(2, 15))
1380
*
1381
*//**
1382
* @} end of CFFT_CIFFT group
1383
*/
1384
1385
/*
1386
* @brief  Q15 table for reciprocal
1387
*/
1388
const q15_t ALIGN4 armRecipTableQ15[64] = {
1389
 0x7F03, 0x7D13, 0x7B31, 0x795E, 0x7798, 0x75E0,
1390
 0x7434, 0x7294, 0x70FF, 0x6F76, 0x6DF6, 0x6C82,
1391
 0x6B16, 0x69B5, 0x685C, 0x670C, 0x65C4, 0x6484,
1392
 0x634C, 0x621C, 0x60F3, 0x5FD0, 0x5EB5, 0x5DA0,
1393
 0x5C91, 0x5B88, 0x5A85, 0x5988, 0x5890, 0x579E,
1394
 0x56B0, 0x55C8, 0x54E4, 0x5405, 0x532B, 0x5255,
1395
 0x5183, 0x50B6, 0x4FEC, 0x4F26, 0x4E64, 0x4DA6,
1396
 0x4CEC, 0x4C34, 0x4B81, 0x4AD0, 0x4A23, 0x4978,
1397
 0x48D1, 0x482D, 0x478C, 0x46ED, 0x4651, 0x45B8,
1398
 0x4521, 0x448D, 0x43FC, 0x436C, 0x42DF, 0x4255,
1399
 0x41CC, 0x4146, 0x40C2, 0x4040
1400
};
1401
1402
/*
1403
* @brief  Q31 table for reciprocal
1404
*/
1405
const q31_t armRecipTableQ31[64] = {
1406
  0x7F03F03F, 0x7D137420, 0x7B31E739, 0x795E9F94, 0x7798FD29, 0x75E06928,
1407
  0x7434554D, 0x72943B4B, 0x70FF9C40, 0x6F760031, 0x6DF6F593, 0x6C8210E3,
1408
  0x6B16EC3A, 0x69B526F6, 0x685C655F, 0x670C505D, 0x65C4952D, 0x6484E519,
1409
  0x634CF53E, 0x621C7E4F, 0x60F33C61, 0x5FD0EEB3, 0x5EB55785, 0x5DA03BEB,
1410
  0x5C9163A1, 0x5B8898E6, 0x5A85A85A, 0x598860DF, 0x58909373, 0x579E1318,
1411
  0x56B0B4B8, 0x55C84F0B, 0x54E4BA80, 0x5405D124, 0x532B6E8F, 0x52556FD0,
1412
  0x5183B35A, 0x50B618F3, 0x4FEC81A2, 0x4F26CFA2, 0x4E64E64E, 0x4DA6AA1D,
1413
  0x4CEC008B, 0x4C34D010, 0x4B810016, 0x4AD078EF, 0x4A2323C4, 0x4978EA96,
1414
  0x48D1B827, 0x482D77FE, 0x478C1657, 0x46ED801D, 0x4651A2E5, 0x45B86CE2,
1415
  0x4521CCE1, 0x448DB244, 0x43FC0CFA, 0x436CCD78, 0x42DFE4B4, 0x42554426,
1416
  0x41CCDDB6, 0x4146A3C6, 0x40C28923, 0x40408102
1417
};
1418
1419
const uint16_t armBitRevIndexTable16[ARMBITREVINDEXTABLE_16_TABLE_LENGTH] =
1420
{
1421
   /* 8x2, size 20 */
1422
   8,64, 24,72, 16,64, 40,80, 32,64, 56,88, 48,72, 88,104, 72,96, 104,112
1423
};
1424
1425
const uint16_t armBitRevIndexTable32[ARMBITREVINDEXTABLE_32_TABLE_LENGTH] =
1426
{
1427
   /* 8x4, size 48 */
1428
   8,64, 16,128, 24,192, 32,64, 40,72, 48,136, 56,200, 64,128, 72,80, 88,208,
1429
   80,144, 96,192, 104,208, 112,152, 120,216, 136,192, 144,160, 168,208,
1430
   152,224, 176,208, 184,232, 216,240, 200,224, 232,240
1431
};
1432
1433
const uint16_t armBitRevIndexTable64[ARMBITREVINDEXTABLE_64_TABLE_LENGTH] =
1434
{
1435
   /* radix 8, size 56 */
1436
   8,64, 16,128, 24,192, 32,256, 40,320, 48,384, 56,448, 80,136, 88,200,
1437
   96,264, 104,328, 112,392, 120,456, 152,208, 160,272, 168,336, 176,400,
1438
   184,464, 224,280, 232,344, 240,408, 248,472, 296,352, 304,416, 312,480,
1439
   368,424, 376,488, 440,496
1440
};
1441
1442
const uint16_t armBitRevIndexTable128[ARMBITREVINDEXTABLE_128_TABLE_LENGTH] =
1443
{
1444
   /* 8x2, size 208 */
1445
   8,512, 16,64, 24,576, 32,128, 40,640, 48,192, 56,704, 64,256, 72,768,
1446
   80,320, 88,832, 96,384, 104,896, 112,448, 120,960, 128,512, 136,520,
1447
   144,768, 152,584, 160,520, 168,648, 176,200, 184,712, 192,264, 200,776,
1448
   208,328, 216,840, 224,392, 232,904, 240,456, 248,968, 264,528, 272,320,
1449
   280,592, 288,768, 296,656, 304,328, 312,720, 328,784, 344,848, 352,400,
1450
   360,912, 368,464, 376,976, 384,576, 392,536, 400,832, 408,600, 416,584,
1451
   424,664, 432,840, 440,728, 448,592, 456,792, 464,848, 472,856, 480,600,
1452
   488,920, 496,856, 504,984, 520,544, 528,576, 536,608, 552,672, 560,608,
1453
   568,736, 576,768, 584,800, 592,832, 600,864, 608,800, 616,928, 624,864,
1454
   632,992, 648,672, 656,896, 664,928, 688,904, 696,744, 704,896, 712,808,
1455
   720,912, 728,872, 736,928, 744,936, 752,920, 760,1000, 776,800, 784,832,
1456
   792,864, 808,904, 816,864, 824,920, 840,864, 856,880, 872,944, 888,1008,
1457
   904,928, 912,960, 920,992, 944,968, 952,1000, 968,992, 984,1008
1458
};
1459
1460
const uint16_t armBitRevIndexTable256[ARMBITREVINDEXTABLE_256_TABLE_LENGTH] =
1461
{
1462
   /* 8x4, size 440 */
1463
   8,512, 16,1024, 24,1536, 32,64, 40,576, 48,1088, 56,1600, 64,128, 72,640,
1464
   80,1152, 88,1664, 96,192, 104,704, 112,1216, 120,1728, 128,256, 136,768,
1465
   144,1280, 152,1792, 160,320, 168,832, 176,1344, 184,1856, 192,384,
1466
   200,896, 208,1408, 216,1920, 224,448, 232,960, 240,1472, 248,1984,
1467
   256,512, 264,520, 272,1032, 280,1544, 288,640, 296,584, 304,1096, 312,1608,
1468
   320,768, 328,648, 336,1160, 344,1672, 352,896, 360,712, 368,1224, 376,1736,
1469
   384,520, 392,776, 400,1288, 408,1800, 416,648, 424,840, 432,1352, 440,1864,
1470
   448,776, 456,904, 464,1416, 472,1928, 480,904, 488,968, 496,1480, 504,1992,
1471
   520,528, 512,1024, 528,1040, 536,1552, 544,1152, 552,592, 560,1104,
1472
   568,1616, 576,1280, 584,656, 592,1168, 600,1680, 608,1408, 616,720,
1473
   624,1232, 632,1744, 640,1032, 648,784, 656,1296, 664,1808, 672,1160,
1474
   680,848, 688,1360, 696,1872, 704,1288, 712,912, 720,1424, 728,1936,
1475
   736,1416, 744,976, 752,1488, 760,2000, 768,1536, 776,1552, 784,1048,
1476
   792,1560, 800,1664, 808,1680, 816,1112, 824,1624, 832,1792, 840,1808,
1477
   848,1176, 856,1688, 864,1920, 872,1936, 880,1240, 888,1752, 896,1544,
1478
   904,1560, 912,1304, 920,1816, 928,1672, 936,1688, 944,1368, 952,1880,
1479
   960,1800, 968,1816, 976,1432, 984,1944, 992,1928, 1000,1944, 1008,1496,
1480
   1016,2008, 1032,1152, 1040,1056, 1048,1568, 1064,1408, 1072,1120,
1481
   1080,1632, 1088,1536, 1096,1160, 1104,1184, 1112,1696, 1120,1552,
1482
   1128,1416, 1136,1248, 1144,1760, 1160,1664, 1168,1312, 1176,1824,
1483
   1184,1544, 1192,1920, 1200,1376, 1208,1888, 1216,1568, 1224,1672,
1484
   1232,1440, 1240,1952, 1248,1560, 1256,1928, 1264,1504, 1272,2016,
1485
   1288,1312, 1296,1408, 1304,1576, 1320,1424, 1328,1416, 1336,1640,
1486
   1344,1792, 1352,1824, 1360,1920, 1368,1704, 1376,1800, 1384,1432,
1487
   1392,1928, 1400,1768, 1416,1680, 1432,1832, 1440,1576, 1448,1936,
1488
   1456,1832, 1464,1896, 1472,1808, 1480,1688, 1488,1936, 1496,1960,
1489
   1504,1816, 1512,1944, 1520,1944, 1528,2024, 1560,1584, 1592,1648,
1490
   1600,1792, 1608,1920, 1616,1800, 1624,1712, 1632,1808, 1640,1936,
1491
   1648,1816, 1656,1776, 1672,1696, 1688,1840, 1704,1952, 1712,1928,
1492
   1720,1904, 1728,1824, 1736,1952, 1744,1832, 1752,1968, 1760,1840,
1493
   1768,1960, 1776,1944, 1784,2032, 1864,1872, 1848,1944, 1872,1888,
1494
   1880,1904, 1888,1984, 1896,2000, 1912,2032, 1904,2016, 1976,2032,
1495
   1960,1968, 2008,2032, 1992,2016, 2024,2032
1496
};
1497
1498
const uint16_t armBitRevIndexTable512[ARMBITREVINDEXTABLE_512_TABLE_LENGTH] =
1499
{
1500
   /* radix 8, size 448 */
1501
   8,512, 16,1024, 24,1536, 32,2048, 40,2560, 48,3072, 56,3584, 72,576,
1502
   80,1088, 88,1600, 96,2112, 104,2624, 112,3136, 120,3648, 136,640, 144,1152,
1503
   152,1664, 160,2176, 168,2688, 176,3200, 184,3712, 200,704, 208,1216,
1504
   216,1728, 224,2240, 232,2752, 240,3264, 248,3776, 264,768, 272,1280,
1505
   280,1792, 288,2304, 296,2816, 304,3328, 312,3840, 328,832, 336,1344,
1506
   344,1856, 352,2368, 360,2880, 368,3392, 376,3904, 392,896, 400,1408,
1507
   408,1920, 416,2432, 424,2944, 432,3456, 440,3968, 456,960, 464,1472,
1508
   472,1984, 480,2496, 488,3008, 496,3520, 504,4032, 528,1032, 536,1544,
1509
   544,2056, 552,2568, 560,3080, 568,3592, 592,1096, 600,1608, 608,2120,
1510
   616,2632, 624,3144, 632,3656, 656,1160, 664,1672, 672,2184, 680,2696,
1511
   688,3208, 696,3720, 720,1224, 728,1736, 736,2248, 744,2760, 752,3272,
1512
   760,3784, 784,1288, 792,1800, 800,2312, 808,2824, 816,3336, 824,3848,
1513
   848,1352, 856,1864, 864,2376, 872,2888, 880,3400, 888,3912, 912,1416,
1514
   920,1928, 928,2440, 936,2952, 944,3464, 952,3976, 976,1480, 984,1992,
1515
   992,2504, 1000,3016, 1008,3528, 1016,4040, 1048,1552, 1056,2064, 1064,2576,
1516
   1072,3088, 1080,3600, 1112,1616, 1120,2128, 1128,2640, 1136,3152,
1517
   1144,3664, 1176,1680, 1184,2192, 1192,2704, 1200,3216, 1208,3728,
1518
   1240,1744, 1248,2256, 1256,2768, 1264,3280, 1272,3792, 1304,1808,
1519
   1312,2320, 1320,2832, 1328,3344, 1336,3856, 1368,1872, 1376,2384,
1520
   1384,2896, 1392,3408, 1400,3920, 1432,1936, 1440,2448, 1448,2960,
1521
   1456,3472, 1464,3984, 1496,2000, 1504,2512, 1512,3024, 1520,3536,
1522
   1528,4048, 1568,2072, 1576,2584, 1584,3096, 1592,3608, 1632,2136,
1523
   1640,2648, 1648,3160, 1656,3672, 1696,2200, 1704,2712, 1712,3224,
1524
   1720,3736, 1760,2264, 1768,2776, 1776,3288, 1784,3800, 1824,2328,
1525
   1832,2840, 1840,3352, 1848,3864, 1888,2392, 1896,2904, 1904,3416,
1526
   1912,3928, 1952,2456, 1960,2968, 1968,3480, 1976,3992, 2016,2520,
1527
   2024,3032, 2032,3544, 2040,4056, 2088,2592, 2096,3104, 2104,3616,
1528
   2152,2656, 2160,3168, 2168,3680, 2216,2720, 2224,3232, 2232,3744,
1529
   2280,2784, 2288,3296, 2296,3808, 2344,2848, 2352,3360, 2360,3872,
1530
   2408,2912, 2416,3424, 2424,3936, 2472,2976, 2480,3488, 2488,4000,
1531
   2536,3040, 2544,3552, 2552,4064, 2608,3112, 2616,3624, 2672,3176,
1532
   2680,3688, 2736,3240, 2744,3752, 2800,3304, 2808,3816, 2864,3368,
1533
   2872,3880, 2928,3432, 2936,3944, 2992,3496, 3000,4008, 3056,3560,
1534
   3064,4072, 3128,3632, 3192,3696, 3256,3760, 3320,3824, 3384,3888,
1535
   3448,3952, 3512,4016, 3576,4080
1536
};
1537
1538
const uint16_t armBitRevIndexTable1024[ARMBITREVINDEXTABLE_1024_TABLE_LENGTH] =
1539
{
1540
   /* 8x2, size 1800 *//* 8x2, size 3808 *//* radix 8, size 4032 *//* radix 4, size 12 */
1541
   8,64, 16,32, 24,96, 40,80, 56,112, 88,104
1542
};
1543
1544
const uint16_t armBitRevIndexTable_fixed_32[ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH] =
1545
{
1546
   /* 4x2, size 24 */
1547
   8,128, 16,64, 24,192, 40,160, 48,96, 56,224, 72,144,
1548
   88,208, 104,176, 120,240, 152,200, 184,232
1549
};
1550
1551
const uint16_t armBitRevIndexTable_fixed_64[ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH] =
1552
{
1553
   /* radix 4, size 56 */
1554
   8,256, 16,128, 24,384, 32,64, 40,320, 48,192, 56,448, 72,288, 80,160, 88,416, 104,352,
1555
   112,224, 120,480, 136,272, 152,400, 168,336, 176,208, 184,464, 200,304, 216,432,
1556
   232,368, 248,496, 280,392, 296,328, 312,456, 344,424, 376,488, 440,472
1557
};
1558
1559
const uint16_t armBitRevIndexTable_fixed_128[ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH] =
1560
{
1561
   /* 4x2, size 112 */
1562
   8,512, 16,256, 24,768, 32,128, 40,640, 48,384, 56,896, 72,576, 80,320, 88,832, 96,192,
1563
   104,704, 112,448, 120,960, 136,544, 144,288, 152,800, 168,672, 176,416, 184,928, 200,608,
1564
   208,352, 216,864, 232,736, 240,480, 248,992, 264,528, 280,784, 296,656, 304,400, 312,912,
1565
   328,592, 344,848, 360,720, 368,464, 376,976, 392,560, 408,816, 424,688, 440,944, 456,624,
1566
   472,880, 488,752, 504,1008, 536,776, 552,648, 568,904, 600,840, 616,712, 632,968,
1567
   664,808, 696,936, 728,872, 760,1000, 824,920, 888,984
1568
};
1569
1570
const uint16_t armBitRevIndexTable_fixed_256[ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH] =
1571
{
1572
   /* radix 4, size 240 */
1573
   8,1024, 16,512, 24,1536, 32,256, 40,1280, 48,768, 56,1792, 64,128, 72,1152, 80,640,
1574
   88,1664, 96,384, 104,1408, 112,896, 120,1920, 136,1088, 144,576, 152,1600, 160,320,
1575
   168,1344, 176,832, 184,1856, 200,1216, 208,704, 216,1728, 224,448, 232,1472, 240,960,
1576
   248,1984, 264,1056, 272,544, 280,1568, 296,1312, 304,800, 312,1824, 328,1184, 336,672,
1577
   344,1696, 352,416, 360,1440, 368,928, 376,1952, 392,1120, 400,608, 408,1632, 424,1376,
1578
   432,864, 440,1888, 456,1248, 464,736, 472,1760, 488,1504, 496,992, 504,2016, 520,1040,
1579
   536,1552, 552,1296, 560,784, 568,1808, 584,1168, 592,656, 600,1680, 616,1424, 624,912,
1580
   632,1936, 648,1104, 664,1616, 680,1360, 688,848, 696,1872, 712,1232, 728,1744, 744,1488,
1581
   752,976, 760,2000, 776,1072, 792,1584, 808,1328, 824,1840, 840,1200, 856,1712, 872,1456,
1582
   880,944, 888,1968, 904,1136, 920,1648, 936,1392, 952,1904, 968,1264, 984,1776, 1000,1520,
1583
   1016,2032, 1048,1544, 1064,1288, 1080,1800, 1096,1160, 1112,1672, 1128,1416, 1144,1928,
1584
   1176,1608, 1192,1352, 1208,1864, 1240,1736, 1256,1480, 1272,1992, 1304,1576, 1336,1832,
1585
   1368,1704, 1384,1448, 1400,1960, 1432,1640, 1464,1896, 1496,1768, 1528,2024, 1592,1816,
1586
   1624,1688, 1656,1944, 1720,1880, 1784,2008, 1912,1976
1587
};
1588
1589
const uint16_t armBitRevIndexTable_fixed_512[ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH] =
1590
{
1591
   /* 4x2, size 480 */
1592
   8,2048, 16,1024, 24,3072, 32,512, 40,2560, 48,1536, 56,3584, 64,256, 72,2304, 80,1280,
1593
   88,3328, 96,768, 104,2816, 112,1792, 120,3840, 136,2176, 144,1152, 152,3200, 160,640,
1594
   168,2688, 176,1664, 184,3712, 192,384, 200,2432, 208,1408, 216,3456, 224,896, 232,2944,
1595
   240,1920, 248,3968, 264,2112, 272,1088, 280,3136, 288,576, 296,2624, 304,1600, 312,3648,
1596
   328,2368, 336,1344, 344,3392, 352,832, 360,2880, 368,1856, 376,3904, 392,2240, 400,1216,
1597
   408,3264, 416,704, 424,2752, 432,1728, 440,3776, 456,2496, 464,1472, 472,3520, 480,960,
1598
   488,3008, 496,1984, 504,4032, 520,2080, 528,1056, 536,3104, 552,2592, 560,1568, 568,3616,
1599
   584,2336, 592,1312, 600,3360, 608,800, 616,2848, 624,1824, 632,3872, 648,2208, 656,1184,
1600
   664,3232, 680,2720, 688,1696, 696,3744, 712,2464, 720,1440, 728,3488, 736,928, 744,2976,
1601
   752,1952, 760,4000, 776,2144, 784,1120, 792,3168, 808,2656, 816,1632, 824,3680, 840,2400,
1602
   848,1376, 856,3424, 872,2912, 880,1888, 888,3936, 904,2272, 912,1248, 920,3296, 936,2784,
1603
   944,1760, 952,3808, 968,2528, 976,1504, 984,3552, 1000,3040, 1008,2016, 1016,4064,
1604
   1032,2064, 1048,3088, 1064,2576, 1072,1552, 1080,3600, 1096,2320, 1104,1296, 1112,3344,
1605
   1128,2832, 1136,1808, 1144,3856, 1160,2192, 1176,3216, 1192,2704, 1200,1680, 1208,3728,
1606
   1224,2448, 1232,1424, 1240,3472, 1256,2960, 1264,1936, 1272,3984, 1288,2128, 1304,3152,
1607
   1320,2640, 1328,1616, 1336,3664, 1352,2384, 1368,3408, 1384,2896, 1392,1872, 1400,3920,
1608
   1416,2256, 1432,3280, 1448,2768, 1456,1744, 1464,3792, 1480,2512, 1496,3536, 1512,3024,
1609
   1520,2000, 1528,4048, 1544,2096, 1560,3120, 1576,2608, 1592,3632, 1608,2352, 1624,3376,
1610
   1640,2864, 1648,1840, 1656,3888, 1672,2224, 1688,3248, 1704,2736, 1720,3760, 1736,2480,
1611
   1752,3504, 1768,2992, 1776,1968, 1784,4016, 1800,2160, 1816,3184, 1832,2672, 1848,3696,
1612
   1864,2416, 1880,3440, 1896,2928, 1912,3952, 1928,2288, 1944,3312, 1960,2800, 1976,3824,
1613
   1992,2544, 2008,3568, 2024,3056, 2040,4080, 2072,3080, 2088,2568, 2104,3592, 2120,2312,
1614
   2136,3336, 2152,2824, 2168,3848, 2200,3208, 2216,2696, 2232,3720, 2248,2440, 2264,3464,
1615
   2280,2952, 2296,3976, 2328,3144, 2344,2632, 2360,3656, 2392,3400, 2408,2888, 2424,3912,
1616
   2456,3272, 2472,2760, 2488,3784, 2520,3528, 2536,3016, 2552,4040, 2584,3112, 2616,3624,
1617
   2648,3368, 2664,2856, 2680,3880, 2712,3240, 2744,3752, 2776,3496, 2792,2984, 2808,4008,
1618
   2840,3176, 2872,3688, 2904,3432, 2936,3944, 2968,3304, 3000,3816, 3032,3560, 3064,4072,
1619
   3128,3608, 3160,3352, 3192,3864, 3256,3736, 3288,3480, 3320,3992, 3384,3672, 3448,3928,
1620
   3512,3800, 3576,4056, 3704,3896, 3832,4024
1621
};
1622
1623
const uint16_t armBitRevIndexTable_fixed_1024[ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH] =
1624
{
1625
    /* radix 4, size 992 */
1626
    8,4096, 16,2048, 24,6144, 32,1024, 40,5120, 48,3072, 56,7168, 64,512, 72,4608,
1627
    80,2560, 88,6656, 96,1536, 104,5632, 112,3584, 120,7680, 128,256, 136,4352,
1628
    144,2304, 152,6400, 160,1280, 168,5376, 176,3328, 184,7424, 192,768, 200,4864,
1629
    208,2816, 216,6912, 224,1792, 232,5888, 240,3840, 248,7936, 264,4224, 272,2176,
1630
    280,6272, 288,1152, 296,5248, 304,3200, 312,7296, 320,640, 328,4736, 336,2688,
1631
    344,6784, 352,1664, 360,5760, 368,3712, 376,7808, 392,4480, 400,2432, 408,6528,
1632
    416,1408, 424,5504, 432,3456, 440,7552, 448,896, 456,4992, 464,2944, 472,7040,
1633
    480,1920, 488,6016, 496,3968, 504,8064, 520,4160, 528,2112, 536,6208, 544,1088,
1634
    552,5184, 560,3136, 568,7232, 584,4672, 592,2624, 600,6720, 608,1600, 616,5696,
1635
    624,3648, 632,7744, 648,4416, 656,2368, 664,6464, 672,1344, 680,5440, 688,3392,
1636
    696,7488, 704,832, 712,4928, 720,2880, 728,6976, 736,1856, 744,5952, 752,3904,
1637
    760,8000, 776,4288, 784,2240, 792,6336, 800,1216, 808,5312, 816,3264, 824,7360,
1638
    840,4800, 848,2752, 856,6848, 864,1728, 872,5824, 880,3776, 888,7872, 904,4544,
1639
    912,2496, 920,6592, 928,1472, 936,5568, 944,3520, 952,7616, 968,5056, 976,3008,
1640
    984,7104, 992,1984, 1000,6080, 1008,4032, 1016,8128, 1032,4128, 1040,2080,
1641
    1048,6176, 1064,5152, 1072,3104, 1080,7200, 1096,4640, 1104,2592, 1112,6688,
1642
    1120,1568, 1128,5664, 1136,3616, 1144,7712, 1160,4384, 1168,2336, 1176,6432,
1643
    1184,1312, 1192,5408, 1200,3360, 1208,7456, 1224,4896, 1232,2848, 1240,6944,
1644
    1248,1824, 1256,5920, 1264,3872, 1272,7968, 1288,4256, 1296,2208, 1304,6304,
1645
    1320,5280, 1328,3232, 1336,7328, 1352,4768, 1360,2720, 1368,6816, 1376,1696,
1646
    1384,5792, 1392,3744, 1400,7840, 1416,4512, 1424,2464, 1432,6560, 1448,5536,
1647
    1456,3488, 1464,7584, 1480,5024, 1488,2976, 1496,7072, 1504,1952, 1512,6048,
1648
    1520,4000, 1528,8096, 1544,4192, 1552,2144, 1560,6240, 1576,5216, 1584,3168,
1649
    1592,7264, 1608,4704, 1616,2656, 1624,6752, 1640,5728, 1648,3680, 1656,7776,
1650
    1672,4448, 1680,2400, 1688,6496, 1704,5472, 1712,3424, 1720,7520, 1736,4960,
1651
    1744,2912, 1752,7008, 1760,1888, 1768,5984, 1776,3936, 1784,8032, 1800,4320,
1652
    1808,2272, 1816,6368, 1832,5344, 1840,3296, 1848,7392, 1864,4832, 1872,2784,
1653
    1880,6880, 1896,5856, 1904,3808, 1912,7904, 1928,4576, 1936,2528, 1944,6624,
1654
    1960,5600, 1968,3552, 1976,7648, 1992,5088, 2000,3040, 2008,7136, 2024,6112,
1655
    2032,4064, 2040,8160, 2056,4112, 2072,6160, 2088,5136, 2096,3088, 2104,7184,
1656
    2120,4624, 2128,2576, 2136,6672, 2152,5648, 2160,3600, 2168,7696, 2184,4368,
1657
    2192,2320, 2200,6416, 2216,5392, 2224,3344, 2232,7440, 2248,4880, 2256,2832,
1658
    2264,6928, 2280,5904, 2288,3856, 2296,7952, 2312,4240, 2328,6288, 2344,5264,
1659
    2352,3216, 2360,7312, 2376,4752, 2384,2704, 2392,6800, 2408,5776, 2416,3728,
1660
    2424,7824, 2440,4496, 2456,6544, 2472,5520, 2480,3472, 2488,7568, 2504,5008,
1661
    2512,2960, 2520,7056, 2536,6032, 2544,3984, 2552,8080, 2568,4176, 2584,6224,
1662
    2600,5200, 2608,3152, 2616,7248, 2632,4688, 2648,6736, 2664,5712, 2672,3664,
1663
    2680,7760, 2696,4432, 2712,6480, 2728,5456, 2736,3408, 2744,7504, 2760,4944,
1664
    2768,2896, 2776,6992, 2792,5968, 2800,3920, 2808,8016, 2824,4304, 2840,6352,
1665
    2856,5328, 2864,3280, 2872,7376, 2888,4816, 2904,6864, 2920,5840, 2928,3792,
1666
    2936,7888, 2952,4560, 2968,6608, 2984,5584, 2992,3536, 3000,7632, 3016,5072,
1667
    3032,7120, 3048,6096, 3056,4048, 3064,8144, 3080,4144, 3096,6192, 3112,5168,
1668
    3128,7216, 3144,4656, 3160,6704, 3176,5680, 3184,3632, 3192,7728, 3208,4400,
1669
    3224,6448, 3240,5424, 3248,3376, 3256,7472, 3272,4912, 3288,6960, 3304,5936,
1670
    3312,3888, 3320,7984, 3336,4272, 3352,6320, 3368,5296, 3384,7344, 3400,4784,
1671
    3416,6832, 3432,5808, 3440,3760, 3448,7856, 3464,4528, 3480,6576, 3496,5552,
1672
    3512,7600, 3528,5040, 3544,7088, 3560,6064, 3568,4016, 3576,8112, 3592,4208,
1673
    3608,6256, 3624,5232, 3640,7280, 3656,4720, 3672,6768, 3688,5744, 3704,7792,
1674
    3720,4464, 3736,6512, 3752,5488, 3768,7536, 3784,4976, 3800,7024, 3816,6000,
1675
    3824,3952, 3832,8048, 3848,4336, 3864,6384, 3880,5360, 3896,7408, 3912,4848,
1676
    3928,6896, 3944,5872, 3960,7920, 3976,4592, 3992,6640, 4008,5616, 4024,7664,
1677
    4040,5104, 4056,7152, 4072,6128, 4088,8176, 4120,6152, 4136,5128, 4152,7176,
1678
    4168,4616, 4184,6664, 4200,5640, 4216,7688, 4232,4360, 4248,6408, 4264,5384,
1679
    4280,7432, 4296,4872, 4312,6920, 4328,5896, 4344,7944, 4376,6280, 4392,5256,
1680
    4408,7304, 4424,4744, 4440,6792, 4456,5768, 4472,7816, 4504,6536, 4520,5512,
1681
    4536,7560, 4552,5000, 4568,7048, 4584,6024, 4600,8072, 4632,6216, 4648,5192,
1682
    4664,7240, 4696,6728, 4712,5704, 4728,7752, 4760,6472, 4776,5448, 4792,7496,
1683
    4808,4936, 4824,6984, 4840,5960, 4856,8008, 4888,6344, 4904,5320, 4920,7368,
1684
    4952,6856, 4968,5832, 4984,7880, 5016,6600, 5032,5576, 5048,7624, 5080,7112,
1685
    5096,6088, 5112,8136, 5144,6184, 5176,7208, 5208,6696, 5224,5672, 5240,7720,
1686
    5272,6440, 5288,5416, 5304,7464, 5336,6952, 5352,5928, 5368,7976, 5400,6312,
1687
    5432,7336, 5464,6824, 5480,5800, 5496,7848, 5528,6568, 5560,7592, 5592,7080,
1688
    5608,6056, 5624,8104, 5656,6248, 5688,7272, 5720,6760, 5752,7784, 5784,6504,
1689
    5816,7528, 5848,7016, 5864,5992, 5880,8040, 5912,6376, 5944,7400, 5976,6888,
1690
    6008,7912, 6040,6632, 6072,7656, 6104,7144, 6136,8168, 6200,7192, 6232,6680,
1691
    6264,7704, 6296,6424, 6328,7448, 6360,6936, 6392,7960, 6456,7320, 6488,6808,
1692
    6520,7832, 6584,7576, 6616,7064, 6648,8088, 6712,7256, 6776,7768, 6840,7512,
1693
    6872,7000, 6904,8024, 6968,7384, 7032,7896, 7096,7640, 7160,8152, 7288,7736,
1694
    7352,7480, 7416,7992, 7544,7864, 7672,8120, 7928,8056
1695
};
1696
1697
const uint16_t armBitRevIndexTable_fixed_2048[ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH] =
1698
{
1699
    /* 4x2, size 1984 *//* radix 4, size 4032 *//**
1700
* \par
1701
* Example code for Floating-point RFFT Twiddle factors Generation:
1702
* \par
1703
* <pre>TW = exp(2*pi*i*[0:L/2-1]/L - pi/2*i).' </pre>
1704
* \par
1705
* Real and Imag values are in interleaved fashion
1706
*//**
1707
 * \par
1708
 * Example code for the generation of the floating-point sine table:
1709
 * <pre>
1710
 * tableSize = 512;
1711
 * for(n = 0; n < (tableSize + 1); n++)
1712
 * {
1713
 *      sinTable[n]=sin(2*pi*n/tableSize);
1714
 * }</pre>
1715
 * \par
1716
 * where pi value is  3.14159265358979
1717
 */
1718
1719
const float32_t sinTable_f32[FAST_MATH_TABLE_SIZE + 1] = {
1720
   0.00000000f, 0.01227154f, 0.02454123f, 0.03680722f, 0.04906767f, 0.06132074f,
1721
   0.07356456f, 0.08579731f, 0.09801714f, 0.11022221f, 0.12241068f, 0.13458071f,
1722
   0.14673047f, 0.15885814f, 0.17096189f, 0.18303989f, 0.19509032f, 0.20711138f,
1723
   0.21910124f, 0.23105811f, 0.24298018f, 0.25486566f, 0.26671276f, 0.27851969f,
1724
   0.29028468f, 0.30200595f, 0.31368174f, 0.32531029f, 0.33688985f, 0.34841868f,
1725
   0.35989504f, 0.37131719f, 0.38268343f, 0.39399204f, 0.40524131f, 0.41642956f,
1726
   0.42755509f, 0.43861624f, 0.44961133f, 0.46053871f, 0.47139674f, 0.48218377f,
1727
   0.49289819f, 0.50353838f, 0.51410274f, 0.52458968f, 0.53499762f, 0.54532499f,
1728
   0.55557023f, 0.56573181f, 0.57580819f, 0.58579786f, 0.59569930f, 0.60551104f,
1729
   0.61523159f, 0.62485949f, 0.63439328f, 0.64383154f, 0.65317284f, 0.66241578f,
1730
   0.67155895f, 0.68060100f, 0.68954054f, 0.69837625f, 0.70710678f, 0.71573083f,
1731
   0.72424708f, 0.73265427f, 0.74095113f, 0.74913639f, 0.75720885f, 0.76516727f,
1732
   0.77301045f, 0.78073723f, 0.78834643f, 0.79583690f, 0.80320753f, 0.81045720f,
1733
   0.81758481f, 0.82458930f, 0.83146961f, 0.83822471f, 0.84485357f, 0.85135519f,
1734
   0.85772861f, 0.86397286f, 0.87008699f, 0.87607009f, 0.88192126f, 0.88763962f,
1735
   0.89322430f, 0.89867447f, 0.90398929f, 0.90916798f, 0.91420976f, 0.91911385f,
1736
   0.92387953f, 0.92850608f, 0.93299280f, 0.93733901f, 0.94154407f, 0.94560733f,
1737
   0.94952818f, 0.95330604f, 0.95694034f, 0.96043052f, 0.96377607f, 0.96697647f,
1738
   0.97003125f, 0.97293995f, 0.97570213f, 0.97831737f, 0.98078528f, 0.98310549f,
1739
   0.98527764f, 0.98730142f, 0.98917651f, 0.99090264f, 0.99247953f, 0.99390697f,
1740
   0.99518473f, 0.99631261f, 0.99729046f, 0.99811811f, 0.99879546f, 0.99932238f,
1741
   0.99969882f, 0.99992470f, 1.00000000f, 0.99992470f, 0.99969882f, 0.99932238f,
1742
   0.99879546f, 0.99811811f, 0.99729046f, 0.99631261f, 0.99518473f, 0.99390697f,
1743
   0.99247953f, 0.99090264f, 0.98917651f, 0.98730142f, 0.98527764f, 0.98310549f,
1744
   0.98078528f, 0.97831737f, 0.97570213f, 0.97293995f, 0.97003125f, 0.96697647f,
1745
   0.96377607f, 0.96043052f, 0.95694034f, 0.95330604f, 0.94952818f, 0.94560733f,
1746
   0.94154407f, 0.93733901f, 0.93299280f, 0.92850608f, 0.92387953f, 0.91911385f,
1747
   0.91420976f, 0.90916798f, 0.90398929f, 0.89867447f, 0.89322430f, 0.88763962f,
1748
   0.88192126f, 0.87607009f, 0.87008699f, 0.86397286f, 0.85772861f, 0.85135519f,
1749
   0.84485357f, 0.83822471f, 0.83146961f, 0.82458930f, 0.81758481f, 0.81045720f,
1750
   0.80320753f, 0.79583690f, 0.78834643f, 0.78073723f, 0.77301045f, 0.76516727f,
1751
   0.75720885f, 0.74913639f, 0.74095113f, 0.73265427f, 0.72424708f, 0.71573083f,
1752
   0.70710678f, 0.69837625f, 0.68954054f, 0.68060100f, 0.67155895f, 0.66241578f,
1753
   0.65317284f, 0.64383154f, 0.63439328f, 0.62485949f, 0.61523159f, 0.60551104f,
1754
   0.59569930f, 0.58579786f, 0.57580819f, 0.56573181f, 0.55557023f, 0.54532499f,
1755
   0.53499762f, 0.52458968f, 0.51410274f, 0.50353838f, 0.49289819f, 0.48218377f,
1756
   0.47139674f, 0.46053871f, 0.44961133f, 0.43861624f, 0.42755509f, 0.41642956f,
1757
   0.40524131f, 0.39399204f, 0.38268343f, 0.37131719f, 0.35989504f, 0.34841868f,
1758
   0.33688985f, 0.32531029f, 0.31368174f, 0.30200595f, 0.29028468f, 0.27851969f,
1759
   0.26671276f, 0.25486566f, 0.24298018f, 0.23105811f, 0.21910124f, 0.20711138f,
1760
   0.19509032f, 0.18303989f, 0.17096189f, 0.15885814f, 0.14673047f, 0.13458071f,
1761
   0.12241068f, 0.11022221f, 0.09801714f, 0.08579731f, 0.07356456f, 0.06132074f,
1762
   0.04906767f, 0.03680722f, 0.02454123f, 0.01227154f, 0.00000000f, -0.01227154f,
1763
   -0.02454123f, -0.03680722f, -0.04906767f, -0.06132074f, -0.07356456f,
1764
   -0.08579731f, -0.09801714f, -0.11022221f, -0.12241068f, -0.13458071f,
1765
   -0.14673047f, -0.15885814f, -0.17096189f, -0.18303989f, -0.19509032f,
1766
   -0.20711138f, -0.21910124f, -0.23105811f, -0.24298018f, -0.25486566f,
1767
   -0.26671276f, -0.27851969f, -0.29028468f, -0.30200595f, -0.31368174f,
1768
   -0.32531029f, -0.33688985f, -0.34841868f, -0.35989504f, -0.37131719f,
1769
   -0.38268343f, -0.39399204f, -0.40524131f, -0.41642956f, -0.42755509f,
1770
   -0.43861624f, -0.44961133f, -0.46053871f, -0.47139674f, -0.48218377f,
1771
   -0.49289819f, -0.50353838f, -0.51410274f, -0.52458968f, -0.53499762f,
1772
   -0.54532499f, -0.55557023f, -0.56573181f, -0.57580819f, -0.58579786f,
1773
   -0.59569930f, -0.60551104f, -0.61523159f, -0.62485949f, -0.63439328f,
1774
   -0.64383154f, -0.65317284f, -0.66241578f, -0.67155895f, -0.68060100f,
1775
   -0.68954054f, -0.69837625f, -0.70710678f, -0.71573083f, -0.72424708f,
1776
   -0.73265427f, -0.74095113f, -0.74913639f, -0.75720885f, -0.76516727f,
1777
   -0.77301045f, -0.78073723f, -0.78834643f, -0.79583690f, -0.80320753f,
1778
   -0.81045720f, -0.81758481f, -0.82458930f, -0.83146961f, -0.83822471f,
1779
   -0.84485357f, -0.85135519f, -0.85772861f, -0.86397286f, -0.87008699f,
1780
   -0.87607009f, -0.88192126f, -0.88763962f, -0.89322430f, -0.89867447f,
1781
   -0.90398929f, -0.90916798f, -0.91420976f, -0.91911385f, -0.92387953f,
1782
   -0.92850608f, -0.93299280f, -0.93733901f, -0.94154407f, -0.94560733f,
1783
   -0.94952818f, -0.95330604f, -0.95694034f, -0.96043052f, -0.96377607f,
1784
   -0.96697647f, -0.97003125f, -0.97293995f, -0.97570213f, -0.97831737f,
1785
   -0.98078528f, -0.98310549f, -0.98527764f, -0.98730142f, -0.98917651f,
1786
   -0.99090264f, -0.99247953f, -0.99390697f, -0.99518473f, -0.99631261f,
1787
   -0.99729046f, -0.99811811f, -0.99879546f, -0.99932238f, -0.99969882f,
1788
   -0.99992470f, -1.00000000f, -0.99992470f, -0.99969882f, -0.99932238f,
1789
   -0.99879546f, -0.99811811f, -0.99729046f, -0.99631261f, -0.99518473f,
1790
   -0.99390697f, -0.99247953f, -0.99090264f, -0.98917651f, -0.98730142f,
1791
   -0.98527764f, -0.98310549f, -0.98078528f, -0.97831737f, -0.97570213f,
1792
   -0.97293995f, -0.97003125f, -0.96697647f, -0.96377607f, -0.96043052f,
1793
   -0.95694034f, -0.95330604f, -0.94952818f, -0.94560733f, -0.94154407f,
1794
   -0.93733901f, -0.93299280f, -0.92850608f, -0.92387953f, -0.91911385f,
1795
   -0.91420976f, -0.90916798f, -0.90398929f, -0.89867447f, -0.89322430f,
1796
   -0.88763962f, -0.88192126f, -0.87607009f, -0.87008699f, -0.86397286f,
1797
   -0.85772861f, -0.85135519f, -0.84485357f, -0.83822471f, -0.83146961f,
1798
   -0.82458930f, -0.81758481f, -0.81045720f, -0.80320753f, -0.79583690f,
1799
   -0.78834643f, -0.78073723f, -0.77301045f, -0.76516727f, -0.75720885f,
1800
   -0.74913639f, -0.74095113f, -0.73265427f, -0.72424708f, -0.71573083f,
1801
   -0.70710678f, -0.69837625f, -0.68954054f, -0.68060100f, -0.67155895f,
1802
   -0.66241578f, -0.65317284f, -0.64383154f, -0.63439328f, -0.62485949f,
1803
   -0.61523159f, -0.60551104f, -0.59569930f, -0.58579786f, -0.57580819f,
1804
   -0.56573181f, -0.55557023f, -0.54532499f, -0.53499762f, -0.52458968f,
1805
   -0.51410274f, -0.50353838f, -0.49289819f, -0.48218377f, -0.47139674f,
1806
   -0.46053871f, -0.44961133f, -0.43861624f, -0.42755509f, -0.41642956f,
1807
   -0.40524131f, -0.39399204f, -0.38268343f, -0.37131719f, -0.35989504f,
1808
   -0.34841868f, -0.33688985f, -0.32531029f, -0.31368174f, -0.30200595f,
1809
   -0.29028468f, -0.27851969f, -0.26671276f, -0.25486566f, -0.24298018f,
1810
   -0.23105811f, -0.21910124f, -0.20711138f, -0.19509032f, -0.18303989f,
1811
   -0.17096189f, -0.15885814f, -0.14673047f, -0.13458071f, -0.12241068f,
1812
   -0.11022221f, -0.09801714f, -0.08579731f, -0.07356456f, -0.06132074f,
1813
   -0.04906767f, -0.03680722f, -0.02454123f, -0.01227154f, -0.00000000f
1814
};
1815
1816
/**
1817
 * \par
1818
 * Table values are in Q31 (1.31 fixed-point format) and generation is done in
1819
 * three steps.  First,  generate sin values in floating point:
1820
 * <pre>
1821
 * tableSize = 512;
1822
 * for(n = 0; n < (tableSize + 1); n++)
1823
 * {
1824
 *      sinTable[n]= sin(2*pi*n/tableSize);
1825
 * } </pre>
1826
 * where pi value is  3.14159265358979
1827
 * \par
1828
 * Second, convert floating-point to Q31 (Fixed point):
1829
 *      (sinTable[i] * pow(2, 31))
1830
 * \par
1831
 * Finally, round to the nearest integer value:
1832
 *      sinTable[i] += (sinTable[i] > 0 ? 0.5 :-0.5);
1833
 */
1834
const q31_t sinTable_q31[FAST_MATH_TABLE_SIZE + 1] = {
1835
        0L, 26352928L, 52701887L, 79042909L, 105372028L, 131685278L, 157978697L,
1836
        184248325L, 210490206L, 236700388L, 262874923L, 289009871L, 315101295L,
1837
        341145265L, 367137861L, 393075166L, 418953276L, 444768294L, 470516330L,
1838
        496193509L, 521795963L, 547319836L, 572761285L, 598116479L, 623381598L,
1839
        648552838L, 673626408L, 698598533L, 723465451L, 748223418L, 772868706L,
1840
        797397602L, 821806413L, 846091463L, 870249095L, 894275671L, 918167572L,
1841
        941921200L, 965532978L, 988999351L, 1012316784L, 1035481766L, 1058490808L,
1842
        1081340445L, 1104027237L, 1126547765L, 1148898640L, 1171076495L, 1193077991L,
1843
        1214899813L, 1236538675L, 1257991320L, 1279254516L, 1300325060L, 1321199781L,
1844
        1341875533L, 1362349204L, 1382617710L, 1402678000L, 1422527051L, 1442161874L,
1845
        1461579514L, 1480777044L, 1499751576L, 1518500250L, 1537020244L, 1555308768L,
1846
        1573363068L, 1591180426L, 1608758157L, 1626093616L, 1643184191L, 1660027308L,
1847
        1676620432L, 1692961062L, 1709046739L, 1724875040L, 1740443581L, 1755750017L,
1848
        1770792044L, 1785567396L, 1800073849L, 1814309216L, 1828271356L, 1841958164L,
1849
        1855367581L, 1868497586L, 1881346202L, 1893911494L, 1906191570L, 1918184581L,
1850
        1929888720L, 1941302225L, 1952423377L, 1963250501L, 1973781967L, 1984016189L,
1851
        1993951625L, 2003586779L, 2012920201L, 2021950484L, 2030676269L, 2039096241L,
1852
        2047209133L, 2055013723L, 2062508835L, 2069693342L, 2076566160L, 2083126254L,
1853
        2089372638L, 2095304370L, 2100920556L, 2106220352L, 2111202959L, 2115867626L,
1854
        2120213651L, 2124240380L, 2127947206L, 2131333572L, 2134398966L, 2137142927L,
1855
        2139565043L, 2141664948L, 2143442326L, 2144896910L, 2146028480L, 2146836866L,
1856
        2147321946L, 2147483647L, 2147321946L, 2146836866L, 2146028480L, 2144896910L,
1857
        2143442326L, 2141664948L, 2139565043L, 2137142927L, 2134398966L, 2131333572L,
1858
        2127947206L, 2124240380L, 2120213651L, 2115867626L, 2111202959L, 2106220352L,
1859
        2100920556L, 2095304370L, 2089372638L, 2083126254L, 2076566160L, 2069693342L,
1860
        2062508835L, 2055013723L, 2047209133L, 2039096241L, 2030676269L, 2021950484L,
1861
        2012920201L, 2003586779L, 1993951625L, 1984016189L, 1973781967L, 1963250501L,
1862
        1952423377L, 1941302225L, 1929888720L, 1918184581L, 1906191570L, 1893911494L,
1863
        1881346202L, 1868497586L, 1855367581L, 1841958164L, 1828271356L, 1814309216L,
1864
        1800073849L, 1785567396L, 1770792044L, 1755750017L, 1740443581L, 1724875040L,
1865
        1709046739L, 1692961062L, 1676620432L, 1660027308L, 1643184191L, 1626093616L,
1866
        1608758157L, 1591180426L, 1573363068L, 1555308768L, 1537020244L, 1518500250L,
1867
        1499751576L, 1480777044L, 1461579514L, 1442161874L, 1422527051L, 1402678000L,
1868
        1382617710L, 1362349204L, 1341875533L, 1321199781L, 1300325060L, 1279254516L,
1869
        1257991320L, 1236538675L, 1214899813L, 1193077991L, 1171076495L, 1148898640L,
1870
        1126547765L, 1104027237L, 1081340445L, 1058490808L, 1035481766L, 1012316784L,
1871
        988999351L, 965532978L, 941921200L, 918167572L, 894275671L, 870249095L,
1872
        846091463L, 821806413L, 797397602L, 772868706L, 748223418L, 723465451L,
1873
        698598533L, 673626408L, 648552838L, 623381598L, 598116479L, 572761285L,
1874
        547319836L, 521795963L, 496193509L, 470516330L, 444768294L, 418953276L,
1875
        393075166L, 367137861L, 341145265L, 315101295L, 289009871L, 262874923L,
1876
        236700388L, 210490206L, 184248325L, 157978697L, 131685278L, 105372028L,
1877
        79042909L, 52701887L, 26352928L, 0L, -26352928L, -52701887L, -79042909L,
1878
        -105372028L, -131685278L, -157978697L, -184248325L, -210490206L, -236700388L,
1879
        -262874923L, -289009871L, -315101295L, -341145265L, -367137861L, -393075166L,
1880
        -418953276L, -444768294L, -470516330L, -496193509L, -521795963L, -547319836L,
1881
        -572761285L, -598116479L, -623381598L, -648552838L, -673626408L, -698598533L,
1882
        -723465451L, -748223418L, -772868706L, -797397602L, -821806413L, -846091463L,
1883
        -870249095L, -894275671L, -918167572L, -941921200L, -965532978L, -988999351L,
1884
        -1012316784L, -1035481766L, -1058490808L, -1081340445L, -1104027237L,
1885
        -1126547765L, -1148898640L, -1171076495L, -1193077991L, -1214899813L,
1886
        -1236538675L, -1257991320L, -1279254516L, -1300325060L, -1321199781L,
1887
        -1341875533L, -1362349204L, -1382617710L, -1402678000L, -1422527051L,
1888
        -1442161874L, -1461579514L, -1480777044L, -1499751576L, -1518500250L,
1889
        -1537020244L, -1555308768L, -1573363068L, -1591180426L, -1608758157L,
1890
        -1626093616L, -1643184191L, -1660027308L, -1676620432L, -1692961062L,
1891
        -1709046739L, -1724875040L, -1740443581L, -1755750017L, -1770792044L,
1892
        -1785567396L, -1800073849L, -1814309216L, -1828271356L, -1841958164L,
1893
        -1855367581L, -1868497586L, -1881346202L, -1893911494L, -1906191570L,
1894
        -1918184581L, -1929888720L, -1941302225L, -1952423377L, -1963250501L,
1895
        -1973781967L, -1984016189L, -1993951625L, -2003586779L, -2012920201L,
1896
        -2021950484L, -2030676269L, -2039096241L, -2047209133L, -2055013723L,
1897
        -2062508835L, -2069693342L, -2076566160L, -2083126254L, -2089372638L,
1898
        -2095304370L, -2100920556L, -2106220352L, -2111202959L, -2115867626L,
1899
        -2120213651L, -2124240380L, -2127947206L, -2131333572L, -2134398966L,
1900
        -2137142927L, -2139565043L, -2141664948L, -2143442326L, -2144896910L,
1901
        -2146028480L, -2146836866L, -2147321946L, (q31_t)0x80000000, -2147321946L,
1902
        -2146836866L, -2146028480L, -2144896910L, -2143442326L, -2141664948L,
1903
        -2139565043L, -2137142927L, -2134398966L, -2131333572L, -2127947206L,
1904
        -2124240380L, -2120213651L, -2115867626L, -2111202959L, -2106220352L,
1905
        -2100920556L, -2095304370L, -2089372638L, -2083126254L, -2076566160L,
1906
        -2069693342L, -2062508835L, -2055013723L, -2047209133L, -2039096241L,
1907
        -2030676269L, -2021950484L, -2012920201L, -2003586779L, -1993951625L,
1908
        -1984016189L, -1973781967L, -1963250501L, -1952423377L, -1941302225L,
1909
        -1929888720L, -1918184581L, -1906191570L, -1893911494L, -1881346202L,
1910
        -1868497586L, -1855367581L, -1841958164L, -1828271356L, -1814309216L,
1911
        -1800073849L, -1785567396L, -1770792044L, -1755750017L, -1740443581L,
1912
        -1724875040L, -1709046739L, -1692961062L, -1676620432L, -1660027308L,
1913
        -1643184191L, -1626093616L, -1608758157L, -1591180426L, -1573363068L,
1914
        -1555308768L, -1537020244L, -1518500250L, -1499751576L, -1480777044L,
1915
        -1461579514L, -1442161874L, -1422527051L, -1402678000L, -1382617710L,
1916
        -1362349204L, -1341875533L, -1321199781L, -1300325060L, -1279254516L,
1917
        -1257991320L, -1236538675L, -1214899813L, -1193077991L, -1171076495L,
1918
        -1148898640L, -1126547765L, -1104027237L, -1081340445L, -1058490808L,
1919
        -1035481766L, -1012316784L, -988999351L, -965532978L, -941921200L,
1920
        -918167572L, -894275671L, -870249095L, -846091463L, -821806413L, -797397602L,
1921
        -772868706L, -748223418L, -723465451L, -698598533L, -673626408L, -648552838L,
1922
        -623381598L, -598116479L, -572761285L, -547319836L, -521795963L, -496193509L,
1923
        -470516330L, -444768294L, -418953276L, -393075166L, -367137861L, -341145265L,
1924
        -315101295L, -289009871L, -262874923L, -236700388L, -210490206L, -184248325L,
1925
        -157978697L, -131685278L, -105372028L, -79042909L, -52701887L, -26352928L, 0
1926
};
1927
1928
/**
1929
 * \par
1930
 * Table values are in Q15 (1.15 fixed-point format) and generation is done in
1931
 * three steps.  First,  generate sin values in floating point:
1932
 * <pre>
1933
 * tableSize = 512;
1934
 * for(n = 0; n < (tableSize + 1); n++)
1935
 * {
1936
 *      sinTable[n]= sin(2*pi*n/tableSize);
1937
 * } </pre>
1938
 * where pi value is  3.14159265358979
1939
 * \par
1940
 * Second, convert floating-point to Q15 (Fixed point):
1941
 *      (sinTable[i] * pow(2, 15))
1942
 * \par
1943
 * Finally, round to the nearest integer value:
1944
 *      sinTable[i] += (sinTable[i] > 0 ? 0.5 :-0.5);
1945
 */
1946
const q15_t sinTable_q15[FAST_MATH_TABLE_SIZE + 1] = {
1947
        0, 402, 804, 1206, 1608, 2009, 2411, 2811, 3212, 3612, 4011, 4410, 4808,
1948
        5205, 5602, 5998, 6393, 6787, 7180, 7571, 7962, 8351, 8740, 9127, 9512,
1949
        9896, 10279, 10660, 11039, 11417, 11793, 12167, 12540, 12910, 13279,
1950
        13646, 14010, 14373, 14733, 15091, 15447, 15800, 16151, 16500, 16846,
1951
        17190, 17531, 17869, 18205, 18538, 18868, 19195, 19520, 19841, 20160,
1952
        20475, 20788, 21097, 21403, 21706, 22006, 22302, 22595, 22884, 23170,
1953
        23453, 23732, 24008, 24279, 24548, 24812, 25073, 25330, 25583, 25833,
1954
        26078, 26320, 26557, 26791, 27020, 27246, 27467, 27684, 27897, 28106,
1955
        28311, 28511, 28707, 28899, 29086, 29269, 29448, 29622, 29792, 29957,
1956
        30118, 30274, 30425, 30572, 30715, 30853, 30986, 31114, 31238, 31357,
1957
        31471, 31581, 31686, 31786, 31881, 31972, 32058, 32138, 32214, 32286,
1958
        32352, 32413, 32470, 32522, 32568, 32610, 32647, 32679, 32706, 32729,
1959
        32746, 32758, 32766, 32767, 32766, 32758, 32746, 32729, 32706, 32679,
1960
        32647, 32610, 32568, 32522, 32470, 32413, 32352, 32286, 32214, 32138,
1961
        32058, 31972, 31881, 31786, 31686, 31581, 31471, 31357, 31238, 31114,
1962
        30986, 30853, 30715, 30572, 30425, 30274, 30118, 29957, 29792, 29622,
1963
        29448, 29269, 29086, 28899, 28707, 28511, 28311, 28106, 27897, 27684,
1964
        27467, 27246, 27020, 26791, 26557, 26320, 26078, 25833, 25583, 25330,
1965
        25073, 24812, 24548, 24279, 24008, 23732, 23453, 23170, 22884, 22595,
1966
        22302, 22006, 21706, 21403, 21097, 20788, 20475, 20160, 19841, 19520,
1967
        19195, 18868, 18538, 18205, 17869, 17531, 17190, 16846, 16500, 16151,
1968
        15800, 15447, 15091, 14733, 14373, 14010, 13646, 13279, 12910, 12540,
1969
        12167, 11793, 11417, 11039, 10660, 10279, 9896, 9512, 9127, 8740, 8351,
1970
        7962, 7571, 7180, 6787, 6393, 5998, 5602, 5205, 4808, 4410, 4011, 3612,
1971
        3212, 2811, 2411, 2009, 1608, 1206, 804, 402, 0, -402, -804, -1206,
1972
        -1608, -2009, -2411, -2811, -3212, -3612, -4011, -4410, -4808, -5205,
1973
        -5602, -5998, -6393, -6787, -7180, -7571, -7962, -8351, -8740, -9127,
1974
        -9512, -9896, -10279, -10660, -11039, -11417, -11793, -12167, -12540,
1975
        -12910, -13279, -13646, -14010, -14373, -14733, -15091, -15447, -15800,
1976
        -16151, -16500, -16846, -17190, -17531, -17869, -18205, -18538, -18868,
1977
        -19195, -19520, -19841, -20160, -20475, -20788, -21097, -21403, -21706,
1978
        -22006, -22302, -22595, -22884, -23170, -23453, -23732, -24008, -24279,
1979
        -24548, -24812, -25073, -25330, -25583, -25833, -26078, -26320, -26557,
1980
        -26791, -27020, -27246, -27467, -27684, -27897, -28106, -28311, -28511,
1981
        -28707, -28899, -29086, -29269, -29448, -29622, -29792, -29957, -30118,
1982
        -30274, -30425, -30572, -30715, -30853, -30986, -31114, -31238, -31357,
1983
        -31471, -31581, -31686, -31786, -31881, -31972, -32058, -32138, -32214,
1984
        -32286, -32352, -32413, -32470, -32522, -32568, -32610, -32647, -32679,
1985
        -32706, -32729, -32746, -32758, -32766, -32768, -32766, -32758, -32746,
1986
        -32729, -32706, -32679, -32647, -32610, -32568, -32522, -32470, -32413,
1987
        -32352, -32286, -32214, -32138, -32058, -31972, -31881, -31786, -31686,
1988
        -31581, -31471, -31357, -31238, -31114, -30986, -30853, -30715, -30572,
1989
        -30425, -30274, -30118, -29957, -29792, -29622, -29448, -29269, -29086,
1990
        -28899, -28707, -28511, -28311, -28106, -27897, -27684, -27467, -27246,
1991
        -27020, -26791, -26557, -26320, -26078, -25833, -25583, -25330, -25073,
1992
        -24812, -24548, -24279, -24008, -23732, -23453, -23170, -22884, -22595,
1993
        -22302, -22006, -21706, -21403, -21097, -20788, -20475, -20160, -19841,
1994
        -19520, -19195, -18868, -18538, -18205, -17869, -17531, -17190, -16846,
1995
        -16500, -16151, -15800, -15447, -15091, -14733, -14373, -14010, -13646,
1996
        -13279, -12910, -12540, -12167, -11793, -11417, -11039, -10660, -10279,
1997
        -9896, -9512, -9127, -8740, -8351, -7962, -7571, -7180, -6787, -6393,
1998
        -5998, -5602, -5205, -4808, -4410, -4011, -3612, -3212, -2811, -2411,
1999
        -2009, -1608, -1206, -804, -402, 0
2000
};
2001
 
2002