Allow SSE 4.1 optimization on the down channelizer

pull/27/head
f4exb 2016-11-07 18:51:32 +01:00
rodzic aef5e722c1
commit 3505e1b095
2 zmienionych plików z 30 dodań i 0 usunięć

Wyświetl plik

@ -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()
{

Wyświetl plik

@ -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);