NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 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 9
39 
40 
46 typedef enum
47 {
57 
127 typedef enum
128 {
148 
149 /*---------------------------------------------------------*/
159 typedef enum
160 {
170 
177 typedef struct
178 {
188  uint32_t validFields;
192  uint32_t flags;
200 
206 typedef struct
207 {
208  /* Reserved for future use. */
209  uint32_t reserved[8];
211 
221  NvMediaVersion *version
222 );
223 
227 typedef struct NvMedia2D NvMedia2D;
228 
236 NvMedia2D *
238  NvMediaDevice *device
239 );
240 
247 void
249  NvMedia2D *i2d
250 );
251 
263  NvMedia2D *i2d
264 );
265 
373  const NvMedia2D *i2d,
374  const NvMediaImage *dstSurface,
375  const NvMediaRect *dstRect,
376  const NvMediaImage *srcSurface,
377  const NvMediaRect *srcRect,
378  const NvMedia2DBlitParameters *params,
379  NvMedia2DBlitParametersOut *paramsOut
380 );
381 
382 #if !NV_IS_SAFETY
383 
405  const NvMedia2D *i2d,
406  NvMediaImage *dstSurface,
407  uint32_t dstPlane,
408  NvMediaImage *srcSurface,
409  uint32_t srcPlane
410 );
411 
440  const NvMedia2D *i2d,
441  NvMediaImage *imageOdd,
442  NvMediaImage *imageEven,
443  NvMediaImage *outImage
444 );
445 #endif
446 
475  const NvMedia2D *i2d,
476  const NvMediaImage *image,
477  NvMediaAccessMode accessMode
478 );
479 
502  const NvMedia2D *i2d,
503  const NvMediaImage *image
504 );
505 
506 /*
507  * \defgroup history_nvmedia_2d History
508  * Provides change history for the NvMedia 2D API.
509  *
510  * \section history_nvmedia_2d Version History
511  *
512  * <b> Version 1.1 </b> February 1, 2016
513  * - Initial release
514  *
515  * <b> Version 1.2 </b> May 11, 2016
516  * - Added \ref NvMedia2DCheckVersion API
517  *
518  * <b> Version 1.3 </b> May 5, 2017
519  * - Removed compositing, blending and alpha related defines and structures
520  *
521  * <b> Version 2.0 </b> May 11, 2017
522  * - Deprecated NvMedia2DBlit API
523  * - Deprecated NvMedia2DCheckVersion API
524  * - Deprecated NvMedia2DColorStandard, NvMedia2DColorRange and
525  * NvMedia2DColorMatrix types
526  * - Added \ref NvMedia2DGetVersion API
527  *
528  * <b> Version 2.1 </b> May 17, 2017
529  * - Moved transformation to nvmedia_common.h
530  * - Renamed NvMedia2DTransform to \ref NvMediaTransform
531  *
532  * <b> Version 2.2 </b> September 4, 2018
533  * - Added deprecated warning message for \ref NvMedia2DCopyPlane,
534  * NvMedia2DWeave
535  * - Added APIs \ref NvMedia2DCopyPlaneNew, \ref NvMedia2DWeaveNew
536  *
537  * <b> Version 3.0 </b> October 30, 2018
538  * - Deprecated \ref NvMedia2DCopyPlane API
539  * - Deprecated \ref NvMedia2DWeave API
540  *
541  * <b> Version 3.1 </b> December 11, 2018
542  * - Fixed MISRA-C Rule 21.1 and 21.2 Violations
543  *
544  * <b> Version 3.2 </b> January 21, 2019
545  * - Moved \ref NvMediaTransform from nvmedia_common.h to this header
546  *
547  * <b> Version 3.3 </b> Feb 21, 2019
548  * - Changed \ref NvMedia2D type from void to struct
549  *
550  * <b> Version 3.4 </b> March 5, 2019
551  * - Fixed MISRA-C Rule 8.13 Violations
552  *
553  * <b> Version 3.5 </b> March 14, 2019
554  * - Removing NvMedia2DBlitFlags enum definition
555  * - updated \ref NvMedia2DBlitParametersOut structure definition
556  *
557  * <b> Version 3.6 </b> March 18, 2019
558  * - Added APIs \ref NvMedia2DImageRegister, \ref NvMedia2DImageUnRegister
559  *
560  * <b> Version 3.7 </b> March 22, 2019
561  * - Unnecessary header include nvmedia_common.h has been removed
562  *
563  * <b> Version 3.8 </b> May 18, 2020
564  * - Changes related to MISRA-C Rule 8.13 Violations fixes.
565  *
566  * <b> Version 3.9 </b> Nov 12, 2020
567  * - Improved comments and documentation
568  * - Introduce NvMedia2DDestroyEx, which returns an error unlike NvMedia2DDestroy
569  * - NvMedia2DDestroy is marked as deprecated
570  * - NVMEDIA_STATUS_UNDEFINED_STATE is returned
571  * instead of NVMEDIA_STATUS_BAD_PARAMETER if error happens
572  * after submit is started
573  *
574  */
577 #ifdef __cplusplus
578 }; /* extern "C" */
579 #endif
580 
581 #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:192
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:188
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:190
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
NvMedia2DDestroyEx
NvMediaStatus NvMedia2DDestroyEx(NvMedia2D *i2d)
Destroys a 2D object.
NvMedia2DBlitParametersOut
Holds additional values returned from a blit.
Definition: nvmedia_2d.h:206
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:195
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:198
NvMedia2D
struct NvMedia2D NvMedia2D
An opaque handle representing an NvMedia2D object.
Definition: nvmedia_2d.h:227
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().