mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-28 15:56:33 -04:00
Change order of sub-band matching in the Upchannelizer similarly to fix for #1846
This commit is contained in:
parent
8ca7dbbd4e
commit
2f2c387276
@ -259,6 +259,19 @@ Real UpChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real chanStart
|
|||||||
<< " chan: [" << chanStart << ":" << chanEnd << "]"
|
<< " chan: [" << chanStart << ":" << chanEnd << "]"
|
||||||
<< " rot: " << rot;
|
<< " rot: " << rot;
|
||||||
|
|
||||||
|
// check if it fits into the center
|
||||||
|
// Was: if(signalContainsChannel(sigStart + rot + safetyMargin, sigStart + rot + sigBw / 2.0f - safetyMargin, chanStart, chanEnd)) {
|
||||||
|
if(signalContainsChannel(sigStart + rot, sigEnd - rot, chanStart, chanEnd))
|
||||||
|
{
|
||||||
|
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));
|
||||||
|
m_stageSamples.push_back(s);
|
||||||
|
// Was: return createFilterChain(sigStart + rot, sigStart + sigBw / 2.0f + rot, chanStart, chanEnd);
|
||||||
|
return createFilterChain(sigStart + rot, sigEnd - rot, chanStart, chanEnd);
|
||||||
|
}
|
||||||
|
|
||||||
// check if it fits into the left half
|
// check if it fits into the left half
|
||||||
if(signalContainsChannel(sigStart, sigStart + sigBw / 2.0, chanStart, chanEnd))
|
if(signalContainsChannel(sigStart, sigStart + sigBw / 2.0, chanStart, chanEnd))
|
||||||
{
|
{
|
||||||
@ -281,19 +294,6 @@ Real UpChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real chanStart
|
|||||||
return createFilterChain(sigEnd - sigBw / 2.0f, sigEnd, chanStart, chanEnd);
|
return createFilterChain(sigEnd - sigBw / 2.0f, sigEnd, chanStart, chanEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if it fits into the center
|
|
||||||
// Was: if(signalContainsChannel(sigStart + rot + safetyMargin, sigStart + rot + sigBw / 2.0f - safetyMargin, chanStart, chanEnd)) {
|
|
||||||
if(signalContainsChannel(sigStart + rot, sigEnd - rot, chanStart, chanEnd))
|
|
||||||
{
|
|
||||||
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));
|
|
||||||
m_stageSamples.push_back(s);
|
|
||||||
// Was: return createFilterChain(sigStart + rot, sigStart + sigBw / 2.0f + rot, chanStart, chanEnd);
|
|
||||||
return createFilterChain(sigStart + rot, sigEnd - rot, chanStart, chanEnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
Real ofs = ((chanEnd - chanStart) / 2.0 + chanStart) - ((sigEnd - sigStart) / 2.0 + sigStart);
|
Real ofs = ((chanEnd - chanStart) / 2.0 + chanStart) - ((sigEnd - sigStart) / 2.0 + sigStart);
|
||||||
|
|
||||||
qDebug() << "UpChannelizer::createFilterChain: complete:"
|
qDebug() << "UpChannelizer::createFilterChain: complete:"
|
||||||
|
Loading…
Reference in New Issue
Block a user