From: Jean-Baptiste Mardelle Date: Sun, 14 Nov 2010 10:50:20 +0000 (+0000) Subject: Get rid of buggy "drop B frame" speedup feature X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=0a381233be965974d175f34899ed5422e71e6d00;p=kdenlive Get rid of buggy "drop B frame" speedup feature svn path=/trunk/kdenlive/; revision=5093 --- diff --git a/src/clipmanager.cpp b/src/clipmanager.cpp index 6b464814..f0b28c1c 100644 --- a/src/clipmanager.cpp +++ b/src/clipmanager.cpp @@ -225,22 +225,6 @@ const QList ClipManager::getClipByResource(QString resource) return list; } -void ClipManager::updatePreviewSettings() -{ - for (int i = 0; i < m_clipList.count(); i++) { - if (m_clipList.at(i)->clipType() == AV || m_clipList.at(i)->clipType() == VIDEO) { - if (m_clipList.at(i)->producerProperty("meta.media.0.codec.name") && strcmp(m_clipList.at(i)->producerProperty("meta.media.0.codec.name"), "h264") == 0) { - if (KdenliveSettings::dropbframes()) { - m_clipList[i]->setProducerProperty("skip_loop_filter", "all"); - m_clipList[i]->setProducerProperty("skip_frame", "bidir"); - } else { - m_clipList[i]->setProducerProperty("skip_loop_filter", ""); - m_clipList[i]->setProducerProperty("skip_frame", ""); - } - } - } - } -} void ClipManager::clearUnusedProducers() { diff --git a/src/clipmanager.h b/src/clipmanager.h index 2e83e7c5..1fcfa6c6 100644 --- a/src/clipmanager.h +++ b/src/clipmanager.h @@ -104,9 +104,6 @@ Q_OBJECT public: QDomElement groupsXml() const; int clipsCount() const; -public slots: - void updatePreviewSettings(); - private slots: /** A clip was externally modified, monitor for more changes and prepare for reload */ void slotClipModified(const QString &path); diff --git a/src/docclipbase.cpp b/src/docclipbase.cpp index 4dcf2cd5..214693c6 100644 --- a/src/docclipbase.cpp +++ b/src/docclipbase.cpp @@ -602,10 +602,7 @@ Mlt::Producer *DocClipBase::producer(int track) if (m_properties.contains("video_index")) m_baseTrackProducers[track]->set("video_index", m_properties.value("video_index").toInt()); if (m_properties.contains("audio_index")) m_baseTrackProducers[track]->set("audio_index", m_properties.value("audio_index").toInt()); m_baseTrackProducers[track]->set("id", QString(getId() + '_' + QString::number(track)).toUtf8().data()); - if (KdenliveSettings::dropbframes() && m_baseTrackProducers.at(i)->get("skip_loop_filter") && strcmp(m_baseTrackProducers.at(i)->get("skip_loop_filter"), "all") == 0) { - m_baseTrackProducers[track]->set("skip_loop_filter", "all"); - m_baseTrackProducers[track]->set("skip_frame", "bidir"); - } + if (m_properties.contains("force_colorspace")) m_baseTrackProducers[track]->set("force_colorspace", m_properties.value("force_colorspace").toInt()); if (m_properties.contains("full_luma")) m_baseTrackProducers[track]->set("set.force_full_luma", m_properties.value("full_luma").toInt()); } diff --git a/src/kdenlivedoc.cpp b/src/kdenlivedoc.cpp index fb87c65c..57238927 100644 --- a/src/kdenlivedoc.cpp +++ b/src/kdenlivedoc.cpp @@ -483,15 +483,7 @@ void KdenliveDoc::slotAutoSave() kDebug() << "ERROR; CANNOT CREATE AUTOSAVE FILE"; } kDebug() << "// AUTOSAVE FILE: " << m_autosave->fileName(); - QString doc; - if (KdenliveSettings::dropbframes()) { - KdenliveSettings::setDropbframes(false); - m_clipManager->updatePreviewSettings(); - doc = m_render->sceneList(); - KdenliveSettings::setDropbframes(true); - m_clipManager->updatePreviewSettings(); - } else doc = m_render->sceneList(); - saveSceneList(m_autosave->fileName(), doc); + saveSceneList(m_autosave->fileName(), m_render->sceneList()); } } @@ -813,16 +805,6 @@ void KdenliveDoc::checkProjectClips() m_clipManager->resetProducersList(m_render->producersList()); } -void KdenliveDoc::updatePreviewSettings() -{ - m_clipManager->updatePreviewSettings(); - m_render->updatePreviewSettings(); - QList prods = m_render->producersList(); - m_clipManager->resetProducersList(m_render->producersList()); - qDeleteAll(prods); - prods.clear(); -} - Render *KdenliveDoc::renderer() { return m_render; @@ -1167,7 +1149,7 @@ void KdenliveDoc::slotCreateTextTemplateClip(QString group, const QString &group { QString titlesFolder = projectFolder().path(KUrl::AddTrailingSlash) + "titles/"; if (path.isEmpty()) { - path = KFileDialog::getOpenUrl(KUrl(titlesFolder), "*.kdenlivetitle", kapp->activeWindow(), i18n("Enter Template Path")); + path = KFileDialog::getOpenUrl(KUrl(titlesFolder), "application/x-kdenlivetitle", kapp->activeWindow(), i18n("Enter Template Path")); } if (path.isEmpty()) return; diff --git a/src/kdenlivedoc.h b/src/kdenlivedoc.h index e0648673..5ae8045a 100644 --- a/src/kdenlivedoc.h +++ b/src/kdenlivedoc.h @@ -129,7 +129,6 @@ Q_OBJECT public: void setZone(int start, int end); QPoint zone() const; int setSceneList(); - void updatePreviewSettings(); bool isTrackLocked(int ix) const; void setDocumentProperty(const QString &name, const QString &value); const QString getDocumentProperty(const QString &name) const; diff --git a/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg index 49d65f06..852e0440 100644 --- a/src/kdenlivesettings.kcfg +++ b/src/kdenlivesettings.kcfg @@ -166,10 +166,6 @@ 100 - - - false - diff --git a/src/kdenlivesettingsdialog.cpp b/src/kdenlivesettingsdialog.cpp index 91933f9c..e997fa76 100644 --- a/src/kdenlivesettingsdialog.cpp +++ b/src/kdenlivesettingsdialog.cpp @@ -122,8 +122,6 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent) : QWidget *p6 = new QWidget; m_configSdl.setupUi(p6); - // Disable drop B frames, see Kdenlive issue #1330 - m_configSdl.groupBox->setHidden(true); #if not defined(Q_WS_MAC) && not defined(USE_OPEN_GL) m_configSdl.kcfg_openglmonitors->setHidden(true); #endif @@ -537,12 +535,6 @@ void KdenliveSettingsDialog::updateSettings() resetProfile = true; } - bool updatePreview = false; - if (m_configSdl.kcfg_dropbframes->isChecked() != KdenliveSettings::dropbframes()) { - KdenliveSettings::setDropbframes(m_configSdl.kcfg_dropbframes->isChecked()); - updatePreview = true; - } - if (m_modified) { // The transcoding profiles were modified, save. m_modified = false; @@ -555,7 +547,6 @@ void KdenliveSettingsDialog::updateSettings() //KConfigDialog::updateSettings(); if (resetProfile) emit doResetProfile(); - if (updatePreview) emit updatePreviewSettings(); } void KdenliveSettingsDialog::slotUpdateDisplay() diff --git a/src/kdenlivesettingsdialog.h b/src/kdenlivesettingsdialog.h index 05f01c0c..3eb3804f 100644 --- a/src/kdenlivesettingsdialog.h +++ b/src/kdenlivesettingsdialog.h @@ -97,7 +97,6 @@ private: signals: void customChanged(); void doResetProfile(); - void updatePreviewSettings(); void updateCaptureFolder(); }; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d578f119..55431d6f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -516,9 +516,6 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & m_monitorManager->initMonitors(m_clipMonitor, m_projectMonitor); slotConnectMonitors(); - // Disable drop B frames, see Kdenlive issue #1330, see also kdenlivesettingsdialog.cpp - KdenliveSettings::setDropbframes(false); - // Open or create a file. Command line argument passed in Url has // precedence, then "openlastproject", then just a plain empty file. // If opening Url fails, openlastproject will _not_ be used. @@ -1861,15 +1858,8 @@ bool MainWindow::saveFileAs(const QString &outputFileName) { QString currentSceneList; m_monitorManager->stopActiveMonitor(); - if (KdenliveSettings::dropbframes()) { - KdenliveSettings::setDropbframes(false); - m_activeDocument->clipManager()->updatePreviewSettings(); - currentSceneList = m_projectMonitor->sceneList(); - KdenliveSettings::setDropbframes(true); - m_activeDocument->clipManager()->updatePreviewSettings(); - } else currentSceneList = m_projectMonitor->sceneList(); - - if (m_activeDocument->saveSceneList(outputFileName, currentSceneList) == false) + + if (m_activeDocument->saveSceneList(outputFileName, m_projectMonitor->sceneList()) == false) return false; // Save timeline thumbnails @@ -2477,7 +2467,6 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) //cha #ifndef Q_WS_MAC m_recMonitor->slotUpdateCaptureFolder(m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash)); #endif - if (KdenliveSettings::dropbframes()) slotUpdatePreviewSettings(); //Update the mouse position display so it will display in DF/NDF format by default based on the project setting. slotUpdateMousePosition(0); // set tool to select tool @@ -2524,11 +2513,9 @@ void MainWindow::slotPreferences(int page, int option) connect(dialog, SIGNAL(settingsChanged(const QString&)), this, SLOT(updateConfiguration())); //connect(dialog, SIGNAL(doResetProfile()), this, SLOT(slotDetectAudioDriver())); connect(dialog, SIGNAL(doResetProfile()), m_monitorManager, SLOT(slotResetProfiles())); - connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings())); #ifndef Q_WS_MAC connect(dialog, SIGNAL(updateCaptureFolder()), this, SLOT(slotUpdateCaptureFolder())); #endif - //connect(dialog, SIGNAL(updatePreviewSettings()), this, SLOT(slotUpdatePreviewSettings())); dialog->show(); if (page != -1) dialog->showPage(page, option); } @@ -2542,14 +2529,6 @@ void MainWindow::slotUpdateCaptureFolder() #endif } -void MainWindow::slotUpdatePreviewSettings() -{ - if (m_activeDocument) { - m_clipMonitor->slotSetXml(NULL); - m_activeDocument->updatePreviewSettings(); - } -} - void MainWindow::updateConfiguration() { //TODO: we should apply settings to all projects, not only the current one diff --git a/src/mainwindow.h b/src/mainwindow.h index 27365b4b..42894c82 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -452,7 +452,6 @@ private slots: /** @brief Lets the sampleplugin create a generator. */ void generateClip(); void slotZoneMoved(int start, int end); - void slotUpdatePreviewSettings(); void slotDvdWizard(const QString &url = QString(), const QString &profile = "dv_pal"); void slotGroupClips(); void slotUnGroupClips(); diff --git a/src/renderer.cpp b/src/renderer.cpp index 8cae1952..d785dec0 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -740,17 +740,6 @@ void Render::getFileProperties(const QDomElement xml, const QString &clipId, int filePropertyMap["pix_fmt"] = producer->get(query.toUtf8().constData()); filePropertyMap["colorspace"] = producer->get("meta.media.colorspace"); - if (KdenliveSettings::dropbframes()) { - kDebug() << "// LOOKING FOR H264 on: " << default_video; - snprintf(property, sizeof(property), "meta.media.%d.codec.name", default_video); - kDebug() << "PROP: " << property << " = " << producer->get(property); - if (producer->get(property) && strcmp(producer->get(property), "h264") == 0) { - kDebug() << "// GOT H264 CLIP, SETTING FAST PROPS"; - producer->set("skip_loop_filter", "all"); - producer->set("skip_frame", "bidir"); - } - } - } else kDebug() << " / / / / /WARNING, VIDEO CONTEXT IS NULL!!!!!!!!!!!!!!"; if (producer->get_int("audio_index") > -1) { // Get the audio_index @@ -842,10 +831,6 @@ int Render::setProducer(Mlt::Producer *producer, int position) m_mltProducer = new Mlt::Producer(producer->get_producer()); } else m_mltProducer = m_blackClip->cut(0, 50); - /*if (KdenliveSettings::dropbframes()) { - m_mltProducer->set("skip_loop_filter", "all"); - m_mltProducer->set("skip_frame", "bidir"); - }*/ if (!m_mltProducer || !m_mltProducer->is_valid()) { kDebug() << " WARNING - - - - -INVALID PLAYLIST: "; return -1; diff --git a/src/widgets/configsdl_ui.ui b/src/widgets/configsdl_ui.ui index 6e78e329..cee49078 100644 --- a/src/widgets/configsdl_ui.ui +++ b/src/widgets/configsdl_ui.ui @@ -6,8 +6,8 @@ 0 0 - 353 - 247 + 342 + 241 @@ -83,7 +83,7 @@ - + Qt::Vertical @@ -96,22 +96,6 @@ - - - - Monitor Preview Speedup Settings - - - - - - Drop B frames on H.264 clips - - - - - -