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_import extension.
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.
will I have to convert RGB888 to RGBA8888 before passing? what are the other options. below is my code.
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 * 3, 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); 2Related questions 4 Is it possible to render in RGB888 with OpenGL? 3 How do we use textures in RGB565 format w/ iOS GLKTextureLoader? 2 openGL ES 2.0 on android , YUV to RGB and Rendering with ffMpeg Related questions 4 Is it possible to render in RGB888 with OpenGL? 3 How do we use textures in RGB565 format w/ iOS GLKTextureLoader? 2 openGL ES 2.0 on android , YUV to RGB and Rendering with ffMpeg 4 Android EGL sRGB default renderbuffer 4 Android opengl es YUV to RGB conversion using shaders 9 texture for YUV420 to RGB conversion in OpenGL ES 1 RGBA4 format with type GL_UNSIGNED_BYTE 1 how to generate RGBA4444 texture data using libpng, and use it for opengl? 26 YUV to RGB conversion and display using opengl es 2.0 from android ndk using shaders 2 how to use GL_RGB9_E5 format? Load 7 more related questions Show fewer related questions
Reset to default