From 713826cbf428e48935a2284705a09ff6e0cee2bd Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 24 Feb 2017 23:25:09 +0100 Subject: [PATCH] ATV demod: upadte on horizontal sync --- plugins/channelrx/demodatv/atvdemod.cpp | 21 ++++++++++++++++----- plugins/channelrx/demodatv/atvdemod.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/channelrx/demodatv/atvdemod.cpp b/plugins/channelrx/demodatv/atvdemod.cpp index e9ef741dc..deee11974 100644 --- a/plugins/channelrx/demodatv/atvdemod.cpp +++ b/plugins/channelrx/demodatv/atvdemod.cpp @@ -35,6 +35,7 @@ ATVDemod::ATVDemod() : m_intRowIndex(0), m_intSynchroPoints(0), m_blnSynchroDetected(false), + m_blnLineSynchronized(false), m_blnVerticalSynchroDetected(false), m_fltLevelSynchroTop(0.0), m_fltLevelSynchroBlack(1.0), @@ -423,14 +424,24 @@ void ATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto m_blnSynchroDetected=false; m_blnImageDetecting=true; - //New line + Interleaving - m_intRowIndex ++; - m_intRowIndex ++; m_intColIndex=0; - if(m_intRowIndexselectRow(m_intRowIndex); + //New line + Interleaving + m_intRowIndex ++; + m_intRowIndex ++; + + if(m_intRowIndexselectRow(m_intRowIndex); + } + + m_blnLineSynchronized=false; + } + else + { + m_blnLineSynchronized=m_blnSynchroDetected; } m_fltAmpLineAverage=0.0f; diff --git a/plugins/channelrx/demodatv/atvdemod.h b/plugins/channelrx/demodatv/atvdemod.h index 764bf31ec..f48d60698 100644 --- a/plugins/channelrx/demodatv/atvdemod.h +++ b/plugins/channelrx/demodatv/atvdemod.h @@ -107,6 +107,7 @@ private: int m_intSynchroPoints; bool m_blnSynchroDetected; + bool m_blnLineSynchronized; bool m_blnImageDetecting; bool m_blnVerticalSynchroDetected;