mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-13 20:01:46 -05:00
ATV Modulator: added checkbox pattern
This commit is contained in:
parent
71d4776a93
commit
5e8f17ba8c
@ -145,7 +145,7 @@ void ATVMod::modulateSample()
|
|||||||
|
|
||||||
void ATVMod::pullVideo(Real& sample)
|
void ATVMod::pullVideo(Real& sample)
|
||||||
{
|
{
|
||||||
if ((m_lineCount < 21) || (m_lineCount > 621) || ((m_lineCount > 309) && (m_lineCount < 333)))
|
if ((m_lineCount < 5 + m_nbBlankLines) || (m_lineCount > 621) || ((m_lineCount > 309) && (m_lineCount < 317 + m_nbBlankLines)))
|
||||||
{
|
{
|
||||||
pullVSyncLine(sample);
|
pullVSyncLine(sample);
|
||||||
}
|
}
|
||||||
@ -318,16 +318,17 @@ void ATVMod::applyStandard()
|
|||||||
m_pointsPerFSync = (uint32_t) roundf(2.3f * m_pointsPerTU); // equalizing pulse (2.3/1.008 us)
|
m_pointsPerFSync = (uint32_t) roundf(2.3f * m_pointsPerTU); // equalizing pulse (2.3/1.008 us)
|
||||||
// what is left in a 64/1.008 us line for the image
|
// what is left in a 64/1.008 us line for the image
|
||||||
m_pointsPerImgLine = 64 * m_pointsPerTU - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
|
m_pointsPerImgLine = 64 * m_pointsPerTU - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
|
||||||
m_pointsPerHBar = 10 * m_pointsPerTU; // set a bar length to 10/1.008 us (~5 bars per line)
|
|
||||||
m_linesPerVBar = 30;
|
|
||||||
m_nbLines = 525;
|
m_nbLines = 525;
|
||||||
m_nbLines2 = 262;
|
m_nbLines2 = 262;
|
||||||
m_nbImageLines = 510;
|
m_nbImageLines = 510;
|
||||||
m_nbImageLines2 = 205;
|
m_nbImageLines2 = 205;
|
||||||
m_interlaced = true;
|
m_interlaced = true;
|
||||||
m_nbHorizPoints = 64 * m_pointsPerTU; // full line
|
m_nbHorizPoints = 64 * m_pointsPerTU; // full line
|
||||||
m_hBarIncrement = m_spanLevel / 5.0f;
|
m_nbBlankLines = 16;
|
||||||
m_vBarIncrement = m_spanLevel / 10.0f;
|
m_pointsPerHBar = m_pointsPerImgLine / 6;
|
||||||
|
m_linesPerVBar = m_nbImageLines2 / 6;
|
||||||
|
m_hBarIncrement = m_spanLevel / 6.0f;
|
||||||
|
m_vBarIncrement = m_spanLevel / 6.0f;
|
||||||
break;
|
break;
|
||||||
case ATVStdPAL625:
|
case ATVStdPAL625:
|
||||||
default:
|
default:
|
||||||
@ -337,15 +338,16 @@ void ATVMod::applyStandard()
|
|||||||
m_pointsPerFSync = (uint32_t) roundf(2.3f * m_pointsPerTU); // equalizing pulse (2.3 us)
|
m_pointsPerFSync = (uint32_t) roundf(2.3f * m_pointsPerTU); // equalizing pulse (2.3 us)
|
||||||
// what is left in a 64 us line for the image
|
// what is left in a 64 us line for the image
|
||||||
m_pointsPerImgLine = 64 * m_pointsPerTU - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
|
m_pointsPerImgLine = 64 * m_pointsPerTU - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
|
||||||
m_pointsPerHBar = 10 * m_pointsPerTU; // set a bar length to 10 us (~5 bars per line)
|
|
||||||
m_linesPerVBar = 30;
|
|
||||||
m_nbLines = 625;
|
m_nbLines = 625;
|
||||||
m_nbLines2 = 312;
|
m_nbLines2 = 312;
|
||||||
m_nbImageLines = 610;
|
m_nbImageLines = 610;
|
||||||
m_nbImageLines2 = 305;
|
m_nbImageLines2 = 305;
|
||||||
m_interlaced = true;
|
m_interlaced = true;
|
||||||
m_nbHorizPoints = 64 * m_pointsPerTU; // full line
|
m_nbHorizPoints = 64 * m_pointsPerTU; // full line
|
||||||
m_hBarIncrement = m_spanLevel / 5.0f;
|
m_nbBlankLines = 16;
|
||||||
m_vBarIncrement = m_spanLevel / 10.0f;
|
m_pointsPerHBar = m_pointsPerImgLine / 6;
|
||||||
|
m_linesPerVBar = m_nbImageLines2 / 6;
|
||||||
|
m_hBarIncrement = m_spanLevel / 6.0f;
|
||||||
|
m_vBarIncrement = m_spanLevel / 6.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
ATVModInputUniform,
|
ATVModInputUniform,
|
||||||
ATVModInputHBars,
|
ATVModInputHBars,
|
||||||
ATVModInputVBars,
|
ATVModInputVBars,
|
||||||
|
ATVModInputCheckbox,
|
||||||
ATVModInputHGradient,
|
ATVModInputHGradient,
|
||||||
ATVModInputVGradient
|
ATVModInputVGradient
|
||||||
} ATVModInput;
|
} ATVModInput;
|
||||||
@ -171,6 +172,7 @@ private:
|
|||||||
uint32_t m_nbImageLines;
|
uint32_t m_nbImageLines;
|
||||||
uint32_t m_nbImageLines2;
|
uint32_t m_nbImageLines2;
|
||||||
uint32_t m_nbHorizPoints; //!< number of line points per horizontal line
|
uint32_t m_nbHorizPoints; //!< number of line points per horizontal line
|
||||||
|
uint32_t m_nbBlankLines;
|
||||||
float m_hBarIncrement;
|
float m_hBarIncrement;
|
||||||
float m_vBarIncrement;
|
float m_vBarIncrement;
|
||||||
bool m_interlaced; //!< true if image is interlaced (2 half frames per frame)
|
bool m_interlaced; //!< true if image is interlaced (2 half frames per frame)
|
||||||
@ -218,6 +220,10 @@ private:
|
|||||||
case ATVModInputVBars:
|
case ATVModInputVBars:
|
||||||
sample = (iLine / m_linesPerVBar) * m_vBarIncrement + m_blackLevel;
|
sample = (iLine / m_linesPerVBar) * m_vBarIncrement + m_blackLevel;
|
||||||
break;
|
break;
|
||||||
|
case ATVModInputCheckbox:
|
||||||
|
|
||||||
|
sample = (((iLine / m_linesPerVBar)*5 + (pointIndex / m_pointsPerHBar)) % 2) * m_spanLevel * m_running.m_uniformLevel + m_blackLevel;
|
||||||
|
break;
|
||||||
case ATVModInputHGradient:
|
case ATVModInputHGradient:
|
||||||
sample = (pointIndex / (float) m_pointsPerImgLine) * m_spanLevel + m_blackLevel;
|
sample = (pointIndex / (float) m_pointsPerImgLine) * m_spanLevel + m_blackLevel;
|
||||||
break;
|
break;
|
||||||
|
@ -370,6 +370,11 @@
|
|||||||
<string>V Bars</string>
|
<string>V Bars</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Chekbox</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>H Grad</string>
|
<string>H Grad</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user