Updated and Validated
[betaflight.git] / lib / main / CMSIS / DSP / Source / CommonTables / arm_const_structs.c
blob4f412623fdfbdda5d1cb65653c3d731aaf5bfef0
1 /* ----------------------------------------------------------------------
2 * Project: CMSIS DSP Library
3 * Title: arm_const_structs.c
4 * Description: Constant structs that are initialized for user convenience.
5 * For example, some can be given as arguments to the arm_cfft_f32() or arm_rfft_f32() functions.
7 * $Date: 27. January 2017
8 * $Revision: V.1.5.1
10 * Target Processor: Cortex-M cores
11 * -------------------------------------------------------------------- */
13 * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
15 * SPDX-License-Identifier: Apache-2.0
17 * Licensed under the Apache License, Version 2.0 (the License); you may
18 * not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
21 * www.apache.org/licenses/LICENSE-2.0
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
25 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
30 #include "arm_const_structs.h"
32 /* Floating-point structs */
33 const arm_cfft_instance_f32 arm_cfft_sR_f32_len16 = {
34 16, twiddleCoef_16, armBitRevIndexTable16, ARMBITREVINDEXTABLE_16_TABLE_LENGTH
37 const arm_cfft_instance_f32 arm_cfft_sR_f32_len32 = {
38 32, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_32_TABLE_LENGTH
41 const arm_cfft_instance_f32 arm_cfft_sR_f32_len64 = {
42 64, twiddleCoef_64, armBitRevIndexTable64, ARMBITREVINDEXTABLE_64_TABLE_LENGTH
45 const arm_cfft_instance_f32 arm_cfft_sR_f32_len128 = {
46 128, twiddleCoef_128, armBitRevIndexTable128, ARMBITREVINDEXTABLE_128_TABLE_LENGTH
49 const arm_cfft_instance_f32 arm_cfft_sR_f32_len256 = {
50 256, twiddleCoef_256, armBitRevIndexTable256, ARMBITREVINDEXTABLE_256_TABLE_LENGTH
53 const arm_cfft_instance_f32 arm_cfft_sR_f32_len512 = {
54 512, twiddleCoef_512, armBitRevIndexTable512, ARMBITREVINDEXTABLE_512_TABLE_LENGTH
57 const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024 = {
58 1024, twiddleCoef_1024, armBitRevIndexTable1024, ARMBITREVINDEXTABLE_1024_TABLE_LENGTH
61 const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048 = {
62 2048, twiddleCoef_2048, armBitRevIndexTable2048, ARMBITREVINDEXTABLE_2048_TABLE_LENGTH
65 const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096 = {
66 4096, twiddleCoef_4096, armBitRevIndexTable4096, ARMBITREVINDEXTABLE_4096_TABLE_LENGTH
69 /* Fixed-point structs */
70 const arm_cfft_instance_q31 arm_cfft_sR_q31_len16 = {
71 16, twiddleCoef_16_q31, armBitRevIndexTable_fixed_16, ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH
74 const arm_cfft_instance_q31 arm_cfft_sR_q31_len32 = {
75 32, twiddleCoef_32_q31, armBitRevIndexTable_fixed_32, ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH
78 const arm_cfft_instance_q31 arm_cfft_sR_q31_len64 = {
79 64, twiddleCoef_64_q31, armBitRevIndexTable_fixed_64, ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH
82 const arm_cfft_instance_q31 arm_cfft_sR_q31_len128 = {
83 128, twiddleCoef_128_q31, armBitRevIndexTable_fixed_128, ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH
86 const arm_cfft_instance_q31 arm_cfft_sR_q31_len256 = {
87 256, twiddleCoef_256_q31, armBitRevIndexTable_fixed_256, ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH
90 const arm_cfft_instance_q31 arm_cfft_sR_q31_len512 = {
91 512, twiddleCoef_512_q31, armBitRevIndexTable_fixed_512, ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH
94 const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024 = {
95 1024, twiddleCoef_1024_q31, armBitRevIndexTable_fixed_1024, ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH
98 const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048 = {
99 2048, twiddleCoef_2048_q31, armBitRevIndexTable_fixed_2048, ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH
102 const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096 = {
103 4096, twiddleCoef_4096_q31, armBitRevIndexTable_fixed_4096, ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH
106 const arm_cfft_instance_q15 arm_cfft_sR_q15_len16 = {
107 16, twiddleCoef_16_q15, armBitRevIndexTable_fixed_16, ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH
110 const arm_cfft_instance_q15 arm_cfft_sR_q15_len32 = {
111 32, twiddleCoef_32_q15, armBitRevIndexTable_fixed_32, ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH
114 const arm_cfft_instance_q15 arm_cfft_sR_q15_len64 = {
115 64, twiddleCoef_64_q15, armBitRevIndexTable_fixed_64, ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH
118 const arm_cfft_instance_q15 arm_cfft_sR_q15_len128 = {
119 128, twiddleCoef_128_q15, armBitRevIndexTable_fixed_128, ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH
122 const arm_cfft_instance_q15 arm_cfft_sR_q15_len256 = {
123 256, twiddleCoef_256_q15, armBitRevIndexTable_fixed_256, ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH
126 const arm_cfft_instance_q15 arm_cfft_sR_q15_len512 = {
127 512, twiddleCoef_512_q15, armBitRevIndexTable_fixed_512, ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH
130 const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024 = {
131 1024, twiddleCoef_1024_q15, armBitRevIndexTable_fixed_1024, ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH
134 const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048 = {
135 2048, twiddleCoef_2048_q15, armBitRevIndexTable_fixed_2048, ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH
138 const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096 = {
139 4096, twiddleCoef_4096_q15, armBitRevIndexTable_fixed_4096, ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH
142 /* Structure for real-value inputs */
143 /* Floating-point structs */
144 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len32 = {
145 { 16, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_16_TABLE_LENGTH },
146 32U,
147 (float32_t *)twiddleCoef_rfft_32
150 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len64 = {
151 { 32, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_32_TABLE_LENGTH },
152 64U,
153 (float32_t *)twiddleCoef_rfft_64
156 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len128 = {
157 { 64, twiddleCoef_64, armBitRevIndexTable64, ARMBITREVINDEXTABLE_64_TABLE_LENGTH },
158 128U,
159 (float32_t *)twiddleCoef_rfft_128
162 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len256 = {
163 { 128, twiddleCoef_128, armBitRevIndexTable128, ARMBITREVINDEXTABLE_128_TABLE_LENGTH },
164 256U,
165 (float32_t *)twiddleCoef_rfft_256
168 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len512 = {
169 { 256, twiddleCoef_256, armBitRevIndexTable256, ARMBITREVINDEXTABLE_256_TABLE_LENGTH },
170 512U,
171 (float32_t *)twiddleCoef_rfft_512
174 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len1024 = {
175 { 512, twiddleCoef_512, armBitRevIndexTable512, ARMBITREVINDEXTABLE_512_TABLE_LENGTH },
176 1024U,
177 (float32_t *)twiddleCoef_rfft_1024
180 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len2048 = {
181 { 1024, twiddleCoef_1024, armBitRevIndexTable1024, ARMBITREVINDEXTABLE_1024_TABLE_LENGTH },
182 2048U,
183 (float32_t *)twiddleCoef_rfft_2048
186 const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len4096 = {
187 { 2048, twiddleCoef_2048, armBitRevIndexTable2048, ARMBITREVINDEXTABLE_2048_TABLE_LENGTH },
188 4096U,
189 (float32_t *)twiddleCoef_rfft_4096
192 /* Fixed-point structs */
193 /* q31_t */
194 extern const q31_t realCoefAQ31[8192];
195 extern const q31_t realCoefBQ31[8192];
197 const arm_rfft_instance_q31 arm_rfft_sR_q31_len32 = {
198 32U,
201 256U,
202 (q31_t*)realCoefAQ31,
203 (q31_t*)realCoefBQ31,
204 &arm_cfft_sR_q31_len16
207 const arm_rfft_instance_q31 arm_rfft_sR_q31_len64 = {
208 64U,
211 128U,
212 (q31_t*)realCoefAQ31,
213 (q31_t*)realCoefBQ31,
214 &arm_cfft_sR_q31_len32
217 const arm_rfft_instance_q31 arm_rfft_sR_q31_len128 = {
218 128U,
221 64U,
222 (q31_t*)realCoefAQ31,
223 (q31_t*)realCoefBQ31,
224 &arm_cfft_sR_q31_len64
227 const arm_rfft_instance_q31 arm_rfft_sR_q31_len256 = {
228 256U,
231 32U,
232 (q31_t*)realCoefAQ31,
233 (q31_t*)realCoefBQ31,
234 &arm_cfft_sR_q31_len128
237 const arm_rfft_instance_q31 arm_rfft_sR_q31_len512 = {
238 512U,
241 16U,
242 (q31_t*)realCoefAQ31,
243 (q31_t*)realCoefBQ31,
244 &arm_cfft_sR_q31_len256
247 const arm_rfft_instance_q31 arm_rfft_sR_q31_len1024 = {
248 1024U,
252 (q31_t*)realCoefAQ31,
253 (q31_t*)realCoefBQ31,
254 &arm_cfft_sR_q31_len512
257 const arm_rfft_instance_q31 arm_rfft_sR_q31_len2048 = {
258 2048U,
262 (q31_t*)realCoefAQ31,
263 (q31_t*)realCoefBQ31,
264 &arm_cfft_sR_q31_len1024
267 const arm_rfft_instance_q31 arm_rfft_sR_q31_len4096 = {
268 4096U,
272 (q31_t*)realCoefAQ31,
273 (q31_t*)realCoefBQ31,
274 &arm_cfft_sR_q31_len2048
277 const arm_rfft_instance_q31 arm_rfft_sR_q31_len8192 = {
278 8192U,
282 (q31_t*)realCoefAQ31,
283 (q31_t*)realCoefBQ31,
284 &arm_cfft_sR_q31_len4096
287 /* q15_t */
288 extern const q15_t realCoefAQ15[8192];
289 extern const q15_t realCoefBQ15[8192];
291 const arm_rfft_instance_q15 arm_rfft_sR_q15_len32 = {
292 32U,
295 256U,
296 (q15_t*)realCoefAQ15,
297 (q15_t*)realCoefBQ15,
298 &arm_cfft_sR_q15_len16
301 const arm_rfft_instance_q15 arm_rfft_sR_q15_len64 = {
302 64U,
305 128U,
306 (q15_t*)realCoefAQ15,
307 (q15_t*)realCoefBQ15,
308 &arm_cfft_sR_q15_len32
311 const arm_rfft_instance_q15 arm_rfft_sR_q15_len128 = {
312 128U,
315 64U,
316 (q15_t*)realCoefAQ15,
317 (q15_t*)realCoefBQ15,
318 &arm_cfft_sR_q15_len64
321 const arm_rfft_instance_q15 arm_rfft_sR_q15_len256 = {
322 256U,
325 32U,
326 (q15_t*)realCoefAQ15,
327 (q15_t*)realCoefBQ15,
328 &arm_cfft_sR_q15_len128
331 const arm_rfft_instance_q15 arm_rfft_sR_q15_len512 = {
332 512U,
335 16U,
336 (q15_t*)realCoefAQ15,
337 (q15_t*)realCoefBQ15,
338 &arm_cfft_sR_q15_len256
341 const arm_rfft_instance_q15 arm_rfft_sR_q15_len1024 = {
342 1024U,
346 (q15_t*)realCoefAQ15,
347 (q15_t*)realCoefBQ15,
348 &arm_cfft_sR_q15_len512
351 const arm_rfft_instance_q15 arm_rfft_sR_q15_len2048 = {
352 2048U,
356 (q15_t*)realCoefAQ15,
357 (q15_t*)realCoefBQ15,
358 &arm_cfft_sR_q15_len1024
361 const arm_rfft_instance_q15 arm_rfft_sR_q15_len4096 = {
362 4096U,
366 (q15_t*)realCoefAQ15,
367 (q15_t*)realCoefBQ15,
368 &arm_cfft_sR_q15_len2048
371 const arm_rfft_instance_q15 arm_rfft_sR_q15_len8192 = {
372 8192U,
376 (q15_t*)realCoefAQ15,
377 (q15_t*)realCoefBQ15,
378 &arm_cfft_sR_q15_len4096