From a15cf55bc4b0013dae43e406d9181f88f032add8 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 5 Jan 2015 15:43:51 +0100 Subject: [PATCH] Support YUV420P in the i.MX6 video node Camera input is often in this format. Until now the lack of GL_VIV_I420 (which was presumably missing in older versions of the extension?) in the format list resulted in falling back to the built-in i420 node instead of the zero-copy imx6 one. This is now corrected by adding the correct format mapping. Change-Id: I6e891bb3bb07d64ccd5b2d170b052f677c8bd19c Reviewed-by: aavit --- src/plugins/videonode/imx6/qsgvivantevideonode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp index a42b577..1c1c100 100644 --- a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp +++ b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp @@ -61,6 +61,7 @@ void QSGVivanteVideoNode::setCurrentFrame(const QVideoFrame &frame) const QMap& QSGVivanteVideoNode::getVideoFormat2GLFormatMap() { if (static_VideoFormat2GLFormatMap.isEmpty()) { + static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_YUV420P, GL_VIV_I420); static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_YV12, GL_VIV_YV12); static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_NV12, GL_VIV_NV12); static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_NV21, GL_VIV_NV21); -- 2.7.4