This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: Create egl Image from video buffer

  • From thread e2e.ti.com/.../2108997,  EGL_LINUX_DMA_BUF_EXT

    is supported by version ti-img-sgx/1.14.3699939



    But we now use a lower version than ti-img-sgx/1.14.3699939, and get fail when try to create egl Image with dma buf (refer to code display-kmscube.c, use NV12 video buffer). Is there other way to create egl Image

    from video buffer (NV12)?



    Best Regards,

    Li
  • Hi Li,

    which device you use?
    which is your SDK?

    Thanks,
    Yordan
  • the chip is DRA746, use for vehicle infotainment.

    I need contact my AE for detailed SDK version.

  • SDK version:

    Version SGX_DDK_Linux_CustomerTI sgxddk 19 1.9@2253347 (release) omap5430_linux System Version String: SGX revision = 1.1.6

    GL and EGL info my test:

    GL Version = OpenGL ES 2.0 build 1.9@2253347
    GL Vendor = Imagination Technologies
    GL Renderer = PowerVR SGX 544MP
    GL Extensions = GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_vertex_half_float GL_OES_texture_float GL_OES_texture_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_fragment_precision_high GL_OES_compressed_ETC1_RGB8_
    texture GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_required_internalformat GL_OES_depth_texture GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_standard_derivatives GL_OES_vertex_array_object GL_OES_egl_
    sync GL_OES_texture_npot GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_EXT_discard_framebuffer GL_EXT_shader_texture_lod GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc GL_IMG_texture_compression_pvrtc2 G
    L_IMG_texture_npot GL_IMG_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_program_binary GL_IMG_uniform_buffer_object GL_IMG_multisampled_render_to_texture GL_TI_image_external_raw_video
    z EGL Extensions: EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_im
    age EGL_KHR_fence_sync EGL_IMG_hibernate_process EGL_WL_bind_wayland_display EGL_KHR_surfaceless_gles2 EGL_NV_post_sub_buffer

  • Hi Li,

    I have forwarded your question to graphics expert for comment.

    Regards,
    Yordan
  • git.ti.com/.../fccafce7d0a023e36c064ccbaa7d33e89252ea00

    Find the patch which adds support for importing DMABUF as EGLImage. Is it possible to apply such patch on our ddk version? (Version SGX_DDK_Linux_CustomerTI sgxddk 19 1.9@2253347 (release) omap5430_linux System Version String: SGX revision = 1.1.6)

    Can TI apply such patch on our ddk version and release image/bin to me?

    Best Regards,
    Li
  • Hi Li/Halley,
    DDK 1.9 did not have support for DMBUF import but you can create a texture from NV12 or YUV video buffer.
    Is that what you are looking for?
    In DDK 1.9, target type used is EGL_RAW_VIDEO_TI_DMABUF which is TI's proprietary EGL extension, and this has been verified with viddec3test+kmscube
    If your SDK version is GLSDK7.04, you can verify this as shown here.

    target$viddec3test --kmscube --connector 4 stream.mp4

    You can refer create_texture() function here. git.ti.com/.../display-kmscube.c

    Ram
  • Yes, create a texture from NV12 video buffer, that's what we want.

    Thanks Ram, we will that it.

    Best Regards,
    Li
  • EGL_RAW_VIDEO_TI_DMABUF works fine, thanks.