diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-02-26 17:29:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-04 17:54:15 +0100 |
commit | 19b1dff5b22d66f365456359ee782a4afc963526 (patch) | |
tree | f1de2be3c187528d103427d2ca7e5c692e48a232 | |
parent | 6eba2a271519317c11f2902fa708eb00be2e0e4e (diff) | |
download | qtmultimedia-19b1dff5b22d66f365456359ee782a4afc963526.tar.gz |
videonode: imx6: cleanup pixel formats
All formats are now tested.
Also, don't use the alpha channel. This is not quite correct for formats
with alpha channel but for video probably a good idea.
Change-Id: I4a2404d7c96023bb1e3fca41e1f224d23347f290
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
-rw-r--r-- | src/plugins/videonode/imx6/qsgvivantevideomaterialshader.cpp | 2 | ||||
-rw-r--r-- | src/plugins/videonode/imx6/qsgvivantevideonode.cpp | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/videonode/imx6/qsgvivantevideomaterialshader.cpp b/src/plugins/videonode/imx6/qsgvivantevideomaterialshader.cpp index 7b5e5e58b..2c2c342a6 100644 --- a/src/plugins/videonode/imx6/qsgvivantevideomaterialshader.cpp +++ b/src/plugins/videonode/imx6/qsgvivantevideomaterialshader.cpp @@ -91,7 +91,7 @@ const char *QSGVivanteVideoMaterialShader::fragmentShader() const { "" "void main()" "{" - " gl_FragColor = texture2D( texture, qt_TexCoord ) * opacity;\n" + " gl_FragColor = vec4(texture2D( texture, qt_TexCoord ).rgb, 1.0) * opacity;\n" "}"; return shader; } diff --git a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp index d5f1e6181..ae3509546 100644 --- a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp +++ b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp @@ -71,16 +71,14 @@ const QMap<QVideoFrame::PixelFormat, GLenum>& QSGVivanteVideoNode::getVideoForma if (static_VideoFormat2GLFormatMap.isEmpty()) { static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_YV12, GL_VIV_YV12); static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_NV12, GL_VIV_NV12); - - - // The following formats should work but are untested! static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_NV21, GL_VIV_NV21); static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_UYVY, GL_VIV_UYVY); static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_YUYV, GL_VIV_YUY2); - static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_RGB32, GL_RGBA); - static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_RGB24, GL_RGB); + static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_RGB32, GL_BGRA_EXT); + static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_ARGB32, GL_BGRA_EXT); + static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_BGR32, GL_RGBA); + static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_BGRA32, GL_RGBA); static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_RGB565, GL_RGB565); - static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_BGRA32, GL_BGRA_EXT); } return static_VideoFormat2GLFormatMap; |