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 <eirik.aavitsland@theqtcompany.com>
This commit is contained in:
Laszlo Agocs
2015-01-05 15:43:51 +01:00
parent 68dbc9ba02
commit a15cf55bc4

View File

@@ -61,6 +61,7 @@ void QSGVivanteVideoNode::setCurrentFrame(const QVideoFrame &frame)
const QMap<QVideoFrame::PixelFormat, GLenum>& 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);