NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only
Image Pyramid with Buffer Allocation API

Detailed Description

The Image Pyramid with Buffer Allocation API encompasses all NvMedia-related functionality for handling pyramids of NvMediaImage objects with buffer allocation.

Macros

#define NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MAJOR   (1u)
 Major version number. More...
 
#define NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MINOR   (1u)
 Minor version number. More...
 

Functions

NvMediaStatus NvMediaImagePyramidNvSciBufInit (void)
 Initializes the NvMediaImagePyramid NvSciBuf APIs. More...
 
void NvMediaImagePyramidNvSciBufDeinit (void)
 De-initializes the NvMediaImagePyramid NvSciBuf APIs. More...
 
NvMediaStatus NvMediaImagePyramidFillNvSciBufAttrs (const NvMediaDevice *device, NvMediaSurfaceType type, const NvMediaSurfAllocAttr *attrs, uint32_t numLevels, float_t scale, uint32_t numAttrs, uint64_t flags, NvSciBufAttrList attr_h)
 Fills the NvSciBuf attributes to use to allocate an ImagePyramid. More...
 
NvMediaStatus NvMediaImagePyramidCreateFromNvSciBuf (NvMediaDevice *device, NvSciBufObj nvscibufObjInstance, NvMediaImagePyramid **nvmImagePyramid)
 Creates an NvMediaImagePyramid from an NvSciBufObj. More...
 
NvMediaStatus NvMediaImagePyramidNvSciBufGetVersion (NvMediaVersion *version)
 Returns the version information for the NvMediaImagePyramid NvSciBuf APIs. More...
 

Macro Definition Documentation

◆ NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MAJOR

#define NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MAJOR   (1u)

Major version number.

Definition at line 40 of file nvmedia_image_pyramid_nvscibuf.h.

◆ NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MINOR

#define NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MINOR   (1u)

Minor version number.

Definition at line 42 of file nvmedia_image_pyramid_nvscibuf.h.

Function Documentation

◆ NvMediaImagePyramidCreateFromNvSciBuf()

NvMediaStatus NvMediaImagePyramidCreateFromNvSciBuf ( NvMediaDevice device,
NvSciBufObj  nvscibufObjInstance,
NvMediaImagePyramid **  nvmImagePyramid 
)

Creates an NvMediaImagePyramid from an NvSciBufObj.

NvMediaImagePyramidFillNvSciBufAttrs() initializes nvscibufObjInstance using the attributes populated by NvMediaImagePyramidFillNvSciBufAttrs(). When the application has finished using nvmImagePyramid, it is expected to call NvMediaImagePyramidDestroy() with the nvmImagePyramid.

Parameters
[in]deviceA pointer to the NvMediaDevice.
[in]nvscibufObjInstanceNvSciBufObj for which an NvMediaImagePyramid needs to be imported.
[in,out]nvmImagePyramidA pointer to the imported NvMediaImagePyramid.
Returns
NvMediaStatus, the completion status of the operation:

◆ NvMediaImagePyramidFillNvSciBufAttrs()

NvMediaStatus NvMediaImagePyramidFillNvSciBufAttrs ( const NvMediaDevice device,
NvMediaSurfaceType  type,
const NvMediaSurfAllocAttr attrs,
uint32_t  numLevels,
float_t  scale,
uint32_t  numAttrs,
uint64_t  flags,
NvSciBufAttrList  attr_h 
)

Fills the NvSciBuf attributes to use to allocate an ImagePyramid.

This function assumes that attr_h is a valid NvSciBufAttrList created by the application using NvSciBufAttrListCreate(). This function maps the information in type, attrs and flags to NvSciBuf attributes and fills them in attr_h. The following list of NvSciBuf input attributes are set by NvMedia. The application must not set these values.

The following image attribute is not set by NvMedia and they must be set by the application:

After calling NvMediaImagePyramidFillNvSciBufAttrs(), the application can use attr_h in the NvSciBuf attribute list reconcile and object allocation APIs to allocate an NvSciBufObj. Then the application can call NvMediaImagePyramidCreateFromNvSciBuf() to create an NvMediaImagePyramid from the NvSciBufObj.

Parameters
[in]deviceA pointer to the NvMediaDevice.
[in]typeNvMediaSurfaceType type obtained from NvMediaSurfaceFormatGetType().
[in]attrsAn array of surface allocation attributes for surface creation.
[in]numAttrsNumber of attributes in the array.
[in]numLevelsNumber of levels for pyramid creation.
[in]scaleScaling factor for pyramid creation.
[in]flagsFlags for module hint (used in future).
[in,out]attr_hNvSciBufAttrlist where the NvSciBuf attributes for the requested NvMediaImagePyramid are filled.
Returns
NvMediaStatus, the completion status of the operation:

◆ NvMediaImagePyramidNvSciBufDeinit()

void NvMediaImagePyramidNvSciBufDeinit ( void  )

De-initializes the NvMediaImagePyramid NvSciBuf APIs.

NvMediaImagePyramidFillNvSciBufAttrs() and NvMediaImagePyramidCreateFromNvSciBuf() cannot be called after calling this function.

◆ NvMediaImagePyramidNvSciBufGetVersion()

NvMediaStatus NvMediaImagePyramidNvSciBufGetVersion ( NvMediaVersion version)

Returns the version information for the NvMediaImagePyramid NvSciBuf APIs.

Parameters
[in]versionA pointer to a NvMediaVersion structure of the client.
Returns
NvMediaStatus, the completion status of the operation:

◆ NvMediaImagePyramidNvSciBufInit()

NvMediaStatus NvMediaImagePyramidNvSciBufInit ( void  )

Initializes the NvMediaImagePyramid NvSciBuf APIs.

This function must be called before calling NvMediaImagePyramidFillNvSciBufAttrs() and NvMediaImagePyramidCreateFromNvSciBuf().

Returns
NvMediaStatus, the completion status of the operation: