56 #ifndef NV_VPI_IMAGE_H
57 #define NV_VPI_IMAGE_H
111 typedef struct VPIImagePlanePitchLinearRec
146 #define VPI_MAX_PLANE_COUNT (6)
149 typedef struct VPIImageBufferPitchLinearRec
198 typedef void *EGLImageKHR;
199 typedef struct cudaArray *cudaArray_t;
203 typedef union VPIImageBufferRec
233 typedef struct VPIImageDataRec
Defines types and functions to handle pixel types.
Declaration of VPI status codes handling functions.
Defines all types needed for programming with VPI.
VPIColorSpec
Color spec definitions.
VPIImageBuffer buffer
Stores the image contents.
VPIImageBufferPitchLinear pitch
Image stored in pitch-linear layout.
EGLImageKHR egl
Image stored as an EGLImageKHR.
void * data
Pointer to the first row of this plane.
int32_t numPlanes
Number of planes.
VPIImageFormat format
Image format.
VPIPixelType pixelType
Type of each pixel within this plane.
VPIColorSpec colorSpec
Color spec to override the one defined by the VPIImageData wrapper.
VPIImageBufferType bufferType
Type of image buffer.
int fd
Image stored as an NvBuffer file descriptor.
int32_t height
Height of this plane in pixels.
cudaArray_t cudaarray
Image stored in a cudaArray_t.
int32_t width
Width of this plane in pixels.
int32_t pitchBytes
Difference in bytes of beginning of one row and the beginning of the previous.
#define VPI_MAX_PLANE_COUNT
Maximum number of data planes an image can have.
void vpiImageDestroy(VPIImage img)
Destroy an image instance.
struct VPIImageImpl * VPIImage
A handle to an image.
VPIStatus vpiImageCreateView(VPIImage imgParent, const VPIRectangleI *clipBounds, uint64_t flags, VPIImage *imgView)
Create an image that wraps an axis-aligned rectangular sub-region of an existing image.
VPIStatus vpiImageCreateWrapper(const VPIImageData *data, const VPIImageWrapperParams *params, uint64_t flags, VPIImage *img)
Create an image object by wrapping an existing memory block.
VPIStatus vpiImageLock(VPIImage img, VPILockMode mode)
Acquires the lock on an image object.
VPIStatus vpiImageLockData(VPIImage img, VPILockMode mode, VPIImageBufferType bufType, VPIImageData *data)
Acquires the lock on an image object and returns the image contents.
VPIStatus vpiInitImageWrapperParams(VPIImageWrapperParams *params)
Initialize VPIImageWrapperParams with default values.
VPIStatus vpiImageSetView(VPIImage view, VPIImage parent, const VPIRectangleI *clipBounds)
Redefines the image view position inside a parent image.
VPIImageBufferType
Represents how the image data is stored.
VPIStatus vpiImageSetWrapper(VPIImage img, const VPIImageData *data)
Redefines the wrapped memory in an existing VPIImage wrapper.
VPIStatus vpiImageGetFlags(VPIImage img, uint64_t *flags)
Get the image flags.
VPIStatus vpiImageGetFormat(VPIImage img, VPIImageFormat *format)
Get the image format.
VPIStatus vpiImageCreate(int32_t width, int32_t height, VPIImageFormat fmt, uint64_t flags, VPIImage *img)
Create an empty image instance with the specified flags.
VPIStatus vpiImageGetSize(VPIImage img, int32_t *width, int32_t *height)
Get the image dimensions in pixels.
VPIStatus vpiImageUnlock(VPIImage img)
Releases the lock on an image object.
@ VPI_IMAGE_BUFFER_CUDA_PITCH_LINEAR
CUDA-accessible with planes in pitch-linear memory layout.
@ VPI_IMAGE_BUFFER_HOST_PITCH_LINEAR
Host-accessible with planes in pitch-linear memory layout.
@ VPI_IMAGE_BUFFER_INVALID
Invalid buffer type.
@ VPI_IMAGE_BUFFER_EGLIMAGE
EGLImage.
@ VPI_IMAGE_BUFFER_NVBUFFER
NvBuffer.
@ VPI_IMAGE_BUFFER_CUDA_ARRAY
Buffer stored in a cudaArray_t.
Stores the image plane contents.
Stores information about image characteristics and content.
Represents one image plane in pitch-linear layout.
Parameters for customizing image wrapping.
Represents the available methods to access image contents.
VPILockMode
Defines the lock modes used by memory lock functions.
Stores the geometric information of a rectangle.