NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.0 Release
For Test and Development only

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   (14u)
 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. 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_MIN_WIDTH   (16U)
 NVM_SURF_ATTR_WIDTH flags. More...
 
#define NVM_SURF_ATTR_MAX_WIDTH   (16384U)
 Maximum width of NvMedia Surface . More...
 
#define NVM_SURF_ATTR_MIN_HEIGHT   (16U)
 NVM_SURF_ATTR_HEIGHT flags. More...
 
#define NVM_SURF_ATTR_MAX_HEIGHT   (16384U)
 Maximum height of NvMedia Surface . More...
 
#define NVM_SURF_ATTR_MIN_EMB_LINES_TOP   (0U)
 NVM_SURF_ATTR_EMB_LINES_TOP flags. More...
 
#define NVM_SURF_ATTR_MAX_EMB_LINES_TOP   (128U)
 Maximum Top Embedded Data Lines. More...
 
#define NVM_SURF_ATTR_MIN_EMB_LINES_BOTTOM   (0U)
 NVM_SURF_ATTR_EMB_LINES_BOTTOM flags. More...
 
#define NVM_SURF_ATTR_MAX_EMB_LINES_BOTTOM   (128U)
 Maximum Bottom Embedded Data Lines. 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_DEFAULT   (0x00000000u)
 NVM_SURF_ATTR_ALLOC_TYPE flags. More...
 
#define NVM_SURF_ATTR_ALLOC_DEFAULT   (0x00000000u)
 NVM_SURF_ATTR_ALLOC_TYPE flags. More...
 
#define NVM_SURF_ATTR_ALLOC_ISOCHRONOUS   (0x00000001u)
 Isochronous buffer allocation flag. More...
 
#define NVM_SURF_ATTR_ALLOC_SECURED   (0x00000002u)
 Secured buffer allocation flag. More...
 
#define NVM_SURF_ATTR_SCAN_PROGRESSIVE   (0x00000001u)
 Progressive surface scan type flag. 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. 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_Unsupported   (99999u)
 Unsupported types. More...
 
#define NvMediaSurfaceType_Video_420   (1000u)
 Obsolete Video surface for 4:2:0 format video decoders. 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_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 = 0u,
  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 = 0u,
  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, uint32_t numAttrs)
 Gets NvMediaSurfaceType for the input NvMediaSurfFormatAttr. More...
 
NvMediaStatus NvMediaSurfaceFormatGetAttrs (NvMediaSurfaceType type, NvMediaSurfFormatAttr *attrs, uint32_t numAttrs)
 Gets NvMediaSurfFormatAttr for the input surface type. More...
 
NvMediaStatus NvMediaSurfaceGetVersion (NvMediaVersion *version)
 Gets the surface version information for the NvMediaSurface component. More...
 

Macro Definition Documentation

◆ NVM_SURF_ATTR_ALLOC_DEFAULT [1/2]

#define NVM_SURF_ATTR_ALLOC_DEFAULT   (0x00000000u)

NVM_SURF_ATTR_ALLOC_TYPE flags.

NVM_SURF_ATTR_SCAN_TYPE flags.

Default buffer allocation flag.

Default buffer allocation flag

Definition at line 459 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_ALLOC_DEFAULT [2/2]

#define NVM_SURF_ATTR_ALLOC_DEFAULT   (0x00000000u)

NVM_SURF_ATTR_ALLOC_TYPE flags.

NVM_SURF_ATTR_SCAN_TYPE flags.

Default buffer allocation flag.

Default buffer allocation flag

Definition at line 459 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_ALLOC_ISOCHRONOUS

#define NVM_SURF_ATTR_ALLOC_ISOCHRONOUS   (0x00000001u)

Isochronous buffer allocation flag.

Definition at line 452 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_ALLOC_SECURED

#define NVM_SURF_ATTR_ALLOC_SECURED   (0x00000002u)

Secured buffer allocation flag.

Definition at line 454 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_10

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_10   (0x00000002u)

10-bit per component flag.

Definition at line 140 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_12

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_12   (0x00000003u)

12-bit per component flag.

Definition at line 142 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_14

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_14   (0x00000004u)

14-bit per component flag.

Definition at line 144 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_16

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_16   (0x00000005u)

16-bit per component flag.

Definition at line 146 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_20

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_20   (0x0000000Au)

20-bit per component flag.

Definition at line 157 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_32

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_32   (0x00000006u)

32-bit per component flag.

Definition at line 148 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_8

#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 138 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_10_8_8

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_10_8_8   (0x00000008u)

10:8:8 bits per component layout flag.

Definition at line 153 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_16_8_8

#define NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_16_8_8   (0x00000007u)

16:8:8 bits per component layout flag.

Definition at line 151 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_2_10_10_10

#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 155 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC2020_ER

#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 510 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC2020_RGB

#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 498 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC2020_SR

#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 504 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC2020PQ_ER

#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 535 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC601_ER

#define NVM_SURF_ATTR_COLOR_STD_REC601_ER   (0x00000003u)

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

Definition at line 484 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC601_SR

#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 480 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC709_ER

#define NVM_SURF_ATTR_COLOR_STD_REC709_ER   (0x00000005u)

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

Definition at line 492 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_REC709_SR

#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 488 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_SENSOR_RGBA

#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 530 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_SRGB

#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 476 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_YcCbcCrc_ER

#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 522 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COLOR_STD_YcCbcCrc_SR

#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 516 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_ALPHA

#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 183 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_ARGB

#define NVM_SURF_ATTR_COMPONENT_ORDER_ARGB   (0x00000013u)

ARGB component order flag.

Definition at line 187 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_BCCR

#define NVM_SURF_ATTR_COMPONENT_ORDER_BCCR   (0x00000026u)

BCCR component order flag.

Definition at line 206 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_BGGR

#define NVM_SURF_ATTR_COMPONENT_ORDER_BGGR   (0x00000022u)

BGGR component order flag.

Definition at line 197 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_BGRA

#define NVM_SURF_ATTR_COMPONENT_ORDER_BGRA   (0x00000014u)

BGRA component order flag.

Definition at line 189 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_CBRC

#define NVM_SURF_ATTR_COMPONENT_ORDER_CBRC   (0x00000028u)

CBRC component order flag.

Definition at line 210 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_CCCC

#define NVM_SURF_ATTR_COMPONENT_ORDER_CCCC   (0x0000002Du)

CCCC component order flag.

Definition at line 222 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_CCCR

#define NVM_SURF_ATTR_COMPONENT_ORDER_CCCR   (0x0000002Au)

CCCR component order flag.

Definition at line 215 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_CCRC

#define NVM_SURF_ATTR_COMPONENT_ORDER_CCRC   (0x0000002Cu)

CCRC component order flag.

Definition at line 219 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_CRBC

#define NVM_SURF_ATTR_COMPONENT_ORDER_CRBC   (0x00000027u)

CRBC component order flag.

Definition at line 208 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_CRCC

#define NVM_SURF_ATTR_COMPONENT_ORDER_CRCC   (0x0000002Bu)

CRCC component order flag.

Definition at line 217 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_GBRG

#define NVM_SURF_ATTR_COMPONENT_ORDER_GBRG   (0x00000024u)

GBRG component order flag.

Definition at line 201 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_GRBG

#define NVM_SURF_ATTR_COMPONENT_ORDER_GRBG   (0x00000023u)

GRBG component order flag.

Definition at line 199 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_LUMA

#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 161 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_RCCB

#define NVM_SURF_ATTR_COMPONENT_ORDER_RCCB   (0x00000025u)

RCCB component order flag.

Definition at line 204 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_RCCC

#define NVM_SURF_ATTR_COMPONENT_ORDER_RCCC   (0x00000029u)

RCCC component order flag.

Definition at line 213 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_RG

#define NVM_SURF_ATTR_COMPONENT_ORDER_RG   (0x00000015u)

RG component order flag.

Definition at line 191 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_RGBA

#define NVM_SURF_ATTR_COMPONENT_ORDER_RGBA   (0x00000012u)

RGBA component order flag.

Definition at line 185 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_RGGB

#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 195 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_UYVY

#define NVM_SURF_ATTR_COMPONENT_ORDER_UYVY   (0x00000007u)

UYVY component order flag.

Definition at line 173 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_VUYX

#define NVM_SURF_ATTR_COMPONENT_ORDER_VUYX   (0x0000000Au)

VUYX component order flag.

Definition at line 179 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_VYUY

#define NVM_SURF_ATTR_COMPONENT_ORDER_VYUY   (0x00000006u)

VYUY component order flag.

Definition at line 171 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_XUYV

#define NVM_SURF_ATTR_COMPONENT_ORDER_XUYV   (0x00000008u)

XUYV component order flag.

Definition at line 175 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_XYUV

#define NVM_SURF_ATTR_COMPONENT_ORDER_XYUV   (0x00000009u)

XYUV component order flag.

Definition at line 177 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_YUV

#define NVM_SURF_ATTR_COMPONENT_ORDER_YUV   (0x00000002u)

YUV component order flag.

Definition at line 163 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_YUYV

#define NVM_SURF_ATTR_COMPONENT_ORDER_YUYV   (0x00000004u)

YUYV component order flag.

Definition at line 167 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_YVU

#define NVM_SURF_ATTR_COMPONENT_ORDER_YVU   (0x00000003u)

YVU component order flag.

Definition at line 165 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_COMPONENT_ORDER_YVYU

#define NVM_SURF_ATTR_COMPONENT_ORDER_YVYU   (0x00000005u)

YVYU component order flag.

Definition at line 169 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_CPU_ACCESS_CACHED

#define NVM_SURF_ATTR_CPU_ACCESS_CACHED   (0x00000002u)

Cached (mapped) access type flag.

Definition at line 443 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_CPU_ACCESS_UNCACHED

#define NVM_SURF_ATTR_CPU_ACCESS_UNCACHED   (0x00000001u)

NVM_SURF_ATTR_CPU_ACCESS flags.

Uncached (mapped) access type flag.

Definition at line 441 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED

#define NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED   (0x00000003u)

Unmapped access type flag.

Definition at line 445 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_DATA_TYPE_FLOAT

#define NVM_SURF_ATTR_DATA_TYPE_FLOAT   (0x00000003u)

Float surface data type flag.

Definition at line 108 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_DATA_TYPE_FLOATISP

#define NVM_SURF_ATTR_DATA_TYPE_FLOATISP   (0x00000004u)

FloatISP surface data type flag.

Definition at line 110 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_DATA_TYPE_INT

#define NVM_SURF_ATTR_DATA_TYPE_INT   (0x00000002u)

Integer surface data type flag.

Definition at line 106 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_DATA_TYPE_UINT

#define NVM_SURF_ATTR_DATA_TYPE_UINT   (0x00000001u)

NVM_SURF_ATTR_DATA_TYPE flags.

Unsigned Integer surface data type flag.

Definition at line 104 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_LAYOUT_BL

#define NVM_SURF_ATTR_LAYOUT_BL   (0x00000001u)

NVM_SURF_ATTR_LAYOUT flags.

Block Linear (BL) surface layout flag.

Definition at line 98 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_LAYOUT_PL

#define NVM_SURF_ATTR_LAYOUT_PL   (0x00000002u)

Pitch Linear (PL) surface layout flag.

Definition at line 100 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MAX_EMB_LINES_BOTTOM

#define NVM_SURF_ATTR_MAX_EMB_LINES_BOTTOM   (128U)

Maximum Bottom Embedded Data Lines.

Definition at line 436 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MAX_EMB_LINES_TOP

#define NVM_SURF_ATTR_MAX_EMB_LINES_TOP   (128U)

Maximum Top Embedded Data Lines.

Definition at line 429 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MAX_HEIGHT

#define NVM_SURF_ATTR_MAX_HEIGHT   (16384U)

Maximum height of NvMedia Surface .

Definition at line 422 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MAX_WIDTH

#define NVM_SURF_ATTR_MAX_WIDTH   (16384U)

Maximum width of NvMedia Surface .

Definition at line 415 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MEMORY_PACKED

#define NVM_SURF_ATTR_MEMORY_PACKED   (0x00000003u)

Packed surface memory type flag.

Definition at line 118 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MEMORY_PLANAR

#define NVM_SURF_ATTR_MEMORY_PLANAR   (0x00000001u)

NVM_SURF_ATTR_MEMORY flags.

Planar surface memory type flag.

Definition at line 114 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MEMORY_SEMI_PLANAR

#define NVM_SURF_ATTR_MEMORY_SEMI_PLANAR   (0x00000002u)

Semi-Planar surface memory type flag.

Definition at line 116 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MIN_EMB_LINES_BOTTOM

#define NVM_SURF_ATTR_MIN_EMB_LINES_BOTTOM   (0U)

NVM_SURF_ATTR_EMB_LINES_BOTTOM flags.

Minimum Bottom Embedded Data Lines.

Definition at line 434 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MIN_EMB_LINES_TOP

#define NVM_SURF_ATTR_MIN_EMB_LINES_TOP   (0U)

NVM_SURF_ATTR_EMB_LINES_TOP flags.

Minimum Top Embedded Data Lines.

Definition at line 427 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MIN_HEIGHT

#define NVM_SURF_ATTR_MIN_HEIGHT   (16U)

NVM_SURF_ATTR_HEIGHT flags.

Minimum height of NvMedia Surface .

Definition at line 420 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_MIN_WIDTH

#define NVM_SURF_ATTR_MIN_WIDTH   (16U)

NVM_SURF_ATTR_WIDTH flags.

Minimum width of NvMedia Surface .

Definition at line 413 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SCAN_INTERLACED

#define NVM_SURF_ATTR_SCAN_INTERLACED   (0x00000002u)

Interlaced surface scan type flag.

Interlaced Scan Type is not supported on safety builds.

Definition at line 468 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SCAN_PROGRESSIVE

#define NVM_SURF_ATTR_SCAN_PROGRESSIVE   (0x00000001u)

Progressive surface scan type flag.

Definition at line 461 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SUB_SAMPLING_TYPE_420

#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 124 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422   (0x00000002u)

4:2:2 sub-sampling type flag.

Definition at line 126 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422R

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422R   (0x00000004u)

4:2:2 transposed sub-sampling type flag.

Definition at line 130 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SUB_SAMPLING_TYPE_444

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_444   (0x00000003u)

4:4:4 sub-sampling type flag.

Definition at line 128 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE

#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE   (0x00000000u)

sub-sampling type not applicable flag.

Definition at line 132 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SURF_TYPE_RAW

#define NVM_SURF_ATTR_SURF_TYPE_RAW   (0x00000003u)

RAW surface type flag.

Definition at line 94 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SURF_TYPE_RGBA

#define NVM_SURF_ATTR_SURF_TYPE_RGBA   (0x00000002u)

RGBA surface type flag.

Definition at line 92 of file nvmedia_surface.h.

◆ NVM_SURF_ATTR_SURF_TYPE_YUV

#define NVM_SURF_ATTR_SURF_TYPE_YUV   (0x00000001u)

NVM_SURF_ATTR_SURF_TYPE flags.

YUV surface type flag.

Definition at line 90 of file nvmedia_surface.h.

◆ NVM_SURF_FMT_DEFINE_ATTR

#define NVM_SURF_FMT_DEFINE_ATTR (   x)
Value:
{ \
.value = 0u, \
}, \
{ \
.value = 0u, \
}, \
{ \
.value = 0u, \
}, \
{ \
.value = 0u, \
}, \
{ \
.value = 0u, \
}, \
{ \
.value = 0u, \
}, \
{ \
.value = 0u, \
}, \
}; \

A helper macro to define surface format attributes.

Definition at line 237 of file nvmedia_surface.h.

◆ NVM_SURF_FMT_SET_ATTR_RAW

#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[5].value = NVM_SURF_ATTR_BITS_PER_COMPONENT_##bpc; \
\
attr[6].value = NVM_SURF_ATTR_COMPONENT_ORDER_##order; \
}

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 334 of file nvmedia_surface.h.

◆ NVM_SURF_FMT_SET_ATTR_RGBA

#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[5].value = NVM_SURF_ATTR_BITS_PER_COMPONENT_##bpc; \
\
attr[6].value = NVM_SURF_ATTR_COMPONENT_ORDER_##order; \
}

A helper macro to set RGBA surface format attributes.

The attr parameter must be defined before setting the values using NVM_SURF_FMT_SET_ATTR_RGBA.

Definition at line 306 of file nvmedia_surface.h.

◆ NVM_SURF_FMT_SET_ATTR_YUV

#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; \
}

A helper macro to set YUV surface format attributes.

The attr parameter must be defined before setting the values using NVM_SURF_FMT_SET_ATTR_YUV. For NVM_SURF_ATTR_COMPONENT_ORDER_XUYV, NVM_SURF_ATTR_COMPONENT_ORDER_XYUV, NVM_SURF_ATTR_COMPONENT_ORDER_VUYX and NVM_SURF_ATTR_COMPONENT_ORDER_LUMA, set the sampling type to be NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE.

Definition at line 277 of file nvmedia_surface.h.

◆ NVMEDIA_SURFACE_VERSION_MAJOR

#define NVMEDIA_SURFACE_VERSION_MAJOR   (1u)

Major Version number.

Definition at line 44 of file nvmedia_surface.h.

◆ NVMEDIA_SURFACE_VERSION_MINOR

#define NVMEDIA_SURFACE_VERSION_MINOR   (14u)

Minor Version number.

Definition at line 46 of file nvmedia_surface.h.

◆ NvMediaSurfaceType

#define NvMediaSurfaceType   uint32_t

Defines the set of NvMedia surface types.

Definition at line 550 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_A8

#define NvMediaSurfaceType_A8   (1025u)

Obsolete A8 alpha surface.

Definition at line 614 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_Monochrome

#define NvMediaSurfaceType_Image_Monochrome   (1013u)

Obsolete Monochrome image.

Definition at line 590 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_RAW

#define NvMediaSurfaceType_Image_RAW   (1019u)

Obsolete RAW image type.

Definition at line 602 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_RGBA

#define NvMediaSurfaceType_Image_RGBA   (1018u)

Obsolete RGBA image type.

Definition at line 600 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_V16Y16U16X16

#define NvMediaSurfaceType_Image_V16Y16U16X16   (1020u)

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

Definition at line 604 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_X2U10Y10V10

#define NvMediaSurfaceType_Image_X2U10Y10V10   (1022u)

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

Definition at line 608 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_Y10

#define NvMediaSurfaceType_Image_Y10   (1024u)

Obsolete 10-bit Y data image.

Definition at line 612 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_Y10U8V8_420

#define NvMediaSurfaceType_Image_Y10U8V8_420   (1023u)

Obsolete 4:2:0 semi-planar YUV.

Definition at line 610 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_Y16

#define NvMediaSurfaceType_Image_Y16   (1021u)

Obsolete 16-bit Y data image.

Definition at line 606 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_YUV_420

#define NvMediaSurfaceType_Image_YUV_420   (1014u)

Obsolete 4:2:0 format image.

Definition at line 592 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_YUV_422

#define NvMediaSurfaceType_Image_YUV_422   (1015u)

Obsolete 4:2:2 format image.

Definition at line 594 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_YUV_444

#define NvMediaSurfaceType_Image_YUV_444   (1016u)

Obsolete 4:4:4 format image.

Definition at line 596 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Image_YUYV_422

#define NvMediaSurfaceType_Image_YUYV_422   (1017u)

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

Definition at line 598 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_R8G8B8A8

#define NvMediaSurfaceType_R8G8B8A8   (1011u)

Obsolete R8G8B8A8 surface type.

Definition at line 584 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_R8G8B8A8_BottomOrigin

#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 588 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Unsupported

#define NvMediaSurfaceType_Unsupported   (99999u)

Unsupported types.

Definition at line 553 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_420

#define NvMediaSurfaceType_Video_420   (1000u)

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

Note
The following surface type macros are deprecated and will be removed in a future release. Use NvMediaSurfaceFormatGetType() API instead to get the surface type. The actual physical surface format is selected based on the chip architecture.

Definition at line 564 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_420_10bit

#define NvMediaSurfaceType_Video_420_10bit   (1001u)

Definition at line 565 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_420_12bit

#define NvMediaSurfaceType_Video_420_12bit   (1002u)

Definition at line 566 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_422

#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 570 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_422_10bit

#define NvMediaSurfaceType_Video_422_10bit   (1004u)

Definition at line 571 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_422_12bit

#define NvMediaSurfaceType_Video_422_12bit   (1005u)

Definition at line 572 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_444

#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 576 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_444_10bit

#define NvMediaSurfaceType_Video_444_10bit   (1007u)

Definition at line 577 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_Video_444_12bit

#define NvMediaSurfaceType_Video_444_12bit   (1008u)

Definition at line 578 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_VideoCapture_422

#define NvMediaSurfaceType_VideoCapture_422   (1009u)

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

Definition at line 580 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_VideoCapture_YUYV_422

#define NvMediaSurfaceType_VideoCapture_YUYV_422   (1010u)

Obsolete Video capture surface for YUYV format.

Definition at line 582 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_YV12

#define NvMediaSurfaceType_YV12   NvMediaSurfaceType_Video_420

Obsolete 4:2:0 video surface type.

Definition at line 617 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_YV16

#define NvMediaSurfaceType_YV16   NvMediaSurfaceType_Video_422

Obsolete 4:2:2 video surface type.

Definition at line 619 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_YV16x2

#define NvMediaSurfaceType_YV16x2   NvMediaSurfaceType_VideoCapture_422

Obsolete 4:2:2 video capture surface type.

Definition at line 623 of file nvmedia_surface.h.

◆ NvMediaSurfaceType_YV24

#define NvMediaSurfaceType_YV24   NvMediaSurfaceType_Video_444

Obsolete 4:4:4 video surface type.

Definition at line 621 of file nvmedia_surface.h.

Enumeration Type Documentation

◆ NvMediaSurfAllocAttrType

Defines NvMedia Surface allocation attribute types.

The range of NvMediaSurfAllocAttrType values depend on the surface allocation attribute type. See the individual enum for the valid range.

Note
The Application must set the relevant color standard based on the Surface type. If 0 is passed as value to NVM_SURF_ATTR_CPU_ACCESS and NVM_SURF_ATTR_COLOR_STD_TYPE appropriate default attribute value will be set by NvMedia-Surface.
Enumerator
NVM_SURF_ATTR_WIDTH 

Specifies the surface width.

Valid range is: [NVM_SURF_ATTR_MIN_WIDTH, NVM_SURF_ATTR_MAX_WIDTH].

NVM_SURF_ATTR_HEIGHT 

Specifies the surface height (excluding embedded data lines).

Valid range is: [NVM_SURF_ATTR_MIN_HEIGHT, NVM_SURF_ATTR_MAX_HEIGHT].

NVM_SURF_ATTR_EMB_LINES_TOP 

Specifies the embedded lines top.

Valid range is: [NVM_SURF_ATTR_MIN_EMB_LINES_TOP, NVM_SURF_ATTR_MAX_EMB_LINES_TOP].

NVM_SURF_ATTR_EMB_LINES_BOTTOM 

Specifies the embedded lines bottom.

Valid range is: [NVM_SURF_ATTR_MIN_EMB_LINES_BOTTOM, NVM_SURF_ATTR_MAX_EMB_LINES_BOTTOM].

NVM_SURF_ATTR_CPU_ACCESS 

Specifies the CPU access to surface flags.

The default value is: NVM_SURF_ATTR_CPU_ACCESS_UNCACHED. Valid range is: [NVM_SURF_ATTR_CPU_ACCESS_UNCACHED, NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED].

NVM_SURF_ATTR_ALLOC_TYPE 

Specifies the allocation type.

The default value is : none. Valid range is: [NVM_SURF_ATTR_ALLOC_DEFAULT, NVM_SURF_ATTR_ALLOC_SECURED].

NVM_SURF_ATTR_PEER_VM_ID 

Specifies the peer VM ID in case of shared buffers.

This value must be a valid Peer VM-ID.

NVM_SURF_ATTR_SCAN_TYPE 

Specifies the surface scan type.

The default value is: NVM_SURF_ATTR_SCAN_PROGRESSIVE. Valid range is: [NVM_SURF_ATTR_SCAN_PROGRESSIVE]

NVM_SURF_ATTR_COLOR_STD_TYPE 

Specifies the color standard type.

The default is YCbCr Rec.601 (Extended Range) for YUV surface types, and sRGB for RGB surface types. Valid range is: [NVM_SURF_ATTR_COLOR_STD_SRGB, NVM_SURF_ATTR_COLOR_STD_REC2020PQ_ER].

NVM_SURF_ALLOC_ATTR_MAX 

Specifies the maximum number of surface allocation attributes.

Definition at line 369 of file nvmedia_surface.h.

◆ NvMediaSurfFormatAttrType

Defines NvMedia Surface format attribute types.

The range of NvMediaSurfFormatAttrType values depend on the surface format attribute type. See the individual enum for the valid range.

Enumerator
NVM_SURF_ATTR_SURF_TYPE 

Specifies the surface type.

Valid range is: [NVM_SURF_ATTR_SURF_TYPE_YUV, NVM_SURF_ATTR_SURF_TYPE_RAW].

NVM_SURF_ATTR_LAYOUT 

Specifies the surface layout type.

Valid range is: [NVM_SURF_ATTR_LAYOUT_BL, NVM_SURF_ATTR_LAYOUT_PL].

NVM_SURF_ATTR_DATA_TYPE 

Specifies the surface data type.

Valid range is: [NVM_SURF_ATTR_DATA_TYPE_UINT, NVM_SURF_ATTR_DATA_TYPE_FLOATISP].

NVM_SURF_ATTR_MEMORY 

Specifies the surface memory type flags.

Valid range is: [NVM_SURF_ATTR_MEMORY_PLANAR, NVM_SURF_ATTR_MEMORY_PACKED].

NVM_SURF_ATTR_SUB_SAMPLING_TYPE 

Specifies the surface sub sampling type.

Valid range is: [NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE, NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422].

NVM_SURF_ATTR_BITS_PER_COMPONENT 

Specifies bits per component.

Valid range is: [NVM_SURF_ATTR_BITS_PER_COMPONENT_8, NVM_SURF_ATTR_BITS_PER_COMPONENT_20].

NVM_SURF_ATTR_COMPONENT_ORDER 

Specifies the Pixel order.

Valid range is: [NVM_SURF_ATTR_COMPONENT_ORDER_LUMA, NVM_SURF_ATTR_COMPONENT_ORDER_CCCC].

NVM_SURF_FMT_ATTR_MAX 

Specifies the maximum number of surface format attributes.

Definition at line 55 of file nvmedia_surface.h.

Function Documentation

◆ NvMediaSurfaceFormatGetAttrs()

NvMediaStatus NvMediaSurfaceFormatGetAttrs ( NvMediaSurfaceType  type,
NvMediaSurfFormatAttr attrs,
uint32_t  numAttrs 
)

Gets NvMediaSurfFormatAttr for the input surface type.

Parameters
[in]typeNvMediaSurfaceType of the surface. This must be a valid value returned by NvMediaSurfaceFormatGetType().
[in]attrsA pointer to array of NvMediaSurfFormatAttr. The attribute value is returned for the input attribute type NvMediaSurfFormatAttrType for each array element. It should be a valid non-null pointer.
[in]numAttrsNumber of attributes in the array. Must be a valid value in range [1, NVM_SURF_FMT_ATTR_MAX].
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK : On Successful completion
NVMEDIA_STATUS_ERROR : On invalid NvMediaSurfFormatAttrType
NVMEDIA_STATUS_NOT_SUPPORTED : On invalid NvMediaSurfaceType

◆ NvMediaSurfaceFormatGetType()

NvMediaSurfaceType NvMediaSurfaceFormatGetType ( const NvMediaSurfFormatAttr attrs,
uint32_t  numAttrs 
)

Gets NvMediaSurfaceType for the input NvMediaSurfFormatAttr.

This API takes surface format attributes of a given surface as input parameters and returns the surface type of the corresponding surface.

Parameters
[in]attrsPointer to an array of surface format attributes. It should be a valid non-null pointer.
[in]numAttrsNumber of attributes in the array. The application has to pass NVM_SURF_FMT_ATTR_MAX number of attributes.
Returns
NvMediaSurfaceType for the input attributes. NvMediaSurfaceType_Unsupported if unsuccessful.

◆ NvMediaSurfaceGetVersion()

NvMediaStatus NvMediaSurfaceGetVersion ( NvMediaVersion version)

Gets the surface version information for the NvMediaSurface component.

Parameters
[in]versionA pointer to an NvMediaVersion structure to be filled by the NvMediaSurface component. It should be a valid non-null pointer.
Returns
NVMEDIA_STATUS_OK if the operation was successful, or NVMEDIA_STATUS_BAD_PARAMETER if version was invalid or if a NULL Pointer is provided as input argument.
NVM_SURF_ATTR_DATA_TYPE
@ NVM_SURF_ATTR_DATA_TYPE
Specifies the surface data type.
Definition: nvmedia_surface.h:67
NVM_SURF_ATTR_SURF_TYPE_YUV
#define NVM_SURF_ATTR_SURF_TYPE_YUV
NVM_SURF_ATTR_SURF_TYPE flags.
Definition: nvmedia_surface.h:90
NvMediaSurfFormatAttr
Holds NvMedia Surface format attributes.
Definition: nvmedia_surface.h:227
NVM_SURF_ATTR_SURF_TYPE
@ NVM_SURF_ATTR_SURF_TYPE
Specifies the surface type.
Definition: nvmedia_surface.h:59
NVM_SURF_ATTR_SURF_TYPE_RAW
#define NVM_SURF_ATTR_SURF_TYPE_RAW
RAW surface type flag.
Definition: nvmedia_surface.h:94
NVM_SURF_ATTR_SURF_TYPE_RGBA
#define NVM_SURF_ATTR_SURF_TYPE_RGBA
RGBA surface type flag.
Definition: nvmedia_surface.h:92
NVM_SURF_ATTR_MEMORY_PACKED
#define NVM_SURF_ATTR_MEMORY_PACKED
Packed surface memory type flag.
Definition: nvmedia_surface.h:118
NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE
#define NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE
sub-sampling type not applicable flag.
Definition: nvmedia_surface.h:132
NVM_SURF_ATTR_LAYOUT
@ NVM_SURF_ATTR_LAYOUT
Specifies the surface layout type.
Definition: nvmedia_surface.h:63
NVM_SURF_ATTR_BITS_PER_COMPONENT
@ NVM_SURF_ATTR_BITS_PER_COMPONENT
Specifies bits per component.
Definition: nvmedia_surface.h:79
NVM_SURF_ATTR_COMPONENT_ORDER
@ NVM_SURF_ATTR_COMPONENT_ORDER
Specifies the Pixel order.
Definition: nvmedia_surface.h:83
NVM_SURF_ATTR_SUB_SAMPLING_TYPE
@ NVM_SURF_ATTR_SUB_SAMPLING_TYPE
Specifies the surface sub sampling type.
Definition: nvmedia_surface.h:75
NVM_SURF_ATTR_MEMORY
@ NVM_SURF_ATTR_MEMORY
Specifies the surface memory type flags.
Definition: nvmedia_surface.h:71
NvMediaSurfFormatAttr::type
NvMediaSurfFormatAttrType type
Holds surface format attribute type.
Definition: nvmedia_surface.h:229