Mercurial > hg > qm-dsp
comparison dsp/signalconditioning/DFProcess.h @ 505:930b5b0f707d
Merge branch 'codestyle-and-tidy'
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 05 Jun 2019 12:55:15 +0100 |
parents | b1f72e469ec8 |
children |
comparison
equal
deleted
inserted
replaced
471:e3335cb213da | 505:930b5b0f707d |
---|---|
19 published by the Free Software Foundation; either version 2 of the | 19 published by the Free Software Foundation; either version 2 of the |
20 License, or (at your option) any later version. See the file | 20 License, or (at your option) any later version. See the file |
21 COPYING included with this distribution for more information. | 21 COPYING included with this distribution for more information. |
22 */ | 22 */ |
23 | 23 |
24 #ifndef CDFPROCESS_H | 24 #ifndef QM_DSP_DFPROCESS_H |
25 #define CDFPROCESS_H | 25 #define QM_DSP_DFPROCESS_H |
26 | |
27 #include "FiltFilt.h" | |
26 | 28 |
27 #include <stdio.h> | 29 #include <stdio.h> |
28 #include "FiltFilt.h" | |
29 | 30 |
30 struct DFProcConfig{ | 31 struct DFProcConfig |
31 unsigned int length; | 32 { |
32 unsigned int LPOrd; | 33 int length; |
34 int LPOrd; | |
33 double *LPACoeffs; | 35 double *LPACoeffs; |
34 double *LPBCoeffs; | 36 double *LPBCoeffs; |
35 unsigned int winPre; | 37 int winPre; |
36 unsigned int winPost; | 38 int winPost; |
37 double AlphaNormParam; | 39 double AlphaNormParam; |
38 bool isMedianPositive; | 40 bool isMedianPositive; |
39 float delta; //delta threshold used as an offset when computing the smoothed detection function | 41 float delta; //delta threshold used as an offset when computing the smoothed detection function |
40 | 42 |
41 DFProcConfig() : | 43 DFProcConfig() : |
57 public: | 59 public: |
58 DFProcess( DFProcConfig Config ); | 60 DFProcess( DFProcConfig Config ); |
59 virtual ~DFProcess(); | 61 virtual ~DFProcess(); |
60 | 62 |
61 void process( double* src, double* dst ); | 63 void process( double* src, double* dst ); |
62 | 64 |
63 | |
64 private: | 65 private: |
65 void initialise( DFProcConfig Config ); | 66 void initialise( DFProcConfig Config ); |
66 void deInitialise(); | 67 void deInitialise(); |
67 void removeDCNormalize( double *src, double*dst ); | 68 void removeDCNormalize( double *src, double*dst ); |
68 void medianFilter( double* src, double* dst ); | 69 void medianFilter( double* src, double* dst ); |