kopia lustrzana https://github.com/f4exb/sdrangel
Allow SSE 4.1 optimization on the down channelizer
rodzic
aef5e722c1
commit
3505e1b095
|
@ -186,6 +186,26 @@ void DownChannelizer::applyConfiguration()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef USE_SSE4_1
|
||||
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||
m_filter(new IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
||||
m_workFunction(0)
|
||||
{
|
||||
switch(mode) {
|
||||
case ModeCenter:
|
||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateCenter;
|
||||
break;
|
||||
|
||||
case ModeLowerHalf:
|
||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateLowerHalf;
|
||||
break;
|
||||
|
||||
case ModeUpperHalf:
|
||||
m_workFunction = &IntHalfbandFilterEO1<DOWNCHANNELIZER_HB_FILTER_ORDER>::workDecimateUpperHalf;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||
m_filter(new IntHalfbandFilterDB<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
||||
m_workFunction(0)
|
||||
|
@ -204,6 +224,7 @@ DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DownChannelizer::FilterStage::~FilterStage()
|
||||
{
|
||||
|
|
|
@ -23,7 +23,11 @@
|
|||
#include <QMutex>
|
||||
#include "util/export.h"
|
||||
#include "util/message.h"
|
||||
#ifdef USE_SSE4_1
|
||||
#include "dsp/inthalfbandfiltereo1.h"
|
||||
#else
|
||||
#include "dsp/inthalfbandfilterdb.h"
|
||||
#endif
|
||||
|
||||
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
||||
|
||||
|
@ -69,8 +73,13 @@ protected:
|
|||
ModeUpperHalf
|
||||
};
|
||||
|
||||
#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<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||
IntHalfbandFilterDB<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||
#endif
|
||||
WorkFunction m_workFunction;
|
||||
|
||||
FilterStage(Mode mode);
|
||||
|
|
Ładowanie…
Reference in New Issue