NVIDIA DeepStream SDK API Reference

8.0 Release
nvbufsurface.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
30 #ifndef NVBUFSURFACE_H_
31 #define NVBUFSURFACE_H_
32 
33 #include <stdint.h>
34 #include <stdbool.h>
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
48 #define STRUCTURE_PADDING 4
49 
51 #define NVBUF_MAX_PLANES 4
52 
57 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_HORIZ_DEFAULT 0
58 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_VERT_DEFAULT 1
59 
60 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_PARAMS_DEFAULT \
61  { \
62  NVBUFSURFACE_CHROMA_SUBSAMPLING_HORIZ_DEFAULT, \
63  NVBUFSURFACE_CHROMA_SUBSAMPLING_VERT_DEFAULT \
64  }
65 
69 typedef enum
70 {
77 
84 typedef enum
85 {
101 
105 typedef enum
106 {
317 
321 typedef enum
322 {
328 
332 typedef enum
333 {
351 
355 typedef enum
356 {
362 
367 {
383 
388 {
390  uint32_t num_planes;
406 
407 
416 {
418  uint8_t chromaLocHoriz;
419  uint8_t chromaLocVert;
421  uint8_t _reserved[6];
423 
427 typedef struct NvBufSurfaceCreateParams {
429  uint32_t gpuId;
431  uint32_t width;
433  uint32_t height;
436  uint32_t size;
450 
471  uint32_t _reservedParam;
475 
479 typedef struct NvBufSurfaceMappedAddr {
483  void *eglImage;
485  void *nvmmPtr;
487  void *cudaPtr;
491 
495 typedef struct NvBufSurfaceParamsEx {
509 
512 
517 typedef struct NvBufSurfaceCudaBuffer {
524  void *basePtr;
530  void *dataPtr;
532  void *extMem;
534  void *mipmap;
536  uint8_t reserved[64];
538 
542 typedef struct NvBufSurfaceParams {
544  uint32_t width;
546  uint32_t height;
548  uint32_t pitch;
555  uint64_t bufferDesc;
557  uint32_t dataSize;
560  void * dataPtr;
570 
573 
577 typedef struct NvBufSurface {
579  uint32_t gpuId;
581  uint32_t batchSize;
584  uint32_t numFilled;
594 
596 } NvBufSurface;
597 
602 {
604  uint32_t width;
606  uint32_t height;
608  uint32_t pitch;
610  uint32_t offset;
612  uint32_t psize;
616  uint32_t blockheightlog2;
618  uint64_t flags;
620  uint8_t reserved[64];
622 
627 {
628  char reserved[64];
630 
635 {
637  void *reserved[64];
639 
643 typedef struct NvBufSurfaceMapParams {
645  uint32_t num_planes;
647  uint32_t gpuId;
649  uint64_t fd;
651  uint32_t totalSize;
669 
673 typedef struct NvBufSurfaceNvmmBuffer {
675  void *dataPtr;
677  uint64_t bufferDesc;
679  uint8_t reserved[64];
681 
685 typedef enum {
690 
694 typedef struct NvBufSurfaceDeviceInfo {
700  uint8_t reserved[64];
702 
722 int NvBufSurfaceCreate (NvBufSurface **surf, uint32_t batchSize,
723  NvBufSurfaceCreateParams *params);
724 
741 int NvBufSurfaceAllocate (NvBufSurface **surf, uint32_t batchSize,
742  NvBufSurfaceAllocateParams *paramsext);
743 
752 
792 int NvBufSurfaceMap (NvBufSurface *surf, int index, int plane, NvBufSurfaceMemMapFlags type);
793 
805 int NvBufSurfaceUnMap (NvBufSurface *surf, int index, int plane);
806 
823 int NvBufSurfaceCopy (NvBufSurface *srcSurf, NvBufSurface *dstSurf);
824 
841 int NvBufSurface2Raw (NvBufSurface *Surf, unsigned int index, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr);
842 
859 int Raw2NvBufSurface (unsigned char *ptr, unsigned int index, unsigned int plane, unsigned int in_width, unsigned int in_height, NvBufSurface *Surf);
860 
875 int NvBufSurfaceSyncForCpu (NvBufSurface *surf, int index, int plane);
876 
891 int NvBufSurfaceSyncForDevice (NvBufSurface *surf, int index, int plane);
892 
901 int NvBufSurfaceFromFd (int dmabuf_fd, void **buffer);
902 
918 int NvBufSurfaceMemSet (NvBufSurface *surf, int index, int plane, uint8_t value);
919 
946 int NvBufSurfaceMapEglImage (NvBufSurface *surf, int index);
947 
957 int NvBufSurfaceUnMapEglImage (NvBufSurface *surf, int index);
958 
970 int NvBufSurfaceImport (NvBufSurface **out_nvbuf_surf, const NvBufSurfaceMapParams *in_params);
971 
981 int NvBufSurfaceGetMapParams (const NvBufSurface *surf, int index, NvBufSurfaceMapParams *params);
982 
1008 int NvBufSurfaceMapCudaBuffer (NvBufSurface *surf, int index);
1009 
1019 int NvBufSurfaceUnMapCudaBuffer (NvBufSurface *surf, int index);
1020 
1046 int NvBufSurfaceMapNvmmBuffer (NvBufSurface *surf, int index);
1047 
1057 int NvBufSurfaceUnMapNvmmBuffer (NvBufSurface *surf, int index);
1058 
1067 
1068 #ifdef __cplusplus
1069 }
1070 #endif
1071 #endif /* NVBUFSURFACE_H_ */
NvBufSurfaceParamsEx
struct NvBufSurfaceParamsEx NvBufSurfaceParamsEx
Hold the information(extended) of single buffer in the batch.
NVBUF_COLOR_FORMAT_NV12_10LE
@ NVBUF_COLOR_FORMAT_NV12_10LE
Specifies BT.601 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: nvbufsurface.h:166
NVBUF_COLOR_FORMAT_YUV420_709_ER
@ NVBUF_COLOR_FORMAT_YUV420_709_ER
Specifies BT.709 colorspace - YUV420 ER multi-planar.
Definition: nvbufsurface.h:172
NvBufSurfaceParams::width
uint32_t width
Holds the width of the buffer.
Definition: nvbufsurface.h:544
NvBufSurfaceMapParams::planes
NvBufSurfaceMapPlaneParams planes[NVBUF_MAX_PLANES]
Holds plane parameters.
Definition: nvbufsurface.h:663
NvBufSurfaceTag_VIDEO_DEC
@ NvBufSurfaceTag_VIDEO_DEC
tag for H264/H265/VP9 Video Decoder.
Definition: nvbufsurface.h:97
NVBUF_COLOR_FORMAT_NV12_709
@ NVBUF_COLOR_FORMAT_NV12_709
Specifies BT.709 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbufsurface.h:174
NvBufSurfaceMappedAddr
struct NvBufSurfaceMappedAddr NvBufSurfaceMappedAddr
Hold the pointers of mapped buffer.
NvBufSurfacePlaneParamsEx::_reserved
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
Definition: nvbufsurface.h:381
NVBUF_COLOR_FORMAT_YUV420_2020
@ NVBUF_COLOR_FORMAT_YUV420_2020
Specifies BT.2020 colorspace - YUV420 multi-planar.
Definition: nvbufsurface.h:178
NvBufSurfaceMapPlaneParams::psize
uint32_t psize
Holds the sizes of planes in bytes.
Definition: nvbufsurface.h:612
NVBUF_COLOR_FORMAT_NV16_12LE
@ NVBUF_COLOR_FORMAT_NV16_12LE
Specifies BT.601 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Definition: nvbufsurface.h:306
NvBufSurfaceChromaSubsamplingParams
Holds Chroma Subsampling parameters for NvBufSurface allocation.
Definition: nvbufsurface.h:415
NvBufSurfacePlaneParamsEx
Holds plane wise parameters(extended) of a buffer.
Definition: nvbufsurface.h:366
NvBufSurfaceParamsEx::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: nvbufsurface.h:510
NVBUF_MEM_CUDA_PINNED
@ NVBUF_MEM_CUDA_PINNED
Specifies CUDA Host memory type.
Definition: nvbufsurface.h:339
NvBufSurface::isContiguous
bool isContiguous
Holds an "is contiguous" flag.
Definition: nvbufsurface.h:587
NVBUF_COLOR_FORMAT_A32
@ NVBUF_COLOR_FORMAT_A32
Specifies Optical flow SAD calculation Buffer format.
Definition: nvbufsurface.h:244
NVBUF_COLOR_FORMAT_NV12_12LE_709_ER
@ NVBUF_COLOR_FORMAT_NV12_12LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:0 12-bit multi-planar.
Definition: nvbufsurface.h:282
NvBufSurfaceMapPlaneParams
Holds plane parameters to map the buffer received from another process.
Definition: nvbufsurface.h:601
NvBufSurfaceAllocateParams::displayscanformat
NvBufSurfaceDisplayScanFormat displayscanformat
Display scan format.
Definition: nvbufsurface.h:459
NvBufSurfaceSyncForDevice
int NvBufSurfaceSyncForDevice(NvBufSurface *surf, int index, int plane)
Syncs the hardware memory cache for the device.
NvBufSurface::gpuId
uint32_t gpuId
Holds a GPU ID.
Definition: nvbufsurface.h:579
NvBufSurfaceTag_PROTECTED
@ NvBufSurfaceTag_PROTECTED
tag for VPR Buffers.
Definition: nvbufsurface.h:93
NvBufSurfaceMap
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
@ NVBUF_COLOR_FORMAT_NV16_12LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Definition: nvbufsurface.h:310
NvBufSurfaceCreateParams::height
uint32_t height
Holds the height of the buffer.
Definition: nvbufsurface.h:433
NVBUF_COLOR_FORMAT_NV16_12LE_2020
@ NVBUF_COLOR_FORMAT_NV16_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Definition: nvbufsurface.h:314
NVBUF_COLOR_FORMAT_NV16_12LE_709_ER
@ NVBUF_COLOR_FORMAT_NV16_12LE_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Definition: nvbufsurface.h:312
NvBufSurfaceDeviceInfo::driverType
NvBufSurfaceDriverType driverType
The detected device type (nvgpu, OpenRM, etc.).
Definition: nvbufsurface.h:696
NvBufSurfaceParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: nvbufsurface.h:571
NvBufSurfacePlaneParams::pitch
uint32_t pitch[NVBUF_MAX_PLANES]
Holds the pitches of planes in bytes.
Definition: nvbufsurface.h:396
NVBUF_COLOR_FORMAT_NV16_12LE_ER
@ NVBUF_COLOR_FORMAT_NV16_12LE_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Definition: nvbufsurface.h:308
NVBUF_COLOR_FORMAT_VYUY
@ NVBUF_COLOR_FORMAT_VYUY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbufsurface.h:132
NVBUF_DISPLAYSCANFORMAT_INTERLACED
@ NVBUF_DISPLAYSCANFORMAT_INTERLACED
Interlaced scan formats.
Definition: nvbufsurface.h:360
NvBufSurfaceMapParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format.
Definition: nvbufsurface.h:659
NVBUF_COLOR_FORMAT_YUV444_10LE_709_ER
@ NVBUF_COLOR_FORMAT_YUV444_10LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:4:4 10-bit multi-planar.
Definition: nvbufsurface.h:264
NVBUF_COLOR_FORMAT_B8_G8_R8
@ NVBUF_COLOR_FORMAT_B8_G8_R8
Specifies BGR- unsigned 8 bit multiplanar plane.
Definition: nvbufsurface.h:194
NVBUF_COLOR_FORMAT_UYVY
@ NVBUF_COLOR_FORMAT_UYVY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbufsurface.h:128
NVBUF_COLOR_FORMAT_VYUY_ER
@ NVBUF_COLOR_FORMAT_VYUY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbufsurface.h:134
NvBufSurfaceDisplayScanFormat
NvBufSurfaceDisplayScanFormat
Defines display scan formats for NvBufSurface video planes.
Definition: nvbufsurface.h:355
NvBufSurfaceGetDeviceInfo
int NvBufSurfaceGetDeviceInfo(NvBufSurfaceDeviceInfo *info)
Retrieves information about the underlying GPU device driver.
NvBufSurfacePlaneParams::num_planes
uint32_t num_planes
Holds the number of planes.
Definition: nvbufsurface.h:390
NVBUF_COLOR_FORMAT_BGRA64_LE
@ NVBUF_COLOR_FORMAT_BGRA64_LE
Specifies 64 bit BGRA (B16 G16 R16 A16) interleaved.
Definition: nvbufsurface.h:294
NvBufSurfaceTag_CAMERA
@ NvBufSurfaceTag_CAMERA
tag for Camera.
Definition: nvbufsurface.h:89
NvBufSurfacePlaneParamsEx::secondfieldoffset
uint32_t secondfieldoffset[NVBUF_MAX_PLANES]
offset of the second field for interlaced buffer.
Definition: nvbufsurface.h:371
NVBUF_DRIVER_TYPE_RM
@ NVBUF_DRIVER_TYPE_RM
Definition: nvbufsurface.h:688
NvBufSurfaceMapPlaneParams::offset
uint32_t offset
Holds the offsets of planes in bytes.
Definition: nvbufsurface.h:610
NVBUF_COLOR_FORMAT_GRAY8
@ NVBUF_COLOR_FORMAT_GRAY8
Specifies 8 bit GRAY scale - single plane.
Definition: nvbufsurface.h:110
NVBUF_COLOR_FORMAT_BGRA
@ NVBUF_COLOR_FORMAT_BGRA
Specifies BGRA-8-8-8-8 single plane.
Definition: nvbufsurface.h:148
NvBufSurfaceNvmmBuffer
struct NvBufSurfaceNvmmBuffer NvBufSurfaceNvmmBuffer
Holds information about mapped CUDA buffer.
NvBufSurfacePlaneParamsEx::physicaladdress
uint32_t physicaladdress[NVBUF_MAX_PLANES]
physical address of allocated planes.
Definition: nvbufsurface.h:375
NvBufSurfaceNvmmBuffer
Holds information about mapped CUDA buffer.
Definition: nvbufsurface.h:673
NvBufSurfaceMemSet
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
@ NVBUF_COLOR_FORMAT_NV12_12LE
Specifies BT.601 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
Definition: nvbufsurface.h:168
NvBufSurfaceAllocateParams
struct NvBufSurfaceAllocateParams NvBufSurfaceAllocateParams
Hold extended parameters required to allocate NvBufSurface.
NVBUF_COLOR_FORMAT_NV16
@ NVBUF_COLOR_FORMAT_NV16
Specifies BT.601 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbufsurface.h:208
NVBUF_COLOR_FORMAT_YUV420_ER
@ NVBUF_COLOR_FORMAT_YUV420_ER
Specifies BT.601 colorspace - YUV420 ER multi-planar.
Definition: nvbufsurface.h:116
NvBufSurfaceCudaBuffer
Holds information of CUDA buffer.
Definition: nvbufsurface.h:517
NvBufSurface
Holds information about batched buffers.
Definition: nvbufsurface.h:577
NVBUF_COLOR_FORMAT_NV24_709_ER
@ NVBUF_COLOR_FORMAT_NV24_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbufsurface.h:226
NvBufSurfaceMapCudaBuffer
int NvBufSurfaceMapCudaBuffer(NvBufSurface *surf, int index)
Creates an CUDA buffer from the memory of one or more NvBufSurface buffers.
NvBufSurfaceMapPlaneParams::width
uint32_t width
Holds the widths of planes.
Definition: nvbufsurface.h:604
NvBufSurfaceMappedAddr::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: nvbufsurface.h:489
NvBufSurfaceAllocateParams::disablePitchPadding
bool disablePitchPadding
disable pitch padding allocation only applicable for cuda and system memory allocation pitch would be...
Definition: nvbufsurface.h:469
NvBufSurfaceCudaBuffer::mipmap
void * mipmap
Holds a pointer to external CUDA mipmaped array for imported CUDA buffers.
Definition: nvbufsurface.h:534
NvBufSurfaceMapParams::scanformat
NvBufSurfaceDisplayScanFormat scanformat
Holds display scan format.
Definition: nvbufsurface.h:657
NvBufSurfaceMapPlaneParams::blockheightlog2
uint32_t blockheightlog2
Holds block height of the planes for blockLinear layout buffer.
Definition: nvbufsurface.h:616
NvBufSurfaceParams::dataSize
uint32_t dataSize
Holds the amount of allocated memory.
Definition: nvbufsurface.h:557
NvBufSurfaceTag_VIDEO_CONVERT
@ NvBufSurfaceTag_VIDEO_CONVERT
tag for Video Transform/Composite/Blend.
Definition: nvbufsurface.h:99
NVBUF_MEM_HANDLE
@ NVBUF_MEM_HANDLE
Specifies NVRM Handle type.
Definition: nvbufsurface.h:347
NvBufSurface
struct NvBufSurface NvBufSurface
Holds information about batched buffers.
NVBUF_COLOR_FORMAT_NV12_12LE_709
@ NVBUF_COLOR_FORMAT_NV12_12LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
Definition: nvbufsurface.h:280
NVBUF_COLOR_FORMAT_BGRx
@ NVBUF_COLOR_FORMAT_BGRx
Specifies BGRx-8-8-8-8 single plane.
Definition: nvbufsurface.h:156
NVBUF_COLOR_FORMAT_NV16_10LE
@ NVBUF_COLOR_FORMAT_NV16_10LE
Specifies BT.601 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
Definition: nvbufsurface.h:210
NvBufSurfaceCreateParams::memType
NvBufSurfaceMemType memType
Holds the type of memory to be allocated.
Definition: nvbufsurface.h:446
NVBUF_COLOR_FORMAT_NV16_709_ER
@ NVBUF_COLOR_FORMAT_NV16_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbufsurface.h:224
NvBufSurfaceCudaIpcMemHandle_t::reserved
char reserved[64]
Definition: nvbufsurface.h:628
NvBufSurface::isImportedBuf
bool isImportedBuf
Holds a flag for Imported buffer.
Definition: nvbufsurface.h:593
NvBufSurfaceParamsEx::startofvaliddata
int32_t startofvaliddata
offset in bytes from the start of the buffer to the first valid byte.
Definition: nvbufsurface.h:498
NvBufSurfaceMapParams::layout
NvBufSurfaceLayout layout
Holds BL or PL layout.
Definition: nvbufsurface.h:655
NvBufSurfaceMapPlaneParams::secondfieldoffset
uint32_t secondfieldoffset
Holds offset of the second field for interlaced buffer.
Definition: nvbufsurface.h:614
NvBufSurfaceMapParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: nvbufsurface.h:667
NvBufSurfaceCreateParams::size
uint32_t size
Holds the amount of memory to be allocated.
Definition: nvbufsurface.h:436
NvBufSurfaceMapParams::gpuId
uint32_t gpuId
Holds a GPU ID.
Definition: nvbufsurface.h:647
NvBufSurfaceUnMapEglImage
int NvBufSurfaceUnMapEglImage(NvBufSurface *surf, int index)
Destroys the previously created EGLImage object(s).
NvBufSurfaceMapParams
Holds buffer parameters to map the buffer received from another process.
Definition: nvbufsurface.h:643
NVBUF_MEM_CUDA_UNIFIED
@ NVBUF_MEM_CUDA_UNIFIED
Specifies CUDA Unified memory type.
Definition: nvbufsurface.h:343
NVBUF_COLOR_FORMAT_NV12_10LE_709_ER
@ NVBUF_COLOR_FORMAT_NV12_10LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:0 10-bit multi-planar.
Definition: nvbufsurface.h:186
NVBUF_COLOR_FORMAT_NV12_12LE_ER
@ NVBUF_COLOR_FORMAT_NV12_12LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 12-bit multi-planar.
Definition: nvbufsurface.h:278
NvBufSurfaceParams::layout
NvBufSurfaceLayout layout
Holds BL or PL.
Definition: nvbufsurface.h:552
NvBufSurfaceAllocate
int NvBufSurfaceAllocate(NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceAllocateParams *paramsext)
Allocate batch of buffers.
NVBUF_DRIVER_TYPE_UNKNOWN
@ NVBUF_DRIVER_TYPE_UNKNOWN
Definition: nvbufsurface.h:686
NVBUF_MEM_CUDA_DEVICE
@ NVBUF_MEM_CUDA_DEVICE
Specifies CUDA Device memory type.
Definition: nvbufsurface.h:341
NVBUF_COLOR_FORMAT_YVU420_ER
@ NVBUF_COLOR_FORMAT_YVU420_ER
Specifies BT.601 colorspace - YVU420 ER multi-planar.
Definition: nvbufsurface.h:118
NVBUF_COLOR_FORMAT_YUV444_709
@ NVBUF_COLOR_FORMAT_YUV444_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbufsurface.h:252
NVBUF_COLOR_FORMAT_YUV420_709
@ NVBUF_COLOR_FORMAT_YUV420_709
Specifies BT.709 colorspace - YUV420 multi-planar.
Definition: nvbufsurface.h:170
NvBufSurfaceMappedAddr::addr
void * addr[NVBUF_MAX_PLANES]
Holds planewise pointers to a CPU mapped buffer.
Definition: nvbufsurface.h:481
NVBUF_COLOR_FORMAT_UYVP
@ NVBUF_COLOR_FORMAT_UYVP
Specifies BT.601 colorspace - 10 bit YUV 4:2:2 interleaved.
Definition: nvbufsurface.h:246
NVBUF_COLOR_FORMAT_xRGB
@ NVBUF_COLOR_FORMAT_xRGB
Specifies xRGB-8-8-8-8 single plane.
Definition: nvbufsurface.h:158
NVBUF_COLOR_FORMAT_YUV444_12LE_709
@ NVBUF_COLOR_FORMAT_YUV444_12LE_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
Definition: nvbufsurface.h:272
NVBUF_COLOR_FORMAT_NV24_709
@ NVBUF_COLOR_FORMAT_NV24_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbufsurface.h:222
NvBufSurface::surfaceList
NvBufSurfaceParams * surfaceList
Holds a pointer to an array of batched buffers.
Definition: nvbufsurface.h:591
NVBUF_MAX_PLANES
#define NVBUF_MAX_PLANES
Defines the maximum number of planes.
Definition: nvbufsurface.h:51
NVBUF_LAYOUT_PITCH
@ NVBUF_LAYOUT_PITCH
Specifies pitch layout.
Definition: nvbufsurface.h:324
NvBufSurfaceCreateParams::gpuId
uint32_t gpuId
Holds the GPU ID.
Definition: nvbufsurface.h:429
NVBUF_MEM_DEFAULT
@ NVBUF_MEM_DEFAULT
Specifies the default memory type, i.e.
Definition: nvbufsurface.h:337
NVBUF_COLOR_FORMAT_YUYV_ER
@ NVBUF_COLOR_FORMAT_YUYV_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbufsurface.h:138
NVBUF_MEM_SYSTEM
@ NVBUF_MEM_SYSTEM
Specifies memory allocated by malloc().
Definition: nvbufsurface.h:349
NvBufSurfaceMapPlaneParams::flags
uint64_t flags
Holds flags associated with the planes.
Definition: nvbufsurface.h:618
NvBufSurface::numFilled
uint32_t numFilled
Holds the number valid and filled buffers.
Definition: nvbufsurface.h:584
NvBufSurfaceDestroy
int NvBufSurfaceDestroy(NvBufSurface *surf)
Free the batched buffers previously allocated through NvBufSurfaceCreate.
NVBUF_COLOR_FORMAT_NV21_12LE
@ NVBUF_COLOR_FORMAT_NV21_12LE
Specifies BT.601 colorspace - Y/CrCb 4:2:0 12-bit multi-planar.
Definition: nvbufsurface.h:204
NvBufSurfaceExtendedMapParams_t
The extended map parameters NvBufSurface.
Definition: nvbufsurface.h:634
NVBUF_COLOR_FORMAT_YUV444_10LE
@ NVBUF_COLOR_FORMAT_YUV444_10LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
Definition: nvbufsurface.h:258
NvBufSurfaceMapParams
struct NvBufSurfaceMapParams NvBufSurfaceMapParams
Holds buffer parameters to map the buffer received from another process.
NVBUF_COLOR_FORMAT_NV24
@ NVBUF_COLOR_FORMAT_NV24
Specifies BT.601 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbufsurface.h:212
NvBufSurfacePlaneParams
struct NvBufSurfacePlaneParams NvBufSurfacePlaneParams
Holds plane wise parameters of a buffer.
NVBUF_COLOR_FORMAT_GRAY16_LE
@ NVBUF_COLOR_FORMAT_GRAY16_LE
Specifies 16 bit GRAY scale - single plane.
Definition: nvbufsurface.h:292
NVBUF_COLOR_FORMAT_ARGB
@ NVBUF_COLOR_FORMAT_ARGB
Specifies ARGB-8-8-8-8 single plane.
Definition: nvbufsurface.h:150
NVBUF_COLOR_FORMAT_YUV444_10LE_709
@ NVBUF_COLOR_FORMAT_YUV444_10LE_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
Definition: nvbufsurface.h:262
NVBUF_COLOR_FORMAT_YVYU
@ NVBUF_COLOR_FORMAT_YVYU
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbufsurface.h:140
NVBUF_COLOR_FORMAT_NV12_10LE_ER
@ NVBUF_COLOR_FORMAT_NV12_10LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 10-bit multi-planar.
Definition: nvbufsurface.h:182
NVBUF_COLOR_FORMAT_NV12_2020
@ NVBUF_COLOR_FORMAT_NV12_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbufsurface.h:180
NVBUF_COLOR_FORMAT_xBGR
@ NVBUF_COLOR_FORMAT_xBGR
Specifies xBGR-8-8-8-8 single plane.
Definition: nvbufsurface.h:160
NvBufSurfaceMappedAddr::eglImage
void * eglImage
Holds a pointer to a mapped EGLImage.
Definition: nvbufsurface.h:483
NvBufSurfaceDeviceInfo::reserved
uint8_t reserved[64]
Reserved for future use.
Definition: nvbufsurface.h:700
NVBUF_COLOR_FORMAT_YUYV
@ NVBUF_COLOR_FORMAT_YUYV
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbufsurface.h:136
NVBUF_DRIVER_TYPE_NVGPU
@ NVBUF_DRIVER_TYPE_NVGPU
Definition: nvbufsurface.h:687
NvBufSurfacePlaneParams::offset
uint32_t offset[NVBUF_MAX_PLANES]
Holds the offsets of planes in bytes.
Definition: nvbufsurface.h:398
NVBUF_COLOR_FORMAT_NV16_709
@ NVBUF_COLOR_FORMAT_NV16_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbufsurface.h:220
NVBUF_COLOR_FORMAT_B32F_G32F_R32F
@ NVBUF_COLOR_FORMAT_B32F_G32F_R32F
Specifies BGR-32bit Floating point multiplanar plane.
Definition: nvbufsurface.h:198
NvBufSurfaceCudaBuffer::basePtr
void * basePtr
Holds a base pointer to allocated CUDA memory.
Definition: nvbufsurface.h:524
NVBUF_COLOR_FORMAT_NV16_10LE_709
@ NVBUF_COLOR_FORMAT_NV16_10LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
Definition: nvbufsurface.h:300
NVBUF_COLOR_FORMAT_YUV444_12LE_ER
@ NVBUF_COLOR_FORMAT_YUV444_12LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:4:4 12-bit multi-planar.
Definition: nvbufsurface.h:270
NvBufSurfaceDeviceInfo
Holds information about the underlying device.
Definition: nvbufsurface.h:694
NvBufSurfaceExtendedMapParams_t::reserved
void * reserved[64]
Definition: nvbufsurface.h:637
STRUCTURE_PADDING
#define STRUCTURE_PADDING
Defines the default padding length for reserved fields of structures.
Definition: nvbufsurface.h:48
NvBufSurfaceAllocateParams::params
NvBufSurfaceCreateParams params
Hold legacy NvBufSurface creation parameters.
Definition: nvbufsurface.h:457
NvBufSurfaceCudaIpcMemHandle
struct NvBufSurfaceCudaIpcMemHandle_t NvBufSurfaceCudaIpcMemHandle
CUDA IPC memory handle for NvBufSurface.
NVBUF_COLOR_FORMAT_YUV444_ER
@ NVBUF_COLOR_FORMAT_YUV444_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:4:4 multi-planar.
Definition: nvbufsurface.h:250
NvBufSurfaceParams
struct NvBufSurfaceParams NvBufSurfaceParams
Hold the information of single buffer in the batch.
NvBufSurfaceCudaBuffer::extMem
void * extMem
Holds a pointer to external CUDA memory for imported CUDA buffers.
Definition: nvbufsurface.h:532
NvBufSurfaceParams
Hold the information of single buffer in the batch.
Definition: nvbufsurface.h:542
NvBufSurfacePlaneParams::width
uint32_t width[NVBUF_MAX_PLANES]
Holds the widths of planes.
Definition: nvbufsurface.h:392
NvBufSurfaceParamsEx
Hold the information(extended) of single buffer in the batch.
Definition: nvbufsurface.h:495
NvBufSurfaceAllocateParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: nvbufsurface.h:473
NvBufSurfacePlaneParams::_reserved
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
Definition: nvbufsurface.h:404
NVBUF_COLOR_FORMAT_YUV444_10LE_ER
@ NVBUF_COLOR_FORMAT_YUV444_10LE_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:4:4 10-bit multi-planar.
Definition: nvbufsurface.h:260
NvBufSurfaceMapParams::extendedMapParams
void * extendedMapParams
Holds the extended Map parameters.
Definition: nvbufsurface.h:665
NvBufSurfaceAllocateParams::memtag
NvBufSurfaceTag memtag
components tag to be used for memory allocation
Definition: nvbufsurface.h:463
NVBUF_COLOR_FORMAT_NV21
@ NVBUF_COLOR_FORMAT_NV21
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbufsurface.h:124
NvBufSurfaceGetMapParams
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
@ NVBUF_COLOR_FORMAT_NV16_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
Definition: nvbufsurface.h:304
NVBUF_COLOR_FORMAT_BGRA_10_10_10_2_709
@ NVBUF_COLOR_FORMAT_BGRA_10_10_10_2_709
Specifies Non-linear RGB BT.709 colorspace - BGRA-10-10-10-2 planar.
Definition: nvbufsurface.h:240
NvBufSurfaceMapParams::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Holds chroma subsampling parameters.
Definition: nvbufsurface.h:661
NvBufSurfacePlaneParams::psize
uint32_t psize[NVBUF_MAX_PLANES]
Holds the sizes of planes in bytes.
Definition: nvbufsurface.h:400
NvBufSurfaceMappedAddr
Hold the pointers of mapped buffer.
Definition: nvbufsurface.h:479
NvBufSurfaceAllocateParams::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Chroma Subsampling parameters.
Definition: nvbufsurface.h:461
NvBufSurface2Raw
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
@ NVBUF_COLOR_FORMAT_SIGNED_R16G16
Specifies color format for packed 2 signed shorts
Definition: nvbufsurface.h:190
NVBUF_COLOR_FORMAT_RGBA_10_10_10_2_2020
@ NVBUF_COLOR_FORMAT_RGBA_10_10_10_2_2020
Specifies Non-linear RGB BT.2020 colorspace - RGBA-10-10-10-2 planar.
Definition: nvbufsurface.h:238
NVBUF_COLOR_FORMAT_INVALID
@ NVBUF_COLOR_FORMAT_INVALID
Specifies an invalid color format.
Definition: nvbufsurface.h:108
NVBUF_COLOR_FORMAT_RGB
@ NVBUF_COLOR_FORMAT_RGB
Specifies RGB-8-8-8 single plane.
Definition: nvbufsurface.h:162
NVBUF_COLOR_FORMAT_RGBA_10_10_10_2_709
@ NVBUF_COLOR_FORMAT_RGBA_10_10_10_2_709
Specifies Non-linear RGB BT.709 colorspace - RGBA-10-10-10-2 planar.
Definition: nvbufsurface.h:236
NvBufSurfaceNvmmBuffer::bufferDesc
uint64_t bufferDesc
Holds a DMABUF FD.
Definition: nvbufsurface.h:677
NvBufSurfacePlaneParams::bytesPerPix
uint32_t bytesPerPix[NVBUF_MAX_PLANES]
Holds the number of bytes occupied by a pixel in each plane.
Definition: nvbufsurface.h:402
NVBUF_COLOR_FORMAT_R8_G8_B8
@ NVBUF_COLOR_FORMAT_R8_G8_B8
Specifies RGB- unsigned 8 bit multiplanar plane.
Definition: nvbufsurface.h:192
NvBufSurfaceCreateParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
Definition: nvbufsurface.h:441
NVBUF_COLOR_FORMAT_UYVY_709
@ NVBUF_COLOR_FORMAT_UYVY_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 planar.
Definition: nvbufsurface.h:286
NvBufSurface::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: nvbufsurface.h:595
NvBufSurfaceParamsEx::planeParamsex
NvBufSurfacePlaneParamsEx planeParamsex
plane wise extended info
Definition: nvbufsurface.h:508
NVBUF_COLOR_FORMAT_NV16_10LE_709_ER
@ NVBUF_COLOR_FORMAT_NV16_10LE_709_ER
Specifies BT.709_ER colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
Definition: nvbufsurface.h:302
NvBufSurfaceFromFd
int NvBufSurfaceFromFd(int dmabuf_fd, void **buffer)
Gets the NvBufSurface from the DMABUF FD.
NvBufSurfaceMapParams::num_planes
uint32_t num_planes
Holds the number of planes.
Definition: nvbufsurface.h:645
NvBufSurfaceMapPlaneParams::reserved
uint8_t reserved[64]
Reserved.
Definition: nvbufsurface.h:620
NvBufSurfaceUnMap
int NvBufSurfaceUnMap(NvBufSurface *surf, int index, int plane)
Unmaps previously mapped buffer(s).
NvBufSurfaceExtendedMapParams_t::memHandle
NvBufSurfaceCudaIpcMemHandle memHandle
Definition: nvbufsurface.h:636
NVBUF_DISPLAYSCANFORMAT_PROGRESSIVE
@ NVBUF_DISPLAYSCANFORMAT_PROGRESSIVE
Progessive scan formats.
Definition: nvbufsurface.h:358
NvBufSurfaceMapPlaneParams::pitch
uint32_t pitch
Holds the pitches of planes in bytes.
Definition: nvbufsurface.h:608
NvBufSurfacePlaneParamsEx::drmModifier
uint64_t drmModifier[NVBUF_MAX_PLANES]
DRM modifier for plane.
Definition: nvbufsurface.h:379
NVBUF_COLOR_FORMAT_YUV444_12LE_2020
@ NVBUF_COLOR_FORMAT_YUV444_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
Definition: nvbufsurface.h:276
NVBUF_COLOR_FORMAT_YUV444_2020
@ NVBUF_COLOR_FORMAT_YUV444_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbufsurface.h:256
NVBUF_COLOR_FORMAT_UYVY_ER
@ NVBUF_COLOR_FORMAT_UYVY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbufsurface.h:130
NvBufSurfaceParams::height
uint32_t height
Holds the height of the buffer.
Definition: nvbufsurface.h:546
NvBufSurfaceMapPlaneParams
struct NvBufSurfaceMapPlaneParams NvBufSurfaceMapPlaneParams
Holds plane parameters to map the buffer received from another process.
NvBufSurfaceParamsEx::is_protected
bool is_protected
get buffer vpr information.
Definition: nvbufsurface.h:506
NvBufSurfaceMapPlaneParams::height
uint32_t height
Holds the heights of planes.
Definition: nvbufsurface.h:606
NVBUF_COLOR_FORMAT_NV24_10LE_709
@ NVBUF_COLOR_FORMAT_NV24_10LE_709
Specifies BT.709 colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
Definition: nvbufsurface.h:228
NVBUF_COLOR_FORMAT_UYVY_2020
@ NVBUF_COLOR_FORMAT_UYVY_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 planar.
Definition: nvbufsurface.h:290
NVBUF_MAP_READ_WRITE
@ NVBUF_MAP_READ_WRITE
Specifies NvBufSurface mapping type "read/write.".
Definition: nvbufsurface.h:74
NvBufSurfaceTag
NvBufSurfaceTag
Defines tags that identify the components requesting a memory allocation.
Definition: nvbufsurface.h:84
NVBUF_COLOR_FORMAT_LAST
@ NVBUF_COLOR_FORMAT_LAST
Definition: nvbufsurface.h:315
NvBufSurfacePlaneParamsEx::blockheightlog2
uint32_t blockheightlog2[NVBUF_MAX_PLANES]
block height of the planes for blockLinear layout buffer.
Definition: nvbufsurface.h:373
NvBufSurfaceMemType
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
Definition: nvbufsurface.h:332
NvBufSurfaceAllocateParams
Hold extended parameters required to allocate NvBufSurface.
Definition: nvbufsurface.h:455
NvBufSurfacePlaneParamsEx
struct NvBufSurfacePlaneParamsEx NvBufSurfacePlaneParamsEx
Holds plane wise parameters(extended) of a buffer.
NVBUF_COLOR_FORMAT_YVU420
@ NVBUF_COLOR_FORMAT_YVU420
Specifies BT.601 colorspace - YUV420 multi-planar.
Definition: nvbufsurface.h:114
Raw2NvBufSurface
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...
NVBUF_COLOR_FORMAT_YUV444_12LE_709_ER
@ NVBUF_COLOR_FORMAT_YUV444_12LE_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:4:4 12-bit multi-planar.
Definition: nvbufsurface.h:274
NvBufSurfaceParams::planeParams
NvBufSurfacePlaneParams planeParams
Holds planewise information (width, height, pitch, offset, etc.).
Definition: nvbufsurface.h:562
NVBUF_COLOR_FORMAT_UYVP_ER
@ NVBUF_COLOR_FORMAT_UYVP_ER
Specifies BT.601 colorspace - 10 bit YUV ER 4:2:2 interleaved.
Definition: nvbufsurface.h:248
NvBufSurface::memType
NvBufSurfaceMemType memType
Holds type of memory for buffers in the batch.
Definition: nvbufsurface.h:589
NvBufSurfaceCudaBuffer::dataPtr
void * dataPtr
Holds a page aligned data pointer to CUDA memory for image buffers if CUDA allocated address is not p...
Definition: nvbufsurface.h:530
NVBUF_COLOR_FORMAT_YVYU_ER
@ NVBUF_COLOR_FORMAT_YVYU_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbufsurface.h:142
NVBUF_COLOR_FORMAT_NV21_10LE
@ NVBUF_COLOR_FORMAT_NV21_10LE
Specifies BT.601 colorspace - Y/CrCb 4:2:0 10-bit multi-planar.
Definition: nvbufsurface.h:202
NvBufSurfaceCopy
int NvBufSurfaceCopy(NvBufSurface *srcSurf, NvBufSurface *dstSurf)
Copies the content of source batched buffer(s) to destination batched buffer(s).
NvBufSurfaceLayout
NvBufSurfaceLayout
Specifies layout formats for NvBufSurface video planes.
Definition: nvbufsurface.h:321
NvBufSurfaceChromaSubsamplingParams::_reserved
uint8_t _reserved[6]
Reserved for alignment.
Definition: nvbufsurface.h:421
NvBufSurfaceChromaSubsamplingParams::chromaLocVert
uint8_t chromaLocVert
Definition: nvbufsurface.h:419
NvBufSurfaceParams::dataPtr
void * dataPtr
Holds a pointer to allocated memory.
Definition: nvbufsurface.h:560
NvBufSurfaceDeviceInfo::isVicPresent
bool isVicPresent
Indicates if VIC is present on the platform.
Definition: nvbufsurface.h:698
NvBufSurfaceCudaBuffer
struct NvBufSurfaceCudaBuffer NvBufSurfaceCudaBuffer
Holds information of CUDA buffer.
NvBufSurfaceCudaBuffer::reserved
uint8_t reserved[64]
Reserved.
Definition: nvbufsurface.h:536
NVBUF_COLOR_FORMAT_GRAY8_ER
@ NVBUF_COLOR_FORMAT_GRAY8_ER
Specifies 8 bit GRAY scale ER - single plane.
Definition: nvbufsurface.h:284
NvBufSurfaceSyncForCpu
int NvBufSurfaceSyncForCpu(NvBufSurface *surf, int index, int plane)
Syncs the HW memory cache for the CPU.
NvBufSurfaceAllocateParams::_reservedParam
uint32_t _reservedParam
Used void* from custom param for 64 bit machine, using other uint32_t param.
Definition: nvbufsurface.h:471
NvBufSurfacePlaneParamsEx::flags
uint64_t flags[NVBUF_MAX_PLANES]
flags associated with planes
Definition: nvbufsurface.h:377
NvBufSurfaceParams::bufferDesc
uint64_t bufferDesc
Holds a DMABUF FD.
Definition: nvbufsurface.h:555
NVBUF_COLOR_FORMAT_YUV422
@ NVBUF_COLOR_FORMAT_YUV422
Specifies BT.601 colorspace - YUV422 multi-planar.
Definition: nvbufsurface.h:200
NVBUF_COLOR_FORMAT_NV21_ER
@ NVBUF_COLOR_FORMAT_NV21_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: nvbufsurface.h:126
NvBufSurfaceMapParams::memType
NvBufSurfaceMemType memType
Holds type of memory.
Definition: nvbufsurface.h:653
NVBUF_COLOR_FORMAT_YUV444_709_ER
@ NVBUF_COLOR_FORMAT_YUV444_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:4:4 multi-planar.
Definition: nvbufsurface.h:254
NvBufSurfaceParams::paramex
NvBufSurfaceParamsEx * paramex
pointers of extended parameters of single buffer in the batch.
Definition: nvbufsurface.h:567
NvBufSurfacePlaneParamsEx::scanformat
NvBufSurfaceDisplayScanFormat scanformat[NVBUF_MAX_PLANES]
display scan format - progressive/interlaced.
Definition: nvbufsurface.h:369
NVBUF_COLOR_FORMAT_NV12_ER
@ NVBUF_COLOR_FORMAT_NV12_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: nvbufsurface.h:122
NvBufSurfaceCreateParams
struct NvBufSurfaceCreateParams NvBufSurfaceCreateParams
Holds parameters required to allocate an NvBufSurface.
NVBUF_MAP_READ
@ NVBUF_MAP_READ
Specifies NvBufSurface mapping type "read.".
Definition: nvbufsurface.h:71
NvBufSurfaceParamsEx::sizeofvaliddatainbytes
int32_t sizeofvaliddatainbytes
size of the valid data from the first to the last valid byte.
Definition: nvbufsurface.h:501
NVBUF_LAYOUT_BLOCK_LINEAR
@ NVBUF_LAYOUT_BLOCK_LINEAR
Specifies block linear layout.
Definition: nvbufsurface.h:326
NVBUF_COLOR_FORMAT_NV16_10LE_ER
@ NVBUF_COLOR_FORMAT_NV16_10LE_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
Definition: nvbufsurface.h:298
NvBufSurfaceCreateParams::layout
NvBufSurfaceLayout layout
Holds the surface layout.
Definition: nvbufsurface.h:444
NvBufSurfaceChromaSubsamplingParams::chromaLocHoriz
uint8_t chromaLocHoriz
location settings
Definition: nvbufsurface.h:418
NVBUF_COLOR_FORMAT_NV24_ER
@ NVBUF_COLOR_FORMAT_NV24_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbufsurface.h:218
NVBUF_COLOR_FORMAT_YUV444
@ NVBUF_COLOR_FORMAT_YUV444
Specifies BT.601 colorspace - YUV444 multi-planar.
Definition: nvbufsurface.h:144
NvBufSurfaceCudaIpcMemHandle_t
CUDA IPC memory handle for NvBufSurface.
Definition: nvbufsurface.h:626
NVBUF_COLOR_FORMAT_NV24_10LE
@ NVBUF_COLOR_FORMAT_NV24_10LE
Specifies BT.601 colorspace - Y/CrCb 4:4:4 10-bit multi-planar.
Definition: nvbufsurface.h:214
NvBufSurfaceMapParams::totalSize
uint32_t totalSize
Holds the total size of allocated memory.
Definition: nvbufsurface.h:651
NvBufSurfaceMapNvmmBuffer
int NvBufSurfaceMapNvmmBuffer(NvBufSurface *surf, int index)
Creates an NVMM buffer from the memory of one or more NvBufSurface buffers.
NvBufSurfaceNvmmBuffer::reserved
uint8_t reserved[64]
Reserved.
Definition: nvbufsurface.h:679
NvBufSurfaceExtendedMapParams
struct NvBufSurfaceExtendedMapParams_t NvBufSurfaceExtendedMapParams
The extended map parameters NvBufSurface.
NVBUF_COLOR_FORMAT_YUV444_12LE
@ NVBUF_COLOR_FORMAT_YUV444_12LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
Definition: nvbufsurface.h:268
NVBUF_COLOR_FORMAT_ABGR
@ NVBUF_COLOR_FORMAT_ABGR
Specifies ABGR-8-8-8-8 single plane.
Definition: nvbufsurface.h:152
NvBufSurfaceParams::mappedAddr
NvBufSurfaceMappedAddr mappedAddr
Holds pointers to mapped buffers.
Definition: nvbufsurface.h:565
NVBUF_COLOR_FORMAT_NV16_2020
@ NVBUF_COLOR_FORMAT_NV16_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbufsurface.h:296
NvBufSurfaceImport
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
@ NVBUF_COLOR_FORMAT_NV12_10LE_709
Specifies BT.709 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: nvbufsurface.h:184
NVBUF_MAP_WRITE
@ NVBUF_MAP_WRITE
Specifies NvBufSurface mapping type "write.".
Definition: nvbufsurface.h:72
NvBufSurfacePlaneParams
Holds plane wise parameters of a buffer.
Definition: nvbufsurface.h:387
NVBUF_COLOR_FORMAT_NV16_ER
@ NVBUF_COLOR_FORMAT_NV16_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbufsurface.h:216
NVBUF_COLOR_FORMAT_NV12
@ NVBUF_COLOR_FORMAT_NV12
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbufsurface.h:120
NvBufSurfaceTag_VIDEO_ENC
@ NvBufSurfaceTag_VIDEO_ENC
tag for H264/H265 Video Encoder.
Definition: nvbufsurface.h:95
NvBufSurfaceParamsEx::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
chroma subsampling parameters.
Definition: nvbufsurface.h:504
NvBufSurfaceCreate
int NvBufSurfaceCreate(NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceCreateParams *params)
Allocates a batch of buffers.
NvBufSurfaceDeviceInfo
struct NvBufSurfaceDeviceInfo NvBufSurfaceDeviceInfo
Holds information about the underlying device.
NVBUF_COLOR_FORMAT_NV12_12LE_2020
@ NVBUF_COLOR_FORMAT_NV12_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
Definition: nvbufsurface.h:206
NVBUF_COLOR_FORMAT_BGR
@ NVBUF_COLOR_FORMAT_BGR
Specifies BGR-8-8-8 single plane.
Definition: nvbufsurface.h:164
NvBufSurfaceMapParams::fd
uint64_t fd
Holds a DMABUF FD.
Definition: nvbufsurface.h:649
NvBufSurfaceCreateParams::isContiguous
bool isContiguous
Holds a "contiguous memory" flag.
Definition: nvbufsurface.h:439
NvBufSurfaceTag_JPEG
@ NvBufSurfaceTag_JPEG
tag for Jpeg Encoder/Decoder.
Definition: nvbufsurface.h:91
NvBufSurfaceChromaSubsamplingParams
struct NvBufSurfaceChromaSubsamplingParams NvBufSurfaceChromaSubsamplingParams
Holds Chroma Subsampling parameters for NvBufSurface allocation.
NvBufSurfaceParams::pitch
uint32_t pitch
Holds the pitch of the buffer.
Definition: nvbufsurface.h:548
NVBUF_MEM_SURFACE_ARRAY
@ NVBUF_MEM_SURFACE_ARRAY
Specifies NVRM Surface Array type.
Definition: nvbufsurface.h:345
NVBUF_COLOR_FORMAT_NV12_10LE_2020
@ NVBUF_COLOR_FORMAT_NV12_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: nvbufsurface.h:188
NvBufSurfaceUnMapNvmmBuffer
int NvBufSurfaceUnMapNvmmBuffer(NvBufSurface *surf, int index)
Destroys the previously created NVMM buffer.
NvBufSurfaceMappedAddr::nvmmPtr
void * nvmmPtr
Holds a pointer to a mapped NVRM memory.
Definition: nvbufsurface.h:485
NvBufSurfaceMapEglImage
int NvBufSurfaceMapEglImage(NvBufSurface *surf, int index)
Creates an EGLImage from the memory of one or more NvBufSurface buffers.
NVBUF_COLOR_FORMAT_RGBA
@ NVBUF_COLOR_FORMAT_RGBA
Specifies RGBA-8-8-8-8 single plane.
Definition: nvbufsurface.h:146
NVBUF_COLOR_FORMAT_BGRA_10_10_10_2_2020
@ NVBUF_COLOR_FORMAT_BGRA_10_10_10_2_2020
Specifies Non-linear RGB BT.2020 colorspace - BGRA-10-10-10-2 planar.
Definition: nvbufsurface.h:242
NvBufSurfaceUnMapCudaBuffer
int NvBufSurfaceUnMapCudaBuffer(NvBufSurface *surf, int index)
Destroys the previously created CUDA buffer.
NVBUF_COLOR_FORMAT_UYVY_709_ER
@ NVBUF_COLOR_FORMAT_UYVY_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:2 planar.
Definition: nvbufsurface.h:288
NvBufSurfaceCreateParams
Holds parameters required to allocate an NvBufSurface.
Definition: nvbufsurface.h:427
NvBufSurface::batchSize
uint32_t batchSize
Holds the batch size.
Definition: nvbufsurface.h:581
NvBufSurfaceCreateParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: nvbufsurface.h:448
NvBufSurfaceMemMapFlags
NvBufSurfaceMemMapFlags
Defines mapping types of NvBufSurface.
Definition: nvbufsurface.h:69
NvBufSurfacePlaneParams::height
uint32_t height[NVBUF_MAX_PLANES]
Holds the heights of planes.
Definition: nvbufsurface.h:394
NvBufSurfaceDriverType
NvBufSurfaceDriverType
Defines the type of underlying kernel driver detected for GPU access.
Definition: nvbufsurface.h:685
NVBUF_COLOR_FORMAT_NV24_10LE_2020
@ NVBUF_COLOR_FORMAT_NV24_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
Definition: nvbufsurface.h:232
NVBUF_COLOR_FORMAT_YUV444_10LE_2020
@ NVBUF_COLOR_FORMAT_YUV444_10LE_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
Definition: nvbufsurface.h:266
NvBufSurfaceNvmmBuffer::dataPtr
void * dataPtr
Holds a pointer to mapped nvmm memory.
Definition: nvbufsurface.h:675
NvBufSurfaceParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
Definition: nvbufsurface.h:550
NvBufSurfaceMappedAddr::cudaPtr
void * cudaPtr
Holds a pointer to a mapped CUDA memory.
Definition: nvbufsurface.h:487
NVBUF_COLOR_FORMAT_NV12_709_ER
@ NVBUF_COLOR_FORMAT_NV12_709_ER
Specifies BT.709 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: nvbufsurface.h:176
NVBUF_COLOR_FORMAT_YUV420
@ NVBUF_COLOR_FORMAT_YUV420
Specifies BT.601 colorspace - YUV420 multi-planar.
Definition: nvbufsurface.h:112
NvBufSurfaceParams::cudaBuffer
NvBufSurfaceCudaBuffer * cudaBuffer
Holds a pointer to CUDA buffer.
Definition: nvbufsurface.h:569
NvBufSurfaceColorFormat
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
Definition: nvbufsurface.h:105
NvBufSurfaceTag_NONE
@ NvBufSurfaceTag_NONE
tag None.
Definition: nvbufsurface.h:87
NvBufSurfaceCreateParams::width
uint32_t width
Holds the width of the buffer.
Definition: nvbufsurface.h:431
NVBUF_COLOR_FORMAT_R32F_G32F_B32F
@ NVBUF_COLOR_FORMAT_R32F_G32F_B32F
Specifies RGB-32bit Floating point multiplanar plane.
Definition: nvbufsurface.h:196
NVBUF_COLOR_FORMAT_NV24_12LE_2020
@ NVBUF_COLOR_FORMAT_NV24_12LE_2020
Specifies BT.2020 colorspace - Y/CbCr 12 bit 4:4:4 multi-planar.
Definition: nvbufsurface.h:234
NVBUF_COLOR_FORMAT_RGBx
@ NVBUF_COLOR_FORMAT_RGBx
Specifies RGBx-8-8-8-8 single plane.
Definition: nvbufsurface.h:154
NVBUF_COLOR_FORMAT_NV24_10LE_709_ER
@ NVBUF_COLOR_FORMAT_NV24_10LE_709_ER
Specifies BT.709 ER colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
Definition: nvbufsurface.h:230