mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-15 04:41:55 -05:00
AM Demodulator: implemented shortened interleaved sync standard for image formatting
This commit is contained in:
parent
c2d9de1926
commit
7ad19f0140
@ -94,6 +94,7 @@ void ATVDemod::configure(
|
||||
float fltTopDurationUs,
|
||||
float fltFramePerS,
|
||||
ATVStd enmATVStandard,
|
||||
int intNumberOfLines,
|
||||
float fltRatioOfRowsToDisplay,
|
||||
float fltVoltLevelSynchroTop,
|
||||
float fltVoltLevelSynchroBlack,
|
||||
@ -107,6 +108,7 @@ void ATVDemod::configure(
|
||||
fltTopDurationUs,
|
||||
fltFramePerS,
|
||||
enmATVStandard,
|
||||
intNumberOfLines,
|
||||
fltRatioOfRowsToDisplay,
|
||||
fltVoltLevelSynchroTop,
|
||||
fltVoltLevelSynchroBlack,
|
||||
@ -695,10 +697,13 @@ void ATVDemod::applySettings()
|
||||
|| (m_objConfig.m_intSampleRate != m_objRunning.m_intSampleRate)
|
||||
|| (m_objConfig.m_fltTopDuration != m_objRunning.m_fltTopDuration)
|
||||
|| (m_objConfig.m_fltRatioOfRowsToDisplay != m_objRunning.m_fltRatioOfRowsToDisplay)
|
||||
|| (m_objConfig.m_enmATVStandard != m_objRunning.m_enmATVStandard))
|
||||
|| (m_objConfig.m_enmATVStandard != m_objRunning.m_enmATVStandard)
|
||||
|| (m_objConfig.m_intNumberOfLines != m_objRunning.m_intNumberOfLines))
|
||||
{
|
||||
m_objSettingsMutex.lock();
|
||||
|
||||
m_intNumberOfLines = m_objConfig.m_intNumberOfLines;
|
||||
|
||||
applyStandard();
|
||||
|
||||
m_intNumberSamplePerLine = (int) (m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate);
|
||||
@ -772,21 +777,23 @@ void ATVDemod::applyStandard()
|
||||
{
|
||||
switch(m_objConfig.m_enmATVStandard)
|
||||
{
|
||||
case ATVStdShortInterleaved: // Follows loosely the 405 lines standard
|
||||
// what is left in a line for the image
|
||||
m_intNumberOfSyncLines = 4;
|
||||
m_intNumberOfBlackLines = 4;
|
||||
break;
|
||||
case ATVStd405: // Follows loosely the 405 lines standard
|
||||
m_intNumberOfLines = 405;
|
||||
// what is left in a 64 us line for the image
|
||||
// what is left in a ine for the image
|
||||
m_intNumberOfSyncLines = 24; // (15+7)*2 - 20
|
||||
m_intNumberOfBlackLines = 28; // above + 4
|
||||
break;
|
||||
case ATVStdPAL525: // Follows PAL-M standard
|
||||
m_intNumberOfLines = 525;
|
||||
// what is left in a 64/1.008 us line for the image
|
||||
m_intNumberOfSyncLines = 40; // (15+15)*2 - 20
|
||||
m_intNumberOfBlackLines = 44; // above + 4
|
||||
break;
|
||||
case ATVStdPAL625: // Follows PAL-B/G/H standard
|
||||
default:
|
||||
m_intNumberOfLines = 625;
|
||||
// what is left in a 64 us line for the image
|
||||
m_intNumberOfSyncLines = 44; // (15+17)*2 - 20
|
||||
m_intNumberOfBlackLines = 48; // above + 4
|
||||
|
@ -49,7 +49,8 @@ public:
|
||||
{
|
||||
ATVStdPAL625,
|
||||
ATVStdPAL525,
|
||||
ATVStd405
|
||||
ATVStd405,
|
||||
ATVStdShortInterleaved
|
||||
};
|
||||
|
||||
enum ATVModulation {
|
||||
@ -65,6 +66,7 @@ public:
|
||||
{
|
||||
int m_intSampleRate;
|
||||
ATVStd m_enmATVStandard;
|
||||
int m_intNumberOfLines;
|
||||
float m_fltLineDuration;
|
||||
float m_fltTopDuration;
|
||||
float m_fltFramePerS;
|
||||
@ -79,6 +81,7 @@ public:
|
||||
ATVConfig() :
|
||||
m_intSampleRate(0),
|
||||
m_enmATVStandard(ATVStdPAL625),
|
||||
m_intNumberOfLines(625),
|
||||
m_fltLineDuration(0.0f),
|
||||
m_fltTopDuration(0.0f),
|
||||
m_fltFramePerS(0.0f),
|
||||
@ -149,6 +152,7 @@ public:
|
||||
float fltTopDurationUs,
|
||||
float fltFramePerS,
|
||||
ATVStd enmATVStandard,
|
||||
int intNumberOfLines,
|
||||
float fltRatioOfRowsToDisplay,
|
||||
float fltVoltLevelSynchroTop,
|
||||
float fltVoltLevelSynchroBlack,
|
||||
@ -197,6 +201,7 @@ private:
|
||||
float fltTopDurationUs,
|
||||
float fltFramePerS,
|
||||
ATVStd enmATVStandard,
|
||||
int intNumberOfLines,
|
||||
float fltRatioOfRowsToDisplay,
|
||||
float fltVoltLevelSynchroTop,
|
||||
float fltVoltLevelSynchroBlack,
|
||||
@ -210,6 +215,7 @@ private:
|
||||
fltTopDurationUs,
|
||||
fltFramePerS,
|
||||
enmATVStandard,
|
||||
intNumberOfLines,
|
||||
fltRatioOfRowsToDisplay,
|
||||
fltVoltLevelSynchroTop,
|
||||
fltVoltLevelSynchroBlack,
|
||||
@ -227,6 +233,7 @@ private:
|
||||
float fltTopDurationUs,
|
||||
float fltFramePerS,
|
||||
ATVStd enmATVStandard,
|
||||
int intNumberOfLines,
|
||||
float flatRatioOfRowsToDisplay,
|
||||
float fltVoltLevelSynchroTop,
|
||||
float fltVoltLevelSynchroBlack,
|
||||
@ -240,6 +247,7 @@ private:
|
||||
m_objMsgConfig.m_fltVoltLevelSynchroTop = fltVoltLevelSynchroTop;
|
||||
m_objMsgConfig.m_fltFramePerS = fltFramePerS;
|
||||
m_objMsgConfig.m_enmATVStandard = enmATVStandard;
|
||||
m_objMsgConfig.m_intNumberOfLines = intNumberOfLines;
|
||||
m_objMsgConfig.m_fltLineDuration = fltLineDurationUs;
|
||||
m_objMsgConfig.m_fltTopDuration = fltTopDurationUs;
|
||||
m_objMsgConfig.m_fltRatioOfRowsToDisplay = flatRatioOfRowsToDisplay;
|
||||
|
@ -372,6 +372,7 @@ void ATVDemodGUI::applySettings()
|
||||
getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex()) * (4.7f / 64.0f) + ui->topTime->value() * m_fltTopTimeMultiplier,
|
||||
getFps(ui->fps->currentIndex()),
|
||||
(ATVDemod::ATVStd) ui->standard->currentIndex(),
|
||||
getNumberOfLines(ui->nbLines->currentIndex()),
|
||||
(ui->halfImage->checkState() == Qt::Checked) ? 0.5f : 1.0f,
|
||||
ui->synchLevel->value() / 1000.0f,
|
||||
ui->blackLevel->value() / 1000.0f,
|
||||
@ -723,3 +724,20 @@ float ATVDemodGUI::getNominalLineTime(int nbLinesIndex, int fpsIndex)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int ATVDemodGUI::getNumberOfLines(int nbLinesIndex)
|
||||
{
|
||||
switch(nbLinesIndex)
|
||||
{
|
||||
case 1:
|
||||
return 525;
|
||||
break;
|
||||
case 2:
|
||||
return 405;
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
return 625;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ private:
|
||||
void topTimeUpdate();
|
||||
static float getFps(int fpsIndex);
|
||||
static float getNominalLineTime(int nbLinesIndex, int fpsIndex);
|
||||
static int getNumberOfLines(int nbLinesIndex);
|
||||
|
||||
void leaveEvent(QEvent*);
|
||||
void enterEvent(QEvent*);
|
||||
|
@ -498,22 +498,28 @@
|
||||
<layout class="QHBoxLayout" name="buttonsLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="nbLines">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Nominal number of lines per frame</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>625 L</string>
|
||||
<string>625</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>525 L</string>
|
||||
<string>525</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>405 L</string>
|
||||
<string>405</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -565,6 +571,11 @@
|
||||
<string>405L</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>SHi</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -26,7 +26,7 @@
|
||||
const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor =
|
||||
{
|
||||
QString("ATV Demodulator"),
|
||||
QString("3.3.2"),
|
||||
QString("3.3.3"),
|
||||
QString("(c) F4HKW for F4EXB / SDRAngel"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
Loading…
Reference in New Issue
Block a user