Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::HalfBandDownsampler2xT< SampleType > Class Template Reference

2x half-band downsampler. More...

#include <halfband_iir.hpp>

Public Member Functions

 HalfBandDownsampler2xT () noexcept
 HalfBandDownsampler2xT (std::span< const SampleType > coeffs_a, std::span< const SampleType > coeffs_b) noexcept
std::size_t sections_a () const noexcept
std::size_t sections_b () const noexcept
bool configured () const noexcept
void reset () noexcept
SampleType process (SampleType in_lo, SampleType in_hi) noexcept
 Consume two input samples (lo = even phase, hi = odd phase) and return one decimated output sample.
void process_block (std::span< const SampleType > input, std::span< SampleType > output) noexcept
 Block helper.

Detailed Description

template<typename SampleType = float>
class pulp::signal::HalfBandDownsampler2xT< SampleType >

2x half-band downsampler.

Each call to process(in_lo, in_hi) consumes two input samples at the higher rate and emits one decimated output. in_lo is the input-stream sample at index 2n and in_hi the one at 2n+1, fed in chronological order. The odd-phase input drives path A and the even-phase input path B, which is the decimation polyphase identity: H's output kept at odd phases, one high-rate sample ahead of H's own delay. Content in the stopband (above 0.29 of the input rate with the default coefficients) aliases into the output at or below the design's stopband floor (-94.8 dB with the default coefficients).

A thin wrapper over HalfBandIirStageT; the same coefficient-shape rule as HalfBandUpsampler2xT applies.

RT contract: no member allocates, including the constructors.

Constructor & Destructor Documentation

◆ HalfBandDownsampler2xT() [1/2]

template<typename SampleType = float>
pulp::signal::HalfBandDownsampler2xT< SampleType >::HalfBandDownsampler2xT ( )
inlinenoexcept

◆ HalfBandDownsampler2xT() [2/2]

template<typename SampleType = float>
pulp::signal::HalfBandDownsampler2xT< SampleType >::HalfBandDownsampler2xT ( std::span< const SampleType > coeffs_a,
std::span< const SampleType > coeffs_b )
inlinenoexcept

Member Function Documentation

◆ configured()

template<typename SampleType = float>
bool pulp::signal::HalfBandDownsampler2xT< SampleType >::configured ( ) const
inlinenoexcept

◆ process()

template<typename SampleType = float>
SampleType pulp::signal::HalfBandDownsampler2xT< SampleType >::process ( SampleType in_lo,
SampleType in_hi )
inlinenoexcept

Consume two input samples (lo = even phase, hi = odd phase) and return one decimated output sample.

◆ process_block()

template<typename SampleType = float>
void pulp::signal::HalfBandDownsampler2xT< SampleType >::process_block ( std::span< const SampleType > input,
std::span< SampleType > output )
inlinenoexcept

Block helper.

input length 2N produces output length N; output may alias input.

◆ reset()

template<typename SampleType = float>
void pulp::signal::HalfBandDownsampler2xT< SampleType >::reset ( )
inlinenoexcept

◆ sections_a()

template<typename SampleType = float>
std::size_t pulp::signal::HalfBandDownsampler2xT< SampleType >::sections_a ( ) const
inlinenoexcept

◆ sections_b()

template<typename SampleType = float>
std::size_t pulp::signal::HalfBandDownsampler2xT< SampleType >::sections_b ( ) const
inlinenoexcept

The documentation for this class was generated from the following file: