1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-03 05:25:17 -05:00

ATV plugins: created 525 lines 20 FPS mode

This commit is contained in:
f4exb 2017-03-21 01:30:46 +01:00
parent 9c44e9a34d
commit cba85d2ef1
6 changed files with 53 additions and 8 deletions

View File

@ -707,10 +707,17 @@ void ATVDemod::applySettings()
{ {
m_objSettingsMutex.lock(); m_objSettingsMutex.lock();
m_intNumberOfLines = (int) (1.0f / (m_objConfig.m_fltLineDuration * m_objConfig.m_fltFramePerS)); m_intNumberOfLines = (int) round(1.0f / (m_objConfig.m_fltLineDuration * m_objConfig.m_fltFramePerS));
m_intNumberSamplePerLine = (int) (m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate); m_intNumberSamplePerLine = (int) (m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate);
m_intNumberOfRowsToDisplay = (int) (m_objConfig.m_fltRatioOfRowsToDisplay * m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate); m_intNumberOfRowsToDisplay = (int) (m_objConfig.m_fltRatioOfRowsToDisplay * m_objConfig.m_fltLineDuration * m_objConfig.m_intSampleRate);
// qDebug() << "ATVDemod::applySettings:"
// << " m_fltLineDuration: " << m_objConfig.m_fltLineDuration
// << " m_fltFramePerS: " << m_objConfig.m_fltFramePerS
// << " m_intNumberOfLines: " << m_intNumberOfLines
// << " m_intNumberSamplePerLine: " << m_intNumberSamplePerLine
// << " m_intNumberOfRowsToDisplay: " << m_intNumberOfRowsToDisplay;
m_intNumberSamplePerTop = (int) ((m_objConfig.m_fltTopDurationUs * m_objConfig.m_intSampleRate) / m_fltSecondToUs); m_intNumberSamplePerTop = (int) ((m_objConfig.m_fltTopDurationUs * m_objConfig.m_intSampleRate) / m_fltSecondToUs);
m_objRegisteredATVScreen->resizeATVScreen(m_intNumberSamplePerLine, m_intNumberOfLines); m_objRegisteredATVScreen->resizeATVScreen(m_intNumberSamplePerLine, m_intNumberOfLines);

View File

@ -77,7 +77,7 @@ void ATVDemodGUI::resetToDefaults()
//********** ATV Default values ********** //********** ATV Default values **********
ui->synchLevel->setValue(100); ui->synchLevel->setValue(100);
ui->blackLevel->setValue(310); ui->blackLevel->setValue(310);
ui->lineTime->setValue(640); ui->lineTime->setValue(0);
ui->topTime->setValue(3); ui->topTime->setValue(3);
ui->modulation->setCurrentIndex(0); ui->modulation->setCurrentIndex(0);
ui->fps->setCurrentIndex(0); ui->fps->setCurrentIndex(0);
@ -155,7 +155,7 @@ bool ATVDemodGUI::deserialize(const QByteArray& arrData)
ui->synchLevel->setValue(tmp); ui->synchLevel->setValue(tmp);
d.readS32(4, &tmp, 310); d.readS32(4, &tmp, 310);
ui->blackLevel->setValue(tmp); ui->blackLevel->setValue(tmp);
d.readS32(5, &tmp, 640); d.readS32(5, &tmp, 0);
ui->lineTime->setValue(tmp); ui->lineTime->setValue(tmp);
d.readS32(6, &tmp, 3); d.readS32(6, &tmp, 3);
ui->topTime->setValue(tmp); ui->topTime->setValue(tmp);
@ -339,7 +339,7 @@ void ATVDemodGUI::applySettings()
m_objATVDemod->configure(m_objATVDemod->getInputMessageQueue(), m_objATVDemod->configure(m_objATVDemod->getInputMessageQueue(),
getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex()) + ui->lineTime->value() * m_fltLineTimeMultiplier, getNominalLineTime(ui->nbLines->currentIndex(), ui->fps->currentIndex()) + ui->lineTime->value() * m_fltLineTimeMultiplier,
ui->topTime->value() * 1.0f, ui->topTime->value() * 1.0f,
(ui->fps->currentIndex() == 0) ? 25.0f : 30.0f, getFps(ui->fps->currentIndex()),
(ui->halfImage->checkState() == Qt::Checked) ? 0.5f : 1.0f, (ui->halfImage->checkState() == Qt::Checked) ? 0.5f : 1.0f,
ui->synchLevel->value() / 1000.0f, ui->synchLevel->value() / 1000.0f,
ui->blackLevel->value() / 1000.0f, ui->blackLevel->value() / 1000.0f,
@ -600,6 +600,9 @@ float ATVDemodGUI::getFps(int fpsIndex)
case 1: case 1:
return 30.0f; return 30.0f;
break; break;
case 2:
return 20.0f;
break;
case 0: case 0:
default: default:
return 25.0f; return 25.0f;

View File

@ -451,6 +451,11 @@
<string comment="30">30 Fps</string> <string comment="30">30 Fps</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>20 Fps</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item> <item>

View File

@ -720,6 +720,9 @@ int ATVMod::getSampleRateUnits(ATVStd std)
case ATVStdPAL525: case ATVStdPAL525:
return 1008000; // 64 * 15750 return 1008000; // 64 * 15750
break; break;
case ATVStd525L20F:
return 735000; // 70 * 10500
break;
case ATVStdPAL625: case ATVStdPAL625:
default: default:
return 1000000; // 64 * 15625 Exact MS/s - us return 1000000; // 64 * 15625 Exact MS/s - us
@ -751,10 +754,10 @@ void ATVMod::applyStandard()
switch(m_config.m_atvStd) switch(m_config.m_atvStd)
{ {
case ATVStd405: // Follows loosely the 405 lines standard case ATVStd405: // Follows loosely the 405 lines standard
m_pointsPerSync = (uint32_t) roundf(4.7f * m_pointsPerTU); // normal sync pulse (4.7/1.008 us) m_pointsPerSync = (uint32_t) roundf(4.7f * m_pointsPerTU); // normal sync pulse (4.7/0.729 us)
m_pointsPerBP = (uint32_t) roundf(4.7f * m_pointsPerTU); // back porch (4.7/1.008 us) m_pointsPerBP = (uint32_t) roundf(4.7f * m_pointsPerTU); // back porch (4.7/0.729 us)
m_pointsPerFP = (uint32_t) roundf(1.5f * m_pointsPerTU); // front porch (1.5/1.008 us) m_pointsPerFP = (uint32_t) roundf(1.5f * m_pointsPerTU); // front porch (1.5/0.729 us)
m_pointsPerFSync = (uint32_t) roundf(2.3f * m_pointsPerTU); // equalizing pulse (2.3/1.008 us) m_pointsPerFSync = (uint32_t) roundf(2.3f * m_pointsPerTU); // equalizing pulse (2.3/0.729 us)
// what is left in a 72/0.729 us line for the image // what is left in a 72/0.729 us line for the image
m_pointsPerImgLine = 72 * m_pointsPerTU - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP; m_pointsPerImgLine = 72 * m_pointsPerTU - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
m_nbLines = 405; m_nbLines = 405;
@ -792,6 +795,27 @@ void ATVMod::applyStandard()
m_vBarIncrement = m_spanLevel / (float) m_nbBars; m_vBarIncrement = m_spanLevel / (float) m_nbBars;
m_fps = 30.0f; m_fps = 30.0f;
break; break;
case ATVStd525L20F: // PAL M based 20 FPS
m_pointsPerSync = (uint32_t) roundf(4.7f * m_pointsPerTU); // normal sync pulse (4.7/0.735 us)
m_pointsPerBP = (uint32_t) roundf(4.7f * m_pointsPerTU); // back porch (4.7/0.735 us)
m_pointsPerFP = (uint32_t) roundf(2.3f * m_pointsPerTU); // front porch (2.3/0.735 us)
m_pointsPerFSync = (uint32_t) roundf(2.3f * m_pointsPerTU); // equalizing pulse (2.3/0.735 us)
// what is left in a 70/0.735 us line for the image
m_pointsPerImgLine = 70 * m_pointsPerTU - m_pointsPerSync - m_pointsPerBP - m_pointsPerFP;
m_nbLines = 525;
m_nbLines2 = 263;
m_nbImageLines = 510;
m_nbImageLines2 = 255;
m_interlaced = true;
m_nbHorizPoints = 70 * m_pointsPerTU; // full line
m_nbSyncLinesHead = 5;
m_nbBlankLines = 15; // yields 480 lines (255 - 15) * 2
m_pointsPerHBar = m_pointsPerImgLine / m_nbBars;
m_linesPerVBar = m_nbImageLines2 / m_nbBars;
m_hBarIncrement = m_spanLevel / (float) m_nbBars;
m_vBarIncrement = m_spanLevel / (float) m_nbBars;
m_fps = 20.0f;
break;
case ATVStdPAL625: // Follows PAL-B/G/H standard case ATVStdPAL625: // Follows PAL-B/G/H standard
default: default:
m_pointsPerSync = (uint32_t) roundf(4.7f * m_pointsPerTU); // normal sync pulse (4.7 us) m_pointsPerSync = (uint32_t) roundf(4.7f * m_pointsPerTU); // normal sync pulse (4.7 us)

View File

@ -42,6 +42,7 @@ public:
{ {
ATVStdPAL625, ATVStdPAL625,
ATVStdPAL525, ATVStdPAL525,
ATVStd525L20F,
ATVStd405 ATVStd405
} ATVStd; } ATVStd;

View File

@ -405,6 +405,11 @@
<string>PAL525L</string> <string>PAL525L</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>525L20F</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>405L</string> <string>405L</string>