|
VPI - Vision Programming Interface
0.4.4 Release
|
Go to the documentation of this file.
56 #ifndef NV_VPI_IMAGE_H
57 #define NV_VPI_IMAGE_H
126 #define VPI_DISABLE_BL_HOST_LOCK (1u << 31)
134 typedef struct VPIImagePlaneRec
155 #define VPI_MAX_PLANE_COUNT (6)
158 typedef struct VPIImageDataRec
170 #define vpiImageCreate VPI_APINAME(vpiImageCreate, 004)
171 #define vpiImageCreateHostMemWrapper VPI_APINAME(vpiImageCreateHostMemWrapper, 004)
172 #define vpiImageSetWrappedHostMem VPI_APINAME(vpiImageSetWrappedHostMem, 004)
173 #define vpiImageCreateCudaMemWrapper VPI_APINAME(vpiImageCreateCudaMemWrapper, 004)
174 #define vpiImageSetWrappedCudaMem VPI_APINAME(vpiImageSetWrappedCudaMem, 004)
175 #define vpiImageCreateNvBufferWrapper VPI_APINAME(vpiImageCreateNvBufferWrapper, 004)
176 #define vpiImageSetWrappedNvBuffer VPI_APINAME(vpiImageSetWrappedNvBuffer, 004)
177 #define vpiImageGetFlags VPI_APINAME(vpiImageGetFlags, 004)
178 #define vpiImageGetType VPI_APINAME(vpiImageGetType, 004)
179 #define vpiImageLock VPI_APINAME(vpiImageLock, 004)
414 #endif // NV_VPI_IMAGE_H
uint32_t height
Height of this plane in pixels.
VPIStatus vpiImageCreateCudaMemWrapper(const VPIImageData *cudaData, uint32_t flags, VPIImage *img)
Create an image object by wrapping around an existing device (CUDA) memory block.
VPIStatus vpiImageInvalidate(VPIImage img)
Informs that the image's wrapped memory was updated outside VPI.
uint32_t width
Width of this plane in pixels.
Defines all types needed for programming with VPI.
VPIPixelFormat pixelFormat
Type of each pixel within this plane.
#define VPI_MAX_PLANE_COUNT
Maximum number of data planes an image can have.
VPIStatus vpiImageUnlock(VPIImage img)
Releases the lock on an image object.
Stores information about image characteristics and content.
VPIStatus vpiImageSetWrappedNvBuffer(VPIImage img, int dmabuf_fd)
Redefines the wrapped NvBuffer memory in an existing VPIImage wrapper.
VPIStatus vpiImageCreate(uint32_t width, uint32_t height, VPIImageFormat fmt, uint32_t flags, VPIImage *img)
Create an empty image instance with the specified flags.
VPIStatus vpiImageGetFlags(VPIImage img, uint32_t *flags)
Get the image flags.
void vpiImageDestroy(VPIImage img)
Destroy an image instance.
uint32_t pitchBytes
Difference in bytes of beginning of one row and the beginning of the previous.
struct VPIImageImpl * VPIImage
A handle to an image.
VPIStatus vpiImageGetSize(VPIImage img, uint32_t *width, uint32_t *height)
Get the image size in pixels.
int32_t numPlanes
Number of planes.
VPIStatus vpiImageCreateNvBufferWrapper(int dmabuf_fd, uint32_t flags, VPIImage *img)
Create an image object by wrapping an existing NvBuffer given its dmabuf_fd handle.
VPIStatus vpiImageLock(VPIImage img, VPILockMode mode, VPIImageData *hostData)
Acquires the lock on an image object and returns a pointer to the image planes.
VPIImageFormat type
Image type.
Declaration of VPI status codes handling functions.
Stores information about an image plane.
VPILockMode
Defines the lock modes used by memory lock functions.
VPIStatus vpiImageCreateHostMemWrapper(const VPIImageData *hostData, uint32_t flags, VPIImage *img)
Create an image object by wrapping around an existing host memory block.
VPIStatus vpiImageSetWrappedHostMem(VPIImage img, const VPIImageData *hostData)
Redefines the wrapped host memory in an existing VPIImage wrapper.
void * data
Pointer to the first row of this plane.
VPIStatus vpiImageSetWrappedCudaMem(VPIImage img, const VPIImageData *hostData)
Redefines the wrapped device (CUDA) memory in an existing VPIImage wrapper.
VPIStatus vpiImageGetType(VPIImage img, VPIImageFormat *type)
Get the image format.