From 50da60af8eda5d8c1b86f5795ed7b0f17f338e01 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 16 Mar 2017 22:10:40 +0100 Subject: [PATCH] ATV Demod: rempved m_blnInitialized --- plugins/channelrx/demodatv/atvdemod.cpp | 36 +++++-------------------- plugins/channelrx/demodatv/atvdemod.h | 1 - 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/plugins/channelrx/demodatv/atvdemod.cpp b/plugins/channelrx/demodatv/atvdemod.cpp index a454dd6dc..111faa423 100644 --- a/plugins/channelrx/demodatv/atvdemod.cpp +++ b/plugins/channelrx/demodatv/atvdemod.cpp @@ -56,7 +56,6 @@ ATVDemod::ATVDemod() : m_intNumberSamplePerLine=0; m_intSynchroPoints=0; m_intNumberOfLines=0; - m_blnInitialized=false; m_intNumberOfRowsToDisplay=0; m_objMagSqAverage.resize(16, 1.0); @@ -102,25 +101,8 @@ void ATVDemod::InitATVParameters( int intNumberOfLines; bool blnNewOpenGLScreen=false; - m_blnInitialized=false; - m_objSettingsMutex.lock(); - if(m_objRegisteredATVScreen==NULL) - { - m_intNumberSamplePerLine=0; - m_intNumberSamplePerTop=0; - m_intNumberOfLines=0; - - m_fltVoltLevelSynchroTop=0.0; - m_fltVoltLevelSynchroBlack=1.0; - - m_blnInitialized=false; - m_objSettingsMutex.unlock(); - - return; - } - m_fltVoltLevelSynchroTop = fltVoltLevelSynchroTop; m_fltVoltLevelSynchroBlack = fltVoltLevelSynchroBlack; @@ -163,6 +145,8 @@ void ATVDemod::InitATVParameters( m_objRunning.m_blnHSync = blnHSync; m_objRunning.m_blnVSync = blnVSync; + m_objSettingsMutex.unlock(); + qDebug() << "ATVDemod::InitATVParameters:" << " - Msps: " << intMsps << " - Line us: " << intLineDurationUs @@ -174,10 +158,6 @@ void ATVDemod::InitATVParameters( << " - Lines per Frame: " << m_intNumberOfLines << " - Rows to Display: " << m_intNumberOfRowsToDisplay << " - Modulation: " << ((m_enmModulation==ATV_AM)?"AM" : "FM"); - - m_objSettingsMutex.unlock(); - - m_blnInitialized=true; } void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst) @@ -349,18 +329,14 @@ void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto //********** Filling pixels ********** - blnComputeImage=m_blnInitialized; + blnComputeImage=(m_objRunning.m_intPercentOfRowsToDisplay!=50); - if(m_blnInitialized==true) + if (!blnComputeImage) { - blnComputeImage=(m_objRunning.m_intPercentOfRowsToDisplay!=50); - if(!blnComputeImage) - { - blnComputeImage=((m_intImageIndex/2)%2==0); - } + blnComputeImage=((m_intImageIndex/2)%2==0); } - if(blnComputeImage) + if (blnComputeImage) { m_objRegisteredATVScreen->setDataColor(m_intColIndex,intVal, intVal, intVal); } diff --git a/plugins/channelrx/demodatv/atvdemod.h b/plugins/channelrx/demodatv/atvdemod.h index 7b8136e4d..9fb0e07fc 100644 --- a/plugins/channelrx/demodatv/atvdemod.h +++ b/plugins/channelrx/demodatv/atvdemod.h @@ -115,7 +115,6 @@ private: int m_intNumberSamplePerLine; int m_intNumberSamplePerTop; int m_intNumberOfLines; - bool m_blnInitialized; int m_intNumberOfRowsToDisplay; float m_fltVoltLevelSynchroTop;