NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
Image 2D Processing

Detailed Description

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

Data Structures

struct  NvMedia2DBlitParameters
 Stores configuration for the NvMedia2DBlitEx() operation. More...
 
struct  NvMedia2DBlitParametersOut
 Stores information returned from NvMedia2DBlitEx(). More...
 

Modules

 Blits
 Blit functions define valid parameters for a blit.
 
 History
 Provides change history for the NvMedia 2D API.
 
 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 of NvMedia 2D header. More...
 
#define NVMEDIA_2D_VERSION_MINOR   11
 Minor version number of NvMedia 2D header. More...
 

Functions

NvMediaStatus NvMedia2DGetVersion (NvMediaVersion *version)
 Returns the version number of the NvMedia 2D library. More...
 
NvMediaStatus NvMedia2DImageRegister (const NvMedia2D *i2d, const NvMediaImage *image, NvMediaAccessMode accessMode)
 Registers an NvMediaImage for use with an NvMedia 2D context. More...
 
NvMediaStatus NvMedia2DImageUnRegister (const NvMedia2D *i2d, const NvMediaImage *image)
 Unregisters an NvMediaImage from an NvMedia 2D context. More...
 

Macro Definition Documentation

◆ NVMEDIA_2D_VERSION_MAJOR

#define NVMEDIA_2D_VERSION_MAJOR   3

Major version number of NvMedia 2D header.

This defines the major version of the API defined in this header. This is intended to be used when validating the version number returned by the NvMedia2DGetVersion() function.

See also
NvMedia2DGetVersion()

Definition at line 42 of file multimedia/tvmr/include/nvmedia_2d.h.

◆ NVMEDIA_2D_VERSION_MINOR

#define NVMEDIA_2D_VERSION_MINOR   11

Minor version number of NvMedia 2D header.

This defines the minor version of the API defined in this header. This is intended to be used when validating the version number returned by the NvMedia2DGetVersion() function.

See also
NvMedia2DGetVersion()

Definition at line 52 of file multimedia/tvmr/include/nvmedia_2d.h.

Function Documentation

◆ NvMedia2DGetVersion()

NvMediaStatus NvMedia2DGetVersion ( NvMediaVersion version)

Returns the version number of the NvMedia 2D library.

This function returns the major and minor version number of the NvMedia 2D library. The client must pass an NvMediaVersion struct to this function, and the version information will be returned in this struct.

This allows the client to verify that the version of the library matches and is compatible with the the version number of the header file they are using.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: No
  • API group
    • Init: Yes
    • Runtime: Yes
    • De-Init: Yes
Parameters
[out]versionPointer to an NvMediaVersion struct that will be populated with the version information.
Returns
An NvMediaStatus return code.
Return values
NVMEDIA_STATUS_OKVersion information returned successfully.
NVMEDIA_STATUS_BAD_PARAMETERversion is NULL.
See also
NVMEDIA_2D_VERSION_MAJOR
NVMEDIA_2D_VERSION_MINOR
NvMediaVersion

◆ NvMedia2DImageRegister()

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

Registers an NvMediaImage for use with an NvMedia 2D context.

NvMedia 2D maintains a record of all the images registered by this function.

To ensure deterministic execution time for NvMedia2DBlitEx():

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

The caller is responsible for unregistered the image when no longer in use, by calling the #NvMedia2DImageUnregister() function.

The NvMedia2DImageRegister()/NvMedia2DImageUnRegister() API is internally refcounted, so its valid to register the same image multiple times. In this case, the client must ensure NvMedia2DImageUnRegister() is called the same number of times as NvMedia2DImageRegister() for a given image. The final call to NvMedia2DImageUnRegister() will do the actual work to unregister and stop tracking the image.

Parameters
[in]i2dPointer to the NvMedia2D context.
[in]imagePointer to an NvMediaImage object to register.
[in]accessModeAn NvMediaAccessMode, to indicate whether the image will be used as a source or destination image. The value should be either:
  • NVMEDIA_ACCESS_MODE_READ if image will be used only as a source image
  • NVMEDIA_ACCESS_MODE_READ_WRITE if the image be used as either a source or destination image.
Returns
An NvMediaStatus return code.
Return values
NVMEDIA_STATUS_OKImage registered successfully.
NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
  • i2d is NULL
  • image is NULL
  • accessMode is invalid.
NVMEDIA_STATUS_ERRORThe image cannot be registered due to:
  • maximum number of registered images has been reached.
NVMEDIA_STATUS_NOT_SUPPORTEDImage registration is not supported on current platform.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: No
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No
See also
NvMedia2DImageUnregister()

◆ NvMedia2DImageUnRegister()

NvMediaStatus NvMedia2DImageUnRegister ( const NvMedia2D i2d,
const NvMediaImage image 
)

Unregisters an NvMediaImage from an NvMedia 2D context.

This function must be called for all NvMediaImage handles registered with NvMedia 2D before NvMedia2DDestroyEx() is called.

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

Parameters
[in]i2dPointer to the NvMedia2D context.
[in]imagePointer to an NvMediaImage object to unregister.
Returns
An NvMediaStatus return code.
Return values
NVMEDIA_STATUS_OKImage unregistered successfully.
NVMEDIA_STATUS_BAD_PARAMETEROne of the parameters has an invalid value. This could be:
  • i2d is NULL
  • image is NULL
NVMEDIA_STATUS_PENDINGThe image cannot be unregistered because a previous operation is still pending. The caller should wait for the most recently submitted operation on this image to complete and then try again.
NVMEDIA_STATUS_NOT_SUPPORTEDImage registration is not supported on current platform.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: No
  • API group
    • Init: No
    • Runtime: No
    • De-Init: Yes
See also
NvMedia2DImageRegister()