Struct dft_resampler_params¶
struct dft_resampler_params dft¶
struct dft_resampler_params { … } Parameters for constructing a dft_resampler .
The resampling factor is restricted to a power of two (positive for upsampling, negative for downsampling, zero for filter-only). The lowpass filter is designed with a Kaiser window from the desired stopband attenuation and transition width.
variable shift ¶
int shift Resampling factor as a power of 2 (e.g. 1 for 2x, -1 for 0.5x, 0 for filter-only).
Fully qualified name: kfr::dft_resampler_params::shift
Declared at dft/dft_resampler.hpp:55
variable cutoff ¶
fbase cutoff Normalised cutoff frequency (0..1], where 1.0 = Nyquist of the output rate.
Fully qualified name: kfr::dft_resampler_params::cutoff
Declared at dft/dft_resampler.hpp:56
variable stopband_atten_db ¶
fbase stopband_atten_db Desired stopband attenuation in dB (e.g. 144). Controls Kaiser beta.
Fully qualified name: kfr::dft_resampler_params::stopband_atten_db
Declared at dft/dft_resampler.hpp:57
variable transition_width ¶
fbase transition_width Transition bandwidth normalised to the lower-rate Nyquist (0..1].
Fully qualified name: kfr::dft_resampler_params::transition_width
Declared at dft/dft_resampler.hpp:58
variable input_block_size ¶
size_t
input_block_size Computed FFT block size (power of two) satisfying the overlap-save constraint.
Fully qualified name: kfr::dft_resampler_params::input_block_size
Declared at dft/dft_resampler.hpp:61
function factor() ¶
size_t factor() const noexcept Returns the absolute resampling factor (2^|shift|).
Fully qualified name: kfr::dft_resampler_params::factor()
Declared at dft/dft_resampler.hpp:64
function is_downsampling() ¶
bool is_downsampling() const noexcept Returns true if this is a downsampling configuration.
Fully qualified name: kfr::dft_resampler_params::is_downsampling()
Declared at dft/dft_resampler.hpp:66
function stage_factor() ¶
double stage_factor() const noexcept Returns the per-stage conversion ratio (>1 for upsampling, <1 for downsampling).
Fully qualified name: kfr::dft_resampler_params::stage_factor()
Declared at dft/dft_resampler.hpp:68
constructor dft_resampler_params(int, fbase, fbase, fbase) ¶
dft_resampler_params(int shift, fbase cutoff = 1, fbase stopband_atten_db = 144,
fbase transition_width = 0.02) noexcept Constructs resampler parameters.
| shift | Resampling factor as a power of 2 (positive=up, negative=down, 0=filter-only). |
| cutoff | Normalised cutoff frequency (0..1] relative to the output Nyquist. |
| stopband_atten_db | Desired stopband attenuation in dB. |
| transition_width | Transition bandwidth normalised to the lower-rate Nyquist (0..1). |
Note
input_block_size is computed from the Kaiser filter-length formula and rounded up to the next power of two.
Fully qualified name: kfr::dft_resampler_params::dft_resampler_params(int, fbase, fbase, fbase)
Declared at dft/dft_resampler.hpp:79
Fully qualified name: kfr::dft_resampler_params
Declared at dft/dft_resampler.hpp:53