NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_vpi.h File Reference

Detailed Description

NVIDIA Media VPI Interface

Description: This file contains the NvMedia VPI API.

Definition in file nvmedia_vpi.h.

Go to the source code of this file.

Data Structures

struct  NvMediaVPIPoint2Df
 Holds 2D floating point definition. More...
 
struct  NvMediaVPIPoint2DFrac
 Holds 2D point fractional representation. More...
 
struct  NvMediaVPIAABB
 Axis Aligned Bounding Box. More...
 
struct  NvMediaVPI2DTransform
 3x3 transform matrix. More...
 
struct  NvMediaVPITranslationWithScale
 Translation with Scale parameters. More...
 
struct  NvMediaVPIBoundingBoxWithTransform
 Holds bounding box definition. More...
 
struct  NvMediaVPIStereoPostprocessParams
 Holds stereo postprocess parameters. More...
 
struct  NvMediaVPIStereoPreprocessParams
 Holds stereo preprocessing parameters. More...
 
struct  NvMediaVPIGetKeyPointsHarrisParams
 Holds Harris keypoint parameters. More...
 
struct  NvMediaVPIGetSparseFlowPyrLKParams
 NvMediaVPIGetSparseFlowPyrLKParams. More...
 
struct  NvMediaVPIKLTParams
 Holds the KLT parameters. More...
 

Macros

#define NVMEDIA_VPI_VERSION_MAJOR   2
 Major version number. More...
 
#define NVMEDIA_VPI_VERSION_MINOR   3
 Minor version number. More...
 
#define NVMEDIA_VPI_MAX_QUEUED_TASKS   64
 Maximum number of tasks that can be queued. More...
 

Typedefs

typedef struct NvMediaVPI NvMediaVPI
 Holds an opaque object representing NvMediaVPI. More...
 
typedef struct
NvMediaVPIProcessStereoDescriptor 
NvMediaVPIProcessStereoDescriptor
 NvMediaVPIProcessStereo descriptor. More...
 
typedef struct
NvMediaVPIConvertMVDescriptor 
NvMediaVPIConvertMVDescriptor
 NvMediaVPIConvertMV descriptor. More...
 
typedef struct
NvMediaVPIStereoPostprocessDescriptor 
NvMediaVPIStereoPostprocessDescriptor
 NvMediaVPISteroPostprocess descriptor. More...
 
typedef struct
NvMediaVPIStereoPreprocessDescriptor 
NvMediaVPIStereoPreprocessDescriptor
 NvMediaVPISteroPreprocess descriptor. More...
 
typedef struct
NvMediaVPIGetKeyPointsHarrisDescriptor 
NvMediaVPIGetKeyPointsHarrisDescriptor
 
typedef struct
NvMediaVPIGetKeyPointsFastDescriptor 
NvMediaVPIGetKeyPointsFastDescriptor
 
typedef struct
NvMediaVPIGetSparseFlowPyrLKDescriptor 
NvMediaVPIGetSparseFlowPyrLKDescriptor
 NvMediaVPISparseFlowPyr descriptor. More...
 
typedef struct
NvMediaVPIKLTDescriptor 
NvMediaVPIKLTDescriptor
 NvMediaVPIKLTDescriptor descriptor. More...
 
typedef enum NvMediaVPIKltTrackType NvMediaVPIKltTrackType
 Specifies the types of KLT Tracking. More...
 
typedef struct
NvMediaVPIConvolveImageSeparableDescriptor 
NvMediaVPIConvolveImageSeparableDescriptor
 NvMediaVPIConvolveImageSeparableDescriptor. More...
 

Enumerations

enum  NvMediaVPIArrayType {
  NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT = 0,
  NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM = 1,
  NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM = 2,
  NVMEDIA_VPI_ARRAY_NUM_TYPES = 3
}
 Defines the different types of VPI-specific arrays. More...
 
enum  NvMediaVPIOFSTOutputType {
  NVMEDIA_VPI_STEREO_DISPARITY = 0,
  NVMEDIA_VPI_MV,
  NVMEDIA_VPI_MV_HINTS
}
 Specifies the types of output for Optical Flow/Stereo Disparity processing. More...
 
enum  NvMediaVPINonMaxSuppressionType { NVMEDIA_VPI_2D_GRID_8x8_CELL_NO_MIN_DISTANCE = 0 }
 Specifies types of post-process non-maximum suppression. More...
 
enum  NvMediaVPIHarrisGradientFilterType {
  NVMEDIA_VPI_HARRIS_FILTER_TYPE_DEFAULT = 0,
  NVMEDIA_VPI_HARRIS_FILTER_TYPE_USER
}
 Specifies types of filters used in the Harris corner detector. More...
 
enum  NvMediaVPITerminationCriterion {
  NVMEDIA_VPI_TERMINATION_CRITERION_ITERATIONS = 0,
  NVMEDIA_VPI_TERMINATION_CRITERION_EPSILON,
  NVMEDIA_VPI_TERMINATION_CRITERION_BOTH
}
 Specifies the conditions that cause the Lucas-Kanade Feature Tracker to be terminated. More...
 
enum  NvMediaVPIKltTrackType { NVMEDIA_VPI_KLT_INVERSE_COMPOSITIONAL = 0 }
 Specifies the types of KLT Tracking. More...
 

Functions

NvMediaStatus NvMediaVPIGetNumEngines (uint32_t *numEngines)
 Returns the number of HW engines accessible. More...
 
NvMediaStatus NvMediaVPIGetVersion (NvMediaVersion *version)
 Returns version information for the NvMediaVPI library. More...
 
NvMediaVPINvMediaVPICreate (const uint32_t Id, const uint32_t maxQueuedTasks)
 Creates an NvMediaVPI object. More...
 
NvMediaStatus NvMediaVPIDestroy (NvMediaVPI *vpi)
 Destroys an Vision Programming Interface object created by NvMediaVPICreate(). More...
 
NvMediaStatus NvMediaVPIFlush (NvMediaVPI *vpi)
 Flushes all queued operations. More...
 
NvMediaStatus NvMediaVPIImageRegister (NvMediaVPI *vpi, NvMediaImage *image)
 Registers an image for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIImageUnregister (NvMediaVPI *vpi, NvMediaImage *image)
 Unregisters an image after use. More...
 
NvMediaStatus NvMediaVPIArrayRegister (NvMediaVPI *vpi, NvMediaArray *array)
 Registers an array for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIArrayUnregister (NvMediaVPI *vpi, NvMediaArray *array)
 Unregisters an array after use. More...
 
NvMediaStatus NvMediaVPIScratchpadRegister (NvMediaVPI *vpi, NvMediaCVScratchpad *scratchpad)
 Registers scratchpad memory for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIScratchpadUnregister (NvMediaVPI *vpi, NvMediaCVScratchpad *scratchpad)
 Unregisters scratchpad memory after use. More...
 
NvMediaArrayNvMediaVPIArrayCreate (NvMediaDevice *device, NvMediaVPIArrayType type, uint32_t numElements, const NvMediaArrayAllocAttr *attrs, uint32_t numAttrs)
 Creates an NvMediaArray for a VPI-specific element type. More...
 
NvMediaStatus NvMediaVPIPyramidRegister (NvMediaVPI *vpi, NvMediaImagePyramid *pyramid)
 Registers a pyramid for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIPyramidUnregister (NvMediaVPI *vpi, NvMediaImagePyramid *pyramid)
 Unregisters a pyramid after use. More...
 
NvMediaVPIProcessStereoDescriptorNvMediaVPICreateProcessStereoPairDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaVPIOFSTOutputType outputType)
 Creates NvMediaVPIProcessStereoDescriptor. More...
 
NvMediaStatus NvMediaVPIProcessStereoPairDesc (NvMediaVPI *vpi, NvMediaVPIProcessStereoDescriptor *descriptor, NvMediaImage *left, NvMediaImage *right, NvMediaImage *output)
 Queues an operation to process a stereo image pair. More...
 
NvMediaVPIConvertMVDescriptorNvMediaVPICreateConvertMVDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaSurfaceType type, const float strength, const float scale)
 Creates an NvMediaVPIConvertMVDescriptor. More...
 
NvMediaStatus NvMediaVPIConvertMVDesc (NvMediaVPI *vpi, NvMediaVPIConvertMVDescriptor *descriptor, NvMediaImage *inputMVImage, NvMediaImage *inputColor, NvMediaImage *output, const NvMediaVPIOFSTOutputType outputType)
 Converts or refines a motion vector image. More...
 
NvMediaVPIStereoPostprocessDescriptorNvMediaVPICreateStereoPostprocessDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const float scale)
 Creates an NvMediaVPIStereoPostprocessDescriptor. More...
 
NvMediaStatus NvMediaVPIStereoPostprocessDesc (NvMediaVPI *vpi, NvMediaVPIStereoPostprocessDescriptor *descriptor, NvMediaVPIStereoPostprocessParams *params, NvMediaImage *disparityInput, NvMediaImage *confidenceInput, NvMediaImage *disparityOutput, NvMediaImage *confidenceOutput)
 Performs stereo postprocessing to refine a disparity image. More...
 
NvMediaVPIStereoPreprocessDescriptorNvMediaVPICreateStereoPreprocessDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaVPIOFSTOutputType outputType)
 Creates an NvMediaVPIStereoPreprocessDescriptor. More...
 
NvMediaStatus NvMediaVPIStereoPreprocessDesc (NvMediaVPI *vpi, NvMediaVPIStereoPreprocessDescriptor *descriptor, NvMediaVPIStereoPreprocessParams *params, NvMediaArray *confidenceTable, NvMediaImage *leftImage, NvMediaImage *rightImage, NvMediaImage *output0, NvMediaImage *output1)
 Performs stereo preprocessing to produce a disparity image or motion vector hints. More...
 
NvMediaVPIGetKeyPointsHarrisDescriptorNvMediaVPICreateGetKeyPointsHarrisDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaVPINonMaxSuppressionType nonMaxSuppressionType)
 Creates a pointer to a NvMediaVPIGetKeyPointsHarrisDescriptor. More...
 
NvMediaStatus NvMediaVPIGetKeyPointsHarrisDesc (NvMediaVPI *vpi, NvMediaVPIGetKeyPointsHarrisDescriptor *descriptor, const NvMediaVPIGetKeyPointsHarrisParams *params, NvMediaImage *input, NvMediaImage *mask, NvMediaArray *trackedKeypoints, NvMediaArray *trackedScores, NvMediaArray *keypoints, NvMediaArray *scores)
 Queues an operation to get Harris keypoints throughout an image. More...
 
NvMediaVPIGetKeyPointsFastDescriptorNvMediaVPICreateGetKeyPointsFastDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaSurfaceType type)
 Creates a pointer to an NvMediaVPIGetKeyPointsFastDescriptor. More...
 
NvMediaStatus NvMediaVPIGetKeyPointsFastDesc (NvMediaVPI *vpi, NvMediaVPIGetKeyPointsFastDescriptor *descriptor, NvMediaImage *input, const uint32_t strengthThresh, const NvMediaBool nonmaxSupression, NvMediaArray *keypoints, NvMediaArray *scores)
 Queues an operation to get FAST keypoints throughout an image. More...
 
NvMediaVPIGetSparseFlowPyrLKDescriptorNvMediaVPICreateGetSparseFlowPyrLKDescriptor (NvMediaVPI *vpi, const NvMediaVPIGetSparseFlowPyrLKParams *params)
 Creates a pointer to an NvMediaVPIGetSparseFlowPyrLKDescriptor. More...
 
NvMediaStatus NvMediaVPIGetSparseFlowPyrLKDesc (NvMediaVPI *vpi, NvMediaVPIGetSparseFlowPyrLKDescriptor *descriptor, const NvMediaVPIGetSparseFlowPyrLKParams *params, NvMediaImagePyramid *oldImages, NvMediaImagePyramid *newImages, NvMediaArray *oldPoints, NvMediaArray *newPoints, NvMediaArray *newStatus)
 Queues an operation to track features in a pyramid. More...
 
NvMediaVPIKLTDescriptorNvMediaVPICreateKLTDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaSurfaceType type)
 Creates a pointer to the NvMediaVPIKLTDescriptor. More...
 
NvMediaStatus NvMediaVPIKLTDesc (NvMediaVPI *vpi, NvMediaVPIKLTDescriptor *descriptor, const NvMediaVPIKLTParams *params, NvMediaImage *referenceImage, NvMediaImage *templateImage, NvMediaArray *inputBoxList, NvMediaArray *predictedBoxList, NvMediaArray *outputBoxList, NvMediaArray *estimationList)
 Queues an operation to run the Kanade Lucas Tomasi (KLT) tracking algorithm. More...
 
NvMediaStatus NvMediaVPIGetScratchpadSize (void *descriptor, uint32_t *scratchpadSizeBytes)
 Returns the size of scratchpad memory required for operations that support an NvMediaCVScratchpad based scratchpad. More...
 
NvMediaStatus NvMediaVPIKLTFastDesc (NvMediaVPI *vpi, NvMediaVPIKLTDescriptor *descriptor, NvMediaCVScratchpad *scratchpad, const NvMediaVPIKLTParams *params, NvMediaImage *referenceImage, NvMediaImage *templateImage, NvMediaArray *inputBoxList, NvMediaArray *predictedBoxList, NvMediaArray *outputBoxList, NvMediaArray *estimationList)
 Queues an operation to run the Kanade Lucas Tomasi (KLT) tracking algorithm. More...
 
NvMediaStatus NvMediaVPIGetImagePyramid (NvMediaVPI *vpi, NvMediaImage *input, NvMediaImagePyramid *output)
 Queues an operation to generate a Gaussian pyramid from an input image. More...
 
NvMediaStatus NvMediaVPIConvolveImage (NvMediaVPI *vpi, NvMediaImage *input, const float *kernelData, const uint32_t kernelWidth, const uint32_t kernelHeight, NvMediaImage *output)
 Queues an operation to convolve an input image with a client-supplied convolution matrix. More...
 
NvMediaVPIConvolveImageSeparableDescriptorNvMediaVPICreateConvolveImageSeparableDescriptor (NvMediaVPI *vpi, NvMediaSurfaceType type, const float *kernelX, const uint32_t kernelXSize, const float *kernelY, const uint32_t kernelYSize)
 Creates a pointer to the NvMediaVPIConvolveImageSeparableDescriptor. More...
 
NvMediaStatus NvMediaVPIConvolveImageSeparable (NvMediaVPI *vpi, NvMediaImage *input, const float *kernelX, const uint32_t kernelXSize, const float *kernelY, const uint32_t kernelYSize, NvMediaImage *output)
 Queues an operation to convolve an image with a 2D kernel, using separable convolution. More...
 
NvMediaStatus NvMediaVPIFilterImageBox (NvMediaVPI *vpi, NvMediaImage *input, const uint32_t windowWidth, const uint32_t windowHeight, NvMediaImage *output)
 Queues an operation to compute a generic box filter window of the input image. More...
 
NvMediaStatus NvMediaVPIArrayGetPoint2Df (NvMediaArray *array, const uint32_t startIndex, const uint32_t numElements, NvMediaVPIPoint2Df *destPtr)
 Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT type to an array of type NvMediaVPIPoint2Df. More...
 
NvMediaStatus NvMediaVPIArrayUpdatePoint2Df (NvMediaVPIPoint2Df *inputPtr, const uint32_t startIndex, const uint32_t numElements, NvMediaArray *destArray)
 Helper function; converts an array of type NvMediaVPIPoint2Df to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT. More...
 
NvMediaStatus NvMediaVPIArrayGetAABB (NvMediaArray *array, const uint32_t startIndex, const uint32_t numElements, NvMediaVPIAABB *destPtr)
 Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM type to an array of type NvMediaVPIAABB. More...
 
NvMediaStatus NvMediaVPIArrayUpdateAABB (NvMediaVPIAABB *inputPtr, const uint32_t startIndex, const uint32_t numElements, NvMediaArray *destArray)
 Helper function; converts an array of type NvMediaVPIAABB to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM. More...
 
NvMediaStatus NvMediaVPIArrayGetBoundingBoxWithTransform (NvMediaArray *array, const uint32_t startIndex, const uint32_t numElements, NvMediaVPIBoundingBoxWithTransform *destPtr)
 Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM type to an array of type NvMediaVPIBoundingBoxWithTransform. More...
 
NvMediaStatus NvMediaVPIArrayUpdateBoundingBoxWithTransform (NvMediaVPIBoundingBoxWithTransform *inputPtr, const uint32_t startIndex, const uint32_t numElements, NvMediaArray *destArray)
 Helper function; converts an array of type NvMediaVPIBoundingBoxWithTransform to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM. More...
 
NvMediaStatus NvMediaVPIArrayGetTranslationWithScale (NvMediaArray *array, const uint32_t startIndex, const uint32_t numElements, NvMediaVPITranslationWithScale *destPtr)
 Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM to an array of type NvMediaVPITranslationWithScale. More...
 
NvMediaStatus NvMediaVPIArrayUpdateTranslationWithScale (NvMediaVPITranslationWithScale *inputPtr, const uint32_t startIndex, const uint32_t numElements, NvMediaArray *destArray)
 Helper function; converts an array of type NvMediaVPITranslationWithScale to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM. More...
 
NvMediaStatus NvMediaVPIArrayGet2DTransform (NvMediaArray *array, const uint32_t startIndex, const uint32_t numElements, NvMediaVPI2DTransform *destPtr)
 Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM type to an array of type NvMediaVPI2DTransform. More...
 
NvMediaStatus NvMediaVPIArrayUpdate2DTransform (NvMediaVPI2DTransform *inputPtr, const uint32_t startIndex, const uint32_t numElements, NvMediaArray *destArray)
 Helper function; converts an array of NvMediaVPI2DTransform to NvMediaArray of NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM type. More...
 
NvMediaStatus NvMediaVPIDestroyDescriptor (NvMediaVPI *vpi, void *descriptor)
 Destroys an NvMediaVPI function descriptor. More...