#include <biquad.hpp>
|
| static void | process_stereo (BiquadT &left, BiquadT &right, SampleType *left_buffer, SampleType *right_buffer, std::size_t num_samples) |
| static void | process_chain (BiquadT *sections, std::size_t count, SampleType *buffer, std::size_t num_samples) noexcept |
| | Run a chain of sections (a cascade: each section's output feeds the next) over a buffer in place.
|
| static void | process_chain_stereo (BiquadT *left, BiquadT *right, std::size_t count, SampleType *left_buffer, SampleType *right_buffer, std::size_t num_samples) noexcept |
| | process_chain() for two channels at once, each through its own chain of count sections, with the channels in the lanes of one vector.
|
◆ Coefficients
template<typename SampleType = float>
◆ Type
template<typename SampleType = float>
| Enumerator |
|---|
| lowpass | |
| highpass | |
| bandpass | |
| notch | |
| allpass | |
| peaking | |
| low_shelf | |
| high_shelf | |
◆ BiquadT()
template<typename SampleType = float>
◆ coefficients()
template<typename SampleType = float>
◆ process() [1/2]
template<typename SampleType = float>
◆ process() [2/2]
template<typename SampleType = float>
◆ process_chain()
template<typename SampleType = float>
| void pulp::signal::BiquadT< SampleType >::process_chain |
( |
BiquadT< SampleType > * | sections, |
|
|
std::size_t | count, |
|
|
SampleType * | buffer, |
|
|
std::size_t | num_samples ) |
|
inlinestaticnoexcept |
Run a chain of sections (a cascade: each section's output feeds the next) over a buffer in place.
Sample-major over up to kChainSectionsPerPass sections at a time: each sample runs through every section of the pass before the next sample starts, so the sections' recursions are independent dependency chains that execute concurrently instead of one section's whole buffer waiting on its own feedback latency (pipeline interleaving). Each pass picks the fastest form that meets the block path's accuracy contract (see process(SampleType*, int)); a single filter's block path is the one-section case of the same choice:
- float passes of up to kWideStateMaxSections sections run the DF1 double-state form, with the signal kept in double between the sections of the pass;
- longer passes, and every double pass, run the feedback-last DF2T order when every section's largest pole radius is at most kFeedbackLastMaxPoleRadius (its error then stays close to the sample path's), and the sample path's order otherwise, which is bit-identical to chaining the sections' per-sample process() while the state stays above the 1e-15 snap threshold. The DF1 and feedback-last forms are faster than the sample order; the DSP throughput benchmark tracks the figures.
◆ process_chain_stereo()
template<typename SampleType = float>
| void pulp::signal::BiquadT< SampleType >::process_chain_stereo |
( |
BiquadT< SampleType > * | left, |
|
|
BiquadT< SampleType > * | right, |
|
|
std::size_t | count, |
|
|
SampleType * | left_buffer, |
|
|
SampleType * | right_buffer, |
|
|
std::size_t | num_samples ) |
|
inlinestaticnoexcept |
process_chain() for two channels at once, each through its own chain of count sections, with the channels in the lanes of one vector.
Each channel's output is bit-identical to process_chain() on it alone. Compilers without vector lanes (simd::kHasVectorLanes) run the two chains in turn. Passing one chain as both channels runs the left buffer and then the right through it, as two process_chain() calls.
◆ process_stereo()
template<typename SampleType = float>
| void pulp::signal::BiquadT< SampleType >::process_stereo |
( |
BiquadT< SampleType > & | left, |
|
|
BiquadT< SampleType > & | right, |
|
|
SampleType * | left_buffer, |
|
|
SampleType * | right_buffer, |
|
|
std::size_t | num_samples ) |
|
inlinestatic |
◆ reset()
template<typename SampleType = float>
◆ set_coefficients() [1/2]
template<typename SampleType = float>
template<typename U>
◆ set_coefficients() [2/2]
template<typename SampleType = float>
| void pulp::signal::BiquadT< SampleType >::set_coefficients |
( |
Type | type, |
|
|
SampleType | freq_hz, |
|
|
SampleType | q, |
|
|
SampleType | sample_rate, |
|
|
SampleType | gain_db = SampleType{0} ) |
|
inline |
◆ kChainSectionsPerPass
template<typename SampleType = float>
Sections process_chain() runs together in one sample-major pass.
A wider pass keeps more independent recursions in flight; splitting a cascade into narrower passes measured slower than one wide pass.
◆ kFeedbackLastMaxPoleRadius
template<typename SampleType = float>
◆ kStereoLaneMinSamples
template<typename SampleType = float>
◆ kWideStateMaxSections
template<typename SampleType = float>
Longest float pass that runs the DF1 double-state form; its extra double arithmetic makes longer passes slower than the DF2T forms.
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/biquad.hpp