#include <resampling.h>
Public Member Functions | |
resampling (const arma::uword _P, const arma::uword _Q, const arma::vec _H) | |
resampling (const arma::uword _P, const arma::uword _Q) | |
~resampling () | |
void | downfir (const arma::Col< T1 > &in, arma::Col< T1 > &out) |
void | upfir (const arma::Col< T1 > &in, arma::Col< T1 > &out) |
void | upfirdown (const arma::Col< T1 > &in, arma::Col< T1 > &out) |
Private Attributes | |
FIR_filt< T1, double, T1 > | aa_filt |
arma::vec | H |
arma::vec | K |
arma::uword | P |
arma::uword | Q |
Implements up/downsampling functions
Definition at line 53 of file resampling.h.
|
inline |
Constructor.
_P | Upsampling rate |
_Q | Downsampling rate |
_H | FIR filter coefficients |
Definition at line 69 of file resampling.h.
References sp::FIR_filt< T1, T2, T3 >::set_coeffs().
|
inline |
Constructor using a fir1 filter with 8*M+1 taps and cutoff 1/M where M=max(P,Q)
_P | Upsampling rate |
_Q | Downsampling rate |
Definition at line 84 of file resampling.h.
References sp::fir1(), sp::resampling< T1 >::Q, and sp::FIR_filt< T1, T2, T3 >::set_coeffs().
|
inline |
Destructor.
Definition at line 97 of file resampling.h.
|
inline |
Downsampling with anti alias filter.
in | Input vector |
out | Output vector |
Definition at line 105 of file resampling.h.
References sp::resampling< T1 >::aa_filt, and sp::resampling< T1 >::Q.
|
inline |
Upsampling with anti alias filter.
in | Input vector |
out | Output vector |
Definition at line 122 of file resampling.h.
References sp::resampling< T1 >::aa_filt.
|
inline |
Resampling by a rational P/Q with anti alias filtering.
The caller needs to allocate the input and output vector so that length(out)==length(in)*P/Q
in | Input vector |
out | Output vector |
Definition at line 142 of file resampling.h.
References sp::resampling< T1 >::aa_filt, and sp::resampling< T1 >::Q.
|
private |
Definition at line 56 of file resampling.h.
Referenced by sp::resampling< T1 >::downfir(), sp::resampling< T1 >::upfir(), and sp::resampling< T1 >::upfirdown().
|
private |
Filter coefficients.
Definition at line 57 of file resampling.h.
|
private |
Number of filter coefficients.
Definition at line 58 of file resampling.h.
|
private |
Upsampling rate.
Definition at line 59 of file resampling.h.
|
private |
Downsampling rate.
Definition at line 60 of file resampling.h.
Referenced by sp::resampling< T1 >::downfir(), sp::resampling< T1 >::resampling(), and sp::resampling< T1 >::upfirdown().