mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-31 21:12:28 -04:00
ATV Modulator: fixed blank line on top of image
This commit is contained in:
parent
3b11291dc2
commit
4acdf78a22
@ -177,60 +177,38 @@ void ATVMod::modulateSample()
|
|||||||
|
|
||||||
void ATVMod::pullVideo(Real& sample)
|
void ATVMod::pullVideo(Real& sample)
|
||||||
{
|
{
|
||||||
if (m_interlaced)
|
int iLine = m_lineCount % m_nbLines2;
|
||||||
{
|
|
||||||
int iLine = m_lineCount % m_nbLines2;
|
|
||||||
|
|
||||||
if (m_lineCount < m_nbLines2) // even image
|
if (m_lineCount < m_nbLines2) // even image or non interlaced
|
||||||
{
|
|
||||||
if (iLine < m_nbSyncLinesHead)
|
|
||||||
{
|
|
||||||
pullVSyncLine(sample);
|
|
||||||
}
|
|
||||||
else if (iLine < m_nbSyncLinesHead + m_nbBlankLines)
|
|
||||||
{
|
|
||||||
pullVSyncLine(sample); // pull black line
|
|
||||||
}
|
|
||||||
else if (iLine < m_nbLines2 - 3)
|
|
||||||
{
|
|
||||||
pullImageLine(sample);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pullVSyncLine(sample);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // odd image
|
|
||||||
{
|
|
||||||
if (iLine < m_nbSyncLinesHead - 1)
|
|
||||||
{
|
|
||||||
pullVSyncLine(sample);
|
|
||||||
}
|
|
||||||
else if (iLine < m_nbSyncLinesHead + m_nbBlankLines - 1)
|
|
||||||
{
|
|
||||||
pullVSyncLine(sample); // pull black line
|
|
||||||
}
|
|
||||||
else if (iLine < m_nbLines2 - 4)
|
|
||||||
{
|
|
||||||
pullImageLine(sample);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pullVSyncLine(sample);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // non interlaced
|
|
||||||
{
|
{
|
||||||
if (m_lineCount < m_nbSyncLinesHead)
|
if (iLine < m_nbSyncLinesHead)
|
||||||
{
|
{
|
||||||
pullVSyncLine(sample);
|
pullVSyncLine(sample);
|
||||||
}
|
}
|
||||||
else if (m_lineCount < m_nbSyncLinesHead + m_nbBlankLines)
|
else if (iLine < m_nbSyncLinesHead + m_nbBlankLines)
|
||||||
{
|
{
|
||||||
pullVSyncLine(sample); // pull black line
|
pullVSyncLine(sample); // pull black line
|
||||||
}
|
}
|
||||||
else if (m_lineCount < m_nbLines - 3)
|
else if (iLine < m_nbLines2 - 3)
|
||||||
|
{
|
||||||
|
pullImageLine(sample);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pullVSyncLine(sample);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // odd image
|
||||||
|
{
|
||||||
|
if (iLine < m_nbSyncLinesHead - 1)
|
||||||
|
{
|
||||||
|
pullVSyncLine(sample);
|
||||||
|
}
|
||||||
|
else if (iLine < m_nbSyncLinesHead + m_nbBlankLines - 1)
|
||||||
|
{
|
||||||
|
pullVSyncLine(sample); // pull black line
|
||||||
|
}
|
||||||
|
else if (iLine < m_nbLines2 - 4)
|
||||||
{
|
{
|
||||||
pullImageLine(sample);
|
pullImageLine(sample);
|
||||||
}
|
}
|
||||||
@ -238,7 +216,6 @@ void ATVMod::pullVideo(Real& sample)
|
|||||||
{
|
{
|
||||||
pullVSyncLine(sample);
|
pullVSyncLine(sample);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_horizontalCount < m_nbHorizPoints - 1)
|
if (m_horizontalCount < m_nbHorizPoints - 1)
|
||||||
|
@ -526,7 +526,7 @@ private:
|
|||||||
sample = ((iLine -5) / (float) m_nbImageLines2) * m_spanLevel + m_blackLevel;
|
sample = ((iLine -5) / (float) m_nbImageLines2) * m_spanLevel + m_blackLevel;
|
||||||
break;
|
break;
|
||||||
case ATVModInputImage:
|
case ATVModInputImage:
|
||||||
if (!m_imageOK || (iLineImage < 0) || m_image.empty())
|
if (!m_imageOK || (iLineImage < -oddity) || m_image.empty())
|
||||||
{
|
{
|
||||||
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
||||||
}
|
}
|
||||||
@ -544,7 +544,7 @@ private:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ATVModInputVideo:
|
case ATVModInputVideo:
|
||||||
if (!m_videoOK || (iLineImage < 0) || m_videoFrame.empty())
|
if (!m_videoOK || (iLineImage < -oddity) || m_videoFrame.empty())
|
||||||
{
|
{
|
||||||
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
||||||
}
|
}
|
||||||
@ -562,7 +562,7 @@ private:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ATVModInputCamera:
|
case ATVModInputCamera:
|
||||||
if ((iLineImage < 0) || (m_cameraIndex < 0))
|
if ((iLineImage < -oddity) || (m_cameraIndex < 0))
|
||||||
{
|
{
|
||||||
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user