|
|
NVIDIA DRIVE 5.0 Linux SDK API Reference5.0.10.3 Release |
NVIDIA Media Interface: Surface Handling
Description: This file contains the NvMedia Surface Handling API.
Definition in file nvmedia_surface.h.
Go to the source code of this file.
Data Structures | |
| struct | NvMediaSurfFormatAttr |
| Holds NvMedia Surface format attributes. More... | |
| struct | NvMediaSurfAllocAttr |
| Holds NvMedia Surface allocation attributes. More... | |
Macros | |
| #define | NVMEDIA_SURFACE_VERSION_MAJOR 1 |
| Major Version number. More... | |
| #define | NVMEDIA_SURFACE_VERSION_MINOR 8 |
| Minor Version number. More... | |
| #define | NVM_SURF_ATTR_SURF_TYPE_YUV 0x00000001 |
| NVM_SURF_ATTR_SURF_TYPE flags. More... | |
| #define | NVM_SURF_ATTR_SURF_TYPE_RGBA 0x00000002 |
| RGBA surface type flag. More... | |
| #define | NVM_SURF_ATTR_SURF_TYPE_RAW 0x00000003 |
| RAW surface type flag. More... | |
| #define | NVM_SURF_ATTR_LAYOUT_BL 0x00000001 |
| NVM_SURF_ATTR_LAYOUT flags. More... | |
| #define | NVM_SURF_ATTR_LAYOUT_PL 0x00000002 |
| Pitch Linear (PL) surface layout flag. More... | |
| #define | NVM_SURF_ATTR_DATA_TYPE_UINT 0x00000001 |
| NVM_SURF_ATTR_DATA_TYPE flags. More... | |
| #define | NVM_SURF_ATTR_DATA_TYPE_INT 0x00000002 |
| Integer surface data type flag. More... | |
| #define | NVM_SURF_ATTR_DATA_TYPE_FLOAT 0x00000003 |
| Float surface data type flag. More... | |
| #define | NVM_SURF_ATTR_DATA_TYPE_FLOATISP 0x00000004 |
| FloatISP surface data type flag. More... | |
| #define | NVM_SURF_ATTR_MEMORY_PLANAR 0x00000001 |
| NVM_SURF_ATTR_MEMORY flags. More... | |
| #define | NVM_SURF_ATTR_MEMORY_SEMI_PLANAR 0x00000002 |
| Semi-Planar surface memory type flag. More... | |
| #define | NVM_SURF_ATTR_MEMORY_PACKED 0x00000003 |
| Packed surface memory type flag. More... | |
| #define | NVM_SURF_ATTR_SUB_SAMPLING_TYPE_420 0x00000001 |
| NVM_SURF_ATTR_SUB_SAMPLING_TYPE flags for YUV surface types "R" indicates a transpose. More... | |
| #define | NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422 0x00000002 |
| 4:2:2 sub-sampling type flag More... | |
| #define | NVM_SURF_ATTR_SUB_SAMPLING_TYPE_444 0x00000003 |
| 4:4:4 sub-sampling type flag More... | |
| #define | NVM_SURF_ATTR_SUB_SAMPLING_TYPE_422R 0x00000004 |
| 4:2:2 transposed sub-sampling type flag More... | |
| #define | NVM_SURF_ATTR_SUB_SAMPLING_TYPE_NONE 0x00000000 |
| sub-sampling type not applicable flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_8 0x00000001 |
| 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 0x00000002 |
| 10-bit per component flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_12 0x00000003 |
| 12-bit per component flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_14 0x00000004 |
| 14-bit per component flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_16 0x00000005 |
| 16-bit per component flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_32 0x00000006 |
| 32-bit per component flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_16_8_8 0x00000007 |
| 16:8:8 bits per component layout flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_10_8_8 0x00000008 |
| 10:8:8 bits per component layout flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_LAYOUT_2_10_10_10 0x00000009 |
| 2:10:10:10 bits per component layout flag More... | |
| #define | NVM_SURF_ATTR_BITS_PER_COMPONENT_20 0x0000000A |
| 20-bit per component flag More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_LUMA 0x00000001 |
| NVM_SURF_ATTR_COMPONENT_ORDER flags for YUV surface type. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_YUV 0x00000002 |
| YUV component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_YVU 0x00000003 |
| YVU component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_YUYV 0x00000004 |
| YUYV component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_YVYU 0x00000005 |
| YVYU component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_VYUY 0x00000006 |
| VYUY component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_UYVY 0x00000007 |
| UYVY component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_XUYV 0x00000008 |
| XUYV component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_XYUV 0x00000009 |
| XYUV component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_VUYX 0x0000000A |
| VUYX component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_ALPHA 0x00000011 |
| NVM_SURF_ATTR_PIXEL_ORDER flags for RGBA surface type. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_RGBA 0x00000012 |
| RGBA component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_ARGB 0x00000013 |
| ARGB component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_BGRA 0x00000014 |
| BGRA component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_RG 0x00000015 |
| RG component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_RGGB 0x00000021 |
| NVM_SURF_ATTR_PIXEL_ORDER flags for RAW surface type. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_BGGR 0x00000022 |
| BGGR component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_GRBG 0x00000023 |
| GRBG component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_GBRG 0x00000024 |
| GBRG component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_RCCB 0x00000025 |
| RCCB component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_BCCR 0x00000026 |
| BCCR component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_CRBC 0x00000027 |
| CRBC component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_CBRC 0x00000028 |
| CBRC component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_RCCC 0x00000029 |
| RCCC component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_CCCR 0x0000002A |
| CCCR component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_CRCC 0x0000002B |
| CRCC component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_CCRC 0x0000002C |
| CCRC component order flag. More... | |
| #define | NVM_SURF_ATTR_COMPONENT_ORDER_CCCC 0x0000002D |
| 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 0x00000001 |
| NVM_SURF_ATTR_CPU_ACCESS flags. More... | |
| #define | NVM_SURF_ATTR_CPU_ACCESS_CACHED 0x00000002 |
| Cached (mapped) access type flag. More... | |
| #define | NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED 0x00000003 |
| Unmapped access type flag. More... | |
| #define | NVM_SURF_ATTR_ALLOC_ISOCHRONOUS 0x00000001 |
| NVM_SURF_ATTR_ALLOC_TYPE flags. More... | |
| #define | NVM_SURF_ATTR_ALLOC_SECURED 0x00000002 |
| Secured buffer allocation flag. More... | |
| #define | NVM_SURF_ATTR_SCAN_PROGRESSIVE 0x00000001 |
| NVM_SURF_ATTR_SCAN_TYPE flags. More... | |
| #define | NVM_SURF_ATTR_SCAN_INTERLACED 0x00000002 |
| Interlaced surface scan type flag. More... | |
| #define | NVM_SURF_ATTR_COLOR_STD_SRGB 0x00000001 |
| NVM_SURF_ATTR_COLOR_STD_TYPE flags. More... | |
| #define | NVM_SURF_ATTR_COLOR_STD_REC601_SR 0x00000002 |
| YCbCr Rec.601 (Studio Range) Color Std flag Range [Y:16-235 CbCr:16-240]. More... | |
| #define | NVM_SURF_ATTR_COLOR_STD_REC601_ER 0x00000003 |
| YCbCr Rec.601 (Extended Range) Color Std flag Range [YCbCr:0-255]. More... | |
| #define | NVM_SURF_ATTR_COLOR_STD_REC709_SR 0x00000004 |
| YCbCr Rec.709 (Studio Range) Color Std flag Range [Y:16-235 CbCr:16-240]. More... | |
| #define | NVM_SURF_ATTR_COLOR_STD_REC709_ER 0x00000005 |
| YCbCr Rec.709 (Extended Range) Color Std flag Range [YCbCr:0-255]. More... | |
| #define | NVM_SURF_ATTR_COLOR_STD_REC2020_RGB 0x00000006 |
| 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 0x00000007 |
| 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 0x00000008 |
| 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 0x00000009 |
| 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 0x0000000A |
| 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 0x0000000B |
| 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 0x0000000C |
| YCbCr Rec.2020PQ (Extended Range) Color Std flag Range [YCbCr:0-65535 (16-bit)]. More... | |
| #define | NvMediaSurfaceType unsigned int |
| Defines the set of NvMedia surface types. More... | |
| #define | NvMediaSurfaceType_Video_420 1000 |
| Video surface for 4:2:0 format video decoders. More... | |
| #define | NvMediaSurfaceType_Video_420_10bit 1001 |
| #define | NvMediaSurfaceType_Video_420_12bit 1002 |
| #define | NvMediaSurfaceType_Video_422 1003 |
| Video surface for 4:2:2 format video decoders. More... | |
| #define | NvMediaSurfaceType_Video_422_10bit 1004 |
| #define | NvMediaSurfaceType_Video_422_12bit 1005 |
| #define | NvMediaSurfaceType_Video_444 1006 |
| Video surface for 4:4:4 format video decoders. More... | |
| #define | NvMediaSurfaceType_Video_444_10bit 1007 |
| #define | NvMediaSurfaceType_Video_444_12bit 1008 |
| #define | NvMediaSurfaceType_VideoCapture_422 1009 |
| Video capture surface for 4:2:2 format. More... | |
| #define | NvMediaSurfaceType_VideoCapture_YUYV_422 1010 |
| Video capture surface for YUYV format. More... | |
| #define | NvMediaSurfaceType_R8G8B8A8 1011 |
| R8G8B8A8 surface type. More... | |
| #define | NvMediaSurfaceType_R8G8B8A8_BottomOrigin 1012 |
| R8G8B8A8 surface type used for video rendering. More... | |
| #define | NvMediaSurfaceType_Image_Monochrome 1013 |
| Monochrome image. More... | |
| #define | NvMediaSurfaceType_Image_YUV_420 1014 |
| 4:2:0 format image. More... | |
| #define | NvMediaSurfaceType_Image_YUV_422 1015 |
| 4:2:2 format image. More... | |
| #define | NvMediaSurfaceType_Image_YUV_444 1016 |
| 4:4:4 format image. More... | |
| #define | NvMediaSurfaceType_Image_YUYV_422 1017 |
| 4:2:2 format packed image with YUYV component order. More... | |
| #define | NvMediaSurfaceType_Image_RGBA 1018 |
| RGBA image type. More... | |
| #define | NvMediaSurfaceType_Image_RAW 1019 |
| RAW image type. More... | |
| #define | NvMediaSurfaceType_Image_V16Y16U16X16 1020 |
| 4:4:4:4 format packed image with VYUX component order. More... | |
| #define | NvMediaSurfaceType_Image_Y16 1021 |
| 16-bit Y data image. More... | |
| #define | NvMediaSurfaceType_Image_X2U10Y10V10 1022 |
| 4:4:4:4 format packed image with XUYV component order. More... | |
| #define | NvMediaSurfaceType_Image_Y10U8V8_420 1023 |
| 4:2:0 semi-planar YUV More... | |
| #define | NvMediaSurfaceType_Image_Y10 1024 |
| 10-bit Y data image. More... | |
| #define | NvMediaSurfaceType_A8 1025 |
| A8 alpha surface. More... | |
| #define | NvMediaSurfaceType_Unsupported 99999 |
| 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 (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... | |