NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Image Pyramid Handling API

Detailed Description

The Image Pyramid Processing API encompasses all NvMedia related functionality for handling pyramids of NvMediaImage.

Macros

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MAJOR   1
 Major Version number. More...
 
#define NVMEDIA_IMAGE_PYRAMID_VERSION_MINOR   0
 Minor Version number. More...
 
#define MAX_PYRAMID_LEVELS   (10)
 Max allowed levels in a pyramid. More...
 

Typedefs

typedef struct NvMediaImagePyramid NvMediaImagePyramid
 A handle representing image pyramid objects. More...
 

Functions

NvMediaImagePyramidNvMediaImagePyramidCreate (NvMediaDevice *device, NvMediaSurfaceType type, NvMediaSurfAllocAttr *attrs, uint32_t numLevels, float scale, uint32_t numAttrs, uint32_t flags)
 Allocates an image pyramid. More...
 
void NvMediaImagePyramidDestroy (NvMediaImagePyramid *pyramid)
 Destroys an image pyramid that NvMediaImagePyramidCreate() created. More...
 
NvMediaStatus NvMediaImagePyramidGetStatus (NvMediaImagePyramid *pyramid, uint32_t millisecondWait, NvMediaTaskStatus *status)
 Gets status of the current/last operation for the image pyramid, and optionally waits for operation to complete/timeout. More...
 
NvMediaImageNvMediaImagePyramidGetImageForLevel (NvMediaImagePyramid *pyramid, uint32_t level)
 Returns NvMediaImage pointer of image for a level. More...
 
uint32_t NvMediaImagePyramidGetNumLevels (NvMediaImagePyramid *pyramid)
 Returns number of levels in the pyramid. More...
 
float NvMediaImagePyramidGetScale (NvMediaImagePyramid *pyramid)
 Returns scale factor of the pyramid. More...
 

Macro Definition Documentation

#define MAX_PYRAMID_LEVELS   (10)

Max allowed levels in a pyramid.

Definition at line 41 of file nvmedia_image_pyramid.h.

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MAJOR   1

Major Version number.

Definition at line 36 of file nvmedia_image_pyramid.h.

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MINOR   0

Minor Version number.

Definition at line 38 of file nvmedia_image_pyramid.h.

Typedef Documentation

A handle representing image pyramid objects.

Definition at line 46 of file nvmedia_image_pyramid.h.

Function Documentation

NvMediaImagePyramid* NvMediaImagePyramidCreate ( NvMediaDevice device,
NvMediaSurfaceType  type,
NvMediaSurfAllocAttr attrs,
uint32_t  numLevels,
float  scale,
uint32_t  numAttrs,
uint32_t  flags 
)

Allocates an image pyramid.

Parameters
[in]deviceThe NvMediaDevice.
[in]typeSurface format type obtained from NvMediaSurfaceFormatGetType API.
[in]attrsAn array of surface alloc attributes for surface creation. Resolution is for the base level of the pyramid.
[in]numLevelsNumber of levels in the pyramid.
[in]scaleScale factor for the pyramid. Scale should be > 0 and <= 1.0.
[in]numAttrsNumber of attributes in the array.
[in]flagsFlags for module hint (used in future).
Returns
NvMediaImagePyramid The new image pyramid's handle or NULL if unsuccessful.
void NvMediaImagePyramidDestroy ( NvMediaImagePyramid pyramid)

Destroys an image pyramid that NvMediaImagePyramidCreate() created.

Parameters
[in]pyramidThe image pyramid to destroy.
Returns
void
NvMediaImage* NvMediaImagePyramidGetImageForLevel ( NvMediaImagePyramid pyramid,
uint32_t  level 
)

Returns NvMediaImage pointer of image for a level.

Parameters
[in]pyramidThe image pyramid handle.
[in]levelThe level for which to obtain image pointer.
Returns
NvMediaImage pointer. NULL in case of error.
uint32_t NvMediaImagePyramidGetNumLevels ( NvMediaImagePyramid pyramid)

Returns number of levels in the pyramid.

Parameters
[in]pyramidThe image pyramid handle.
Returns
Number of levels. 0 in case of error.
float NvMediaImagePyramidGetScale ( NvMediaImagePyramid pyramid)

Returns scale factor of the pyramid.

Parameters
[in]pyramidThe image pyramid handle.
Returns
Scale factor. 0 in case of error.
NvMediaStatus NvMediaImagePyramidGetStatus ( NvMediaImagePyramid pyramid,
uint32_t  millisecondWait,
NvMediaTaskStatus status 
)

Gets status of the current/last operation for the image pyramid, and optionally waits for operation to complete/timeout.

Parameters
[in]pyramidA pointer to the image.
[in]millisecondWaitTime in milliseconds to wait for operation to complete before getting status. NVMEDIA_IMAGE_TIMEOUT_INFINITE means wait till operation is completed and then get status.
[out]statusStatus of the operation.
Returns
NvMediaStatus The status of the function call. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_ERROR
NVMEDIA_STATUS_BAD_PARAMETER