mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 21:20:31 -05:00 
			
		
		
		
	ATV Modulator: implememted horizontal sync leap standard with very slow 60 and 32 lines modes
This commit is contained in:
		
							parent
							
								
									d046b7dd3e
								
							
						
					
					
						commit
						0a2223b7e0
					
				@ -288,6 +288,10 @@ void ATVMod::pullVideo(Real& sample)
 | 
				
			|||||||
            pullImageLine(sample);
 | 
					            pullImageLine(sample);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    else if (m_running.m_atvStd == ATVStdHLeap) // HLeap special
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        pullImageLine(sample, true); // pull image line without sync
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    else // odd image
 | 
					    else // odd image
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        int iLine = m_lineCount - m_nbLines2 - 1;
 | 
					        int iLine = m_lineCount - m_nbLines2 - 1;
 | 
				
			||||||
@ -825,8 +829,22 @@ void ATVMod::applyStandard()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    switch(m_config.m_atvStd)
 | 
					    switch(m_config.m_atvStd)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
    case ATVStdShort: // Follows loosely the 405 lines standard
 | 
					    case ATVStdHLeap:
 | 
				
			||||||
        // what is left in a 64 us line for the image
 | 
					        m_nbImageLines     = m_nbLines; // lines less the total number of sync lines
 | 
				
			||||||
 | 
					        m_nbImageLines2    = m_nbImageLines; // force non interleaved for vbars
 | 
				
			||||||
 | 
					        m_interleaved       = false;
 | 
				
			||||||
 | 
					        m_nbSyncLinesHeadE = 0; // number of sync lines on the top of a frame even
 | 
				
			||||||
 | 
					        m_nbSyncLinesHeadO = 0; // number of sync lines on the top of a frame odd
 | 
				
			||||||
 | 
					        m_nbSyncLinesBottom = -1; // force no vsync in even block
 | 
				
			||||||
 | 
					        m_nbLongSyncLines  = 0;
 | 
				
			||||||
 | 
					        m_nbHalfLongSync   = 0;
 | 
				
			||||||
 | 
					        m_nbWholeEqLines   = 0;
 | 
				
			||||||
 | 
					        m_singleLongSync   = true;
 | 
				
			||||||
 | 
					        m_nbBlankLines     = 0;
 | 
				
			||||||
 | 
					        m_blankLineLvel    = 0.7f;
 | 
				
			||||||
 | 
					        m_nbLines2         = m_nbLines - 2; // force last line to slip from the even block
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					    case ATVStdShort:
 | 
				
			||||||
        m_nbImageLines     = m_nbLines - 2; // lines less the total number of sync lines
 | 
					        m_nbImageLines     = m_nbLines - 2; // lines less the total number of sync lines
 | 
				
			||||||
        m_nbImageLines2    = m_nbImageLines; // force non interleaved for vbars
 | 
					        m_nbImageLines2    = m_nbImageLines; // force non interleaved for vbars
 | 
				
			||||||
        m_interleaved       = false;
 | 
					        m_interleaved       = false;
 | 
				
			||||||
@ -841,8 +859,7 @@ void ATVMod::applyStandard()
 | 
				
			|||||||
        m_blankLineLvel    = 0.7f;
 | 
					        m_blankLineLvel    = 0.7f;
 | 
				
			||||||
        m_nbLines2         = m_nbLines; // force non interleaved => treated as even for all lines
 | 
					        m_nbLines2         = m_nbLines; // force non interleaved => treated as even for all lines
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case ATVStdShortInterleaved: // Follows loosely the 405 lines standard
 | 
					    case ATVStdShortInterleaved:
 | 
				
			||||||
        // what is left in a 64 us line for the image
 | 
					 | 
				
			||||||
        m_nbImageLines     = m_nbLines - 2; // lines less the total number of sync lines
 | 
					        m_nbImageLines     = m_nbLines - 2; // lines less the total number of sync lines
 | 
				
			||||||
        m_nbImageLines2    = m_nbImageLines / 2;
 | 
					        m_nbImageLines2    = m_nbImageLines / 2;
 | 
				
			||||||
        m_interleaved       = true;
 | 
					        m_interleaved       = true;
 | 
				
			||||||
@ -857,7 +874,6 @@ void ATVMod::applyStandard()
 | 
				
			|||||||
        m_blankLineLvel    = 0.7f;
 | 
					        m_blankLineLvel    = 0.7f;
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case ATVStd405: // Follows loosely the 405 lines standard
 | 
					    case ATVStd405: // Follows loosely the 405 lines standard
 | 
				
			||||||
        // what is left in a 64 us line for the image
 | 
					 | 
				
			||||||
        m_nbImageLines     = m_nbLines - 15; // lines less the total number of sync lines
 | 
					        m_nbImageLines     = m_nbLines - 15; // lines less the total number of sync lines
 | 
				
			||||||
        m_nbImageLines2    = m_nbImageLines / 2;
 | 
					        m_nbImageLines2    = m_nbImageLines / 2;
 | 
				
			||||||
        m_interleaved       = true;
 | 
					        m_interleaved       = true;
 | 
				
			||||||
@ -872,7 +888,6 @@ void ATVMod::applyStandard()
 | 
				
			|||||||
        m_blankLineLvel    = m_blackLevel;
 | 
					        m_blankLineLvel    = m_blackLevel;
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case ATVStdPAL525: // Follows PAL-M standard
 | 
					    case ATVStdPAL525: // Follows PAL-M standard
 | 
				
			||||||
        // what is left in a 64/1.008 us line for the image
 | 
					 | 
				
			||||||
        m_nbImageLines     = m_nbLines - 15;
 | 
					        m_nbImageLines     = m_nbLines - 15;
 | 
				
			||||||
        m_nbImageLines2    = m_nbImageLines / 2;
 | 
					        m_nbImageLines2    = m_nbImageLines / 2;
 | 
				
			||||||
        m_interleaved       = true;
 | 
					        m_interleaved       = true;
 | 
				
			||||||
@ -888,7 +903,6 @@ void ATVMod::applyStandard()
 | 
				
			|||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case ATVStdPAL625: // Follows PAL-B/G/H standard
 | 
					    case ATVStdPAL625: // Follows PAL-B/G/H standard
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        // what is left in a 64 us line for the image
 | 
					 | 
				
			||||||
        m_nbImageLines     = m_nbLines - 15;
 | 
					        m_nbImageLines     = m_nbLines - 15;
 | 
				
			||||||
        m_nbImageLines2    = m_nbImageLines / 2;
 | 
					        m_nbImageLines2    = m_nbImageLines / 2;
 | 
				
			||||||
        m_interleaved       = true;
 | 
					        m_interleaved       = true;
 | 
				
			||||||
 | 
				
			|||||||
@ -45,6 +45,7 @@ public:
 | 
				
			|||||||
		ATVStd405,
 | 
							ATVStd405,
 | 
				
			||||||
		ATVStdShortInterleaved,
 | 
							ATVStdShortInterleaved,
 | 
				
			||||||
		ATVStdShort,
 | 
							ATVStdShort,
 | 
				
			||||||
 | 
							ATVStdHLeap,
 | 
				
			||||||
    } ATVStd;
 | 
					    } ATVStd;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    typedef enum
 | 
					    typedef enum
 | 
				
			||||||
@ -721,11 +722,11 @@ private:
 | 
				
			|||||||
    void resizeCamera();
 | 
					    void resizeCamera();
 | 
				
			||||||
    void mixImageAndText(cv::Mat& image);
 | 
					    void mixImageAndText(cv::Mat& image);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    inline void pullImageLine(Real& sample)
 | 
					    inline void pullImageLine(Real& sample, bool noHSync = false)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (m_horizontalCount < m_pointsPerSync) // sync pulse
 | 
					        if (m_horizontalCount < m_pointsPerSync) // sync pulse
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            sample = 0.0f; // ultra-black
 | 
					            sample = noHSync ? m_blackLevel : 0.0f; // ultra-black
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (m_horizontalCount < m_pointsPerSync + m_pointsPerBP) // back porch
 | 
					        else if (m_horizontalCount < m_pointsPerSync + m_pointsPerBP) // back porch
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
				
			|||||||
@ -288,6 +288,12 @@ int ATVModGUI::getNbLines()
 | 
				
			|||||||
    case 6:
 | 
					    case 6:
 | 
				
			||||||
        return 90;
 | 
					        return 90;
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
					    case 7:
 | 
				
			||||||
 | 
					        return 60;
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					    case 8:
 | 
				
			||||||
 | 
					        return 32;
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
    case 0:
 | 
					    case 0:
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        return 625;
 | 
					        return 625;
 | 
				
			||||||
 | 
				
			|||||||
@ -574,6 +574,16 @@
 | 
				
			|||||||
          <string>90</string>
 | 
					          <string>90</string>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
        </item>
 | 
					        </item>
 | 
				
			||||||
 | 
					        <item>
 | 
				
			||||||
 | 
					         <property name="text">
 | 
				
			||||||
 | 
					          <string>60</string>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
 | 
					        </item>
 | 
				
			||||||
 | 
					        <item>
 | 
				
			||||||
 | 
					         <property name="text">
 | 
				
			||||||
 | 
					          <string>32</string>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
 | 
					        </item>
 | 
				
			||||||
       </widget>
 | 
					       </widget>
 | 
				
			||||||
      </item>
 | 
					      </item>
 | 
				
			||||||
      <item>
 | 
					      <item>
 | 
				
			||||||
@ -656,7 +666,7 @@
 | 
				
			|||||||
        </item>
 | 
					        </item>
 | 
				
			||||||
        <item>
 | 
					        <item>
 | 
				
			||||||
         <property name="text">
 | 
					         <property name="text">
 | 
				
			||||||
          <string>405L</string>
 | 
					          <string>PAL405</string>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
        </item>
 | 
					        </item>
 | 
				
			||||||
        <item>
 | 
					        <item>
 | 
				
			||||||
@ -669,6 +679,11 @@
 | 
				
			|||||||
          <string>SHni</string>
 | 
					          <string>SHni</string>
 | 
				
			||||||
         </property>
 | 
					         </property>
 | 
				
			||||||
        </item>
 | 
					        </item>
 | 
				
			||||||
 | 
					        <item>
 | 
				
			||||||
 | 
					         <property name="text">
 | 
				
			||||||
 | 
					          <string>HLeap</string>
 | 
				
			||||||
 | 
					         </property>
 | 
				
			||||||
 | 
					        </item>
 | 
				
			||||||
       </widget>
 | 
					       </widget>
 | 
				
			||||||
      </item>
 | 
					      </item>
 | 
				
			||||||
      <item>
 | 
					      <item>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user