NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.0 Release
For Test and Development only

Detailed Description

The Image 2D Processing API encompasses all NvMedia 2D image processing related functionality.

Data Structures

struct  NvMedia2DBlitParameters
 Holds the additional parameters for a blit. More...
 
struct  NvMedia2DBlitParametersOut
 Holds additional values returned from a blit. More...
 

Modules

 Blits
 Blit functions define valid parameters for a blit.
 
 Surface Filtering
 
 Transformations
 Transformations are used to rotate and mirror the source surface of a blit operation. The destination rectangle is not affected by any transformation settings.
 

Macros

#define NVMEDIA_2D_VERSION_MAJOR   3
 Major version number. More...
 
#define NVMEDIA_2D_VERSION_MINOR   7
 Minor version number. More...
 

Typedefs

typedef struct NvMedia2D NvMedia2D
 An opaque handle representing an NvMedia2D object. More...
 

Functions

NvMediaStatus NvMedia2DGetVersion (NvMediaVersion *version)
 Returns the version information for the NvMedia 2D library. More...
 
NvMediaStatus NvMedia2DWeaveNew (const NvMedia2D *i2d, NvMediaImage *imageOdd, NvMediaImage *imageEven, NvMediaImage *outImage)
 Performs an NvMedia2D weave operation on NvMedia images. More...
 
NvMediaStatus NvMedia2DImageRegister (const NvMedia2D *i2d, NvMediaImage *image, NvMediaAccessMode accessMode)
 Registers an NvMediaImage for use with an NvMedia2D handle. More...
 
NvMediaStatus NvMedia2DImageUnRegister (const NvMedia2D *i2d, NvMediaImage *image)
 Unregisters an NvMediaImage registered with NvMedia2D by a call to NvMedia2DImageRegister(). More...
 

Macro Definition Documentation

◆ NVMEDIA_2D_VERSION_MAJOR

#define NVMEDIA_2D_VERSION_MAJOR   3

Major version number.

Definition at line 36 of file nvmedia_2d.h.

◆ NVMEDIA_2D_VERSION_MINOR

#define NVMEDIA_2D_VERSION_MINOR   7

Minor version number.

Definition at line 38 of file nvmedia_2d.h.

Typedef Documentation

◆ NvMedia2D

typedef struct NvMedia2D NvMedia2D

An opaque handle representing an NvMedia2D object.

Definition at line 226 of file nvmedia_2d.h.

Function Documentation

◆ NvMedia2DGetVersion()

NvMediaStatus NvMedia2DGetVersion ( NvMediaVersion version)

Returns the version information for the NvMedia 2D library.

Parameters
[out]versionA pointer to an NvMediaVersion structure filled by the 2D library.
Returns
A status code; NVMEDIA_STATUS_OK if successful, or NVMEDIA_STATUS_BAD_PARAMETER if version was invalid.

◆ NvMedia2DImageRegister()

NvMediaStatus NvMedia2DImageRegister ( const NvMedia2D i2d,
NvMediaImage image,
NvMediaAccessMode  accessMode 
)

Registers an NvMediaImage for use with an NvMedia2D handle.

The NvMedia2D handle maintains a record of all the images registered by this function.

This is an optional function call. Skipping it results in nondeterministic NvMedia2DBlitEx() execution time. To ensure deterministic execution time for NvMedia2DBlitEx():

  • You must call NvMedia2DImageRegister() for every input and output NvMediaImage to be used with NvMedia2D.
  • You must make all calls to NvMedia2DImageRegister() before the first call to NvMedia2DBlitEx().

You can register a maximum of 128 NvMediaImage handles per access mode.

Parameters
[in]i2dAn NvMedia 2D device handle.
[in]imageA pointer to an NvMedia image.
[in]accessModeThe access mode required for the image.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more of the parameters were invalid.
NVMEDIA_STATUS_ERRORindicates that the application tried to register more than 32 images, register the same image with more than one accessMode, or register the same image more than once.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that this function currently is not supported.

◆ NvMedia2DImageUnRegister()

NvMediaStatus NvMedia2DImageUnRegister ( const NvMedia2D i2d,
NvMediaImage image 
)

Unregisters an NvMediaImage registered with NvMedia2D by a call to NvMedia2DImageRegister().

This function must be called for all NvMediaImage handles registered with NvMedia2D before NvMedia2DDestroy() is called.

To ensure deterministic execution of NvMedia2DBlitEx(), you must call this function only after the last call to NvMedia2DBlitEx().

Parameters
[in]i2dAn NvMedia 2D device handle.
[in]imageA pointer to an NvMedia image
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that i2d was invalid, the image had already been unregistered, or the image never was registered.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that this function currently is not supported.

◆ NvMedia2DWeaveNew()

NvMediaStatus NvMedia2DWeaveNew ( const NvMedia2D i2d,
NvMediaImage imageOdd,
NvMediaImage imageEven,
NvMediaImage outImage 
)

Performs an NvMedia2D weave operation on NvMedia images.

The 2D weave operation takes frames containing odd and even lines as input. The weave operation forms a destination frame by interleaving the odd and even lines.

The input frames must have the same format, which must be RAW8 or RGBA. The output frame format must be RGBA; the output frame has the same width as each input frame, and twice the height.

Parameters
[in]i2dAn NvMedia 2D device handle.
[in]imageOddA pointer to an NvMedia image representing odd lines.
[in]imageEvenA pointer to an NvMedia image representing even lines.
[out]outImageA pointer to an NvMedia image which receivese weave output.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that one or more parameters were invalid.
NVMEDIA_STATUS_OUT_OF_MEMORYindicates that the operation ran out of memory.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that the input surface types were not the same.