mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05: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)
|
||||
{
|
||||
if (m_interlaced)
|
||||
{
|
||||
int iLine = m_lineCount % m_nbLines2;
|
||||
int iLine = m_lineCount % m_nbLines2;
|
||||
|
||||
if (m_lineCount < m_nbLines2) // even image
|
||||
{
|
||||
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_nbLines2) // even image or non interlaced
|
||||
{
|
||||
if (m_lineCount < m_nbSyncLinesHead)
|
||||
if (iLine < m_nbSyncLinesHead)
|
||||
{
|
||||
pullVSyncLine(sample);
|
||||
}
|
||||
else if (m_lineCount < m_nbSyncLinesHead + m_nbBlankLines)
|
||||
else if (iLine < m_nbSyncLinesHead + m_nbBlankLines)
|
||||
{
|
||||
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);
|
||||
}
|
||||
@ -238,7 +216,6 @@ void ATVMod::pullVideo(Real& sample)
|
||||
{
|
||||
pullVSyncLine(sample);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (m_horizontalCount < m_nbHorizPoints - 1)
|
||||
|
@ -526,7 +526,7 @@ private:
|
||||
sample = ((iLine -5) / (float) m_nbImageLines2) * m_spanLevel + m_blackLevel;
|
||||
break;
|
||||
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;
|
||||
}
|
||||
@ -544,7 +544,7 @@ private:
|
||||
}
|
||||
break;
|
||||
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;
|
||||
}
|
||||
@ -562,7 +562,7 @@ private:
|
||||
}
|
||||
break;
|
||||
case ATVModInputCamera:
|
||||
if ((iLineImage < 0) || (m_cameraIndex < 0))
|
||||
if ((iLineImage < -oddity) || (m_cameraIndex < 0))
|
||||
{
|
||||
sample = m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user