From cd7e4e438591910162b16a4572aa78aeb6d9907a Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 26 Apr 2017 01:39:45 +0200 Subject: [PATCH] IntHalfbandFilters: set myInterpolate optimized methods as defaults --- sdrbase/dsp/inthalfbandfilter.h | 8 +++++--- sdrbase/dsp/inthalfbandfilterdb.h | 8 +++++--- sdrbase/dsp/inthalfbandfiltereo1.h | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/sdrbase/dsp/inthalfbandfilter.h b/sdrbase/dsp/inthalfbandfilter.h index 488dfc1ff..fbf8c3163 100644 --- a/sdrbase/dsp/inthalfbandfilter.h +++ b/sdrbase/dsp/inthalfbandfilter.h @@ -553,7 +553,8 @@ public: m_ptr = HBFIRFilterTraits::hbMod[m_ptr + 2 - 1]; } - void myInterpolate(Sample* sample1, Sample* sample2) + /** Simple zero stuffing and filter */ + void myInterpolateZeroStuffing(Sample* sample1, Sample* sample2) { m_samples[m_ptr][0] = sample1->real(); m_samples[m_ptr][1] = sample1->imag(); @@ -570,7 +571,8 @@ public: m_ptr = HBFIRFilterTraits::hbMod[m_ptr + 2 - 1]; } - void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) + /** Simple zero stuffing and filter */ + void myInterpolateZeroStuffing(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) { m_samples[m_ptr][0] = *x1; m_samples[m_ptr][1] = *y1; @@ -588,7 +590,7 @@ public: } /** Optimized upsampler by 2 not calculating FIR with inserted null samples */ - void myInterpolateOptimized(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) + void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) { // insert sample into ring double buffer m_samples[m_ptr][0] = *x1; diff --git a/sdrbase/dsp/inthalfbandfilterdb.h b/sdrbase/dsp/inthalfbandfilterdb.h index 02ce76bd2..1cbba6ec4 100644 --- a/sdrbase/dsp/inthalfbandfilterdb.h +++ b/sdrbase/dsp/inthalfbandfilterdb.h @@ -436,7 +436,8 @@ public: advancePointer(); } - void myInterpolate(Sample* sample1, Sample* sample2) + /** Simple zero stuffing and filter */ + void myInterpolateZeroStuffing(Sample* sample1, Sample* sample2) { storeSample((FixReal) sample1->real(), (FixReal) sample1->imag()); doFIR(sample1); @@ -447,7 +448,8 @@ public: advancePointer(); } - void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) + /** Simple zero stuffing and filter */ + void myInterpolateZeroStuffing(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) { storeSample(*x1, *y1); doFIR(x1, y1); @@ -459,7 +461,7 @@ public: } /** Optimized upsampler by 2 not calculating FIR with inserted null samples */ - void myInterpolateOptimized(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) + void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) { // insert sample into ring double buffer m_samplesDB[m_ptr][0] = *x1; diff --git a/sdrbase/dsp/inthalfbandfiltereo1.h b/sdrbase/dsp/inthalfbandfiltereo1.h index 33120362e..fb71197e0 100644 --- a/sdrbase/dsp/inthalfbandfiltereo1.h +++ b/sdrbase/dsp/inthalfbandfiltereo1.h @@ -439,7 +439,8 @@ public: advancePointer(); } - void myInterpolate(Sample* sample1, Sample* sample2) + /** Simple zero stuffing and filter */ + void myInterpolateZeroStuffing(Sample* sample1, Sample* sample2) { storeSample((FixReal) sample1->real(), (FixReal) sample1->imag()); doFIR(sample1); @@ -450,7 +451,8 @@ public: advancePointer(); } - void myInterpolate(int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2) + /** Simple zero stuffing and filter */ + void myInterpolateZeroStuffing(int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2) { storeSample(*x1, *y1); doFIR(x1, y1); @@ -462,7 +464,7 @@ public: } /** Optimized upsampler by 2 not calculating FIR with inserted null samples */ - void myInterpolateOptimized(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) + void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2) { // insert sample into ring double buffer m_samples[m_ptr][0] = *x1;