NVIDIA DRIVE OS Linux SDK API Reference

5.1.6.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Surface Handling API

Detailed Description

Defines and manages image and video surface objects.

NvMedia Surfaces are video RAM surfaces storing YUV, RGBA or RAW data. They can store one or more surfaces depending on the surface types.

Data Structures

struct  NvMediaSurfFormatAttr
 Holds NvMedia Surface format attributes. More...
 
struct  NvMediaSurfAllocAttr
 Holds NvMedia Surface allocation attributes. More...
 

Macros

#define NVMEDIA_SURFACE_VERSION_MAJOR   (1u)
 Major Version number. More...
 
#define NVMEDIA_SURFACE_VERSION_MINOR   (12u)
 Minor Version number. More...
 
#define NVM_SURF_ATTR_SURF_TYPE_YUV   (0x00000001u)
 NVM_SURF_ATTR_SURF_TYPE flags. More...
 
#define NVM_SURF_ATTR_SURF_TYPE_RGBA   (0x00000002u)
 RGBA surface type flag. More...
 
#define NVM_SURF_ATTR_SURF_TYPE_RAW   (0x00000003u)
 RAW surface type flag. More...
 
#define NVM_SURF_ATTR_LAYOUT_BL   (0x00000001u)
 NVM_SURF_ATTR_LAYOUT flags. More...
 
#define NVM_SURF_ATTR_LAYOUT_PL   (0x00000002u)
 Pitch Linear (PL) surface layout flag. More...
 
#define NVM_SURF_ATTR_DATA_TYPE_UINT   (0x00000001u)
 NVM_SURF_ATTR_DATA_TYPE flags. More...
 
#define NVM_SURF_ATTR_DATA_TYPE_INT   (0x00000002u)
 Integer surface data type flag. More...
 
#define NVM_SURF_ATTR_DATA_TYPE_FLOAT   (0x00000003u)
 Float surface data type flag. More...
 
#define NVM_SURF_ATTR_DATA_TYPE_FLOATISP   (0x00000004u)
 FloatISP surface data type flag. More...
 
#define NVM_SURF_ATTR_MEMORY_PLANAR   (0x00000001u)
 NVM_SURF_ATTR_MEMORY flags. More...
 
#define NVM_SURF_ATTR_MEMORY_SEMI_PLANAR   (0x00000002u)
 Semi-Planar surface memory type flag. More...
 
#define NVM_SURF_ATTR_MEMORY_PACKED   (0x00000003u)
 Packed surface memory type flag. More...
 
#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_420   (0x00000001u)
 NVM_SURF_ATTR_SUB_SAMPLING_TYPE flags for YUV surface types "R" indicates a transpose. More...
 
#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422   (0x00000002u)
 4:2:2 sub-sampling type flag More...
 
#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_444   (0x00000003u)
 4:4:4 sub-sampling type flag More...
 
#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422R   (0x00000004u)
 4:2:2 transposed sub-sampling type flag More...
 
#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE   (0x00000000u)
 sub-sampling type not applicable flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_8   (0x00000001u)
 NVM_SURF_ATTR_BITS_PER_COMPONENT flags If a layout is not specified, it is a uniform layout across components. More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_10   (0x00000002u)
 10-bit per component flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_12   (0x00000003u)
 12-bit per component flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_14   (0x00000004u)
 14-bit per component flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_16   (0x00000005u)
 16-bit per component flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_32   (0x00000006u)
 32-bit per component flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_16_8_8   (0x00000007u)
 16:8:8 bits per component layout flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_10_8_8   (0x00000008u)
 10:8:8 bits per component layout flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_2_10_10_10   (0x00000009u)
 2:10:10:10 bits per component layout flag More...
 
#define NVM_SURF_ATTR_BITS_PER_COMPONENT_20   (0x0000000Au)
 20-bit per component flag More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_LUMA   (0x00000001u)
 NVM_SURF_ATTR_COMPONENT_ORDER flags for YUV surface type. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_YUV   (0x00000002u)
 YUV component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_YVU   (0x00000003u)
 YVU component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_YUYV   (0x00000004u)
 YUYV component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_YVYU   (0x00000005u)
 YVYU component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_VYUY   (0x00000006u)
 VYUY component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_UYVY   (0x00000007u)
 UYVY component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_XUYV   (0x00000008u)
 XUYV component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_XYUV   (0x00000009u)
 XYUV component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_VUYX   (0x0000000Au)
 VUYX component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_ALPHA   (0x00000011u)
 NVM_SURF_ATTR_PIXEL_ORDER flags for RGBA surface type. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_RGBA   (0x00000012u)
 RGBA component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_ARGB   (0x00000013u)
 ARGB component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_BGRA   (0x00000014u)
 BGRA component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_RG   (0x00000015u)
 RG component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_RGGB   (0x00000021u)
 NVM_SURF_ATTR_PIXEL_ORDER flags for RAW surface type. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_BGGR   (0x00000022u)
 BGGR component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_GRBG   (0x00000023u)
 GRBG component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_GBRG   (0x00000024u)
 GBRG component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_RCCB   (0x00000025u)
 RCCB component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_BCCR   (0x00000026u)
 BCCR component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_CRBC   (0x00000027u)
 CRBC component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_CBRC   (0x00000028u)
 CBRC component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_RCCC   (0x00000029u)
 RCCC component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_CCCR   (0x0000002Au)
 CCCR component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_CRCC   (0x0000002Bu)
 CRCC component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_CCRC   (0x0000002Cu)
 CCRC component order flag. More...
 
#define NVM_SURF_ATTR_COMPONENT_ORDER_CCCC   (0x0000002Du)
 CCCC component order flag. More...
 
#define NVM_SURF_FMT_DEFINE_ATTR(x)
 A helper macro to define surface format attributes. More...
 
#define NVM_SURF_FMT_SET_ATTR_YUV(attr, order, samplingtype, memory, datatype, bpc, layout)
 A helper macro to set YUV surface format attributes. More...
 
#define NVM_SURF_FMT_SET_ATTR_RGBA(attr, order, datatype, bpc, layout)
 A helper macro to set RGBA surface format attributes. More...
 
#define NVM_SURF_FMT_SET_ATTR_RAW(attr, order, datatype, bpc, layout)
 A helper macro to set RAW surface format attributes. More...
 
#define NVM_SURF_ATTR_CPU_ACCESS_UNCACHED   (0x00000001u)
 NVM_SURF_ATTR_CPU_ACCESS flags. More...
 
#define NVM_SURF_ATTR_CPU_ACCESS_CACHED   (0x00000002u)
 Cached (mapped) access type flag. More...
 
#define NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED   (0x00000003u)
 Unmapped access type flag. More...
 
#define NVM_SURF_ATTR_ALLOC_ISOCHRONOUS   (0x00000001u)
 NVM_SURF_ATTR_ALLOC_TYPE flags. More...
 
#define NVM_SURF_ATTR_ALLOC_SECURED   (0x00000002u)
 Secured buffer allocation flag. More...
 
#define NVM_SURF_ATTR_SCAN_PROGRESSIVE   (0x00000001u)
 NVM_SURF_ATTR_SCAN_TYPE flags. More...
 
#define NVM_SURF_ATTR_SCAN_INTERLACED   (0x00000002u)
 Interlaced surface scan type flag. More...
 
#define NVM_SURF_ATTR_COLOR_STD_SRGB   (0x00000001u)
 NVM_SURF_ATTR_COLOR_STD_TYPE flags. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC601_SR   (0x00000002u)
 YCbCr Rec.601 (Studio Range) Color Std flag Range [Y:16-235 CbCr:16-240]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC601_ER   (0x00000003u)
 YCbCr Rec.601 (Extended Range) Color Std flag Range [YCbCr:0-255]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC709_SR   (0x00000004u)
 YCbCr Rec.709 (Studio Range) Color Std flag Range [Y:16-235 CbCr:16-240]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC709_ER   (0x00000005u)
 YCbCr Rec.709 (Extended Range) Color Std flag Range [YCbCr:0-255]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC2020_RGB   (0x00000006u)
 RGB Rec.2020 Color Std flag Range [RGB:0-1023 (10-bit), 0-4095 (12-bit), 0-65535(16-bit)]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC2020_SR   (0x00000007u)
 YCbCr Rec.2020 (Studio Range) Color Std flag Range [Y:64-940 CbCr:64-960 (10-bit), Y:256-3760 CbCr:256-3840 (12-bit), Y:1024-60160 CbCr:1024-61440(16-bit)]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC2020_ER   (0x00000008u)
 YCbCr Rec.2020 (Extended Range) Color Std flag Range [YCbCr:0-1023 (10-bit), 0-4095 (12-bit), 0-65535(16-bit)]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_YcCbcCrc_SR   (0x00000009u)
 YcCbcCrc Rec.2020 (Studio Range) Color Std flag Range [Y:64-940 CbCr:64-960 (10-bit), Y:256-3760 CbCr:256-3840 (12-bit), Y:1024-60160 CbCr:1024-61440(16-bit)]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_YcCbcCrc_ER   (0x0000000Au)
 YcCbcCrc Rec.2020 (Extended Range) Color Std flag Range [YCbCr:0-1023 (10-bit), 0-4095 (12-bit), 0-65535(16-bit)]. More...
 
#define NVM_SURF_ATTR_COLOR_STD_SENSOR_RGBA   (0x0000000Bu)
 Sensor RGBA Color Std flag This color std flag is used to represent demosaiced and white-balanced sensor bayer data in linear space. More...
 
#define NVM_SURF_ATTR_COLOR_STD_REC2020PQ_ER   (0x0000000Cu)
 YCbCr Rec.2020PQ (Extended Range) Color Std flag Range [YCbCr:0-65535 (16-bit)]. More...
 
#define NvMediaSurfaceType   uint32_t
 Defines the set of NvMedia surface types. More...
 
#define NvMediaSurfaceType_Video_420   (1000u)
 NOTE: The following surface type macros value are deprecated and they are going to be removed. More...
 
#define NvMediaSurfaceType_Video_420_10bit   (1001u)
 
#define NvMediaSurfaceType_Video_420_12bit   (1002u)
 
#define NvMediaSurfaceType_Video_422   (1003u)
 Obsolete Video surface for 4:2:2 format video decoders. More...
 
#define NvMediaSurfaceType_Video_422_10bit   (1004u)
 
#define NvMediaSurfaceType_Video_422_12bit   (1005u)
 
#define NvMediaSurfaceType_Video_444   (1006u)
 Obsolete Video surface for 4:4:4 format video decoders. More...
 
#define NvMediaSurfaceType_Video_444_10bit   (1007u)
 
#define NvMediaSurfaceType_Video_444_12bit   (1008u)
 
#define NvMediaSurfaceType_VideoCapture_422   (1009u)
 Obsolete Video capture surface for 4:2:2 format. More...
 
#define NvMediaSurfaceType_VideoCapture_YUYV_422   (1010u)
 Obsolete Video capture surface for YUYV format. More...
 
#define NvMediaSurfaceType_R8G8B8A8   (1011u)
 Obsolete R8G8B8A8 surface type. More...
 
#define NvMediaSurfaceType_R8G8B8A8_BottomOrigin   (1012u)
 Obsolete R8G8B8A8 surface type used for video rendering. More...
 
#define NvMediaSurfaceType_Image_Monochrome   (1013u)
 Obsolete Monochrome image. More...
 
#define NvMediaSurfaceType_Image_YUV_420   (1014u)
 Obsolete 4:2:0 format image. More...
 
#define NvMediaSurfaceType_Image_YUV_422   (1015u)
 Obsolete 4:2:2 format image. More...
 
#define NvMediaSurfaceType_Image_YUV_444   (1016u)
 Obsolete 4:4:4 format image. More...
 
#define NvMediaSurfaceType_Image_YUYV_422   (1017u)
 Obsolete 4:2:2 format packed image with YUYV component order. More...
 
#define NvMediaSurfaceType_Image_RGBA   (1018u)
 Obsolete RGBA image type. More...
 
#define NvMediaSurfaceType_Image_RAW   (1019u)
 Obsolete RAW image type. More...
 
#define NvMediaSurfaceType_Image_V16Y16U16X16   (1020u)
 Obsolete 4:4:4:4 format packed image with VYUX component order. More...
 
#define NvMediaSurfaceType_Image_Y16   (1021u)
 Obsolete 16-bit Y data image. More...
 
#define NvMediaSurfaceType_Image_X2U10Y10V10   (1022u)
 Obsolete 4:4:4:4 format packed image with XUYV component order. More...
 
#define NvMediaSurfaceType_Image_Y10U8V8_420   (1023u)
 Obsolete 4:2:0 semi-planar YUV. More...
 
#define NvMediaSurfaceType_Image_Y10   (1024u)
 Obsolete 10-bit Y data image. More...
 
#define NvMediaSurfaceType_A8   (1025u)
 Obsolete A8 alpha surface. More...
 
#define NvMediaSurfaceType_Unsupported   (99999u)
 Unsupported types. More...
 
#define NvMediaSurfaceType_YV12   NvMediaSurfaceType_Video_420
 Obsolete 4:2:0 video surface type. More...
 
#define NvMediaSurfaceType_YV16   NvMediaSurfaceType_Video_422
 Obsolete 4:2:2 video surface type. More...
 
#define NvMediaSurfaceType_YV24   NvMediaSurfaceType_Video_444
 Obsolete 4:4:4 video surface type. More...
 
#define NvMediaSurfaceType_YV16x2   NvMediaSurfaceType_VideoCapture_422
 Obsolete 4:2:2 video capture surface type. More...
 

Enumerations

enum  NvMediaSurfFormatAttrType {
  NVM_SURF_ATTR_SURF_TYPE = 0,
  NVM_SURF_ATTR_LAYOUT,
  NVM_SURF_ATTR_DATA_TYPE,
  NVM_SURF_ATTR_MEMORY,
  NVM_SURF_ATTR_SUB_SAMPLING_TYPE,
  NVM_SURF_ATTR_BITS_PER_COMPONENT,
  NVM_SURF_ATTR_COMPONENT_ORDER,
  NVM_SURF_FMT_ATTR_MAX
}
 Defines NvMedia Surface format attribute types. More...
 
enum  NvMediaSurfAllocAttrType {
  NVM_SURF_ATTR_WIDTH,
  NVM_SURF_ATTR_HEIGHT,
  NVM_SURF_ATTR_EMB_LINES_TOP,
  NVM_SURF_ATTR_EMB_LINES_BOTTOM,
  NVM_SURF_ATTR_CPU_ACCESS,
  NVM_SURF_ATTR_ALLOC_TYPE,
  NVM_SURF_ATTR_PEER_VM_ID,
  NVM_SURF_ATTR_SCAN_TYPE,
  NVM_SURF_ATTR_COLOR_STD_TYPE,
  NVM_SURF_ALLOC_ATTR_MAX
}
 Defines NvMedia Surface Allocation attribute types. More...
 

Functions

NvMediaSurfaceType NvMediaSurfaceFormatGetType (const NvMediaSurfFormatAttr *attrs, unsigned int numAttrs)
 Gets the NvMedia surface format type for the input surface format attributes. More...
 
NvMediaStatus NvMediaSurfaceFormatGetAttrs (NvMediaSurfaceType type, NvMediaSurfFormatAttr *attrs, unsigned int numAttrs)
 Gets NvMedia surface format attributes for the input surface type. More...
 
NvMediaStatus NvMediaSurfaceGetVersion (NvMediaVersion *version)
 Returns the version information for the NvMediaSurface component. More...
 

Macro Definition Documentation

#define NVM_SURF_ATTR_ALLOC_ISOCHRONOUS   (0x00000001u)

NVM_SURF_ATTR_ALLOC_TYPE flags.

Isochronous buffer allocation flag

Definition at line 380 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_ALLOC_SECURED   (0x00000002u)

Secured buffer allocation flag.

Definition at line 382 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_10   (0x00000002u)

10-bit per component flag

Definition at line 124 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_12   (0x00000003u)

12-bit per component flag

Definition at line 126 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_14   (0x00000004u)

14-bit per component flag

Definition at line 128 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_16   (0x00000005u)

16-bit per component flag

Definition at line 130 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_20   (0x0000000Au)

20-bit per component flag

Definition at line 141 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_32   (0x00000006u)

32-bit per component flag

Definition at line 132 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_8   (0x00000001u)

NVM_SURF_ATTR_BITS_PER_COMPONENT flags If a layout is not specified, it is a uniform layout across components.

8-bit per component flag

Definition at line 122 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_10_8_8   (0x00000008u)

10:8:8 bits per component layout flag

Definition at line 137 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_16_8_8   (0x00000007u)

16:8:8 bits per component layout flag

Definition at line 135 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_2_10_10_10   (0x00000009u)

2:10:10:10 bits per component layout flag

Definition at line 139 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC2020_ER   (0x00000008u)

YCbCr Rec.2020 (Extended Range) Color Std flag Range [YCbCr:0-1023 (10-bit), 0-4095 (12-bit), 0-65535(16-bit)].

Definition at line 430 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC2020_RGB   (0x00000006u)

RGB Rec.2020 Color Std flag Range [RGB:0-1023 (10-bit), 0-4095 (12-bit), 0-65535(16-bit)].

Definition at line 418 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC2020_SR   (0x00000007u)

YCbCr Rec.2020 (Studio Range) Color Std flag Range [Y:64-940 CbCr:64-960 (10-bit), Y:256-3760 CbCr:256-3840 (12-bit), Y:1024-60160 CbCr:1024-61440(16-bit)].

Definition at line 424 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC2020PQ_ER   (0x0000000Cu)

YCbCr Rec.2020PQ (Extended Range) Color Std flag Range [YCbCr:0-65535 (16-bit)].

Definition at line 455 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC601_ER   (0x00000003u)

YCbCr Rec.601 (Extended Range) Color Std flag Range [YCbCr:0-255].

Definition at line 404 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC601_SR   (0x00000002u)

YCbCr Rec.601 (Studio Range) Color Std flag Range [Y:16-235 CbCr:16-240].

Definition at line 400 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC709_ER   (0x00000005u)

YCbCr Rec.709 (Extended Range) Color Std flag Range [YCbCr:0-255].

Definition at line 412 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_REC709_SR   (0x00000004u)

YCbCr Rec.709 (Studio Range) Color Std flag Range [Y:16-235 CbCr:16-240].

Definition at line 408 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_SENSOR_RGBA   (0x0000000Bu)

Sensor RGBA Color Std flag This color std flag is used to represent demosaiced and white-balanced sensor bayer data in linear space.

Range [RGBA: 0.0 -1.0 (16-bit float)]

Definition at line 450 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_SRGB   (0x00000001u)

NVM_SURF_ATTR_COLOR_STD_TYPE flags.

sRGB Color Std flag Range [RGB:0-255]

Definition at line 396 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_YcCbcCrc_ER   (0x0000000Au)

YcCbcCrc Rec.2020 (Extended Range) Color Std flag Range [YCbCr:0-1023 (10-bit), 0-4095 (12-bit), 0-65535(16-bit)].

Definition at line 442 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COLOR_STD_YcCbcCrc_SR   (0x00000009u)

YcCbcCrc Rec.2020 (Studio Range) Color Std flag Range [Y:64-940 CbCr:64-960 (10-bit), Y:256-3760 CbCr:256-3840 (12-bit), Y:1024-60160 CbCr:1024-61440(16-bit)].

Definition at line 436 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_ALPHA   (0x00000011u)

NVM_SURF_ATTR_PIXEL_ORDER flags for RGBA surface type.

Alpha component order flag

Definition at line 167 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_ARGB   (0x00000013u)

ARGB component order flag.

Definition at line 171 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_BCCR   (0x00000026u)

BCCR component order flag.

Definition at line 190 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_BGGR   (0x00000022u)

BGGR component order flag.

Definition at line 181 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_BGRA   (0x00000014u)

BGRA component order flag.

Definition at line 173 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_CBRC   (0x00000028u)

CBRC component order flag.

Definition at line 194 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_CCCC   (0x0000002Du)

CCCC component order flag.

Definition at line 206 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_CCCR   (0x0000002Au)

CCCR component order flag.

Definition at line 199 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_CCRC   (0x0000002Cu)

CCRC component order flag.

Definition at line 203 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_CRBC   (0x00000027u)

CRBC component order flag.

Definition at line 192 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_CRCC   (0x0000002Bu)

CRCC component order flag.

Definition at line 201 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_GBRG   (0x00000024u)

GBRG component order flag.

Definition at line 185 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_GRBG   (0x00000023u)

GRBG component order flag.

Definition at line 183 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_LUMA   (0x00000001u)

NVM_SURF_ATTR_COMPONENT_ORDER flags for YUV surface type.

Luma component order flag

Definition at line 145 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_RCCB   (0x00000025u)

RCCB component order flag.

Definition at line 188 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_RCCC   (0x00000029u)

RCCC component order flag.

Definition at line 197 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_RG   (0x00000015u)

RG component order flag.

Definition at line 175 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_RGBA   (0x00000012u)

RGBA component order flag.

Definition at line 169 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_RGGB   (0x00000021u)

NVM_SURF_ATTR_PIXEL_ORDER flags for RAW surface type.

RGGB component order flag

Definition at line 179 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_UYVY   (0x00000007u)

UYVY component order flag.

Definition at line 157 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_VUYX   (0x0000000Au)

VUYX component order flag.

Definition at line 163 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_VYUY   (0x00000006u)

VYUY component order flag.

Definition at line 155 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_XUYV   (0x00000008u)

XUYV component order flag.

Definition at line 159 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_XYUV   (0x00000009u)

XYUV component order flag.

Definition at line 161 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_YUV   (0x00000002u)

YUV component order flag.

Definition at line 147 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_YUYV   (0x00000004u)

YUYV component order flag.

Definition at line 151 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_YVU   (0x00000003u)

YVU component order flag.

Definition at line 149 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_COMPONENT_ORDER_YVYU   (0x00000005u)

YVYU component order flag.

Definition at line 153 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_CPU_ACCESS_CACHED   (0x00000002u)

Cached (mapped) access type flag.

Definition at line 373 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_CPU_ACCESS_UNCACHED   (0x00000001u)

NVM_SURF_ATTR_CPU_ACCESS flags.

Uncached (mapped) access type flag

Definition at line 371 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED   (0x00000003u)

Unmapped access type flag.

Definition at line 375 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_DATA_TYPE_FLOAT   (0x00000003u)

Float surface data type flag.

Definition at line 92 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_DATA_TYPE_FLOATISP   (0x00000004u)

FloatISP surface data type flag.

Definition at line 94 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_DATA_TYPE_INT   (0x00000002u)

Integer surface data type flag.

Definition at line 90 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_DATA_TYPE_UINT   (0x00000001u)

NVM_SURF_ATTR_DATA_TYPE flags.

Unsigned Integer surface data type flag

Definition at line 88 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_LAYOUT_BL   (0x00000001u)

NVM_SURF_ATTR_LAYOUT flags.

Block Linear (BL) surface layout flag

Definition at line 82 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_LAYOUT_PL   (0x00000002u)

Pitch Linear (PL) surface layout flag.

Definition at line 84 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_MEMORY_PACKED   (0x00000003u)

Packed surface memory type flag.

Definition at line 102 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_MEMORY_PLANAR   (0x00000001u)

NVM_SURF_ATTR_MEMORY flags.

Planar surface memory type flag

Definition at line 98 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_MEMORY_SEMI_PLANAR   (0x00000002u)

Semi-Planar surface memory type flag.

Definition at line 100 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SCAN_INTERLACED   (0x00000002u)

Interlaced surface scan type flag.

Definition at line 389 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SCAN_PROGRESSIVE   (0x00000001u)

NVM_SURF_ATTR_SCAN_TYPE flags.

Progressive surface scan type flag

Definition at line 387 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_420   (0x00000001u)

NVM_SURF_ATTR_SUB_SAMPLING_TYPE flags for YUV surface types "R" indicates a transpose.

4:2:0 sub-sampling type flag

Definition at line 108 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422   (0x00000002u)

4:2:2 sub-sampling type flag

Definition at line 110 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422R   (0x00000004u)

4:2:2 transposed sub-sampling type flag

Definition at line 114 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_444   (0x00000003u)

4:4:4 sub-sampling type flag

Definition at line 112 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE   (0x00000000u)

sub-sampling type not applicable flag

Definition at line 116 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SURF_TYPE_RAW   (0x00000003u)

RAW surface type flag.

Definition at line 78 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SURF_TYPE_RGBA   (0x00000002u)

RGBA surface type flag.

Definition at line 76 of file nvmedia_surface.h.

#define NVM_SURF_ATTR_SURF_TYPE_YUV   (0x00000001u)

NVM_SURF_ATTR_SURF_TYPE flags.

YUV surface type flag

Definition at line 74 of file nvmedia_surface.h.

#define NVM_SURF_FMT_DEFINE_ATTR (   x)
Value:
{ \
.value = 0, \
}, \
{ \
.value = 0, \
}, \
{ \
.value = 0, \
}, \
{ \
.value = 0, \
}, \
{ \
.value = 0, \
}, \
{ \
.value = 0, \
}, \
{ \
.value = 0, \
}, \
}; \
! Surface type flags.
NvMediaSurfFormatAttrType type
Surface Format Attribute Type.
! Surface layout type flags.
! Bits per component flags.
Holds NvMedia Surface format attributes.
! Surface sub sampling type flags.
! Pixel order flags.
! Surface memory type flags.
! Surface data type flags.

A helper macro to define surface format attributes.

Definition at line 221 of file nvmedia_surface.h.

#define NVM_SURF_FMT_SET_ATTR_RAW (   attr,
  order,
  datatype,
  bpc,
  layout 
)
Value:
{ \
attr[0].type = NVM_SURF_ATTR_SURF_TYPE; \
attr[0].value = NVM_SURF_ATTR_SURF_TYPE_RAW; \
\
attr[1].type = NVM_SURF_ATTR_LAYOUT; \
attr[1].value = NVM_SURF_ATTR_LAYOUT_##layout; \
\
attr[2].type = NVM_SURF_ATTR_DATA_TYPE; \
attr[2].value = NVM_SURF_ATTR_DATA_TYPE_##datatype; \
\
attr[3].type = NVM_SURF_ATTR_MEMORY; \
attr[3].value = NVM_SURF_ATTR_MEMORY_PACKED; \
\
attr[4].value = 0; \
\
attr[5].value = NVM_SURF_ATTR_BITS_PER_COMPONENT_##bpc; \
\
attr[6].value = NVM_SURF_ATTR_COMPONENT_ORDER_##order; \
}
! Surface type flags.
#define NVM_SURF_ATTR_SURF_TYPE_RAW
RAW surface type flag.
#define NVM_SURF_ATTR_MEMORY_PACKED
Packed surface memory type flag.
! Surface layout type flags.
! Bits per component flags.
! Surface sub sampling type flags.
! Pixel order flags.
! Surface memory type flags.
! Surface data type flags.

A helper macro to set RAW surface format attributes.

Before setting the values, use NVM_SURF_FMT_SET_ATTR_RAW to define attr.

Definition at line 315 of file nvmedia_surface.h.

#define NVM_SURF_FMT_SET_ATTR_RGBA (   attr,
  order,
  datatype,
  bpc,
  layout 
)
Value:
{ \
attr[0].type = NVM_SURF_ATTR_SURF_TYPE; \
attr[0].value = NVM_SURF_ATTR_SURF_TYPE_RGBA; \
\
attr[1].type = NVM_SURF_ATTR_LAYOUT; \
attr[1].value = NVM_SURF_ATTR_LAYOUT_##layout; \
\
attr[2].type = NVM_SURF_ATTR_DATA_TYPE; \
attr[2].value = NVM_SURF_ATTR_DATA_TYPE_##datatype; \
\
attr[3].type = NVM_SURF_ATTR_MEMORY; \
attr[3].value = NVM_SURF_ATTR_MEMORY_PACKED; \
\
attr[4].value = 0; \
\
attr[5].value = NVM_SURF_ATTR_BITS_PER_COMPONENT_##bpc; \
\
attr[6].value = NVM_SURF_ATTR_COMPONENT_ORDER_##order; \
}
! Surface type flags.
#define NVM_SURF_ATTR_MEMORY_PACKED
Packed surface memory type flag.
! Surface layout type flags.
! Bits per component flags.
! Surface sub sampling type flags.
! Pixel order flags.
! Surface memory type flags.
! Surface data type flags.
#define NVM_SURF_ATTR_SURF_TYPE_RGBA
RGBA surface type flag.

A helper macro to set RGBA surface format attributes.

attr paramater must be defined before setting the values using NVM_SURF_FMT_SET_ATTR_RGBA

Definition at line 287 of file nvmedia_surface.h.

#define NVM_SURF_FMT_SET_ATTR_YUV (   attr,
  order,
  samplingtype,
  memory,
  datatype,
  bpc,
  layout 
)
Value:
{ \
attr[0].type = NVM_SURF_ATTR_SURF_TYPE; \
attr[0].value = NVM_SURF_ATTR_SURF_TYPE_YUV; \
\
attr[1].type = NVM_SURF_ATTR_LAYOUT; \
attr[1].value = NVM_SURF_ATTR_LAYOUT_##layout; \
\
attr[2].type = NVM_SURF_ATTR_DATA_TYPE; \
attr[2].value = NVM_SURF_ATTR_DATA_TYPE_##datatype; \
\
attr[3].type = NVM_SURF_ATTR_MEMORY; \
attr[3].value = NVM_SURF_ATTR_MEMORY_##memory; \
\
attr[4].value = NVM_SURF_ATTR_SUB_SAMPLING_TYPE_##samplingtype; \
\
attr[5].value = NVM_SURF_ATTR_BITS_PER_COMPONENT_##bpc; \
\
attr[6].value = NVM_SURF_ATTR_COMPONENT_ORDER_##order; \
}
! Surface type flags.
! Surface layout type flags.
#define NVM_SURF_ATTR_SURF_TYPE_YUV
NVM_SURF_ATTR_SURF_TYPE flags.
! Bits per component flags.
! Surface sub sampling type flags.
! Pixel order flags.
! Surface memory type flags.
! Surface data type flags.

A helper macro to set YUV surface format attributes.

attr paramater must be defined before setting the values using NVM_SURF_FMT_SET_ATTR_YUV For NVM_SURF_ATTR_COMPONENT_ORDER_XUYV and NVM_SURF_ATTR_COMPONENT_ORDER_LUMA, set sampling type to be NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE

Definition at line 259 of file nvmedia_surface.h.

#define NVMEDIA_SURFACE_VERSION_MAJOR   (1u)

Major Version number.

Definition at line 46 of file nvmedia_surface.h.

#define NVMEDIA_SURFACE_VERSION_MINOR   (12u)

Minor Version number.

Definition at line 48 of file nvmedia_surface.h.

#define NvMediaSurfaceType   uint32_t

Defines the set of NvMedia surface types.

Definition at line 470 of file nvmedia_surface.h.

#define NvMediaSurfaceType_A8   (1025u)

Obsolete A8 alpha surface.

Definition at line 532 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_Monochrome   (1013u)

Obsolete Monochrome image.

Definition at line 508 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_RAW   (1019u)

Obsolete RAW image type.

Definition at line 520 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_RGBA   (1018u)

Obsolete RGBA image type.

Definition at line 518 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_V16Y16U16X16   (1020u)

Obsolete 4:4:4:4 format packed image with VYUX component order.

Definition at line 522 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_X2U10Y10V10   (1022u)

Obsolete 4:4:4:4 format packed image with XUYV component order.

Definition at line 526 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_Y10   (1024u)

Obsolete 10-bit Y data image.

Definition at line 530 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_Y10U8V8_420   (1023u)

Obsolete 4:2:0 semi-planar YUV.

Definition at line 528 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_Y16   (1021u)

Obsolete 16-bit Y data image.

Definition at line 524 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_YUV_420   (1014u)

Obsolete 4:2:0 format image.

Definition at line 510 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_YUV_422   (1015u)

Obsolete 4:2:2 format image.

Definition at line 512 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_YUV_444   (1016u)

Obsolete 4:4:4 format image.

Definition at line 514 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Image_YUYV_422   (1017u)

Obsolete 4:2:2 format packed image with YUYV component order.

Definition at line 516 of file nvmedia_surface.h.

#define NvMediaSurfaceType_R8G8B8A8   (1011u)

Obsolete R8G8B8A8 surface type.

Definition at line 502 of file nvmedia_surface.h.

#define NvMediaSurfaceType_R8G8B8A8_BottomOrigin   (1012u)

Obsolete R8G8B8A8 surface type used for video rendering.

Surfaces that are interacting with EGL Stream functions must be in this format.

Definition at line 506 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Unsupported   (99999u)

Unsupported types.

Definition at line 534 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_420   (1000u)

NOTE: The following surface type macros value are deprecated and they are going to be removed.

Hence the user is expected to not use these macros and get the surface type using the NvMediaSurfaceFormatGetType api Obsolete Video surface for 4:2:0 format video decoders. The actual physical surface format is selected based on the chip architecture.

Definition at line 482 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_420_10bit   (1001u)

Definition at line 483 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_420_12bit   (1002u)

Definition at line 484 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_422   (1003u)

Obsolete Video surface for 4:2:2 format video decoders.

The actual physical surface format is selected based on the chip architecture.

Definition at line 488 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_422_10bit   (1004u)

Definition at line 489 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_422_12bit   (1005u)

Definition at line 490 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_444   (1006u)

Obsolete Video surface for 4:4:4 format video decoders.

The actual physical surface format is selected based on the chip architecture.

Definition at line 494 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_444_10bit   (1007u)

Definition at line 495 of file nvmedia_surface.h.

#define NvMediaSurfaceType_Video_444_12bit   (1008u)

Definition at line 496 of file nvmedia_surface.h.

#define NvMediaSurfaceType_VideoCapture_422   (1009u)

Obsolete Video capture surface for 4:2:2 format.

Definition at line 498 of file nvmedia_surface.h.

#define NvMediaSurfaceType_VideoCapture_YUYV_422   (1010u)

Obsolete Video capture surface for YUYV format.

Definition at line 500 of file nvmedia_surface.h.

#define NvMediaSurfaceType_YV12   NvMediaSurfaceType_Video_420

Obsolete 4:2:0 video surface type.

Definition at line 537 of file nvmedia_surface.h.

#define NvMediaSurfaceType_YV16   NvMediaSurfaceType_Video_422

Obsolete 4:2:2 video surface type.

Definition at line 539 of file nvmedia_surface.h.

#define NvMediaSurfaceType_YV16x2   NvMediaSurfaceType_VideoCapture_422

Obsolete 4:2:2 video capture surface type.

Definition at line 543 of file nvmedia_surface.h.

#define NvMediaSurfaceType_YV24   NvMediaSurfaceType_Video_444

Obsolete 4:4:4 video surface type.

Definition at line 541 of file nvmedia_surface.h.

Enumeration Type Documentation

Defines NvMedia Surface Allocation attribute types.

Enumerator
NVM_SURF_ATTR_WIDTH 

! Surface width

NVM_SURF_ATTR_HEIGHT 

! Surface height (excluding embedded data lines)

NVM_SURF_ATTR_EMB_LINES_TOP 

! Embedded lines top

NVM_SURF_ATTR_EMB_LINES_BOTTOM 

! Embedded lines bottom

NVM_SURF_ATTR_CPU_ACCESS 

! CPU access to surface flags (default: uncached)

NVM_SURF_ATTR_ALLOC_TYPE 

! Allocation type, isochronous or secured (default: none)

NVM_SURF_ATTR_PEER_VM_ID 

! Peer VM ID in case of shared buffers

NVM_SURF_ATTR_SCAN_TYPE 

! Surface scan type (default: Progressive)

NVM_SURF_ATTR_COLOR_STD_TYPE 

! Color Standard type (default: YCbCr Rec.601 (Extended Range) for YUV surface types, sRGB for RGB surface types)

NVM_SURF_ALLOC_ATTR_MAX 

! Maximum number of surface allocation attributes

Definition at line 342 of file nvmedia_surface.h.

Defines NvMedia Surface format attribute types.

Enumerator
NVM_SURF_ATTR_SURF_TYPE 

! Surface type flags.

NVM_SURF_ATTR_LAYOUT 

! Surface layout type flags.

NVM_SURF_ATTR_DATA_TYPE 

! Surface data type flags.

NVM_SURF_ATTR_MEMORY 

! Surface memory type flags.

NVM_SURF_ATTR_SUB_SAMPLING_TYPE 

! Surface sub sampling type flags.

NVM_SURF_ATTR_BITS_PER_COMPONENT 

! Bits per component flags.

NVM_SURF_ATTR_COMPONENT_ORDER 

! Pixel order flags.

NVM_SURF_FMT_ATTR_MAX 

! Maximum number of surface format attributes.

Definition at line 53 of file nvmedia_surface.h.

Function Documentation

NvMediaStatus NvMediaSurfaceFormatGetAttrs ( NvMediaSurfaceType  type,
NvMediaSurfFormatAttr attrs,
unsigned int  numAttrs 
)

Gets NvMedia surface format attributes for the input surface type.

Parameters
[in]typeNvMediaSurfacetype of the surface.
[in]attrsA pointer to array of NvMediaSurfFormatAttr. The attribute value is returned for the input attribute type NvMediaSurfFormatAttrType for each array element.
[in]numAttrsNumber of attributes in the array.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_ERROR
NVMEDIA_STATUS_NOT_SUPPORTED
NvMediaSurfaceType NvMediaSurfaceFormatGetType ( const NvMediaSurfFormatAttr attrs,
unsigned int  numAttrs 
)

Gets the NvMedia surface format type for the input surface format attributes.

Parameters
[in]attrsAn array of surface format attributes.
[in]numAttrsNumber of attributes in the array.
Returns
NvMediaSurfaceType for the input attributes (or) NvMediaSurfaceType_Unsupported if unsuccessful.
NvMediaStatus NvMediaSurfaceGetVersion ( NvMediaVersion version)

Returns the version information for the NvMediaSurface component.

Parameters
[in]versionA pointer to an NvMediaVersion structure to be filled by the NvMediaSurface component.
Returns
NVMEDIA_STATUS_OK if the operation was successful, or NVMEDIA_STATUS_BAD_PARAMETER if version was invalid.