NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_array.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
8 
17 #ifndef NVMEDIA_ARRAY_H
18 #define NVMEDIA_ARRAY_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include "nvmedia_core.h"
47 #define NVMEDIA_ARRAY_VERSION_MAJOR (2u)
48 
49 #define NVMEDIA_ARRAY_VERSION_MINOR (2u)
50 
55 #define NVMEDIA_ARRAY_TIMEOUT_INFINITE 0xFFFFFFFFu
56 
59 typedef enum {
82 
88 typedef struct NvMediaArray NvMediaArray;
89 
93 typedef enum {
97 
101 #define NVM_ARRAY_ATTR_CPU_ACCESS_UNCACHED 0x00000000u
102 
103 #define NVM_ARRAY_ATTR_CPU_ACCESS_CACHED 0x00000001u
104 
108 typedef struct {
112  uint32_t value;
114 
119 typedef enum {
127 
137  NvMediaVersion *version
138 );
139 
152 NvMediaArray *
154  NvMediaDevice *device,
155  NvMediaArrayType type,
156  uint32_t stride,
157  uint32_t numElements,
158  const NvMediaArrayAllocAttr *attrs,
159  uint32_t numAttrs
160 );
161 
171  NvMediaArray* handle
172 );
173 
185  NvMediaArrayType type,
186  uint32_t *elementSize
187 );
188 
205  NvMediaArray* handle,
206  uint32_t *numElementsPtr
207 );
208 
229  NvMediaArray* handle,
230  uint32_t numElements
231 );
232 
248  NvMediaArray* handle,
249  NvMediaArrayType* elementType,
250  uint32_t* capacity,
251  uint32_t* stride
252 );
253 
273  NvMediaArray *handle,
274  uint32_t millisecondWait,
275  NvMediaTaskStatus *status
276 );
277 
302  NvMediaArray *handle,
303  NvMediaArrayLockAccess lockAccessType,
304  void **ptr
305 );
306 
316 void
318  NvMediaArray *handle
319 );
322 /*
323  * \defgroup history_nvmedia_array History
324  * Provides change history for the NvMedia Array API.
325  *
326  * \section history_nvmedia_arrays Version History
327  *
328  * <b> Version 1.0 </b> December 4, 2017
329  * - Initial Release.
330  *
331  * <b> Version 2.0 </b> June 1, 2018
332  * - Remove keypoint type. VPI-specific types are in VPI headers.
333  *
334  * <b> Version 2.1 </b> July 9, 2018
335  * - Add version query API.
336  *
337  * <b> Version 2.2 </b> June 18, 2019
338  * - Notes to Deprecate the NvMediaArrayCreate API
339  * in support of NvSciBuf APIs.
340  */
341 
344 #ifdef __cplusplus
345 }; /* extern "C" */
346 #endif
347 
348 #endif // NVMEDIA_ARRAY_H
Specifies an undefined array type.
Definition: nvmedia_array.h:61
Specifies a float 16-bit array.
Definition: nvmedia_array.h:71
NvMediaStatus NvMediaArrayGetSize(NvMediaArray *handle, uint32_t *numElementsPtr)
Gets the size of an array.
NvMediaStatus NvMediaArrayGetStatus(NvMediaArray *handle, uint32_t millisecondWait, NvMediaTaskStatus *status)
Gets the status of the current or most recent operation on the array; optionally waits for the operat...
Specifies write access.
NvMediaStatus NvMediaArrayGetVersion(NvMediaVersion *version)
Returns version information for the NvMediaArray library.
NvMediaArrayType
Defines the different types of arrays.
Definition: nvmedia_array.h:59
Holds NvMedia version information.
Definition: nvmedia_core.h:226
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:337
NvMediaArrayAllocAttrType
Defines NvMedia array allocation attribute types.
Definition: nvmedia_array.h:93
Specifies an unsigned 16-bit array.
Definition: nvmedia_array.h:69
void NvMediaArrayUnlock(NvMediaArray *handle)
Unlocks an array.
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:209
NvMediaArray * NvMediaArrayCreate(NvMediaDevice *device, NvMediaArrayType type, uint32_t stride, uint32_t numElements, const NvMediaArrayAllocAttr *attrs, uint32_t numAttrs)
Creates an NvMedia Array.
NvMediaStatus NvMediaArrayDestroy(NvMediaArray *handle)
Destroys an array created by NvMediaArrayCreate().
NVIDIA Media Interface: Core
uint32_t value
Array allocation attribute value.
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:169
NvMediaStatus NvMediaArrayGetProperties(NvMediaArray *handle, NvMediaArrayType *elementType, uint32_t *capacity, uint32_t *stride)
Gets the array properties with which array was created.
struct NvMediaArray NvMediaArray
Holds a descriptor for an array.
Definition: nvmedia_array.h:88
Specifies a float 32-bit array.
Definition: nvmedia_array.h:77
Number of types - If more types are needed, add above this pointer and update this constant...
Definition: nvmedia_array.h:80
Specifies a signed 16-bit array.
Definition: nvmedia_array.h:67
NvMediaStatus NvMediaArraySetSize(NvMediaArray *handle, uint32_t numElements)
Sets the size of an array (the number of populated elements in the array).
! CPU access to surface flags (default: uncached).
Definition: nvmedia_array.h:95
Holds array allocation attributes.
Specifies a unsigned 32-bit array.
Definition: nvmedia_array.h:73
NvMediaArrayAllocAttrType type
Array allocation attribute type.
Specifies an unsigned 8-bit array.
Definition: nvmedia_array.h:65
Specifies read access.
NvMediaStatus NvMediaArrayGetElemSizeForType(NvMediaArrayType type, uint32_t *elementSize)
Gets the size of a specified type of array element.
Specifies a signed 8-bit array.
Definition: nvmedia_array.h:63
NvMediaArrayLockAccess
Defines array-lock access types.
Specifies read/write access.
Specifies a signed 32-bit array.
Definition: nvmedia_array.h:75
NvMediaStatus NvMediaArrayLock(NvMediaArray *handle, NvMediaArrayLockAccess lockAccessType, void **ptr)
Locks an array.