![]() |
NVIDIA DRIVE OS Linux SDK API Reference5.1.12.0 Release |
Video mixer provides a surface to surface based rendering with deinterlacing, inverse telecine, scaling, alpha blending, noise reduction, filtering, and background color support.
Data Structures | |
struct | NvMediaColor |
Holds a constant RGBA color. More... | |
struct | NvMediaVideoMixerAttributes |
Holds video mixer attributes. More... | |
struct | NvMediaBackground |
Background descriptor for video mixing. More... | |
struct | NvMediaVideoDesc |
Video descriptor for video mixing. More... | |
struct | NvMediaAlphaSurface |
Holds an Alpha Surface descriptor for video mixing. More... | |
Modules | |
Mixer Attributes | |
Defines mixer attribute bit masks for constructing attribute masks. | |
Mixer Features | |
Declares and manages objects for specifying mixer features. | |
Macros | |
#define | NVMEDIA_VMP_VERSION_MAJOR 2 |
Major Version number. More... | |
#define | NVMEDIA_VMP_VERSION_MINOR 5 |
Minor Version number. More... | |
Typedefs | |
typedef void | NvMediaVideoMixer |
A handle representing a video mixer object. More... | |
Enumerations | |
enum | NvMediaDeinterlaceType { NVMEDIA_DEINTERLACE_TYPE_BOB, NVMEDIA_DEINTERLACE_TYPE_ADVANCED1, NVMEDIA_DEINTERLACE_TYPE_ADVANCED2 } |
Defines deinterlace types. More... | |
enum | NvMediaPictureStructure { NVMEDIA_PICTURE_STRUCTURE_TOP_FIELD, NVMEDIA_PICTURE_STRUCTURE_BOTTOM_FIELD, NVMEDIA_PICTURE_STRUCTURE_FRAME } |
Defines picture structure types. More... | |
Functions | |
NvMediaStatus | NvMediaVideoMixerGetVersion (NvMediaVersion *version) |
Returns the version information for the Video Mixer library. More... | |
NvMediaVideoMixer * | NvMediaVideoMixerCreate (NvMediaDevice *device, NvMediaSurfaceType surfaceType, uint16_t mixerWidth, uint16_t mixerHeight, float_t sourceAspectRatio, uint16_t videoWidth, uint16_t videoHeight, uint32_t features) |
The principle job of the video mixer is to convert YUV data to RGB, and perform other post-processing at the same time, such as deinterlacing. More... | |
void | NvMediaVideoMixerDestroy (NvMediaVideoMixer *mixer) |
Destroys a mixer created by NvMediaVideoMixerCreate. More... | |
void | NvMediaVideoMixerSetAttributes (NvMediaVideoMixer *mixer, uint32_t attributeMask, NvMediaVideoMixerAttributes *attributes) |
Sets NvMediaVideoMixer attributes. More... | |
NvMediaStatus | NvMediaVideoMixerRenderSurface (NvMediaVideoMixer *mixer, NvMediaVideoSurface *outputSurface, NvMediaBackground *background, NvMediaVideoDesc *video) |
Performs a video post-processing and compositing operation to a surface. More... | |
NvMediaStatus | NvMediaVideoMixerRenderSurfaceWithAlpha (NvMediaVideoMixer *mixer, NvMediaVideoSurface *outputSurface, NvMediaBackground *background, NvMediaVideoDesc *video, NvMediaAlphaSurface *alpha) |
Performs post-processing and compositing with alpha channel replacement. More... | |
#define NVMEDIA_VMP_VERSION_MAJOR 2 |
Major Version number.
Definition at line 41 of file nvmedia_vmp.h.
#define NVMEDIA_VMP_VERSION_MINOR 5 |
Minor Version number.
Definition at line 43 of file nvmedia_vmp.h.
typedef void NvMediaVideoMixer |
A handle representing a video mixer object.
Definition at line 208 of file nvmedia_vmp.h.
Defines deinterlace types.
Enumerator | |
---|---|
NVMEDIA_DEINTERLACE_TYPE_BOB |
BOB deinterlacing. |
NVMEDIA_DEINTERLACE_TYPE_ADVANCED1 |
Advanced1 deinterlacing. |
NVMEDIA_DEINTERLACE_TYPE_ADVANCED2 |
Advanced2 deinterlacing. |
Definition at line 212 of file nvmedia_vmp.h.
Defines picture structure types.
Definition at line 223 of file nvmedia_vmp.h.
NvMediaVideoMixer* NvMediaVideoMixerCreate | ( | NvMediaDevice * | device, |
NvMediaSurfaceType | surfaceType, | ||
uint16_t | mixerWidth, | ||
uint16_t | mixerHeight, | ||
float_t | sourceAspectRatio, | ||
uint16_t | videoWidth, | ||
uint16_t | videoHeight, | ||
uint32_t | features | ||
) |
The principle job of the video mixer is to convert YUV data to RGB, and perform other post-processing at the same time, such as deinterlacing.
[in] | device | The device this video mixer will use. |
[in] | surfaceType | Surface type of the input surface. |
[in] | mixerWidth | Video mixer width. |
[in] | mixerHeight | Video mixer height. |
[in] | sourceAspectRatio | Aspect ratio of the source video. This determines how the video is going to be presented on the output surface. |
[in] | videoWidth | Video width. |
[in] | videoHeight | Video height. |
[in] | features | This selects which features this NvMediaVideoMixer will support. This determines the internal scratch surfaces this function initially creates. At present, the following features are supported and may be OR'd together:
|
void NvMediaVideoMixerDestroy | ( | NvMediaVideoMixer * | mixer | ) |
Destroys a mixer created by NvMediaVideoMixerCreate.
[in] | mixer | The mixer to be destroyed. |
NvMediaStatus NvMediaVideoMixerGetVersion | ( | NvMediaVersion * | version | ) |
Returns the version information for the Video Mixer library.
[in] | version | A pointer to a NvMediaVersion structure filled by the Video Mixer library. |
NvMediaStatus NvMediaVideoMixerRenderSurface | ( | NvMediaVideoMixer * | mixer, |
NvMediaVideoSurface * | outputSurface, | ||
NvMediaBackground * | background, | ||
NvMediaVideoDesc * | video | ||
) |
Performs a video post-processing and compositing operation to a surface.
[in] | mixer | The mixer object that will perform the mixing/rendering operation. |
[in] | outputSurface | Destination surface. |
[in] | background | A background color or image. If set to any value other than NULL, the specific color or surface will be used as the first layer in the mixer's compositing process. |
[in] | video | Video input descriptor structure. |
NvMediaStatus NvMediaVideoMixerRenderSurfaceWithAlpha | ( | NvMediaVideoMixer * | mixer, |
NvMediaVideoSurface * | outputSurface, | ||
NvMediaBackground * | background, | ||
NvMediaVideoDesc * | video, | ||
NvMediaAlphaSurface * | alpha | ||
) |
Performs post-processing and compositing with alpha channel replacement.
More specifically, this function does the following:
[in] | mixer | A pointer to the mixer object that performs the mixing/rendering operation. |
[in] | outputSurface | A pointer to the destination surface. This surface type must obtained by /ref NvMediaSurfaceFormatGetType with NVM_SURF_FMT_SET_ATTR_RGBA(attr, RGBA, UINT, 8, PL/BL). |
[in] | background | A pointer to a background color or image. If set to any value other than NULL, the specific color will be used as the background layer. |
[in] | video | A pointer to the video descriptor structure. This function only supports progressive video. |
[in] | alpha | A pointer to the alpha surface used to replace the alpha channel. |
void NvMediaVideoMixerSetAttributes | ( | NvMediaVideoMixer * | mixer, |
uint32_t | attributeMask, | ||
NvMediaVideoMixerAttributes * | attributes | ||
) |
Sets NvMediaVideoMixer attributes.
[in] | mixer | The mixer object that will perform the mixing/rendering operation. |
[in] | attributeMask | Determines which attributes are set. The value can be any combination of the binary OR of the following attributes:
|
[in] | attributes | A pointer to a structure that holds all the attributes but only those are used which are indicated in the attributeMask. |