diff --git a/src/plugins/videonode/imx6/qsgvivantevideomaterialshader.cpp b/src/plugins/videonode/imx6/qsgvivantevideomaterialshader.cpp index 7b5e5e58b00f19a6a982bd93001297b4bbecd6bc..2c2c342a64416886c995094cad9b9a4d15e2a380 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 d5f1e618190ac1847e90d382488cc69bf2a519ee..ae35095468610f054bc75d743d1b8a805fbda456 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;