mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 05:11:49 -05:00
Down channelizer optimization: use even/odd technique halfband filter
This commit is contained in:
parent
a81e2f297a
commit
4924e3edbd
@ -190,70 +190,48 @@ 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 IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
m_filter(new IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
||||||
m_workFunction(0),
|
m_workFunction(0),
|
||||||
m_mode(mode),
|
m_mode(mode),
|
||||||
m_sse(false)
|
m_sse(true)
|
||||||
{
|
{
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case ModeCenter:
|
case ModeCenter:
|
||||||
m_workFunction = &IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeLowerHalf:
|
case ModeLowerHalf:
|
||||||
m_workFunction = &IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeUpperHalf:
|
case ModeUpperHalf:
|
||||||
m_workFunction = &IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#ifdef USE_SSE4_1
|
|
||||||
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||||
m_filter(new IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
m_filter(new IntHalfbandFilterEO1<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 = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeLowerHalf:
|
case ModeLowerHalf:
|
||||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ModeUpperHalf:
|
case ModeUpperHalf:
|
||||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#else
|
|
||||||
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
|
||||||
m_filter(new IntHalfbandFilterDB<qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
|
||||||
m_workFunction(0),
|
|
||||||
m_mode(mode),
|
|
||||||
m_sse(false)
|
|
||||||
{
|
|
||||||
switch(mode) {
|
|
||||||
case ModeCenter:
|
|
||||||
m_workFunction = &IntHalfbandFilterDB<qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ModeLowerHalf:
|
|
||||||
m_workFunction = &IntHalfbandFilterDB<qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ModeUpperHalf:
|
|
||||||
m_workFunction = &IntHalfbandFilterDB<qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
DownChannelizer::FilterStage::~FilterStage()
|
DownChannelizer::FilterStage::~FilterStage()
|
||||||
{
|
{
|
||||||
delete m_filter;
|
delete m_filter;
|
||||||
|
@ -23,15 +23,12 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
|
|
||||||
#ifdef SDR_RX_SAMPLE_24BIT
|
#ifdef SDR_RX_SAMPLE_24BIT
|
||||||
#include "dsp/inthalfbandfilterdb.h"
|
#include "dsp/inthalfbandfiltereo2.h"
|
||||||
#else
|
#else // SDR_RX_SAMPLE_24BIT
|
||||||
#ifdef USE_SSE4_1
|
|
||||||
#include "dsp/inthalfbandfiltereo1.h"
|
#include "dsp/inthalfbandfiltereo1.h"
|
||||||
#else
|
#endif // SDR_RX_SAMPLE_24BIT
|
||||||
#include "dsp/inthalfbandfilterdb.h"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
||||||
|
|
||||||
@ -84,17 +81,13 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef SDR_RX_SAMPLE_24BIT
|
#ifdef SDR_RX_SAMPLE_24BIT
|
||||||
typedef bool (IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
typedef bool (IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||||
IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||||
#else
|
#else
|
||||||
#ifdef USE_SSE4_1
|
typedef bool (IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||||
typedef bool (IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||||
IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
|
||||||
#else
|
|
||||||
typedef bool (IntHalfbandFilterDB<qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
|
||||||
IntHalfbandFilterDB<qint32, DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WorkFunction m_workFunction;
|
WorkFunction m_workFunction;
|
||||||
Mode m_mode;
|
Mode m_mode;
|
||||||
bool m_sse;
|
bool m_sse;
|
||||||
|
Loading…
Reference in New Issue
Block a user