[Mesa-dev] [Linaro-mm-sig] [RFC] New dma_buf -> EGLImage EGL extension

Rob Clark rob.clark at linaro.org
Wed Oct 3 05:38:58 PDT 2012

On Tue, Oct 2, 2012 at 2:10 PM, Maarten Lankhorst
<m.b.lankhorst at gmail.com> wrote:
> How do you want to deal with the case where Y' and CbCr are different hardware buffers?
> Could some support for 2d arrays be added in case Y' and CbCr are separated into top/bottom fields?
> How are semi-planar/planar formats handled that have a different width/height for Y' and CbCr? (YUV420)

The API works (AFAIU) like drm addfb2 ioctl, take I420 for example,
you could either do:

  single buffer:
     fd0 = fd
     offset0 = 0
     pitch0 = width
     fd1 = fd
     offset1 = width * height
     pitch1 = width / 2
     fd2 = fd
     offset2 = offset1 + (width / height / 4)
     pitch2 = width / 2

  multiple buffers:
     offset0 = offset1 = offset2 = 0
     fd0 = fd_luma
     fd1 = fd_u
     fd2 = fd_v
     ... and so on

for interlaced/stereo.. is sticking our heads in sand an option?  :-P

You could get lots of permutations for data layout of fields between
interlaced and stereo.  One option might be to ignore and let the user
create two egl-images and deal with blending in the shader?


More information about the mesa-dev mailing list