VPI - Vision Programming Interface

0.3.7 Release

Image.h File Reference
#include "Export.h"
#include "Status.h"
#include "Types.h"
#include <stdint.h>
+ Include dependency graph for Image.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  VPIImagePlane
 Stores information about an image plane. More...
 
struct  VPIImageData
 Stores information about image characteristics and content. More...
 

Macros

#define VPI_MAX_PLANE_COUNT   (6)
 Maximum number of data planes an image can have.
 
Image creation flags
#define VPI_IMAGE_DISABLE_PVA   VPI_BACKEND_DISABLE_PVA
 Image won't be used in a PVA stream.
 
#define VPI_IMAGE_DISABLE_CPU   VPI_BACKEND_DISABLE_CPU
 Image won't be used in a CPU stream.
 
#define VPI_IMAGE_DISABLE_CUDA   VPI_BACKEND_DISABLE_CUDA
 Image won't be used in a CUDA stream.
 
#define VPI_IMAGE_ONLY_PVA   VPI_BACKEND_ONLY_PVA
 Image will only be used in a PVA stream.
 
#define VPI_IMAGE_ONLY_CPU   VPI_BACKEND_ONLY_CPU
 Image will only be used in a CPU stream.
 
#define VPI_IMAGE_ONLY_CUDA   VPI_BACKEND_ONLY_CUDA
 Image will only be used in a CUDA stream.
 
Deprecated image creation flags
#define VPI_IMAGE_NO_PVA   VPI_IMAGE_DISABLE_PVA
 Deprecated.
 
#define VPI_IMAGE_NO_CPU   VPI_IMAGE_DISABLE_CPU
 Deprecated.
 
#define VPI_IMAGE_NO_CUDA   VPI_IMAGE_DISABLE_CUDA
 Deprecated.
 

Functions

VPIStatus vpiImageCreate (uint32_t width, uint32_t height, VPIImageType type, uint32_t flags, VPIImage *img)
 Create an empty image instance with the specified flags. More...
 
VPIStatus vpiImageWrapHostMem (const VPIImageData *hostData, uint32_t flags, VPIImage *img)
 Create an image object by wrapping around an existing host-memory block. More...
 
VPIStatus vpiImageWrapCudaDeviceMem (const VPIImageData *cudaData, uint32_t flags, VPIImage *img)
 Create an image object by wrapping around an existing device-memory (CUDA) block. More...
 
VPIStatus vpiImageWrapNvBuffer (int dmabuf_fd, uint32_t flags, VPIImage *pimg)
 Create an image object by wrapping an existing NvBuffer given its dmabuf_fd handle. More...
 
void vpiImageDestroy (VPIImage img)
 Destroy an image instance as well as all resources it owns. More...
 
VPIStatus vpiImageInvalidate (VPIImage img)
 This method is useful for unmanaged images only (created with vpiImageWrap*). More...
 
VPIStatus vpiImageGetSize (VPIImage img, uint32_t *width, uint32_t *height)
 Get the image size in pixels. More...
 
VPIStatus vpiImageGetType (VPIImage img, VPIImageType *type)
 Get the image type. More...
 
VPIStatus vpiImageGetFlags (VPIImage img, uint32_t *flags)
 Get the image flags. More...
 
VPIStatus vpiImageLock (VPIImage img, VPILockMode mode, VPIImageData *hostData)
 Acquires the lock on an image object and returns a pointer to the image planes Depending on the internal image representation, as well as the actual location in memory, this function might have a significant performance overhead (format conversion, layout conversion, device-to-host memory copy). More...
 
VPIStatus vpiImageUnlock (VPIImage img)
 Releases the lock on an image object. More...
 

Detailed Description

Functions and structures for dealing with VPI images.

Definition in file Image.h.