mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
Use unified even/odd half band decimator
This commit is contained in:
parent
8102d0ed08
commit
0c946d86e2
@ -24,12 +24,7 @@
|
|||||||
#define INCLUDE_GPL_DSP_DECIMATORSU_H_
|
#define INCLUDE_GPL_DSP_DECIMATORSU_H_
|
||||||
|
|
||||||
#include "dsp/dsptypes.h"
|
#include "dsp/dsptypes.h"
|
||||||
|
#include "dsp/inthalfbandfiltereo.h"
|
||||||
#ifdef SDR_RX_SAMPLE_24BIT
|
|
||||||
#include "dsp/inthalfbandfiltereo2.h"
|
|
||||||
#else // SDR_RX_SAMPLE_24BIT
|
|
||||||
#include "dsp/inthalfbandfiltereo1.h"
|
|
||||||
#endif // SDR_RX_SAMPLE_24BIT
|
|
||||||
|
|
||||||
#define DECIMATORS_HB_FILTER_ORDER 64
|
#define DECIMATORS_HB_FILTER_ORDER 64
|
||||||
|
|
||||||
@ -204,19 +199,19 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef SDR_RX_SAMPLE_24BIT
|
#ifdef SDR_RX_SAMPLE_24BIT
|
||||||
IntHalfbandFilterEO2<DECIMATORS_HB_FILTER_ORDER> m_decimator2; // 1st stages
|
IntHalfbandFilterEO<qint64, qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator2; // 1st stages
|
||||||
IntHalfbandFilterEO2<DECIMATORS_HB_FILTER_ORDER> m_decimator4; // 2nd stages
|
IntHalfbandFilterEO<qint64, qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator4; // 2nd stages
|
||||||
IntHalfbandFilterEO2<DECIMATORS_HB_FILTER_ORDER> m_decimator8; // 3rd stages
|
IntHalfbandFilterEO<qint64, qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator8; // 3rd stages
|
||||||
IntHalfbandFilterEO2<DECIMATORS_HB_FILTER_ORDER> m_decimator16; // 4th stages
|
IntHalfbandFilterEO<qint64, qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator16; // 4th stages
|
||||||
IntHalfbandFilterEO2<DECIMATORS_HB_FILTER_ORDER> m_decimator32; // 5th stages
|
IntHalfbandFilterEO<qint64, qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator32; // 5th stages
|
||||||
IntHalfbandFilterEO2<DECIMATORS_HB_FILTER_ORDER> m_decimator64; // 6th stages
|
IntHalfbandFilterEO<qint64, qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator64; // 6th stages
|
||||||
#else
|
#else
|
||||||
IntHalfbandFilterEO1<DECIMATORS_HB_FILTER_ORDER> m_decimator2; // 1st stages
|
IntHalfbandFilterEO<qint32, qint32, DECIMATORS_HB_FILTER_ORDER> m_decimator2; // 1st stages
|
||||||
IntHalfbandFilterEO1<DECIMATORS_HB_FILTER_ORDER> m_decimator4; // 2nd stages
|
IntHalfbandFilterEO<qint32, qint32, DECIMATORS_HB_FILTER_ORDER> m_decimator4; // 2nd stages
|
||||||
IntHalfbandFilterEO1<DECIMATORS_HB_FILTER_ORDER> m_decimator8; // 3rd stages
|
IntHalfbandFilterEO<qint32, qint32, DECIMATORS_HB_FILTER_ORDER> m_decimator8; // 3rd stages
|
||||||
IntHalfbandFilterEO1<DECIMATORS_HB_FILTER_ORDER> m_decimator16; // 4th stages
|
IntHalfbandFilterEO<qint32, qint32, DECIMATORS_HB_FILTER_ORDER> m_decimator16; // 4th stages
|
||||||
IntHalfbandFilterEO1<DECIMATORS_HB_FILTER_ORDER> m_decimator32; // 5th stages
|
IntHalfbandFilterEO<qint32, qint32, DECIMATORS_HB_FILTER_ORDER> m_decimator32; // 5th stages
|
||||||
IntHalfbandFilterEO1<DECIMATORS_HB_FILTER_ORDER> m_decimator64; // 6th stages
|
IntHalfbandFilterEO<qint32, qint32, DECIMATORS_HB_FILTER_ORDER> m_decimator64; // 6th stages
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -190,43 +190,43 @@ void DownChannelizer::applyConfiguration()
|
|||||||
|
|
||||||
#ifdef SDR_RX_SAMPLE_24BIT
|
#ifdef SDR_RX_SAMPLE_24BIT
|
||||||
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||||
m_filter(new IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
m_filter(new IntHalfbandFilterEO<qint64, qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
||||||
m_workFunction(0),
|
m_workFunction(0),
|
||||||
m_mode(mode),
|
m_mode(mode),
|
||||||
m_sse(true)
|
m_sse(true)
|
||||||
{
|
{
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case ModeCenter:
|
case ModeCenter:
|
||||||
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
m_workFunction = &IntHalfbandFilterEO<qint64, qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeLowerHalf:
|
case ModeLowerHalf:
|
||||||
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
m_workFunction = &IntHalfbandFilterEO<qint64, qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeUpperHalf:
|
case ModeUpperHalf:
|
||||||
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
m_workFunction = &IntHalfbandFilterEO<qint64, qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||||
m_filter(new IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
m_filter(new IntHalfbandFilterEO<qint32, qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
||||||
m_workFunction(0),
|
m_workFunction(0),
|
||||||
m_mode(mode),
|
m_mode(mode),
|
||||||
m_sse(true)
|
m_sse(true)
|
||||||
{
|
{
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case ModeCenter:
|
case ModeCenter:
|
||||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
m_workFunction = &IntHalfbandFilterEO<qint32, qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeLowerHalf:
|
case ModeLowerHalf:
|
||||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
m_workFunction = &IntHalfbandFilterEO<qint32, qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeUpperHalf:
|
case ModeUpperHalf:
|
||||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
m_workFunction = &IntHalfbandFilterEO<qint32, qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,12 +23,7 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
|
#include "dsp/inthalfbandfiltereo.h"
|
||||||
#ifdef SDR_RX_SAMPLE_24BIT
|
|
||||||
#include "dsp/inthalfbandfiltereo2.h"
|
|
||||||
#else // SDR_RX_SAMPLE_24BIT
|
|
||||||
#include "dsp/inthalfbandfiltereo1.h"
|
|
||||||
#endif // SDR_RX_SAMPLE_24BIT
|
|
||||||
|
|
||||||
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
||||||
|
|
||||||
@ -81,11 +76,11 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef SDR_RX_SAMPLE_24BIT
|
#ifdef SDR_RX_SAMPLE_24BIT
|
||||||
typedef bool (IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
typedef bool (IntHalfbandFilterEO<qint64, qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||||
IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
IntHalfbandFilterEO<qint64, qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||||
#else
|
#else
|
||||||
typedef bool (IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
typedef bool (IntHalfbandFilterEO<qint32, qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||||
IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
IntHalfbandFilterEO<qint32, qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WorkFunction m_workFunction;
|
WorkFunction m_workFunction;
|
||||||
|
Loading…
Reference in New Issue
Block a user