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);
Parents
  • Hi samicko, 

    Looking at the code here I think it should be supported, although without knowing what error is being thrown it's hard to tell where it's failing. For next steps can you:

    • Check the eglGetError() error code.
    • Register a callback handler for the EGL_KHR_debug extension, which should give a more human readable error.

    Also it would be useful to know the driver version you have (query the GL_VERSION string in OpenGL ES).

    Cheers, 
    Pete

     

Reply
  • Hi samicko, 

    Looking at the code here I think it should be supported, although without knowing what error is being thrown it's hard to tell where it's failing. For next steps can you:

    • Check the eglGetError() error code.
    • Register a callback handler for the EGL_KHR_debug extension, which should give a more human readable error.

    Also it would be useful to know the driver version you have (query the GL_VERSION string in OpenGL ES).

    Cheers, 
    Pete

     

Children