r2cfft - a small wrapper to simplify FFT/IFFTs of real-valued sequences

jasonconway

New member
I wanted to share a small wrapper function I wrote for the CMSIS arm_rfft_fast_f32() function. It is intended to provide a higher efficiency, near-drop-in-replacement for instances where arm_cfft_f32() is being used with real-valued sequences, and an algorithm based around using n+1 complex-conjugate-symmetric coefficients (as output by arm_rfft_fast_f32()) isn't available or unrealistic to implement.

A detailed description alongside some performance comparisons can be found on the project's GitHub page.

Its use cases are likely quite niche, but hopefully someone finds it useful!
 
Uses half as much memory and nearly twice as fast I suspect. An N-point FFT with real inputs can be done using an N/2-point complex FFT
using some clever pre- and post-processing.

An N-point complex-in complex-out FFT needs 2N floats for the inputs and outputs
An N-point real-in complex-out FFT needs N floats for the inputs and outputs (since the negative frequency bins
are redundant, being complex conjugates of the positive frequency bins)
 
Back
Top