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... | |
#define NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MAJOR (1u) |
Major version number.
Definition at line 40 of file nvmedia_image_pyramid_nvscibuf.h.
#define NVMEDIA_IMAGE_PYRAMID_NVSCIBUF_VERSION_MINOR (1u) |
Minor version number.
Definition at line 42 of file nvmedia_image_pyramid_nvscibuf.h.
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.
[in] | device | A pointer to the NvMediaDevice. |
[in] | nvscibufObjInstance | NvSciBufObj for which an NvMediaImagePyramid needs to be imported. |
[in,out] | nvmImagePyramid | A pointer to the imported NvMediaImagePyramid. |
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.
[in] | device | A pointer to the NvMediaDevice. |
[in] | type | NvMediaSurfaceType type obtained from NvMediaSurfaceFormatGetType(). |
[in] | attrs | An array of surface allocation attributes for surface creation. |
[in] | numAttrs | Number of attributes in the array. |
[in] | numLevels | Number of levels for pyramid creation. |
[in] | scale | Scaling factor for pyramid creation. |
[in] | flags | Flags for module hint (used in future). |
[in,out] | attr_h | NvSciBufAttrlist where the NvSciBuf attributes for the requested NvMediaImagePyramid are filled. |
void NvMediaImagePyramidNvSciBufDeinit | ( | void | ) |
De-initializes the NvMediaImagePyramid NvSciBuf APIs.
NvMediaImagePyramidFillNvSciBufAttrs() and NvMediaImagePyramidCreateFromNvSciBuf() cannot be called after calling this function.
NvMediaStatus NvMediaImagePyramidNvSciBufGetVersion | ( | NvMediaVersion * | version | ) |
Returns the version information for the NvMediaImagePyramid NvSciBuf APIs.
[in] | version | A pointer to a NvMediaVersion structure of the client. |
NvMediaStatus NvMediaImagePyramidNvSciBufInit | ( | void | ) |
Initializes the NvMediaImagePyramid NvSciBuf APIs.
This function must be called before calling NvMediaImagePyramidFillNvSciBufAttrs() and NvMediaImagePyramidCreateFromNvSciBuf().