|
r8brain-free-src
High-quality pro audio sample rate converter library
|
Real-valued FFT transform class. More...
#include <CDSPRealFFT.h>
Public Member Functions | |
| void | convertToZP (double *const ap) const |
| void | forward (double *const p) const |
| double | getInvMulConst () const |
| int | getLen () const |
| int | getLenBits () const |
| void | inverse (double *const p) const |
| void | multiplyBlocks (const double *const aip, double *const aop) const |
| void | multiplyBlocks (const double *const aip1, const double *const aip2, double *const aop) const |
| void | multiplyBlocksZP (const double *const aip, double *const aop) const |
Friends | |
| class | CDSPRealFFTKeeper |
Real-valued FFT transform class.
Class implements a wrapper for real-valued discrete fast Fourier transform functions. The object of this class can only be obtained via the CDSPRealFFTKeeper class.
Uses functions from the FFT package by: Copyright(C) 1996-2001 Takuya OOURA http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html
Also uses Intel IPP library functions if available (if the R8B_IPP=1 macro was defined). Note that IPP library's FFT functions are 2-3 times more efficient on the modern Intel Core i7-3770K processor than Ooura's functions. It may be worthwhile investing in IPP. Note, that FFT functions take less than 20% of the overall sample rate conversion time. However, when the "power of 2" resampling is used the performance of FFT functions becomes "everything".
| void r8b::CDSPRealFFT::convertToZP | ( | double *const | ap | ) | const |
Function converts the specified forward-transformed block into "zero-phase" form suitable for use with the multiplyBlocksZP() function.
| [in,out] | ap | Block to transform. |
| void r8b::CDSPRealFFT::forward | ( | double *const | p | ) | const |
Function performs in-place forward FFT.
| [in,out] | p | Pointer to data block to transform, length should be equal to *this object's getLen(). |
| double r8b::CDSPRealFFT::getInvMulConst | ( | ) | const |
| int r8b::CDSPRealFFT::getLen | ( | ) | const |
| int r8b::CDSPRealFFT::getLenBits | ( | ) | const |
| void r8b::CDSPRealFFT::inverse | ( | double *const | p | ) | const |
Function performs in-place inverse FFT.
| [in,out] | p | Pointer to data block to transform, length should be equal to *this object's getLen(). |
| void r8b::CDSPRealFFT::multiplyBlocks | ( | const double *const | aip, |
| double *const | aop | ||
| ) | const |
Function multiplies two complex-valued data blocks in-place. Length of both data blocks should be equal to *this object's block length. Blocks should have been produced with the forward() function of *this object.
| aip | Input data block 1. | |
| [in,out] | aop | Output/input data block 2. |
| void r8b::CDSPRealFFT::multiplyBlocks | ( | const double *const | aip1, |
| const double *const | aip2, | ||
| double *const | aop | ||
| ) | const |
Function multiplies two complex-valued data blocks and places result in a new data block. Length of all data blocks should be equal to *this object's block length. Input blocks should have been produced with the forward() function of *this object.
| aip1 | Input data block 1. | |
| aip2 | Input data block 2. | |
| [out] | aop | Output data block, should not be equal to aip1 nor aip2. |
| void r8b::CDSPRealFFT::multiplyBlocksZP | ( | const double *const | aip, |
| double *const | aop | ||
| ) | const |
Function multiplies two complex-valued data blocks in-place, considering that the "ip" block contains "zero-phase" response. Length of both data blocks should be equal to *this object's block length. Blocks should have been produced with the forward() function of *this object.
| aip | Input data block 1, "zero-phase" response. This block should be first transformed via the convertToZP() function. | |
| [in,out] | aop | Output/input data block 2. |