Mercurial > hg > qm-dsp
diff dsp/signalconditioning/DFProcess.cpp @ 193:ca658c7215a9
Faster filter implementation with explicit FIR support
author | Chris Cannam |
---|---|
date | Wed, 07 Oct 2015 10:36:09 +0100 |
parents | e4a57215ddee |
children | ccd2019190bf |
line wrap: on
line diff
--- a/dsp/signalconditioning/DFProcess.cpp Wed Oct 07 10:07:30 2015 +0100 +++ b/dsp/signalconditioning/DFProcess.cpp Wed Oct 07 10:36:09 2015 +0100 @@ -59,13 +59,11 @@ filtSrc = new double[ m_length ]; filtDst = new double[ m_length ]; - - //Low Pass Smoothing Filter Config - m_FilterConfigParams.ord = Config.LPOrd; - m_FilterConfigParams.ACoeffs = Config.LPACoeffs; - m_FilterConfigParams.BCoeffs = Config.LPBCoeffs; - - m_FiltFilt = new FiltFilt( m_FilterConfigParams ); + Filter::Parameters params; + params.a = std::vector<double>(Config.LPACoeffs, Config.LPACoeffs + Config.LPOrd + 1); + params.b = std::vector<double>(Config.LPBCoeffs, Config.LPBCoeffs + Config.LPOrd + 1); + + m_FiltFilt = new FiltFilt(params); //add delta threshold m_delta = Config.delta;