NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_vmp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, 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 1
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 
232 typedef enum {
248 
260  NvMediaVersion *version
261 );
262 
292 NvMediaVideoMixer *
294  NvMediaDevice *device,
295  NvMediaSurfaceType surfaceType,
296  uint16_t mixerWidth,
297  uint16_t mixerHeight,
298  float_t sourceAspectRatio,
299  uint16_t videoWidth,
300  uint16_t videoHeight,
301  uint32_t features
302 );
303 
308 void
310  NvMediaVideoMixer *mixer
311 );
312 
316 typedef struct {
321  float_t brightness;
326  float_t contrast;
331  float_t saturation;
336  float_t hue;
357  float_t noiseReduction;
375  float_t sharpening;
424 
449 void
451  NvMediaVideoMixer *mixer,
452  uint32_t attributeMask,
453  NvMediaVideoMixerAttributes *attributes
454 );
455 
459 typedef struct {
463 
467 typedef struct {
483 
487 typedef struct {
495 
501 
518  NvMediaVideoMixer *mixer,
519  NvMediaVideoSurface *outputSurface,
520  NvMediaBackground *background,
521  NvMediaVideoDesc *video
522 );
523 
551  NvMediaVideoMixer *mixer,
552  NvMediaVideoSurface *outputSurface,
553  NvMediaBackground *background,
554  NvMediaVideoDesc *video,
555  NvMediaAlphaSurface *alpha
556 );
557 
560 /*
561  * \defgroup history_nvmedia_vmp History
562  * Provides change history for the NvMedia Video Mixer API.
563  *
564  * \section history_nvmedia_vmp Version History
565  *
566  * <b> Version 1.0 </b> March 21, 2017
567  * - Initial release
568  *
569  * <b> Version 2.0 </b> May 17, 2017
570  * - Removed NvMediaVideoMixerRender and NvMediaVideoMixerRenderWithAlpha functions
571  * - Removed multi-layer rendering
572  * - Removed secondary video and graphics layer support
573  * - Added NvMediaVideoMixerGetVersion function
574  * - Added destination surface transformation
575  * - Changed NvMediaVideoMixer function definition
576  * - All NvMedia data types are moved to standard data types
577  *
578  * <b> Version 2.1 </b> September 7, 2017
579  * - Added feature \ref NVMEDIA_VMP_FEATURE_ENABLE_DFS to enable DFS for mixer
580  * hardware block
581  */
582 
583 #ifdef __cplusplus
584 }; /* extern "C" */
585 #endif
586 
587 #endif /* _NVMEDIA_VMP_H */
Noise reduction algorithm for outdoor high light condition.
Definition: nvmedia_vmp.h:240
#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:409
NvMediaVideoSurface * previous2
Frame/field prior to previous frame/field, NULL if unavailable.
Definition: nvmedia_vmp.h:477
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:499
Video descriptor for video mixing.
Definition: nvmedia_vmp.h:467
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: NVMEDIA_NOISE_REDUCTION_ALGO...
Definition: nvmedia_vmp.h:369
float_t contrast
A value clamped to between 0.0 and 10.0, initialized to 1.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:326
Noise reduction algorithm for outdoor low light condition.
Definition: nvmedia_vmp.h:236
NvMediaPictureStructure
Defines picture structure types.
Definition: nvmedia_vmp.h:221
Noise reduction algorithm for indoor high light condition.
Definition: nvmedia_vmp.h:246
Holds a constant RGBA color.
Definition: nvmedia_core.h:99
NvMediaBool inverseTelecine
A boolean initialized to NVMEDIA_FALSE at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:383
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:231
float_t saturation
A value clamped to between 0.0 and 10.0, initialized to 1.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:331
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:357
Noise reduction algorithm for indoor medium light condition.
Definition: nvmedia_vmp.h:244
NvMediaColorStandard
Defines color standards.
Definition: nvmedia_core.h:112
NvMediaVideoSurface * alphaSurface
Holds a pointer to the surface.
Definition: nvmedia_vmp.h:494
Noise reduction algorithm for indoor low light condition.
Definition: nvmedia_vmp.h:242
NvMediaFilterQuality filterQuality
Filter quality.
Definition: nvmedia_vmp.h:391
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:178
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:321
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:481
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:135
NvMediaDeinterlaceType deinterlaceType
Deintelacing type for input video.
Definition: nvmedia_vmp.h:351
NvMediaFilterQuality
Defines filter quality levels.
Video mixer attributes.
Definition: nvmedia_vmp.h:316
BOB deinterlacing.
Definition: nvmedia_vmp.h:212
NVIDIA Media Interface: Video Surface Processing
NvMediaColorStandard colorStandard
Color standard for input video.
Definition: nvmedia_vmp.h:344
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:284
Holds an Alpha Surface descriptor for video mixing.
Definition: nvmedia_vmp.h:487
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:375
float_t hue
A value clamped to between -PI and PI, initialized to 0.0 at NvMediaVideoMixer creation.
Definition: nvmedia_vmp.h:336
NvMediaTransform dstTransform
Specifies one of the destination transformation: NVMEDIA_TRANSFORM_NONE NVMEDIA_TRANSFORM_ROTATE_...
Definition: nvmedia_vmp.h:422
Noise reduction algorithm for outdoor medium light condition.
Definition: nvmedia_vmp.h:238
NvMediaVideoSurface * previous
Frame/field prior to the current frame/field, NULL if unavailable.
Definition: nvmedia_vmp.h:475
Advanced1 deinterlacing.
Definition: nvmedia_vmp.h:214
NVIDIA Media Interface: Video Output Processing (VOP)
NvMediaPictureStructure pictureStructure
Picture structure.
Definition: nvmedia_vmp.h:469
NvMediaColor backgroundColor
Background color.
Definition: nvmedia_vmp.h:461
Background descriptor for video mixing.
Definition: nvmedia_vmp.h:459
The picture is a frame, and hence is the entire surface.
Definition: nvmedia_vmp.h:227
NvMediaNoiseReductionAlgorithm
Noise Reduction Algorithm.
Definition: nvmedia_vmp.h:232
NvMediaVideoSurface * current
Current frame/field.
Definition: nvmedia_vmp.h:473
Original (default) noise reduction algorithm.
Definition: nvmedia_vmp.h:234
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:397
NvMediaRect * srcRect
Source rectangle, If NULL, a rectangle the full size of the NvMediaVideoSurface is implied...
Definition: nvmedia_vmp.h:479
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:471