1 /****************************************************************************** 2 * @file transform_functions.h 3 * @brief Public header file for CMSIS DSP Library 4 * @version V1.10.0 5 * @date 08 July 2021 6 * Target Processor: Cortex-M and Cortex-A cores 7 ******************************************************************************/ 8 /* 9 * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved. 10 * 11 * SPDX-License-Identifier: Apache-2.0 12 * 13 * Licensed under the Apache License, Version 2.0 (the License); you may 14 * not use this file except in compliance with the License. 15 * You may obtain a copy of the License at 16 * 17 * www.apache.org/licenses/LICENSE-2.0 18 * 19 * Unless required by applicable law or agreed to in writing, software 20 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 21 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the License for the specific language governing permissions and 23 * limitations under the License. 24 */ 25 26 27 #ifndef _TRANSFORM_FUNCTIONS_H_ 28 #define _TRANSFORM_FUNCTIONS_H_ 29 30 #include "arm_math_types.h" 31 #include "arm_math_memory.h" 32 33 #include "dsp/none.h" 34 #include "dsp/utils.h" 35 36 #include "dsp/basic_math_functions.h" 37 #include "dsp/complex_math_functions.h" 38 39 #ifdef __cplusplus 40 extern "C" 41 { 42 #endif 43 44 45 /** 46 * @defgroup groupTransforms Transform Functions 47 */ 48 49 50 /** 51 * @brief Instance structure for the Q15 CFFT/CIFFT function. 52 */ 53 typedef struct 54 { 55 uint16_t fftLen; /**< length of the FFT. */ 56 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ 57 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ 58 const q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */ 59 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 60 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 61 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ 62 } arm_cfft_radix2_instance_q15; 63 64 /* Deprecated */ 65 arm_status arm_cfft_radix2_init_q15( 66 arm_cfft_radix2_instance_q15 * S, 67 uint16_t fftLen, 68 uint8_t ifftFlag, 69 uint8_t bitReverseFlag); 70 71 /* Deprecated */ 72 void arm_cfft_radix2_q15( 73 const arm_cfft_radix2_instance_q15 * S, 74 q15_t * pSrc); 75 76 77 /** 78 * @brief Instance structure for the Q15 CFFT/CIFFT function. 79 */ 80 typedef struct 81 { 82 uint16_t fftLen; /**< length of the FFT. */ 83 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ 84 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ 85 const q15_t *pTwiddle; /**< points to the twiddle factor table. */ 86 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 87 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 88 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ 89 } arm_cfft_radix4_instance_q15; 90 91 /* Deprecated */ 92 arm_status arm_cfft_radix4_init_q15( 93 arm_cfft_radix4_instance_q15 * S, 94 uint16_t fftLen, 95 uint8_t ifftFlag, 96 uint8_t bitReverseFlag); 97 98 /* Deprecated */ 99 void arm_cfft_radix4_q15( 100 const arm_cfft_radix4_instance_q15 * S, 101 q15_t * pSrc); 102 103 /** 104 * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function. 105 */ 106 typedef struct 107 { 108 uint16_t fftLen; /**< length of the FFT. */ 109 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ 110 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ 111 const q31_t *pTwiddle; /**< points to the Twiddle factor table. */ 112 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 113 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 114 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ 115 } arm_cfft_radix2_instance_q31; 116 117 /* Deprecated */ 118 arm_status arm_cfft_radix2_init_q31( 119 arm_cfft_radix2_instance_q31 * S, 120 uint16_t fftLen, 121 uint8_t ifftFlag, 122 uint8_t bitReverseFlag); 123 124 /* Deprecated */ 125 void arm_cfft_radix2_q31( 126 const arm_cfft_radix2_instance_q31 * S, 127 q31_t * pSrc); 128 129 /** 130 * @brief Instance structure for the Q31 CFFT/CIFFT function. 131 */ 132 typedef struct 133 { 134 uint16_t fftLen; /**< length of the FFT. */ 135 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ 136 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ 137 const q31_t *pTwiddle; /**< points to the twiddle factor table. */ 138 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 139 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 140 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ 141 } arm_cfft_radix4_instance_q31; 142 143 /* Deprecated */ 144 void arm_cfft_radix4_q31( 145 const arm_cfft_radix4_instance_q31 * S, 146 q31_t * pSrc); 147 148 /* Deprecated */ 149 arm_status arm_cfft_radix4_init_q31( 150 arm_cfft_radix4_instance_q31 * S, 151 uint16_t fftLen, 152 uint8_t ifftFlag, 153 uint8_t bitReverseFlag); 154 155 /** 156 * @brief Instance structure for the floating-point CFFT/CIFFT function. 157 */ 158 typedef struct 159 { 160 uint16_t fftLen; /**< length of the FFT. */ 161 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ 162 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ 163 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */ 164 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 165 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 166 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ 167 float32_t onebyfftLen; /**< value of 1/fftLen. */ 168 } arm_cfft_radix2_instance_f32; 169 170 171 /* Deprecated */ 172 arm_status arm_cfft_radix2_init_f32( 173 arm_cfft_radix2_instance_f32 * S, 174 uint16_t fftLen, 175 uint8_t ifftFlag, 176 uint8_t bitReverseFlag); 177 178 /* Deprecated */ 179 void arm_cfft_radix2_f32( 180 const arm_cfft_radix2_instance_f32 * S, 181 float32_t * pSrc); 182 183 /** 184 * @brief Instance structure for the floating-point CFFT/CIFFT function. 185 */ 186 typedef struct 187 { 188 uint16_t fftLen; /**< length of the FFT. */ 189 uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */ 190 uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */ 191 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */ 192 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 193 uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 194 uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */ 195 float32_t onebyfftLen; /**< value of 1/fftLen. */ 196 } arm_cfft_radix4_instance_f32; 197 198 199 200 /* Deprecated */ 201 arm_status arm_cfft_radix4_init_f32( 202 arm_cfft_radix4_instance_f32 * S, 203 uint16_t fftLen, 204 uint8_t ifftFlag, 205 uint8_t bitReverseFlag); 206 207 /* Deprecated */ 208 void arm_cfft_radix4_f32( 209 const arm_cfft_radix4_instance_f32 * S, 210 float32_t * pSrc); 211 212 /** 213 * @brief Instance structure for the fixed-point CFFT/CIFFT function. 214 */ 215 typedef struct 216 { 217 uint16_t fftLen; /**< length of the FFT. */ 218 const q15_t *pTwiddle; /**< points to the Twiddle factor table. */ 219 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 220 uint16_t bitRevLength; /**< bit reversal table length. */ 221 #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) 222 const uint32_t *rearranged_twiddle_tab_stride1_arr; /**< Per stage reordered twiddle pointer (offset 1) */ \ 223 const uint32_t *rearranged_twiddle_tab_stride2_arr; /**< Per stage reordered twiddle pointer (offset 2) */ \ 224 const uint32_t *rearranged_twiddle_tab_stride3_arr; /**< Per stage reordered twiddle pointer (offset 3) */ \ 225 const q15_t *rearranged_twiddle_stride1; /**< reordered twiddle offset 1 storage */ \ 226 const q15_t *rearranged_twiddle_stride2; /**< reordered twiddle offset 2 storage */ \ 227 const q15_t *rearranged_twiddle_stride3; 228 #endif 229 } arm_cfft_instance_q15; 230 231 arm_status arm_cfft_init_4096_q15(arm_cfft_instance_q15 * S); 232 arm_status arm_cfft_init_2048_q15(arm_cfft_instance_q15 * S); 233 arm_status arm_cfft_init_1024_q15(arm_cfft_instance_q15 * S); 234 arm_status arm_cfft_init_512_q15(arm_cfft_instance_q15 * S); 235 arm_status arm_cfft_init_256_q15(arm_cfft_instance_q15 * S); 236 arm_status arm_cfft_init_128_q15(arm_cfft_instance_q15 * S); 237 arm_status arm_cfft_init_64_q15(arm_cfft_instance_q15 * S); 238 arm_status arm_cfft_init_32_q15(arm_cfft_instance_q15 * S); 239 arm_status arm_cfft_init_16_q15(arm_cfft_instance_q15 * S); 240 241 arm_status arm_cfft_init_q15( 242 arm_cfft_instance_q15 * S, 243 uint16_t fftLen); 244 245 void arm_cfft_q15( 246 const arm_cfft_instance_q15 * S, 247 q15_t * p1, 248 uint8_t ifftFlag, 249 uint8_t bitReverseFlag); 250 251 /** 252 * @brief Instance structure for the fixed-point CFFT/CIFFT function. 253 */ 254 typedef struct 255 { 256 uint16_t fftLen; /**< length of the FFT. */ 257 const q31_t *pTwiddle; /**< points to the Twiddle factor table. */ 258 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 259 uint16_t bitRevLength; /**< bit reversal table length. */ 260 #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) 261 const uint32_t *rearranged_twiddle_tab_stride1_arr; /**< Per stage reordered twiddle pointer (offset 1) */ \ 262 const uint32_t *rearranged_twiddle_tab_stride2_arr; /**< Per stage reordered twiddle pointer (offset 2) */ \ 263 const uint32_t *rearranged_twiddle_tab_stride3_arr; /**< Per stage reordered twiddle pointer (offset 3) */ \ 264 const q31_t *rearranged_twiddle_stride1; /**< reordered twiddle offset 1 storage */ \ 265 const q31_t *rearranged_twiddle_stride2; /**< reordered twiddle offset 2 storage */ \ 266 const q31_t *rearranged_twiddle_stride3; 267 #endif 268 } arm_cfft_instance_q31; 269 270 arm_status arm_cfft_init_4096_q31(arm_cfft_instance_q31 * S); 271 arm_status arm_cfft_init_2048_q31(arm_cfft_instance_q31 * S); 272 arm_status arm_cfft_init_1024_q31(arm_cfft_instance_q31 * S); 273 arm_status arm_cfft_init_512_q31(arm_cfft_instance_q31 * S); 274 arm_status arm_cfft_init_256_q31(arm_cfft_instance_q31 * S); 275 arm_status arm_cfft_init_128_q31(arm_cfft_instance_q31 * S); 276 arm_status arm_cfft_init_64_q31(arm_cfft_instance_q31 * S); 277 arm_status arm_cfft_init_32_q31(arm_cfft_instance_q31 * S); 278 arm_status arm_cfft_init_16_q31(arm_cfft_instance_q31 * S); 279 280 arm_status arm_cfft_init_q31( 281 arm_cfft_instance_q31 * S, 282 uint16_t fftLen); 283 284 void arm_cfft_q31( 285 const arm_cfft_instance_q31 * S, 286 q31_t * p1, 287 uint8_t ifftFlag, 288 uint8_t bitReverseFlag); 289 290 /** 291 * @brief Instance structure for the floating-point CFFT/CIFFT function. 292 */ 293 typedef struct 294 { 295 uint16_t fftLen; /**< length of the FFT. */ 296 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */ 297 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 298 uint16_t bitRevLength; /**< bit reversal table length. */ 299 #if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) 300 const uint32_t *rearranged_twiddle_tab_stride1_arr; /**< Per stage reordered twiddle pointer (offset 1) */ \ 301 const uint32_t *rearranged_twiddle_tab_stride2_arr; /**< Per stage reordered twiddle pointer (offset 2) */ \ 302 const uint32_t *rearranged_twiddle_tab_stride3_arr; /**< Per stage reordered twiddle pointer (offset 3) */ \ 303 const float32_t *rearranged_twiddle_stride1; /**< reordered twiddle offset 1 storage */ \ 304 const float32_t *rearranged_twiddle_stride2; /**< reordered twiddle offset 2 storage */ \ 305 const float32_t *rearranged_twiddle_stride3; 306 #endif 307 } arm_cfft_instance_f32; 308 309 310 arm_status arm_cfft_init_4096_f32(arm_cfft_instance_f32 * S); 311 arm_status arm_cfft_init_2048_f32(arm_cfft_instance_f32 * S); 312 arm_status arm_cfft_init_1024_f32(arm_cfft_instance_f32 * S); 313 arm_status arm_cfft_init_512_f32(arm_cfft_instance_f32 * S); 314 arm_status arm_cfft_init_256_f32(arm_cfft_instance_f32 * S); 315 arm_status arm_cfft_init_128_f32(arm_cfft_instance_f32 * S); 316 arm_status arm_cfft_init_64_f32(arm_cfft_instance_f32 * S); 317 arm_status arm_cfft_init_32_f32(arm_cfft_instance_f32 * S); 318 arm_status arm_cfft_init_16_f32(arm_cfft_instance_f32 * S); 319 320 arm_status arm_cfft_init_f32( 321 arm_cfft_instance_f32 * S, 322 uint16_t fftLen); 323 324 void arm_cfft_f32( 325 const arm_cfft_instance_f32 * S, 326 float32_t * p1, 327 uint8_t ifftFlag, 328 uint8_t bitReverseFlag); 329 330 331 /** 332 * @brief Instance structure for the Double Precision Floating-point CFFT/CIFFT function. 333 */ 334 typedef struct 335 { 336 uint16_t fftLen; /**< length of the FFT. */ 337 const float64_t *pTwiddle; /**< points to the Twiddle factor table. */ 338 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */ 339 uint16_t bitRevLength; /**< bit reversal table length. */ 340 } arm_cfft_instance_f64; 341 342 arm_status arm_cfft_init_4096_f64(arm_cfft_instance_f64 * S); 343 arm_status arm_cfft_init_2048_f64(arm_cfft_instance_f64 * S); 344 arm_status arm_cfft_init_1024_f64(arm_cfft_instance_f64 * S); 345 arm_status arm_cfft_init_512_f64(arm_cfft_instance_f64 * S); 346 arm_status arm_cfft_init_256_f64(arm_cfft_instance_f64 * S); 347 arm_status arm_cfft_init_128_f64(arm_cfft_instance_f64 * S); 348 arm_status arm_cfft_init_64_f64(arm_cfft_instance_f64 * S); 349 arm_status arm_cfft_init_32_f64(arm_cfft_instance_f64 * S); 350 arm_status arm_cfft_init_16_f64(arm_cfft_instance_f64 * S); 351 352 arm_status arm_cfft_init_f64( 353 arm_cfft_instance_f64 * S, 354 uint16_t fftLen); 355 356 void arm_cfft_f64( 357 const arm_cfft_instance_f64 * S, 358 float64_t * p1, 359 uint8_t ifftFlag, 360 uint8_t bitReverseFlag); 361 362 /** 363 * @brief Instance structure for the Q15 RFFT/RIFFT function. 364 */ 365 typedef struct 366 { 367 uint32_t fftLenReal; /**< length of the real FFT. */ 368 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */ 369 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */ 370 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 371 const q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */ 372 const q15_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */ 373 #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) 374 arm_cfft_instance_q15 cfftInst; 375 #else 376 const arm_cfft_instance_q15 *pCfft; /**< points to the complex FFT instance. */ 377 #endif 378 } arm_rfft_instance_q15; 379 380 arm_status arm_rfft_init_32_q15( 381 arm_rfft_instance_q15 * S, 382 uint32_t ifftFlagR, 383 uint32_t bitReverseFlag); 384 385 arm_status arm_rfft_init_64_q15( 386 arm_rfft_instance_q15 * S, 387 uint32_t ifftFlagR, 388 uint32_t bitReverseFlag); 389 390 arm_status arm_rfft_init_128_q15( 391 arm_rfft_instance_q15 * S, 392 uint32_t ifftFlagR, 393 uint32_t bitReverseFlag); 394 395 arm_status arm_rfft_init_256_q15( 396 arm_rfft_instance_q15 * S, 397 uint32_t ifftFlagR, 398 uint32_t bitReverseFlag); 399 400 arm_status arm_rfft_init_512_q15( 401 arm_rfft_instance_q15 * S, 402 uint32_t ifftFlagR, 403 uint32_t bitReverseFlag); 404 405 arm_status arm_rfft_init_1024_q15( 406 arm_rfft_instance_q15 * S, 407 uint32_t ifftFlagR, 408 uint32_t bitReverseFlag); 409 410 arm_status arm_rfft_init_2048_q15( 411 arm_rfft_instance_q15 * S, 412 uint32_t ifftFlagR, 413 uint32_t bitReverseFlag); 414 415 arm_status arm_rfft_init_4096_q15( 416 arm_rfft_instance_q15 * S, 417 uint32_t ifftFlagR, 418 uint32_t bitReverseFlag); 419 420 arm_status arm_rfft_init_8192_q15( 421 arm_rfft_instance_q15 * S, 422 uint32_t ifftFlagR, 423 uint32_t bitReverseFlag); 424 425 arm_status arm_rfft_init_q15( 426 arm_rfft_instance_q15 * S, 427 uint32_t fftLenReal, 428 uint32_t ifftFlagR, 429 uint32_t bitReverseFlag); 430 431 void arm_rfft_q15( 432 const arm_rfft_instance_q15 * S, 433 q15_t * pSrc, 434 q15_t * pDst); 435 436 /** 437 * @brief Instance structure for the Q31 RFFT/RIFFT function. 438 */ 439 typedef struct 440 { 441 uint32_t fftLenReal; /**< length of the real FFT. */ 442 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */ 443 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */ 444 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 445 const q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */ 446 const q31_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */ 447 #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) 448 arm_cfft_instance_q31 cfftInst; 449 #else 450 const arm_cfft_instance_q31 *pCfft; /**< points to the complex FFT instance. */ 451 #endif 452 } arm_rfft_instance_q31; 453 454 arm_status arm_rfft_init_32_q31( 455 arm_rfft_instance_q31 * S, 456 uint32_t ifftFlagR, 457 uint32_t bitReverseFlag); 458 459 arm_status arm_rfft_init_64_q31( 460 arm_rfft_instance_q31 * S, 461 uint32_t ifftFlagR, 462 uint32_t bitReverseFlag); 463 464 arm_status arm_rfft_init_128_q31( 465 arm_rfft_instance_q31 * S, 466 uint32_t ifftFlagR, 467 uint32_t bitReverseFlag); 468 469 arm_status arm_rfft_init_256_q31( 470 arm_rfft_instance_q31 * S, 471 uint32_t ifftFlagR, 472 uint32_t bitReverseFlag); 473 474 arm_status arm_rfft_init_512_q31( 475 arm_rfft_instance_q31 * S, 476 uint32_t ifftFlagR, 477 uint32_t bitReverseFlag); 478 479 arm_status arm_rfft_init_1024_q31( 480 arm_rfft_instance_q31 * S, 481 uint32_t ifftFlagR, 482 uint32_t bitReverseFlag); 483 484 arm_status arm_rfft_init_2048_q31( 485 arm_rfft_instance_q31 * S, 486 uint32_t ifftFlagR, 487 uint32_t bitReverseFlag); 488 489 arm_status arm_rfft_init_4096_q31( 490 arm_rfft_instance_q31 * S, 491 uint32_t ifftFlagR, 492 uint32_t bitReverseFlag); 493 494 arm_status arm_rfft_init_8192_q31( 495 arm_rfft_instance_q31 * S, 496 uint32_t ifftFlagR, 497 uint32_t bitReverseFlag); 498 499 arm_status arm_rfft_init_q31( 500 arm_rfft_instance_q31 * S, 501 uint32_t fftLenReal, 502 uint32_t ifftFlagR, 503 uint32_t bitReverseFlag); 504 505 void arm_rfft_q31( 506 const arm_rfft_instance_q31 * S, 507 q31_t * pSrc, 508 q31_t * pDst); 509 510 /** 511 * @brief Instance structure for the floating-point RFFT/RIFFT function. 512 */ 513 typedef struct 514 { 515 uint32_t fftLenReal; /**< length of the real FFT. */ 516 uint16_t fftLenBy2; /**< length of the complex FFT. */ 517 uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */ 518 uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */ 519 uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ 520 const float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */ 521 const float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */ 522 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */ 523 } arm_rfft_instance_f32; 524 525 arm_status arm_rfft_init_f32( 526 arm_rfft_instance_f32 * S, 527 arm_cfft_radix4_instance_f32 * S_CFFT, 528 uint32_t fftLenReal, 529 uint32_t ifftFlagR, 530 uint32_t bitReverseFlag); 531 532 void arm_rfft_f32( 533 const arm_rfft_instance_f32 * S, 534 float32_t * pSrc, 535 float32_t * pDst); 536 537 /** 538 * @brief Instance structure for the Double Precision Floating-point RFFT/RIFFT function. 539 */ 540 typedef struct 541 { 542 arm_cfft_instance_f64 Sint; /**< Internal CFFT structure. */ 543 uint16_t fftLenRFFT; /**< length of the real sequence */ 544 const float64_t * pTwiddleRFFT; /**< Twiddle factors real stage */ 545 } arm_rfft_fast_instance_f64 ; 546 547 arm_status arm_rfft_fast_init_32_f64( arm_rfft_fast_instance_f64 * S ); 548 arm_status arm_rfft_fast_init_64_f64( arm_rfft_fast_instance_f64 * S ); 549 arm_status arm_rfft_fast_init_128_f64( arm_rfft_fast_instance_f64 * S ); 550 arm_status arm_rfft_fast_init_256_f64( arm_rfft_fast_instance_f64 * S ); 551 arm_status arm_rfft_fast_init_512_f64( arm_rfft_fast_instance_f64 * S ); 552 arm_status arm_rfft_fast_init_1024_f64( arm_rfft_fast_instance_f64 * S ); 553 arm_status arm_rfft_fast_init_2048_f64( arm_rfft_fast_instance_f64 * S ); 554 arm_status arm_rfft_fast_init_4096_f64( arm_rfft_fast_instance_f64 * S ); 555 556 arm_status arm_rfft_fast_init_f64 ( 557 arm_rfft_fast_instance_f64 * S, 558 uint16_t fftLen); 559 560 561 void arm_rfft_fast_f64( 562 arm_rfft_fast_instance_f64 * S, 563 float64_t * p, float64_t * pOut, 564 uint8_t ifftFlag); 565 566 567 /** 568 * @brief Instance structure for the floating-point RFFT/RIFFT function. 569 */ 570 typedef struct 571 { 572 arm_cfft_instance_f32 Sint; /**< Internal CFFT structure. */ 573 uint16_t fftLenRFFT; /**< length of the real sequence */ 574 const float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */ 575 } arm_rfft_fast_instance_f32 ; 576 577 arm_status arm_rfft_fast_init_32_f32( arm_rfft_fast_instance_f32 * S ); 578 arm_status arm_rfft_fast_init_64_f32( arm_rfft_fast_instance_f32 * S ); 579 arm_status arm_rfft_fast_init_128_f32( arm_rfft_fast_instance_f32 * S ); 580 arm_status arm_rfft_fast_init_256_f32( arm_rfft_fast_instance_f32 * S ); 581 arm_status arm_rfft_fast_init_512_f32( arm_rfft_fast_instance_f32 * S ); 582 arm_status arm_rfft_fast_init_1024_f32( arm_rfft_fast_instance_f32 * S ); 583 arm_status arm_rfft_fast_init_2048_f32( arm_rfft_fast_instance_f32 * S ); 584 arm_status arm_rfft_fast_init_4096_f32( arm_rfft_fast_instance_f32 * S ); 585 586 arm_status arm_rfft_fast_init_f32 ( 587 arm_rfft_fast_instance_f32 * S, 588 uint16_t fftLen); 589 590 591 void arm_rfft_fast_f32( 592 const arm_rfft_fast_instance_f32 * S, 593 float32_t * p, float32_t * pOut, 594 uint8_t ifftFlag); 595 596 /** 597 * @brief Instance structure for the floating-point DCT4/IDCT4 function. 598 */ 599 typedef struct 600 { 601 uint16_t N; /**< length of the DCT4. */ 602 uint16_t Nby2; /**< half of the length of the DCT4. */ 603 float32_t normalize; /**< normalizing factor. */ 604 const float32_t *pTwiddle; /**< points to the twiddle factor table. */ 605 const float32_t *pCosFactor; /**< points to the cosFactor table. */ 606 arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */ 607 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */ 608 } arm_dct4_instance_f32; 609 610 611 /** 612 * @brief Initialization function for the floating-point DCT4/IDCT4. 613 * @param[in,out] S points to an instance of floating-point DCT4/IDCT4 structure. 614 * @param[in] S_RFFT points to an instance of floating-point RFFT/RIFFT structure. 615 * @param[in] S_CFFT points to an instance of floating-point CFFT/CIFFT structure. 616 * @param[in] N length of the DCT4. 617 * @param[in] Nby2 half of the length of the DCT4. 618 * @param[in] normalize normalizing factor. 619 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported transform length. 620 */ 621 arm_status arm_dct4_init_f32( 622 arm_dct4_instance_f32 * S, 623 arm_rfft_instance_f32 * S_RFFT, 624 arm_cfft_radix4_instance_f32 * S_CFFT, 625 uint16_t N, 626 uint16_t Nby2, 627 float32_t normalize); 628 629 630 /** 631 * @brief Processing function for the floating-point DCT4/IDCT4. 632 * @param[in] S points to an instance of the floating-point DCT4/IDCT4 structure. 633 * @param[in] pState points to state buffer. 634 * @param[in,out] pInlineBuffer points to the in-place input and output buffer. 635 */ 636 void arm_dct4_f32( 637 const arm_dct4_instance_f32 * S, 638 float32_t * pState, 639 float32_t * pInlineBuffer); 640 641 642 /** 643 * @brief Instance structure for the Q31 DCT4/IDCT4 function. 644 */ 645 typedef struct 646 { 647 uint16_t N; /**< length of the DCT4. */ 648 uint16_t Nby2; /**< half of the length of the DCT4. */ 649 q31_t normalize; /**< normalizing factor. */ 650 const q31_t *pTwiddle; /**< points to the twiddle factor table. */ 651 const q31_t *pCosFactor; /**< points to the cosFactor table. */ 652 arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */ 653 arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */ 654 } arm_dct4_instance_q31; 655 656 657 /** 658 * @brief Initialization function for the Q31 DCT4/IDCT4. 659 * @param[in,out] S points to an instance of Q31 DCT4/IDCT4 structure. 660 * @param[in] S_RFFT points to an instance of Q31 RFFT/RIFFT structure 661 * @param[in] S_CFFT points to an instance of Q31 CFFT/CIFFT structure 662 * @param[in] N length of the DCT4. 663 * @param[in] Nby2 half of the length of the DCT4. 664 * @param[in] normalize normalizing factor. 665 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length. 666 */ 667 arm_status arm_dct4_init_q31( 668 arm_dct4_instance_q31 * S, 669 arm_rfft_instance_q31 * S_RFFT, 670 arm_cfft_radix4_instance_q31 * S_CFFT, 671 uint16_t N, 672 uint16_t Nby2, 673 q31_t normalize); 674 675 676 /** 677 * @brief Processing function for the Q31 DCT4/IDCT4. 678 * @param[in] S points to an instance of the Q31 DCT4 structure. 679 * @param[in] pState points to state buffer. 680 * @param[in,out] pInlineBuffer points to the in-place input and output buffer. 681 */ 682 void arm_dct4_q31( 683 const arm_dct4_instance_q31 * S, 684 q31_t * pState, 685 q31_t * pInlineBuffer); 686 687 688 /** 689 * @brief Instance structure for the Q15 DCT4/IDCT4 function. 690 */ 691 typedef struct 692 { 693 uint16_t N; /**< length of the DCT4. */ 694 uint16_t Nby2; /**< half of the length of the DCT4. */ 695 q15_t normalize; /**< normalizing factor. */ 696 const q15_t *pTwiddle; /**< points to the twiddle factor table. */ 697 const q15_t *pCosFactor; /**< points to the cosFactor table. */ 698 arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */ 699 arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */ 700 } arm_dct4_instance_q15; 701 702 703 /** 704 * @brief Initialization function for the Q15 DCT4/IDCT4. 705 * @param[in,out] S points to an instance of Q15 DCT4/IDCT4 structure. 706 * @param[in] S_RFFT points to an instance of Q15 RFFT/RIFFT structure. 707 * @param[in] S_CFFT points to an instance of Q15 CFFT/CIFFT structure. 708 * @param[in] N length of the DCT4. 709 * @param[in] Nby2 half of the length of the DCT4. 710 * @param[in] normalize normalizing factor. 711 * @return arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length. 712 */ 713 arm_status arm_dct4_init_q15( 714 arm_dct4_instance_q15 * S, 715 arm_rfft_instance_q15 * S_RFFT, 716 arm_cfft_radix4_instance_q15 * S_CFFT, 717 uint16_t N, 718 uint16_t Nby2, 719 q15_t normalize); 720 721 722 /** 723 * @brief Processing function for the Q15 DCT4/IDCT4. 724 * @param[in] S points to an instance of the Q15 DCT4 structure. 725 * @param[in] pState points to state buffer. 726 * @param[in,out] pInlineBuffer points to the in-place input and output buffer. 727 */ 728 void arm_dct4_q15( 729 const arm_dct4_instance_q15 * S, 730 q15_t * pState, 731 q15_t * pInlineBuffer); 732 733 /** 734 * @brief Instance structure for the Floating-point MFCC function. 735 */ 736 typedef struct 737 { 738 const float32_t *dctCoefs; /**< Internal DCT coefficients */ 739 const float32_t *filterCoefs; /**< Internal Mel filter coefficients */ 740 const float32_t *windowCoefs; /**< Windowing coefficients */ 741 const uint32_t *filterPos; /**< Internal Mel filter positions in spectrum */ 742 const uint32_t *filterLengths; /**< Internal Mel filter lengths */ 743 uint32_t fftLen; /**< FFT length */ 744 uint32_t nbMelFilters; /**< Number of Mel filters */ 745 uint32_t nbDctOutputs; /**< Number of DCT outputs */ 746 #if defined(ARM_MFCC_CFFT_BASED) 747 /* Implementation of the MFCC is using a CFFT */ 748 arm_cfft_instance_f32 cfft; /**< Internal CFFT instance */ 749 #else 750 /* Implementation of the MFCC is using a RFFT (default) */ 751 arm_rfft_fast_instance_f32 rfft; 752 #endif 753 } arm_mfcc_instance_f32 ; 754 755 arm_status arm_mfcc_init_32_f32( 756 arm_mfcc_instance_f32 * S, 757 uint32_t nbMelFilters, 758 uint32_t nbDctOutputs, 759 const float32_t *dctCoefs, 760 const uint32_t *filterPos, 761 const uint32_t *filterLengths, 762 const float32_t *filterCoefs, 763 const float32_t *windowCoefs 764 ); 765 766 arm_status arm_mfcc_init_64_f32( 767 arm_mfcc_instance_f32 * S, 768 uint32_t nbMelFilters, 769 uint32_t nbDctOutputs, 770 const float32_t *dctCoefs, 771 const uint32_t *filterPos, 772 const uint32_t *filterLengths, 773 const float32_t *filterCoefs, 774 const float32_t *windowCoefs 775 ); 776 777 arm_status arm_mfcc_init_128_f32( 778 arm_mfcc_instance_f32 * S, 779 uint32_t nbMelFilters, 780 uint32_t nbDctOutputs, 781 const float32_t *dctCoefs, 782 const uint32_t *filterPos, 783 const uint32_t *filterLengths, 784 const float32_t *filterCoefs, 785 const float32_t *windowCoefs 786 ); 787 788 arm_status arm_mfcc_init_256_f32( 789 arm_mfcc_instance_f32 * S, 790 uint32_t nbMelFilters, 791 uint32_t nbDctOutputs, 792 const float32_t *dctCoefs, 793 const uint32_t *filterPos, 794 const uint32_t *filterLengths, 795 const float32_t *filterCoefs, 796 const float32_t *windowCoefs 797 ); 798 799 arm_status arm_mfcc_init_512_f32( 800 arm_mfcc_instance_f32 * S, 801 uint32_t nbMelFilters, 802 uint32_t nbDctOutputs, 803 const float32_t *dctCoefs, 804 const uint32_t *filterPos, 805 const uint32_t *filterLengths, 806 const float32_t *filterCoefs, 807 const float32_t *windowCoefs 808 ); 809 810 arm_status arm_mfcc_init_1024_f32( 811 arm_mfcc_instance_f32 * S, 812 uint32_t nbMelFilters, 813 uint32_t nbDctOutputs, 814 const float32_t *dctCoefs, 815 const uint32_t *filterPos, 816 const uint32_t *filterLengths, 817 const float32_t *filterCoefs, 818 const float32_t *windowCoefs 819 ); 820 821 arm_status arm_mfcc_init_2048_f32( 822 arm_mfcc_instance_f32 * S, 823 uint32_t nbMelFilters, 824 uint32_t nbDctOutputs, 825 const float32_t *dctCoefs, 826 const uint32_t *filterPos, 827 const uint32_t *filterLengths, 828 const float32_t *filterCoefs, 829 const float32_t *windowCoefs 830 ); 831 832 arm_status arm_mfcc_init_4096_f32( 833 arm_mfcc_instance_f32 * S, 834 uint32_t nbMelFilters, 835 uint32_t nbDctOutputs, 836 const float32_t *dctCoefs, 837 const uint32_t *filterPos, 838 const uint32_t *filterLengths, 839 const float32_t *filterCoefs, 840 const float32_t *windowCoefs 841 ); 842 843 arm_status arm_mfcc_init_f32( 844 arm_mfcc_instance_f32 * S, 845 uint32_t fftLen, 846 uint32_t nbMelFilters, 847 uint32_t nbDctOutputs, 848 const float32_t *dctCoefs, 849 const uint32_t *filterPos, 850 const uint32_t *filterLengths, 851 const float32_t *filterCoefs, 852 const float32_t *windowCoefs 853 ); 854 855 856 /** 857 @brief MFCC F32 858 @param[in] S points to the mfcc instance structure 859 @param[in] pSrc points to the input samples 860 @param[out] pDst points to the output MFCC values 861 @param[inout] pTmp points to a temporary buffer of complex 862 */ 863 void arm_mfcc_f32( 864 const arm_mfcc_instance_f32 * S, 865 float32_t *pSrc, 866 float32_t *pDst, 867 float32_t *pTmp 868 ); 869 870 typedef struct 871 { 872 const q31_t *dctCoefs; /**< Internal DCT coefficients */ 873 const q31_t *filterCoefs; /**< Internal Mel filter coefficients */ 874 const q31_t *windowCoefs; /**< Windowing coefficients */ 875 const uint32_t *filterPos; /**< Internal Mel filter positions in spectrum */ 876 const uint32_t *filterLengths; /**< Internal Mel filter lengths */ 877 uint32_t fftLen; /**< FFT length */ 878 uint32_t nbMelFilters; /**< Number of Mel filters */ 879 uint32_t nbDctOutputs; /**< Number of DCT outputs */ 880 #if defined(ARM_MFCC_CFFT_BASED) 881 /* Implementation of the MFCC is using a CFFT */ 882 arm_cfft_instance_q31 cfft; /**< Internal CFFT instance */ 883 #else 884 /* Implementation of the MFCC is using a RFFT (default) */ 885 arm_rfft_instance_q31 rfft; 886 #endif 887 } arm_mfcc_instance_q31 ; 888 889 arm_status arm_mfcc_init_32_q31( 890 arm_mfcc_instance_q31 * S, 891 uint32_t nbMelFilters, 892 uint32_t nbDctOutputs, 893 const q31_t *dctCoefs, 894 const uint32_t *filterPos, 895 const uint32_t *filterLengths, 896 const q31_t *filterCoefs, 897 const q31_t *windowCoefs 898 ); 899 900 arm_status arm_mfcc_init_64_q31( 901 arm_mfcc_instance_q31 * S, 902 uint32_t nbMelFilters, 903 uint32_t nbDctOutputs, 904 const q31_t *dctCoefs, 905 const uint32_t *filterPos, 906 const uint32_t *filterLengths, 907 const q31_t *filterCoefs, 908 const q31_t *windowCoefs 909 ); 910 911 arm_status arm_mfcc_init_128_q31( 912 arm_mfcc_instance_q31 * S, 913 uint32_t nbMelFilters, 914 uint32_t nbDctOutputs, 915 const q31_t *dctCoefs, 916 const uint32_t *filterPos, 917 const uint32_t *filterLengths, 918 const q31_t *filterCoefs, 919 const q31_t *windowCoefs 920 ); 921 922 arm_status arm_mfcc_init_256_q31( 923 arm_mfcc_instance_q31 * S, 924 uint32_t nbMelFilters, 925 uint32_t nbDctOutputs, 926 const q31_t *dctCoefs, 927 const uint32_t *filterPos, 928 const uint32_t *filterLengths, 929 const q31_t *filterCoefs, 930 const q31_t *windowCoefs 931 ); 932 933 arm_status arm_mfcc_init_512_q31( 934 arm_mfcc_instance_q31 * S, 935 uint32_t nbMelFilters, 936 uint32_t nbDctOutputs, 937 const q31_t *dctCoefs, 938 const uint32_t *filterPos, 939 const uint32_t *filterLengths, 940 const q31_t *filterCoefs, 941 const q31_t *windowCoefs 942 ); 943 944 arm_status arm_mfcc_init_1024_q31( 945 arm_mfcc_instance_q31 * S, 946 uint32_t nbMelFilters, 947 uint32_t nbDctOutputs, 948 const q31_t *dctCoefs, 949 const uint32_t *filterPos, 950 const uint32_t *filterLengths, 951 const q31_t *filterCoefs, 952 const q31_t *windowCoefs 953 ); 954 955 arm_status arm_mfcc_init_2048_q31( 956 arm_mfcc_instance_q31 * S, 957 uint32_t nbMelFilters, 958 uint32_t nbDctOutputs, 959 const q31_t *dctCoefs, 960 const uint32_t *filterPos, 961 const uint32_t *filterLengths, 962 const q31_t *filterCoefs, 963 const q31_t *windowCoefs 964 ); 965 966 arm_status arm_mfcc_init_4096_q31( 967 arm_mfcc_instance_q31 * S, 968 uint32_t nbMelFilters, 969 uint32_t nbDctOutputs, 970 const q31_t *dctCoefs, 971 const uint32_t *filterPos, 972 const uint32_t *filterLengths, 973 const q31_t *filterCoefs, 974 const q31_t *windowCoefs 975 ); 976 977 arm_status arm_mfcc_init_q31( 978 arm_mfcc_instance_q31 * S, 979 uint32_t fftLen, 980 uint32_t nbMelFilters, 981 uint32_t nbDctOutputs, 982 const q31_t *dctCoefs, 983 const uint32_t *filterPos, 984 const uint32_t *filterLengths, 985 const q31_t *filterCoefs, 986 const q31_t *windowCoefs 987 ); 988 989 990 /** 991 @brief MFCC Q31 992 @param[in] S points to the mfcc instance structure 993 @param[in] pSrc points to the input samples 994 @param[out] pDst points to the output MFCC values 995 @param[inout] pTmp points to a temporary buffer of complex 996 @return none 997 */ 998 arm_status arm_mfcc_q31( 999 const arm_mfcc_instance_q31 * S, 1000 q31_t *pSrc, 1001 q31_t *pDst, 1002 q31_t *pTmp 1003 ); 1004 1005 typedef struct 1006 { 1007 const q15_t *dctCoefs; /**< Internal DCT coefficients */ 1008 const q15_t *filterCoefs; /**< Internal Mel filter coefficients */ 1009 const q15_t *windowCoefs; /**< Windowing coefficients */ 1010 const uint32_t *filterPos; /**< Internal Mel filter positions in spectrum */ 1011 const uint32_t *filterLengths; /**< Internal Mel filter lengths */ 1012 uint32_t fftLen; /**< FFT length */ 1013 uint32_t nbMelFilters; /**< Number of Mel filters */ 1014 uint32_t nbDctOutputs; /**< Number of DCT outputs */ 1015 #if defined(ARM_MFCC_CFFT_BASED) 1016 /* Implementation of the MFCC is using a CFFT */ 1017 arm_cfft_instance_q15 cfft; /**< Internal CFFT instance */ 1018 #else 1019 /* Implementation of the MFCC is using a RFFT (default) */ 1020 arm_rfft_instance_q15 rfft; 1021 #endif 1022 } arm_mfcc_instance_q15 ; 1023 1024 arm_status arm_mfcc_init_32_q15( 1025 arm_mfcc_instance_q15 * S, 1026 uint32_t nbMelFilters, 1027 uint32_t nbDctOutputs, 1028 const q15_t *dctCoefs, 1029 const uint32_t *filterPos, 1030 const uint32_t *filterLengths, 1031 const q15_t *filterCoefs, 1032 const q15_t *windowCoefs 1033 ); 1034 1035 arm_status arm_mfcc_init_64_q15( 1036 arm_mfcc_instance_q15 * S, 1037 uint32_t nbMelFilters, 1038 uint32_t nbDctOutputs, 1039 const q15_t *dctCoefs, 1040 const uint32_t *filterPos, 1041 const uint32_t *filterLengths, 1042 const q15_t *filterCoefs, 1043 const q15_t *windowCoefs 1044 ); 1045 1046 arm_status arm_mfcc_init_128_q15( 1047 arm_mfcc_instance_q15 * S, 1048 uint32_t nbMelFilters, 1049 uint32_t nbDctOutputs, 1050 const q15_t *dctCoefs, 1051 const uint32_t *filterPos, 1052 const uint32_t *filterLengths, 1053 const q15_t *filterCoefs, 1054 const q15_t *windowCoefs 1055 ); 1056 1057 arm_status arm_mfcc_init_256_q15( 1058 arm_mfcc_instance_q15 * S, 1059 uint32_t nbMelFilters, 1060 uint32_t nbDctOutputs, 1061 const q15_t *dctCoefs, 1062 const uint32_t *filterPos, 1063 const uint32_t *filterLengths, 1064 const q15_t *filterCoefs, 1065 const q15_t *windowCoefs 1066 ); 1067 1068 arm_status arm_mfcc_init_512_q15( 1069 arm_mfcc_instance_q15 * S, 1070 uint32_t nbMelFilters, 1071 uint32_t nbDctOutputs, 1072 const q15_t *dctCoefs, 1073 const uint32_t *filterPos, 1074 const uint32_t *filterLengths, 1075 const q15_t *filterCoefs, 1076 const q15_t *windowCoefs 1077 ); 1078 1079 arm_status arm_mfcc_init_1024_q15( 1080 arm_mfcc_instance_q15 * S, 1081 uint32_t nbMelFilters, 1082 uint32_t nbDctOutputs, 1083 const q15_t *dctCoefs, 1084 const uint32_t *filterPos, 1085 const uint32_t *filterLengths, 1086 const q15_t *filterCoefs, 1087 const q15_t *windowCoefs 1088 ); 1089 1090 arm_status arm_mfcc_init_2048_q15( 1091 arm_mfcc_instance_q15 * S, 1092 uint32_t nbMelFilters, 1093 uint32_t nbDctOutputs, 1094 const q15_t *dctCoefs, 1095 const uint32_t *filterPos, 1096 const uint32_t *filterLengths, 1097 const q15_t *filterCoefs, 1098 const q15_t *windowCoefs 1099 ); 1100 1101 arm_status arm_mfcc_init_4096_q15( 1102 arm_mfcc_instance_q15 * S, 1103 uint32_t nbMelFilters, 1104 uint32_t nbDctOutputs, 1105 const q15_t *dctCoefs, 1106 const uint32_t *filterPos, 1107 const uint32_t *filterLengths, 1108 const q15_t *filterCoefs, 1109 const q15_t *windowCoefs 1110 ); 1111 1112 arm_status arm_mfcc_init_q15( 1113 arm_mfcc_instance_q15 * S, 1114 uint32_t fftLen, 1115 uint32_t nbMelFilters, 1116 uint32_t nbDctOutputs, 1117 const q15_t *dctCoefs, 1118 const uint32_t *filterPos, 1119 const uint32_t *filterLengths, 1120 const q15_t *filterCoefs, 1121 const q15_t *windowCoefs 1122 ); 1123 1124 1125 /** 1126 @brief MFCC Q15 1127 @param[in] S points to the mfcc instance structure 1128 @param[in] pSrc points to the input samples 1129 @param[out] pDst points to the output MFCC values in q8.7 format 1130 @param[inout] pTmp points to a temporary buffer of complex 1131 @return error status 1132 */ 1133 arm_status arm_mfcc_q15( 1134 const arm_mfcc_instance_q15 * S, 1135 q15_t *pSrc, 1136 q15_t *pDst, 1137 q31_t *pTmp 1138 ); 1139 1140 1141 #ifdef __cplusplus 1142 } 1143 #endif 1144 1145 #endif /* ifndef _TRANSFORM_FUNCTIONS_H_ */ 1146