Public Member Functions | Private Member Functions | Private Attributes | List of all members
snFIRFilter Class Reference

snFIRFilter implements a FIR filter that safes its own state for processing of consecutive data blocks. More...

#include <snFIRFilter.h>

Inheritance diagram for snFIRFilter:

Public Member Functions

 snFIRFilter (double *pdataIn, double *pdataOut, int pdata_len, double *pcoeff, int pfilter_order)
 implements a FIR filter More...
 
void run ()
 
void set_state (std::vector< double > s)
 
std::vector< double > get_state ()
 
 ~snFIRFilter ()
 

Private Member Functions

double *coeff __attribute__ ((aligned(16)))
 
double *x __attribute__ ((aligned(16)))
 
double *y __attribute__ ((aligned(16)))
 
double *c __attribute__ ((aligned(16)))
 
double *x2 __attribute__ ((aligned(16)))
 
double zerot[2] __attribute__ ((aligned(16)))
 
double res[2] __attribute__ ((aligned(16)))
 

Private Attributes

double * state
 
double * dataIn
 
double * dataOut
 
int n
 
int filter_order
 

Detailed Description

snFIRFilter implements a FIR filter that safes its own state for processing of consecutive data blocks.

The coefficients can be altered after every filter step without erasing the filter state. The routine uses intrinsic SSE instruction if USE_SSE is defined.

Constructor & Destructor Documentation

snFIRFilter::snFIRFilter ( double *  pdataIn,
double *  pdataOut,
int  pdata_len,
double *  pcoeff,
int  pfilter_order 
)

implements a FIR filter

Parameters
pdataInpointer to input array
pdataOutpointer to output array
pnnumber of input samples
pcoeffpointer to coefficients array
pmnumber of coefficients
snFIRFilter::~snFIRFilter ( )

Member Function Documentation

double* coeff snFIRFilter::__attribute__ ( (aligned(16))  )
private
double* x snFIRFilter::__attribute__ ( (aligned(16))  )
private
double* y snFIRFilter::__attribute__ ( (aligned(16))  )
private
double* c snFIRFilter::__attribute__ ( (aligned(16))  )
private
double* x2 snFIRFilter::__attribute__ ( (aligned(16))  )
private
double zerot [2] snFIRFilter::__attribute__ ( (aligned(16))  )
private
double res [2] snFIRFilter::__attribute__ ( (aligned(16))  )
private
std::vector<double> snFIRFilter::get_state ( )
inline
void snFIRFilter::run ( )
void snFIRFilter::set_state ( std::vector< double >  s)
inline

Member Data Documentation

double* snFIRFilter::dataIn
private
double* snFIRFilter::dataOut
private
int snFIRFilter::filter_order
private
int snFIRFilter::n
private
double* snFIRFilter::state
private

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