Support byte ordered QImage formats in pixelFormatFromImageFormat

For QVideoFrame purposes they are equivalent.

Change-Id: I776c60aa8ca848e58499bbd0c1fc25c457d46ef6
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Laszlo Agocs
2014-12-19 12:19:04 +01:00
committed by Laszlo Agocs
parent a15cf55bc4
commit 03593d86b8

View File

@@ -902,10 +902,13 @@ QVideoFrame::PixelFormat QVideoFrame::pixelFormatFromImageFormat(QImage::Format
{ {
switch (format) { switch (format) {
case QImage::Format_RGB32: case QImage::Format_RGB32:
case QImage::Format_RGBX8888:
return Format_RGB32; return Format_RGB32;
case QImage::Format_ARGB32: case QImage::Format_ARGB32:
case QImage::Format_RGBA8888:
return Format_ARGB32; return Format_ARGB32;
case QImage::Format_ARGB32_Premultiplied: case QImage::Format_ARGB32_Premultiplied:
case QImage::Format_RGBA8888_Premultiplied:
return Format_ARGB32_Premultiplied; return Format_ARGB32_Premultiplied;
case QImage::Format_RGB16: case QImage::Format_RGB16:
return Format_RGB565; return Format_RGB565;