|
|
NVIDIA DeepStream SDK API Reference
|
8.0 Release
|
Go to the documentation of this file.
30 #ifndef NVBUFSURFACE_H_
31 #define NVBUFSURFACE_H_
48 #define STRUCTURE_PADDING 4
51 #define NVBUF_MAX_PLANES 4
57 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_HORIZ_DEFAULT 0
58 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_VERT_DEFAULT 1
60 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_PARAMS_DEFAULT \
62 NVBUFSURFACE_CHROMA_SUBSAMPLING_HORIZ_DEFAULT, \
63 NVBUFSURFACE_CHROMA_SUBSAMPLING_VERT_DEFAULT \
892 int NvBufSurface2Raw (
NvBufSurface *Surf,
unsigned int index,
unsigned int plane,
unsigned int out_width,
unsigned int out_height,
unsigned char *ptr);
910 int Raw2NvBufSurface (
unsigned char *ptr,
unsigned int index,
unsigned int plane,
unsigned int in_width,
unsigned int in_height,
NvBufSurface *Surf);
struct NvBufSurfaceParamsEx NvBufSurfaceParamsEx
Hold the information(extended) of single buffer in the batch.
@ NVBUF_COLOR_FORMAT_NV12_10LE
Specifies BT.601 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
@ NVBUF_COLOR_FORMAT_YUV420_709_ER
Specifies BT.709 colorspace - YUV420 ER multi-planar.
uint32_t width
Holds the width of the buffer.
uint64_t drmModifier[NVBUF_MAX_PLANES]
DRM modifier for plane.
@ NvBufSurfaceTag_VIDEO_DEC
tag for H264/H265/VP9 Video Decoder.
@ NVBUF_COLOR_FORMAT_NV12_709
Specifies BT.709 colorspace - Y/CbCr 4:2:0 multi-planar.
struct NvBufSurfaceMappedAddr NvBufSurfaceMappedAddr
Hold the pointers of mapped buffer.
@ NVBUF_COLOR_FORMAT_YUV420_2020
Specifies BT.2020 colorspace - YUV420 multi-planar.
uint32_t psize
Holds the sizes of planes in bytes.
@ NVBUF_COLOR_FORMAT_NV16_12LE
Specifies BT.601 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Holds Chroma Subsampling parameters for NvBufSurface allocation.
Holds plane wise parameters(extended) of a buffer.
@ NVBUF_MEM_CUDA_PINNED
Specifies CUDA Host memory type.
bool isContiguous
Holds an "is contiguous" flag.
@ NVBUF_COLOR_FORMAT_A32
Specifies Optical flow SAD calculation Buffer format.
@ NVBUF_COLOR_FORMAT_NV12_12LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:0 12-bit multi-planar.
Holds plane parameters to map the buffer received from another process.
NvBufSurfaceDisplayScanFormat displayscanformat
Display scan format.
int NvBufSurfaceSyncForDevice(NvBufSurface *surf, int index, int plane)
Syncs the hardware memory cache for the device.
uint32_t gpuId
Holds a GPU ID.
@ NvBufSurfaceTag_PROTECTED
tag for VPR Buffers.
int NvBufSurfaceMap(NvBufSurface *surf, int index, int plane, NvBufSurfaceMemMapFlags type)
Maps hardware batched buffers to the HOST or CPU address space.
@ NVBUF_COLOR_FORMAT_NV16_12LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
uint32_t height
Holds the height of the buffer.
@ NVBUF_COLOR_FORMAT_NV16_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
@ NVBUF_COLOR_FORMAT_NV16_12LE_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
NvBufSurfaceDriverType driverType
The detected device type (nvgpu, OpenRM, etc.).
@ NVBUF_COLOR_FORMAT_NV24_12LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
@ NVBUF_COLOR_FORMAT_NV16_12LE_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
@ NVBUF_COLOR_FORMAT_VYUY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
@ NVBUF_DISPLAYSCANFORMAT_INTERLACED
Interlaced scan formats.
NvBufSurfaceColorFormat colorFormat
Holds the color format.
NvBufSurfaceGPUL2SyncCacheOps
@ NVBUF_COLOR_FORMAT_YUV444_10LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:4:4 10-bit multi-planar.
@ NVBUF_COLOR_FORMAT_B8_G8_R8
Specifies BGR- unsigned 8 bit multiplanar plane.
@ NVBUF_COLOR_FORMAT_UYVY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
@ NVBUF_COLOR_FORMAT_VYUY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
NvBufSurfaceDisplayScanFormat
Defines display scan formats for NvBufSurface video planes.
int NvBufSurfaceGetDeviceInfo(NvBufSurfaceDeviceInfo *info)
Retrieves information about the underlying GPU device driver.
uint32_t num_planes
Holds the number of planes.
@ NVBUF_COLOR_FORMAT_BGRA64_LE
Specifies 64 bit BGRA (B16 G16 R16 A16) interleaved.
@ NvBufSurfaceTag_CAMERA
tag for Camera.
uint32_t offset
Holds the offsets of planes in bytes.
@ NVBUF_COLOR_FORMAT_GRAY8
Specifies 8 bit GRAY scale - single plane.
@ NVBUF_COLOR_FORMAT_BGRA
Specifies BGRA-8-8-8-8 single plane.
NvBufSurfaceGPUL2SyncCacheOps type
Holds the type of GPU L2 cache sync operation.
NvBufSurfaceDisplayScanFormat scanformat[NVBUF_MAX_PLANES]
display scan format - progressive/interlaced.
void * _reserved[STRUCTURE_PADDING]
void * dataPtr
Holds a pointer to allocated memory.
struct NvBufSurfaceNvmmBuffer NvBufSurfaceNvmmBuffer
Holds information about mapped CUDA buffer.
void * nvmmPtr
Holds a pointer to a mapped NVRM memory.
Holds information about mapped CUDA buffer.
int NvBufSurfaceMemSet(NvBufSurface *surf, int index, int plane, uint8_t value)
Fills each byte of the buffer(s) in an NvBufSurface with a provided value.
@ NVBUF_COLOR_FORMAT_NV12_12LE
Specifies BT.601 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
struct NvBufSurfaceAllocateParams NvBufSurfaceAllocateParams
Hold extended parameters required to allocate NvBufSurface.
@ NVBUF_COLOR_FORMAT_NV16
Specifies BT.601 colorspace - Y/CbCr 4:2:2 multi-planar.
@ NVBUF_COLOR_FORMAT_YUV420_ER
Specifies BT.601 colorspace - YUV420 ER multi-planar.
Holds information of CUDA buffer.
uint8_t reserved[64]
Reserved.
Holds information about batched buffers.
@ NVBUF_COLOR_FORMAT_NV24_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:4:4 multi-planar.
int NvBufSurfaceMapCudaBuffer(NvBufSurface *surf, int index)
Creates an CUDA buffer from the memory of one or more NvBufSurface buffers.
uint32_t width
Holds the widths of planes.
bool disablePitchPadding
disable pitch padding allocation only applicable for cuda and system memory allocation pitch would be...
uint32_t width[NVBUF_MAX_PLANES]
Holds the widths of planes.
NvBufSurfaceDisplayScanFormat scanformat
Holds display scan format.
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
uint32_t blockheightlog2
Holds block height of the planes for blockLinear layout buffer.
uint32_t dataSize
Holds the amount of allocated memory.
@ NvBufSurfaceTag_VIDEO_CONVERT
tag for Video Transform/Composite/Blend.
@ NVBUF_MEM_HANDLE
Specifies NVRM Handle type.
struct NvBufSurface NvBufSurface
Holds information about batched buffers.
@ NVBUF_COLOR_FORMAT_NV12_12LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
@ NVBUF_COLOR_FORMAT_BGRx
Specifies BGRx-8-8-8-8 single plane.
@ NVBUF_COLOR_FORMAT_NV16_10LE
Specifies BT.601 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
NvBufSurfaceMemType memType
Holds the type of memory to be allocated.
@ NVBUF_COLOR_FORMAT_NV16_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:2:2 multi-planar.
bool isImportedBuf
Holds a flag for Imported buffer.
int32_t startofvaliddata
offset in bytes from the start of the buffer to the first valid byte.
@ NVBUF_COLOR_FORMAT_NV24_12LE_709_ER
Specifies BT.709 ER colorspace - Y/CbCr 12 bit 4:4:4 multi-planar.
NvBufSurfaceLayout layout
Holds BL or PL layout.
uint32_t secondfieldoffset
Holds offset of the second field for interlaced buffer.
uint32_t size
Holds the amount of memory to be allocated.
uint32_t gpuId
Holds a GPU ID.
int NvBufSurfaceUnMapEglImage(NvBufSurface *surf, int index)
Destroys the previously created EGLImage object(s).
Holds buffer parameters to map the buffer received from another process.
@ NVBUF_MEM_CUDA_UNIFIED
Specifies CUDA Unified memory type.
@ NVBUF_COLOR_FORMAT_NV12_10LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:0 10-bit multi-planar.
@ NVBUF_COLOR_FORMAT_NV12_12LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 12-bit multi-planar.
NvBufSurfaceLayout layout
Holds BL or PL.
int NvBufSurfaceAllocate(NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceAllocateParams *paramsext)
Allocate batch of buffers.
@ NVBUF_DRIVER_TYPE_UNKNOWN
@ NVBUF_MEM_CUDA_DEVICE
Specifies CUDA Device memory type.
uint32_t blockheightlog2[NVBUF_MAX_PLANES]
block height of the planes for blockLinear layout buffer.
void * reserved[STRUCTURE_PADDING]
Reserved fields for future use.
@ NVBUF_COLOR_FORMAT_YVU420_ER
Specifies BT.601 colorspace - YVU420 ER multi-planar.
@ NVBUF_COLOR_FORMAT_UYVP_709
Specifies BT.709 colorspace - 10 bit YUV 4:2:2 interleaved.
@ NVBUF_COLOR_FORMAT_YUV444_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
uint8_t reserved[60]
Reserved for future use.
@ NVBUF_COLOR_FORMAT_YUV420_709
Specifies BT.709 colorspace - YUV420 multi-planar.
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
@ NVBUF_COLOR_FORMAT_UYVP
Specifies BT.601 colorspace - 10 bit YUV 4:2:2 interleaved.
@ NVBUF_COLOR_FORMAT_xRGB
Specifies xRGB-8-8-8-8 single plane.
@ NVBUF_COLOR_FORMAT_YUV444_12LE_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
@ NVBUF_COLOR_FORMAT_NV24_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
#define NVBUF_MAX_PLANES
Defines the maximum number of planes.
@ NVBUF_LAYOUT_PITCH
Specifies pitch layout.
uint32_t gpuId
Holds the GPU ID.
@ NVBUF_MEM_DEFAULT
Specifies the default memory type, i.e.
@ NVBUF_COLOR_FORMAT_YUYV_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
@ NVBUF_MEM_SYSTEM
Specifies memory allocated by malloc().
uint64_t flags
Holds flags associated with the planes.
uint32_t numFilled
Holds the number valid and filled buffers.
int NvBufSurfaceDestroy(NvBufSurface *surf)
Free the batched buffers previously allocated through NvBufSurfaceCreate.
void * dataPtr
Holds a pointer to mapped nvmm memory.
@ NVBUF_COLOR_FORMAT_NV21_12LE
Specifies BT.601 colorspace - Y/CrCb 4:2:0 12-bit multi-planar.
uint32_t psize[NVBUF_MAX_PLANES]
Holds the sizes of planes in bytes.
The extended map parameters NvBufSurface.
@ NVBUF_COLOR_FORMAT_YUV444_10LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
struct NvBufSurfaceMapParams NvBufSurfaceMapParams
Holds buffer parameters to map the buffer received from another process.
@ NVBUF_COLOR_FORMAT_NV24
Specifies BT.601 colorspace - Y/CbCr 4:4:4 multi-planar.
struct NvBufSurfacePlaneParams NvBufSurfacePlaneParams
Holds plane wise parameters of a buffer.
@ NVBUF_COLOR_FORMAT_GRAY16_LE
Specifies 16 bit GRAY scale - single plane.
@ NVBUF_COLOR_FORMAT_ARGB
Specifies ARGB-8-8-8-8 single plane.
@ NVBUF_COLOR_FORMAT_YUV444_10LE_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
@ NVBUF_COLOR_FORMAT_YVYU
Specifies BT.601 colorspace - YUV 4:2:2 planar.
uint32_t offset[NVBUF_MAX_PLANES]
Holds the offsets of planes in bytes.
@ NVBUF_COLOR_FORMAT_NV12_10LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 10-bit multi-planar.
@ NVBUF_COLOR_FORMAT_NV12_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:0 multi-planar.
@ NVBUF_COLOR_FORMAT_xBGR
Specifies xBGR-8-8-8-8 single plane.
@ NVBUF_COLOR_FORMAT_YUYV
Specifies BT.601 colorspace - YUV 4:2:2 planar.
@ NVBUF_DRIVER_TYPE_NVGPU
@ NVBUF_COLOR_FORMAT_NV16_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 multi-planar.
uint8_t _reserved[6]
Reserved for alignment.
@ NVBUF_COLOR_FORMAT_NV24_10LE_ER
Specifies BT.601 ER colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
@ NVBUF_COLOR_FORMAT_B32F_G32F_R32F
Specifies BGR-32bit Floating point multiplanar plane.
NvBufSurfaceParamsEx * paramex
pointers of extended parameters of single buffer in the batch.
@ NVBUF_COLOR_FORMAT_NV16_10LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
@ NVBUF_COLOR_FORMAT_YUV444_12LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:4:4 12-bit multi-planar.
@ NVBUF_PLATFORM_TYPE_T210
@ NVBUF_MEM_CUDA_ARRAY
Specifies CUDA Array memory type.
Holds information about the underlying device.
#define STRUCTURE_PADDING
Defines the default padding length for reserved fields of structures.
void * cudaPtr
Holds a pointer to a mapped CUDA memory.
@ NVBUF_PLATFORM_TYPE_T234
NvBufSurfaceCreateParams params
Hold legacy NvBufSurface creation parameters.
struct NvBufSurfaceCudaIpcMemHandle_t NvBufSurfaceCudaIpcMemHandle
CUDA IPC memory handle for NvBufSurface.
@ NVBUF_COLOR_FORMAT_YUV444_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:4:4 multi-planar.
struct NvBufSurfaceParams NvBufSurfaceParams
Hold the information of single buffer in the batch.
@ NVBUF_PLATFORM_TYPE_UNKNOWN
Hold the information of single buffer in the batch.
Hold the information(extended) of single buffer in the batch.
@ NVBUF_COLOR_FORMAT_YUV444_10LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:4:4 10-bit multi-planar.
NvBufSurfaceMapPlaneParams planes[NVBUF_MAX_PLANES]
Holds plane parameters.
NvBufSurfaceTag memtag
components tag to be used for memory allocation
@ NVBUF_COLOR_FORMAT_NV21
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
int NvBufSurfaceGetMapParams(const NvBufSurface *surf, int index, NvBufSurfaceMapParams *params)
Get buffer information to map the buffer in another process.
@ NVBUF_COLOR_FORMAT_NV16_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
@ NVBUF_PLATFORM_TYPE_T264
@ NVBUF_COLOR_FORMAT_BGRA_10_10_10_2_709
Specifies Non-linear RGB BT.709 colorspace - BGRA-10-10-10-2 planar.
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Holds chroma subsampling parameters.
Hold the pointers of mapped buffer.
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Chroma Subsampling parameters.
int NvBufSurface2Raw(NvBufSurface *Surf, unsigned int index, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr)
Copies the NvBufSurface plane memory content to a raw buffer plane for a specific batched buffer.
@ NVBUF_COLOR_FORMAT_SIGNED_R16G16
Specifies color format for packed 2 signed shorts
@ NVBUF_COLOR_FORMAT_RGBA_10_10_10_2_2020
Specifies Non-linear RGB BT.2020 colorspace - RGBA-10-10-10-2 planar.
@ NVBUF_COLOR_FORMAT_INVALID
Specifies an invalid color format.
@ NVBUF_COLOR_FORMAT_RGB
Specifies RGB-8-8-8 single plane.
NvBufSurfaceCudaBuffer * cudaBuffer
Holds a pointer to CUDA buffer.
@ NVBUF_COLOR_FORMAT_RGBA_10_10_10_2_709
Specifies Non-linear RGB BT.709 colorspace - RGBA-10-10-10-2 planar.
uint64_t bufferDesc
Holds a DMABUF FD.
@ NVBUF_COLOR_FORMAT_R8_G8_B8
Specifies RGB- unsigned 8 bit multiplanar plane.
uint32_t secondfieldoffset[NVBUF_MAX_PLANES]
offset of the second field for interlaced buffer.
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
@ NVBUF_COLOR_FORMAT_UYVY_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 planar.
uint32_t physicaladdress[NVBUF_MAX_PLANES]
physical address of allocated planes.
void * _reserved[STRUCTURE_PADDING]
@ NVBUF_COLOR_FORMAT_UYVP_709_ER
Specifies BT.709 colorspace - 10 bit YUV ER 4:2:2 interleaved.
uint8_t reserved[64]
Reserved.
uint8_t reserved[64]
Reserved.
NvBufSurfacePlaneParamsEx planeParamsex
plane wise extended info
@ NVBUF_COLOR_FORMAT_NV16_10LE_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
int NvBufSurfaceFromFd(int dmabuf_fd, void **buffer)
Gets the NvBufSurface from the DMABUF FD.
uint32_t num_planes
Holds the number of planes.
int NvBufSurfaceUnMap(NvBufSurface *surf, int index, int plane)
Unmaps previously mapped buffer(s).
NvBufSurfaceCudaIpcMemHandle memHandle
@ NVBUF_DISPLAYSCANFORMAT_PROGRESSIVE
Progessive scan formats.
uint32_t pitch
Holds the pitches of planes in bytes.
@ NVBUF_COLOR_FORMAT_YUV444_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
uint32_t pitch[NVBUF_MAX_PLANES]
Holds the pitches of planes in bytes.
@ NVBUF_COLOR_FORMAT_YUV444_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 multi-planar.
@ NVBUF_COLOR_FORMAT_UYVY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
@ NVBUF_PLATFORM_TYPE_T256
uint32_t bytesPerPix[NVBUF_MAX_PLANES]
Holds the number of bytes occupied by a pixel in each plane.
uint32_t height
Holds the height of the buffer.
void * addr[NVBUF_MAX_PLANES]
Holds planewise pointers to a CPU mapped buffer.
struct NvBufSurfaceMapPlaneParams NvBufSurfaceMapPlaneParams
Holds plane parameters to map the buffer received from another process.
bool is_protected
get buffer vpr information.
uint32_t height
Holds the heights of planes.
@ NVBUF_COLOR_FORMAT_NV24_10LE_709
Specifies BT.709 colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
@ NVBUF_COLOR_FORMAT_UYVY_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 planar.
@ NVBUF_MAP_READ_WRITE
Specifies NvBufSurface mapping type "read/write.".
@ NVBUF_COLOR_FORMAT_NV24_12LE_709
Specifies BT.709 colorspace - Y/CbCr 12 bit 4:4:4 multi-planar.
NvBufSurfaceTag
Defines tags that identify the components requesting a memory allocation.
void * extendedMapParams
Holds the extended Map parameters.
@ NVBUF_COLOR_FORMAT_LAST
NvBufSurfaceParams * surfaceList
Holds a pointer to an array of batched buffers.
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
@ NVBUF_GPU_L2_CACHE_FLUSH
Hold extended parameters required to allocate NvBufSurface.
struct NvBufSurfacePlaneParamsEx NvBufSurfacePlaneParamsEx
Holds plane wise parameters(extended) of a buffer.
@ NVBUF_COLOR_FORMAT_YVU420
Specifies BT.601 colorspace - YUV420 multi-planar.
uint32_t height[NVBUF_MAX_PLANES]
Holds the heights of planes.
int Raw2NvBufSurface(unsigned char *ptr, unsigned int index, unsigned int plane, unsigned int in_width, unsigned int in_height, NvBufSurface *Surf)
Copies the raw buffer plane memory content to the NvBufSurface plane memory of a specific batched buf...
void * extMem
Holds a pointer to external CUDA memory for imported CUDA buffers.
@ NVBUF_COLOR_FORMAT_YUV444_12LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:4:4 12-bit multi-planar.
NvBufSurfacePlaneParams planeParams
Holds planewise information (width, height, pitch, offset, etc.).
@ NVBUF_COLOR_FORMAT_UYVP_ER
Specifies BT.601 colorspace - 10 bit YUV ER 4:2:2 interleaved.
NvBufSurfaceMemType memType
Holds type of memory for buffers in the batch.
@ NVBUF_COLOR_FORMAT_YVYU_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
@ NVBUF_COLOR_FORMAT_NV21_10LE
Specifies BT.601 colorspace - Y/CrCb 4:2:0 10-bit multi-planar.
int NvBufSurfaceCopy(NvBufSurface *srcSurf, NvBufSurface *dstSurf)
Copies the content of source batched buffer(s) to destination batched buffer(s).
NvBufSurfaceLayout
Specifies layout formats for NvBufSurface video planes.
bool isVicPresent
Indicates if VIC is present on the platform.
struct NvBufSurfaceCudaBuffer NvBufSurfaceCudaBuffer
Holds information of CUDA buffer.
@ NVBUF_GPU_L2_CACHE_FLUSH_INVALIDATE
@ NVBUF_COLOR_FORMAT_GRAY8_ER
Specifies 8 bit GRAY scale ER - single plane.
int NvBufSurfaceSyncForCpu(NvBufSurface *surf, int index, int plane)
Syncs the HW memory cache for the CPU.
uint32_t _reservedParam
Used void* from custom param for 64 bit machine, using other uint32_t param.
uint64_t bufferDesc
Holds a DMABUF FD.
void * _reserved[STRUCTURE_PADDING]
@ NVBUF_COLOR_FORMAT_YUV422
Specifies BT.601 colorspace - YUV422 multi-planar.
@ NVBUF_COLOR_FORMAT_NV21_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
NvBufSurfaceMemType memType
Holds type of memory.
@ NVBUF_COLOR_FORMAT_YUV444_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:4:4 multi-planar.
@ NVBUF_COLOR_FORMAT_NV12_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
@ NVBUF_PLATFORM_TYPE_T186
struct NvBufSurfaceCreateParams NvBufSurfaceCreateParams
Holds parameters required to allocate an NvBufSurface.
@ NVBUF_MAP_READ
Specifies NvBufSurface mapping type "read.".
int32_t sizeofvaliddatainbytes
size of the valid data from the first to the last valid byte.
@ NVBUF_LAYOUT_BLOCK_LINEAR
Specifies block linear layout.
@ NVBUF_COLOR_FORMAT_NV16_10LE_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
NvBufSurfaceLayout layout
Holds the surface layout.
uint8_t chromaLocHoriz
location settings
@ NVBUF_COLOR_FORMAT_NV24_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:4:4 multi-planar.
@ NVBUF_COLOR_FORMAT_YUV444
Specifies BT.601 colorspace - YUV444 multi-planar.
CUDA IPC memory handle for NvBufSurface.
@ NVBUF_COLOR_FORMAT_NV24_10LE
Specifies BT.601 colorspace - Y/CrCb 4:4:4 10-bit multi-planar.
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
uint32_t totalSize
Holds the total size of allocated memory.
int NvBufSurfaceMapNvmmBuffer(NvBufSurface *surf, int index)
Creates an NVMM buffer from the memory of one or more NvBufSurface buffers.
struct NvBufSurfaceExtendedMapParams_t NvBufSurfaceExtendedMapParams
The extended map parameters NvBufSurface.
@ NVBUF_COLOR_FORMAT_YUV444_12LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
@ NVBUF_COLOR_FORMAT_ABGR
Specifies ABGR-8-8-8-8 single plane.
NvBufSurfaceMappedAddr mappedAddr
Holds pointers to mapped buffers.
@ NVBUF_COLOR_FORMAT_NV16_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 multi-planar.
@ NVBUF_COLOR_FORMAT_NV24_12LE_ER
Specifies BT.601 ER colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
NvBufSurfacePlatformType platformType
Indicates the Jetson platform type.
int NvBufSurfaceImport(NvBufSurface **out_nvbuf_surf, const NvBufSurfaceMapParams *in_params)
Import parameters received from another process and create hardware buffer.
@ NVBUF_COLOR_FORMAT_NV12_10LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
@ NVBUF_MAP_WRITE
Specifies NvBufSurface mapping type "write.".
Holds plane wise parameters of a buffer.
@ NVBUF_COLOR_FORMAT_NV16_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 multi-planar.
@ NVBUF_COLOR_FORMAT_NV12
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
@ NvBufSurfaceTag_VIDEO_ENC
tag for H264/H265 Video Encoder.
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
chroma subsampling parameters.
void * mipmap
Holds a pointer to external CUDA mipmaped array for imported CUDA buffers.
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
int NvBufSurfaceCreate(NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceCreateParams *params)
Allocates a batch of buffers.
struct NvBufSurfaceDeviceInfo NvBufSurfaceDeviceInfo
Holds information about the underlying device.
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
@ NVBUF_COLOR_FORMAT_NV12_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
@ NVBUF_COLOR_FORMAT_BGR
Specifies BGR-8-8-8 single plane.
uint64_t fd
Holds a DMABUF FD.
bool isContiguous
Holds a "contiguous memory" flag.
@ NvBufSurfaceTag_JPEG
tag for Jpeg Encoder/Decoder.
@ NVBUF_PLATFORM_TYPE_T194
@ NVBUF_GPU_L2_CACHE_INVALIDATE
struct NvBufSurfaceChromaSubsamplingParams NvBufSurfaceChromaSubsamplingParams
Holds Chroma Subsampling parameters for NvBufSurface allocation.
uint32_t pitch
Holds the pitch of the buffer.
@ NVBUF_MEM_SURFACE_ARRAY
Specifies NVRM Surface Array type.
@ NVBUF_COLOR_FORMAT_NV12_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
int NvBufSurfaceUnMapNvmmBuffer(NvBufSurface *surf, int index)
Destroys the previously created NVMM buffer.
int NvBufSurfaceMapEglImage(NvBufSurface *surf, int index)
Creates an EGLImage from the memory of one or more NvBufSurface buffers.
@ NVBUF_COLOR_FORMAT_UYVP_2020
Specifies BT.2020 colorspace - 10 bit YUV 4:2:2 interleaved.
@ NVBUF_COLOR_FORMAT_RGBA
Specifies RGBA-8-8-8-8 single plane.
void * basePtr
Holds a base pointer to allocated CUDA memory.
@ NVBUF_COLOR_FORMAT_BGRA_10_10_10_2_2020
Specifies Non-linear RGB BT.2020 colorspace - BGRA-10-10-10-2 planar.
uint64_t flags[NVBUF_MAX_PLANES]
flags associated with planes
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
int NvBufSurfaceUnMapCudaBuffer(NvBufSurface *surf, int index)
Destroys the previously created CUDA buffer.
@ NVBUF_COLOR_FORMAT_UYVY_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:2 planar.
Holds parameters required to allocate an NvBufSurface.
uint32_t batchSize
Holds the batch size.
NvBufSurfaceMemMapFlags
Defines mapping types of NvBufSurface.
NvBufSurfaceDriverType
Defines the type of underlying kernel driver detected for GPU access.
struct NvBufSurfaceGPUL2SyncParams NvBufSurfaceGPUL2SyncParams
bool isIntegratedGpu
Indicates GPU is integrated GPU or not.
@ NVBUF_COLOR_FORMAT_NV24_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
int NvBufSurfaceSyncGpuL2CacheForDevice(NvBufSurface *surf, int index, NvBufSurfaceGPUL2SyncParams *params)
Syncs the GPU L2 cache memory for the device.
@ NVBUF_COLOR_FORMAT_YUV444_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
void * dataPtr
Holds a page aligned data pointer to CUDA memory for image buffers if CUDA allocated address is not p...
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
@ NVBUF_COLOR_FORMAT_NV12_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:0 multi-planar.
@ NVBUF_COLOR_FORMAT_YUV420
Specifies BT.601 colorspace - YUV420 multi-planar.
@ NVBUF_COLOR_FORMAT_NV24_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 multi-planar.
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
@ NvBufSurfaceTag_NONE
tag None.
uint32_t width
Holds the width of the buffer.
@ NVBUF_COLOR_FORMAT_R32F_G32F_B32F
Specifies RGB-32bit Floating point multiplanar plane.
@ NVBUF_COLOR_FORMAT_NV24_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 12 bit 4:4:4 multi-planar.
@ NVBUF_COLOR_FORMAT_RGBx
Specifies RGBx-8-8-8-8 single plane.
void * eglImage
Holds a pointer to a mapped EGLImage.
@ NVBUF_COLOR_FORMAT_NV24_10LE_709_ER
Specifies BT.709 ER colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.