From 13bc1e04baa44400835e10fbd2e79d1e4e669f0d Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Sun, 24 Apr 2016 00:37:56 +0200 Subject: Add YUV 4:2:2 8Bit to supported formats of OS X camera plugin. Now that QtQuick handles YUV 4:2:2 8Bit video formats, let the input use them. [ChangeLog][OS X][Input format] Added YUV 4:2:2 8 bit to supported camera video formats. Change-Id: Ib9b927a530232111a1d1139689b4cd2adf34da3f Reviewed-by: Yoann Lopes --- .../avfoundation/camera/avfcameraviewfindersettingscontrol.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm') diff --git a/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm b/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm index d2ae2af05..e1adf44b1 100644 --- a/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm +++ b/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm @@ -414,6 +414,10 @@ QVideoFrame::PixelFormat AVFCameraViewfinderSettingsControl2::QtPixelFormatFromC case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange: case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange: return QVideoFrame::Format_NV12; + case kCVPixelFormatType_422YpCbCr8: + return QVideoFrame::Format_UYVY; + case kCVPixelFormatType_422YpCbCr8_yuvs: + return QVideoFrame::Format_YUYV; default: return QVideoFrame::Format_Invalid; } @@ -434,6 +438,12 @@ bool AVFCameraViewfinderSettingsControl2::CVPixelFormatFromQtFormat(QVideoFrame: case QVideoFrame::Format_NV12: conv = kCVPixelFormatType_420YpCbCr8BiPlanarFullRange; break; + case QVideoFrame::Format_UYVY: + conv = kCVPixelFormatType_422YpCbCr8; + break; + case QVideoFrame::Format_YUYV: + conv = kCVPixelFormatType_422YpCbCr8_yuvs; + break; // These two formats below are not supported // by QSGVideoNodeFactory_RGB, so for now I have to // disable them. -- cgit v1.2.3