TX1 : NvEGLImageFromFd; The video data from dmabuf_fd is YUV ?

EGLImageKHR NvEGLImageFromFd(EGLDisplay display, int dmabuf_fd);

In the “include/nvbuf_utils.h” file, can find the func NvEGLImageFromFd().

IIRC,the decoded video data is sending to dmabuf_fd,then the NVRender gets the ImageData by NvEGLImageFromFd and


My question is :
The video data from dmabuf_fd is YUV ?

If yes , the Image Data (EGLImageKHR) is RGB ?

If yes, NvEGLImageFromFd can change YUV to RGB ?

No, it is not always YUV. It depends on the dma buffer type. If the dmabuf_fd is from Argus camera, it could be YUV420 or NV12.


The dmabuf_fd from Argus camera could be YUV420 or NV12,but what is the dmabuf_fd from the decoder ?

The dmabuf_fd from decoder could be YUV420 or NV12.

Hi DaneLLL:

Can you tell me how do the function NvEGLImageFromFd() handle the video data from DMA_Buf?

I want to know how to get one frame video from dma_fd,
so the source of the function NvEGLImageFromFd() can be access for me ?

Hi alex, we have sample codes for both encoding and decoding

Please give it a check.

Hi DaneLLL
I know how to use the function NvEGLImageFromFd,
but now I want to get the source code of implementing the function NvEGLImageFromFd.

EGLImageKHR NvEGLImageFromFd(EGLDisplay display, int dmabuf_fd)
       //this  context is what i want to get

Hi alex, it is not open-source.

1 Like