NVIDIA DRIVE OS Linux SDK API Reference

5.1.9.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

Image Pyramid Processing API.

Macros

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MAJOR   1
 Major version number. More...
 
#define NVMEDIA_IMAGE_PYRAMID_VERSION_MINOR   1
 Minor version number. More...
 
#define MAX_PYRAMID_LEVELS   (10)
 Maximum number of levels allowed in a pyramid. More...
 

Typedefs

typedef struct NvMediaImagePyramid NvMediaImagePyramid
 A handle representing an image pyramid object. 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 created by NvMediaImagePyramidCreate(). More...
 
NvMediaStatus NvMediaImagePyramidGetStatus (NvMediaImagePyramid *pyramid, uint32_t millisecondWait, NvMediaTaskStatus *status)
 Gets the status of the current or most recent operation for the image pyramid; optionally waits for the current operation to complete or time out. More...
 
NvMediaImageNvMediaImagePyramidGetImageForLevel (NvMediaImagePyramid *pyramid, uint32_t level)
 Gets a pointer to the image for a level. More...
 
uint32_t NvMediaImagePyramidGetNumLevels (NvMediaImagePyramid *pyramid)
 Returns the number of levels in a pyramid. More...
 
float NvMediaImagePyramidGetScale (NvMediaImagePyramid *pyramid)
 Returns the scale factor of a pyramid. More...
 

Macro Definition Documentation

#define MAX_PYRAMID_LEVELS   (10)

Maximum number of levels allowed in a pyramid.

Definition at line 51 of file nvmedia_image_pyramid.h.

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MAJOR   1

Major version number.

Definition at line 46 of file nvmedia_image_pyramid.h.

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MINOR   1

Minor version number.

Definition at line 48 of file nvmedia_image_pyramid.h.

Typedef Documentation

A handle representing an image pyramid object.

Definition at line 56 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]deviceA handle representing the associated NvMediaDevice.
[in]typeSurface format type, obtained by calling NvMediaSurfaceFormatGetType().
[in]attrsA pointer to an 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. Must be in the range (0.0, 1.0].
[in]numAttrsNumber of attributes in attrs.
[in]flagsFlags for module hints (reserved for future use).
Returns
The new image pyramid's handle if successful, or NULL otherwise.
void NvMediaImagePyramidDestroy ( NvMediaImagePyramid pyramid)

Destroys an image pyramid created by NvMediaImagePyramidCreate().

Parameters
[in]pyramidA handle to the image pyramid to be destroyed.
NvMediaImage* NvMediaImagePyramidGetImageForLevel ( NvMediaImagePyramid pyramid,
uint32_t  level 
)

Gets a pointer to the image for a level.

Parameters
[in]pyramidA handle to the image pyramid.
[in]levelThe level for which to obtain an image pointer.
Returns
A pointer to the image if successful, or NULL otherwise.
uint32_t NvMediaImagePyramidGetNumLevels ( NvMediaImagePyramid pyramid)

Returns the number of levels in a pyramid.

Parameters
[in]pyramidA handle to the image pyramid.
Returns
The number of levels in the pyramid if successful, or 0 otherwise.
float NvMediaImagePyramidGetScale ( NvMediaImagePyramid pyramid)

Returns the scale factor of a pyramid.

Parameters
[in]pyramidA handle to the image pyramid.
Returns
The scale factor if successful, or 0 otherwise.
NvMediaStatus NvMediaImagePyramidGetStatus ( NvMediaImagePyramid pyramid,
uint32_t  millisecondWait,
NvMediaTaskStatus status 
)

Gets the status of the current or most recent operation for the image pyramid; optionally waits for the current operation to complete or time out.

Parameters
[in]pyramidA pointer to the image.
[in]millisecondWaitTime in milliseconds to wait for the current operation to complete before getting status. NVMEDIA_IMAGE_TIMEOUT_INFINITE means wait indefinitely.
[out]statusA pointer to the status of the operation.
Return values
NVMEDIA_STATUS_OKindates that the operation is successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that pyramid or status is NULL.
NVMEDIA_STATUS_ERRORindicates another error.