NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only

Detailed Description

Image Pyramid Processing API.

Macros

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MAJOR   (1u)
 Major version number. More...
 
#define NVMEDIA_IMAGE_PYRAMID_VERSION_MINOR   (3u)
 Minor version number. More...
 
#define MAX_PYRAMID_LEVELS   (10u)
 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, const NvMediaSurfAllocAttr *attrs, uint32_t numLevels, float_t 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 (const 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 (const NvMediaImagePyramid *pyramid, uint32_t level)
 Gets a pointer to the image for a level. More...
 
uint32_t NvMediaImagePyramidGetNumLevels (const NvMediaImagePyramid *pyramid)
 Returns the number of levels in a pyramid. More...
 
float_t NvMediaImagePyramidGetScale (const NvMediaImagePyramid *pyramid)
 Returns the scale factor of a pyramid. More...
 

Macro Definition Documentation

◆ MAX_PYRAMID_LEVELS

#define MAX_PYRAMID_LEVELS   (10u)

Maximum number of levels allowed in a pyramid.

Definition at line 51 of file nvmedia_image_pyramid.h.

◆ NVMEDIA_IMAGE_PYRAMID_VERSION_MAJOR

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MAJOR   (1u)

Major version number.

Definition at line 46 of file nvmedia_image_pyramid.h.

◆ NVMEDIA_IMAGE_PYRAMID_VERSION_MINOR

#define NVMEDIA_IMAGE_PYRAMID_VERSION_MINOR   (3u)

Minor version number.

Definition at line 48 of file nvmedia_image_pyramid.h.

Typedef Documentation

◆ NvMediaImagePyramid

A handle representing an image pyramid object.

Definition at line 56 of file nvmedia_image_pyramid.h.

Function Documentation

◆ NvMediaImagePyramidCreate()

NvMediaImagePyramid* NvMediaImagePyramidCreate ( NvMediaDevice device,
NvMediaSurfaceType  type,
const NvMediaSurfAllocAttr attrs,
uint32_t  numLevels,
float_t  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.

◆ NvMediaImagePyramidDestroy()

void NvMediaImagePyramidDestroy ( NvMediaImagePyramid pyramid)

Destroys an image pyramid created by NvMediaImagePyramidCreate().

Parameters
[in]pyramidA handle to the image pyramid to be destroyed.

◆ NvMediaImagePyramidGetImageForLevel()

NvMediaImage* NvMediaImagePyramidGetImageForLevel ( const 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.

◆ NvMediaImagePyramidGetNumLevels()

uint32_t NvMediaImagePyramidGetNumLevels ( const 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.

◆ NvMediaImagePyramidGetScale()

float_t NvMediaImagePyramidGetScale ( const 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.

◆ NvMediaImagePyramidGetStatus()

NvMediaStatus NvMediaImagePyramidGetStatus ( const 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.