-
- /**
- * @details
- * [url=home.php?mod=space&uid=247401]@brief[/url] Processing function for the floating-point complex FFT.
- * @param[in] *S points to an instance of the floating-point CFFT structure.
- * @param[in, out] *p1 points to the complex data buffer of size <code>2*fftLen</code>. Processing occurs in-place.
- * @param[in] ifftFlag flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform.
- * @param[in] bitReverseFlag flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output.
- * [url=home.php?mod=space&uid=266161]@return[/url] none.
- */
-
- void arm_cfft_f32(
- const arm_cfft_instance_f32 * S,
- float32_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag)
- {
- uint32_t L = S->fftLen, l;
- float32_t invL, * pSrc;
-
- if (ifftFlag == 1U)
- {
- /* Conjugate input data */
- pSrc = p1 + 1;
- for(l=0; l<L; l++)
- {
- *pSrc = -*pSrc;
- pSrc += 2;
- }
- }
-
- switch (L)
- {
- case 16:
- case 128:
- case 1024:
- arm_cfft_radix8by2_f32 ( (arm_cfft_instance_f32 *) S, p1);
- break;
- case 32:
- case 256:
- case 2048:
- arm_cfft_radix8by4_f32 ( (arm_cfft_instance_f32 *) S, p1);
- break;
- case 64:
- case 512:
- case 4096:
- arm_radix8_butterfly_f32( p1, L, (float32_t *) S->pTwiddle, 1);
- break;
- }
-
- if ( bitReverseFlag )
- arm_bitreversal_32((uint32_t*)p1,S->bitRevLength,S->pBitRevTable);
-
- if (ifftFlag == 1U)
- {
- invL = 1.0f/(float32_t)L;
- /* Conjugate and scale output data */
- pSrc = p1;
- for(l=0; l<L; l++)
- {
- *pSrc++ *= invL ;
- *pSrc = -(*pSrc) * invL;
- pSrc++;
- }
- }
- }
|