mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-11 10:12:37 -04:00
ATV: implemented short vsync non interleaved mode
This commit is contained in:
parent
e650f6d5bb
commit
efad6f948c
@ -64,6 +64,7 @@ ATVDemod::ATVDemod(BasebandSampleSink* objScopeSink) :
|
|||||||
m_intNumberSamplePerLine=0;
|
m_intNumberSamplePerLine=0;
|
||||||
m_intSynchroPoints=0;
|
m_intSynchroPoints=0;
|
||||||
m_intNumberOfLines=0;
|
m_intNumberOfLines=0;
|
||||||
|
m_interleaved = true;
|
||||||
|
|
||||||
m_objMagSqAverage.resize(32, 1.0);
|
m_objMagSqAverage.resize(32, 1.0);
|
||||||
|
|
||||||
@ -471,7 +472,7 @@ void ATVDemod::demod(Complex& c)
|
|||||||
m_fltAmpLineAverage=0.0f;
|
m_fltAmpLineAverage=0.0f;
|
||||||
|
|
||||||
//New line + Interleaving
|
//New line + Interleaving
|
||||||
m_intRowIndex += 2;
|
m_intRowIndex += m_interleaved ? 2 : 1;
|
||||||
|
|
||||||
if (m_intRowIndex < m_intNumberOfLines)
|
if (m_intRowIndex < m_intNumberOfLines)
|
||||||
{
|
{
|
||||||
@ -500,7 +501,7 @@ void ATVDemod::demod(Complex& c)
|
|||||||
{
|
{
|
||||||
m_blnVerticalSynchroDetected = true; // prevent repetition
|
m_blnVerticalSynchroDetected = true; // prevent repetition
|
||||||
|
|
||||||
if (m_intLineIndex % 2 == 0) // even => odd image
|
if ((m_intLineIndex % 2 == 0) || !m_interleaved) // even => odd image
|
||||||
{
|
{
|
||||||
m_objRegisteredATVScreen->renderImage(0);
|
m_objRegisteredATVScreen->renderImage(0);
|
||||||
|
|
||||||
@ -780,31 +781,41 @@ void ATVDemod::applyStandard()
|
|||||||
{
|
{
|
||||||
switch(m_objConfig.m_enmATVStandard)
|
switch(m_objConfig.m_enmATVStandard)
|
||||||
{
|
{
|
||||||
case ATVStdShortInterleaved: // Follows loosely the 405 lines standard
|
case ATVStdShort:
|
||||||
// what is left in a line for the image
|
// what is left in a line for the image
|
||||||
m_intNumberOfSyncLines = 4;
|
m_intNumberOfSyncLines = 4;
|
||||||
m_intNumberOfBlackLines = 4;
|
m_intNumberOfBlackLines = 4;
|
||||||
|
m_interleaved = false;
|
||||||
|
break;
|
||||||
|
case ATVStdShortInterleaved:
|
||||||
|
// what is left in a line for the image
|
||||||
|
m_intNumberOfSyncLines = 4;
|
||||||
|
m_intNumberOfBlackLines = 4;
|
||||||
|
m_interleaved = true;
|
||||||
break;
|
break;
|
||||||
case ATVStd405: // Follows loosely the 405 lines standard
|
case ATVStd405: // Follows loosely the 405 lines standard
|
||||||
// what is left in a ine for the image
|
// what is left in a ine for the image
|
||||||
m_intNumberOfSyncLines = 24; // (15+7)*2 - 20
|
m_intNumberOfSyncLines = 24; // (15+7)*2 - 20
|
||||||
m_intNumberOfBlackLines = 28; // above + 4
|
m_intNumberOfBlackLines = 28; // above + 4
|
||||||
|
m_interleaved = true;
|
||||||
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
|
// what is left in a 64/1.008 us line for the image
|
||||||
m_intNumberOfSyncLines = 40; // (15+15)*2 - 20
|
m_intNumberOfSyncLines = 40; // (15+15)*2 - 20
|
||||||
m_intNumberOfBlackLines = 44; // above + 4
|
m_intNumberOfBlackLines = 44; // above + 4
|
||||||
|
m_interleaved = true;
|
||||||
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
|
// what is left in a 64 us line for the image
|
||||||
m_intNumberOfSyncLines = 44; // (15+17)*2 - 20
|
m_intNumberOfSyncLines = 44; // (15+17)*2 - 20
|
||||||
m_intNumberOfBlackLines = 48; // above + 4
|
m_intNumberOfBlackLines = 48; // above + 4
|
||||||
|
m_interleaved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for now all standards apply this
|
// for now all standards apply this
|
||||||
m_intNumberSamplePerLineSignals = (int) ((12.0f/64.0f)*m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate); // 12.0 = 7.3 + 4.7
|
m_intNumberSamplePerLineSignals = (int) ((12.0f/64.0f)*m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate); // 12.0 = 7.3 + 4.7
|
||||||
m_intNumberSaplesPerHSync = (int) ((9.4f/64.0f)*m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate); // 9.4 = 4.7 + 4.7
|
m_intNumberSaplesPerHSync = (int) ((9.6f/64.0f)*m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate); // 9.4 = 4.7 + 4.7
|
||||||
}
|
}
|
||||||
|
|
||||||
int ATVDemod::getSampleRate()
|
int ATVDemod::getSampleRate()
|
||||||
|
@ -50,7 +50,8 @@ public:
|
|||||||
ATVStdPAL625,
|
ATVStdPAL625,
|
||||||
ATVStdPAL525,
|
ATVStdPAL525,
|
||||||
ATVStd405,
|
ATVStd405,
|
||||||
ATVStdShortInterleaved
|
ATVStdShortInterleaved,
|
||||||
|
ATVStdShort
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ATVModulation {
|
enum ATVModulation {
|
||||||
@ -350,6 +351,7 @@ private:
|
|||||||
int m_intNumberOfBlackLines; //!< this is the total number of lines not part of the image and is used for vertical screen size
|
int m_intNumberOfBlackLines; //!< this is the total number of lines not part of the image and is used for vertical screen size
|
||||||
int m_intNumberSamplePerLineSignals; //!< number of samples in the non image part of the line (signals)
|
int m_intNumberSamplePerLineSignals; //!< number of samples in the non image part of the line (signals)
|
||||||
int m_intNumberSaplesPerHSync; //!< number of samples per horizontal synchronization pattern (pulse + back porch)
|
int m_intNumberSaplesPerHSync; //!< number of samples per horizontal synchronization pattern (pulse + back porch)
|
||||||
|
bool m_interleaved; //!< interleaved image
|
||||||
|
|
||||||
//*************** PROCESSING ***************
|
//*************** PROCESSING ***************
|
||||||
|
|
||||||
|
@ -576,6 +576,11 @@
|
|||||||
<string>SHi</string>
|
<string>SHi</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>SHni</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -808,7 +808,6 @@ void ATVMod::applyStandard()
|
|||||||
m_nbHorizPoints = m_pointsPerLine;
|
m_nbHorizPoints = m_pointsPerLine;
|
||||||
|
|
||||||
m_pointsPerHBar = m_pointsPerImgLine / m_nbBars;
|
m_pointsPerHBar = m_pointsPerImgLine / m_nbBars;
|
||||||
m_linesPerVBar = m_nbImageLines2 / m_nbBars;
|
|
||||||
m_hBarIncrement = m_spanLevel / (float) m_nbBars;
|
m_hBarIncrement = m_spanLevel / (float) m_nbBars;
|
||||||
m_vBarIncrement = m_spanLevel / (float) m_nbBars;
|
m_vBarIncrement = m_spanLevel / (float) m_nbBars;
|
||||||
|
|
||||||
@ -826,6 +825,22 @@ void ATVMod::applyStandard()
|
|||||||
|
|
||||||
switch(m_config.m_atvStd)
|
switch(m_config.m_atvStd)
|
||||||
{
|
{
|
||||||
|
case ATVStdShort: // Follows loosely the 405 lines standard
|
||||||
|
// 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_nbImageLines2 = m_nbImageLines; // force non interleaved for vbars
|
||||||
|
m_interleaved = false;
|
||||||
|
m_nbSyncLinesHeadE = 1; // number of sync lines on the top of a frame even
|
||||||
|
m_nbSyncLinesHeadO = 1; // number of sync lines on the top of a frame odd
|
||||||
|
m_nbSyncLinesBottom = 0;
|
||||||
|
m_nbLongSyncLines = 1;
|
||||||
|
m_nbHalfLongSync = 0;
|
||||||
|
m_nbWholeEqLines = 0;
|
||||||
|
m_singleLongSync = true;
|
||||||
|
m_nbBlankLines = 1;
|
||||||
|
m_blankLineLvel = 0.7f;
|
||||||
|
m_nbLines2 = m_nbLines; // force non interleaved => treated as even for all lines
|
||||||
|
break;
|
||||||
case ATVStdShortInterleaved: // Follows loosely the 405 lines standard
|
case ATVStdShortInterleaved: // Follows loosely the 405 lines standard
|
||||||
// what is left in a 64 us line for the image
|
// 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
|
||||||
@ -888,6 +903,8 @@ void ATVMod::applyStandard()
|
|||||||
m_blankLineLvel = m_blackLevel;
|
m_blankLineLvel = m_blackLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_linesPerVBar = m_nbImageLines2 / m_nbBars;
|
||||||
|
|
||||||
if (m_imageOK)
|
if (m_imageOK)
|
||||||
{
|
{
|
||||||
resizeImage();
|
resizeImage();
|
||||||
|
@ -43,7 +43,8 @@ public:
|
|||||||
ATVStdPAL625,
|
ATVStdPAL625,
|
||||||
ATVStdPAL525,
|
ATVStdPAL525,
|
||||||
ATVStd405,
|
ATVStd405,
|
||||||
ATVStdShortInterleaved
|
ATVStdShortInterleaved,
|
||||||
|
ATVStdShort,
|
||||||
} ATVStd;
|
} ATVStd;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -634,6 +634,11 @@
|
|||||||
<string>SHi</string>
|
<string>SHi</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>SHni</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user