ATV Modulator: generic line type determination

pull/27/head
f4exb 2017-03-11 23:45:21 +01:00
rodzic 5baaacb2ed
commit 3b11291dc2
1 zmienionych plików z 59 dodań i 4 usunięć

Wyświetl plik

@ -177,14 +177,69 @@ void ATVMod::modulateSample()
void ATVMod::pullVideo(Real& sample)
{
if ((m_lineCount < 5 + m_nbBlankLines) || (m_lineCount > 621) || ((m_lineCount > 309) && (m_lineCount < 317 + m_nbBlankLines)))
if (m_interlaced)
{
int iLine = m_lineCount % m_nbLines2;
if (m_lineCount < m_nbLines2) // even image
{
if (iLine < m_nbSyncLinesHead)
{
pullVSyncLine(sample);
}
else
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)
{
pullVSyncLine(sample);
}
else if (m_lineCount < m_nbSyncLinesHead + m_nbBlankLines)
{
pullVSyncLine(sample); // pull black line
}
else if (m_lineCount < m_nbLines - 3)
{
pullImageLine(sample);
}
else
{
pullVSyncLine(sample);
}
}
if (m_horizontalCount < m_nbHorizPoints - 1)
{