NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.0 Release
For Test and Development only
nvmedia_2d.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2019, 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 
16 #ifndef NVMEDIA_2D_H
17 #define NVMEDIA_2D_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #include "nvmedia_core.h"
24 #include "nvmedia_image.h"
36 #define NVMEDIA_2D_VERSION_MAJOR 3
37 
38 #define NVMEDIA_2D_VERSION_MINOR 7
39 
40 
46 typedef enum
47 {
57 
127 typedef enum
128 {
148 
149 /*---------------------------------------------------------*/
159 typedef enum
160 {
170 
177 typedef struct
178 {
187  uint32_t validFields;
191  uint32_t flags;
199 
205 typedef struct
206 {
207  /* Reserved for future use. */
208  uint32_t reserved[8];
210 
220  NvMediaVersion *version
221 );
222 
226 typedef struct NvMedia2D NvMedia2D;
227 
235 NvMedia2D *
237  NvMediaDevice *device
238 );
239 
245 void
247  NvMedia2D *i2d
248 );
249 
297  const NvMedia2D *i2d,
298  NvMediaImage *dstSurface,
299  const NvMediaRect *dstRect,
300  NvMediaImage *srcSurface,
301  const NvMediaRect *srcRect,
302  const NvMedia2DBlitParameters *params,
303  NvMedia2DBlitParametersOut *paramsOut
304 );
305 
326  const NvMedia2D *i2d,
327  NvMediaImage *dstSurface,
328  uint32_t dstPlane,
329  NvMediaImage *srcSurface,
330  uint32_t srcPlane
331 );
332 
359  const NvMedia2D *i2d,
360  NvMediaImage *imageOdd,
361  NvMediaImage *imageEven,
362  NvMediaImage *outImage
363 );
364 
395  const NvMedia2D *i2d,
396  NvMediaImage *image,
397  NvMediaAccessMode accessMode
398 );
399 
420  const NvMedia2D *i2d,
421  NvMediaImage *image
422 );
423 
424 /*
425  * \defgroup history_nvmedia_2d History
426  * Provides change history for the NvMedia 2D API.
427  *
428  * \section history_nvmedia_2d Version History
429  *
430  * <b> Version 1.1 </b> February 1, 2016
431  * - Initial release
432  *
433  * <b> Version 1.2 </b> May 11, 2016
434  * - Added \ref NvMedia2DCheckVersion API
435  *
436  * <b> Version 1.3 </b> May 5, 2017
437  * - Removed compositing, blending and alpha related defines and structures
438  *
439  * <b> Version 2.0 </b> May 11, 2017
440  * - Deprecated NvMedia2DBlit API
441  * - Deprecated NvMedia2DCheckVersion API
442  * - Deprecated NvMedia2DColorStandard, NvMedia2DColorRange and
443  * NvMedia2DColorMatrix types
444  * - Added \ref NvMedia2DGetVersion API
445  *
446  * <b> Version 2.1 </b> May 17, 2017
447  * - Moved transformation to nvmedia_common.h
448  * - Renamed NvMedia2DTransform to \ref NvMediaTransform
449  *
450  * <b> Version 2.2 </b> September 4, 2018
451  * - Added deprecated warning message for \ref NvMedia2DCopyPlane,
452  * NvMedia2DWeave
453  * - Added APIs \ref NvMedia2DCopyPlaneNew, \ref NvMedia2DWeaveNew
454  *
455  * <b> Version 3.0 </b> October 30, 2018
456  * - Deprecated \ref NvMedia2DCopyPlane API
457  * - Deprecated \ref NvMedia2DWeave API
458  *
459  * <b> Version 3.1 </b> December 11, 2018
460  * - Fixed MISRA-C Rule 21.1 and 21.2 Violations
461  *
462  * <b> Version 3.2 </b> January 21, 2019
463  * - Moved \ref NvMediaTransform from nvmedia_common.h to this header
464  *
465  * <b> Version 3.3 </b> Feb 21, 2019
466  * - Changed \ref NvMedia2D type from void to struct
467  *
468  * <b> Version 3.4 </b> March 5, 2019
469  * - Fixed MISRA-C Rule 8.13 Violations
470  *
471  * <b> Version 3.5 </b> March 14, 2019
472  * - Removing NvMedia2DBlitFlags enum definition
473  * - updated \ref NvMedia2DBlitParametersOut structure definition
474  *
475  * <b> Version 3.6 </b> March 18, 2019
476  * - Added APIs \ref NvMedia2DImageRegister, \ref NvMedia2DImageUnRegister
477  *
478  * <b> Version 3.7 </b> March 22, 2019
479  * - Unnecessary header include nvmedia_common.h has been removed
480  */
483 #ifdef __cplusplus
484 }; /* extern "C" */
485 #endif
486 
487 #endif /* NVMEDIA_2D_H */
NVMEDIA_TRANSFORM_FLIP_VERTICAL
@ NVMEDIA_TRANSFORM_FLIP_VERTICAL
Specifies vertical mirroring.
Definition: nvmedia_2d.h:143
NvMedia2DBlitParameters::flags
uint32_t flags
Holds flags use to set NVMEDIA_2D_BLIT_PARAMS_FLAGS.
Definition: nvmedia_2d.h:191
NvMedia2DStretchFilter
NvMedia2DStretchFilter
Specifies filtering mode used for stretched blits.
Definition: nvmedia_2d.h:46
NVMEDIA_TRANSFORM_INV_TRANSPOSE
@ NVMEDIA_TRANSFORM_INV_TRANSPOSE
Specifies mirroring along a diagonal axis from top right to bottom left of the rectangular region.
Definition: nvmedia_2d.h:141
NVMEDIA_2D_BLIT_PARAMS_DST_TRANSFORM
@ NVMEDIA_2D_BLIT_PARAMS_DST_TRANSFORM
Specifies enabling use of destination transform.
Definition: nvmedia_2d.h:166
NvMedia2DImageUnRegister
NvMediaStatus NvMedia2DImageUnRegister(const NvMedia2D *i2d, NvMediaImage *image)
Unregisters an NvMediaImage registered with NvMedia2D by a call to NvMedia2DImageRegister().
NVMEDIA_2D_BLIT_PARAMS_FILTER
@ NVMEDIA_2D_BLIT_PARAMS_FILTER
Specifies enable use of stretch filter.
Definition: nvmedia_2d.h:162
NvMedia2DCreate
NvMedia2D * NvMedia2DCreate(NvMediaDevice *device)
Creates a 2D object.
NvMedia2DBlitParameters::validFields
uint32_t validFields
Holds flags which determine which fields in this structure are used.
Definition: nvmedia_2d.h:187
NvMedia2DCopyPlaneNew
NvMediaStatus NvMedia2DCopyPlaneNew(const NvMedia2D *i2d, NvMediaImage *dstSurface, uint32_t dstPlane, NvMediaImage *srcSurface, uint32_t srcPlane)
Copies a plane of a YUV image to another YUV image.
NvMediaDevice
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:348
NVMEDIA_2D_STRETCH_FILTER_HIGH
@ NVMEDIA_2D_STRETCH_FILTER_HIGH
Specifies enable the best quality filtering.
Definition: nvmedia_2d.h:55
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:237
NvMedia2DWeaveNew
NvMediaStatus NvMedia2DWeaveNew(const NvMedia2D *i2d, NvMediaImage *imageOdd, NvMediaImage *imageEven, NvMediaImage *outImage)
Performs an NvMedia2D weave operation on NvMedia images.
NVMEDIA_TRANSFORM_TRANSPOSE
@ NVMEDIA_TRANSFORM_TRANSPOSE
Specifies mirroring along a diagonal axis from top left to bottom right of the rectangular region.
Definition: nvmedia_2d.h:146
NvMediaImageRec
Holds a handle representing image objects.
Definition: nvmedia_image.h:71
NvMediaColorStandard
NvMediaColorStandard
Defines color standards.
Definition: nvmedia_core.h:108
NvMedia2DGetVersion
NvMediaStatus NvMedia2DGetVersion(NvMediaVersion *version)
Returns the version information for the NvMedia 2D library.
NvMedia2DDestroy
void NvMedia2DDestroy(NvMedia2D *i2d)
Destroys a 2D object.
NvMedia2DBlitParameters::filter
NvMedia2DStretchFilter filter
Holds the filter mode.
Definition: nvmedia_2d.h:189
NVMEDIA_TRANSFORM_ROTATE_270
@ NVMEDIA_TRANSFORM_ROTATE_270
Specifies rotation by 270 degrees.
Definition: nvmedia_2d.h:136
NvMediaTransform
NvMediaTransform
Defines transformations.
Definition: nvmedia_2d.h:127
NvMediaRect
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
nvmedia_core.h
NVIDIA Media Interface: Core
NvMedia2DBlitParametersOut
Holds additional values returned from a blit.
Definition: nvmedia_2d.h:205
NvMediaAccessMode
NvMediaAccessMode
Definition: nvmedia_core.h:299
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
NvMedia2DBlitParamField
NvMedia2DBlitParamField
Defines bit masks for NvMedia2DBlitParameters::validFields.
Definition: nvmedia_2d.h:159
NVMEDIA_TRANSFORM_ROTATE_180
@ NVMEDIA_TRANSFORM_ROTATE_180
Specifies rotation by 180 degrees.
Definition: nvmedia_2d.h:134
NvMedia2DBlitParameters::dstTransform
NvMediaTransform dstTransform
Holds destination transformation when NVMEDIA_2D_BLIT_PARAMS_DST_TRANSFORM is set.
Definition: nvmedia_2d.h:194
NVMEDIA_2D_STRETCH_FILTER_OFF
@ NVMEDIA_2D_STRETCH_FILTER_OFF
Specifies disable the horizontal and vertical filtering.
Definition: nvmedia_2d.h:49
NvMedia2DImageRegister
NvMediaStatus NvMedia2DImageRegister(const NvMedia2D *i2d, NvMediaImage *image, NvMediaAccessMode accessMode)
Registers an NvMediaImage for use with an NvMedia2D handle.
NvMedia2DBlitParameters
Holds the additional parameters for a blit.
Definition: nvmedia_2d.h:177
NVMEDIA_2D_BLIT_PARAMS_FLAGS
@ NVMEDIA_2D_BLIT_PARAMS_FLAGS
Specifies enabling use of blit flags.
Definition: nvmedia_2d.h:164
NvMedia2DBlitParameters::colorStandard
NvMediaColorStandard colorStandard
Holds the color space conversion standard when NVMEDIA_2D_BLIT_PARAMS_COLOR_STD is set.
Definition: nvmedia_2d.h:197
NvMedia2D
struct NvMedia2D NvMedia2D
An opaque handle representing an NvMedia2D object.
Definition: nvmedia_2d.h:226
NVMEDIA_2D_BLIT_PARAMS_COLOR_STD
@ NVMEDIA_2D_BLIT_PARAMS_COLOR_STD
Specifies enabling use of color space conversion standard.
Definition: nvmedia_2d.h:168
NVMEDIA_TRANSFORM_FLIP_HORIZONTAL
@ NVMEDIA_TRANSFORM_FLIP_HORIZONTAL
Specifies horizontal mirroring.
Definition: nvmedia_2d.h:138
NVMEDIA_TRANSFORM_ROTATE_90
@ NVMEDIA_TRANSFORM_ROTATE_90
Specifies rotation by 90 degrees.
Definition: nvmedia_2d.h:132
NvMedia2DBlitEx
NvMediaStatus NvMedia2DBlitEx(const NvMedia2D *i2d, NvMediaImage *dstSurface, const NvMediaRect *dstRect, NvMediaImage *srcSurface, const NvMediaRect *srcRect, const NvMedia2DBlitParameters *params, NvMedia2DBlitParametersOut *paramsOut)
Performs a 2D blit operation with supplementary return values.
NVMEDIA_2D_STRETCH_FILTER_MEDIUM
@ NVMEDIA_2D_STRETCH_FILTER_MEDIUM
Specifies enable medium quality filtering.
Definition: nvmedia_2d.h:53
NVMEDIA_TRANSFORM_NONE
@ NVMEDIA_TRANSFORM_NONE
Specifies no transformation.
Definition: nvmedia_2d.h:130
nvmedia_image.h
NVIDIA Media Interface: Image Processing
NVMEDIA_2D_STRETCH_FILTER_LOW
@ NVMEDIA_2D_STRETCH_FILTER_LOW
Specifies enable low quality filtering.
Definition: nvmedia_2d.h:51