[Mesa-dev] Sampling DRM_FORMAT_YUYV in GLSL

Volker Vogelhuber v.vogelhuber at digitalendoscopy.de
Tue May 9 11:32:07 UTC 2017


On 09.05.2017 12:59, Philipp Zabel wrote:
> On Tue, 2017-05-09 at 12:48 +0200, Volker Vogelhuber wrote:
> [...]
>> Ok thanks for the clarification. There is only one missing part for the
>> GL_TEXTURE_2D case. The second EGLImage is created internally when
>> calling eglCreateImage with EGL_LINUX_DMA_BUF_EXT, so I only
>> have one return value I can bind to a texture using
>> glEGLImageTargetTexture2DOES.
>> Is there any "get" function to access the ARGB eglimage to bind it to
>> another
>> texture?
> You create two separate EGLImages, calling eglCreateImage once for each
> plane. See for example:
>
> https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglupload.c#n646
>
> or
>
> https://cgit.freedesktop.org/wayland/weston/tree/libweston/gl-renderer.c#n1536
That assumes I have two planes available. But as mentioned the planes
are created internally by dri2_create_image_dma_buf during my call of 
eglCreateImage.
So from the API point of view I only have one FD from the V4L2 buffer 
that is of type
FOURCC('Y','U','Y','V'). Passing that FD to eglCreateImage returns only 
one EGLImage.
Although understanding gstreamer code is always a bit hard, I think in 
their case they have
a mulit plane V4L2 buffer, where I only have a single plane buffer.
That's why I wonder if there is a way to retrieve the "second" EGLImage 
after eglCreateImage
has been called for the single V4L2 DMABUF file descriptor.



More information about the mesa-dev mailing list