GNOME Bugzilla – Bug 719439
qtquick2videosink: Wrong uniform value is set for GST_VIDEO_FORMAT_I420 in VideoMaterialShader::updateState()
Last modified: 2014-11-08 14:11:34 UTC
When using the qmlplayer2 example the colors of the Big Buck Bunny video are not correct. Inside the VideoMaterialShader::updateState() function the m_id_rgbTexture var is used to set the uniform value for RGB or YUV textures. If the video format is GST_VIDEO_FORMAT_I420 the m_id_rgbTexture var is -1. Because of this the uniform value for RGB textures is set. This causes the incorrect colors of the video. The attached patch solves this for me.
Created attachment 262965 [details] [review] Patch for the GST_VIDEO_FORMAT_I420 color issue
commit 10798183484bc2ae7496db0c1193109d1702d4b5 Author: Benjamin Federau <benjamin.federau@basyskom.com> Date: Mon Feb 3 12:45:20 2014 +0100 qtquick2videosink: fix wrong uniform value set for GST_VIDEO_FORMAT_I420 in VideoMaterialShader::updateState() Inside the VideoMaterialShader::updateState() function the m_id_rgbTexture var is used to set the uniform value for RGB or YUV textures. If the video format is GST_VIDEO_FORMAT_I420 the m_id_rgbTexture var is -1. Because of this the uniform value for RGB textures is set. This causes the incorrect colors of the video. This patch fixes this bug. https://bugzilla.gnome.org/show_bug.cgi?id=719439