NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_vmp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
15 #ifndef _NVMEDIA_VMP_H
16 #define _NVMEDIA_VMP_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "nvmedia_core.h"
23 #include "nvmedia_common.h"
24 #include "nvmedia_video.h"
25 #include "nvmedia_vop.h"
26 
39 #define NVMEDIA_VMP_VERSION_MAJOR 2
40 
41 #define NVMEDIA_VMP_VERSION_MINOR 2
42 
53 #define NVMEDIA_VMP_FEATURE_BACKGROUND_PRESENT (1<<0)
54 
59 #define NVMEDIA_VMP_FEATURE_INTERLACED (1<<1)
60 
65 #define NVMEDIA_VMP_FEATURE_DEINTERLACING (1<<2)
66 
71 #define NVMEDIA_VMP_FEATURE_ADVANCED1_DEINTERLACING (1<<3)
72 
77 #define NVMEDIA_VMP_FEATURE_ADVANCED2_DEINTERLACING (1<<4)
78 
83 #define NVMEDIA_VMP_FEATURE_LIMITED_RGB_INPUT (1<<5)
84 
90 #define NVMEDIA_VMP_FEATURE_INVERSE_TELECINE (1<<6)
91 
96 #define NVMEDIA_VMP_FEATURE_NOISE_REDUCTION (1<<7)
97 
102 #define NVMEDIA_VMP_FEATURE_SHARPENING (1<<8)
103 
109 #define NVMEDIA_VMP_FEATURE_ALPHA_SURFACE_MODE (1<<9)
110 
115 #define NVMEDIA_VMP_FEATURE_PROTECTED (1<<10)
116 
121 #define NVMEDIA_VMP_FEATURE_ENABLE_DFS (1<<11)
122 
135 #define NVMEDIA_VMP_ATTR_BRIGHTNESS (1<<0)
136 
140 #define NVMEDIA_VMP_ATTR_CONTRAST (1<<1)
141 
145 #define NVMEDIA_VMP_ATTR_SATURATION (1<<2)
146 
150 #define NVMEDIA_VMP_ATTR_HUE (1<<3)
151 
155 #define NVMEDIA_VMP_ATTR_COLOR_STANDARD (1<<4)
156 
160 #define NVMEDIA_VMP_ATTR_DEINTERLACE_TYPE (1<<6)
161 
165 #define NVMEDIA_VMP_ATTR_NOISE_REDUCTION (1<<7)
166 
170 #define NVMEDIA_VMP_ATTR_NOISE_REDUCTION_ALGORITHM (1<<8)
171 
175 #define NVMEDIA_VMP_ATTR_SHARPENING (1<<9)
176 
180 #define NVMEDIA_VMP_ATTR_INVERSE_TELECINE (1<<10)
181 
185 #define NVMEDIA_VMP_ATTR_FILTER_QUALITY (1<<11)
186 
190 #define NVMEDIA_VMP_ATTR_DESTINATION_ALPHA (1<<12)
191 
195 #define NVMEDIA_VMP_ATTR_DESTINATION_PREMULTIPLY_ALPHA (1<<13)
196 
200 #define NVMEDIA_VMP_ATTR_TRANSFORM (1<<14)
201 
206 typedef void NvMediaVideoMixer;
207 
210 typedef enum {
218 
221 typedef enum {
229 
241  NvMediaVersion *version
242 );
243 
273 NvMediaVideoMixer *
275  NvMediaDevice *device,
276  NvMediaSurfaceType surfaceType,
277  uint16_t mixerWidth,
278  uint16_t mixerHeight,
279  float_t sourceAspectRatio,
280  uint16_t videoWidth,
281  uint16_t videoHeight,
282  uint32_t features
283 );
284 
289 void
291  NvMediaVideoMixer *mixer
292 );
293 
297 typedef struct {
302  float_t brightness;
307  float_t contrast;
312  float_t saturation;
317  float_t hue;
338  float_t noiseReduction;
356  float_t sharpening;
406 
431 void
433  NvMediaVideoMixer *mixer,
434  uint32_t attributeMask,
435  NvMediaVideoMixerAttributes *attributes
436 );
437 
441 typedef struct {
445 
449 typedef struct {
465 
469 typedef struct {
477 
483 
500  NvMediaVideoMixer *mixer,
501  NvMediaVideoSurface *outputSurface,
502  NvMediaBackground *background,
503  NvMediaVideoDesc *video
504 );
505 
533  NvMediaVideoMixer *mixer,
534  NvMediaVideoSurface *outputSurface,
535  NvMediaBackground *background,
536  NvMediaVideoDesc *video,
537  NvMediaAlphaSurface *alpha
538 );
539 
542 /*
543  * \defgroup history_nvmedia_vmp History
544  * Provides change history for the NvMedia Video Mixer API.
545  *
546  * \section history_nvmedia_vmp Version History
547  *
548  * <b> Version 1.0 </b> March 21, 2017
549  * - Initial release
550  *
551  * <b> Version 2.0 </b> May 17, 2017
552  * - Removed NvMediaVideoMixerRender and NvMediaVideoMixerRenderWithAlpha functions
553  * - Removed multi-layer rendering
554  * - Removed secondary video and graphics layer support
555  * - Added NvMediaVideoMixerGetVersion function
556  * - Added destination surface transformation
557  * - Changed NvMediaVideoMixer function definition
558  * - All NvMedia data types are moved to standard data types
559  *
560  * <b> Version 2.1 </b> September 7, 2017
561  * - Added feature \ref NVMEDIA_VMP_FEATURE_ENABLE_DFS to enable DFS for mixer
562  * hardware block
563  *
564  * <b> Version 2.2 </b> March 16, 2018
565  * - Move \ref NvMediaNoiseReductionAlgorithm structure definition to nvmedia_common.h header file
566  */
567 
568 
569 #ifdef __cplusplus
570 }; /* extern "C" */
571 #endif
572 
573 #endif /* _NVMEDIA_VMP_H */
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
NvMediaBool premultiplyAlpha
Holds a flag that specifies to pre-multiply the output surface by the alpha channel.
Definition: nvmedia_vmp.h:390
NvMediaVideoSurface * previous2
Frame/field prior to previous frame/field, NULL if unavailable.
Definition: nvmedia_vmp.h:459
NvMediaStatus NvMediaVideoMixerRenderSurface(NvMediaVideoMixer *mixer, NvMediaVideoSurface *outputSurface, NvMediaBackground *background, NvMediaVideoDesc *video)
Performs a video post-processing and compositing operation to a surface.
NvMediaRect * srcRect
Holds the source rectangle.
Definition: nvmedia_vmp.h:481
Video descriptor for video mixing.
Definition: nvmedia_vmp.h:449
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
NvMediaNoiseReductionAlgorithm noiseReductionAlgorithm
Holds a Noise Reduction Algorithm, which must be one of the following:
Definition: nvmedia_vmp.h:350
float_t contrast
A value clamped to between 0.0 and 10.0, initialized to 1.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:307
NvMediaPictureStructure
Defines picture structure types.
Definition: nvmedia_vmp.h:221
Holds a constant RGBA color.
Definition: nvmedia_core.h:110
NvMediaBool inverseTelecine
A boolean initialized to NVMEDIA_FALSE at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:364
NvMediaNoiseReductionAlgorithm
Noise Reduction Algorithm.
void NvMediaVideoMixer
A handle representing a video mixer object.
Definition: nvmedia_vmp.h:206
Advanced2 deinterlacing.
Definition: nvmedia_vmp.h:216
Holds NvMedia Version information.
Definition: nvmedia_core.h:252
float_t saturation
A value clamped to between 0.0 and 10.0, initialized to 1.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:312
NVIDIA Media Interface: Common Types for Video/Image Encode/Decode
float_t noiseReduction
Holds a value confined to the range 0.0 to 1.0, initialized 0.0 at NvMediaVideoMixer creation...
Definition: nvmedia_vmp.h:338
NvMediaColorStandard
Defines color standards.
Definition: nvmedia_core.h:123
NvMediaVideoSurface * alphaSurface
Holds a pointer to the surface.
Definition: nvmedia_vmp.h:476
NvMediaFilterQuality filterQuality
Filter quality.
Definition: nvmedia_vmp.h:372
NVIDIA Media Interface: Core
The picture is a field, and is the bottom field of the surface.
Definition: nvmedia_vmp.h:225
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:199
void NvMediaVideoMixerSetAttributes(NvMediaVideoMixer *mixer, uint32_t attributeMask, NvMediaVideoMixerAttributes *attributes)
Sets NvMediaVideoMixer attributes.
NvMediaDeinterlaceType
Defines deinterlace types.
Definition: nvmedia_vmp.h:210
float_t brightness
A value clamped to between -1.0 and 1.0, initialized to 0.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:302
NvMediaTransform
Transformations.
NvMediaStatus NvMediaVideoMixerRenderSurfaceWithAlpha(NvMediaVideoMixer *mixer, NvMediaVideoSurface *outputSurface, NvMediaBackground *background, NvMediaVideoDesc *video, NvMediaAlphaSurface *alpha)
Performs post-processing and compositing with alpha channel replacement.
The picture is a field, and is the top field of the surface.
Definition: nvmedia_vmp.h:223
NvMediaRect * dstRect
Destination rectangle, If NULL, a rectangle the full size of the NvMediaVideoMixer is implied...
Definition: nvmedia_vmp.h:463
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:146
NvMediaDeinterlaceType deinterlaceType
Deintelacing type for input video.
Definition: nvmedia_vmp.h:332
NvMediaFilterQuality
Defines filter quality levels.
Holds video mixer attributes.
Definition: nvmedia_vmp.h:297
BOB deinterlacing.
Definition: nvmedia_vmp.h:212
NVIDIA Media Interface: Video Surface Processing
NvMediaColorStandard colorStandard
Color standard for input video.
Definition: nvmedia_vmp.h:325
NvMediaStatus NvMediaVideoMixerGetVersion(NvMediaVersion *version)
Returns the version information for the Video Mixer library.
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:305
Holds an Alpha Surface descriptor for video mixing.
Definition: nvmedia_vmp.h:469
void NvMediaVideoMixerDestroy(NvMediaVideoMixer *mixer)
Destroys a mixer created by NvMediaVideoMixerCreate.
float_t sharpening
A value confined to the range 0.0 and 1.0, initialized 0.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:356
float_t hue
A value clamped to between -PI and PI, initialized to 0.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:317
NvMediaTransform dstTransform
Specifies one of the destination transformation:
Definition: nvmedia_vmp.h:404
NvMediaVideoSurface * previous
Frame/field prior to the current frame/field, NULL if unavailable.
Definition: nvmedia_vmp.h:457
Advanced1 deinterlacing.
Definition: nvmedia_vmp.h:214
NVIDIA Media Interface: Video Output Processing (VOP)
NvMediaPictureStructure pictureStructure
Picture structure.
Definition: nvmedia_vmp.h:451
NvMediaColor backgroundColor
Background color.
Definition: nvmedia_vmp.h:443
Background descriptor for video mixing.
Definition: nvmedia_vmp.h:441
The picture is a frame, and hence is the entire surface.
Definition: nvmedia_vmp.h:227
NvMediaVideoSurface * current
Current frame/field.
Definition: nvmedia_vmp.h:455
A handle representing a video surface object.
Definition: nvmedia_video.h:58
float_t destinationAlpha
Holds a value confined to the range 0.0 and 1.0.
Definition: nvmedia_vmp.h:378
NvMediaRect * srcRect
Source rectangle, If NULL, a rectangle the full size of the NvMediaVideoSurface is implied...
Definition: nvmedia_vmp.h:461
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...
NvMediaVideoSurface * next
Frame/field that follow the current frame/field, NULL if unavailable.
Definition: nvmedia_vmp.h:453