|
RADLib
RADical C++ application framework
|
Reusable power-of-two complex FFT plan with cached bit-reversal and twiddle factors. More...
#include <RADDsp.h>
Public Member Functions | |
| FftPlan ()=default | |
| Creates an empty invalid plan. More... | |
| FftPlan (size_t size) | |
| Creates a plan for size when size is a non-zero power of two. More... | |
| bool | reset (size_t size) |
| Rebuilds the plan and returns false for zero or non-power-of-two sizes. More... | |
| size_t | size () const |
| Returns the FFT length owned by this plan. More... | |
| bool | valid () const |
| Returns true when the plan has a non-zero power-of-two size. More... | |
| bool | transformInPlace (std::vector< ComplexSample > &samples, bool inverse=false) const |
| Transforms samples in place. Returns false if the plan or sample count is invalid. More... | |
| bool | transform (const std::vector< ComplexSample > &input, std::vector< ComplexSample > &output, bool inverse=false) const |
| Transforms input into output. Returns false if the plan or sample count is invalid. More... | |
| std::vector< ComplexSample > | transform (const std::vector< ComplexSample > &input, bool inverse=false) const |
| Transforms input and returns an empty vector if the plan or sample count is invalid. More... | |
| bool | transformManyInPlace (std::vector< std::vector< ComplexSample >> &frames, bool inverse=false) const |
| Transforms many equal-sized frames in place. Returns false if any frame has the wrong size. More... | |
| bool | transformMany (const std::vector< std::vector< ComplexSample >> &inputs, std::vector< std::vector< ComplexSample >> &outputs, bool inverse=false) const |
| Transforms many equal-sized frames. Returns false if any frame has the wrong size. More... | |
| std::vector< std::vector< ComplexSample > > | transformMany (const std::vector< std::vector< ComplexSample >> &inputs, bool inverse=false) const |
| Transforms many equal-sized frames, returning an empty vector on invalid input. More... | |
| bool | transformFramesInPlace (std::vector< ComplexSample > &frames, size_t frameCount, bool inverse=false) const |
| Transforms frameCount contiguous frames of size() in place. More... | |
| bool | transformFrames (const std::vector< ComplexSample > &input, size_t frameCount, std::vector< ComplexSample > &output, bool inverse=false) const |
| Transforms frameCount contiguous frames of size(). Returns false on invalid sizes. More... | |
| std::vector< ComplexSample > | transformFrames (const std::vector< ComplexSample > &input, size_t frameCount, bool inverse=false) const |
| Transforms frameCount contiguous frames, returning an empty vector on invalid input. More... | |
Reusable power-of-two complex FFT plan with cached bit-reversal and twiddle factors.
|
default |
Creates an empty invalid plan.
|
explicit |
Creates a plan for size when size is a non-zero power of two.
| bool RADDsp::FftPlan::reset | ( | size_t | size | ) |
Rebuilds the plan and returns false for zero or non-power-of-two sizes.
| size_t RADDsp::FftPlan::size | ( | ) | const |
Returns the FFT length owned by this plan.
| std::vector<ComplexSample> RADDsp::FftPlan::transform | ( | const std::vector< ComplexSample > & | input, |
| bool | inverse = false |
||
| ) | const |
Transforms input and returns an empty vector if the plan or sample count is invalid.
| bool RADDsp::FftPlan::transform | ( | const std::vector< ComplexSample > & | input, |
| std::vector< ComplexSample > & | output, | ||
| bool | inverse = false |
||
| ) | const |
Transforms input into output. Returns false if the plan or sample count is invalid.
| std::vector<ComplexSample> RADDsp::FftPlan::transformFrames | ( | const std::vector< ComplexSample > & | input, |
| size_t | frameCount, | ||
| bool | inverse = false |
||
| ) | const |
Transforms frameCount contiguous frames, returning an empty vector on invalid input.
| bool RADDsp::FftPlan::transformFrames | ( | const std::vector< ComplexSample > & | input, |
| size_t | frameCount, | ||
| std::vector< ComplexSample > & | output, | ||
| bool | inverse = false |
||
| ) | const |
Transforms frameCount contiguous frames of size(). Returns false on invalid sizes.
| bool RADDsp::FftPlan::transformFramesInPlace | ( | std::vector< ComplexSample > & | frames, |
| size_t | frameCount, | ||
| bool | inverse = false |
||
| ) | const |
Transforms frameCount contiguous frames of size() in place.
| bool RADDsp::FftPlan::transformInPlace | ( | std::vector< ComplexSample > & | samples, |
| bool | inverse = false |
||
| ) | const |
Transforms samples in place. Returns false if the plan or sample count is invalid.
| std::vector<std::vector<ComplexSample> > RADDsp::FftPlan::transformMany | ( | const std::vector< std::vector< ComplexSample >> & | inputs, |
| bool | inverse = false |
||
| ) | const |
Transforms many equal-sized frames, returning an empty vector on invalid input.
| bool RADDsp::FftPlan::transformMany | ( | const std::vector< std::vector< ComplexSample >> & | inputs, |
| std::vector< std::vector< ComplexSample >> & | outputs, | ||
| bool | inverse = false |
||
| ) | const |
Transforms many equal-sized frames. Returns false if any frame has the wrong size.
| bool RADDsp::FftPlan::transformManyInPlace | ( | std::vector< std::vector< ComplexSample >> & | frames, |
| bool | inverse = false |
||
| ) | const |
Transforms many equal-sized frames in place. Returns false if any frame has the wrong size.
| bool RADDsp::FftPlan::valid | ( | ) | const |
Returns true when the plan has a non-zero power-of-two size.