1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

ATV mod: corrected line timings and created a diagonal pattern

This commit is contained in:
f4exb 2020-07-21 23:52:30 +02:00
parent d67174ef8d
commit 31555e4476
4 changed files with 12 additions and 3 deletions

View File

@ -760,6 +760,11 @@
<string>V Grad</string>
</property>
</item>
<item>
<property name="text">
<string>Diagonal</string>
</property>
</item>
<item>
<property name="text">
<string>Image</string>

View File

@ -44,6 +44,7 @@ struct ATVModSettings
ATVModInputChessboard,
ATVModInputHGradient,
ATVModInputVGradient,
ATVModInputDiagonal,
ATVModInputImage,
ATVModInputVideo,
ATVModInputCamera

View File

@ -517,8 +517,8 @@ float ATVModSource::getRFBandwidthDivisor(ATVModSettings::ATVModulation modulati
void ATVModSource::applyStandard(const ATVModSettings& settings)
{
m_pointsPerSync = (uint32_t) ((4.7f / 64.0f) * m_pointsPerLine);
m_pointsPerBP = (uint32_t) ((4.7f / 64.0f) * m_pointsPerLine);
m_pointsPerFP = (uint32_t) ((2.6f / 64.0f) * m_pointsPerLine);
m_pointsPerBP = (uint32_t) ((5.8f / 64.0f) * m_pointsPerLine);
m_pointsPerFP = (uint32_t) ((1.5f / 64.0f) * m_pointsPerLine);
m_pointsPerFSync = (uint32_t) ((2.3f / 64.0f) * m_pointsPerLine);
m_pointsPerImgLine = m_pointsPerLine - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;

View File

@ -144,7 +144,7 @@ private:
int m_pointsPerBP; //!< number of line points for the back porch
int m_pointsPerImgLine; //!< number of line points for the image line
uint32_t m_pointsPerFP; //!< number of line points for the front porch
int m_pointsPerFSync; //!< number of line points for the field first sync
int m_pointsPerFSync; //!< number of line points for the field first sync - a.k.a Equalizing pulse
uint32_t m_pointsPerHBar; //!< number of line points for a bar of the bar chart
uint32_t m_linesPerVBar; //!< number of lines for a bar of the bar chart
uint32_t m_pointsPerTU; //!< number of line points per time unit
@ -276,6 +276,9 @@ private:
case ATVModSettings::ATVModInputVGradient:
sample = ((iLine -5) / (float) m_nbImageLines2) * m_spanLevel + m_blackLevel;
break;
case ATVModSettings::ATVModInputDiagonal:
sample = pointIndex < (iLine * m_pointsPerImgLine) / m_nbLines2 ? m_blackLevel : m_settings.m_uniformLevel + m_blackLevel;
break;
case ATVModSettings::ATVModInputImage:
if (!m_imageOK || (iLineImage < -oddity) || m_image.empty())
{