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... | |
#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.
Definition at line 42 of file multimedia/tvmr/include/nvmedia_2d.h.
#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.
Definition at line 52 of file multimedia/tvmr/include/nvmedia_2d.h.
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
[out] | version | Pointer to an NvMediaVersion struct that will be populated with the version information. |
NVMEDIA_STATUS_OK | Version information returned successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | version is NULL. |
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.
[in] | i2d | Pointer to the NvMedia2D context. |
[in] | image | Pointer to an NvMediaImage object to register. |
[in] | accessMode | An NvMediaAccessMode, to indicate whether the image will be used as a source or destination image. The value should be either:
|
NVMEDIA_STATUS_OK | Image registered successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | One of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_ERROR | The image cannot be registered due to:
|
NVMEDIA_STATUS_NOT_SUPPORTED | Image registration is not supported on current platform. |
Usage considerations
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.
[in] | i2d | Pointer to the NvMedia2D context. |
[in] | image | Pointer to an NvMediaImage object to unregister. |
NVMEDIA_STATUS_OK | Image unregistered successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | One of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_PENDING | The 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_SUPPORTED | Image registration is not supported on current platform. |
Usage considerations