NVIDIA DRIVE OS Linux SDK API Reference

5.1.6.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"
25 
38 #define NVMEDIA_ARRAY_VERSION_MAJOR 2
39 
40 #define NVMEDIA_ARRAY_VERSION_MINOR 1
41 
46 #define NVMEDIA_ARRAY_TIMEOUT_INFINITE 0xFFFFFFFFu
47 
50 typedef enum {
73 
79 typedef struct NvMediaArray NvMediaArray;
80 
84 typedef enum {
88 
92 #define NVM_ARRAY_ATTR_CPU_ACCESS_UNCACHED 0x00000000u
93 
94 #define NVM_ARRAY_ATTR_CPU_ACCESS_CACHED 0x00000001u
95 
99 typedef struct {
103  uint32_t value;
105 
110 typedef enum {
118 
128  NvMediaVersion *version
129 );
130 
143 NvMediaArray *
145  NvMediaDevice *device,
146  NvMediaArrayType type,
147  uint32_t stride,
148  uint32_t numElements,
149  const NvMediaArrayAllocAttr *attrs,
150  uint32_t numAttrs
151 );
152 
162  NvMediaArray* handle
163 );
164 
176  NvMediaArrayType type,
177  uint32_t *elementSize
178 );
179 
195  NvMediaArray* handle,
196  uint32_t *numElementsPtr
197 );
198 
218  NvMediaArray* handle,
219  uint32_t numElements
220 );
221 
237  NvMediaArray* handle,
238  NvMediaArrayType* elementType,
239  uint32_t* capacity,
240  uint32_t* stride
241 );
242 
262  NvMediaArray *handle,
263  uint32_t millisecondWait,
264  NvMediaTaskStatus *status
265 );
266 
291  NvMediaArray *handle,
292  NvMediaArrayLockAccess lockAccessType,
293  void **ptr
294 );
295 
305 void
307  NvMediaArray *handle
308 );
309 
310 /*
311  * \defgroup history_nvmedia_array History
312  * Provides change history for the NvMedia Array API.
313  *
314  * \section history_nvmedia_arrays Version History
315  *
316  * <b> Version 1.0 </b> December 4, 2017
317  * - Initial Release.
318  *
319  * <b> Version 2.0 </b> June 1, 2018
320  * - Remove keypoint type. VPI-specific types are in VPI headers.
321  *
322  * <b> Version 2.1 </b> July 9, 2018
323  * - Add version query API.
324  */
325 
328 #ifdef __cplusplus
329 }; /* extern "C" */
330 #endif
331 
332 #endif // NVMEDIA_ARRAY_H
NvMediaArrayType
Defines the different types of arrays.
Definition: nvmedia_array.h:50
NvMediaStatus NvMediaArrayGetVersion(NvMediaVersion *version)
Returns version information for the NvMediaArray library.
Specifies a signed 8-bit array.
Definition: nvmedia_array.h:54
struct NvMediaArray NvMediaArray
Holds a descriptor for an array.
Definition: nvmedia_array.h:79
Specifies write access.
Specifies a signed 32-bit array.
Definition: nvmedia_array.h:66
NvMediaArrayAllocAttrType
Defines NvMedia array allocation attribute types.
Definition: nvmedia_array.h:84
Holds NvMedia version information.
Definition: nvmedia_core.h:226
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:337
NvMediaStatus NvMediaArraySetSize(NvMediaArray *handle, uint32_t numElements)
Sets the size of an array (the number of populated elements in the array).
void NvMediaArrayUnlock(NvMediaArray *handle)
Unlocks an array.
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:209
NvMediaStatus NvMediaArrayGetProperties(NvMediaArray *handle, NvMediaArrayType *elementType, uint32_t *capacity, uint32_t *stride)
Gets the array properties with which array was created.
! CPU access to surface flags (default: uncached).
Definition: nvmedia_array.h:86
NVIDIA Media Interface: Core
uint32_t value
Array allocation attribute value.
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:169
Specifies a float 32-bit array.
Definition: nvmedia_array.h:68
Specifies an unsigned 8-bit array.
Definition: nvmedia_array.h:56
Specifies a unsigned 32-bit array.
Definition: nvmedia_array.h:64
Specifies a float 16-bit array.
Definition: nvmedia_array.h:62
Specifies an unsigned 16-bit array.
Definition: nvmedia_array.h:60
Holds array allocation attributes.
Definition: nvmedia_array.h:99
NvMediaArrayAllocAttrType type
Array allocation attribute type.
Specifies a signed 16-bit array.
Definition: nvmedia_array.h:58
NvMediaStatus NvMediaArrayDestroy(NvMediaArray *handle)
Destroys an array created by NvMediaArrayCreate().
Number of types - If more types are needed, add above this pointer and update this constant...
Definition: nvmedia_array.h:71
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 read access.
NvMediaArrayLockAccess
Defines array-lock access types.
NvMediaArray * NvMediaArrayCreate(NvMediaDevice *device, NvMediaArrayType type, uint32_t stride, uint32_t numElements, const NvMediaArrayAllocAttr *attrs, uint32_t numAttrs)
Creates an NvMedia Array.
Specifies an undefined array type.
Definition: nvmedia_array.h:52
Specifies read/write access.
NvMediaStatus NvMediaArrayGetSize(NvMediaArray *handle, uint32_t *numElementsPtr)
Gets the size of an array.
NvMediaStatus NvMediaArrayLock(NvMediaArray *handle, NvMediaArrayLockAccess lockAccessType, void **ptr)
Locks an array.
NvMediaStatus NvMediaArrayGetElemSizeForType(NvMediaArrayType type, uint32_t *elementSize)
Gets the size of a specified type of array element.