From 48174ad5cfed8174638b8b547414de8bf689ca6b Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 15 Nov 2019 01:38:19 +0100 Subject: [PATCH] Renamed UpSampleChannelizer back to UpChannelizer --- .../filesource/filesourcebaseband.cpp | 4 +- .../channeltx/filesource/filesourcebaseband.h | 4 +- .../localsource/localsourcebaseband.cpp | 4 +- .../localsource/localsourcebaseband.h | 4 +- plugins/channeltx/modam/ammodbaseband.cpp | 4 +- plugins/channeltx/modam/ammodbaseband.h | 4 +- plugins/channeltx/modatv/atvmodbaseband.cpp | 4 +- plugins/channeltx/modatv/atvmodbaseband.h | 4 +- .../channeltx/modfreedv/freedvmodbaseband.cpp | 4 +- .../channeltx/modfreedv/freedvmodbaseband.h | 4 +- plugins/channeltx/modnfm/nfmmodbaseband.cpp | 4 +- plugins/channeltx/modnfm/nfmmodbaseband.h | 4 +- plugins/channeltx/modssb/ssbmodbaseband.cpp | 4 +- plugins/channeltx/modssb/ssbmodbaseband.h | 4 +- plugins/channeltx/modwfm/wfmmodbaseband.cpp | 4 +- plugins/channeltx/modwfm/wfmmodbaseband.h | 4 +- .../remotesource/remotesourcebaseband.cpp | 4 +- .../remotesource/remotesourcebaseband.h | 4 +- .../channeltx/udpsource/udpsourcebaseband.cpp | 4 +- .../channeltx/udpsource/udpsourcebaseband.h | 4 +- sdrbase/CMakeLists.txt | 4 +- ...amplechannelizer.cpp => upchannelizer.cpp} | 76 +++++++++---------- ...{upsamplechannelizer.h => upchannelizer.h} | 22 +++--- 23 files changed, 91 insertions(+), 91 deletions(-) rename sdrbase/dsp/{upsamplechannelizer.cpp => upchannelizer.cpp} (76%) rename sdrbase/dsp/{upsamplechannelizer.h => upchannelizer.h} (83%) diff --git a/plugins/channeltx/filesource/filesourcebaseband.cpp b/plugins/channeltx/filesource/filesourcebaseband.cpp index 08fbed0a8..12ff3dd2f 100644 --- a/plugins/channeltx/filesource/filesourcebaseband.cpp +++ b/plugins/channeltx/filesource/filesourcebaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -36,7 +36,7 @@ FileSourceBaseband::FileSourceBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("FileSourceBaseband::FileSourceBaseband"); QObject::connect( diff --git a/plugins/channeltx/filesource/filesourcebaseband.h b/plugins/channeltx/filesource/filesourcebaseband.h index fbc5160c4..60b930ceb 100644 --- a/plugins/channeltx/filesource/filesourcebaseband.h +++ b/plugins/channeltx/filesource/filesourcebaseband.h @@ -27,7 +27,7 @@ #include "filesourcesource.h" -class UpSampleChannelizer; +class UpChannelizer; class FileSourceBaseband : public QObject { @@ -162,7 +162,7 @@ public: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; FileSourceSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication FileSourceSettings m_settings; diff --git a/plugins/channeltx/localsource/localsourcebaseband.cpp b/plugins/channeltx/localsource/localsourcebaseband.cpp index 0a88334a9..79084604d 100644 --- a/plugins/channeltx/localsource/localsourcebaseband.cpp +++ b/plugins/channeltx/localsource/localsourcebaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -34,7 +34,7 @@ LocalSourceBaseband::LocalSourceBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("FileSourceBaseband::FileSourceBaseband"); QObject::connect( diff --git a/plugins/channeltx/localsource/localsourcebaseband.h b/plugins/channeltx/localsource/localsourcebaseband.h index 79f30dcbd..ea242912c 100644 --- a/plugins/channeltx/localsource/localsourcebaseband.h +++ b/plugins/channeltx/localsource/localsourcebaseband.h @@ -28,7 +28,7 @@ #include "localsourcesource.h" #include "localsourcesettings.h" -class UpSampleChannelizer; +class UpChannelizer; class LocalSourceBaseband : public QObject { @@ -150,7 +150,7 @@ public: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; LocalSourceSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication LocalSourceSettings m_settings; diff --git a/plugins/channeltx/modam/ammodbaseband.cpp b/plugins/channeltx/modam/ammodbaseband.cpp index 1a3b6c458..7ae7eaaba 100644 --- a/plugins/channeltx/modam/ammodbaseband.cpp +++ b/plugins/channeltx/modam/ammodbaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -30,7 +30,7 @@ AMModBaseband::AMModBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("AMModBaseband::AMModBaseband"); QObject::connect( diff --git a/plugins/channeltx/modam/ammodbaseband.h b/plugins/channeltx/modam/ammodbaseband.h index 9a391cb39..ce7a23a08 100644 --- a/plugins/channeltx/modam/ammodbaseband.h +++ b/plugins/channeltx/modam/ammodbaseband.h @@ -27,7 +27,7 @@ #include "ammodsource.h" -class UpSampleChannelizer; +class UpChannelizer; class AMModBaseband : public QObject { @@ -104,7 +104,7 @@ signals: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; AMModSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication AMModSettings m_settings; diff --git a/plugins/channeltx/modatv/atvmodbaseband.cpp b/plugins/channeltx/modatv/atvmodbaseband.cpp index 54fb59aa1..97ac56e05 100644 --- a/plugins/channeltx/modatv/atvmodbaseband.cpp +++ b/plugins/channeltx/modatv/atvmodbaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -36,7 +36,7 @@ ATVModBaseband::ATVModBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("AMModBaseband::AMModBaseband"); QObject::connect( diff --git a/plugins/channeltx/modatv/atvmodbaseband.h b/plugins/channeltx/modatv/atvmodbaseband.h index 1358a0cca..33c953449 100644 --- a/plugins/channeltx/modatv/atvmodbaseband.h +++ b/plugins/channeltx/modatv/atvmodbaseband.h @@ -27,7 +27,7 @@ #include "atvmodsource.h" -class UpSampleChannelizer; +class UpChannelizer; class ATVModBaseband : public QObject { @@ -233,7 +233,7 @@ signals: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; ATVModSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication ATVModSettings m_settings; diff --git a/plugins/channeltx/modfreedv/freedvmodbaseband.cpp b/plugins/channeltx/modfreedv/freedvmodbaseband.cpp index d20e9f20e..df4334467 100644 --- a/plugins/channeltx/modfreedv/freedvmodbaseband.cpp +++ b/plugins/channeltx/modfreedv/freedvmodbaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -30,7 +30,7 @@ FreeDVModBaseband::FreeDVModBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("FreeDVModBaseband::FreeDVModBaseband"); QObject::connect( diff --git a/plugins/channeltx/modfreedv/freedvmodbaseband.h b/plugins/channeltx/modfreedv/freedvmodbaseband.h index f0580a1b3..9eb73cae4 100644 --- a/plugins/channeltx/modfreedv/freedvmodbaseband.h +++ b/plugins/channeltx/modfreedv/freedvmodbaseband.h @@ -27,7 +27,7 @@ #include "freedvmodsource.h" -class UpSampleChannelizer; +class UpChannelizer; class FreeDVModBaseband : public QObject { @@ -106,7 +106,7 @@ signals: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; FreeDVModSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication FreeDVModSettings m_settings; diff --git a/plugins/channeltx/modnfm/nfmmodbaseband.cpp b/plugins/channeltx/modnfm/nfmmodbaseband.cpp index 7d4e4fbb4..afd9c1973 100644 --- a/plugins/channeltx/modnfm/nfmmodbaseband.cpp +++ b/plugins/channeltx/modnfm/nfmmodbaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -30,7 +30,7 @@ NFMModBaseband::NFMModBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("NFMModBaseband::NFMModBaseband"); QObject::connect( diff --git a/plugins/channeltx/modnfm/nfmmodbaseband.h b/plugins/channeltx/modnfm/nfmmodbaseband.h index eebbac663..42514ee1f 100644 --- a/plugins/channeltx/modnfm/nfmmodbaseband.h +++ b/plugins/channeltx/modnfm/nfmmodbaseband.h @@ -27,7 +27,7 @@ #include "nfmmodsource.h" -class UpSampleChannelizer; +class UpChannelizer; class NFMModBaseband : public QObject { @@ -104,7 +104,7 @@ signals: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; NFMModSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication NFMModSettings m_settings; diff --git a/plugins/channeltx/modssb/ssbmodbaseband.cpp b/plugins/channeltx/modssb/ssbmodbaseband.cpp index 269837320..65d6a1201 100644 --- a/plugins/channeltx/modssb/ssbmodbaseband.cpp +++ b/plugins/channeltx/modssb/ssbmodbaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -30,7 +30,7 @@ SSBModBaseband::SSBModBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("SSBModBaseband::SSBModBaseband"); QObject::connect( diff --git a/plugins/channeltx/modssb/ssbmodbaseband.h b/plugins/channeltx/modssb/ssbmodbaseband.h index 31294b59d..11765a0d3 100644 --- a/plugins/channeltx/modssb/ssbmodbaseband.h +++ b/plugins/channeltx/modssb/ssbmodbaseband.h @@ -27,7 +27,7 @@ #include "ssbmodsource.h" -class UpSampleChannelizer; +class UpChannelizer; class BasebandSampleSink; class SSBModBaseband : public QObject @@ -106,7 +106,7 @@ signals: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; SSBModSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication SSBModSettings m_settings; diff --git a/plugins/channeltx/modwfm/wfmmodbaseband.cpp b/plugins/channeltx/modwfm/wfmmodbaseband.cpp index 0582701c6..7dd486501 100644 --- a/plugins/channeltx/modwfm/wfmmodbaseband.cpp +++ b/plugins/channeltx/modwfm/wfmmodbaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -30,7 +30,7 @@ WFMModBaseband::WFMModBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("WFMModBaseband::WFMModBaseband"); QObject::connect( diff --git a/plugins/channeltx/modwfm/wfmmodbaseband.h b/plugins/channeltx/modwfm/wfmmodbaseband.h index 2b307a826..c4880d37d 100644 --- a/plugins/channeltx/modwfm/wfmmodbaseband.h +++ b/plugins/channeltx/modwfm/wfmmodbaseband.h @@ -27,7 +27,7 @@ #include "wfmmodsource.h" -class UpSampleChannelizer; +class UpChannelizer; class WFMModBaseband : public QObject { @@ -102,7 +102,7 @@ signals: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; WFMModSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication WFMModSettings m_settings; diff --git a/plugins/channeltx/remotesource/remotesourcebaseband.cpp b/plugins/channeltx/remotesource/remotesourcebaseband.cpp index fd6df2e53..7002b9b70 100644 --- a/plugins/channeltx/remotesource/remotesourcebaseband.cpp +++ b/plugins/channeltx/remotesource/remotesourcebaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -30,7 +30,7 @@ RemoteSourceBaseband::RemoteSourceBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("RemoteSourceBaseband::RemoteSourceBaseband"); QObject::connect( diff --git a/plugins/channeltx/remotesource/remotesourcebaseband.h b/plugins/channeltx/remotesource/remotesourcebaseband.h index 29eedd5a1..c2b22230b 100644 --- a/plugins/channeltx/remotesource/remotesourcebaseband.h +++ b/plugins/channeltx/remotesource/remotesourcebaseband.h @@ -28,7 +28,7 @@ #include "remotesourcesource.h" #include "remotesourcesettings.h" -class UpSampleChannelizer; +class UpChannelizer; class RemoteSourceBaseband : public QObject { @@ -90,7 +90,7 @@ public: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; RemoteSourceSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication RemoteSourceSettings m_settings; diff --git a/plugins/channeltx/udpsource/udpsourcebaseband.cpp b/plugins/channeltx/udpsource/udpsourcebaseband.cpp index 5eb5dbd5d..4f798aa5b 100644 --- a/plugins/channeltx/udpsource/udpsourcebaseband.cpp +++ b/plugins/channeltx/udpsource/udpsourcebaseband.cpp @@ -17,7 +17,7 @@ #include -#include "dsp/upsamplechannelizer.h" +#include "dsp/upchannelizer.h" #include "dsp/dspengine.h" #include "dsp/dspcommands.h" @@ -33,7 +33,7 @@ UDPSourceBaseband::UDPSourceBaseband() : m_mutex(QMutex::Recursive) { m_sampleFifo.resize(SampleSourceFifo::getSizePolicy(48000)); - m_channelizer = new UpSampleChannelizer(&m_source); + m_channelizer = new UpChannelizer(&m_source); qDebug("UDPSourceBaseband::UDPSourceBaseband"); QObject::connect( diff --git a/plugins/channeltx/udpsource/udpsourcebaseband.h b/plugins/channeltx/udpsource/udpsourcebaseband.h index fe38ed86a..8dd7f7494 100644 --- a/plugins/channeltx/udpsource/udpsourcebaseband.h +++ b/plugins/channeltx/udpsource/udpsourcebaseband.h @@ -27,7 +27,7 @@ #include "udpsourcesource.h" -class UpSampleChannelizer; +class UpChannelizer; class UDPSourceBaseband : public QObject { @@ -137,7 +137,7 @@ signals: private: SampleSourceFifo m_sampleFifo; - UpSampleChannelizer *m_channelizer; + UpChannelizer *m_channelizer; UDPSourceSource m_source; MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication UDPSourceSettings m_settings; diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index b91cfc8d8..c6b5364b3 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -63,7 +63,7 @@ set(sdrbase_SOURCES dsp/afsquelch.cpp dsp/agc.cpp dsp/downchannelizer.cpp - dsp/upsamplechannelizer.cpp + dsp/upchannelizer.cpp dsp/channelmarker.cpp dsp/ctcssdetector.cpp dsp/channelsamplesource.cpp @@ -178,7 +178,7 @@ set(sdrbase_HEADERS dsp/afsquelch.h dsp/autocorrector.h dsp/downchannelizer.h - dsp/upsamplechannelizer.h + dsp/upchannelizer.h dsp/channelmarker.h dsp/channelsamplesource.h dsp/complex.h diff --git a/sdrbase/dsp/upsamplechannelizer.cpp b/sdrbase/dsp/upchannelizer.cpp similarity index 76% rename from sdrbase/dsp/upsamplechannelizer.cpp rename to sdrbase/dsp/upchannelizer.cpp index 7e1887ea7..58dd301d9 100644 --- a/sdrbase/dsp/upsamplechannelizer.cpp +++ b/sdrbase/dsp/upchannelizer.cpp @@ -24,9 +24,9 @@ #include "inthalfbandfilter.h" #include "dspcommands.h" #include "hbfilterchainconverter.h" -#include "upsamplechannelizer.h" +#include "upchannelizer.h" -UpSampleChannelizer::UpSampleChannelizer(ChannelSampleSource* sampleSource) : +UpChannelizer::UpChannelizer(ChannelSampleSource* sampleSource) : m_filterChainSetMode(false), m_sampleSource(sampleSource), m_basebandSampleRate(0), @@ -39,12 +39,12 @@ UpSampleChannelizer::UpSampleChannelizer(ChannelSampleSource* sampleSource) : { } -UpSampleChannelizer::~UpSampleChannelizer() +UpChannelizer::~UpChannelizer() { freeFilterChain(); } -void UpSampleChannelizer::pullOne(Sample& sample) +void UpChannelizer::pullOne(Sample& sample) { if (m_sampleSource == nullptr) { @@ -85,7 +85,7 @@ void UpSampleChannelizer::pullOne(Sample& sample) } } -void UpSampleChannelizer::pull(SampleVector::iterator begin, unsigned int nbSamples) +void UpChannelizer::pull(SampleVector::iterator begin, unsigned int nbSamples) { if (m_sampleSource == nullptr) { @@ -111,20 +111,20 @@ void UpSampleChannelizer::pull(SampleVector::iterator begin, unsigned int nbSamp } } -void UpSampleChannelizer::prefetch(unsigned int nbSamples) +void UpChannelizer::prefetch(unsigned int nbSamples) { unsigned int log2Interp = m_filterStages.size(); m_sampleSource->prefetch(nbSamples/(1< stageIndexes; @@ -184,7 +184,7 @@ void UpSampleChannelizer::applyInterpolation() m_channelSampleRate = m_basebandSampleRate / (1 << m_filterStages.size()); m_requestedInputSampleRate = m_channelSampleRate; - qDebug() << "UpSampleChannelizer::applyInterpolation:" + qDebug() << "UpChannelizer::applyInterpolation:" << " m_log2Interp:" << m_log2Interp << " m_filterChainHash:" << m_filterChainHash << " out:" << m_basebandSampleRate @@ -193,51 +193,51 @@ void UpSampleChannelizer::applyInterpolation() } #ifdef USE_SSE4_1 -UpSampleChannelizer::FilterStage::FilterStage(Mode mode) : - m_filter(new IntHalfbandFilterEO1), +UpChannelizer::FilterStage::FilterStage(Mode mode) : + m_filter(new IntHalfbandFilterEO1), m_workFunction(0) { switch(mode) { case ModeCenter: - m_workFunction = &IntHalfbandFilterEO1::workInterpolateCenter; + m_workFunction = &IntHalfbandFilterEO1::workInterpolateCenter; break; case ModeLowerHalf: - m_workFunction = &IntHalfbandFilterEO1::workInterpolateLowerHalf; + m_workFunction = &IntHalfbandFilterEO1::workInterpolateLowerHalf; break; case ModeUpperHalf: - m_workFunction = &IntHalfbandFilterEO1::workInterpolateUpperHalf; + m_workFunction = &IntHalfbandFilterEO1::workInterpolateUpperHalf; break; } } #else -UpSampleChannelizer::FilterStage::FilterStage(Mode mode) : - m_filter(new IntHalfbandFilterDB), +UpChannelizer::FilterStage::FilterStage(Mode mode) : + m_filter(new IntHalfbandFilterDB), m_workFunction(0) { switch(mode) { case ModeCenter: - m_workFunction = &IntHalfbandFilterDB::workInterpolateCenter; + m_workFunction = &IntHalfbandFilterDB::workInterpolateCenter; break; case ModeLowerHalf: - m_workFunction = &IntHalfbandFilterDB::workInterpolateLowerHalf; + m_workFunction = &IntHalfbandFilterDB::workInterpolateLowerHalf; break; case ModeUpperHalf: - m_workFunction = &IntHalfbandFilterDB::workInterpolateUpperHalf; + m_workFunction = &IntHalfbandFilterDB::workInterpolateUpperHalf; break; } } #endif -UpSampleChannelizer::FilterStage::~FilterStage() +UpChannelizer::FilterStage::~FilterStage() { delete m_filter; } -bool UpSampleChannelizer::signalContainsChannel(Real sigStart, Real sigEnd, Real chanStart, Real chanEnd) const +bool UpChannelizer::signalContainsChannel(Real sigStart, Real sigEnd, Real chanStart, Real chanEnd) const { //qDebug(" testing signal [%f, %f], channel [%f, %f]", sigStart, sigEnd, chanStart, chanEnd); if(sigEnd <= sigStart) @@ -247,13 +247,13 @@ bool UpSampleChannelizer::signalContainsChannel(Real sigStart, Real sigEnd, Real return (sigStart <= chanStart) && (sigEnd >= chanEnd); } -Real UpSampleChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real chanStart, Real chanEnd) +Real UpChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real chanStart, Real chanEnd) { Real sigBw = sigEnd - sigStart; Real rot = sigBw / 4; Sample s; - qDebug() << "UpSampleChannelizer::createFilterChain: start:" + qDebug() << "UpChannelizer::createFilterChain: start:" << " sig: [" << sigStart << ":" << sigEnd << "]" << " BW: " << sigBw << " chan: [" << chanStart << ":" << chanEnd << "]" @@ -262,7 +262,7 @@ Real UpSampleChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real cha // check if it fits into the left half if(signalContainsChannel(sigStart, sigStart + sigBw / 2.0, chanStart, chanEnd)) { - qDebug() << "UpSampleChannelizer::createFilterChain: take left half (rotate by +1/4 and decimate by 2):" + qDebug() << "UpChannelizer::createFilterChain: take left half (rotate by +1/4 and decimate by 2):" << " [" << m_filterStages.size() << "]" << " sig: [" << sigStart << ":" << sigStart + sigBw / 2.0 << "]"; m_filterStages.push_back(new FilterStage(FilterStage::ModeLowerHalf)); @@ -273,7 +273,7 @@ Real UpSampleChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real cha // check if it fits into the right half if(signalContainsChannel(sigEnd - sigBw / 2.0f, sigEnd, chanStart, chanEnd)) { - qDebug() << "UpSampleChannelizer::createFilterChain: take right half (rotate by -1/4 and decimate by 2):" + qDebug() << "UpChannelizer::createFilterChain: take right half (rotate by -1/4 and decimate by 2):" << " [" << m_filterStages.size() << "]" << " sig: [" << sigEnd - sigBw / 2.0f << ":" << sigEnd << "]"; m_filterStages.push_back(new FilterStage(FilterStage::ModeUpperHalf)); @@ -285,7 +285,7 @@ Real UpSampleChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real cha // Was: if(signalContainsChannel(sigStart + rot + safetyMargin, sigStart + rot + sigBw / 2.0f - safetyMargin, chanStart, chanEnd)) { if(signalContainsChannel(sigStart + rot, sigEnd - rot, chanStart, chanEnd)) { - qDebug() << "UpSampleChannelizer::createFilterChain: take center half (decimate by 2):" + qDebug() << "UpChannelizer::createFilterChain: take center half (decimate by 2):" << " [" << m_filterStages.size() << "]" << " sig: [" << sigStart + rot << ":" << sigEnd - rot << "]"; m_filterStages.push_back(new FilterStage(FilterStage::ModeCenter)); @@ -296,7 +296,7 @@ Real UpSampleChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real cha Real ofs = ((chanEnd - chanStart) / 2.0 + chanStart) - ((sigEnd - sigStart) / 2.0 + sigStart); - qDebug() << "UpSampleChannelizer::createFilterChain: complete:" + qDebug() << "UpChannelizer::createFilterChain: complete:" << " #stages: " << m_filterStages.size() << " BW: " << sigBw << " ofs: " << ofs; @@ -304,7 +304,7 @@ Real UpSampleChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real cha return ofs; } -double UpSampleChannelizer::setFilterChain(const std::vector& stageIndexes) +double UpChannelizer::setFilterChain(const std::vector& stageIndexes) { // filters are described from lower to upper level but the chain is constructed the other way round std::vector::const_reverse_iterator rit = stageIndexes.rbegin(); @@ -321,33 +321,33 @@ double UpSampleChannelizer::setFilterChain(const std::vector& stag m_filterStages.push_back(new FilterStage(FilterStage::ModeLowerHalf)); m_stageSamples.push_back(s); ofs -= ofs_stage; - qDebug("UpSampleChannelizer::setFilterChain: lower half: ofs: %f", ofs); + qDebug("UpChannelizer::setFilterChain: lower half: ofs: %f", ofs); } else if (*rit == 1) { m_filterStages.push_back(new FilterStage(FilterStage::ModeCenter)); m_stageSamples.push_back(s); - qDebug("UpSampleChannelizer::setFilterChain: center: ofs: %f", ofs); + qDebug("UpChannelizer::setFilterChain: center: ofs: %f", ofs); } else if (*rit == 2) { m_filterStages.push_back(new FilterStage(FilterStage::ModeUpperHalf)); m_stageSamples.push_back(s); ofs += ofs_stage; - qDebug("UpSampleChannelizer::setFilterChain: upper half: ofs: %f", ofs); + qDebug("UpChannelizer::setFilterChain: upper half: ofs: %f", ofs); } ofs_stage /= 2; } - qDebug() << "UpSampleChannelizer::setFilterChain: complete:" + qDebug() << "UpChannelizer::setFilterChain: complete:" << " #stages: " << m_filterStages.size() << " ofs: " << ofs; return ofs; } -void UpSampleChannelizer::freeFilterChain() +void UpChannelizer::freeFilterChain() { for(FilterStages::iterator it = m_filterStages.begin(); it != m_filterStages.end(); ++it) delete *it; diff --git a/sdrbase/dsp/upsamplechannelizer.h b/sdrbase/dsp/upchannelizer.h similarity index 83% rename from sdrbase/dsp/upsamplechannelizer.h rename to sdrbase/dsp/upchannelizer.h index 7fd75b447..ce464276b 100644 --- a/sdrbase/dsp/upsamplechannelizer.h +++ b/sdrbase/dsp/upchannelizer.h @@ -16,8 +16,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef SDRBASE_DSP_UPSAMPLECHANNELIZER_H_ -#define SDRBASE_DSP_UPSAMPLECHANNELIZER_H_ +#ifndef SDRBASE_DSP_UPCHANNELIZER_H_ +#define SDRBASE_DSP_UPCHANNELIZER_H_ #include #include @@ -33,12 +33,12 @@ #include "dsp/inthalfbandfilterdb.h" #endif -#define UPSAMPLECHANNELIZER_HB_FILTER_ORDER 96 +#define UPCHANNELIZER_HB_FILTER_ORDER 96 -class SDRBASE_API UpSampleChannelizer : public ChannelSampleSource { +class SDRBASE_API UpChannelizer : public ChannelSampleSource { public: - UpSampleChannelizer(ChannelSampleSource* sampleSource); - virtual ~UpSampleChannelizer(); + UpChannelizer(ChannelSampleSource* sampleSource); + virtual ~UpChannelizer(); virtual void pull(SampleVector::iterator begin, unsigned int nbSamples); virtual void pullOne(Sample& sample); @@ -59,11 +59,11 @@ protected: }; #ifdef USE_SSE4_1 - typedef bool (IntHalfbandFilterEO1::*WorkFunction)(Sample* sIn, Sample *sOut); - IntHalfbandFilterEO1* m_filter; + typedef bool (IntHalfbandFilterEO1::*WorkFunction)(Sample* sIn, Sample *sOut); + IntHalfbandFilterEO1* m_filter; #else - typedef bool (IntHalfbandFilterDB::*WorkFunction)(Sample* sIn, Sample *sOut); - IntHalfbandFilterDB* m_filter; + typedef bool (IntHalfbandFilterDB::*WorkFunction)(Sample* sIn, Sample *sOut); + IntHalfbandFilterDB* m_filter; #endif WorkFunction m_workFunction; @@ -101,4 +101,4 @@ protected: -#endif // SDRBASE_DSP_UPSAMPLECHANNELIZER_H_ +#endif // SDRBASE_DSP_UPCHANNELIZER_H_