|
HARDT - The Ham Radio DSP Toolkit
|
#include <hfir.h>
Public Member Functions | |
| HFir (float *coefficients, int length) | |
| HFir (float *coefficients, int length, int spacing, int advance, int skip) | |
| ~HFir () | |
| void | Filter (T *values, T *result, size_t blocksize) |
| void | SetCoefficients (float *coefficients, int length) |
| std::vector< float > | GetCoefficients () |
Implements the filtering for FIR-structured filters
Create a new FIR block (for calculating output values for a FIR filter)
| coefficients | The FIR coefficients |
| length | Length of the FIR filter (number of coefficients) |
|
inline |
Create a new FIR block (for calculating output values for a FIR filter)
| coefficients | The FIR coefficients |
| length | Length of the FIR filter (number of coefficients) |
| spacing | How many positions in the outbuffer to space output values This is mostly usefull when implementing multiple polyphase FIR filters (see use in the HInterpolator). A normal FIR filter uses a spacing of 1 (write output to adjacent locations) |
| advance | How many steps to advance the delay line before next filter output value is being calculated (see use in HFirDecimator). A normal FIR filter uses advance=1 (do not further advance forward after each result) but a decimating FIR filter will calculate 1 result, then step further a number of samples into the delay line before calculating the next result. |
| skip | Skip this number of values in the input and output buffer between each value. This allows you to pass in sparse buffers and only use, say, each 2. sample. Do note that the skip is applied to the input AS WELL as the output |
|
inline |
Filter a block of values through the FIR block
| values | The block to filter |
| result | Place filtered block here |
| blocksize | The number of samples in the input block |
|
inline |
Get the coefficients for the FIR block
|
inline |
Change the coefficients for the FIR block
| coefficients | New coefficients |
| length | number of coefficients |
1.8.17