With EGL_EXT_image_dma_buf_import, user can import dma_buf with offset.
This is also used by AOSP GLConsumer::updateTexImage with HAL_PIXEL_FORMAT_YV12 buffer which store YUV planes in the same buffer with offset. Render sample from it using GL_OES_EGL_image_external. This should fix some video display problem when using MediaCodec soft decoding which generates HAL_PIXEL_FORMAT_YV12 buffer and render it on screen.
Test program: https://github.com/yuq/gfx/tree/master/yuv2rgb/dma-buf