diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-02 03:01:36 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-02 03:01:37 +0100 |
commit | 8ca9765dabfd27d7c511e21e6862b24e46c2bf40 (patch) | |
tree | 58656a3b756c8f0581a9ca3161052b007f7096da /src/qtmultimediaquicktools | |
parent | c877776c354a625373e1dc0f38ac4918da9a056f (diff) | |
parent | dee506f70536dd10f3e00c42f685ead9283433b9 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia13d887c3e3bf00b6ded5d052384fc5689b816fe
Diffstat (limited to 'src/qtmultimediaquicktools')
5 files changed, 9 insertions, 5 deletions
diff --git a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp index 43cd5a2b2..8e4ea01a1 100644 --- a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp +++ b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp @@ -388,8 +388,8 @@ void QSGVideoMaterial_YUV::bind() // In YUYV texture the UV plane appears with the 1/2 of image and Y width. m_planeWidth[1] = fw / 2; functions->glActiveTexture(GL_TEXTURE1); - // Either r,b (YUYV) or g,a (UYVY) values are used as source of YV. - // Additionally Y and V are set per 2 pixels hence only 1/2 of image with is used. + // Either r,b (YUYV) or g,a (UYVY) values are used as source of UV. + // Additionally U and V are set per 2 pixels hence only 1/2 of image width is used. // Interpreting this properly in shaders allows to not copy or not make conditionals inside shaders, // only interpretation of data changes. bindTexture(m_textureIds[1], m_planeWidth[1], m_frame.height(), m_frame.bits(), GL_RGBA); diff --git a/src/qtmultimediaquicktools/shaders/uyvyvideo.frag b/src/qtmultimediaquicktools/shaders/uyvyvideo.frag index 5c62441c2..244464e73 100644 --- a/src/qtmultimediaquicktools/shaders/uyvyvideo.frag +++ b/src/qtmultimediaquicktools/shaders/uyvyvideo.frag @@ -1,3 +1,4 @@ +// Reference: qgsvideonode_yuv.cpp:387 to 398 uniform sampler2D yTexture; // Y component passed as GL_LUMINANCE_ALPHA, in uyvy Y = a uniform sampler2D uvTexture; // UV component passed as RGBA macropixel, in uyvy U = r, V = b uniform mediump mat4 colorMatrix; diff --git a/src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag b/src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag index 75c7de5a6..b151a7c7f 100644 --- a/src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag +++ b/src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag @@ -1,5 +1,6 @@ #version 150 core -uniform sampler2D yTexture; // Y component passed as GL_LUMINANCE_ALPHA, in uyvy Y = a +// Reference: qgsvideonode_yuv.cpp:387 to 398 +uniform sampler2D yTexture; // Y component passed as GL_RG, in uyvy Y = a uniform sampler2D uvTexture; // UV component passed as RGBA macropixel, in uyvy U = r, V = b uniform mat4 colorMatrix; uniform float opacity; diff --git a/src/qtmultimediaquicktools/shaders/yuyvvideo.frag b/src/qtmultimediaquicktools/shaders/yuyvvideo.frag index 5ce8b7366..c2ad65b78 100644 --- a/src/qtmultimediaquicktools/shaders/yuyvvideo.frag +++ b/src/qtmultimediaquicktools/shaders/yuyvvideo.frag @@ -1,5 +1,6 @@ +// Reference: qgsvideonode_yuv.cpp:387 to 398 uniform sampler2D yTexture; // Y component passed as GL_LUMINANCE_ALPHA, in yuyv Y = r -uniform sampler2D uvTexture; // UV component passed as RGBA macropixel, in uyvy U = g, V = a +uniform sampler2D uvTexture; // UV component passed as RGBA macropixel, in yuyv U = g, V = a uniform mediump mat4 colorMatrix; uniform lowp float opacity; varying highp vec2 qt_TexCoord; diff --git a/src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag b/src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag index 010c4a5f2..a30d7818a 100644 --- a/src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag +++ b/src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag @@ -1,5 +1,6 @@ #version 150 core -uniform sampler2D yTexture; // Y component passed as GL_LUMINANCE_ALPHA, in yuyv Y = r +// Reference: qgsvideonode_yuv.cpp:387 to 398 +uniform sampler2D yTexture; // Y component passed as GL_RG, in yuyv Y = r uniform sampler2D uvTexture; // UV component passed as RGBA macropixel, in uyvy U = g, V = a uniform mat4 colorMatrix; uniform float opacity; |