1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

ATV demod: removed useless member m_horizontalSynchroDetected. Process classic: fixed m_avgColIndex synchronization

This commit is contained in:
f4exb 2020-07-01 03:19:42 +02:00
parent 8a09466734
commit 44989a42c8
2 changed files with 4 additions and 11 deletions

View File

@ -38,7 +38,6 @@ ATVDemodSink::ATVDemodSink() :
m_numberSamplesPerHTop(0),
m_imageIndex(0),
m_synchroSamples(0),
m_horizontalSynchroDetected(false),
m_verticalSynchroDetected(false),
m_ampLineSum(0.0f),
m_ampLineAvg(0.0f),

View File

@ -128,7 +128,6 @@ private:
int m_imageIndex;
int m_synchroSamples;
bool m_horizontalSynchroDetected;
bool m_verticalSynchroDetected;
float m_ampLineSum;
@ -202,9 +201,7 @@ private:
}
// H sync pulse
m_horizontalSynchroDetected = (m_synchroSamples == m_numberSamplesPerHTop);
if (m_horizontalSynchroDetected)
if (m_synchroSamples == m_numberSamplesPerHTop) // horizontal synchro detected
{
// Vertical sync and image rendering
if ((m_sampleIndex >= (3*m_samplesPerLine) / 2) // Vertical sync is first horizontal sync after skip (count at least 1.5 line length)
@ -273,14 +270,11 @@ private:
m_synchroSamples = 0;
}
// H sync pulse
m_horizontalSynchroDetected = (m_synchroSamples == m_numberSamplesPerHTop) && (m_sampleIndex > (m_samplesPerLine/2) + m_numberSamplesPerLineSignals);
//Horizontal Synchro processing
if (m_horizontalSynchroDetected)
if ((m_synchroSamples == m_numberSamplesPerHTop) // horizontal synchro detected
&& (m_sampleIndex > (m_samplesPerLine/2) + m_numberSamplesPerLineSignals))
{
m_avgColIndex = m_sampleIndex - m_colIndex - (m_colIndex < m_samplesPerLine/2 ? 150 : 0);
m_avgColIndex = m_sampleIndex - m_colIndex;
//qDebug("HSync: %d %d %d", m_sampleIndex, m_colIndex, m_avgColIndex);
m_sampleIndex = 0;
}