SPUC  3.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
SPUC::farrow< Numeric > Class Template Reference

Template Class for Farrow implementation of a ploynomial interpolation using a FIR filter. More...

#include <farrow.h>

Public Member Functions

Numeric out ()
 Get current output. More...
 
Numeric check (long i)
 Clock in new sample & compute current output. More...
 
 farrow (char order)
 Need to cover different orders! More...
 
void reset (void)
 reset More...
 
 ~farrow (void)
 
void input (Numeric in)
 Only input new sample. More...
 
Numeric update (Numeric in, float_type offset)
 
Numeric fir (float_type offset)
 Calculate output for current coefficients. Offset is between 0 and 1. More...
 
Numeric rephase (float_type offset)
 Rephase => recalculate coefficients and output for new offset (for upsampling) More...
 
void calculate_coeff2 (void)
 Calculate coefficients for linear (not tested) More...
 
void calculate_coeff3 (void)
 Calculate coefficients for square. More...
 
void calculate_coeff3a (void)
 Calculate coefficients for parabolic. More...
 
void calculate_coeff4 (void)
 Calculate coefficients for 4th order. More...
 

Public Attributes

long num_taps
 
std::vector< Numeric > coeff
 

Protected Attributes

std::vector< Numeric > z
 
Numeric output
 

Detailed Description

template<class Numeric>
class SPUC::farrow< Numeric >

Template Class for Farrow implementation of a ploynomial interpolation using a FIR filter.

Farrow implementation of a polynomial interpolation This covers 3 (orders) cases of interpolation

  1. Linear (not efficient using this method)
  2. Piecewise-Parabolic
  3. Cubic Although derived from the Lagrange coefficients the multiplication factor have been simplified to allow simple VLSI implementations. see Interpolation in Digital Modem - Part II, IEEE Trans. on Comms. June 1993.
    Author
    Tony Kirke
    farrow.png

Constructor & Destructor Documentation

template<class Numeric>
SPUC::farrow< Numeric >::farrow ( char  order)
inline

Need to cover different orders!

template<class Numeric>
SPUC::farrow< Numeric >::~farrow ( void  )
inline

Member Function Documentation

template<class Numeric>
void SPUC::farrow< Numeric >::calculate_coeff2 ( void  )
inline

Calculate coefficients for linear (not tested)

Referenced by SPUC::farrow< float_type >::rephase(), and SPUC::farrow< float_type >::update().

template<class Numeric>
void SPUC::farrow< Numeric >::calculate_coeff3 ( void  )
inline

Calculate coefficients for square.

template<class Numeric>
void SPUC::farrow< Numeric >::calculate_coeff3a ( void  )
inline

Calculate coefficients for parabolic.

Referenced by SPUC::farrow< float_type >::rephase(), and SPUC::farrow< float_type >::update().

template<class Numeric>
void SPUC::farrow< Numeric >::calculate_coeff4 ( void  )
inline

Calculate coefficients for 4th order.

Referenced by SPUC::farrow< float_type >::rephase(), and SPUC::farrow< float_type >::update().

template<class Numeric>
Numeric SPUC::farrow< Numeric >::check ( long  i)
inline

Clock in new sample & compute current output.

template<class Numeric>
Numeric SPUC::farrow< Numeric >::fir ( float_type  offset)
inline

Calculate output for current coefficients. Offset is between 0 and 1.

Referenced by SPUC::farrow< float_type >::rephase(), and SPUC::farrow< float_type >::update().

template<class Numeric>
void SPUC::farrow< Numeric >::input ( Numeric  in)
inline

Only input new sample.

Referenced by SPUC::farrow_upsampler::need_sample().

template<class Numeric>
Numeric SPUC::farrow< Numeric >::out ( )
inline

Get current output.

template<class Numeric>
Numeric SPUC::farrow< Numeric >::rephase ( float_type  offset)
inline

Rephase => recalculate coefficients and output for new offset (for upsampling)

Referenced by SPUC::farrow_upsampler::output().

template<class Numeric>
void SPUC::farrow< Numeric >::reset ( void  )
inline

reset

template<class Numeric>
Numeric SPUC::farrow< Numeric >::update ( Numeric  in,
float_type  offset 
)
inline

: Update => Clock in new input sample, recalculate coefficients and determine output

Member Data Documentation

template<class Numeric>
std::vector<Numeric> SPUC::farrow< Numeric >::coeff
template<class Numeric>
long SPUC::farrow< Numeric >::num_taps
template<class Numeric>
Numeric SPUC::farrow< Numeric >::output
protected
template<class Numeric>
std::vector<Numeric> SPUC::farrow< Numeric >::z
protected

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