The Image 2D Processing API encompasses all NvMedia 2D image processing related functionality.
#define NVMEDIA_2D_VERSION_MAJOR 3 |
#define NVMEDIA_2D_VERSION_MINOR 7 |
An opaque handle representing an NvMedia2D object.
Definition at line 226 of file nvmedia_2d.h.
Returns the version information for the NvMedia 2D library.
- Parameters
-
[out] | version | A 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.
Registers an NvMediaImage for use with an NvMedia2D handle.
- Note
- This function is not supported in this release, and currently returns only the status code NVMEDIA_STATUS_NOT_SUPPORTED.)
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 32 NvMediaImage handles per access mode.
- Parameters
-
[in] | i2d | An NvMedia 2D device handle. |
[in] | image | A pointer to an NvMedia image. |
[in] | accessMode | The access mode required for the image. |
- Return values
-
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more of the parameters were invalid. |
NVMEDIA_STATUS_ERROR | indicates 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_SUPPORTED | indicates that this function currently is not supported. |
Unregisters an NvMediaImage registered with NvMedia2D by a call to NvMedia2DImageRegister().
- Note
- This function currently is not fully implemented. It returns only the status code NVMEDIA_STATUS_NOT_SUPPORTED.
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] | i2d | An NvMedia 2D device handle. |
[in] | image | A pointer to an NvMedia image |
- Return values
-
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that i2d was invalid, the image had already been unregistered, or the image never was registered. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that this function currently is not supported. |
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] | i2d | An NvMedia 2D device handle. |
[in] | imageOdd | A pointer to an NvMedia image representing odd lines. |
[in] | imageEven | A pointer to an NvMedia image representing even lines. |
[out] | outImage | A pointer to an NvMedia image which receivese weave output. |
- Return values
-
NVMEDIA_STATUS_OK | indicates that the operation was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more parameters were invalid. |
NVMEDIA_STATUS_OUT_OF_MEMORY | indicates that the operation ran out of memory. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that the input surface types were not the same. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more pointer parameters were invalid. |