diff --git a/plugins/samplesource/airspy/airspyinput.cpp b/plugins/samplesource/airspy/airspyinput.cpp index 36390966f..1ee52b248 100644 --- a/plugins/samplesource/airspy/airspyinput.cpp +++ b/plugins/samplesource/airspy/airspyinput.cpp @@ -446,6 +446,7 @@ bool AirspyInput::applySettings(const AirspySettings& settings, bool force) settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, m_sampleRates[settings.m_devSampleRateIndex], + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, settings.m_transverterMode); if (m_dev != 0) { diff --git a/plugins/samplesource/bladerf1input/bladerf1input.cpp b/plugins/samplesource/bladerf1input/bladerf1input.cpp index 876b1032e..6ec44ab24 100644 --- a/plugins/samplesource/bladerf1input/bladerf1input.cpp +++ b/plugins/samplesource/bladerf1input/bladerf1input.cpp @@ -542,7 +542,9 @@ bool Bladerf1Input::applySettings(const BladeRF1InputSettings& settings, bool fo 0, settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - settings.m_devSampleRate); + settings.m_devSampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, + false); forwardChange = true; diff --git a/plugins/samplesource/bladerf2input/bladerf2input.cpp b/plugins/samplesource/bladerf2input/bladerf2input.cpp index 209200396..ca1b66831 100644 --- a/plugins/samplesource/bladerf2input/bladerf2input.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2input.cpp @@ -676,7 +676,9 @@ bool BladeRF2Input::handleMessage(const Message& message) 0, settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - settings.m_devSampleRate); + settings.m_devSampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, + false); if (setDeviceCenterFrequency(dev, requestedChannel, deviceCenterFrequency, settings.m_LOppmTenths)) { @@ -888,7 +890,9 @@ bool BladeRF2Input::applySettings(const BladeRF2InputSettings& settings, bool fo 0, settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - settings.m_devSampleRate); + settings.m_devSampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, + false); forwardChangeOwnDSP = true; forwardChangeRxBuddies = true; diff --git a/plugins/samplesource/fcdpro/fcdproinput.cpp b/plugins/samplesource/fcdpro/fcdproinput.cpp index aaa0b27ba..963bc4457 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.cpp +++ b/plugins/samplesource/fcdpro/fcdproinput.cpp @@ -349,6 +349,7 @@ void FCDProInput::applySettings(const FCDProSettings& settings, bool force) settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, fcd_traits::sampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, settings.m_transverterMode); if (m_dev != 0) diff --git a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp index fdff6300e..4aacef5ea 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp @@ -351,6 +351,7 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, fcd_traits::sampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, settings.m_transverterMode); if (m_dev != 0) { diff --git a/plugins/samplesource/hackrfinput/hackrfinput.cpp b/plugins/samplesource/hackrfinput/hackrfinput.cpp index 1868a62f4..0b3932342 100644 --- a/plugins/samplesource/hackrfinput/hackrfinput.cpp +++ b/plugins/samplesource/hackrfinput/hackrfinput.cpp @@ -319,7 +319,8 @@ bool HackRFInput::handleMessage(const Message& message) 0, m_settings.m_log2Decim, (DeviceSampleSource::fcPos_t) m_settings.m_fcPos, - m_settings.m_devSampleRate); + m_settings.m_devSampleRate, + DeviceSampleSource::FSHIFT_TXSYNC); qDebug("HackRFInput::handleMessage: MsgSynchronizeFrequency: centerFrequency: %lld Hz", centerFrequency); HackRFInputSettings settings = m_settings; settings.m_centerFrequency = centerFrequency; @@ -441,7 +442,9 @@ bool HackRFInput::applySettings(const HackRFInputSettings& settings, bool force) 0, settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - settings.m_devSampleRate); + settings.m_devSampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_TXSYNC, + false); setDeviceCenterFrequency(deviceCenterFrequency, settings.m_LOppmTenths); if (m_deviceAPI->getSinkBuddies().size() > 0) // forward to buddy if necessary diff --git a/plugins/samplesource/hackrfinput/hackrfinputthread.cpp b/plugins/samplesource/hackrfinput/hackrfinputthread.cpp index af3baa502..2bacfdcd0 100644 --- a/plugins/samplesource/hackrfinput/hackrfinputthread.cpp +++ b/plugins/samplesource/hackrfinput/hackrfinputthread.cpp @@ -139,19 +139,19 @@ void HackRFInputThread::callback(const qint8* buf, qint32 len) m_decimators.decimate2_inf(&it, buf, len); break; case 2: - m_decimators.decimate4_inf(&it, buf, len); + m_decimators.decimate4_inf_txsync(&it, buf, len); break; case 3: - m_decimators.decimate8_inf(&it, buf, len); + m_decimators.decimate8_inf_txsync(&it, buf, len); break; case 4: - m_decimators.decimate16_inf(&it, buf, len); + m_decimators.decimate16_inf_txsync(&it, buf, len); break; case 5: - m_decimators.decimate32_inf(&it, buf, len); + m_decimators.decimate32_inf_txsync(&it, buf, len); break; case 6: - m_decimators.decimate64_inf(&it, buf, len); + m_decimators.decimate64_inf_txsync(&it, buf, len); break; default: break; @@ -165,19 +165,19 @@ void HackRFInputThread::callback(const qint8* buf, qint32 len) m_decimators.decimate2_sup(&it, buf, len); break; case 2: - m_decimators.decimate4_sup(&it, buf, len); + m_decimators.decimate4_sup_txsync(&it, buf, len); break; case 3: - m_decimators.decimate8_sup(&it, buf, len); + m_decimators.decimate8_sup_txsync(&it, buf, len); break; case 4: - m_decimators.decimate16_sup(&it, buf, len); + m_decimators.decimate16_sup_txsync(&it, buf, len); break; case 5: - m_decimators.decimate32_sup(&it, buf, len); + m_decimators.decimate32_sup_txsync(&it, buf, len); break; case 6: - m_decimators.decimate64_sup(&it, buf, len); + m_decimators.decimate64_sup_txsync(&it, buf, len); break; default: break; diff --git a/plugins/samplesource/plutosdrinput/plutosdrinput.cpp b/plugins/samplesource/plutosdrinput/plutosdrinput.cpp index 4db3acc97..38fef2352 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinput.cpp +++ b/plugins/samplesource/plutosdrinput/plutosdrinput.cpp @@ -546,6 +546,7 @@ bool PlutoSDRInput::applySettings(const PlutoSDRInputSettings& settings, bool fo settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, settings.m_devSampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, settings.m_transverterMode); params.push_back(QString(tr("out_altvoltage0_RX_LO_frequency=%1").arg(deviceCenterFrequency)).toStdString()); diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp index dc1769d8e..233c46911 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp @@ -489,6 +489,7 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force) settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, settings.m_devSampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, settings.m_transverterMode); forwardChange = true; diff --git a/plugins/samplesource/sdrplay/sdrplayinput.cpp b/plugins/samplesource/sdrplay/sdrplayinput.cpp index 4c3880ab1..6eb12e439 100644 --- a/plugins/samplesource/sdrplay/sdrplayinput.cpp +++ b/plugins/samplesource/sdrplay/sdrplayinput.cpp @@ -555,7 +555,9 @@ bool SDRPlayInput::applySettings(const SDRPlaySettings& settings, bool forwardCh 0, settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - SDRPlaySampleRates::getRate(settings.m_devSampleRateIndex)); + SDRPlaySampleRates::getRate(settings.m_devSampleRateIndex), + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, + false); forwardChange = true; diff --git a/plugins/samplesource/soapysdrinput/soapysdrinput.cpp b/plugins/samplesource/soapysdrinput/soapysdrinput.cpp index 2f92ae214..c316c6911 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinput.cpp +++ b/plugins/samplesource/soapysdrinput/soapysdrinput.cpp @@ -1018,7 +1018,9 @@ bool SoapySDRInput::applySettings(const SoapySDRInputSettings& settings, bool fo 0, settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - settings.m_devSampleRate); + settings.m_devSampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, + false); forwardChangeOwnDSP = true; forwardChangeToBuddies = true; diff --git a/plugins/samplesource/testsource/testsourceinput.cpp b/plugins/samplesource/testsource/testsourceinput.cpp index dd1210bb7..12419cb55 100644 --- a/plugins/samplesource/testsource/testsourceinput.cpp +++ b/plugins/samplesource/testsource/testsourceinput.cpp @@ -295,7 +295,9 @@ bool TestSourceInput::applySettings(const TestSourceSettings& settings, bool for 0, // no transverter mode settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - settings.m_sampleRate); + settings.m_sampleRate, + DeviceSampleSource::FrequencyShiftScheme::FSHIFT_STD, + false); int frequencyShift = settings.m_frequencyShift; quint32 devSampleRate = settings.m_sampleRate; @@ -305,7 +307,8 @@ bool TestSourceInput::applySettings(const TestSourceSettings& settings, bool for frequencyShift += DeviceSampleSource::calculateFrequencyShift( settings.m_log2Decim, (DeviceSampleSource::fcPos_t) settings.m_fcPos, - settings.m_sampleRate); + settings.m_sampleRate, + DeviceSampleSource::FSHIFT_STD); } if (m_testSourceThread != 0) diff --git a/sdrbase/dsp/decimators.h b/sdrbase/dsp/decimators.h index 827959d24..0e4ae1263 100644 --- a/sdrbase/dsp/decimators.h +++ b/sdrbase/dsp/decimators.h @@ -400,23 +400,33 @@ public: void decimate2_cen(SampleVector::iterator* it, const T* buf, qint32 len); void decimate4_inf(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate4_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate4_sup(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate4_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate4_cen(SampleVector::iterator* it, const T* buf, qint32 len); void decimate8_inf(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate8_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate8_sup(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate8_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate8_cen(SampleVector::iterator* it, const T* buf, qint32 len); void decimate16_inf(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate16_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate16_sup(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate16_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate16_cen(SampleVector::iterator* it, const T* buf, qint32 len); void decimate32_inf(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate32_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate32_sup(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate32_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate32_cen(SampleVector::iterator* it, const T* buf, qint32 len); void decimate64_inf(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate64_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate64_sup(SampleVector::iterator* it, const T* buf, qint32 len); + void decimate64_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len); void decimate64_cen(SampleVector::iterator* it, const T* buf, qint32 len); // separate I and Q input buffers @@ -617,6 +627,56 @@ void Decimators::decimate4_inf(SampleVector: } } +template +void Decimators::decimate4_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[8], buf4[4]; + + for (int pos = 0; pos < len - 15; pos += 16) + { + m_decimator2.myDecimateInf( + buf[pos+0] << decimation_shifts::pre4, + buf[pos+1] << decimation_shifts::pre4, + buf[pos+2] << decimation_shifts::pre4, + buf[pos+3] << decimation_shifts::pre4, + buf[pos+4] << decimation_shifts::pre4, + buf[pos+5] << decimation_shifts::pre4, + buf[pos+6] << decimation_shifts::pre4, + buf[pos+7] << decimation_shifts::pre4, + &buf2[0]); + + m_decimator2.myDecimateInf( + buf[pos+8] << decimation_shifts::pre4, + buf[pos+9] << decimation_shifts::pre4, + buf[pos+10] << decimation_shifts::pre4, + buf[pos+11] << decimation_shifts::pre4, + buf[pos+12] << decimation_shifts::pre4, + buf[pos+13] << decimation_shifts::pre4, + buf[pos+14] << decimation_shifts::pre4, + buf[pos+15] << decimation_shifts::pre4, + &buf2[4]); + + m_decimator4.myDecimateInf( + buf2[0], + buf2[1], + buf2[2], + buf2[3], + buf2[4], + buf2[5], + buf2[6], + buf2[7], + &buf4[0]); + + (**it).setReal(buf4[0] >> decimation_shifts::post4); + (**it).setImag(buf4[1] >> decimation_shifts::post4); + ++(*it); + + (**it).setReal(buf4[2] >> decimation_shifts::post4); + (**it).setImag(buf4[3] >> decimation_shifts::post4); + ++(*it); + } +} + template void Decimators::decimate4_sup(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -667,6 +727,56 @@ void Decimators::decimate4_sup(SampleVector: } } +template +void Decimators::decimate4_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[8], buf4[4]; + + for (int pos = 0; pos < len - 15; pos += 16) + { + m_decimator2.myDecimateSup( + buf[pos+0] << decimation_shifts::pre4, + buf[pos+1] << decimation_shifts::pre4, + buf[pos+2] << decimation_shifts::pre4, + buf[pos+3] << decimation_shifts::pre4, + buf[pos+4] << decimation_shifts::pre4, + buf[pos+5] << decimation_shifts::pre4, + buf[pos+6] << decimation_shifts::pre4, + buf[pos+7] << decimation_shifts::pre4, + &buf2[0]); + + m_decimator2.myDecimateSup( + buf[pos+8] << decimation_shifts::pre4, + buf[pos+9] << decimation_shifts::pre4, + buf[pos+10] << decimation_shifts::pre4, + buf[pos+11] << decimation_shifts::pre4, + buf[pos+12] << decimation_shifts::pre4, + buf[pos+13] << decimation_shifts::pre4, + buf[pos+14] << decimation_shifts::pre4, + buf[pos+15] << decimation_shifts::pre4, + &buf2[4]); + + m_decimator4.myDecimateSup( + buf2[0], + buf2[1], + buf2[2], + buf2[3], + buf2[4], + buf2[5], + buf2[6], + buf2[7], + &buf4[0]); + + (**it).setReal(buf4[0] >> decimation_shifts::post4); + (**it).setImag(buf4[1] >> decimation_shifts::post4); + ++(*it); + + (**it).setReal(buf4[2] >> decimation_shifts::post4); + (**it).setImag(buf4[3] >> decimation_shifts::post4); + ++(*it); + } +} + template void Decimators::decimate4_cen(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -783,6 +893,79 @@ void Decimators::decimate8_inf(SampleVector: } } +template +void Decimators::decimate8_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[16], buf4[8], buf8[4]; + + for (int pos = 0; pos < len - 31; pos += 32) + { + m_decimator2.myDecimateInf( + buf[pos+0] << decimation_shifts::pre8, + buf[pos+1] << decimation_shifts::pre8, + buf[pos+2] << decimation_shifts::pre8, + buf[pos+3] << decimation_shifts::pre8, + buf[pos+4] << decimation_shifts::pre8, + buf[pos+5] << decimation_shifts::pre8, + buf[pos+6] << decimation_shifts::pre8, + buf[pos+7] << decimation_shifts::pre8, + &buf2[0]); + + m_decimator2.myDecimateInf( + buf[pos+8] << decimation_shifts::pre8, + buf[pos+9] << decimation_shifts::pre8, + buf[pos+10] << decimation_shifts::pre8, + buf[pos+11] << decimation_shifts::pre8, + buf[pos+12] << decimation_shifts::pre8, + buf[pos+13] << decimation_shifts::pre8, + buf[pos+14] << decimation_shifts::pre8, + buf[pos+15] << decimation_shifts::pre8, + &buf2[4]); + + m_decimator2.myDecimateInf( + buf[pos+16] << decimation_shifts::pre8, + buf[pos+17] << decimation_shifts::pre8, + buf[pos+18] << decimation_shifts::pre8, + buf[pos+19] << decimation_shifts::pre8, + buf[pos+20] << decimation_shifts::pre8, + buf[pos+21] << decimation_shifts::pre8, + buf[pos+22] << decimation_shifts::pre8, + buf[pos+23] << decimation_shifts::pre8, + &buf2[8]); + + m_decimator2.myDecimateInf( + buf[pos+24] << decimation_shifts::pre8, + buf[pos+25] << decimation_shifts::pre8, + buf[pos+26] << decimation_shifts::pre8, + buf[pos+27] << decimation_shifts::pre8, + buf[pos+28] << decimation_shifts::pre8, + buf[pos+29] << decimation_shifts::pre8, + buf[pos+30] << decimation_shifts::pre8, + buf[pos+31] << decimation_shifts::pre8, + &buf2[12]); + + m_decimator4.myDecimateInf( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateInf( + &buf2[8], + &buf4[4]); + + m_decimator8.myDecimateSup( + &buf4[0], + &buf8[0]); + + (**it).setReal(buf8[0] >> decimation_shifts::post8); + (**it).setImag(buf8[1] >> decimation_shifts::post8); + ++(*it); + + (**it).setReal(buf8[2] >> decimation_shifts::post8); + (**it).setImag(buf8[3] >> decimation_shifts::post8); + ++(*it); + } +} + template void Decimators::decimate8_sup(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -856,6 +1039,79 @@ void Decimators::decimate8_sup(SampleVector: } } +template +void Decimators::decimate8_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[16], buf4[8], buf8[4]; + + for (int pos = 0; pos < len - 31; pos += 32) + { + m_decimator2.myDecimateSup( + buf[pos+0] << decimation_shifts::pre8, + buf[pos+1] << decimation_shifts::pre8, + buf[pos+2] << decimation_shifts::pre8, + buf[pos+3] << decimation_shifts::pre8, + buf[pos+4] << decimation_shifts::pre8, + buf[pos+5] << decimation_shifts::pre8, + buf[pos+6] << decimation_shifts::pre8, + buf[pos+7] << decimation_shifts::pre8, + &buf2[0]); + + m_decimator2.myDecimateSup( + buf[pos+8] << decimation_shifts::pre8, + buf[pos+9] << decimation_shifts::pre8, + buf[pos+10] << decimation_shifts::pre8, + buf[pos+11] << decimation_shifts::pre8, + buf[pos+12] << decimation_shifts::pre8, + buf[pos+13] << decimation_shifts::pre8, + buf[pos+14] << decimation_shifts::pre8, + buf[pos+15] << decimation_shifts::pre8, + &buf2[4]); + + m_decimator2.myDecimateSup( + buf[pos+16] << decimation_shifts::pre8, + buf[pos+17] << decimation_shifts::pre8, + buf[pos+18] << decimation_shifts::pre8, + buf[pos+19] << decimation_shifts::pre8, + buf[pos+20] << decimation_shifts::pre8, + buf[pos+21] << decimation_shifts::pre8, + buf[pos+22] << decimation_shifts::pre8, + buf[pos+23] << decimation_shifts::pre8, + &buf2[8]); + + m_decimator2.myDecimateSup( + buf[pos+24] << decimation_shifts::pre8, + buf[pos+25] << decimation_shifts::pre8, + buf[pos+26] << decimation_shifts::pre8, + buf[pos+27] << decimation_shifts::pre8, + buf[pos+28] << decimation_shifts::pre8, + buf[pos+29] << decimation_shifts::pre8, + buf[pos+30] << decimation_shifts::pre8, + buf[pos+31] << decimation_shifts::pre8, + &buf2[12]); + + m_decimator4.myDecimateSup( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateSup( + &buf2[8], + &buf4[4]); + + m_decimator8.myDecimateInf( + &buf4[0], + &buf8[0]); + + (**it).setReal(buf8[0] >> decimation_shifts::post8); + (**it).setImag(buf8[1] >> decimation_shifts::post8); + ++(*it); + + (**it).setReal(buf8[2] >> decimation_shifts::post8); + (**it).setImag(buf8[3] >> decimation_shifts::post8); + ++(*it); + } +} + template void Decimators::decimate8_cen(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -1049,6 +1305,139 @@ void Decimators::decimate16_inf(SampleVector } } +template +void Decimators::decimate16_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[32], buf4[16], buf8[8], buf16[4]; + + for (int pos = 0; pos < len - 63; pos += 64) + { + m_decimator2.myDecimateInf( + buf[pos+0] << decimation_shifts::pre16, + buf[pos+1] << decimation_shifts::pre16, + buf[pos+2] << decimation_shifts::pre16, + buf[pos+3] << decimation_shifts::pre16, + buf[pos+4] << decimation_shifts::pre16, + buf[pos+5] << decimation_shifts::pre16, + buf[pos+6] << decimation_shifts::pre16, + buf[pos+7] << decimation_shifts::pre16, + &buf2[0]); + + m_decimator2.myDecimateInf( + buf[pos+8] << decimation_shifts::pre16, + buf[pos+9] << decimation_shifts::pre16, + buf[pos+10] << decimation_shifts::pre16, + buf[pos+11] << decimation_shifts::pre16, + buf[pos+12] << decimation_shifts::pre16, + buf[pos+13] << decimation_shifts::pre16, + buf[pos+14] << decimation_shifts::pre16, + buf[pos+15] << decimation_shifts::pre16, + &buf2[4]); + + m_decimator2.myDecimateInf( + buf[pos+16] << decimation_shifts::pre16, + buf[pos+17] << decimation_shifts::pre16, + buf[pos+18] << decimation_shifts::pre16, + buf[pos+19] << decimation_shifts::pre16, + buf[pos+20] << decimation_shifts::pre16, + buf[pos+21] << decimation_shifts::pre16, + buf[pos+22] << decimation_shifts::pre16, + buf[pos+23] << decimation_shifts::pre16, + &buf2[8]); + + m_decimator2.myDecimateInf( + buf[pos+24] << decimation_shifts::pre16, + buf[pos+25] << decimation_shifts::pre16, + buf[pos+26] << decimation_shifts::pre16, + buf[pos+27] << decimation_shifts::pre16, + buf[pos+28] << decimation_shifts::pre16, + buf[pos+29] << decimation_shifts::pre16, + buf[pos+30] << decimation_shifts::pre16, + buf[pos+31] << decimation_shifts::pre16, + &buf2[12]); + + m_decimator2.myDecimateInf( + buf[pos+32] << decimation_shifts::pre16, + buf[pos+33] << decimation_shifts::pre16, + buf[pos+34] << decimation_shifts::pre16, + buf[pos+35] << decimation_shifts::pre16, + buf[pos+36] << decimation_shifts::pre16, + buf[pos+37] << decimation_shifts::pre16, + buf[pos+38] << decimation_shifts::pre16, + buf[pos+39] << decimation_shifts::pre16, + &buf2[16]); + + m_decimator2.myDecimateInf( + buf[pos+40] << decimation_shifts::pre16, + buf[pos+41] << decimation_shifts::pre16, + buf[pos+42] << decimation_shifts::pre16, + buf[pos+43] << decimation_shifts::pre16, + buf[pos+44] << decimation_shifts::pre16, + buf[pos+45] << decimation_shifts::pre16, + buf[pos+46] << decimation_shifts::pre16, + buf[pos+47] << decimation_shifts::pre16, + &buf2[20]); + + m_decimator2.myDecimateInf( + buf[pos+48] << decimation_shifts::pre16, + buf[pos+49] << decimation_shifts::pre16, + buf[pos+50] << decimation_shifts::pre16, + buf[pos+51] << decimation_shifts::pre16, + buf[pos+52] << decimation_shifts::pre16, + buf[pos+53] << decimation_shifts::pre16, + buf[pos+54] << decimation_shifts::pre16, + buf[pos+55] << decimation_shifts::pre16, + &buf2[24]); + + m_decimator2.myDecimateInf( + buf[pos+56] << decimation_shifts::pre16, + buf[pos+57] << decimation_shifts::pre16, + buf[pos+58] << decimation_shifts::pre16, + buf[pos+59] << decimation_shifts::pre16, + buf[pos+60] << decimation_shifts::pre16, + buf[pos+61] << decimation_shifts::pre16, + buf[pos+62] << decimation_shifts::pre16, + buf[pos+63] << decimation_shifts::pre16, + &buf2[28]); + + m_decimator4.myDecimateInf( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateInf( + &buf2[8], + &buf4[4]); + + m_decimator4.myDecimateInf( + &buf2[16], + &buf4[8]); + + m_decimator4.myDecimateInf( + &buf2[24], + &buf4[12]); + + m_decimator8.myDecimateSup( + &buf4[0], + &buf8[0]); + + m_decimator8.myDecimateSup( + &buf4[8], + &buf8[4]); + + m_decimator16.myDecimateInf( + &buf8[0], + &buf16[0]); + + (**it).setReal(buf16[0] >> decimation_shifts::post16); + (**it).setImag(buf16[1] >> decimation_shifts::post16); + ++(*it); + + (**it).setReal(buf16[2] >> decimation_shifts::post16); + (**it).setImag(buf16[3] >> decimation_shifts::post16); + ++(*it); + } +} + template void Decimators::decimate16_sup(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -1182,6 +1571,139 @@ void Decimators::decimate16_sup(SampleVector } } +template +void Decimators::decimate16_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[32], buf4[16], buf8[8], buf16[4]; + + for (int pos = 0; pos < len - 63; pos += 64) + { + m_decimator2.myDecimateSup( + buf[pos+0] << decimation_shifts::pre16, + buf[pos+1] << decimation_shifts::pre16, + buf[pos+2] << decimation_shifts::pre16, + buf[pos+3] << decimation_shifts::pre16, + buf[pos+4] << decimation_shifts::pre16, + buf[pos+5] << decimation_shifts::pre16, + buf[pos+6] << decimation_shifts::pre16, + buf[pos+7] << decimation_shifts::pre16, + &buf2[0]); + + m_decimator2.myDecimateSup( + buf[pos+8] << decimation_shifts::pre16, + buf[pos+9] << decimation_shifts::pre16, + buf[pos+10] << decimation_shifts::pre16, + buf[pos+11] << decimation_shifts::pre16, + buf[pos+12] << decimation_shifts::pre16, + buf[pos+13] << decimation_shifts::pre16, + buf[pos+14] << decimation_shifts::pre16, + buf[pos+15] << decimation_shifts::pre16, + &buf2[4]); + + m_decimator2.myDecimateSup( + buf[pos+16] << decimation_shifts::pre16, + buf[pos+17] << decimation_shifts::pre16, + buf[pos+18] << decimation_shifts::pre16, + buf[pos+19] << decimation_shifts::pre16, + buf[pos+20] << decimation_shifts::pre16, + buf[pos+21] << decimation_shifts::pre16, + buf[pos+22] << decimation_shifts::pre16, + buf[pos+23] << decimation_shifts::pre16, + &buf2[8]); + + m_decimator2.myDecimateSup( + buf[pos+24] << decimation_shifts::pre16, + buf[pos+25] << decimation_shifts::pre16, + buf[pos+26] << decimation_shifts::pre16, + buf[pos+27] << decimation_shifts::pre16, + buf[pos+28] << decimation_shifts::pre16, + buf[pos+29] << decimation_shifts::pre16, + buf[pos+30] << decimation_shifts::pre16, + buf[pos+31] << decimation_shifts::pre16, + &buf2[12]); + + m_decimator2.myDecimateSup( + buf[pos+32] << decimation_shifts::pre16, + buf[pos+33] << decimation_shifts::pre16, + buf[pos+34] << decimation_shifts::pre16, + buf[pos+35] << decimation_shifts::pre16, + buf[pos+36] << decimation_shifts::pre16, + buf[pos+37] << decimation_shifts::pre16, + buf[pos+38] << decimation_shifts::pre16, + buf[pos+39] << decimation_shifts::pre16, + &buf2[16]); + + m_decimator2.myDecimateSup( + buf[pos+40] << decimation_shifts::pre16, + buf[pos+41] << decimation_shifts::pre16, + buf[pos+42] << decimation_shifts::pre16, + buf[pos+43] << decimation_shifts::pre16, + buf[pos+44] << decimation_shifts::pre16, + buf[pos+45] << decimation_shifts::pre16, + buf[pos+46] << decimation_shifts::pre16, + buf[pos+47] << decimation_shifts::pre16, + &buf2[20]); + + m_decimator2.myDecimateSup( + buf[pos+48] << decimation_shifts::pre16, + buf[pos+49] << decimation_shifts::pre16, + buf[pos+50] << decimation_shifts::pre16, + buf[pos+51] << decimation_shifts::pre16, + buf[pos+52] << decimation_shifts::pre16, + buf[pos+53] << decimation_shifts::pre16, + buf[pos+54] << decimation_shifts::pre16, + buf[pos+55] << decimation_shifts::pre16, + &buf2[24]); + + m_decimator2.myDecimateSup( + buf[pos+56] << decimation_shifts::pre16, + buf[pos+57] << decimation_shifts::pre16, + buf[pos+58] << decimation_shifts::pre16, + buf[pos+59] << decimation_shifts::pre16, + buf[pos+60] << decimation_shifts::pre16, + buf[pos+61] << decimation_shifts::pre16, + buf[pos+62] << decimation_shifts::pre16, + buf[pos+63] << decimation_shifts::pre16, + &buf2[28]); + + m_decimator4.myDecimateSup( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateSup( + &buf2[8], + &buf4[4]); + + m_decimator4.myDecimateSup( + &buf2[16], + &buf4[8]); + + m_decimator4.myDecimateSup( + &buf2[24], + &buf4[12]); + + m_decimator8.myDecimateInf( + &buf4[0], + &buf8[0]); + + m_decimator8.myDecimateInf( + &buf4[8], + &buf8[4]); + + m_decimator16.myDecimateSup( + &buf8[0], + &buf16[0]); + + (**it).setReal(buf16[0] >> decimation_shifts::post16); + (**it).setImag(buf16[1] >> decimation_shifts::post16); + ++(*it); + + (**it).setReal(buf16[2] >> decimation_shifts::post16); + (**it).setImag(buf16[3] >> decimation_shifts::post16); + ++(*it); + } +} + template void Decimators::decimate16_cen(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -1544,6 +2066,259 @@ void Decimators::decimate32_inf(SampleVector } } +template +void Decimators::decimate32_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[64], buf4[32], buf8[16], buf16[8], buf32[4]; + + for (int pos = 0; pos < len - 127; pos += 128) + { + m_decimator2.myDecimateInf( + buf[pos+0] << decimation_shifts::pre32, + buf[pos+1] << decimation_shifts::pre32, + buf[pos+2] << decimation_shifts::pre32, + buf[pos+3] << decimation_shifts::pre32, + buf[pos+4] << decimation_shifts::pre32, + buf[pos+5] << decimation_shifts::pre32, + buf[pos+6] << decimation_shifts::pre32, + buf[pos+7] << decimation_shifts::pre32, + &buf2[0]); + + m_decimator2.myDecimateInf( + buf[pos+8] << decimation_shifts::pre32, + buf[pos+9] << decimation_shifts::pre32, + buf[pos+10] << decimation_shifts::pre32, + buf[pos+11] << decimation_shifts::pre32, + buf[pos+12] << decimation_shifts::pre32, + buf[pos+13] << decimation_shifts::pre32, + buf[pos+14] << decimation_shifts::pre32, + buf[pos+15] << decimation_shifts::pre32, + &buf2[4]); + + m_decimator2.myDecimateInf( + buf[pos+16] << decimation_shifts::pre32, + buf[pos+17] << decimation_shifts::pre32, + buf[pos+18] << decimation_shifts::pre32, + buf[pos+19] << decimation_shifts::pre32, + buf[pos+20] << decimation_shifts::pre32, + buf[pos+21] << decimation_shifts::pre32, + buf[pos+22] << decimation_shifts::pre32, + buf[pos+23] << decimation_shifts::pre32, + &buf2[8]); + + m_decimator2.myDecimateInf( + buf[pos+24] << decimation_shifts::pre32, + buf[pos+25] << decimation_shifts::pre32, + buf[pos+26] << decimation_shifts::pre32, + buf[pos+27] << decimation_shifts::pre32, + buf[pos+28] << decimation_shifts::pre32, + buf[pos+29] << decimation_shifts::pre32, + buf[pos+30] << decimation_shifts::pre32, + buf[pos+31] << decimation_shifts::pre32, + &buf2[12]); + + m_decimator2.myDecimateInf( + buf[pos+32] << decimation_shifts::pre32, + buf[pos+33] << decimation_shifts::pre32, + buf[pos+34] << decimation_shifts::pre32, + buf[pos+35] << decimation_shifts::pre32, + buf[pos+36] << decimation_shifts::pre32, + buf[pos+37] << decimation_shifts::pre32, + buf[pos+38] << decimation_shifts::pre32, + buf[pos+39] << decimation_shifts::pre32, + &buf2[16]); + + m_decimator2.myDecimateInf( + buf[pos+40] << decimation_shifts::pre32, + buf[pos+41] << decimation_shifts::pre32, + buf[pos+42] << decimation_shifts::pre32, + buf[pos+43] << decimation_shifts::pre32, + buf[pos+44] << decimation_shifts::pre32, + buf[pos+45] << decimation_shifts::pre32, + buf[pos+46] << decimation_shifts::pre32, + buf[pos+47] << decimation_shifts::pre32, + &buf2[20]); + + m_decimator2.myDecimateInf( + buf[pos+48] << decimation_shifts::pre32, + buf[pos+49] << decimation_shifts::pre32, + buf[pos+50] << decimation_shifts::pre32, + buf[pos+51] << decimation_shifts::pre32, + buf[pos+52] << decimation_shifts::pre32, + buf[pos+53] << decimation_shifts::pre32, + buf[pos+54] << decimation_shifts::pre32, + buf[pos+55] << decimation_shifts::pre32, + &buf2[24]); + + m_decimator2.myDecimateInf( + buf[pos+56] << decimation_shifts::pre32, + buf[pos+57] << decimation_shifts::pre32, + buf[pos+58] << decimation_shifts::pre32, + buf[pos+59] << decimation_shifts::pre32, + buf[pos+60] << decimation_shifts::pre32, + buf[pos+61] << decimation_shifts::pre32, + buf[pos+62] << decimation_shifts::pre32, + buf[pos+63] << decimation_shifts::pre32, + &buf2[28]); + + m_decimator2.myDecimateInf( + buf[pos+64] << decimation_shifts::pre32, + buf[pos+65] << decimation_shifts::pre32, + buf[pos+66] << decimation_shifts::pre32, + buf[pos+67] << decimation_shifts::pre32, + buf[pos+68] << decimation_shifts::pre32, + buf[pos+69] << decimation_shifts::pre32, + buf[pos+70] << decimation_shifts::pre32, + buf[pos+71] << decimation_shifts::pre32, + &buf2[32]); + + m_decimator2.myDecimateInf( + buf[pos+72] << decimation_shifts::pre32, + buf[pos+73] << decimation_shifts::pre32, + buf[pos+74] << decimation_shifts::pre32, + buf[pos+75] << decimation_shifts::pre32, + buf[pos+76] << decimation_shifts::pre32, + buf[pos+77] << decimation_shifts::pre32, + buf[pos+78] << decimation_shifts::pre32, + buf[pos+79] << decimation_shifts::pre32, + &buf2[36]); + + m_decimator2.myDecimateInf( + buf[pos+80] << decimation_shifts::pre32, + buf[pos+81] << decimation_shifts::pre32, + buf[pos+82] << decimation_shifts::pre32, + buf[pos+83] << decimation_shifts::pre32, + buf[pos+84] << decimation_shifts::pre32, + buf[pos+85] << decimation_shifts::pre32, + buf[pos+86] << decimation_shifts::pre32, + buf[pos+87] << decimation_shifts::pre32, + &buf2[40]); + + m_decimator2.myDecimateInf( + buf[pos+88] << decimation_shifts::pre32, + buf[pos+89] << decimation_shifts::pre32, + buf[pos+90] << decimation_shifts::pre32, + buf[pos+91] << decimation_shifts::pre32, + buf[pos+92] << decimation_shifts::pre32, + buf[pos+93] << decimation_shifts::pre32, + buf[pos+94] << decimation_shifts::pre32, + buf[pos+95] << decimation_shifts::pre32, + &buf2[44]); + + m_decimator2.myDecimateInf( + buf[pos+96] << decimation_shifts::pre32, + buf[pos+97] << decimation_shifts::pre32, + buf[pos+98] << decimation_shifts::pre32, + buf[pos+99] << decimation_shifts::pre32, + buf[pos+100] << decimation_shifts::pre32, + buf[pos+101] << decimation_shifts::pre32, + buf[pos+102] << decimation_shifts::pre32, + buf[pos+103] << decimation_shifts::pre32, + &buf2[48]); + + m_decimator2.myDecimateInf( + buf[pos+104] << decimation_shifts::pre32, + buf[pos+105] << decimation_shifts::pre32, + buf[pos+106] << decimation_shifts::pre32, + buf[pos+107] << decimation_shifts::pre32, + buf[pos+108] << decimation_shifts::pre32, + buf[pos+109] << decimation_shifts::pre32, + buf[pos+110] << decimation_shifts::pre32, + buf[pos+111] << decimation_shifts::pre32, + &buf2[52]); + + m_decimator2.myDecimateInf( + buf[pos+112] << decimation_shifts::pre32, + buf[pos+113] << decimation_shifts::pre32, + buf[pos+114] << decimation_shifts::pre32, + buf[pos+115] << decimation_shifts::pre32, + buf[pos+116] << decimation_shifts::pre32, + buf[pos+117] << decimation_shifts::pre32, + buf[pos+118] << decimation_shifts::pre32, + buf[pos+119] << decimation_shifts::pre32, + &buf2[56]); + + m_decimator2.myDecimateInf( + buf[pos+120] << decimation_shifts::pre32, + buf[pos+121] << decimation_shifts::pre32, + buf[pos+122] << decimation_shifts::pre32, + buf[pos+123] << decimation_shifts::pre32, + buf[pos+124] << decimation_shifts::pre32, + buf[pos+125] << decimation_shifts::pre32, + buf[pos+126] << decimation_shifts::pre32, + buf[pos+127] << decimation_shifts::pre32, + &buf2[60]); + + m_decimator4.myDecimateInf( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateInf( + &buf2[8], + &buf4[4]); + + m_decimator4.myDecimateInf( + &buf2[16], + &buf4[8]); + + m_decimator4.myDecimateInf( + &buf2[24], + &buf4[12]); + + m_decimator4.myDecimateInf( + &buf2[32], + &buf4[16]); + + m_decimator4.myDecimateInf( + &buf2[40], + &buf4[20]); + + m_decimator4.myDecimateInf( + &buf2[48], + &buf4[24]); + + m_decimator4.myDecimateInf( + &buf2[56], + &buf4[28]); + + m_decimator8.myDecimateSup( + &buf4[0], + &buf8[0]); + + m_decimator8.myDecimateSup( + &buf4[8], + &buf8[4]); + + m_decimator8.myDecimateSup( + &buf4[16], + &buf8[8]); + + m_decimator8.myDecimateSup( + &buf4[24], + &buf8[12]); + + m_decimator16.myDecimateInf( + &buf8[0], + &buf16[0]); + + m_decimator16.myDecimateInf( + &buf8[8], + &buf16[4]); + + m_decimator32.myDecimateSup( + &buf16[0], + &buf32[0]); + + (**it).setReal(buf32[0] >> decimation_shifts::post32); + (**it).setImag(buf32[1] >> decimation_shifts::post32); + ++(*it); + + (**it).setReal(buf32[2] >> decimation_shifts::post32); + (**it).setImag(buf32[3] >> decimation_shifts::post32); + ++(*it); + } +} + template void Decimators::decimate32_sup(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -1797,6 +2572,259 @@ void Decimators::decimate32_sup(SampleVector } } +template +void Decimators::decimate32_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[64], buf4[32], buf8[16], buf16[8], buf32[4]; + + for (int pos = 0; pos < len - 127; pos += 128) + { + m_decimator2.myDecimateSup( + buf[pos+0] << decimation_shifts::pre32, + buf[pos+1] << decimation_shifts::pre32, + buf[pos+2] << decimation_shifts::pre32, + buf[pos+3] << decimation_shifts::pre32, + buf[pos+4] << decimation_shifts::pre32, + buf[pos+5] << decimation_shifts::pre32, + buf[pos+6] << decimation_shifts::pre32, + buf[pos+7] << decimation_shifts::pre32, + &buf2[0]); + + m_decimator2.myDecimateSup( + buf[pos+8] << decimation_shifts::pre32, + buf[pos+9] << decimation_shifts::pre32, + buf[pos+10] << decimation_shifts::pre32, + buf[pos+11] << decimation_shifts::pre32, + buf[pos+12] << decimation_shifts::pre32, + buf[pos+13] << decimation_shifts::pre32, + buf[pos+14] << decimation_shifts::pre32, + buf[pos+15] << decimation_shifts::pre32, + &buf2[4]); + + m_decimator2.myDecimateSup( + buf[pos+16] << decimation_shifts::pre32, + buf[pos+17] << decimation_shifts::pre32, + buf[pos+18] << decimation_shifts::pre32, + buf[pos+19] << decimation_shifts::pre32, + buf[pos+20] << decimation_shifts::pre32, + buf[pos+21] << decimation_shifts::pre32, + buf[pos+22] << decimation_shifts::pre32, + buf[pos+23] << decimation_shifts::pre32, + &buf2[8]); + + m_decimator2.myDecimateSup( + buf[pos+24] << decimation_shifts::pre32, + buf[pos+25] << decimation_shifts::pre32, + buf[pos+26] << decimation_shifts::pre32, + buf[pos+27] << decimation_shifts::pre32, + buf[pos+28] << decimation_shifts::pre32, + buf[pos+29] << decimation_shifts::pre32, + buf[pos+30] << decimation_shifts::pre32, + buf[pos+31] << decimation_shifts::pre32, + &buf2[12]); + + m_decimator2.myDecimateSup( + buf[pos+32] << decimation_shifts::pre32, + buf[pos+33] << decimation_shifts::pre32, + buf[pos+34] << decimation_shifts::pre32, + buf[pos+35] << decimation_shifts::pre32, + buf[pos+36] << decimation_shifts::pre32, + buf[pos+37] << decimation_shifts::pre32, + buf[pos+38] << decimation_shifts::pre32, + buf[pos+39] << decimation_shifts::pre32, + &buf2[16]); + + m_decimator2.myDecimateSup( + buf[pos+40] << decimation_shifts::pre32, + buf[pos+41] << decimation_shifts::pre32, + buf[pos+42] << decimation_shifts::pre32, + buf[pos+43] << decimation_shifts::pre32, + buf[pos+44] << decimation_shifts::pre32, + buf[pos+45] << decimation_shifts::pre32, + buf[pos+46] << decimation_shifts::pre32, + buf[pos+47] << decimation_shifts::pre32, + &buf2[20]); + + m_decimator2.myDecimateSup( + buf[pos+48] << decimation_shifts::pre32, + buf[pos+49] << decimation_shifts::pre32, + buf[pos+50] << decimation_shifts::pre32, + buf[pos+51] << decimation_shifts::pre32, + buf[pos+52] << decimation_shifts::pre32, + buf[pos+53] << decimation_shifts::pre32, + buf[pos+54] << decimation_shifts::pre32, + buf[pos+55] << decimation_shifts::pre32, + &buf2[24]); + + m_decimator2.myDecimateSup( + buf[pos+56] << decimation_shifts::pre32, + buf[pos+57] << decimation_shifts::pre32, + buf[pos+58] << decimation_shifts::pre32, + buf[pos+59] << decimation_shifts::pre32, + buf[pos+60] << decimation_shifts::pre32, + buf[pos+61] << decimation_shifts::pre32, + buf[pos+62] << decimation_shifts::pre32, + buf[pos+63] << decimation_shifts::pre32, + &buf2[28]); + + m_decimator2.myDecimateSup( + buf[pos+64] << decimation_shifts::pre32, + buf[pos+65] << decimation_shifts::pre32, + buf[pos+66] << decimation_shifts::pre32, + buf[pos+67] << decimation_shifts::pre32, + buf[pos+68] << decimation_shifts::pre32, + buf[pos+69] << decimation_shifts::pre32, + buf[pos+70] << decimation_shifts::pre32, + buf[pos+71] << decimation_shifts::pre32, + &buf2[32]); + + m_decimator2.myDecimateSup( + buf[pos+72] << decimation_shifts::pre32, + buf[pos+73] << decimation_shifts::pre32, + buf[pos+74] << decimation_shifts::pre32, + buf[pos+75] << decimation_shifts::pre32, + buf[pos+76] << decimation_shifts::pre32, + buf[pos+77] << decimation_shifts::pre32, + buf[pos+78] << decimation_shifts::pre32, + buf[pos+79] << decimation_shifts::pre32, + &buf2[36]); + + m_decimator2.myDecimateSup( + buf[pos+80] << decimation_shifts::pre32, + buf[pos+81] << decimation_shifts::pre32, + buf[pos+82] << decimation_shifts::pre32, + buf[pos+83] << decimation_shifts::pre32, + buf[pos+84] << decimation_shifts::pre32, + buf[pos+85] << decimation_shifts::pre32, + buf[pos+86] << decimation_shifts::pre32, + buf[pos+87] << decimation_shifts::pre32, + &buf2[40]); + + m_decimator2.myDecimateSup( + buf[pos+88] << decimation_shifts::pre32, + buf[pos+89] << decimation_shifts::pre32, + buf[pos+90] << decimation_shifts::pre32, + buf[pos+91] << decimation_shifts::pre32, + buf[pos+92] << decimation_shifts::pre32, + buf[pos+93] << decimation_shifts::pre32, + buf[pos+94] << decimation_shifts::pre32, + buf[pos+95] << decimation_shifts::pre32, + &buf2[44]); + + m_decimator2.myDecimateSup( + buf[pos+96] << decimation_shifts::pre32, + buf[pos+97] << decimation_shifts::pre32, + buf[pos+98] << decimation_shifts::pre32, + buf[pos+99] << decimation_shifts::pre32, + buf[pos+100] << decimation_shifts::pre32, + buf[pos+101] << decimation_shifts::pre32, + buf[pos+102] << decimation_shifts::pre32, + buf[pos+103] << decimation_shifts::pre32, + &buf2[48]); + + m_decimator2.myDecimateSup( + buf[pos+104] << decimation_shifts::pre32, + buf[pos+105] << decimation_shifts::pre32, + buf[pos+106] << decimation_shifts::pre32, + buf[pos+107] << decimation_shifts::pre32, + buf[pos+108] << decimation_shifts::pre32, + buf[pos+109] << decimation_shifts::pre32, + buf[pos+110] << decimation_shifts::pre32, + buf[pos+111] << decimation_shifts::pre32, + &buf2[52]); + + m_decimator2.myDecimateSup( + buf[pos+112] << decimation_shifts::pre32, + buf[pos+113] << decimation_shifts::pre32, + buf[pos+114] << decimation_shifts::pre32, + buf[pos+115] << decimation_shifts::pre32, + buf[pos+116] << decimation_shifts::pre32, + buf[pos+117] << decimation_shifts::pre32, + buf[pos+118] << decimation_shifts::pre32, + buf[pos+119] << decimation_shifts::pre32, + &buf2[56]); + + m_decimator2.myDecimateSup( + buf[pos+120] << decimation_shifts::pre32, + buf[pos+121] << decimation_shifts::pre32, + buf[pos+122] << decimation_shifts::pre32, + buf[pos+123] << decimation_shifts::pre32, + buf[pos+124] << decimation_shifts::pre32, + buf[pos+125] << decimation_shifts::pre32, + buf[pos+126] << decimation_shifts::pre32, + buf[pos+127] << decimation_shifts::pre32, + &buf2[60]); + + m_decimator4.myDecimateSup( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateSup( + &buf2[8], + &buf4[4]); + + m_decimator4.myDecimateSup( + &buf2[16], + &buf4[8]); + + m_decimator4.myDecimateSup( + &buf2[24], + &buf4[12]); + + m_decimator4.myDecimateSup( + &buf2[32], + &buf4[16]); + + m_decimator4.myDecimateSup( + &buf2[40], + &buf4[20]); + + m_decimator4.myDecimateSup( + &buf2[48], + &buf4[24]); + + m_decimator4.myDecimateSup( + &buf2[56], + &buf4[28]); + + m_decimator8.myDecimateInf( + &buf4[0], + &buf8[0]); + + m_decimator8.myDecimateInf( + &buf4[8], + &buf8[4]); + + m_decimator8.myDecimateInf( + &buf4[16], + &buf8[8]); + + m_decimator8.myDecimateInf( + &buf4[24], + &buf8[12]); + + m_decimator16.myDecimateSup( + &buf8[0], + &buf16[0]); + + m_decimator16.myDecimateSup( + &buf8[8], + &buf16[4]); + + m_decimator32.myDecimateInf( + &buf16[0], + &buf32[0]); + + (**it).setReal(buf32[0] >> decimation_shifts::post32); + (**it).setImag(buf32[1] >> decimation_shifts::post32); + ++(*it); + + (**it).setReal(buf32[2] >> decimation_shifts::post32); + (**it).setImag(buf32[3] >> decimation_shifts::post32); + ++(*it); + } +} + template void Decimators::decimate32_cen(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -2496,6 +3524,499 @@ void Decimators::decimate64_inf(SampleVector } } +template +void Decimators::decimate64_inf_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[128], buf4[64], buf8[32], buf16[16], buf32[8], buf64[4]; + + for (int pos = 0; pos < len - 255; pos += 256) + { + m_decimator2.myDecimateInf( + buf[pos+0] << decimation_shifts::pre64, + buf[pos+1] << decimation_shifts::pre64, + buf[pos+2] << decimation_shifts::pre64, + buf[pos+3] << decimation_shifts::pre64, + buf[pos+4] << decimation_shifts::pre64, + buf[pos+5] << decimation_shifts::pre64, + buf[pos+6] << decimation_shifts::pre64, + buf[pos+7] << decimation_shifts::pre64, + &buf2[0]); + + m_decimator2.myDecimateInf( + buf[pos+8] << decimation_shifts::pre64, + buf[pos+9] << decimation_shifts::pre64, + buf[pos+10] << decimation_shifts::pre64, + buf[pos+11] << decimation_shifts::pre64, + buf[pos+12] << decimation_shifts::pre64, + buf[pos+13] << decimation_shifts::pre64, + buf[pos+14] << decimation_shifts::pre64, + buf[pos+15] << decimation_shifts::pre64, + &buf2[4]); + + m_decimator2.myDecimateInf( + buf[pos+16] << decimation_shifts::pre64, + buf[pos+17] << decimation_shifts::pre64, + buf[pos+18] << decimation_shifts::pre64, + buf[pos+19] << decimation_shifts::pre64, + buf[pos+20] << decimation_shifts::pre64, + buf[pos+21] << decimation_shifts::pre64, + buf[pos+22] << decimation_shifts::pre64, + buf[pos+23] << decimation_shifts::pre64, + &buf2[8]); + + m_decimator2.myDecimateInf( + buf[pos+24] << decimation_shifts::pre64, + buf[pos+25] << decimation_shifts::pre64, + buf[pos+26] << decimation_shifts::pre64, + buf[pos+27] << decimation_shifts::pre64, + buf[pos+28] << decimation_shifts::pre64, + buf[pos+29] << decimation_shifts::pre64, + buf[pos+30] << decimation_shifts::pre64, + buf[pos+31] << decimation_shifts::pre64, + &buf2[12]); + + m_decimator2.myDecimateInf( + buf[pos+32] << decimation_shifts::pre64, + buf[pos+33] << decimation_shifts::pre64, + buf[pos+34] << decimation_shifts::pre64, + buf[pos+35] << decimation_shifts::pre64, + buf[pos+36] << decimation_shifts::pre64, + buf[pos+37] << decimation_shifts::pre64, + buf[pos+38] << decimation_shifts::pre64, + buf[pos+39] << decimation_shifts::pre64, + &buf2[16]); + + m_decimator2.myDecimateInf( + buf[pos+40] << decimation_shifts::pre64, + buf[pos+41] << decimation_shifts::pre64, + buf[pos+42] << decimation_shifts::pre64, + buf[pos+43] << decimation_shifts::pre64, + buf[pos+44] << decimation_shifts::pre64, + buf[pos+45] << decimation_shifts::pre64, + buf[pos+46] << decimation_shifts::pre64, + buf[pos+47] << decimation_shifts::pre64, + &buf2[20]); + + m_decimator2.myDecimateInf( + buf[pos+48] << decimation_shifts::pre64, + buf[pos+49] << decimation_shifts::pre64, + buf[pos+50] << decimation_shifts::pre64, + buf[pos+51] << decimation_shifts::pre64, + buf[pos+52] << decimation_shifts::pre64, + buf[pos+53] << decimation_shifts::pre64, + buf[pos+54] << decimation_shifts::pre64, + buf[pos+55] << decimation_shifts::pre64, + &buf2[24]); + + m_decimator2.myDecimateInf( + buf[pos+56] << decimation_shifts::pre64, + buf[pos+57] << decimation_shifts::pre64, + buf[pos+58] << decimation_shifts::pre64, + buf[pos+59] << decimation_shifts::pre64, + buf[pos+60] << decimation_shifts::pre64, + buf[pos+61] << decimation_shifts::pre64, + buf[pos+62] << decimation_shifts::pre64, + buf[pos+63] << decimation_shifts::pre64, + &buf2[28]); + + m_decimator2.myDecimateInf( + buf[pos+64] << decimation_shifts::pre64, + buf[pos+65] << decimation_shifts::pre64, + buf[pos+66] << decimation_shifts::pre64, + buf[pos+67] << decimation_shifts::pre64, + buf[pos+68] << decimation_shifts::pre64, + buf[pos+69] << decimation_shifts::pre64, + buf[pos+70] << decimation_shifts::pre64, + buf[pos+71] << decimation_shifts::pre64, + &buf2[32]); + + m_decimator2.myDecimateInf( + buf[pos+72] << decimation_shifts::pre64, + buf[pos+73] << decimation_shifts::pre64, + buf[pos+74] << decimation_shifts::pre64, + buf[pos+75] << decimation_shifts::pre64, + buf[pos+76] << decimation_shifts::pre64, + buf[pos+77] << decimation_shifts::pre64, + buf[pos+78] << decimation_shifts::pre64, + buf[pos+79] << decimation_shifts::pre64, + &buf2[36]); + + m_decimator2.myDecimateInf( + buf[pos+80] << decimation_shifts::pre64, + buf[pos+81] << decimation_shifts::pre64, + buf[pos+82] << decimation_shifts::pre64, + buf[pos+83] << decimation_shifts::pre64, + buf[pos+84] << decimation_shifts::pre64, + buf[pos+85] << decimation_shifts::pre64, + buf[pos+86] << decimation_shifts::pre64, + buf[pos+87] << decimation_shifts::pre64, + &buf2[40]); + + m_decimator2.myDecimateInf( + buf[pos+88] << decimation_shifts::pre64, + buf[pos+89] << decimation_shifts::pre64, + buf[pos+90] << decimation_shifts::pre64, + buf[pos+91] << decimation_shifts::pre64, + buf[pos+92] << decimation_shifts::pre64, + buf[pos+93] << decimation_shifts::pre64, + buf[pos+94] << decimation_shifts::pre64, + buf[pos+95] << decimation_shifts::pre64, + &buf2[44]); + + m_decimator2.myDecimateInf( + buf[pos+96] << decimation_shifts::pre64, + buf[pos+97] << decimation_shifts::pre64, + buf[pos+98] << decimation_shifts::pre64, + buf[pos+99] << decimation_shifts::pre64, + buf[pos+100] << decimation_shifts::pre64, + buf[pos+101] << decimation_shifts::pre64, + buf[pos+102] << decimation_shifts::pre64, + buf[pos+103] << decimation_shifts::pre64, + &buf2[48]); + + m_decimator2.myDecimateInf( + buf[pos+104] << decimation_shifts::pre64, + buf[pos+105] << decimation_shifts::pre64, + buf[pos+106] << decimation_shifts::pre64, + buf[pos+107] << decimation_shifts::pre64, + buf[pos+108] << decimation_shifts::pre64, + buf[pos+109] << decimation_shifts::pre64, + buf[pos+110] << decimation_shifts::pre64, + buf[pos+111] << decimation_shifts::pre64, + &buf2[52]); + + m_decimator2.myDecimateInf( + buf[pos+112] << decimation_shifts::pre64, + buf[pos+113] << decimation_shifts::pre64, + buf[pos+114] << decimation_shifts::pre64, + buf[pos+115] << decimation_shifts::pre64, + buf[pos+116] << decimation_shifts::pre64, + buf[pos+117] << decimation_shifts::pre64, + buf[pos+118] << decimation_shifts::pre64, + buf[pos+119] << decimation_shifts::pre64, + &buf2[56]); + + m_decimator2.myDecimateInf( + buf[pos+120] << decimation_shifts::pre64, + buf[pos+121] << decimation_shifts::pre64, + buf[pos+122] << decimation_shifts::pre64, + buf[pos+123] << decimation_shifts::pre64, + buf[pos+124] << decimation_shifts::pre64, + buf[pos+125] << decimation_shifts::pre64, + buf[pos+126] << decimation_shifts::pre64, + buf[pos+127] << decimation_shifts::pre64, + &buf2[60]); + + m_decimator2.myDecimateInf( + buf[pos+128] << decimation_shifts::pre64, + buf[pos+129] << decimation_shifts::pre64, + buf[pos+130] << decimation_shifts::pre64, + buf[pos+131] << decimation_shifts::pre64, + buf[pos+132] << decimation_shifts::pre64, + buf[pos+133] << decimation_shifts::pre64, + buf[pos+134] << decimation_shifts::pre64, + buf[pos+135] << decimation_shifts::pre64, + &buf2[64]); + + m_decimator2.myDecimateInf( + buf[pos+136] << decimation_shifts::pre64, + buf[pos+137] << decimation_shifts::pre64, + buf[pos+138] << decimation_shifts::pre64, + buf[pos+139] << decimation_shifts::pre64, + buf[pos+140] << decimation_shifts::pre64, + buf[pos+141] << decimation_shifts::pre64, + buf[pos+142] << decimation_shifts::pre64, + buf[pos+143] << decimation_shifts::pre64, + &buf2[68]); + + m_decimator2.myDecimateInf( + buf[pos+144] << decimation_shifts::pre64, + buf[pos+145] << decimation_shifts::pre64, + buf[pos+146] << decimation_shifts::pre64, + buf[pos+147] << decimation_shifts::pre64, + buf[pos+148] << decimation_shifts::pre64, + buf[pos+149] << decimation_shifts::pre64, + buf[pos+150] << decimation_shifts::pre64, + buf[pos+151] << decimation_shifts::pre64, + &buf2[72]); + + m_decimator2.myDecimateInf( + buf[pos+152] << decimation_shifts::pre64, + buf[pos+153] << decimation_shifts::pre64, + buf[pos+154] << decimation_shifts::pre64, + buf[pos+155] << decimation_shifts::pre64, + buf[pos+156] << decimation_shifts::pre64, + buf[pos+157] << decimation_shifts::pre64, + buf[pos+158] << decimation_shifts::pre64, + buf[pos+159] << decimation_shifts::pre64, + &buf2[76]); + + m_decimator2.myDecimateInf( + buf[pos+160] << decimation_shifts::pre64, + buf[pos+161] << decimation_shifts::pre64, + buf[pos+162] << decimation_shifts::pre64, + buf[pos+163] << decimation_shifts::pre64, + buf[pos+164] << decimation_shifts::pre64, + buf[pos+165] << decimation_shifts::pre64, + buf[pos+166] << decimation_shifts::pre64, + buf[pos+167] << decimation_shifts::pre64, + &buf2[80]); + + m_decimator2.myDecimateInf( + buf[pos+168] << decimation_shifts::pre64, + buf[pos+169] << decimation_shifts::pre64, + buf[pos+170] << decimation_shifts::pre64, + buf[pos+171] << decimation_shifts::pre64, + buf[pos+172] << decimation_shifts::pre64, + buf[pos+173] << decimation_shifts::pre64, + buf[pos+174] << decimation_shifts::pre64, + buf[pos+175] << decimation_shifts::pre64, + &buf2[84]); + + m_decimator2.myDecimateInf( + buf[pos+176] << decimation_shifts::pre64, + buf[pos+177] << decimation_shifts::pre64, + buf[pos+178] << decimation_shifts::pre64, + buf[pos+179] << decimation_shifts::pre64, + buf[pos+180] << decimation_shifts::pre64, + buf[pos+181] << decimation_shifts::pre64, + buf[pos+182] << decimation_shifts::pre64, + buf[pos+183] << decimation_shifts::pre64, + &buf2[88]); + + m_decimator2.myDecimateInf( + buf[pos+184] << decimation_shifts::pre64, + buf[pos+185] << decimation_shifts::pre64, + buf[pos+186] << decimation_shifts::pre64, + buf[pos+187] << decimation_shifts::pre64, + buf[pos+188] << decimation_shifts::pre64, + buf[pos+189] << decimation_shifts::pre64, + buf[pos+190] << decimation_shifts::pre64, + buf[pos+191] << decimation_shifts::pre64, + &buf2[92]); + + m_decimator2.myDecimateInf( + buf[pos+192] << decimation_shifts::pre64, + buf[pos+193] << decimation_shifts::pre64, + buf[pos+194] << decimation_shifts::pre64, + buf[pos+195] << decimation_shifts::pre64, + buf[pos+196] << decimation_shifts::pre64, + buf[pos+197] << decimation_shifts::pre64, + buf[pos+198] << decimation_shifts::pre64, + buf[pos+199] << decimation_shifts::pre64, + &buf2[96]); + + m_decimator2.myDecimateInf( + buf[pos+200] << decimation_shifts::pre64, + buf[pos+201] << decimation_shifts::pre64, + buf[pos+202] << decimation_shifts::pre64, + buf[pos+203] << decimation_shifts::pre64, + buf[pos+204] << decimation_shifts::pre64, + buf[pos+205] << decimation_shifts::pre64, + buf[pos+206] << decimation_shifts::pre64, + buf[pos+207] << decimation_shifts::pre64, + &buf2[100]); + + m_decimator2.myDecimateInf( + buf[pos+208] << decimation_shifts::pre64, + buf[pos+209] << decimation_shifts::pre64, + buf[pos+210] << decimation_shifts::pre64, + buf[pos+211] << decimation_shifts::pre64, + buf[pos+212] << decimation_shifts::pre64, + buf[pos+213] << decimation_shifts::pre64, + buf[pos+214] << decimation_shifts::pre64, + buf[pos+215] << decimation_shifts::pre64, + &buf2[104]); + + m_decimator2.myDecimateInf( + buf[pos+216] << decimation_shifts::pre64, + buf[pos+217] << decimation_shifts::pre64, + buf[pos+218] << decimation_shifts::pre64, + buf[pos+219] << decimation_shifts::pre64, + buf[pos+220] << decimation_shifts::pre64, + buf[pos+221] << decimation_shifts::pre64, + buf[pos+222] << decimation_shifts::pre64, + buf[pos+223] << decimation_shifts::pre64, + &buf2[108]); + + m_decimator2.myDecimateInf( + buf[pos+224] << decimation_shifts::pre64, + buf[pos+225] << decimation_shifts::pre64, + buf[pos+226] << decimation_shifts::pre64, + buf[pos+227] << decimation_shifts::pre64, + buf[pos+228] << decimation_shifts::pre64, + buf[pos+229] << decimation_shifts::pre64, + buf[pos+230] << decimation_shifts::pre64, + buf[pos+231] << decimation_shifts::pre64, + &buf2[112]); + + m_decimator2.myDecimateInf( + buf[pos+232] << decimation_shifts::pre64, + buf[pos+233] << decimation_shifts::pre64, + buf[pos+234] << decimation_shifts::pre64, + buf[pos+235] << decimation_shifts::pre64, + buf[pos+236] << decimation_shifts::pre64, + buf[pos+237] << decimation_shifts::pre64, + buf[pos+238] << decimation_shifts::pre64, + buf[pos+239] << decimation_shifts::pre64, + &buf2[116]); + + m_decimator2.myDecimateInf( + buf[pos+240] << decimation_shifts::pre64, + buf[pos+241] << decimation_shifts::pre64, + buf[pos+242] << decimation_shifts::pre64, + buf[pos+243] << decimation_shifts::pre64, + buf[pos+244] << decimation_shifts::pre64, + buf[pos+245] << decimation_shifts::pre64, + buf[pos+246] << decimation_shifts::pre64, + buf[pos+247] << decimation_shifts::pre64, + &buf2[120]); + + m_decimator2.myDecimateInf( + buf[pos+248] << decimation_shifts::pre64, + buf[pos+249] << decimation_shifts::pre64, + buf[pos+250] << decimation_shifts::pre64, + buf[pos+251] << decimation_shifts::pre64, + buf[pos+252] << decimation_shifts::pre64, + buf[pos+253] << decimation_shifts::pre64, + buf[pos+254] << decimation_shifts::pre64, + buf[pos+255] << decimation_shifts::pre64, + &buf2[124]); + + m_decimator4.myDecimateSup( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateSup( + &buf2[8], + &buf4[4]); + + m_decimator4.myDecimateSup( + &buf2[16], + &buf4[8]); + + m_decimator4.myDecimateSup( + &buf2[24], + &buf4[12]); + + m_decimator4.myDecimateSup( + &buf2[32], + &buf4[16]); + + m_decimator4.myDecimateSup( + &buf2[40], + &buf4[20]); + + m_decimator4.myDecimateSup( + &buf2[48], + &buf4[24]); + + m_decimator4.myDecimateSup( + &buf2[56], + &buf4[28]); + + m_decimator4.myDecimateSup( + &buf2[64], + &buf4[32]); + + m_decimator4.myDecimateSup( + &buf2[72], + &buf4[36]); + + m_decimator4.myDecimateSup( + &buf2[80], + &buf4[40]); + + m_decimator4.myDecimateSup( + &buf2[88], + &buf4[44]); + + m_decimator4.myDecimateSup( + &buf2[96], + &buf4[48]); + + m_decimator4.myDecimateSup( + &buf2[104], + &buf4[52]); + + m_decimator4.myDecimateSup( + &buf2[112], + &buf4[56]); + + m_decimator4.myDecimateSup( + &buf2[120], + &buf4[60]); + + m_decimator8.myDecimateInf( + &buf4[0], + &buf8[0]); + + m_decimator8.myDecimateInf( + &buf4[8], + &buf8[4]); + + m_decimator8.myDecimateInf( + &buf4[16], + &buf8[8]); + + m_decimator8.myDecimateInf( + &buf4[24], + &buf8[12]); + + m_decimator8.myDecimateInf( + &buf4[32], + &buf8[16]); + + m_decimator8.myDecimateInf( + &buf4[40], + &buf8[20]); + + m_decimator8.myDecimateInf( + &buf4[48], + &buf8[24]); + + m_decimator8.myDecimateInf( + &buf4[56], + &buf8[28]); + + m_decimator16.myDecimateSup( + &buf8[0], + &buf16[0]); + + m_decimator16.myDecimateSup( + &buf8[8], + &buf16[4]); + + m_decimator16.myDecimateSup( + &buf8[16], + &buf16[8]); + + m_decimator16.myDecimateSup( + &buf8[24], + &buf16[12]); + + m_decimator32.myDecimateInf( + &buf16[0], + &buf32[0]); + + m_decimator32.myDecimateInf( + &buf16[8], + &buf32[4]); + + m_decimator64.myDecimateSup( + &buf32[0], + &buf64[0]); + + (**it).setReal(buf64[0] >> decimation_shifts::post64); + (**it).setImag(buf64[1] >> decimation_shifts::post64); + ++(*it); + + (**it).setReal(buf64[2] >> decimation_shifts::post64); + (**it).setImag(buf64[3] >> decimation_shifts::post64); + ++(*it); + } +} + template void Decimators::decimate64_sup(SampleVector::iterator* it, const T* buf, qint32 len) { @@ -3389,6 +4910,499 @@ void Decimators::decimate64_cen(SampleVector } } +template +void Decimators::decimate64_sup_txsync(SampleVector::iterator* it, const T* buf, qint32 len) +{ + StorageType buf2[128], buf4[64], buf8[32], buf16[16], buf32[8], buf64[4]; + + for (int pos = 0; pos < len - 255; pos += 256) + { + m_decimator2.myDecimateSup( + buf[pos+0] << decimation_shifts::pre64, + buf[pos+1] << decimation_shifts::pre64, + buf[pos+2] << decimation_shifts::pre64, + buf[pos+3] << decimation_shifts::pre64, + buf[pos+4] << decimation_shifts::pre64, + buf[pos+5] << decimation_shifts::pre64, + buf[pos+6] << decimation_shifts::pre64, + buf[pos+7] << decimation_shifts::pre64, + &buf2[0]); + + m_decimator2.myDecimateSup( + buf[pos+8] << decimation_shifts::pre64, + buf[pos+9] << decimation_shifts::pre64, + buf[pos+10] << decimation_shifts::pre64, + buf[pos+11] << decimation_shifts::pre64, + buf[pos+12] << decimation_shifts::pre64, + buf[pos+13] << decimation_shifts::pre64, + buf[pos+14] << decimation_shifts::pre64, + buf[pos+15] << decimation_shifts::pre64, + &buf2[4]); + + m_decimator2.myDecimateSup( + buf[pos+16] << decimation_shifts::pre64, + buf[pos+17] << decimation_shifts::pre64, + buf[pos+18] << decimation_shifts::pre64, + buf[pos+19] << decimation_shifts::pre64, + buf[pos+20] << decimation_shifts::pre64, + buf[pos+21] << decimation_shifts::pre64, + buf[pos+22] << decimation_shifts::pre64, + buf[pos+23] << decimation_shifts::pre64, + &buf2[8]); + + m_decimator2.myDecimateSup( + buf[pos+24] << decimation_shifts::pre64, + buf[pos+25] << decimation_shifts::pre64, + buf[pos+26] << decimation_shifts::pre64, + buf[pos+27] << decimation_shifts::pre64, + buf[pos+28] << decimation_shifts::pre64, + buf[pos+29] << decimation_shifts::pre64, + buf[pos+30] << decimation_shifts::pre64, + buf[pos+31] << decimation_shifts::pre64, + &buf2[12]); + + m_decimator2.myDecimateSup( + buf[pos+32] << decimation_shifts::pre64, + buf[pos+33] << decimation_shifts::pre64, + buf[pos+34] << decimation_shifts::pre64, + buf[pos+35] << decimation_shifts::pre64, + buf[pos+36] << decimation_shifts::pre64, + buf[pos+37] << decimation_shifts::pre64, + buf[pos+38] << decimation_shifts::pre64, + buf[pos+39] << decimation_shifts::pre64, + &buf2[16]); + + m_decimator2.myDecimateSup( + buf[pos+40] << decimation_shifts::pre64, + buf[pos+41] << decimation_shifts::pre64, + buf[pos+42] << decimation_shifts::pre64, + buf[pos+43] << decimation_shifts::pre64, + buf[pos+44] << decimation_shifts::pre64, + buf[pos+45] << decimation_shifts::pre64, + buf[pos+46] << decimation_shifts::pre64, + buf[pos+47] << decimation_shifts::pre64, + &buf2[20]); + + m_decimator2.myDecimateSup( + buf[pos+48] << decimation_shifts::pre64, + buf[pos+49] << decimation_shifts::pre64, + buf[pos+50] << decimation_shifts::pre64, + buf[pos+51] << decimation_shifts::pre64, + buf[pos+52] << decimation_shifts::pre64, + buf[pos+53] << decimation_shifts::pre64, + buf[pos+54] << decimation_shifts::pre64, + buf[pos+55] << decimation_shifts::pre64, + &buf2[24]); + + m_decimator2.myDecimateSup( + buf[pos+56] << decimation_shifts::pre64, + buf[pos+57] << decimation_shifts::pre64, + buf[pos+58] << decimation_shifts::pre64, + buf[pos+59] << decimation_shifts::pre64, + buf[pos+60] << decimation_shifts::pre64, + buf[pos+61] << decimation_shifts::pre64, + buf[pos+62] << decimation_shifts::pre64, + buf[pos+63] << decimation_shifts::pre64, + &buf2[28]); + + m_decimator2.myDecimateSup( + buf[pos+64] << decimation_shifts::pre64, + buf[pos+65] << decimation_shifts::pre64, + buf[pos+66] << decimation_shifts::pre64, + buf[pos+67] << decimation_shifts::pre64, + buf[pos+68] << decimation_shifts::pre64, + buf[pos+69] << decimation_shifts::pre64, + buf[pos+70] << decimation_shifts::pre64, + buf[pos+71] << decimation_shifts::pre64, + &buf2[32]); + + m_decimator2.myDecimateSup( + buf[pos+72] << decimation_shifts::pre64, + buf[pos+73] << decimation_shifts::pre64, + buf[pos+74] << decimation_shifts::pre64, + buf[pos+75] << decimation_shifts::pre64, + buf[pos+76] << decimation_shifts::pre64, + buf[pos+77] << decimation_shifts::pre64, + buf[pos+78] << decimation_shifts::pre64, + buf[pos+79] << decimation_shifts::pre64, + &buf2[36]); + + m_decimator2.myDecimateSup( + buf[pos+80] << decimation_shifts::pre64, + buf[pos+81] << decimation_shifts::pre64, + buf[pos+82] << decimation_shifts::pre64, + buf[pos+83] << decimation_shifts::pre64, + buf[pos+84] << decimation_shifts::pre64, + buf[pos+85] << decimation_shifts::pre64, + buf[pos+86] << decimation_shifts::pre64, + buf[pos+87] << decimation_shifts::pre64, + &buf2[40]); + + m_decimator2.myDecimateSup( + buf[pos+88] << decimation_shifts::pre64, + buf[pos+89] << decimation_shifts::pre64, + buf[pos+90] << decimation_shifts::pre64, + buf[pos+91] << decimation_shifts::pre64, + buf[pos+92] << decimation_shifts::pre64, + buf[pos+93] << decimation_shifts::pre64, + buf[pos+94] << decimation_shifts::pre64, + buf[pos+95] << decimation_shifts::pre64, + &buf2[44]); + + m_decimator2.myDecimateSup( + buf[pos+96] << decimation_shifts::pre64, + buf[pos+97] << decimation_shifts::pre64, + buf[pos+98] << decimation_shifts::pre64, + buf[pos+99] << decimation_shifts::pre64, + buf[pos+100] << decimation_shifts::pre64, + buf[pos+101] << decimation_shifts::pre64, + buf[pos+102] << decimation_shifts::pre64, + buf[pos+103] << decimation_shifts::pre64, + &buf2[48]); + + m_decimator2.myDecimateSup( + buf[pos+104] << decimation_shifts::pre64, + buf[pos+105] << decimation_shifts::pre64, + buf[pos+106] << decimation_shifts::pre64, + buf[pos+107] << decimation_shifts::pre64, + buf[pos+108] << decimation_shifts::pre64, + buf[pos+109] << decimation_shifts::pre64, + buf[pos+110] << decimation_shifts::pre64, + buf[pos+111] << decimation_shifts::pre64, + &buf2[52]); + + m_decimator2.myDecimateSup( + buf[pos+112] << decimation_shifts::pre64, + buf[pos+113] << decimation_shifts::pre64, + buf[pos+114] << decimation_shifts::pre64, + buf[pos+115] << decimation_shifts::pre64, + buf[pos+116] << decimation_shifts::pre64, + buf[pos+117] << decimation_shifts::pre64, + buf[pos+118] << decimation_shifts::pre64, + buf[pos+119] << decimation_shifts::pre64, + &buf2[56]); + + m_decimator2.myDecimateSup( + buf[pos+120] << decimation_shifts::pre64, + buf[pos+121] << decimation_shifts::pre64, + buf[pos+122] << decimation_shifts::pre64, + buf[pos+123] << decimation_shifts::pre64, + buf[pos+124] << decimation_shifts::pre64, + buf[pos+125] << decimation_shifts::pre64, + buf[pos+126] << decimation_shifts::pre64, + buf[pos+127] << decimation_shifts::pre64, + &buf2[60]); + + m_decimator2.myDecimateSup( + buf[pos+128] << decimation_shifts::pre64, + buf[pos+129] << decimation_shifts::pre64, + buf[pos+130] << decimation_shifts::pre64, + buf[pos+131] << decimation_shifts::pre64, + buf[pos+132] << decimation_shifts::pre64, + buf[pos+133] << decimation_shifts::pre64, + buf[pos+134] << decimation_shifts::pre64, + buf[pos+135] << decimation_shifts::pre64, + &buf2[64]); + + m_decimator2.myDecimateSup( + buf[pos+136] << decimation_shifts::pre64, + buf[pos+137] << decimation_shifts::pre64, + buf[pos+138] << decimation_shifts::pre64, + buf[pos+139] << decimation_shifts::pre64, + buf[pos+140] << decimation_shifts::pre64, + buf[pos+141] << decimation_shifts::pre64, + buf[pos+142] << decimation_shifts::pre64, + buf[pos+143] << decimation_shifts::pre64, + &buf2[68]); + + m_decimator2.myDecimateSup( + buf[pos+144] << decimation_shifts::pre64, + buf[pos+145] << decimation_shifts::pre64, + buf[pos+146] << decimation_shifts::pre64, + buf[pos+147] << decimation_shifts::pre64, + buf[pos+148] << decimation_shifts::pre64, + buf[pos+149] << decimation_shifts::pre64, + buf[pos+150] << decimation_shifts::pre64, + buf[pos+151] << decimation_shifts::pre64, + &buf2[72]); + + m_decimator2.myDecimateSup( + buf[pos+152] << decimation_shifts::pre64, + buf[pos+153] << decimation_shifts::pre64, + buf[pos+154] << decimation_shifts::pre64, + buf[pos+155] << decimation_shifts::pre64, + buf[pos+156] << decimation_shifts::pre64, + buf[pos+157] << decimation_shifts::pre64, + buf[pos+158] << decimation_shifts::pre64, + buf[pos+159] << decimation_shifts::pre64, + &buf2[76]); + + m_decimator2.myDecimateSup( + buf[pos+160] << decimation_shifts::pre64, + buf[pos+161] << decimation_shifts::pre64, + buf[pos+162] << decimation_shifts::pre64, + buf[pos+163] << decimation_shifts::pre64, + buf[pos+164] << decimation_shifts::pre64, + buf[pos+165] << decimation_shifts::pre64, + buf[pos+166] << decimation_shifts::pre64, + buf[pos+167] << decimation_shifts::pre64, + &buf2[80]); + + m_decimator2.myDecimateSup( + buf[pos+168] << decimation_shifts::pre64, + buf[pos+169] << decimation_shifts::pre64, + buf[pos+170] << decimation_shifts::pre64, + buf[pos+171] << decimation_shifts::pre64, + buf[pos+172] << decimation_shifts::pre64, + buf[pos+173] << decimation_shifts::pre64, + buf[pos+174] << decimation_shifts::pre64, + buf[pos+175] << decimation_shifts::pre64, + &buf2[84]); + + m_decimator2.myDecimateSup( + buf[pos+176] << decimation_shifts::pre64, + buf[pos+177] << decimation_shifts::pre64, + buf[pos+178] << decimation_shifts::pre64, + buf[pos+179] << decimation_shifts::pre64, + buf[pos+180] << decimation_shifts::pre64, + buf[pos+181] << decimation_shifts::pre64, + buf[pos+182] << decimation_shifts::pre64, + buf[pos+183] << decimation_shifts::pre64, + &buf2[88]); + + m_decimator2.myDecimateSup( + buf[pos+184] << decimation_shifts::pre64, + buf[pos+185] << decimation_shifts::pre64, + buf[pos+186] << decimation_shifts::pre64, + buf[pos+187] << decimation_shifts::pre64, + buf[pos+188] << decimation_shifts::pre64, + buf[pos+189] << decimation_shifts::pre64, + buf[pos+190] << decimation_shifts::pre64, + buf[pos+191] << decimation_shifts::pre64, + &buf2[92]); + + m_decimator2.myDecimateSup( + buf[pos+192] << decimation_shifts::pre64, + buf[pos+193] << decimation_shifts::pre64, + buf[pos+194] << decimation_shifts::pre64, + buf[pos+195] << decimation_shifts::pre64, + buf[pos+196] << decimation_shifts::pre64, + buf[pos+197] << decimation_shifts::pre64, + buf[pos+198] << decimation_shifts::pre64, + buf[pos+199] << decimation_shifts::pre64, + &buf2[96]); + + m_decimator2.myDecimateSup( + buf[pos+200] << decimation_shifts::pre64, + buf[pos+201] << decimation_shifts::pre64, + buf[pos+202] << decimation_shifts::pre64, + buf[pos+203] << decimation_shifts::pre64, + buf[pos+204] << decimation_shifts::pre64, + buf[pos+205] << decimation_shifts::pre64, + buf[pos+206] << decimation_shifts::pre64, + buf[pos+207] << decimation_shifts::pre64, + &buf2[100]); + + m_decimator2.myDecimateSup( + buf[pos+208] << decimation_shifts::pre64, + buf[pos+209] << decimation_shifts::pre64, + buf[pos+210] << decimation_shifts::pre64, + buf[pos+211] << decimation_shifts::pre64, + buf[pos+212] << decimation_shifts::pre64, + buf[pos+213] << decimation_shifts::pre64, + buf[pos+214] << decimation_shifts::pre64, + buf[pos+215] << decimation_shifts::pre64, + &buf2[104]); + + m_decimator2.myDecimateSup( + buf[pos+216] << decimation_shifts::pre64, + buf[pos+217] << decimation_shifts::pre64, + buf[pos+218] << decimation_shifts::pre64, + buf[pos+219] << decimation_shifts::pre64, + buf[pos+220] << decimation_shifts::pre64, + buf[pos+221] << decimation_shifts::pre64, + buf[pos+222] << decimation_shifts::pre64, + buf[pos+223] << decimation_shifts::pre64, + &buf2[108]); + + m_decimator2.myDecimateSup( + buf[pos+224] << decimation_shifts::pre64, + buf[pos+225] << decimation_shifts::pre64, + buf[pos+226] << decimation_shifts::pre64, + buf[pos+227] << decimation_shifts::pre64, + buf[pos+228] << decimation_shifts::pre64, + buf[pos+229] << decimation_shifts::pre64, + buf[pos+230] << decimation_shifts::pre64, + buf[pos+231] << decimation_shifts::pre64, + &buf2[112]); + + m_decimator2.myDecimateSup( + buf[pos+232] << decimation_shifts::pre64, + buf[pos+233] << decimation_shifts::pre64, + buf[pos+234] << decimation_shifts::pre64, + buf[pos+235] << decimation_shifts::pre64, + buf[pos+236] << decimation_shifts::pre64, + buf[pos+237] << decimation_shifts::pre64, + buf[pos+238] << decimation_shifts::pre64, + buf[pos+239] << decimation_shifts::pre64, + &buf2[116]); + + m_decimator2.myDecimateSup( + buf[pos+240] << decimation_shifts::pre64, + buf[pos+241] << decimation_shifts::pre64, + buf[pos+242] << decimation_shifts::pre64, + buf[pos+243] << decimation_shifts::pre64, + buf[pos+244] << decimation_shifts::pre64, + buf[pos+245] << decimation_shifts::pre64, + buf[pos+246] << decimation_shifts::pre64, + buf[pos+247] << decimation_shifts::pre64, + &buf2[120]); + + m_decimator2.myDecimateSup( + buf[pos+248] << decimation_shifts::pre64, + buf[pos+249] << decimation_shifts::pre64, + buf[pos+250] << decimation_shifts::pre64, + buf[pos+251] << decimation_shifts::pre64, + buf[pos+252] << decimation_shifts::pre64, + buf[pos+253] << decimation_shifts::pre64, + buf[pos+254] << decimation_shifts::pre64, + buf[pos+255] << decimation_shifts::pre64, + &buf2[124]); + + m_decimator4.myDecimateInf( + &buf2[0], + &buf4[0]); + + m_decimator4.myDecimateInf( + &buf2[8], + &buf4[4]); + + m_decimator4.myDecimateInf( + &buf2[16], + &buf4[8]); + + m_decimator4.myDecimateInf( + &buf2[24], + &buf4[12]); + + m_decimator4.myDecimateInf( + &buf2[32], + &buf4[16]); + + m_decimator4.myDecimateInf( + &buf2[40], + &buf4[20]); + + m_decimator4.myDecimateInf( + &buf2[48], + &buf4[24]); + + m_decimator4.myDecimateInf( + &buf2[56], + &buf4[28]); + + m_decimator4.myDecimateInf( + &buf2[64], + &buf4[32]); + + m_decimator4.myDecimateInf( + &buf2[72], + &buf4[36]); + + m_decimator4.myDecimateInf( + &buf2[80], + &buf4[40]); + + m_decimator4.myDecimateInf( + &buf2[88], + &buf4[44]); + + m_decimator4.myDecimateInf( + &buf2[96], + &buf4[48]); + + m_decimator4.myDecimateInf( + &buf2[104], + &buf4[52]); + + m_decimator4.myDecimateInf( + &buf2[112], + &buf4[56]); + + m_decimator4.myDecimateInf( + &buf2[120], + &buf4[60]); + + m_decimator8.myDecimateSup( + &buf4[0], + &buf8[0]); + + m_decimator8.myDecimateSup( + &buf4[8], + &buf8[4]); + + m_decimator8.myDecimateSup( + &buf4[16], + &buf8[8]); + + m_decimator8.myDecimateSup( + &buf4[24], + &buf8[12]); + + m_decimator8.myDecimateSup( + &buf4[32], + &buf8[16]); + + m_decimator8.myDecimateSup( + &buf4[40], + &buf8[20]); + + m_decimator8.myDecimateSup( + &buf4[48], + &buf8[24]); + + m_decimator8.myDecimateSup( + &buf4[56], + &buf8[28]); + + m_decimator16.myDecimateInf( + &buf8[0], + &buf16[0]); + + m_decimator16.myDecimateInf( + &buf8[8], + &buf16[4]); + + m_decimator16.myDecimateInf( + &buf8[16], + &buf16[8]); + + m_decimator16.myDecimateInf( + &buf8[24], + &buf16[12]); + + m_decimator32.myDecimateSup( + &buf16[0], + &buf32[0]); + + m_decimator32.myDecimateSup( + &buf16[8], + &buf32[4]); + + m_decimator64.myDecimateInf( + &buf32[0], + &buf64[0]); + + (**it).setReal(buf64[0] >> decimation_shifts::post64); + (**it).setImag(buf64[1] >> decimation_shifts::post64); + ++(*it); + + (**it).setReal(buf64[2] >> decimation_shifts::post64); + (**it).setImag(buf64[3] >> decimation_shifts::post64); + ++(*it); + } +} + // ============================================================================================================== diff --git a/sdrbase/dsp/devicesamplesource.cpp b/sdrbase/dsp/devicesamplesource.cpp index 69ec6ebec..31aa1dde3 100644 --- a/sdrbase/dsp/devicesamplesource.cpp +++ b/sdrbase/dsp/devicesamplesource.cpp @@ -47,6 +47,7 @@ qint64 DeviceSampleSource::calculateDeviceCenterFrequency( int log2Decim, fcPos_t fcPos, quint32 devSampleRate, + FrequencyShiftScheme frequencyShiftScheme, bool transverterMode) { qint64 deviceCenterFrequency = centerFrequency; @@ -54,10 +55,11 @@ qint64 DeviceSampleSource::calculateDeviceCenterFrequency( deviceCenterFrequency = deviceCenterFrequency < 0 ? 0 : deviceCenterFrequency; qint64 f_img = deviceCenterFrequency; - deviceCenterFrequency -= calculateFrequencyShift(log2Decim, fcPos, devSampleRate); - f_img -= 2*calculateFrequencyShift(log2Decim, fcPos, devSampleRate); + deviceCenterFrequency -= calculateFrequencyShift(log2Decim, fcPos, devSampleRate, frequencyShiftScheme); + f_img -= 2*calculateFrequencyShift(log2Decim, fcPos, devSampleRate, frequencyShiftScheme); qDebug() << "DeviceSampleSource::calculateDeviceCenterFrequency:" + << " frequencyShiftScheme: " << frequencyShiftScheme << " desired center freq: " << centerFrequency << " Hz" << " device center freq: " << deviceCenterFrequency << " Hz" << " device sample rate: " << devSampleRate << "S/s" @@ -74,14 +76,16 @@ qint64 DeviceSampleSource::calculateCenterFrequency( int log2Decim, fcPos_t fcPos, quint32 devSampleRate, + FrequencyShiftScheme frequencyShiftScheme, bool transverterMode) { qint64 centerFrequency = deviceCenterFrequency; - centerFrequency += calculateFrequencyShift(log2Decim, fcPos, devSampleRate); + centerFrequency += calculateFrequencyShift(log2Decim, fcPos, devSampleRate, frequencyShiftScheme); centerFrequency += transverterMode ? transverterDeltaFrequency : 0; centerFrequency = centerFrequency < 0 ? 0 : centerFrequency; qDebug() << "DeviceSampleSource::calculateCenterFrequency:" + << " frequencyShiftScheme: " << frequencyShiftScheme << " desired center freq: " << centerFrequency << " Hz" << " device center freq: " << deviceCenterFrequency << " Hz" << " device sample rate: " << devSampleRate << "S/s" @@ -109,25 +113,60 @@ qint64 DeviceSampleSource::calculateCenterFrequency( qint32 DeviceSampleSource::calculateFrequencyShift( int log2Decim, fcPos_t fcPos, - quint32 devSampleRate) + quint32 devSampleRate, + FrequencyShiftScheme frequencyShiftScheme) { - if (log2Decim == 0) { // no shift at all - return 0; - } else if (log2Decim < 3) { - if (fcPos == FC_POS_INFRA) { // shift in the square next to center frequency - return -(devSampleRate / (1<<(log2Decim+1))); - } else if (fcPos == FC_POS_SUPRA) { - return devSampleRate / (1<<(log2Decim+1)); + if (frequencyShiftScheme == FSHIFT_STD) + { + if (log2Decim == 0) { // no shift at all + return 0; + } else if (log2Decim < 3) { + if (fcPos == FC_POS_INFRA) { // shift in the square next to center frequency + return -(devSampleRate / (1<<(log2Decim+1))); + } else if (fcPos == FC_POS_SUPRA) { + return devSampleRate / (1<<(log2Decim+1)); + } else { + return 0; + } } else { + if (fcPos == FC_POS_INFRA) { // shift centered in the square next to center frequency + return -(devSampleRate / (1<<(log2Decim))); + } else if (fcPos == FC_POS_SUPRA) { + return devSampleRate / (1<<(log2Decim)); + } else { + return 0; + } + } + } + else if (frequencyShiftScheme == FSHIFT_TXSYNC) + { + if (fcPos == FC_POS_CENTER) { return 0; } - } else { - if (fcPos == FC_POS_INFRA) { // shift centered in the square next to center frequency - return -(devSampleRate / (1<<(log2Decim))); - } else if (fcPos == FC_POS_SUPRA) { - return devSampleRate / (1<<(log2Decim)); + + int sign = fcPos == FC_POS_INFRA ? -1 : 1; + int halfSampleRate = devSampleRate / 2; // fractions are relative to sideband thus based on half the sample rate + + if (log2Decim == 0) { + return 0; + } else if (log2Decim == 1) { + return sign * (halfSampleRate / 2); // inf or sup: 1/2 + } else if (log2Decim == 2) { + return sign * ((halfSampleRate * 3) / 4); // inf, inf or sup, sup: 1/2 + 1/4 + } else if (log2Decim == 3) { + return sign * ((halfSampleRate * 5) / 8); // inf, inf, sup or sup, sup, inf: 1/2 + 1/4 - 1/8 = 5/8 + } else if (log2Decim == 4) { + return sign * ((halfSampleRate * 11) / 16); // inf, inf, sup, inf or sup, sup, inf, sup: 1/2 + 1/4 - 1/8 + 1/16 = 11/16 + } else if (log2Decim == 5) { + return sign * ((halfSampleRate * 21) / 32); // inf, inf, sup, inf, sup or sup, sup, inf, sup, inf: 1/2 + 1/4 - 1/8 + 1/16 - 1/32 = 21/32 + } else if (log2Decim == 6) { + return sign * ((halfSampleRate * 21) / 64); // inf, sup, inf, sup, inf, sup or sup, inf, sup, inf, sup, inf: 1/2 - 1/4 + 1/8 -1/16 + 1/32 - 1/64 = 21/64 } else { return 0; } } + else + { + return 0; + } } diff --git a/sdrbase/dsp/devicesamplesource.h b/sdrbase/dsp/devicesamplesource.h index c25c8f327..db7b7d2d1 100644 --- a/sdrbase/dsp/devicesamplesource.h +++ b/sdrbase/dsp/devicesamplesource.h @@ -42,6 +42,11 @@ public: FC_POS_CENTER } fcPos_t; + typedef enum { + FSHIFT_STD = 0, // Standard Rx independent + FSHIFT_TXSYNC // Follows same scheme as Tx + } FrequencyShiftScheme; + DeviceSampleSource(); virtual ~DeviceSampleSource(); virtual void destroy() = 0; @@ -121,7 +126,9 @@ public: int log2Decim, fcPos_t fcPos, quint32 devSampleRate, - bool transverterMode = false); + FrequencyShiftScheme frequencyShiftScheme, + bool transverterMode = false + ); static qint64 calculateCenterFrequency( quint64 deviceCenterFrequency, @@ -129,12 +136,16 @@ public: int log2Decim, fcPos_t fcPos, quint32 devSampleRate, - bool transverterMode = false); + FrequencyShiftScheme frequencyShiftScheme, + bool transverterMode = false + ); static qint32 calculateFrequencyShift( int log2Decim, fcPos_t fcPos, - quint32 devSampleRate); + quint32 devSampleRate, + FrequencyShiftScheme frequencyShiftScheme + ); protected slots: void handleInputMessages();