1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-09-02 13:17:48 -04:00

UpSampleChannelizer: corrected and enhanced debug messages

This commit is contained in:
f4exb 2019-11-01 10:26:40 +01:00
parent a2a3811d3b
commit 8e52a32112

View File

@ -115,11 +115,11 @@ void UpSampleChannelizer::applyConfiguration()
if (m_outputSampleRate == 0) if (m_outputSampleRate == 0)
{ {
qDebug() << "UpChannelizer::applyConfiguration: aborting (out=0):" qDebug() << "UpSampleChannelizer::applyConfiguration: aborting (out=0):"
<< " out =" << m_outputSampleRate << " out:" << m_outputSampleRate
<< ", req =" << m_requestedInputSampleRate << " req:" << m_requestedInputSampleRate
<< ", in =" << m_currentInputSampleRate << " in:" << m_currentInputSampleRate
<< ", fc =" << m_currentCenterFrequency; << " fc:" << m_currentCenterFrequency;
return; return;
} }
@ -131,11 +131,11 @@ void UpSampleChannelizer::applyConfiguration()
m_currentInputSampleRate = m_outputSampleRate / (1 << m_filterStages.size()); m_currentInputSampleRate = m_outputSampleRate / (1 << m_filterStages.size());
qDebug() << "UpChannelizer::applyConfiguration:" qDebug() << "UpSampleChannelizer::applyConfiguration: done: "
<< " out=" << m_outputSampleRate << " out:" << m_outputSampleRate
<< ", req=" << m_requestedInputSampleRate << " req:" << m_requestedInputSampleRate
<< ", in=" << m_currentInputSampleRate << " in:" << m_currentInputSampleRate
<< ", fc=" << m_currentCenterFrequency; << " fc:" << m_currentCenterFrequency;
} }
void UpSampleChannelizer::applyConfiguration(int requestedSampleRate, qint64 requestedCenterFrequency) void UpSampleChannelizer::applyConfiguration(int requestedSampleRate, qint64 requestedCenterFrequency)
@ -163,9 +163,10 @@ void UpSampleChannelizer::setInterpolation(unsigned int log2Interp, unsigned int
m_currentInputSampleRate = m_outputSampleRate / (1 << m_filterStages.size()); m_currentInputSampleRate = m_outputSampleRate / (1 << m_filterStages.size());
m_requestedInputSampleRate = m_currentInputSampleRate; m_requestedInputSampleRate = m_currentInputSampleRate;
qDebug() << "UpChannelizer::applySetting in=" << m_outputSampleRate qDebug() << "UpSampleChannelizer::setInterpolation: done:"
<< ", out=" << m_currentInputSampleRate << " in:" << m_outputSampleRate
<< ", fc=" << m_currentCenterFrequency; << " out:" << m_currentInputSampleRate
<< " fc:" << m_currentCenterFrequency;
} }
#ifdef USE_SSE4_1 #ifdef USE_SSE4_1
@ -297,22 +298,29 @@ double UpSampleChannelizer::setFilterChain(const std::vector<unsigned int>& stag
m_filterStages.push_back(new FilterStage(FilterStage::ModeLowerHalf)); m_filterStages.push_back(new FilterStage(FilterStage::ModeLowerHalf));
m_stageSamples.push_back(s); m_stageSamples.push_back(s);
ofs -= ofs_stage; ofs -= ofs_stage;
qDebug("UpSampleChannelizer::setFilterChain: lower half: ofs: %f", ofs);
} }
else if (*rit == 1) else if (*rit == 1)
{ {
m_filterStages.push_back(new FilterStage(FilterStage::ModeCenter)); m_filterStages.push_back(new FilterStage(FilterStage::ModeCenter));
m_stageSamples.push_back(s); m_stageSamples.push_back(s);
qDebug("UpSampleChannelizer::setFilterChain: center: ofs: %f", ofs);
} }
else if (*rit == 2) else if (*rit == 2)
{ {
m_filterStages.push_back(new FilterStage(FilterStage::ModeUpperHalf)); m_filterStages.push_back(new FilterStage(FilterStage::ModeUpperHalf));
m_stageSamples.push_back(s); m_stageSamples.push_back(s);
ofs += ofs_stage; ofs += ofs_stage;
qDebug("UpSampleChannelizer::setFilterChain: upper half: ofs: %f", ofs);
} }
ofs_stage /= 2; ofs_stage /= 2;
} }
qDebug() << "UpSampleChannelizer::setFilterChain: complete:"
<< " #stages: " << m_filterStages.size()
<< " ofs: " << ofs;
return ofs; return ofs;
} }