mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-29 05:22:25 -04:00
ATV demod: removed useless member m_horizontalSynchroDetected. Process classic: fixed m_avgColIndex synchronization
This commit is contained in:
parent
8a09466734
commit
44989a42c8
@ -38,7 +38,6 @@ ATVDemodSink::ATVDemodSink() :
|
|||||||
m_numberSamplesPerHTop(0),
|
m_numberSamplesPerHTop(0),
|
||||||
m_imageIndex(0),
|
m_imageIndex(0),
|
||||||
m_synchroSamples(0),
|
m_synchroSamples(0),
|
||||||
m_horizontalSynchroDetected(false),
|
|
||||||
m_verticalSynchroDetected(false),
|
m_verticalSynchroDetected(false),
|
||||||
m_ampLineSum(0.0f),
|
m_ampLineSum(0.0f),
|
||||||
m_ampLineAvg(0.0f),
|
m_ampLineAvg(0.0f),
|
||||||
|
@ -128,7 +128,6 @@ private:
|
|||||||
int m_imageIndex;
|
int m_imageIndex;
|
||||||
int m_synchroSamples;
|
int m_synchroSamples;
|
||||||
|
|
||||||
bool m_horizontalSynchroDetected;
|
|
||||||
bool m_verticalSynchroDetected;
|
bool m_verticalSynchroDetected;
|
||||||
|
|
||||||
float m_ampLineSum;
|
float m_ampLineSum;
|
||||||
@ -202,9 +201,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// H sync pulse
|
// H sync pulse
|
||||||
m_horizontalSynchroDetected = (m_synchroSamples == m_numberSamplesPerHTop);
|
if (m_synchroSamples == m_numberSamplesPerHTop) // horizontal synchro detected
|
||||||
|
|
||||||
if (m_horizontalSynchroDetected)
|
|
||||||
{
|
{
|
||||||
// Vertical sync and image rendering
|
// 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)
|
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;
|
m_synchroSamples = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// H sync pulse
|
|
||||||
m_horizontalSynchroDetected = (m_synchroSamples == m_numberSamplesPerHTop) && (m_sampleIndex > (m_samplesPerLine/2) + m_numberSamplesPerLineSignals);
|
|
||||||
|
|
||||||
//Horizontal Synchro processing
|
//Horizontal Synchro processing
|
||||||
|
if ((m_synchroSamples == m_numberSamplesPerHTop) // horizontal synchro detected
|
||||||
if (m_horizontalSynchroDetected)
|
&& (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);
|
//qDebug("HSync: %d %d %d", m_sampleIndex, m_colIndex, m_avgColIndex);
|
||||||
m_sampleIndex = 0;
|
m_sampleIndex = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user