mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-13 03:52:30 -04:00
DATV demod: completely remove LDPC external command references
This commit is contained in:
parent
ab54ac7a63
commit
fc82606e6e
@ -56,15 +56,17 @@ if(NOT SERVER_MODE)
|
||||
${datv_SOURCES}
|
||||
datvdemodgui.ui
|
||||
datvdvbs2ldpcdialog.ui
|
||||
datvdemodgui.cpp
|
||||
datvdvbs2ldpcdialog.cpp
|
||||
datvideorender.cpp
|
||||
)
|
||||
set(datv_HEADERS ${datv_HEADERS}
|
||||
datvdemodgui.h
|
||||
datvdvbs2ldpcdialog.h
|
||||
datvideorender.h
|
||||
datvconstellation.h
|
||||
datvdvbs2constellation.h
|
||||
)
|
||||
datvideorender.h
|
||||
)
|
||||
set(TARGET_NAME ${PLUGINS_PREFIX}demoddatv)
|
||||
set(TARGET_LIB Qt::Widgets Qt::Multimedia Qt::MultimediaWidgets)
|
||||
set(TARGET_LIB_GUI "sdrgui")
|
||||
@ -107,12 +109,6 @@ target_link_libraries(${TARGET_NAME} PRIVATE
|
||||
${SWRESAMPLE_LIBRARIES}
|
||||
)
|
||||
|
||||
add_executable(ldpctool
|
||||
ldpctool/ldpc_tool.cpp
|
||||
ldpctool/tables_handler.cpp
|
||||
)
|
||||
install(TARGETS ldpctool DESTINATION ${INSTALL_BIN_DIR})
|
||||
|
||||
if(DEFINED FFMPEG_DEPENDS)
|
||||
add_dependencies(${TARGET_NAME} ${FFMPEG_DEPENDS})
|
||||
endif()
|
||||
|
@ -212,9 +212,6 @@ void DATVDemod::applySettings(const DATVDemodSettings& settings, bool force)
|
||||
if (settings.m_softLDPC != m_settings.m_softLDPC) {
|
||||
reverseAPIKeys.append("softLDPC");
|
||||
}
|
||||
if (settings.m_softLDPCToolPath != m_settings.m_softLDPCToolPath) {
|
||||
reverseAPIKeys.append("softLDPCToolPath");
|
||||
}
|
||||
if (settings.m_softLDPCMaxTrials != m_settings.m_softLDPCMaxTrials) {
|
||||
reverseAPIKeys.append("softLDPCMaxTrials");
|
||||
}
|
||||
@ -401,9 +398,6 @@ void DATVDemod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("softLDPC")) {
|
||||
settings.m_softLDPC = response.getDatvDemodSettings()->getSoftLdpc() == 1;
|
||||
}
|
||||
if (channelSettingsKeys.contains("softLDPCToolPath")) {
|
||||
settings.m_softLDPCToolPath = *response.getDatvDemodSettings()->getSoftLdpcToolPath();
|
||||
}
|
||||
if (channelSettingsKeys.contains("softLDPCMaxTrials")) {
|
||||
settings.m_softLDPCMaxTrials = response.getDatvDemodSettings()->getSoftLdpcMaxTrials();
|
||||
}
|
||||
@ -503,13 +497,6 @@ void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
|
||||
response.getDatvDemodSettings()->setModulation((int) settings.m_modulation);
|
||||
response.getDatvDemodSettings()->setFec((int) settings.m_fec);
|
||||
response.getDatvDemodSettings()->setSoftLdpc((int) settings.m_softLDPC ? 1 : 0);
|
||||
|
||||
if (response.getDatvDemodSettings()->getSoftLdpcToolPath()) {
|
||||
*response.getDatvDemodSettings()->getSoftLdpcToolPath() = settings.m_softLDPCToolPath;
|
||||
} else {
|
||||
response.getDatvDemodSettings()->setSoftLdpcToolPath(new QString(settings.m_softLDPCToolPath));
|
||||
}
|
||||
|
||||
response.getDatvDemodSettings()->setSoftLdpcMaxTrials(settings.m_softLDPCMaxTrials);
|
||||
response.getDatvDemodSettings()->setMaxBitflips(settings.m_maxBitflips);
|
||||
response.getDatvDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
|
||||
@ -664,9 +651,6 @@ void DATVDemod::webapiFormatChannelSettings(
|
||||
if (channelSettingsKeys.contains("softLDPC") || force) {
|
||||
swgDATVDemodSettings->setSoftLdpc(settings.m_softLDPC ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("softLDPCToolPath") || force) {
|
||||
swgDATVDemodSettings->setSoftLdpcToolPath(new QString(settings.m_softLDPCToolPath));
|
||||
}
|
||||
if (channelSettingsKeys.contains("softLDPCMaxTrials") || force) {
|
||||
swgDATVDemodSettings->setSoftLdpcMaxTrials(settings.m_softLDPCMaxTrials);
|
||||
}
|
||||
|
@ -532,14 +532,12 @@ void DATVDemodGUI::ldpcToolSelect(const QPoint& p)
|
||||
{
|
||||
qDebug("DATVDemodGUI::ldpcToolSelect");
|
||||
DatvDvbS2LdpcDialog ldpcDialog;
|
||||
ldpcDialog.setFileName(m_settings.m_softLDPCToolPath);
|
||||
ldpcDialog.setMaxTrials(m_settings.m_softLDPCMaxTrials);
|
||||
ldpcDialog.move(p);
|
||||
|
||||
if (ldpcDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
m_settings.m_softLDPCMaxTrials = ldpcDialog.getMaxTrials();
|
||||
m_settings.m_softLDPCToolPath = ldpcDialog.getFileName();
|
||||
applySettings();
|
||||
}
|
||||
}
|
||||
|
@ -28,12 +28,6 @@
|
||||
|
||||
#include "datvdemodsettings.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define DEFAULT_LDPCTOOLPATH "C:/Program Files/SDRangel/ldpctool.exe"
|
||||
#else
|
||||
#define DEFAULT_LDPCTOOLPATH "/opt/install/sdrangel/bin/ldpctool"
|
||||
#endif
|
||||
|
||||
DATVDemodSettings::DATVDemodSettings() :
|
||||
m_channelMarker(nullptr),
|
||||
m_rollupState(nullptr)
|
||||
@ -51,7 +45,6 @@ void DATVDemodSettings::resetToDefaults()
|
||||
m_modulation = BPSK;
|
||||
m_fec = FEC12;
|
||||
m_softLDPC = false;
|
||||
m_softLDPCToolPath = DEFAULT_LDPCTOOLPATH;
|
||||
m_softLDPCMaxTrials = 8;
|
||||
m_maxBitflips = 0;
|
||||
m_symbolRate = 250000;
|
||||
@ -120,7 +113,6 @@ QByteArray DATVDemodSettings::serialize() const
|
||||
s.writeU32(31, m_reverseAPIChannelIndex);
|
||||
s.writeBool(32, m_softLDPC);
|
||||
s.writeS32(33, m_maxBitflips);
|
||||
s.writeString(34, m_softLDPCToolPath);
|
||||
s.writeS32(35, m_softLDPCMaxTrials);
|
||||
s.writeBool(36, m_playerEnable);
|
||||
|
||||
@ -215,7 +207,6 @@ bool DATVDemodSettings::deserialize(const QByteArray& data)
|
||||
|
||||
d.readBool(32, &m_softLDPC, false);
|
||||
d.readS32(33, &m_maxBitflips, 0);
|
||||
d.readString(34, &m_softLDPCToolPath, DEFAULT_LDPCTOOLPATH);
|
||||
d.readS32(35, &tmp, 8);
|
||||
m_softLDPCMaxTrials = tmp < 1 ? 1 : tmp > m_softLDPCMaxMaxTrials ? m_softLDPCMaxMaxTrials : tmp;
|
||||
d.readBool(36, &m_playerEnable, true);
|
||||
@ -256,7 +247,6 @@ void DATVDemodSettings::debug(const QString& msg) const
|
||||
<< " m_fec: " << m_fec
|
||||
<< " m_softLDPC: " << m_softLDPC
|
||||
<< " m_softLDPCMaxTrials: " << m_softLDPCMaxTrials
|
||||
<< " m_softLDPCToolPath: " << m_softLDPCToolPath
|
||||
<< " m_maxBitflips: " << m_maxBitflips
|
||||
<< " m_modulation: " << m_modulation
|
||||
<< " m_standard: " << m_standard
|
||||
@ -284,7 +274,6 @@ bool DATVDemodSettings::isDifferent(const DATVDemodSettings& other)
|
||||
|| (m_fec != other.m_fec)
|
||||
|| (m_softLDPC != other.m_softLDPC)
|
||||
|| (m_softLDPCMaxTrials != other.m_softLDPCMaxTrials)
|
||||
|| (m_softLDPCToolPath != other.m_softLDPCToolPath)
|
||||
|| (m_maxBitflips != other.m_maxBitflips)
|
||||
|| (m_modulation != other.m_modulation)
|
||||
|| (m_notchFilters != other.m_notchFilters)
|
||||
|
@ -84,7 +84,6 @@ struct DATVDemodSettings
|
||||
DATVModulation m_modulation;
|
||||
DATVCodeRate m_fec;
|
||||
bool m_softLDPC;
|
||||
QString m_softLDPCToolPath;
|
||||
int m_softLDPCMaxTrials;
|
||||
int m_maxBitflips;
|
||||
bool m_audioMute;
|
||||
|
@ -879,8 +879,7 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
<< " Excursion: " << m_settings.m_excursion
|
||||
<< " Channel sample rate: " << m_channelSampleRate
|
||||
<< " Input sample rate: " << 2 * m_settings.m_symbolRate
|
||||
<< " m_softLDPCMaxTrials: " << m_settings.m_softLDPCMaxTrials
|
||||
<< " m_softLDPCToolPath: " << m_settings.m_softLDPCToolPath;
|
||||
<< " m_softLDPCMaxTrials: " << m_settings.m_softLDPCMaxTrials;
|
||||
|
||||
m_objCfg.standard = m_settings.m_standard;
|
||||
|
||||
@ -1104,12 +1103,6 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
|
||||
// bool commandFileValid = false;
|
||||
|
||||
if (QFileInfo::exists(m_settings.m_softLDPCToolPath))
|
||||
{
|
||||
QFileInfo fileInfo = QFileInfo(m_settings.m_softLDPCToolPath);
|
||||
// commandFileValid = fileInfo.isExecutable();
|
||||
}
|
||||
|
||||
if (m_settings.m_softLDPC /*&& commandFileValid*/)
|
||||
{
|
||||
#if 0
|
||||
@ -1134,8 +1127,6 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
// External LDPC decoder mode.
|
||||
// Deinterleave into soft bits.
|
||||
// TBD Latency
|
||||
QByteArray ba = m_settings.m_softLDPCToolPath.toLocal8Bit();
|
||||
const char *c_str2 = ba.data();
|
||||
p_fecframes = new leansdr::pipebuf<leansdr::fecframe<leansdr::llr_sb> >(m_objScheduler, "FEC frames", BUF_FRAMES);
|
||||
p_s2_deinterleaver = new leansdr::s2_deinterleaver<leansdr::llr_ss, leansdr::llr_sb>(
|
||||
m_objScheduler,
|
||||
@ -1147,7 +1138,6 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
m_objScheduler,
|
||||
*(leansdr::pipebuf< leansdr::fecframe<leansdr::llr_sb> > *) p_fecframes,
|
||||
*(leansdr::pipebuf<leansdr::bbframe> *) p_bbframes,
|
||||
c_str2,
|
||||
p_vbitcount,
|
||||
p_verrcount)
|
||||
;
|
||||
|
@ -42,12 +42,6 @@ void DatvDvbS2LdpcDialog::accept()
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void DatvDvbS2LdpcDialog::setFileName(const QString& fileName)
|
||||
{
|
||||
m_fileName = fileName;
|
||||
ui->ldpcToolText->setText(m_fileName);
|
||||
}
|
||||
|
||||
void DatvDvbS2LdpcDialog::setMaxTrials(int maxTrials)
|
||||
{
|
||||
m_maxTrials = maxTrials < 1 ? 1 :
|
||||
@ -55,31 +49,6 @@ void DatvDvbS2LdpcDialog::setMaxTrials(int maxTrials)
|
||||
ui->maxTrials->setValue(m_maxTrials);
|
||||
}
|
||||
|
||||
void DatvDvbS2LdpcDialog::on_showFileDialog_clicked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
|
||||
QFileDialog fileDialog(this, "Select LDPC tool");
|
||||
fileDialog.setOption(QFileDialog::DontUseNativeDialog, true);
|
||||
#ifdef _MSC_VER
|
||||
fileDialog.setNameFilter("*.exe");
|
||||
#else
|
||||
fileDialog.setFilter(QDir::Executable | QDir::Files);
|
||||
#endif
|
||||
fileDialog.selectFile(m_fileName);
|
||||
|
||||
if (fileDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
QStringList fileNames = fileDialog.selectedFiles();
|
||||
|
||||
if (fileNames.size() > 0)
|
||||
{
|
||||
m_fileName = fileNames[0];
|
||||
ui->ldpcToolText->setText(m_fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DatvDvbS2LdpcDialog::on_maxTrials_valueChanged(int value)
|
||||
{
|
||||
m_maxTrials = value;
|
||||
|
@ -33,19 +33,15 @@ public:
|
||||
explicit DatvDvbS2LdpcDialog(QWidget* parent = nullptr);
|
||||
~DatvDvbS2LdpcDialog();
|
||||
|
||||
void setFileName(const QString& fileName);
|
||||
void setMaxTrials(int maxTrials);
|
||||
QString& getFileName() { return m_fileName; }
|
||||
int getMaxTrials() { return m_maxTrials; }
|
||||
|
||||
private:
|
||||
Ui::DatvDvbS2LdpcDialog* ui;
|
||||
QString m_fileName;
|
||||
int m_maxTrials;
|
||||
|
||||
private slots:
|
||||
void accept();
|
||||
void on_showFileDialog_clicked(bool checked);
|
||||
void on_maxTrials_valueChanged(int value);
|
||||
};
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>121</height>
|
||||
<width>454</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -63,66 +63,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="logFileLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="ldpcToolLabel">
|
||||
<property name="text">
|
||||
<string>LDPC tool</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="showFileDialog">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Choose a log file</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../sdrgui/resources/res.qrc">
|
||||
<normaloff>:/preset-load.png</normaloff>:/preset-load.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ldpcToolText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Log file</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
|
@ -3644,7 +3644,6 @@ struct s2_fecdec_helper : runnable
|
||||
scheduler *sch,
|
||||
pipebuf<fecframe<SOFTBYTE>> &_in,
|
||||
pipebuf<bbframe> &_out,
|
||||
const char *_command,
|
||||
pipebuf<int> *_bitcount = nullptr,
|
||||
pipebuf<int> *_errcount = nullptr
|
||||
) :
|
||||
@ -3658,7 +3657,6 @@ struct s2_fecdec_helper : runnable
|
||||
bitcount(opt_writer(_bitcount, 1)),
|
||||
errcount(opt_writer(_errcount, 1))
|
||||
{
|
||||
command = strdup(_command);
|
||||
|
||||
for (int mc = 0; mc < 32; ++mc) {
|
||||
for (int sf = 0; sf < 2; ++sf) {
|
||||
@ -3669,7 +3667,6 @@ struct s2_fecdec_helper : runnable
|
||||
|
||||
~s2_fecdec_helper()
|
||||
{
|
||||
free(command);
|
||||
killall(); // also deletes pools[mc][sf].procs if necessary
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ It can be used to decode signals lower that ~10 db MER which is the limit of LDP
|
||||
|
||||
Right clicking on this control opens a dialog where you can choose:
|
||||
|
||||
- The `ldpctool` executable. Obsolete.
|
||||
- ~~The `ldpctool` executable.~~ Obsolete removed.
|
||||
- The maximum of retries in LDPC decoding from 1 to 8.
|
||||
|
||||
<h5>B.2b.7: DVB-S2 specific - LDPC maximum number of bit flips allowed</h5>
|
||||
|
Loading…
x
Reference in New Issue
Block a user