Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

clRecInterpolator Class Reference

Recursive interpolation filter class implementation. More...

#include <RecInterpolator.hh>

Collaboration diagram for clRecInterpolator:

Collaboration graph
[legend]
List of all members.

Public Types

enum  eFilterType { FILTER_TYPE_FFT = 0, FILTER_TYPE_FIR = 1, FILTER_TYPE_IIR = 2 }

Public Member Functions

 clRecInterpolator ()
 ~clRecInterpolator ()
bool Initialize (long, long, const float *, float=0.0f, int=0)
 Initialize interpolator, interpolation factor must be powers of two.

bool Initialize (long, long, const double *, double=0.0, int=0)
bool Initialize (long, long, const float *, float=0.0f, bool=false)
bool Initialize (long, long, const double *, double=0.0, bool=false)
void Uninitialize ()
 Uninitialize interpolator.

void Put (const float *, long)
 Feed data into interpolator.

void Put (const double *, long)
bool Get (float *, long)
 Get data from interpolator.

bool Get (double *, long)

Private Member Functions

void InitHalves (double)

Private Attributes

bool bInitialized
int iType
 Type filter; 0 = FFT, 1= FIR, 2 = IIR.

long lFactor
 Interpolation factor.

long lFilterSize
 Size of input buffer.

long lSubRounds
 Number of recursive rounds.

long lIntSize
 Size of recursion buffer.

bool bpHalves [RECINT_MAX_SUB_ROUNDS]
clDSPAlloc IntBuf
clFFTInterpolator FFTIntBank [RECINT_MAX_SUB_ROUNDS]
clFIRInterpolator FIRIntBank [RECINT_MAX_SUB_ROUNDS]
clIIRInterpolator IIRIntBank [RECINT_MAX_SUB_ROUNDS]

Detailed Description

Recursive interpolation filter class implementation.

Data is interpolated and filtered in recursive manner in rounds of factor 2.

Definition at line 42 of file RecInterpolator.hh.


Member Enumeration Documentation

enum clRecInterpolator::eFilterType
 

Enumeration values:
FILTER_TYPE_FFT 
FILTER_TYPE_FIR 
FILTER_TYPE_IIR 

Definition at line 57 of file RecInterpolator.hh.


Constructor & Destructor Documentation

clRecInterpolator::clRecInterpolator  ) 
 

Definition at line 59 of file RecInterpolator.cc.

clRecInterpolator::~clRecInterpolator  ) 
 

Definition at line 67 of file RecInterpolator.cc.

References Uninitialize().


Member Function Documentation

void clRecInterpolator::InitHalves double   )  [private]
 

Definition at line 34 of file RecInterpolator.cc.

Referenced by Initialize().

bool clRecInterpolator::Initialize long  ,
long  ,
const float *  ,
float  = 0.0f,
int  = 0
 

Initialize interpolator, interpolation factor must be powers of two.

You can re-initialize interpolator without uninitializing first.

The NULL pointer is used select correct overloaded function matching input datatype.

Parameters:
IntFact Interpolation factor
FiltSize Filter size (for FFT)
NullPtr NULL pointer
BandCenter Normalized center frequency of filter band (destination)
FilterType Filter type; 0 = FFT, 1 = FIR, 2 = IIR

Definition at line 73 of file RecInterpolator.cc.

References DSP_FILT_DEF_OVERLAPF, FFTIntBank, FIRIntBank, IIRIntBank, InitHalves(), clIIRMultiRate::Initialize(), clFIRMultiRate::Initialize(), clFFTMultiRate::Initialize(), lIntSize, RECINT_MAX_SUB_ROUNDS, clAlloc::Size(), and Uninitialize().

Referenced by Initialize().

bool clRecInterpolator::Initialize long  ,
long  ,
const double *  ,
double  = 0.0,
int  = 0
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 110 of file RecInterpolator.cc.

References DSP_FILT_DEF_OVERLAP, FFTIntBank, FIRIntBank, IIRIntBank, InitHalves(), clIIRMultiRate::Initialize(), clFIRMultiRate::Initialize(), clFFTMultiRate::Initialize(), lIntSize, RECINT_MAX_SUB_ROUNDS, clAlloc::Size(), and Uninitialize().

bool clRecInterpolator::Initialize long  ,
long  ,
const float *  ,
float  = 0.0f,
bool  = false
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 147 of file RecInterpolator.cc.

References Initialize().

bool clRecInterpolator::Initialize long  ,
long  ,
const double *  ,
double  = 0.0,
bool  = false
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 159 of file RecInterpolator.cc.

References Initialize().

void clRecInterpolator::Uninitialize  ) 
 

Uninitialize interpolator.

Definition at line 171 of file RecInterpolator.cc.

References FFTIntBank, FIRIntBank, clAlloc::Free(), IIRIntBank, clIIRInterpolator::Uninitialize(), clFIRInterpolator::Uninitialize(), and clFFTInterpolator::Uninitialize().

Referenced by Initialize(), and ~clRecInterpolator().

void clRecInterpolator::Put const float *  ,
long 
 

Feed data into interpolator.

Parameters:
SrcData Source data
SrcCount Source data count

Definition at line 195 of file RecInterpolator.cc.

References FFTIntBank, FIRIntBank, clIIRInterpolator::Get(), clFIRInterpolator::Get(), clFFTInterpolator::Get(), IIRIntBank, lIntSize, clIIRInterpolator::Put(), clFIRInterpolator::Put(), and clFFTInterpolator::Put().

void clRecInterpolator::Put const double *  ,
long 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 234 of file RecInterpolator.cc.

References FFTIntBank, FIRIntBank, clIIRInterpolator::Get(), clFIRInterpolator::Get(), clFFTInterpolator::Get(), IIRIntBank, lIntSize, clIIRInterpolator::Put(), clFIRInterpolator::Put(), and clFFTInterpolator::Put().

bool clRecInterpolator::Get float *  ,
long 
 

Get data from interpolator.

Returns false if there's not enough data feeded into the interpolator.

Parameters:
DestData Destination buffer
DestCount Number of samples
Returns:
Data was available?

Definition at line 273 of file RecInterpolator.cc.

References FFTIntBank, FIRIntBank, clIIRInterpolator::Get(), clFIRInterpolator::Get(), clFFTInterpolator::Get(), and IIRIntBank.

bool clRecInterpolator::Get double *  ,
long 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 288 of file RecInterpolator.cc.

References FFTIntBank, FIRIntBank, clIIRInterpolator::Get(), clFIRInterpolator::Get(), clFFTInterpolator::Get(), and IIRIntBank.


Member Data Documentation

bool clRecInterpolator::bInitialized [private]
 

Definition at line 44 of file RecInterpolator.hh.

int clRecInterpolator::iType [private]
 

Type filter; 0 = FFT, 1= FIR, 2 = IIR.

Definition at line 45 of file RecInterpolator.hh.

long clRecInterpolator::lFactor [private]
 

Interpolation factor.

Definition at line 46 of file RecInterpolator.hh.

long clRecInterpolator::lFilterSize [private]
 

Size of input buffer.

Definition at line 47 of file RecInterpolator.hh.

long clRecInterpolator::lSubRounds [private]
 

Number of recursive rounds.

Definition at line 48 of file RecInterpolator.hh.

long clRecInterpolator::lIntSize [private]
 

Size of recursion buffer.

Definition at line 49 of file RecInterpolator.hh.

Referenced by Initialize(), and Put().

bool clRecInterpolator::bpHalves[RECINT_MAX_SUB_ROUNDS] [private]
 

Definition at line 50 of file RecInterpolator.hh.

clDSPAlloc clRecInterpolator::IntBuf [private]
 

Definition at line 51 of file RecInterpolator.hh.

clFFTInterpolator clRecInterpolator::FFTIntBank[RECINT_MAX_SUB_ROUNDS] [private]
 

Definition at line 52 of file RecInterpolator.hh.

Referenced by Get(), Initialize(), Put(), and Uninitialize().

clFIRInterpolator clRecInterpolator::FIRIntBank[RECINT_MAX_SUB_ROUNDS] [private]
 

Definition at line 53 of file RecInterpolator.hh.

Referenced by Get(), Initialize(), Put(), and Uninitialize().

clIIRInterpolator clRecInterpolator::IIRIntBank[RECINT_MAX_SUB_ROUNDS] [private]
 

Definition at line 54 of file RecInterpolator.hh.

Referenced by Get(), Initialize(), Put(), and Uninitialize().


The documentation for this class was generated from the following files:
Generated on Tue Mar 2 19:47:14 2004 for libDSP by doxygen 1.3.6