mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-24 10:50:29 -05:00
Use even/odd FIR filter half band interpolator only if SIMD is available
This commit is contained in:
parent
9f74c82715
commit
f2a50c0c0f
@ -201,6 +201,7 @@ void UpChannelizer::applyConfiguration()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_SIMD
|
||||
UpChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||
m_filter(new IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>),
|
||||
m_workFunction(0)
|
||||
@ -219,6 +220,26 @@ UpChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
UpChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||
m_filter(new IntHalfbandFilterDB<UPCHANNELIZER_HB_FILTER_ORDER>),
|
||||
m_workFunction(0)
|
||||
{
|
||||
switch(mode) {
|
||||
case ModeCenter:
|
||||
m_workFunction = &IntHalfbandFilterDB<UPCHANNELIZER_HB_FILTER_ORDER>::workInterpolateCenter;
|
||||
break;
|
||||
|
||||
case ModeLowerHalf:
|
||||
m_workFunction = &IntHalfbandFilterDB<UPCHANNELIZER_HB_FILTER_ORDER>::workInterpolateLowerHalf;
|
||||
break;
|
||||
|
||||
case ModeUpperHalf:
|
||||
m_workFunction = &IntHalfbandFilterDB<UPCHANNELIZER_HB_FILTER_ORDER>::workInterpolateUpperHalf;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
UpChannelizer::FilterStage::~FilterStage()
|
||||
{
|
||||
|
@ -23,7 +23,11 @@
|
||||
#include <QMutex>
|
||||
#include "util/export.h"
|
||||
#include "util/message.h"
|
||||
#ifdef USE_SIMD
|
||||
#include "dsp/inthalfbandfiltereo1.h"
|
||||
#else
|
||||
#include "dsp/inthalfbandfilterdb.h"
|
||||
#endif
|
||||
|
||||
#define UPCHANNELIZER_HB_FILTER_ORDER 96
|
||||
|
||||
@ -69,8 +73,13 @@ protected:
|
||||
ModeUpperHalf
|
||||
};
|
||||
|
||||
#ifdef USE_SIMD
|
||||
typedef bool (IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* sIn, Sample *sOut);
|
||||
IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||
#else
|
||||
typedef bool (IntHalfbandFilterDB<UPCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* sIn, Sample *sOut);
|
||||
IntHalfbandFilterDB<UPCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
||||
#endif
|
||||
WorkFunction m_workFunction;
|
||||
|
||||
FilterStage(Mode mode);
|
||||
|
Loading…
Reference in New Issue
Block a user