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,27 +190,26 @@ void DownChannelizer::applyConfiguration()
|
||||
|
||||
#ifdef SDR_RX_SAMPLE_24BIT
|
||||
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_mode(mode),
|
||||
m_sse(false)
|
||||
m_sse(true)
|
||||
{
|
||||
switch(mode) {
|
||||
case ModeCenter:
|
||||
m_workFunction = &IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
||||
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
||||
break;
|
||||
|
||||
case ModeLowerHalf:
|
||||
m_workFunction = &IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
||||
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
||||
break;
|
||||
|
||||
case ModeUpperHalf:
|
||||
m_workFunction = &IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
||||
m_workFunction = &IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#ifdef USE_SSE4_1
|
||||
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||
m_filter(new IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
||||
m_workFunction(0),
|
||||
@ -231,29 +230,8 @@ DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||
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
|
||||
|
||||
DownChannelizer::FilterStage::~FilterStage()
|
||||
{
|
||||
delete m_filter;
|
||||
|
@ -23,15 +23,12 @@
|
||||
#include <QMutex>
|
||||
#include "export.h"
|
||||
#include "util/message.h"
|
||||
|
||||
#ifdef SDR_RX_SAMPLE_24BIT
|
||||
#include "dsp/inthalfbandfilterdb.h"
|
||||
#else
|
||||
#ifdef USE_SSE4_1
|
||||
#include "dsp/inthalfbandfiltereo2.h"
|
||||
#else // SDR_RX_SAMPLE_24BIT
|
||||
#include "dsp/inthalfbandfiltereo1.h"
|
||||
#else
|
||||
#include "dsp/inthalfbandfilterdb.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif // SDR_RX_SAMPLE_24BIT
|
||||
|
||||
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
||||
|
||||
@ -84,17 +81,13 @@ protected:
|
||||
};
|
||||
|
||||
#ifdef SDR_RX_SAMPLE_24BIT
|
||||
typedef bool (IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||
IntHalfbandFilterDB<qint64, DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||
typedef bool (IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||
IntHalfbandFilterEO2<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||
#else
|
||||
#ifdef USE_SSE4_1
|
||||
typedef bool (IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||
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
|
||||
|
||||
WorkFunction m_workFunction;
|
||||
Mode m_mode;
|
||||
bool m_sse;
|
||||
|
Loading…
Reference in New Issue
Block a user