1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-10-01 09:16:39 -04:00

ATV Demod: simplify vertical sync nested ifs

This commit is contained in:
f4exb 2017-03-30 23:30:07 +02:00
parent 69edfd4bfb
commit f78c466a92

View File

@ -533,15 +533,14 @@ void ATVDemod::demod(Complex& c)
}
// Vertical Synchro : 3/4 a line necessary
if(!m_blnVerticalSynchroDetected && m_objRunning.m_blnVSync)
{
if(m_intColIndex >= intSynchroTimeSamples)
{
if(m_fltAmpLineAverage<=fltSynchroTrameLevel) //(m_fltLevelSynchroBlack*(float)(m_intColIndex-((m_intNumberSamplePerLine*12)/64)))) //75
if (!m_blnVerticalSynchroDetected
&& m_objRunning.m_blnVSync
&& (m_intColIndex >= intSynchroTimeSamples)
&& (m_fltAmpLineAverage<=fltSynchroTrameLevel))
{
m_blnVerticalSynchroDetected = true;
// qDebug("%d: %d: %d", m_intLineIndex, m_intImageIndex, m_intNumberOfLines);
// qDebug("%d: %d: %d", m_intLineIndex, m_intImageIndex, m_intNumberOfLines);
if (m_intLineIndex % 2 == 0) // even => odd image
{
@ -568,8 +567,6 @@ void ATVDemod::demod(Complex& c)
m_objRegisteredATVScreen->selectRow(m_intRowIndex - m_intNumberOfSyncLines);
m_intLineIndex = 0;
}
}
}
}
void ATVDemod::start()