diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index b54cfae99..088ae8b6f 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -145,7 +145,7 @@ void ATVMod::modulateSample() 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); } @@ -318,16 +318,17 @@ void ATVMod::applyStandard() 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 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_nbLines2 = 262; m_nbImageLines = 510; m_nbImageLines2 = 205; m_interlaced = true; m_nbHorizPoints = 64 * m_pointsPerTU; // full line - m_hBarIncrement = m_spanLevel / 5.0f; - m_vBarIncrement = m_spanLevel / 10.0f; + m_nbBlankLines = 16; + m_pointsPerHBar = m_pointsPerImgLine / 6; + m_linesPerVBar = m_nbImageLines2 / 6; + m_hBarIncrement = m_spanLevel / 6.0f; + m_vBarIncrement = m_spanLevel / 6.0f; break; case ATVStdPAL625: default: @@ -337,15 +338,16 @@ void ATVMod::applyStandard() 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 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_nbLines2 = 312; m_nbImageLines = 610; m_nbImageLines2 = 305; m_interlaced = true; m_nbHorizPoints = 64 * m_pointsPerTU; // full line - m_hBarIncrement = m_spanLevel / 5.0f; - m_vBarIncrement = m_spanLevel / 10.0f; + m_nbBlankLines = 16; + m_pointsPerHBar = m_pointsPerImgLine / 6; + m_linesPerVBar = m_nbImageLines2 / 6; + m_hBarIncrement = m_spanLevel / 6.0f; + m_vBarIncrement = m_spanLevel / 6.0f; } } diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 4ad46865a..b7b8c8e99 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -43,6 +43,7 @@ public: ATVModInputUniform, ATVModInputHBars, ATVModInputVBars, + ATVModInputCheckbox, ATVModInputHGradient, ATVModInputVGradient } ATVModInput; @@ -171,6 +172,7 @@ private: uint32_t m_nbImageLines; uint32_t m_nbImageLines2; uint32_t m_nbHorizPoints; //!< number of line points per horizontal line + uint32_t m_nbBlankLines; float m_hBarIncrement; float m_vBarIncrement; bool m_interlaced; //!< true if image is interlaced (2 half frames per frame) @@ -218,6 +220,10 @@ private: case ATVModInputVBars: sample = (iLine / m_linesPerVBar) * m_vBarIncrement + m_blackLevel; break; + case ATVModInputCheckbox: + + sample = (((iLine / m_linesPerVBar)*5 + (pointIndex / m_pointsPerHBar)) % 2) * m_spanLevel * m_running.m_uniformLevel + m_blackLevel; + break; case ATVModInputHGradient: sample = (pointIndex / (float) m_pointsPerImgLine) * m_spanLevel + m_blackLevel; break; diff --git a/plugins/channeltx/modatv/atvmodgui.ui b/plugins/channeltx/modatv/atvmodgui.ui index 296ea7389..b595d9e01 100644 --- a/plugins/channeltx/modatv/atvmodgui.ui +++ b/plugins/channeltx/modatv/atvmodgui.ui @@ -370,6 +370,11 @@ V Bars + + + Chekbox + + H Grad