summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-10-09 10:56:52 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-10-10 13:29:09 +0200
commit8277070128197744c0073c867dc78caea912bfce (patch)
treea5bca3808bad9de478b5c76a79e89ccc5d5fd33f
parentf06d3d8967bbb5092f0e676b9e0a6ba7c87efec1 (diff)
Remove Format_ABGR32 from supported formats for sq texture video node
Format_ABGR32 was introduced together with gst opengl support. And is supposed to be used with QT_GSTREAMER_USE_OPENGL_PLUGIN=1, Which should be fine for Raspberry Pi, but suddenly does not work for iMX boards. RPI's omxh264dec provides buffers in RGBA format, and corresponding textures will be created using GL_RGBA. Since we return Format_ABGR32 as supported format, which is RGBA, no conversion is needed and everything was ok. But for iMX, imxvpudec provides buffers in I420 format. And textures will be created using GL_RED with only 1 plane. Following patch https://bugzilla.gnome.org/show_bug.cgi?id=779067 requests RGBA too. Since incaps contains I420 and RGBA, and we say that we support RGBA, this leads to use buffers in I420 but *passthrough* in gst_gl_color_convert_element_prepare_output_buffer(). Since incaps and outcaps contain the same video format. No conversion will be done there and textures will be rendered incorrectly. Removing support of Format_ABGR32 from texture video node will cause to ignore requested RGBA from DIRECTVIV and perform converting, I420->BGRx on iMX and RGBA->BGRA on RPI. QT_GSTREAMER_USE_OPENGL_PLUGIN should be used together with decoders that use gpu memory. Otherwise some converting/uploading operations will be done which will also introduce some performance issues, so not recommended to be used for iMX. Change-Id: I8f037316c40587c81b2116c43a7262c6a70a5b44 Fixes: QTBUG-78855 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
-rw-r--r--src/qtmultimediaquicktools/qsgvideonode_texture.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qtmultimediaquicktools/qsgvideonode_texture.cpp b/src/qtmultimediaquicktools/qsgvideonode_texture.cpp
index 318e4cef5..473a4144f 100644
--- a/src/qtmultimediaquicktools/qsgvideonode_texture.cpp
+++ b/src/qtmultimediaquicktools/qsgvideonode_texture.cpp
@@ -44,6 +44,7 @@
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLShaderProgram>
#include <QtMultimedia/private/qmediaopenglhelper_p.h>
+#include <QtMultimedia/private/qtmultimediaglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -58,7 +59,9 @@ QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_Texture::supportedPixelForma
pixelFormats.append(QVideoFrame::Format_ARGB32);
pixelFormats.append(QVideoFrame::Format_BGR32);
pixelFormats.append(QVideoFrame::Format_BGRA32);
+#if !QT_CONFIG(gpu_vivante)
pixelFormats.append(QVideoFrame::Format_ABGR32);
+#endif
}
return pixelFormats;