NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NvMedia CVScratchpad

Detailed Description

The NvMedia CVScratchpad API creates and destroys CVScratchpad objects for use as scratch memory for internal operation in media processing and computer vision pipelines.

Macros

#define NVMEDIA_CVSCRATCHPAD_VERSION_MAJOR   1
 Major version number. More...
 
#define NVMEDIA_CVSCRATCHPAD_VERSION_MINOR   0
 Minor version number. More...
 

Typedefs

typedef struct NvMediaCVScratchpad NvMediaCVScratchpad
 Holds a descriptor for the CVScratchpad. More...
 

Enumerations

enum  NvMediaCVScratchMemoryAllocationType {
  NVMEDIA_SCRATCH_MEMORY_TYPE_CVSRAM = 0,
  NVMEDIA_SCRATCH_MEMORY_TYPE_DRAM = 1,
  NVMEDIA_SCRATCH_NUM_MEMORY_TYPES = 2
}
 Specifies the type of memory that is allocated. More...
 

Functions

NvMediaStatus NvMediaCVScratchpadGetVersion (NvMediaVersion *version)
 Returns version information for the CVScratchpad component. More...
 
NvMediaCVScratchpadNvMediaCVScratchpadCreate (NvMediaDevice *device, uint32_t size, NvMediaCVScratchMemoryAllocationType memoryType)
 Creates an NvMedia CVScratchpad handle. More...
 
NvMediaStatus NvMediaCVScratchpadDestroy (NvMediaCVScratchpad *handle)
 Destroys a CVScratchpad handle created by NvMediaCVScratchpadCreate(). More...
 
NvMediaStatus NvMediaCVScratchpadGetProperties (NvMediaCVScratchpad *handle, uint32_t *size, NvMediaCVScratchMemoryAllocationType *memoryType)
 Gets the size in bytes and memory location type of a CVScratchpad. More...
 

Macro Definition Documentation

#define NVMEDIA_CVSCRATCHPAD_VERSION_MAJOR   1

Major version number.

Definition at line 38 of file nvmedia_cvscratchpad.h.

#define NVMEDIA_CVSCRATCHPAD_VERSION_MINOR   0

Minor version number.

Definition at line 40 of file nvmedia_cvscratchpad.h.

Typedef Documentation

Holds a descriptor for the CVScratchpad.

Note
The handle must be created and destroyed using NvMediaCVScratchpadCreate() and NvMediaCVScratchpadDestroy().

Definition at line 60 of file nvmedia_cvscratchpad.h.

Enumeration Type Documentation

Specifies the type of memory that is allocated.

Enumerator
NVMEDIA_SCRATCH_MEMORY_TYPE_CVSRAM 

Specifies scratch memory allocated in CVSRAM.

NVMEDIA_SCRATCH_MEMORY_TYPE_DRAM 

Specifies scratch memory allocated in DRAM.

NVMEDIA_SCRATCH_NUM_MEMORY_TYPES 

Specifies the number of memory types.

Definition at line 44 of file nvmedia_cvscratchpad.h.

Function Documentation

NvMediaCVScratchpad* NvMediaCVScratchpadCreate ( NvMediaDevice device,
uint32_t  size,
NvMediaCVScratchMemoryAllocationType  memoryType 
)

Creates an NvMedia CVScratchpad handle.

Parameters
[in]deviceHandle to the NvMedia device returned by NvMediaDeviceCreate().
[in]sizeSize for the CVScratchpad allocation in bytes. Value must be in the range [1,4096].
[in]memoryTypeType of memory to be allocated.
Returns
A handle to the allocated CVScratchpad, or NULL if the operation was unsuccessful.
NvMediaStatus NvMediaCVScratchpadDestroy ( NvMediaCVScratchpad handle)

Destroys a CVScratchpad handle created by NvMediaCVScratchpadCreate().

Parameters
[in]handleThe handle to the CVScratchpad to be destroyed.
Returns
Status indicator. Possible return values are:
NvMediaStatus NvMediaCVScratchpadGetProperties ( NvMediaCVScratchpad handle,
uint32_t *  size,
NvMediaCVScratchMemoryAllocationType memoryType 
)

Gets the size in bytes and memory location type of a CVScratchpad.

Parameters
[in]handleHandle to a CVScratchpad.
[out]sizeA pointer to a location in which to store the size of the CVScratchpad.
[out]memoryTypeA pointer to a location in which to store the type of memory used.
Returns
Status indicator. Possible return values are:
NvMediaStatus NvMediaCVScratchpadGetVersion ( NvMediaVersion version)

Returns version information for the CVScratchpad component.

Parameters
[out]versionA pointer to a structure that the function fills with version information.
Returns
Status indicator. Possible values are: