summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtem Dyomin <artem.dyomin@qt.io>2024-01-23 14:30:04 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-01-23 19:39:41 +0000
commitb4ccc09abb258f57ca8b1d456369067136673a5a (patch)
tree559f66f35bfc327d91668899c3ebff5bdf033a07 /src
parenta3a82617bccab94ca180534f0c038c83ef414086 (diff)
Fix conversion of QImage::Format_RGBA8888_Premultiplied to PixelFormat
QImage::Format_RGBA8888_Premultiplied should be converted to QVideoFrameFormat::Format_RGBA8888_Premultiplied which is not present in the list of formats. It should be added in 6.8. We've got the format on eglfs, when we grab a frame by OpenglCompositor. The best workaround is conversion to QVideoFrameFormat::Format_RGBX8888. Pick-to: 6.6 6.5 Change-Id: Ic84d47f62c379e4a476a868b2985b525c0ec7edb Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit bdc9e0a2e30d2a7a7edf0c52630eb8137038cd89) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/multimedia/video/qvideoframeformat.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/multimedia/video/qvideoframeformat.cpp b/src/multimedia/video/qvideoframeformat.cpp
index cdb1d3c0a..b2c9dc5f1 100644
--- a/src/multimedia/video/qvideoframeformat.cpp
+++ b/src/multimedia/video/qvideoframeformat.cpp
@@ -743,7 +743,9 @@ QVideoFrameFormat::PixelFormat QVideoFrameFormat::pixelFormatFromImageFormat(QIm
case QImage::Format_RGBA8888:
return QVideoFrameFormat::Format_RGBA8888;
case QImage::Format_RGBA8888_Premultiplied:
- return QVideoFrameFormat::Format_ARGB8888_Premultiplied;
+ // QVideoFrameFormat::Format_RGBA8888_Premultiplied is to be added in 6.8
+ // Format_RGBX8888 suits the best as a workaround
+ return QVideoFrameFormat::Format_RGBX8888;
case QImage::Format_RGBX8888:
return QVideoFrameFormat::Format_RGBX8888;
case QImage::Format_Grayscale8: