Commit aeb70268 authored by Julius Künzel's avatar Julius Künzel
Browse files
parent ea9c47f9
Pipeline #143846 passed with stage
in 8 minutes and 30 seconds
......@@ -86,9 +86,15 @@ void CacheTask::generateThumbnail(std::shared_ptr<ProjectClip>binClip)
}
thumbProd->seek(i);
QScopedPointer<Mlt::Frame> frame(thumbProd->get_frame());
#if LIBMLT_VERSION_INT < QT_VERSION_CHECK(7, 5, 0)
frame->set("deinterlace_method", "onefield");
frame->set("top_field_first", -1);
frame->set("rescale.interp", "nearest");
#else
frame->set("consumer.deinterlacer", "onefield");
frame->set("consumer.top_field_first", -1);
frame->set("consumer.rescale", "nearest");
#endif
if (frame != nullptr && frame->is_valid()) {
QImage result = KThumb::getFrame(frame.data(), 0, 0, m_fullWidth);
if (!result.isNull()) {
......
......@@ -267,9 +267,15 @@ void ClipLoadTask::generateThumbnail(std::shared_ptr<ProjectClip>binClip, std::s
thumbProd->seek(frameNumber);
}
QScopedPointer<Mlt::Frame> frame(thumbProd->get_frame());
#if LIBMLT_VERSION_INT < QT_VERSION_CHECK(7, 5, 0)
frame->set("deinterlace_method", "onefield");
frame->set("top_field_first", -1);
frame->set("rescale.interp", "nearest");
#else
frame->set("consumer.deinterlacer", "onefield");
frame->set("consumer.top_field_first", -1);
frame->set("consumer.rescale", "nearest");
#endif
if ((frame != nullptr) && frame->is_valid()) {
int imageHeight(pCore->thumbProfile()->height());
int imageWidth(pCore->thumbProfile()->width());
......
......@@ -755,9 +755,15 @@ QPixmap ClipController::pixmap(int framePosition, int width, int height)
p.fill(QColor(Qt::red).rgb());
return p;
}
#if LIBMLT_VERSION_INT < QT_VERSION_CHECK(7, 5, 0)
frame->set("deinterlace_method", "onefield");
frame->set("top_field_first", -1);
frame->set("rescale.interp", "nearest");
#else
frame->set("consumer.deinterlacer", "onefield");
frame->set("consumer.top_field_first", -1);
frame->set("consumer.rescale", "nearest");
#endif
QImage img = KThumb::getFrame(frame.data());
return QPixmap::fromImage(img/*.scaled(height, width, Qt::KeepAspectRatio)*/);
}
......
......@@ -1203,7 +1203,11 @@ int GLWidget::reconfigure()
m_consumer->set("volume", volume / 100.0);
// m_consumer->set("progressive", 1);
m_consumer->set("rescale", KdenliveSettings::mltinterpolation().toUtf8().constData());
#if LIBMLT_VERSION_INT < QT_VERSION_CHECK(7, 5, 0)
m_consumer->set("deinterlace_method", KdenliveSettings::mltdeinterlacer().toUtf8().constData());
#else
m_consumer->set("deinterlacer", KdenliveSettings::mltdeinterlacer().toUtf8().constData());
#endif
/*
#ifdef Q_OS_WIN
m_consumer->set("audio_buffer", 2048);
......
......@@ -547,7 +547,7 @@ void MonitorManager::setupActions()
interlace->addAction(i18n("YADIF - temporal + spacial (best)"));
if (KdenliveSettings::mltdeinterlacer() == QLatin1String("linearblend")) {
interlace->setCurrentItem(1);
} else if (KdenliveSettings::mltdeinterlacer() == QLatin1String("yadif-temporal")) {
} else if (KdenliveSettings::mltdeinterlacer() == QLatin1String("yadif-nospatial")) {
interlace->setCurrentItem(2);
} else if (KdenliveSettings::mltdeinterlacer() == QLatin1String("yadif")) {
interlace->setCurrentItem(3);
......@@ -645,7 +645,11 @@ void MonitorManager::slotSetDeinterlacer(int ix)
value = QStringLiteral("onefield");
}
KdenliveSettings::setMltdeinterlacer(value);
#if LIBMLT_VERSION_INT < QT_VERSION_CHECK(7, 5, 0)
setConsumerProperty(QStringLiteral("deinterlace_method"), value);
#else
setConsumerProperty(QStringLiteral("deinterlacer"), value);
#endif
}
void MonitorManager::slotSetInterpolation(int ix)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment