Skip to main content

Module filtering

Module filtering 

Source
Expand description

Digital filtering functions (FIR, Biquad IIR Direct Form I & II, LMS Adaptive Filter, Convolution, Correlation).

Structs§

BiquadCascadeDf2tInstanceF32
Instance structure for the floating-point Biquad Cascade Transposed Direct Form II filter.
BiquadCascadeDf2tInstanceQ15
Instance structure for the Q15 Biquad Cascade Transposed Direct Form II filter.
BiquadCascadeDf2tInstanceQ31
Instance structure for the Q31 Biquad Cascade Transposed Direct Form II filter.
BiquadCascadeInstanceF32
Instance structure for the floating-point Biquad Cascade Direct Form I filter.
BiquadCascadeInstanceQ15
Instance structure for the Q15 Biquad Cascade Direct Form I filter.
BiquadCascadeInstanceQ31
Instance structure for the Q31 Biquad Cascade Direct Form I filter.
CircularBuffer
Const-generic zero-allocation circular buffer and delay line for real-time DSP sample streams.
DcBlockerQ15
High-pass single-pole used as a DC blocker (Smith Ch. 19).
FirInstanceF32
Instance structure for the floating-point FIR filter.
FirInstanceQ15
Instance structure for the Q15 FIR filter.
FirInstanceQ31
Instance structure for the Q31 FIR filter.
LmsInstanceF32
Instance structure for the floating-point LMS adaptive filter.
LmsInstanceQ15
Q15 LMS adaptive filter.
NlmsInstanceF32
Normalized LMS instance (eps floors the power denominator).
NlmsInstanceQ15
Q15 NLMS instance.
RecursiveMovingAverage
Const-generic N-point moving average filter implemented recursively (Steven W. Smith, Ch. 15, Eq. 15-3): each sample is updated with a single add and subtract, instead of an O(N) convolution sum.
RecursiveMovingAverageQ15
Q15 recursive N-point moving average (same recurrence as RecursiveMovingAverage).
SinglePoleFilter
The cheapest possible IIR filter: a single-pole recursive low-pass or high-pass filter (Steven W. Smith, Ch. 19, Eq. 19-2 / 19-3), needing only one or two multiplies per sample. Coefficients are designed from a decay factor x (see crate::filter_design::single_pole_decay_from_cutoff / crate::filter_design::single_pole_decay_from_time_constant).
SinglePoleFilterQ15
Q15 single-pole recursive low-pass or high-pass filter (same recurrence as SinglePoleFilter). decay is Q1.15 in 0..1 (larger → lower cutoff).

Functions§

biquad_cascade_df1_f32
biquad_cascade_df1_q15
biquad_cascade_df1_q31
biquad_cascade_df2t_f32
biquad_cascade_df2t_q15
biquad_cascade_df2t_q31
conv_f32
conv_q7
conv_q15
conv_q31
correlate_f32
correlate_q15
correlate_q31
fast_convolve_f32
Performs fast linear convolution of signal and kernel via FFT multiplication. Output length is signal.len() + kernel.len() - 1.
fir_f32
fir_q15
fir_q31
lms_f32
lms_leaky_f32
Leaky LMS: w ← (1 - leak) w + 2 μ e x. leak = 0 matches lms_f32.
lms_leaky_q15
Leaky LMS in Q15. leak is Q1.15 (0 matches lms_q15).
lms_q15
median_filter_1d_f32
1D Conditional / Thresholded Median Filter for f32.
median_filter_1d_q15
1D Conditional Median Filter for Q15.
median_filter_1d_q31
1D Conditional Median Filter for Q31.
nlms_f32
NLMS: w ← w + μ e x / (eps + ||x||²).
nlms_q15