summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideoframe.cpp
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-02-20 12:57:42 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-06-02 11:14:20 +0000
commit2b96c113cf7057b556856149114999b973b3f2c2 (patch)
tree22e9996536bbac1dbf610d2f93e9229f34db05c3 /src/multimedia/video/qvideoframe.cpp
parentd415aacc308b0c2e9edf11eebfba9a69f7a83bdb (diff)
Map QVideoFrame::Format_Y8=>QImage::Format_Grayscale8 in QVideoFrame
Pick-to: 5.15 Fixes: QTBUG-52455 Change-Id: I30582582935ae0a2c5094db995cba83b62adc767 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideoframe.cpp')
-rw-r--r--src/multimedia/video/qvideoframe.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp
index fd7b74075..7840eda31 100644
--- a/src/multimedia/video/qvideoframe.cpp
+++ b/src/multimedia/video/qvideoframe.cpp
@@ -964,6 +964,8 @@ QVideoFrame::PixelFormat QVideoFrame::pixelFormatFromImageFormat(QImage::Format
return Format_RGB555;
case QImage::Format_RGB888:
return Format_RGB24;
+ case QImage::Format_Grayscale8:
+ return Format_Y8;
default:
return Format_Invalid;
}
@@ -1017,12 +1019,13 @@ QImage::Format QVideoFrame::imageFormatFromPixelFormat(PixelFormat format)
case Format_IMC2:
case Format_IMC3:
case Format_IMC4:
- case Format_Y8:
case Format_Y16:
case Format_Jpeg:
case Format_CameraRaw:
case Format_AdobeDng:
return QImage::Format_Invalid;
+ case Format_Y8:
+ return QImage::Format_Grayscale8;
case Format_User:
default:
return QImage::Format_Invalid;