glupload: dmabuf: be explicit about gl formats used
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 9 Nov 2018 08:32:49 +0000 (09:32 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Sun, 11 Nov 2018 21:15:59 +0000 (16:15 -0500)
commit989f53383b6e833183167e7c1e08a5bb9bb4d267
treedff9ffa1c691f1d1dfa750afe5671f31e3be20da
parent99ac4e660013ceee21e85712352a0702b9815590
glupload: dmabuf: be explicit about gl formats used

Rather then letting gst_gl_memory_setup_buffer guess the GL format used
for an eglimage after importing a dmabuf be explicit about it. This
fixes issues where dmabuf import may have used another format then
gst_gl_format_from_video_info would guess on the basis of the available
GL extensions.

In particular on etnaviv the gst_gl_format_from_video_info would
assuming a luminance + alpha GL format is used for YUY2, but the dmabuf
import will always use RG88. Which causes images to end up somewhat pink when
displayed on the screen.
gst-libs/gst/gl/gstglupload.c