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.
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.
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.