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 705514 - wayland: Implement YUV surfaces
wayland: Implement YUV surfaces
Product: mutter
Classification: Core
Component: general
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
Depends on:
Blocks: 775698
Reported: 2013-08-05 13:36 UTC by Matthias Clasen
Modified: 2020-09-07 09:29 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Matthias Clasen 2013-08-05 13:36:22 UTC
YUV surfaces are optional in the Wayland protocol, but it would be good to have support for them anyway.
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-12-29 04:07:07 UTC
First requires us firing Cogl into the sun, since that's basically hardcoded to not let us do anything related to YUV.
Comment 2 Vasilis Liaskovitis 2017-05-22 15:45:48 UTC
I stumbled into this while trying to run a gstreamer vaapsink pipeline in wayland/mutter: "Failed to create a texture for surface 7: Unsupported buffer format 12760", which is EGL_TEXTURE_Y_UV_WL 

I 'd like to implement this by adding COGL_PIXEL_FORMAT_YUV support in cogl/mutter. Do you still think it's not recommended to add support for this in COGL?

Could a YUV->RGBA conversion shader be implemented in the cogl-gl driver for this format? Would a different solution be needed for different cogl backends (fixed, arbfp, glsl?). Alternatively could the conversion already be handled entirely in mesa? 

I am not yet familiar with cogl internals, so any suggestions on implementing this are welcome.
Comment 3 Jonas Ådahl 2017-05-23 01:34:54 UTC
I think cogl using a shader is the place where this needs to be handled, yes. Just make sure its not advertised if the cogl backend doesn't advertise it as supported. Doing anything in mesa doesn't help when we're not using mesa.
Comment 4 Olivier Fourdan 2017-06-16 15:09:15 UTC
For reference, Rob Clark pointed out these:

plus something like:

Note: it is a gles-only extension atm
Comment 5 Niels De Graef 2018-11-29 14:28:23 UTC
Heh, I didn't realize mutter still had open bugs on bugzilla so I missed this, but in any case: I'm working on this on my branch wip/nielsdg/add-yuv-support. There's still quite a lot do still, but at the very least, I managed to get it to work completely when buffers passed in are EGLImages.

Just so you know it exists :)
Comment 6 Jonas Ådahl 2020-09-07 09:29:03 UTC
Superseeded by