After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728890 - GstGLUpload: wrong colors for YUY2 and UYVY on GLES
GstGLUpload: wrong colors for YUY2 and UYVY on GLES
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 730015 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-24 16:05 UTC by Julien Isorce
Modified: 2014-05-23 06:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gl/memory: implement GL_EXT_texture_rg support (9.53 KB, patch)
2014-05-22 14:12 UTC, Matthew Waters (ystreet00)
none Details | Review

Description Julien Isorce 2014-04-24 16:05:45 UTC
On RPI NV12, NV21, YU2, UYVY looks correct but videotestsrc ! YUY2/UYVY ! glimagesink not.

On my laptop they all look ok when using egl but I have not investigated to much.
Comment 1 Nicolas Dufresne (ndufresne) 2014-05-07 19:28:54 UTC
Same here, on lib mali, YUY2, UYVY and I420 are broken.
Comment 2 Nicolas Dufresne (ndufresne) 2014-05-13 17:04:29 UTC
*** Bug 730015 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Dufresne (ndufresne) 2014-05-13 17:08:19 UTC
Depending on the stack and the state of ram, we see different weirdness. But generally speeking, it fails everywhere.

To reproduce, that give weird result with mesa GLES2:

GST_GL_API=gles2 gst-launch-1.0 videotestsrc ! video/x-raw,format=YUY2 ! glimagesink

On MALI GLES2, I started seeing this error with git master:

0:00:00.704512522  6945 0xb5b01e00 ERROR                default gstglutils.c:83:gst_gl_context_check_framebuffer_status: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
Comment 4 Matthew Waters (ystreet00) 2014-05-21 00:36:01 UTC
However it still needs EXT_texture_rg to support it properly. bug #704222 and bug #729750.

commit 2da979831ec3b1a8d993eb6f2d3999c5810c4d67
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Wed May 21 10:26:21 2014 +1000

    gl/upload: switch the 'master' texture for YUY2, UYVY
    
    From d4bcef3204709159713ff1630978ecac0bd91dc9 on, using a RGBA
    texture to hold the data causes the glmemory to have half width
    and a scaling of [2, 1].  Using a LA texture solves this problem
    however cannot be attached to the framebuffer for copying into
    a RGBA texture.  Which will be solved by moving to EXT_texture_rg.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728890
Comment 5 Sebastian Dröge (slomo) 2014-05-22 06:45:55 UTC
Let's close this one then?
Comment 6 Nicolas Dufresne (ndufresne) 2014-05-22 13:50:08 UTC
I'll update and test on my target today, sorry for the delay. Julien, would you have time to check the current state the Pi, as this was the original report ?
Comment 7 Matthew Waters (ystreet00) 2014-05-22 14:12:46 UTC
Created attachment 276990 [details] [review]
gl/memory: implement GL_EXT_texture_rg support

Ok, so to test, you'll need current master plus this patch which works with mesa's big GL but not its GLES2 implementation.  According to the GLES spec, we need to provide sized internal formats (like GL_R8) instead of the unsized formats (GL_RED) to both glTexImage*, glReadPixels, etc.  I am working on that.
Comment 8 Nicolas Dufresne (ndufresne) 2014-05-22 16:07:33 UTC
Did a quick sanity on PC, YUY2 still seems broken, greenish image before this last patch, an solid green with it:

GST_GL_API=gles2 gst-launch-1.0 videotestsrc ! video/x-raw,format=YUY2 ! glimagesink
Comment 9 Nicolas Dufresne (ndufresne) 2014-05-22 16:11:04 UTC
But I confirm the patch fixes YUY2 on big GL. Are you working on a patch to re-enabled support for GLES2 ?
Comment 10 Matthew Waters (ystreet00) 2014-05-23 01:24:30 UTC
commit f165ece022b22cb3bd4a373edfd90741636213a8
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Fri May 23 11:01:06 2014 +1000

    gl/colorconvert: remove scratch texture for YUY2/UYVY
    
    We can get all our data from the one RG/LA texture with some shader magic.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728890
Comment 11 Matthew Waters (ystreet00) 2014-05-23 01:26:28 UTC
Had to rebase:

commit 001b92ba129a3d263dd43eabece172b365a3f075
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Wed May 21 21:47:45 2014 +1000

    gl/memory: implement GL_EXT_texture_rg support
    
    Which is used by default over the Luminance formats due to it
    being color renderable with fbos (and deprecation/removal with
    GL 3.x).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729750
    https://bugzilla.gnome.org/show_bug.cgi?id=704222
    https://bugzilla.gnome.org/show_bug.cgi?id=728890

commit 26e951735508567894818160204c24dbbd76abd9
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Fri May 23 11:01:06 2014 +1000

    gl/colorconvert: remove scratch texture for YUY2/UYVY
    
    We can get all our data from the one RG/LA texture with some shader magic.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728890