Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Remove H265 HDR metadata settings, use image HDR metadata instead.

Wolthera van Hövell tot Westerflier6f015a58bb01
diff --git a/libs/ui/CMakeLists.txt b/libs/ui/CMakeLists.txt
index eea753dcad..41b7244bde 100644
--- a/libs/ui/CMakeLists.txt
+++ b/libs/ui/CMakeLists.txt
@@ -386,7 +386,6 @@ set(kritaui_LIB_SRCS
animation/KisAnimationRender.cpp
animation/KisDlgAnimationRenderer.cpp
animation/VideoExportOptionsDialog.cpp
- animation/VideoHDRMetadataOptionsDialog.cpp
animation/KisHDRMetadataOptions.cpp
animation/KisDlgImportVideoAnimation.cpp
animation/KisFrameDisplayProxy.cpp
@@ -669,7 +668,6 @@ ki18n_wrap_ui(kritaui_LIB_SRCS
animation/wdg_animationrenderer.ui
animation/video_export_options_dialog.ui
- animation/VideoHDRMetadataOptionsDialog.ui
animation/VideoImportDialog.ui
imagesize/wdg_imagesize.ui
diff --git a/libs/ui/animation/CMakeLists.txt b/libs/ui/animation/CMakeLists.txt
index 3eec9e26d7..62c6c4d777 100644
--- a/libs/ui/animation/CMakeLists.txt
+++ b/libs/ui/animation/CMakeLists.txt
@@ -8,7 +8,6 @@ set(kritaanimation_LIB_SRCS
KisAnimationRender.cpp
KisDlgAnimationRenderer.cpp
VideoExportOptionsDialog.cpp
- VideoHDRMetadataOptionsDialog.cpp
KisHDRMetadataOptions.cpp
KisDlgImportVideoAnimation.cpp
)
@@ -16,7 +15,6 @@ set(kritaanimation_LIB_SRCS
ki18n_wrap_ui(kritaanimation_LIB_SRCS
wdg_animationrenderer.ui
video_export_options_dialog.ui
- VideoHDRMetadataOptionsDialog.ui
VideoImportDialog.ui
)
diff --git a/libs/ui/animation/KisDlgAnimationRenderer.cpp b/libs/ui/animation/KisDlgAnimationRenderer.cpp
index 4994930127..b0fa11eb39 100644
--- a/libs/ui/animation/KisDlgAnimationRenderer.cpp
+++ b/libs/ui/animation/KisDlgAnimationRenderer.cpp
@@ -36,6 +36,7 @@
#include <kis_config.h>
#include <kis_file_name_requester.h>
#include <KoDialog.h>
+#include "animation/KisHDRMetadataOptions.h"
#include "kis_slider_spin_box.h"
#include "kis_acyclic_signal_connector.h"
#include "KisVideoSaver.h"
@@ -402,7 +403,7 @@ void KisDlgAnimationRenderer::getDefaultVideoEncoderOptions(const QString &mimeT
KisVideoExportOptionsDialog::mimeToContainer(mimeType);
QScopedPointer<KisVideoExportOptionsDialog> encoderConfigWidget(
- new KisVideoExportOptionsDialog(containerType, availableEncoders, 0));
+ new KisVideoExportOptionsDialog(containerType, availableEncoders, KisHDRMetadataOptions(), 0));
// we always enable HDR, letting the user to force it
encoderConfigWidget->setSupportsHDR(true);
@@ -555,7 +556,23 @@ bool KisDlgAnimationRenderer::supportsAudio(const QString &videoType)
#endif
}
+KisHDRMetadataOptions KisDlgAnimationRenderer::optionsFromImage()
+{
+ KisHDRMetadataOptions hdrOptions;
+ if (m_image->contentLightLevelInformation()) {
+ hdrOptions.clli = *m_image->contentLightLevelInformation();
+ }
+ if (m_image->colorVolumeInformation()) {
+ hdrOptions.cvi = *m_image->colorVolumeInformation();
+ }
+ if (m_image->diffuseWhiteLightLevel()) {
+ hdrOptions.diffuseWhite = *m_image->diffuseWhiteLightLevel();
+ }
+ return hdrOptions;
+}
+
#ifndef Q_OS_ANDROID
+
void KisDlgAnimationRenderer::setFFmpegPath(const QString& path) {
// Let's START with the assumption that user-specified ffmpeg path is invalid
// and clear out all of the ffmpeg-specific fields to fill post-validation...
@@ -789,8 +806,10 @@ void KisDlgAnimationRenderer::selectRenderOptions()
encodersPresent << ffmpegEncoderTypes[key];
}
+ KisHDRMetadataOptions hdrOptions = optionsFromImage();
+
KisVideoExportOptionsDialog *encoderConfigWidget =
- new KisVideoExportOptionsDialog(containerType, encodersPresent, this);
+ new KisVideoExportOptionsDialog(containerType, encodersPresent, hdrOptions, this);
// we always enable HDR, letting the user to force it
encoderConfigWidget->setSupportsHDR(true);
diff --git a/libs/ui/animation/KisDlgAnimationRenderer.h b/libs/ui/animation/KisDlgAnimationRenderer.h
index eb2208d107..c03d271a05 100644
--- a/libs/ui/animation/KisDlgAnimationRenderer.h
+++ b/libs/ui/animation/KisDlgAnimationRenderer.h
@@ -26,6 +26,7 @@ class QButtonGroup;
class QHBoxLayout;
class KisAnimationVideoSaver;
class KisAnimationRenderingOptions;
+struct KisHDRMetadataOptions;
class WdgAnimationRenderer : public QWidget, public Ui::WdgAnimationRenderer
{
@@ -129,6 +130,8 @@ private:
static bool supportsAudio(const QString &videoType);
private:
+ KisHDRMetadataOptions optionsFromImage();
+
KisImageSP m_image;
KisDocument *m_doc;
diff --git a/libs/ui/animation/KisHDRMetadataOptions.cpp b/libs/ui/animation/KisHDRMetadataOptions.cpp
index 6acd990835..4a0290190c 100644
--- a/libs/ui/animation/KisHDRMetadataOptions.cpp
+++ b/libs/ui/animation/KisHDRMetadataOptions.cpp
@@ -20,23 +20,23 @@ KisPropertiesConfigurationSP KisHDRMetadataOptions::toProperties() const
config->setProperty("predefinedMasterDisplayId", predefinedMasterDisplayId);
- config->setProperty("redX", redX);
- config->setProperty("redY", redY);
+ config->setProperty("redX", cvi.red.x());
+ config->setProperty("redY", cvi.red.y());
- config->setProperty("greenX", greenX);
- config->setProperty("greenY", greenY);
+ config->setProperty("greenX", cvi.green.x());
+ config->setProperty("greenY", cvi.green.y());
- config->setProperty("blueX", blueX);
- config->setProperty("blueY", blueY);
+ config->setProperty("blueX", cvi.blue.x());
+ config->setProperty("blueY", cvi.blue.y());
- config->setProperty("whiteX", whiteX);
- config->setProperty("whiteY", whiteY);
+ config->setProperty("whiteX", cvi.white.x());
+ config->setProperty("whiteY", cvi.white.y());
- config->setProperty("minLuminance", minLuminance);
- config->setProperty("maxLuminance", maxLuminance);
+ config->setProperty("minLuminance", cvi.maxLuminance);
+ config->setProperty("maxLuminance", cvi.minLuminance);
- config->setProperty("maxCLL", maxCLL);
- config->setProperty("maxFALL", maxFALL);
+ config->setProperty("maxCLL", clli.maxContentLightLevel);
+ config->setProperty("maxFALL", clli.maxFrameAverageLightLevel);
return config;
}
@@ -45,23 +45,23 @@ void KisHDRMetadataOptions::fromProperties(KisPropertiesConfigurationSP config)
{
predefinedMasterDisplayId = config->getPropertyLazy("predefinedMasterDisplayId", predefinedMasterDisplayId);
- redX = config->getPropertyLazy("redX", redX);
- redY = config->getPropertyLazy("redY", redY);
+ cvi.red.setX(config->getPropertyLazy("redX", cvi.red.x()));
+ cvi.red.setY(config->getPropertyLazy("redX", cvi.red.y()));
- greenX = config->getPropertyLazy("greenX", greenX);
- greenY = config->getPropertyLazy("greenY", greenY);
+ cvi.green.setX(config->getPropertyLazy("greenX", cvi.green.x()));
+ cvi.green.setY(config->getPropertyLazy("greenY", cvi.green.y()));
- blueX = config->getPropertyLazy("blueX", blueX);
- blueY = config->getPropertyLazy("blueY", blueY);
+ cvi.blue.setX(config->getPropertyLazy("blueX", cvi.blue.x()));
+ cvi.blue.setY(config->getPropertyLazy("blueY", cvi.blue.y()));
- whiteX = config->getPropertyLazy("whiteX", whiteX);
- whiteY = config->getPropertyLazy("whiteY", whiteY);
+ cvi.white.setX(config->getPropertyLazy("whiteX", cvi.white.x()));
+ cvi.white.setY(config->getPropertyLazy("whiteY", cvi.white.y()));
- minLuminance = config->getPropertyLazy("minLuminance", minLuminance);
- maxLuminance = config->getPropertyLazy("maxLuminance", maxLuminance);
+ cvi.minLuminance = config->getPropertyLazy("minLuminance", cvi.minLuminance);
+ cvi.maxLuminance = config->getPropertyLazy("maxLuminance", cvi.maxLuminance);
- maxCLL = config->getPropertyLazy("maxCLL", maxCLL);
- maxFALL = config->getPropertyLazy("maxFALL", maxFALL);
+ clli.maxContentLightLevel = config->getPropertyLazy("maxCLL", clli.maxContentLightLevel);
+ clli.maxFrameAverageLightLevel = config->getPropertyLazy("maxFALL", clli.maxFrameAverageLightLevel);
}
QString KisHDRMetadataOptions::generateFFMpegOptions() const
@@ -69,20 +69,28 @@ QString KisHDRMetadataOptions::generateFFMpegOptions() const
auto cprim = [] (qreal x) { return int(x / 0.00002); };
auto lum = [] (qreal x) { return int(x / 0.0001); };
- const QString x265Params =
- QString("-x265-params "
- "master-display=G(%3,%4)B(%5,%6)R(%1,%2)WP(%7,%8)L(%9,%10):"
- "max-cll=%11,%12:"
- "colorprim=bt2020:"
- "colormatrix=bt2020nc:"
- "transfer=smpte2084:"
- "range=full")
- .arg(cprim(redX)).arg(cprim(redY))
- .arg(cprim(greenX)).arg(cprim(greenY))
- .arg(cprim(blueX)).arg(cprim(blueY))
- .arg(cprim(whiteX)).arg(cprim(whiteY))
- .arg(lum(maxLuminance)).arg(lum(minLuminance))
- .arg(int(maxCLL)).arg(int(maxFALL));
-
+ QString x265Params =
+ QString("-x265-params ");
+
+ if (cvi != KisColorVolumeInformation()) {
+ x265Params += QString("master-display=G(%3,%4)B(%5,%6)R(%1,%2)WP(%7,%8)L(%9,%10):") .arg(cprim(cvi.red.x())).arg(cprim(cvi.red.y()))
+ .arg(cprim(cvi.green.x())).arg(cprim(cvi.green.y()))
+ .arg(cprim(cvi.blue.x())).arg(cprim(cvi.blue.y()))
+ .arg(cprim(cvi.white.x())).arg(cprim(cvi.white.y()))
+ .arg(lum(cvi.maxLuminance)).arg(lum(cvi.minLuminance));
+ }
+ if (clli != KisContentLightLevelInformation()) {
+ x265Params += QString("max-cll=%11,%12:")
+ .arg(int(clli.maxContentLightLevel*diffuseWhite))
+ .arg(int(clli.maxFrameAverageLightLevel*diffuseWhite));
+ }
+
+ x265Params += QString(
+ "colorprim=bt2020:"
+ "colormatrix=bt2020nc:"
+ "transfer=smpte2084:"
+ "range=full");
+
+ qDebug() << x265Params;
return x265Params;
}
diff --git a/libs/ui/animation/KisHDRMetadataOptions.h b/libs/ui/animation/KisHDRMetadataOptions.h
index 024655b3c5..a32b9d1177 100644
--- a/libs/ui/animation/KisHDRMetadataOptions.h
+++ b/libs/ui/animation/KisHDRMetadataOptions.h
@@ -9,6 +9,7 @@
#include <QString>
#include "kis_types.h"
+#include <kis_hdr_metadata.h>
struct KisHDRMetadataOptions
{
@@ -16,23 +17,11 @@ struct KisHDRMetadataOptions
QString predefinedMasterDisplayId;
- qreal redX = 0.708;
- qreal redY = 0.292;
+ KisColorVolumeInformation cvi;
- qreal greenX = 0.170;
- qreal greenY = 0.797;
+ KisContentLightLevelInformation clli;
- qreal blueX = 0.131;
- qreal blueY = 0.046;
-
- qreal whiteX = 0.3127;
- qreal whiteY = 0.3290;
-
- qreal minLuminance = 0.005;
- qreal maxLuminance = 1000;
-
- qreal maxCLL = 1000;
- qreal maxFALL = 400;
+ double diffuseWhite = 80;
KisPropertiesConfigurationSP toProperties() const;
void fromProperties(KisPropertiesConfigurationSP config);
diff --git a/libs/ui/animation/VideoExportOptionsDialog.cpp b/libs/ui/animation/VideoExportOptionsDialog.cpp
index 6d22a6cf60..6fa36e068a 100644
--- a/libs/ui/animation/VideoExportOptionsDialog.cpp
+++ b/libs/ui/animation/VideoExportOptionsDialog.cpp
@@ -11,7 +11,6 @@
#include <ksharedconfig.h>
#include <kconfiggroup.h>
-#include "VideoHDRMetadataOptionsDialog.h"
#include "KisHDRMetadataOptions.h"
@@ -137,7 +136,7 @@ void populateComboWithKoIds(QComboBox *combo, const QVector<KoID> &ids, int defa
combo->setEnabled(combo->count() > 1);
}
-KisVideoExportOptionsDialog::KisVideoExportOptionsDialog(ContainerType containerType, const QStringList& validEncoders, QWidget *parent)
+KisVideoExportOptionsDialog::KisVideoExportOptionsDialog(ContainerType containerType, const QStringList& validEncoders, KisHDRMetadataOptions hdrOptions, QWidget *parent)
: KisConfigWidget(parent),
ui(new Ui::VideoExportOptionsDialog),
m_d(new Private(containerType, validEncoders))
@@ -210,14 +209,11 @@ KisVideoExportOptionsDialog::KisVideoExportOptionsDialog(ContainerType container
connect(ui->txtCustomLine, SIGNAL(editingFinished()), SLOT(slotSaveCustomLine()));
connect(ui->btnResetCustomLine, SIGNAL(clicked()), SLOT(slotResetCustomLine()));
- connect(ui->chkUseHDRMetadata, SIGNAL(toggled(bool)),
- ui->btnHdrMetadata, SLOT(setEnabled(bool)));
connect(ui->cmbProfileH265,
SIGNAL(currentIndexChanged(int)),
SLOT(slotH265ProfileChanged(int)));
slotH265ProfileChanged(ui->cmbProfileH265->currentIndex());
- connect(ui->btnHdrMetadata, SIGNAL(clicked()), SLOT(slotEditHDRMetadata()));
connect(ui->cmbPaletteuseDitherGIF,
SIGNAL(currentIndexChanged(int)),
@@ -226,6 +222,7 @@ KisVideoExportOptionsDialog::KisVideoExportOptionsDialog(ContainerType container
slotBayerFilterSelected(ui->cmbPaletteuseDitherGIF->currentIndex());
setSupportsHDR(false);
+ m_d->hdrMetadataOptions = hdrOptions;
}
KisVideoExportOptionsDialog::~KisVideoExportOptionsDialog()
@@ -447,10 +444,6 @@ void KisVideoExportOptionsDialog::setConfiguration(const KisPropertiesConfigurat
slotCodecSelected(index);
slotH265ProfileChanged(ui->cmbProfileH265->currentIndex());
-
- KisPropertiesConfigurationSP metadataProperties = new KisPropertiesConfiguration();
- cfg->getPrefixedProperties("hdrMetadata/", metadataProperties);
- m_d->hdrMetadataOptions.fromProperties(metadataProperties);
}
QStringList KisVideoExportOptionsDialog::generateCustomLine() const
@@ -572,7 +565,6 @@ void KisVideoExportOptionsDialog::slotH265ProfileChanged(int index)
m_d->profilesXH265[index].id() == "main10";
ui->chkUseHDRMetadata->setEnabled(enableHDR);
- ui->btnHdrMetadata->setEnabled(enableHDR && ui->chkUseHDRMetadata->isChecked());
QString hdrToolTip;
@@ -583,17 +575,6 @@ void KisVideoExportOptionsDialog::slotH265ProfileChanged(int index)
}
ui->chkUseHDRMetadata->setToolTip(hdrToolTip);
- ui->btnHdrMetadata->setToolTip(hdrToolTip);
-}
-
-void KisVideoExportOptionsDialog::slotEditHDRMetadata()
-{
- VideoHDRMetadataOptionsDialog dlg(this);
- dlg.setHDRMetadataOptions(m_d->hdrMetadataOptions);
-
- if (dlg.exec() == QDialog::Accepted) {
- m_d->hdrMetadataOptions = dlg.hdrMetadataOptions();
- }
}
void KisVideoExportOptionsDialog::slotBayerFilterSelected(int index)
diff --git a/libs/ui/animation/VideoExportOptionsDialog.h b/libs/ui/animation/VideoExportOptionsDialog.h
index 8ca659ecba..0c0532a1c2 100644
--- a/libs/ui/animation/VideoExportOptionsDialog.h
+++ b/libs/ui/animation/VideoExportOptionsDialog.h
@@ -11,6 +11,7 @@
#include <kis_properties_configuration.h>
#include "KisVideoSaver.h"
+#include "KisHDRMetadataOptions.h"
#include <QScopedPointer>
@@ -47,7 +48,7 @@ public:
};
public:
- explicit KisVideoExportOptionsDialog(ContainerType containerType, const QStringList& validEncoders, QWidget *parent = 0);
+ explicit KisVideoExportOptionsDialog(ContainerType containerType, const QStringList& validEncoders, KisHDRMetadataOptions hdrOptions, QWidget *parent = 0);
~KisVideoExportOptionsDialog() override;
void setSupportsHDR(bool value);
@@ -71,7 +72,6 @@ private Q_SLOTS:
void slotCodecSelected(int index);
void slotH265ProfileChanged(int index);
- void slotEditHDRMetadata();
void slotBayerFilterSelected(int index);
private:
diff --git a/libs/ui/animation/VideoHDRMetadataOptionsDialog.cpp b/libs/ui/animation/VideoHDRMetadataOptionsDialog.cpp
deleted file mode 100644
index 06b5feec77..0000000000
--- a/libs/ui/animation/VideoHDRMetadataOptionsDialog.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <[email protected]>
- *
- * SPDX-License-Identifier: LGPL-2.1-or-later
- */
-
-#include "VideoHDRMetadataOptionsDialog.h"
-#include "ui_VideoHDRMetadataOptionsDialog.h"
-
-#include "KisHDRMetadataOptions.h"
-
-#include <kstandardguiitem.h>
-
-VideoHDRMetadataOptionsDialog::VideoHDRMetadataOptionsDialog(QWidget *parent)
- : KoDialog(parent),
- ui(new Ui::VideoHDRMetadataOptionsDialog)
-{
- setButtons(Ok | Cancel);
- setDefaultButton(Ok);
-
- QWidget *page = new QWidget(this);
- ui->setupUi(page);
- setMainWidget(page);
-
- ui->cmbMasterDisplay->addItem(i18n("Rec. 2100 PQ"), "p2100-pq");
- ui->cmbMasterDisplay->addItem(i18n("DCI-P3 D65"), "dci-p3-d65");
- ui->cmbMasterDisplay->addItem(i18n("Custom"), "custom");
-
- connect(ui->cmbMasterDisplay, SIGNAL(currentIndexChanged(int)), SLOT(slotPredefinedDisplayIdChanged()));
-}
-
-VideoHDRMetadataOptionsDialog::~VideoHDRMetadataOptionsDialog()
-{
- delete ui;
-}
-
-void VideoHDRMetadataOptionsDialog::setHDRMetadataOptions(const KisHDRMetadataOptions &options)
-{
- ui->dblRedX->setValue(options.redX);
- ui->dblRedY->setValue(options.redY);
-
- ui->dblGreenX->setValue(options.greenX);
- ui->dblGreenY->setValue(options.greenY);
-
- ui->dblBlueX->setValue(options.blueX);
- ui->dblBlueY->setValue(options.blueY);
-
- ui->dblWhiteX->setValue(options.whiteX);
- ui->dblWhiteY->setValue(options.whiteY);
-
- ui->dblMinLuminance->setValue(options.minLuminance);
- ui->dblMaxLuminance->setValue(options.maxLuminance);
-
- ui->intMaxCLL->setValue(options.maxCLL);
- ui->intMaxFALL->setValue(options.maxFALL);
-
- int index = ui->cmbMasterDisplay->findData(options.predefinedMasterDisplayId);
- if (index < 0) {
- index = ui->cmbMasterDisplay->findData("custom");
- }
- ui->cmbMasterDisplay->setCurrentIndex(index);
-
- slotPredefinedDisplayIdChanged();
-}
-
-KisHDRMetadataOptions VideoHDRMetadataOptionsDialog::hdrMetadataOptions() const
-{
- KisHDRMetadataOptions options;
-
- ui->dblRedX->setValue(options.redX);
- options.redY = ui->dblRedY->value();
-
- options.greenX = ui->dblGreenX->value();
- options.greenY = ui->dblGreenY->value();
-
- options.blueX = ui->dblBlueX->value();
- options.blueY = ui->dblBlueY->value();
-
- options.whiteX = ui->dblWhiteX->value();
- options.whiteY = ui->dblWhiteY->value();
-
- options.minLuminance = ui->dblMinLuminance->value();
- options.maxLuminance = ui->dblMaxLuminance->value();
-
- options.maxCLL = ui->intMaxCLL->value();
- options.maxFALL = ui->intMaxFALL->value();
-
- options.predefinedMasterDisplayId = ui->cmbMasterDisplay->currentData().toString();
-
- return options;
-}
-
-void VideoHDRMetadataOptionsDialog::slotPredefinedDisplayIdChanged()
-{
- const QString displayId = ui->cmbMasterDisplay->currentData().toString();
-
- if (displayId == "p2100-pq") {
- ui->grpCustomDisplay->setEnabled(false);
-
- ui->dblRedX->setValue(0.708);
- ui->dblRedY->setValue(0.292);
-
- ui->dblGreenX->setValue(0.170);
- ui->dblGreenY->setValue(0.797);
-
- ui->dblBlueX->setValue(0.131);
- ui->dblBlueY->setValue(0.046);
-
- ui->dblWhiteX->setValue(0.3127);
- ui->dblWhiteY->setValue(0.3290);
-
- ui->dblMinLuminance->setValue(0.005);
- ui->dblMaxLuminance->setValue(1000);
-
- } else if (displayId == "dci-p3-d65") {
- ui->grpCustomDisplay->setEnabled(false);
-
- ui->dblRedX->setValue(0.680);
- ui->dblRedY->setValue(0.320);
-
- ui->dblGreenX->setValue(0.265);
- ui->dblGreenY->setValue(0.690);
-
- ui->dblBlueX->setValue(0.150);
- ui->dblBlueY->setValue(0.060);
-
- ui->dblWhiteX->setValue(0.3127);
- ui->dblWhiteY->setValue(0.3290);
-
- ui->dblMinLuminance->setValue(0.005);
- ui->dblMaxLuminance->setValue(1000);
-
- } else {
- ui->grpCustomDisplay->setEnabled(true);
- }
-
-}
diff --git a/libs/ui/animation/VideoHDRMetadataOptionsDialog.h b/libs/ui/animation/VideoHDRMetadataOptionsDialog.h
deleted file mode 100644
index aa671146d5..0000000000
--- a/libs/ui/animation/VideoHDRMetadataOptionsDialog.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <[email protected]>
- *
- * SPDX-License-Identifier: LGPL-2.1-or-later
- */
-
-#ifndef VIDEOHDRMETADATAOPTIONSDIALOG_H
-#define VIDEOHDRMETADATAOPTIONSDIALOG_H
-
-#include <KoDialog.h>
-
-#include "kis_types.h"
-
-struct KisHDRMetadataOptions;
-
-
-namespace Ui {
-class VideoHDRMetadataOptionsDialog;
-} // namespace Ui
-
-class VideoHDRMetadataOptionsDialog : public KoDialog
-{
- Q_OBJECT
-
-public:
- explicit VideoHDRMetadataOptionsDialog(QWidget *parent = nullptr);
- ~VideoHDRMetadataOptionsDialog() override;
-
- void setHDRMetadataOptions(const KisHDRMetadataOptions &options);
- KisHDRMetadataOptions hdrMetadataOptions() const;
-
-private Q_SLOTS:
- void slotPredefinedDisplayIdChanged();
-
-private:
- Ui::VideoHDRMetadataOptionsDialog *ui;
-};
-
-#endif // VIDEOHDRMETADATAOPTIONSDIALOG_H
diff --git a/libs/ui/animation/VideoHDRMetadataOptionsDialog.ui b/libs/ui/animation/VideoHDRMetadataOptionsDialog.ui
deleted file mode 100644
index 01f972c7d8..0000000000
--- a/libs/ui/animation/VideoHDRMetadataOptionsDialog.ui
+++ /dev/null
@@ -1,345 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <author>
- SPDX-FileCopyrightText: none
- SPDX-License-Identifier: GPL-3.0-or-later
- </author>
- <class>VideoHDRMetadataOptionsDialog</class>
- <widget class="QWidget" name="VideoHDRMetadataOptionsDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>320</width>
- <height>332</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>320</width>
- <height>0</height>
- </size>
- </property>
- <property name="windowTitle">
- <string>Dialog</string>
- </property>
- <layout class="QFormLayout" name="formLayout_4">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Master Display:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="cmbMasterDisplay"/>
- </item>
- <item row="1" column="0" colspan="2">
- <widget class="QGroupBox" name="grpCustomDisplay">
- <property name="title">
- <string>Display</string>
- </property>
- <layout class="QFormLayout" name="formLayout_3">
- <item row="0" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="1,1">
- <item>
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>x</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>y</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Red Primary:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QDoubleSpinBox" name="dblRedX">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDoubleSpinBox" name="dblRedY">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>Green Primary:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QDoubleSpinBox" name="dblGreenX">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDoubleSpinBox" name="dblGreenY">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Blue Primary:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QDoubleSpinBox" name="dblBlueX">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDoubleSpinBox" name="dblBlueY">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="4" column="0" colspan="2">
- <spacer name="verticalSpacer_4">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>White Point:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QDoubleSpinBox" name="dblWhiteX">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDoubleSpinBox" name="dblWhiteY">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="6" column="0" colspan="2">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="label_11">
- <property name="text">
- <string>Min Luminance:</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QDoubleSpinBox" name="dblMinLuminance">
- <property name="suffix">
- <string> cd/m²</string>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- <property name="maximum">
- <double>10000.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>Max Luminance:</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QDoubleSpinBox" name="dblMaxLuminance">
- <property name="suffix">
- <string> cd/m²</string>
- </property>
- <property name="decimals">
- <number>4</number>
- </property>
- <property name="maximum">
- <double>10000.000000000000000</double>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>MaxCLL:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QSpinBox" name="intMaxCLL">
- <property name="suffix">
- <string> cd/m²</string>
- </property>
- <property name="maximum">
- <number>10000</number>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>MaxFALL:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="intMaxFALL">
- <property name="suffix">
- <string> cd/m²</string>
- </property>
- <property name="maximum">
- <number>10000</number>
- </property>
- </widget>
- </item>
- <item row="5" column="0" colspan="2">
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- </spacer>
- </item>
- <item row="2" column="0" colspan="2">
- <spacer name="verticalSpacer_3">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/libs/ui/animation/video_export_options_dialog.ui b/libs/ui/animation/video_export_options_dialog.ui
index f3f56c8e8b..8d15bf58eb 100644
--- a/libs/ui/animation/video_export_options_dialog.ui
+++ b/libs/ui/animation/video_export_options_dialog.ui
@@ -6,6 +6,14 @@
</author>
<class>VideoExportOptionsDialog</class>
<widget class="QWidget" name="VideoExportOptionsDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>382</width>
+ <height>338</height>
+ </rect>
+ </property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
@@ -25,6 +33,9 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="KisStackedWidget" name="stackedWidget">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
<widget class="QWidget" name="pgOpenH264">
<layout class="QFormLayout" name="formLayout_7">
<property name="leftMargin">
@@ -183,22 +194,10 @@
<widget class="QComboBox" name="cmbTuneH265"/>
</item>
<item row="4" column="0" colspan="2">
- <widget class="QGroupBox" name="chkUseHDRMetadata">
- <property name="title">
+ <widget class="QCheckBox" name="chkUseHDRMetadata">
+ <property name="text">
<string>HDR Mode</string>
</property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QPushButton" name="btnHdrMetadata">
- <property name="text">
- <string>HDR Metadata...</string>
- </property>
- </widget>
- </item>
- </layout>
</widget>
</item>
</layout>
@@ -503,8 +502,6 @@
<tabstop>cmbPresetH265</tabstop>
<tabstop>cmbProfileH265</tabstop>
<tabstop>cmbTuneH265</tabstop>
- <tabstop>chkUseHDRMetadata</tabstop>
- <tabstop>btnHdrMetadata</tabstop>
<tabstop>intBitrate</tabstop>
<tabstop>vp9Mbits</tabstop>
<tabstop>vp9Lossless</tabstop>