VPI 3.2: No Image Format for VPIImage when using vpiImageCreateWrapper() with EGLImage

Hi All,

I am using EGLImages as described here: 1. CUDA for Tegra — CUDA for Tegra 12.9 documentation to interface between cuda and openGL textures.

I have been able to wrap the eglImage using the vpiImageCreateWrapper() function to wrap an eglImage created from an openGL texture without error.

I can confirm that the width and height of the image is correct using vpiImageGetSize().

I can also query the image format of the VPIImage using vpiImageGetImageFormat(). However, this returns an undefined value of something large and negative like -1071552303.

When I attempt to use the image in a simple vpi function like vpiSubmitImageResize() I get this error:

VPI_ERROR_INVALID_ARGUMENT: Input and output image formats do not match

The openGL texture I originally initialise to register with egl is of type GL_RGBA with 8-bit, unsigned values (e.g. GL_UNSIGNED_BYTE).

Can you give me more information as to if this is a valid thing to attempt, and if it is, how I can set the format of the vpiImage so that the egl image can be used in VPI image functions.

Kind regards,

Tom

Hi,
Pleas share us a test sample so that we can replicate the error on developer kit. Meanwhile you may consider use NvBufSurface APIs. We have samples in

/usr/src/jetson_multimedia_api/samples

You can call NvBufSurfTransform() to resize the frame data.

Hi @DaneLLL,

Thank you for getting back to me.

I will look at the samples. I am more interested in seeing if I can access the underlying memory in the EGLImage (created via an OpenGL texture) directly as a VPIImage using the wrapper function rather than the actual resizing of the texture.

Can you tell me if this is possible or if the texture memory created is a “graphics surface” or something similar rather than pitch-linear memory and hence cannot be used directly with VPI? I am obviously surmising this to be the reason it doesn’t currently work but some more information would be greatly appreciated.

Kind regards,

Tom.

Is this still an issue to support? Any result can be shared?

Hi, this is no longer an issue. I have gone a different way instead so have side-stepped this issue.

Thanks.