NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only
nvmedia_2d.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2020, 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 
355  const NvMedia2D *i2d,
356  const NvMediaImage *dstSurface,
357  const NvMediaRect *dstRect,
358  const NvMediaImage *srcSurface,
359  const NvMediaRect *srcRect,
360  const NvMedia2DBlitParameters *params,
361  NvMedia2DBlitParametersOut *paramsOut
362 );
363 
364 #if !NV_IS_SAFETY
365 
387  const NvMedia2D *i2d,
388  NvMediaImage *dstSurface,
389  uint32_t dstPlane,
390  NvMediaImage *srcSurface,
391  uint32_t srcPlane
392 );
393 
422  const NvMedia2D *i2d,
423  NvMediaImage *imageOdd,
424  NvMediaImage *imageEven,
425  NvMediaImage *outImage
426 );
427 #endif
428 
457  const NvMedia2D *i2d,
458  const NvMediaImage *image,
459  NvMediaAccessMode accessMode
460 );
461 
484  const NvMedia2D *i2d,
485  const NvMediaImage *image
486 );
487 
488 /*
489  * \defgroup history_nvmedia_2d History
490  * Provides change history for the NvMedia 2D API.
491  *
492  * \section history_nvmedia_2d Version History
493  *
494  * <b> Version 1.1 </b> February 1, 2016
495  * - Initial release
496  *
497  * <b> Version 1.2 </b> May 11, 2016
498  * - Added \ref NvMedia2DCheckVersion API
499  *
500  * <b> Version 1.3 </b> May 5, 2017
501  * - Removed compositing, blending and alpha related defines and structures
502  *
503  * <b> Version 2.0 </b> May 11, 2017
504  * - Deprecated NvMedia2DBlit API
505  * - Deprecated NvMedia2DCheckVersion API
506  * - Deprecated NvMedia2DColorStandard, NvMedia2DColorRange and
507  * NvMedia2DColorMatrix types
508  * - Added \ref NvMedia2DGetVersion API
509  *
510  * <b> Version 2.1 </b> May 17, 2017
511  * - Moved transformation to nvmedia_common.h
512  * - Renamed NvMedia2DTransform to \ref NvMediaTransform
513  *
514  * <b> Version 2.2 </b> September 4, 2018
515  * - Added deprecated warning message for \ref NvMedia2DCopyPlane,
516  * NvMedia2DWeave
517  * - Added APIs \ref NvMedia2DCopyPlaneNew, \ref NvMedia2DWeaveNew
518  *
519  * <b> Version 3.0 </b> October 30, 2018
520  * - Deprecated \ref NvMedia2DCopyPlane API
521  * - Deprecated \ref NvMedia2DWeave API
522  *
523  * <b> Version 3.1 </b> December 11, 2018
524  * - Fixed MISRA-C Rule 21.1 and 21.2 Violations
525  *
526  * <b> Version 3.2 </b> January 21, 2019
527  * - Moved \ref NvMediaTransform from nvmedia_common.h to this header
528  *
529  * <b> Version 3.3 </b> Feb 21, 2019
530  * - Changed \ref NvMedia2D type from void to struct
531  *
532  * <b> Version 3.4 </b> March 5, 2019
533  * - Fixed MISRA-C Rule 8.13 Violations
534  *
535  * <b> Version 3.5 </b> March 14, 2019
536  * - Removing NvMedia2DBlitFlags enum definition
537  * - updated \ref NvMedia2DBlitParametersOut structure definition
538  *
539  * <b> Version 3.6 </b> March 18, 2019
540  * - Added APIs \ref NvMedia2DImageRegister, \ref NvMedia2DImageUnRegister
541  *
542  * <b> Version 3.7 </b> March 22, 2019
543  * - Unnecessary header include nvmedia_common.h has been removed
544  *
545  * <b> Version 3.8 </b> May 18, 2020
546  * - Changes related to MISRA-C Rule 8.13 Violations fixes.
547  *
548  */
551 #ifdef __cplusplus
552 }; /* extern "C" */
553 #endif
554 
555 #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
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
NvMedia2DBlitEx
NvMediaStatus NvMedia2DBlitEx(const NvMedia2D *i2d, const NvMediaImage *dstSurface, const NvMediaRect *dstRect, const NvMediaImage *srcSurface, const NvMediaRect *srcRect, const NvMedia2DBlitParameters *params, NvMedia2DBlitParametersOut *paramsOut)
Performs a 2D blit operation with supplementary return values.
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
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
NvMedia2DImageRegister
NvMediaStatus NvMedia2DImageRegister(const NvMedia2D *i2d, const NvMediaImage *image, NvMediaAccessMode accessMode)
Registers an NvMediaImage for use with an NvMedia2D handle.
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
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
NvMedia2DImageUnRegister
NvMediaStatus NvMedia2DImageUnRegister(const NvMedia2D *i2d, const NvMediaImage *image)
Unregisters an NvMediaImage registered with NvMedia2D by a call to NvMedia2DImageRegister().