qm-dsp 1.8
DecimatorB.h
Go to the documentation of this file.
1/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2/*
3 QM DSP Library
4
5 Centre for Digital Music, Queen Mary, University of London.
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version. See the file
11 COPYING included with this distribution for more information.
12*/
13
14#ifndef DECIMATORB_H
15#define DECIMATORB_H
16
17#include <vector>
18
26{
27public:
28 void process( const double* src, double* dst );
29 void process( const float* src, float* dst );
30
39 DecimatorB(int inLength, int decFactor);
40 virtual ~DecimatorB();
41
42 int getFactor() const { return m_decFactor; }
43
44private:
45 void deInitialise();
46 void initialise(int inLength, int decFactor);
47 void doAntiAlias(const double* src, double* dst, int length, int filteridx);
48 void doProcess();
49
53
54 std::vector<std::vector<double> > m_o;
55
56 double m_a[7];
57 double m_b[7];
58
59 double *m_aaBuffer;
60 double *m_tmpBuffer;
61};
62
63#endif
64
DecimatorB carries out a fast downsample by a power-of-two factor.
Definition DecimatorB.h:26
void deInitialise()
int m_decFactor
Definition DecimatorB.h:52
virtual ~DecimatorB()
void doProcess()
int m_inputLength
Definition DecimatorB.h:50
void doAntiAlias(const double *src, double *dst, int length, int filteridx)
void process(const double *src, double *dst)
double m_b[7]
Definition DecimatorB.h:57
double m_a[7]
Definition DecimatorB.h:56
double * m_aaBuffer
Definition DecimatorB.h:59
int getFactor() const
Definition DecimatorB.h:42
double * m_tmpBuffer
Definition DecimatorB.h:60
int m_outputLength
Definition DecimatorB.h:51
void initialise(int inLength, int decFactor)
std::vector< std::vector< double > > m_o
Definition DecimatorB.h:54