NVIDIA DRIVE OS Linux API Reference5.1.0.2 Release |
The NvMedia Array API encompasses all NvMedia functions that create, destroy, access and update arrays used in media processing and computer vision applications.
Data Structures | |
struct | NvMediaArrayAllocAttr |
Holds array allocation attributes. More... | |
Macros | |
#define | NVMEDIA_ARRAY_VERSION_MAJOR 2 |
Major Version number. More... | |
#define | NVMEDIA_ARRAY_VERSION_MINOR 1 |
Minor Version number. More... | |
#define | NVMEDIA_ARRAY_TIMEOUT_INFINITE |
Infinite time-out for NvMediaArrayGetStatus. More... | |
#define | NVM_ARRAY_ATTR_CPU_ACCESS_UNCACHED 0x00000000 |
NVM_SURF_ATTR_CPU_ACCESS flags More... | |
#define | NVM_ARRAY_ATTR_CPU_ACCESS_CACHED 0x00000001 |
NVM_SURF_ATTR_CPU_ACCESS flag: Cached (mapped) access type flag. More... | |
Typedefs | |
typedef struct NvMediaArray | NvMediaArray |
Holds a descriptor for the array. More... | |
Enumerations | |
enum | NvMediaArrayType { NVMEDIA_ARRAY_TYPE_UNDEFINED = 0, NVMEDIA_ARRAY_TYPE_INT8 = 1, NVMEDIA_ARRAY_TYPE_UINT8 = 2, NVMEDIA_ARRAY_TYPE_INT16 = 3, NVMEDIA_ARRAY_TYPE_UINT16 = 4, NVMEDIA_ARRAY_TYPE_FLOAT16 = 5, NVMEDIA_ARRAY_TYPE_UINT32 = 6, NVMEDIA_ARRAY_TYPE_INT32 = 7, NVMEDIA_ARRAY_TYPE_FLOAT32 = 8, NVMEDIA_ARRAY_NUM_TYPES = 8 } |
Defines the different types of Arrays. More... | |
enum | NvMediaArrayAllocAttrType { NVM_ARRAY_ATTR_CPU_ACCESS } |
Defines NvMedia array allocation attribute types. More... | |
Functions | |
NvMediaStatus | NvMediaArrayGetVersion (NvMediaVersion *version) |
Returns the version information for the NvMediaArray library. More... | |
NvMediaArray * | NvMediaArrayCreate (NvMediaDevice *device, NvMediaArrayType type, uint32_t stride, uint32_t numElements, const NvMediaArrayAllocAttr *attrs, uint32_t numAttrs) |
Creates an NvMedia Array. More... | |
NvMediaStatus | NvMediaArrayDestroy (NvMediaArray *handle) |
Destroys an array created by NvMediaArrayCreate(). More... | |
NvMediaStatus | NvMediaArrayGetElemSizeForType (NvMediaArrayType type, uint32_t *elementSize) |
Gets the size of an element, for a particular type of array element. More... | |
NvMediaStatus | NvMediaArrayGetSize (NvMediaArray *handle, uint32_t *numElementsPtr) |
Gets the size of the array. More... | |
NvMediaStatus | NvMediaArraySetSize (NvMediaArray *handle, uint32_t numElements) |
Sets the size of the array. More... | |
NvMediaStatus | NvMediaArrayGetProperties (NvMediaArray *handle, NvMediaArrayType *elementType, uint32_t *capacity, uint32_t *stride) |
Helper function to get array properties with which array was created. More... | |
NvMediaStatus | NvMediaArrayGetStatus (NvMediaArray *handle, uint32_t millisecondWait, NvMediaTaskStatus *status) |
Gets the status of the current/last operation for the Array and optionally waits for the operation to complete/timeout. More... | |
#define NVM_ARRAY_ATTR_CPU_ACCESS_CACHED 0x00000001 |
NVM_SURF_ATTR_CPU_ACCESS flag: Cached (mapped) access type flag.
Definition at line 93 of file nvmedia_array.h.
#define NVM_ARRAY_ATTR_CPU_ACCESS_UNCACHED 0x00000000 |
NVM_SURF_ATTR_CPU_ACCESS flags
Uncached (mapped) access type flag
Definition at line 91 of file nvmedia_array.h.
#define NVMEDIA_ARRAY_TIMEOUT_INFINITE |
Infinite time-out for NvMediaArrayGetStatus.
Definition at line 46 of file nvmedia_array.h.
#define NVMEDIA_ARRAY_VERSION_MAJOR 2 |
Major Version number.
Definition at line 38 of file nvmedia_array.h.
#define NVMEDIA_ARRAY_VERSION_MINOR 1 |
Minor Version number.
Definition at line 40 of file nvmedia_array.h.
typedef struct NvMediaArray NvMediaArray |
Holds a descriptor for the array.
Note: The array needs to be created and destroyed using the corresponding NvMediaArrayCreate() and NvMediaArrayDestroy() functions.
Definition at line 78 of file nvmedia_array.h.
Defines NvMedia array allocation attribute types.
Enumerator | |
---|---|
NVM_ARRAY_ATTR_CPU_ACCESS |
! CPU access to surface flags (default: uncached) |
Definition at line 83 of file nvmedia_array.h.
enum NvMediaArrayType |
Defines the different types of Arrays.
Definition at line 50 of file nvmedia_array.h.
NvMediaArray* NvMediaArrayCreate | ( | NvMediaDevice * | device, |
NvMediaArrayType | type, | ||
uint32_t | stride, | ||
uint32_t | numElements, | ||
const NvMediaArrayAllocAttr * | attrs, | ||
uint32_t | numAttrs | ||
) |
Creates an NvMedia Array.
[in] | device | Handle to the NvMedia device obtained by calling NvMediaDeviceCreate. |
[in] | type | NvMediaArrayType Type of Array to be created. |
[in] | stride | Stride in bytes of each element. |
[in] | numElements | number of Elements in the array. |
[in] | attrs | An array of NvMediaArrayAllocAttr Allocation attributes. |
[in] | numAttrs | Number of allocation objects attrs. |
NvMediaStatus NvMediaArrayDestroy | ( | NvMediaArray * | handle | ) |
Destroys an array created by NvMediaArrayCreate().
[in] | handle | The handle to the array to be destroyed. |
NvMediaStatus NvMediaArrayGetElemSizeForType | ( | NvMediaArrayType | type, |
uint32_t * | elementSize | ||
) |
Gets the size of an element, for a particular type of array element.
[in] | type | NvMediaArrayType Type of element. |
[out] | elementSize | Pointer to size of element in bytes. |
NvMediaStatus NvMediaArrayGetProperties | ( | NvMediaArray * | handle, |
NvMediaArrayType * | elementType, | ||
uint32_t * | capacity, | ||
uint32_t * | stride | ||
) |
Helper function to get array properties with which array was created.
[in] | handle | The handle to the array. |
[out] | elementType | Type of elements NvMediaArrayType. |
[out] | capacity | Pointer to the capacity (Number of elements). |
[out] | stride | Pointer to the stride (Stride in bytes to move to next element). |
NvMediaStatus NvMediaArrayGetSize | ( | NvMediaArray * | handle, |
uint32_t * | numElementsPtr | ||
) |
Gets the size of the array.
An array's size is the number of populated elements in the array. If the array has not been written to, the function sets *numElementsPtr to 0.
[in] | handle | The handle to the array. |
[out] | numElementsPtr | Pointer to the number of valid elements. |
NvMediaStatus NvMediaArrayGetStatus | ( | NvMediaArray * | handle, |
uint32_t | millisecondWait, | ||
NvMediaTaskStatus * | status | ||
) |
Gets the status of the current/last operation for the Array and optionally waits for the operation to complete/timeout.
[in] | handle | The handle to the array. |
[in] | millisecondWait | Time in milliseconds to wait for operation to complete before getting status. NVMEDIA_ARRAY_TIMEOUT_INFINITE means wait till operation is completed and then get status. |
[out] | status | Status of the operation. |
NvMediaStatus NvMediaArrayGetVersion | ( | NvMediaVersion * | version | ) |
Returns the version information for the NvMediaArray library.
[in] | version | A pointer to a NvMediaVersion structure filled by the NvMediaArray library. |
NvMediaStatus NvMediaArraySetSize | ( | NvMediaArray * | handle, |
uint32_t | numElements | ||
) |
Sets the size of the array.
Call this function before writing to the array. The number of elements must be less than the number with which the array was created. An array's size is the number of populated elements in the array.
[in] | handle | The handle to the array. |
[in] | numElements | Number of elements to set the size to. |