This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RGB888 format not working in eglCreateImageKHR

I implemented an opengl-es application running on mali-400 gpu. I grab the 1280x960 RGB buffer from camera and render on GPU , I use zero copy operation using EGL_EXT_image_dma_buf_importextension.

My problem is that the Besler camera gives frames in RGB888 format.

but eglCreateImageKHR is working only if I give RGBA8888 format .

If I pass RGB888 to eglCreateImageKHR it gives black screen and also egl image returned is 0.

If I convert RGB888 data to RGBA8888 it works . but I don't want to do extra conversions for better performance. How can I use the RGB888 data with eglCreateImageKHR?

Please find the code below:

EGLint egl_img_attr[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE,
    EGL_DMA_BUF_PLANE0_FD_EXT, buffer->dbuf_fd,
    EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,
    EGL_DMA_BUF_PLANE0_PITCH_EXT, TEX_WIDTH * 4,
    EGL_WIDTH, TEX_WIDTH,
    EGL_HEIGHT, TEX_HEIGHT,
    EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_RGBA8888 ,             
    EGL_NONE, EGL_NONE };

buffer->egl_img = eglCreateImageKHR(egl_dpy, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, (EGLClientBuffer)0, egl_img_attr);