summaryrefslogtreecommitdiffstats
path: root/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp')
-rw-r--r--tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp b/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp
index ba1ad233c..43eb8be9a 100644
--- a/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp
+++ b/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp
@@ -788,6 +788,11 @@ void tst_QVideoFrame::formatConversion_data()
QTest::newRow("QVideoFrameFormat::Format_Jpeg")
<< QImage::Format_Invalid
<< QVideoFrameFormat::Format_Jpeg;
+ QTest::newRow("QVideoFrameFormat::Format_RGBX8888")
+ << QImage::Format_RGBX8888 << QVideoFrameFormat::Format_RGBX8888;
+ QTest::newRow("QImage::Format_RGBA8888_Premultiplied => QVideoFrameFormat::Format_RGBX8888 "
+ "(workaround)")
+ << QImage::Format_RGBA8888_Premultiplied << QVideoFrameFormat::Format_RGBX8888;
}
void tst_QVideoFrame::formatConversion()
@@ -798,6 +803,12 @@ void tst_QVideoFrame::formatConversion()
if (imageFormat != QImage::Format_Invalid)
QCOMPARE(QVideoFrameFormat::pixelFormatFromImageFormat(imageFormat), pixelFormat);
+ if (imageFormat == QImage::Format_RGBA8888_Premultiplied) {
+ qWarning() << "Workaround: convert QImage::Format_RGBA8888_Premultiplied to "
+ "QVideoFrameFormat::Format_RGBX8888; to be removed in 6.8";
+ return;
+ }
+
if (pixelFormat != QVideoFrameFormat::Format_Invalid)
QCOMPARE(QVideoFrameFormat::imageFormatFromPixelFormat(pixelFormat), imageFormat);
}