Q15 and Q31
The real algorithms ถูกกำหนดในลักษณะที่คล้ายกันและใช้ N/2 complex transforms เบื้องหลัง the scenes.
The complex transforms ใช้รวมภายในการปรับขนาดเพื่อป้องกัน fixed-point overflows. The overall scaling เท่ากับ 1/(fftLen/2).
A separate instance structure ต้องถูกกำหนดสำหรับแต่ละ transform ที่ใช้แต่ twiddle factor และ bit reversal tables สามารถถูกใช้ใหม่.
นอกจากนี้ยังมี an associated initialization function สำหรับแต่ละ data type. The initialization function ดำเนินการทำงานต่อไปนี้ :
• เซ็ตค่าของ the internal structure fields.
• เริ่มต้น twiddle factor table and bit reversal table pointers.
• เริ่มต้น the internal complex FFT data structure.
การใช้ the initialization function เป็นตัวเลือก. อย่างไรก็ตาม, ถ้า the initialization function ถูกใช้, ดังนั้น the instance structure ไม่สามารถถูกวางลงใน a const data section. เพื่อวาง an instance structure ลงใน a const data section, the instance structure ควรถูกเริ่มต้นอย่าง manual ดังต่อไปนี้ :
arm_rfft_instance_q31 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
arm_rfft_instance_q15 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
โดยที่ fftLenReal คือความยาวของ the real transform; fftLenBy2 ความยาวของ the internal complex transform. ifftFlagR เลือก forward (=0) or inverse (=1) transform. bitReverseFlagR เลือก bit reversed output (=0) หรือ normal order output (=1). twidCoefRModifier ก้าวย่าง modifier สำหรับ the twiddle factor table. ค่าจะขึ้นอยู่กับ the FFT length; pTwiddleAReal ชี้ไปยัง the A array of twiddle coefficients; pTwiddleBReal ชี้ไปยัง the B array of twiddle coefficients; pCfft ชี้ไปยัง the CFFT Instance structure. The CFFT structure ต้องถูกเริ่มต้นด้วย. อ้างอิงถึง arm_cfft_radix4_f32() สำหรับรายละเอียดเกี่ยวกับ static initialization of the complex FFT instance structure.
end of RealFFT_Table group