diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h
index fa0503b9a..2ef202e97 100644
--- a/plugins/channeltx/modatv/atvmod.h
+++ b/plugins/channeltx/modatv/atvmod.h
@@ -829,6 +829,84 @@ private:
}
}
+ inline void pullVSyncLineLongPulses(Real& sample)
+ {
+ int halfIndex = m_horizontalCount % (m_nbHorizPoints/2);
+
+ if (halfIndex < (m_nbHorizPoints/2) - m_pointsPerSync) // ultra-black
+ {
+ sample = 0.0f;
+ }
+ else // black
+ {
+ if (m_singleLongSync && (m_horizontalCount < m_nbHorizPoints/2)) {
+ sample = 0.0f;
+ } else {
+ sample = m_blackLevel;
+ }
+ }
+ }
+
+ inline void pullVSyncLineEqualizingPulses(Real& sample)
+ {
+ if (m_horizontalCount < m_pointsPerSync)
+ {
+ sample = 0.0f; // ultra-black
+ }
+ else if (m_horizontalCount < (m_nbHorizPoints/2))
+ {
+ sample = m_blackLevel; // black
+ }
+ else if (m_horizontalCount < (m_nbHorizPoints/2) + m_pointsPerFSync)
+ {
+ sample = 0.0f; // ultra-black
+ }
+ else
+ {
+ sample = m_blackLevel; // black
+ }
+ }
+
+ inline void pullVSyncLineEqualizingThenLongPulses(Real& sample)
+ {
+ if (m_horizontalCount < m_pointsPerSync)
+ {
+ sample = 0.0f; // ultra-black
+ }
+ else if (m_horizontalCount < (m_nbHorizPoints/2))
+ {
+ sample = m_blackLevel; // black
+ }
+ else if (m_horizontalCount < m_nbHorizPoints - m_pointsPerSync)
+ {
+ sample = 0.0f; // ultra-black
+ }
+ else
+ {
+ sample = m_blackLevel; // black
+ }
+ }
+
+ inline void pullVSyncLineLongThenEqualizingPulses(Real& sample)
+ {
+ if (m_horizontalCount < (m_nbHorizPoints/2) - m_pointsPerSync)
+ {
+ sample = 0.0f; // ultra-black
+ }
+ else if (m_horizontalCount < (m_nbHorizPoints/2))
+ {
+ sample = m_blackLevel; // black
+ }
+ else if (m_horizontalCount < (m_nbHorizPoints/2) + m_pointsPerFSync)
+ {
+ sample = 0.0f; // ultra-black
+ }
+ else
+ {
+ sample = m_blackLevel; // black
+ }
+ }
+
inline void pullVSyncLine(Real& sample)
{
if (m_lineCount < m_nbLines2 + 1) // even
@@ -837,80 +915,23 @@ private:
if (fieldLine < m_nbLongSyncLines) // 0,1: Whole line "long" pulses
{
- int halfIndex = m_horizontalCount % (m_nbHorizPoints/2);
-
- if (halfIndex < (m_nbHorizPoints/2) - m_pointsPerSync) // ultra-black
- {
- sample = 0.0f;
- }
- else // black
- {
- sample = m_blackLevel;
- }
+ pullVSyncLineLongPulses(sample);
}
else if (fieldLine < m_nbLongSyncLines + m_nbHalfLongSync) // long pulse then equalizing pulse
{
- if (m_horizontalCount < (m_nbHorizPoints/2) - m_pointsPerSync)
- {
- sample = 0.0f; // ultra-black
- }
- else if (m_horizontalCount < (m_nbHorizPoints/2))
- {
- sample = m_blackLevel; // black
- }
- else if (m_horizontalCount < (m_nbHorizPoints/2) + m_pointsPerFSync)
- {
- sample = 0.0f; // ultra-black
- }
- else
- {
- sample = m_blackLevel; // black
- }
+ pullVSyncLineLongThenEqualizingPulses(sample);
}
else if (fieldLine < m_nbLongSyncLines + m_nbHalfLongSync + m_nbWholeEqLines) // Whole line equalizing pulses
{
- int halfIndex = m_horizontalCount % (m_nbHorizPoints/2);
-
- if (halfIndex < m_pointsPerFSync) // ultra-black
- {
- sample = 0.0f;
- }
- else // black
- {
- sample = m_blackLevel;
- }
+ pullVSyncLineEqualizingPulses(sample);
}
else if (fieldLine > m_nbLines2 - m_nbHalfLongSync) // equalizing pulse then long pulse
{
- if (m_horizontalCount < m_pointsPerFSync)
- {
- sample = 0.0f; // ultra-black
- }
- else if (m_horizontalCount < (m_nbHorizPoints/2))
- {
- sample = m_blackLevel; // black
- }
- else if (m_horizontalCount < m_nbHorizPoints - m_pointsPerSync)
- {
- sample = 0.0f; // ultra-black
- }
- else
- {
- sample = m_blackLevel; // black
- }
+ pullVSyncLineEqualizingThenLongPulses(sample);
}
else if (fieldLine > m_nbLines2 - m_nbHalfLongSync - m_nbWholeEqLines) // Whole line equalizing pulses
{
- int halfIndex = m_horizontalCount % (m_nbHorizPoints/2);
-
- if (halfIndex < m_pointsPerFSync) // ultra-black
- {
- sample = 0.0f;
- }
- else // black
- {
- sample = m_blackLevel;
- }
+ pullVSyncLineEqualizingPulses(sample);
}
else // black images
{
@@ -930,42 +951,15 @@ private:
if (fieldLine < m_nbLongSyncLines) // 0,1: Whole line "long" pulses
{
- int halfIndex = m_horizontalCount % (m_nbHorizPoints/2);
-
- if (halfIndex < (m_nbHorizPoints/2) - m_pointsPerSync) // ultra-black
- {
- sample = 0.0f;
- }
- else // black
- {
- sample = m_blackLevel;
- }
+ pullVSyncLineLongPulses(sample);
}
else if (fieldLine < m_nbLongSyncLines + m_nbWholeEqLines) // Whole line equalizing pulses
{
- int halfIndex = m_horizontalCount % (m_nbHorizPoints/2);
-
- if (halfIndex < m_pointsPerFSync) // ultra-black
- {
- sample = 0.0f;
- }
- else // black
- {
- sample = m_blackLevel;
- }
+ pullVSyncLineEqualizingPulses(sample);
}
else if (fieldLine > m_nbLines2 - 1 - m_nbWholeEqLines - m_nbHalfLongSync) // Whole line equalizing pulses
{
- int halfIndex = m_horizontalCount % (m_nbHorizPoints/2);
-
- if (halfIndex < m_pointsPerFSync) // ultra-black
- {
- sample = 0.0f;
- }
- else // black
- {
- sample = m_blackLevel;
- }
+ pullVSyncLineEqualizingPulses(sample);
}
else // black images
{
diff --git a/plugins/channeltx/modatv/atvmodgui.cpp b/plugins/channeltx/modatv/atvmodgui.cpp
index 631441ce4..699243658 100644
--- a/plugins/channeltx/modatv/atvmodgui.cpp
+++ b/plugins/channeltx/modatv/atvmodgui.cpp
@@ -276,6 +276,18 @@ int ATVModGUI::getNbLines()
case 2:
return 405;
break;
+ case 3:
+ return 343;
+ break;
+ case 4:
+ return 240;
+ break;
+ case 5:
+ return 180;
+ break;
+ case 6:
+ return 90;
+ break;
case 0:
default:
return 625;
@@ -296,6 +308,12 @@ int ATVModGUI::getFPS()
case 3:
return 16;
break;
+ case 4:
+ return 12;
+ break;
+ case 5:
+ return 10;
+ break;
case 1:
default:
return 25;
diff --git a/plugins/channeltx/modatv/atvmodgui.ui b/plugins/channeltx/modatv/atvmodgui.ui
index c97bb5c19..d203b6fac 100644
--- a/plugins/channeltx/modatv/atvmodgui.ui
+++ b/plugins/channeltx/modatv/atvmodgui.ui
@@ -554,6 +554,26 @@
405
+ -
+
+ 343
+
+
+ -
+
+ 240
+
+
+ -
+
+ 180
+
+
+ -
+
+ 90
+
+
-
@@ -594,6 +614,16 @@
16
+ -
+
+ 12
+
+
+ -
+
+ 10
+
+
-