A Fourier transform implementation using KissFFT for platforms where other accelerations are unavailable.
More...
#include <fourier_transform.h>
A Fourier transform implementation using KissFFT for platforms where other accelerations are unavailable.
KissFFT is a simple, universally compatible FFT library. This implementation manually arranges real-only data into a complex form before performing forward and inverse transforms, and includes logic to manipulate the Nyquist component.
- Note
- This class is used as a fallback when no other specialized FFT backends are available.
◆ FourierTransform()
vital::FourierTransform::FourierTransform |
( |
size_t | bits | ) |
|
|
inline |
Constructs a FourierTransform with the given bits using KissFFT.
- Parameters
-
bits | The exponent defining the FFT size. The FFT size is 2^bits. |
◆ ~FourierTransform()
vital::FourierTransform::~FourierTransform |
( |
| ) |
|
|
inline |
◆ transformRealForward()
void vital::FourierTransform::transformRealForward |
( |
float * | data | ) |
|
|
inline |
Performs an in-place forward real FFT using KissFFT.
The method rearranges the input array to form a complex array and then calls the forward KissFFT transform. After the transform, it sets the Nyquist and DC components to handle the real-only FFT format.
- Parameters
-
data | Pointer to the input/output data buffer. |
◆ transformRealInverse()
void vital::FourierTransform::transformRealInverse |
( |
float * | data | ) |
|
|
inline |
Performs an in-place inverse real FFT using KissFFT.
This method reconstructs the complex data from the given frequency-domain buffer, calls the inverse transform, and then extracts the real data. It also normalizes the resulting time-domain samples appropriately.
- Parameters
-
data | Pointer to the input/output data buffer in frequency-domain format. |
The documentation for this class was generated from the following file: