mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-04 01:45:21 -04:00
Allow SSE 4.1 optimization on the down channelizer
This commit is contained in:
parent
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) :
|
DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||||
m_filter(new IntHalfbandFilterDB<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
m_filter(new IntHalfbandFilterDB<DOWNCHANNELIZER_HB_FILTER_ORDER>),
|
||||||
m_workFunction(0)
|
m_workFunction(0)
|
||||||
@ -204,6 +224,7 @@ DownChannelizer::FilterStage::FilterStage(Mode mode) :
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
DownChannelizer::FilterStage::~FilterStage()
|
DownChannelizer::FilterStage::~FilterStage()
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,11 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
|
#ifdef USE_SSE4_1
|
||||||
|
#include "dsp/inthalfbandfiltereo1.h"
|
||||||
|
#else
|
||||||
#include "dsp/inthalfbandfilterdb.h"
|
#include "dsp/inthalfbandfilterdb.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
#define DOWNCHANNELIZER_HB_FILTER_ORDER 48
|
||||||
|
|
||||||
@ -69,8 +73,13 @@ protected:
|
|||||||
ModeUpperHalf
|
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);
|
typedef bool (IntHalfbandFilterDB<DOWNCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* s);
|
||||||
IntHalfbandFilterDB<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
IntHalfbandFilterDB<DOWNCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||||
|
#endif
|
||||||
WorkFunction m_workFunction;
|
WorkFunction m_workFunction;
|
||||||
|
|
||||||
FilterStage(Mode mode);
|
FilterStage(Mode mode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user