mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 18:52:28 -04: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) :
|
UpChannelizer::FilterStage::FilterStage(Mode mode) :
|
||||||
m_filter(new IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>),
|
m_filter(new IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>),
|
||||||
m_workFunction(0)
|
m_workFunction(0)
|
||||||
@ -219,6 +220,26 @@ UpChannelizer::FilterStage::FilterStage(Mode mode) :
|
|||||||
break;
|
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()
|
UpChannelizer::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_SIMD
|
||||||
#include "dsp/inthalfbandfiltereo1.h"
|
#include "dsp/inthalfbandfiltereo1.h"
|
||||||
|
#else
|
||||||
|
#include "dsp/inthalfbandfilterdb.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define UPCHANNELIZER_HB_FILTER_ORDER 96
|
#define UPCHANNELIZER_HB_FILTER_ORDER 96
|
||||||
|
|
||||||
@ -69,8 +73,13 @@ protected:
|
|||||||
ModeUpperHalf
|
ModeUpperHalf
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef USE_SIMD
|
||||||
typedef bool (IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* sIn, Sample *sOut);
|
typedef bool (IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>::*WorkFunction)(Sample* sIn, Sample *sOut);
|
||||||
IntHalfbandFilterEO1<UPCHANNELIZER_HB_FILTER_ORDER>* m_filter;
|
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;
|
WorkFunction m_workFunction;
|
||||||
|
|
||||||
FilterStage(Mode mode);
|
FilterStage(Mode mode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user