Issues when deadling with UYVY buffers from NVMM to EGLImage - cuGraphicsEGLRegisterImage

Dear all,

I have been working on supporting NVMM UYVY images on a GStreamer element. However, I have come across an issue that reports that the “operation is not supported” when registering the EGL image in cuGraphics (cuGraphicsEGLRegisterImage).

The current workflow is the following:

GstMapInfo * buf; /* Assume it is defined */
int fd = 0;
EGLImageKHR egl_image;
CUeglFrame egl_frame;
CUgraphicsResource resource;

auto status = ExtractFdFromNvBuffer ((void *) buf->data, (int *) &fd);
if (status !0) return -1;

egl_image = NvEGLImageFromFd (egl_display, fd); /* Assume the display is defined*/
if (!egl_image) return -1;

status = cuGraphicsEGLRegisterImage (&resource, egl_image,

if (status != CUDA_SUCCESS) {
    cuGetErrorString (status, &error);
    GST_ERROR ("Unable to register EGL image: %s", error);
    return -1;

The buffer params obtained after grabbing the FD (ExtractFdFromNvBuffer), is the following:

fd: 1030
nv_buffer: 0x7f8404d6d0
nv_buffer_size: 1008
pixel_format: 9   <-------- UYVY coming
num_planes: 1
width[0]: 320
width[1]: 0
width[2]: 0
height[0]: 240
height[1]: 0
height[2]: 0
pitch[0]: 768
pitch[1]: 0
pitch[2]: 0
offset[0]: 0
offset[1]: 0
offset[2]: 0

The message (from the code) is:

Unable to register EGL image: operation not supported

According to the documentation, the UYVY format is supported by the CUDA Driver as well as the Multimedia API.

With other formats like I420 and RGBA, it works like a charm.

Do you have any hints on what is going wrong?
Jetpack version: 4.5.1

Thanks in advance.

Best regards,

Hi RidgeRun team,
This is a known issue on r32 releases. As a quick solution, please refer to this post:
UYVY for cuGraphicsEGLRegisterImage in 32.2 SDK - #10 by DaneLLL

Hi @DaneLLL

Thanks for the quick answer. I will try it tomorrow.

Update: It worked. It is a bit odd resorting the memory though