#include <sinc_resampler.hpp>
|
| void | build (int half_width=16, int phases=512, double beta=9.0, double cutoff=1.0) |
| | Build the kernel.
|
| void | begin_build (int half_width=16, int phases=512, double beta=9.0, double cutoff=1.0) |
| | Starts a resumable kernel-table build.
|
| bool | build_step () |
| int | half_width () const |
| int | taps () const |
| bool | ready () const |
| double | cutoff () const |
| std::size_t | prepared_bytes () const noexcept |
| SampleType | apply (const SampleType *samples, double frac) const |
| | Apply the kernel at fractional phase frac (in [0,1)) to exactly taps() contiguous samples, ordered from (i0-half+1) to (i0+half) where the read point is at i0+frac.
|
| SampleType | read (const SampleType *src, int len, double pos) const |
| | Read src at fractional position pos (in samples).
|
◆ apply()
template<typename SampleType = float>
Apply the kernel at fractional phase frac (in [0,1)) to exactly taps() contiguous samples, ordered from (i0-half+1) to (i0+half) where the read point is at i0+frac.
Lets a caller with its own buffer layout (e.g. a power-of-two ring) gather the neighbourhood itself and reuse the kernel. RT-safe.
◆ begin_build()
template<typename SampleType = float>
| void pulp::signal::SincResamplerT< SampleType >::begin_build |
( |
int | half_width = 16, |
|
|
int | phases = 512, |
|
|
double | beta = 9.0, |
|
|
double | cutoff = 1.0 ) |
|
inline |
Starts a resumable kernel-table build.
Each build_step() computes one phase row so control-thread callers can honor an external work budget.
◆ build()
template<typename SampleType = float>
Build the kernel.
half_width taps each side (quality vs cost; 16 is a good default), phases sub-sample resolution (table rows; 512 is transparent with linear phase interpolation), beta the Kaiser shape (≈ 8–10 for deep stopband; higher = more rejection, wider transition), and cutoff the normalized source-Nyquist cutoff in (0, 1]. Values outside that interval are clamped.
◆ build_step()
template<typename SampleType = float>
◆ checked_retained_bytes()
template<typename SampleType = float>
| bool pulp::signal::SincResamplerT< SampleType >::checked_retained_bytes |
( |
int | half_width, |
|
|
int | phases, |
|
|
std::uint64_t | target_max_bytes, |
|
|
std::uint64_t & | bytes ) |
|
inlinestaticnoexcept |
◆ cutoff()
template<typename SampleType = float>
◆ half_width()
template<typename SampleType = float>
◆ prepared_bytes()
template<typename SampleType = float>
◆ read()
template<typename SampleType = float>
Read src at fractional position pos (in samples).
The caller guarantees the kernel support [floor(pos)-half+1, floor(pos)+half] lies within [0, len); out-of-range taps are clamped to the edge so boundary reads degrade gracefully rather than read out of bounds.
◆ ready()
template<typename SampleType = float>
◆ taps()
template<typename SampleType = float>
The documentation for this class was generated from the following file: