NVIDIA DeepStream SDK API Reference

8.0 Release
sources/includes/nvbufsurface.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026 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 {
335 
339 typedef enum
340 {
346 
350 typedef enum
351 {
371 
375 typedef enum
376 {
382 
387 {
403 
408 {
410  uint32_t num_planes;
426 
427 
436 {
438  uint8_t chromaLocHoriz;
439  uint8_t chromaLocVert;
441  uint8_t _reserved[6];
443 
447 typedef struct NvBufSurfaceCreateParams {
449  uint32_t gpuId;
451  uint32_t width;
453  uint32_t height;
456  uint32_t size;
470 
491  uint32_t _reservedParam;
495 
499 typedef struct NvBufSurfaceMappedAddr {
503  void *eglImage;
505  void *nvmmPtr;
507  void *cudaPtr;
511 
515 typedef struct NvBufSurfaceParamsEx {
529 
532 
537 typedef struct NvBufSurfaceCudaBuffer {
544  void *basePtr;
550  void *dataPtr;
552  void *extMem;
554  void *mipmap;
556  uint8_t reserved[64];
558 
562 typedef struct NvBufSurfaceParams {
564  uint32_t width;
566  uint32_t height;
568  uint32_t pitch;
575  uint64_t bufferDesc;
577  uint32_t dataSize;
580  void * dataPtr;
590 
593 
597 typedef struct NvBufSurface {
599  uint32_t gpuId;
601  uint32_t batchSize;
604  uint32_t numFilled;
614 
616 } NvBufSurface;
617 
622 {
624  uint32_t width;
626  uint32_t height;
628  uint32_t pitch;
630  uint32_t offset;
632  uint32_t psize;
636  uint32_t blockheightlog2;
638  uint64_t flags;
640  uint8_t reserved[64];
642 
647 {
648  char reserved[64];
650 
655 {
657  void *reserved[64];
659 
663 typedef struct NvBufSurfaceMapParams {
665  uint32_t num_planes;
667  uint32_t gpuId;
669  uint64_t fd;
671  uint32_t totalSize;
689 
693 typedef struct NvBufSurfaceNvmmBuffer {
695  void *dataPtr;
697  uint64_t bufferDesc;
699  uint8_t reserved[64];
701 
705 typedef enum {
710 
711 typedef enum {
720 
724 typedef struct NvBufSurfaceDeviceInfo {
731  bool reserved1;
732  bool reserved2;
736  uint8_t reserved[60];
738 
740 {
745 
747 {
753 
773 int NvBufSurfaceCreate (NvBufSurface **surf, uint32_t batchSize,
774  NvBufSurfaceCreateParams *params);
775 
792 int NvBufSurfaceAllocate (NvBufSurface **surf, uint32_t batchSize,
793  NvBufSurfaceAllocateParams *paramsext);
794 
803 
843 int NvBufSurfaceMap (NvBufSurface *surf, int index, int plane, NvBufSurfaceMemMapFlags type);
844 
856 int NvBufSurfaceUnMap (NvBufSurface *surf, int index, int plane);
857 
874 int NvBufSurfaceCopy (NvBufSurface *srcSurf, NvBufSurface *dstSurf);
875 
892 int NvBufSurface2Raw (NvBufSurface *Surf, unsigned int index, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr);
893 
910 int Raw2NvBufSurface (unsigned char *ptr, unsigned int index, unsigned int plane, unsigned int in_width, unsigned int in_height, NvBufSurface *Surf);
911 
926 int NvBufSurfaceSyncForCpu (NvBufSurface *surf, int index, int plane);
927 
942 int NvBufSurfaceSyncForDevice (NvBufSurface *surf, int index, int plane);
943 
952 int NvBufSurfaceFromFd (int dmabuf_fd, void **buffer);
953 
969 int NvBufSurfaceMemSet (NvBufSurface *surf, int index, int plane, uint8_t value);
970 
997 int NvBufSurfaceMapEglImage (NvBufSurface *surf, int index);
998 
1008 int NvBufSurfaceUnMapEglImage (NvBufSurface *surf, int index);
1009 
1021 int NvBufSurfaceImport (NvBufSurface **out_nvbuf_surf, const NvBufSurfaceMapParams *in_params);
1022 
1032 int NvBufSurfaceGetMapParams (const NvBufSurface *surf, int index, NvBufSurfaceMapParams *params);
1033 
1059 int NvBufSurfaceMapCudaBuffer (NvBufSurface *surf, int index);
1060 
1070 int NvBufSurfaceUnMapCudaBuffer (NvBufSurface *surf, int index);
1071 
1097 int NvBufSurfaceMapNvmmBuffer (NvBufSurface *surf, int index);
1098 
1108 int NvBufSurfaceUnMapNvmmBuffer (NvBufSurface *surf, int index);
1109 
1124 
1139 
1140 #ifdef __cplusplus
1141 }
1142 #endif
1143 #endif /* NVBUFSURFACE_H_ */
NvBufSurfaceParamsEx
struct NvBufSurfaceParamsEx NvBufSurfaceParamsEx
Hold the information(extended) of single buffer in the batch.
NvBufSurfacePlatformType
NvBufSurfacePlatformType
Definition: sources/includes/nvbufsurface.h:711
NVBUF_COLOR_FORMAT_NV12_10LE
@ NVBUF_COLOR_FORMAT_NV12_10LE
Specifies BT.601 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: sources/includes/nvbufsurface.h:166
NVBUF_COLOR_FORMAT_YUV420_709_ER
@ NVBUF_COLOR_FORMAT_YUV420_709_ER
Specifies BT.709 colorspace - YUV420 ER multi-planar.
Definition: sources/includes/nvbufsurface.h:172
NvBufSurfaceParams::width
uint32_t width
Holds the width of the buffer.
Definition: sources/includes/nvbufsurface.h:564
NvBufSurfacePlaneParamsEx::drmModifier
uint64_t drmModifier[NVBUF_MAX_PLANES]
DRM modifier for plane.
Definition: sources/includes/nvbufsurface.h:399
NvBufSurfaceTag_VIDEO_DEC
@ NvBufSurfaceTag_VIDEO_DEC
tag for H264/H265/VP9 Video Decoder.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:174
NvBufSurfaceMappedAddr
struct NvBufSurfaceMappedAddr NvBufSurfaceMappedAddr
Hold the pointers of mapped buffer.
NVBUF_COLOR_FORMAT_YUV420_2020
@ NVBUF_COLOR_FORMAT_YUV420_2020
Specifies BT.2020 colorspace - YUV420 multi-planar.
Definition: sources/includes/nvbufsurface.h:178
NvBufSurfaceMapPlaneParams::psize
uint32_t psize
Holds the sizes of planes in bytes.
Definition: sources/includes/nvbufsurface.h:632
NVBUF_COLOR_FORMAT_NV16_12LE
@ NVBUF_COLOR_FORMAT_NV16_12LE
Specifies BT.601 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Definition: sources/includes/nvbufsurface.h:306
NvBufSurfaceChromaSubsamplingParams
Holds Chroma Subsampling parameters for NvBufSurface allocation.
Definition: sources/includes/nvbufsurface.h:435
NvBufSurfacePlaneParamsEx
Holds plane wise parameters(extended) of a buffer.
Definition: sources/includes/nvbufsurface.h:386
NVBUF_MEM_CUDA_PINNED
@ NVBUF_MEM_CUDA_PINNED
Specifies CUDA Host memory type.
Definition: sources/includes/nvbufsurface.h:357
NvBufSurface::isContiguous
bool isContiguous
Holds an "is contiguous" flag.
Definition: sources/includes/nvbufsurface.h:607
NVBUF_COLOR_FORMAT_A32
@ NVBUF_COLOR_FORMAT_A32
Specifies Optical flow SAD calculation Buffer format.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:282
NvBufSurfaceMapPlaneParams
Holds plane parameters to map the buffer received from another process.
Definition: sources/includes/nvbufsurface.h:621
NvBufSurfaceCudaIpcMemHandle_t::reserved
char reserved[64]
Definition: sources/includes/nvbufsurface.h:648
NvBufSurfaceAllocateParams::displayscanformat
NvBufSurfaceDisplayScanFormat displayscanformat
Display scan format.
Definition: sources/includes/nvbufsurface.h:479
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: sources/includes/nvbufsurface.h:599
NvBufSurfaceTag_PROTECTED
@ NvBufSurfaceTag_PROTECTED
tag for VPR Buffers.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:310
NvBufSurfaceCreateParams::height
uint32_t height
Holds the height of the buffer.
Definition: sources/includes/nvbufsurface.h:453
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: sources/includes/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: sources/includes/nvbufsurface.h:312
NvBufSurfaceDeviceInfo::driverType
NvBufSurfaceDriverType driverType
The detected device type (nvgpu, OpenRM, etc.).
Definition: sources/includes/nvbufsurface.h:726
NVBUF_COLOR_FORMAT_NV24_12LE
@ NVBUF_COLOR_FORMAT_NV24_12LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
Definition: sources/includes/nvbufsurface.h:320
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: sources/includes/nvbufsurface.h:308
NVBUF_COLOR_FORMAT_VYUY
@ NVBUF_COLOR_FORMAT_VYUY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:132
NVBUF_DISPLAYSCANFORMAT_INTERLACED
@ NVBUF_DISPLAYSCANFORMAT_INTERLACED
Interlaced scan formats.
Definition: sources/includes/nvbufsurface.h:380
NvBufSurfaceMapParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format.
Definition: sources/includes/nvbufsurface.h:679
NvBufSurfaceGPUL2SyncCacheOps
NvBufSurfaceGPUL2SyncCacheOps
Definition: sources/includes/nvbufsurface.h:739
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: sources/includes/nvbufsurface.h:264
NVBUF_COLOR_FORMAT_B8_G8_R8
@ NVBUF_COLOR_FORMAT_B8_G8_R8
Specifies BGR- unsigned 8 bit multiplanar plane.
Definition: sources/includes/nvbufsurface.h:194
NVBUF_COLOR_FORMAT_UYVY
@ NVBUF_COLOR_FORMAT_UYVY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:128
NVBUF_COLOR_FORMAT_VYUY_ER
@ NVBUF_COLOR_FORMAT_VYUY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:134
NvBufSurfaceDisplayScanFormat
NvBufSurfaceDisplayScanFormat
Defines display scan formats for NvBufSurface video planes.
Definition: sources/includes/nvbufsurface.h:375
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: sources/includes/nvbufsurface.h:410
NVBUF_COLOR_FORMAT_BGRA64_LE
@ NVBUF_COLOR_FORMAT_BGRA64_LE
Specifies 64 bit BGRA (B16 G16 R16 A16) interleaved.
Definition: sources/includes/nvbufsurface.h:294
NvBufSurfaceTag_CAMERA
@ NvBufSurfaceTag_CAMERA
tag for Camera.
Definition: sources/includes/nvbufsurface.h:89
NVBUF_DRIVER_TYPE_RM
@ NVBUF_DRIVER_TYPE_RM
Definition: sources/includes/nvbufsurface.h:708
NvBufSurfaceMapPlaneParams::offset
uint32_t offset
Holds the offsets of planes in bytes.
Definition: sources/includes/nvbufsurface.h:630
NVBUF_COLOR_FORMAT_GRAY8
@ NVBUF_COLOR_FORMAT_GRAY8
Specifies 8 bit GRAY scale - single plane.
Definition: sources/includes/nvbufsurface.h:110
NVBUF_COLOR_FORMAT_BGRA
@ NVBUF_COLOR_FORMAT_BGRA
Specifies BGRA-8-8-8-8 single plane.
Definition: sources/includes/nvbufsurface.h:148
NvBufSurfaceGPUL2SyncParams::type
NvBufSurfaceGPUL2SyncCacheOps type
Holds the type of GPU L2 cache sync operation.
Definition: sources/includes/nvbufsurface.h:749
NvBufSurfacePlaneParamsEx::scanformat
NvBufSurfaceDisplayScanFormat scanformat[NVBUF_MAX_PLANES]
display scan format - progressive/interlaced.
Definition: sources/includes/nvbufsurface.h:389
NvBufSurfaceParamsEx::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: sources/includes/nvbufsurface.h:530
NvBufSurfaceParams::dataPtr
void * dataPtr
Holds a pointer to allocated memory.
Definition: sources/includes/nvbufsurface.h:580
NvBufSurfaceNvmmBuffer
struct NvBufSurfaceNvmmBuffer NvBufSurfaceNvmmBuffer
Holds information about mapped CUDA buffer.
NvBufSurfaceMappedAddr::nvmmPtr
void * nvmmPtr
Holds a pointer to a mapped NVRM memory.
Definition: sources/includes/nvbufsurface.h:505
NvBufSurfaceNvmmBuffer
Holds information about mapped CUDA buffer.
Definition: sources/includes/nvbufsurface.h:693
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: sources/includes/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: sources/includes/nvbufsurface.h:208
NVBUF_COLOR_FORMAT_YUV420_ER
@ NVBUF_COLOR_FORMAT_YUV420_ER
Specifies BT.601 colorspace - YUV420 ER multi-planar.
Definition: sources/includes/nvbufsurface.h:116
NvBufSurfaceCudaBuffer
Holds information of CUDA buffer.
Definition: sources/includes/nvbufsurface.h:537
NvBufSurfaceDeviceInfo::reserved1
bool reserved1
Definition: sources/includes/nvbufsurface.h:731
NvBufSurfaceNvmmBuffer::reserved
uint8_t reserved[64]
Reserved.
Definition: sources/includes/nvbufsurface.h:699
NvBufSurface
Holds information about batched buffers.
Definition: sources/includes/nvbufsurface.h:597
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: sources/includes/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: sources/includes/nvbufsurface.h:624
NvBufSurfaceAllocateParams::disablePitchPadding
bool disablePitchPadding
disable pitch padding allocation only applicable for cuda and system memory allocation pitch would be...
Definition: sources/includes/nvbufsurface.h:489
NvBufSurfacePlaneParams::width
uint32_t width[NVBUF_MAX_PLANES]
Holds the widths of planes.
Definition: sources/includes/nvbufsurface.h:412
NvBufSurfaceMapParams::scanformat
NvBufSurfaceDisplayScanFormat scanformat
Holds display scan format.
Definition: sources/includes/nvbufsurface.h:677
NvBufSurfaceAllocateParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: sources/includes/nvbufsurface.h:493
NvBufSurfaceMapPlaneParams::blockheightlog2
uint32_t blockheightlog2
Holds block height of the planes for blockLinear layout buffer.
Definition: sources/includes/nvbufsurface.h:636
NvBufSurfaceParams::dataSize
uint32_t dataSize
Holds the amount of allocated memory.
Definition: sources/includes/nvbufsurface.h:577
NvBufSurfaceTag_VIDEO_CONVERT
@ NvBufSurfaceTag_VIDEO_CONVERT
tag for Video Transform/Composite/Blend.
Definition: sources/includes/nvbufsurface.h:99
NVBUF_MEM_HANDLE
@ NVBUF_MEM_HANDLE
Specifies NVRM Handle type.
Definition: sources/includes/nvbufsurface.h:365
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: sources/includes/nvbufsurface.h:280
NVBUF_COLOR_FORMAT_BGRx
@ NVBUF_COLOR_FORMAT_BGRx
Specifies BGRx-8-8-8-8 single plane.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:210
NvBufSurfaceCreateParams::memType
NvBufSurfaceMemType memType
Holds the type of memory to be allocated.
Definition: sources/includes/nvbufsurface.h:466
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: sources/includes/nvbufsurface.h:224
NvBufSurface::isImportedBuf
bool isImportedBuf
Holds a flag for Imported buffer.
Definition: sources/includes/nvbufsurface.h:613
NvBufSurfaceParamsEx::startofvaliddata
int32_t startofvaliddata
offset in bytes from the start of the buffer to the first valid byte.
Definition: sources/includes/nvbufsurface.h:518
NVBUF_COLOR_FORMAT_NV24_12LE_709_ER
@ NVBUF_COLOR_FORMAT_NV24_12LE_709_ER
Specifies BT.709 ER colorspace - Y/CbCr 12 bit 4:4:4 multi-planar.
Definition: sources/includes/nvbufsurface.h:326
NvBufSurfaceMapParams::layout
NvBufSurfaceLayout layout
Holds BL or PL layout.
Definition: sources/includes/nvbufsurface.h:675
NvBufSurfaceMapPlaneParams::secondfieldoffset
uint32_t secondfieldoffset
Holds offset of the second field for interlaced buffer.
Definition: sources/includes/nvbufsurface.h:634
NvBufSurfaceCreateParams::size
uint32_t size
Holds the amount of memory to be allocated.
Definition: sources/includes/nvbufsurface.h:456
NvBufSurfaceMapParams::gpuId
uint32_t gpuId
Holds a GPU ID.
Definition: sources/includes/nvbufsurface.h:667
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: sources/includes/nvbufsurface.h:663
NVBUF_MEM_CUDA_UNIFIED
@ NVBUF_MEM_CUDA_UNIFIED
Specifies CUDA Unified memory type.
Definition: sources/includes/nvbufsurface.h:361
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: sources/includes/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: sources/includes/nvbufsurface.h:278
NvBufSurfaceParams::layout
NvBufSurfaceLayout layout
Holds BL or PL.
Definition: sources/includes/nvbufsurface.h:572
NvBufSurfaceAllocate
int NvBufSurfaceAllocate(NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceAllocateParams *paramsext)
Allocate batch of buffers.
NVBUF_DRIVER_TYPE_UNKNOWN
@ NVBUF_DRIVER_TYPE_UNKNOWN
Definition: sources/includes/nvbufsurface.h:706
NVBUF_MEM_CUDA_DEVICE
@ NVBUF_MEM_CUDA_DEVICE
Specifies CUDA Device memory type.
Definition: sources/includes/nvbufsurface.h:359
NvBufSurfacePlaneParamsEx::blockheightlog2
uint32_t blockheightlog2[NVBUF_MAX_PLANES]
block height of the planes for blockLinear layout buffer.
Definition: sources/includes/nvbufsurface.h:393
NvBufSurfaceGPUL2SyncParams::reserved
void * reserved[STRUCTURE_PADDING]
Reserved fields for future use.
Definition: sources/includes/nvbufsurface.h:751
NVBUF_COLOR_FORMAT_YVU420_ER
@ NVBUF_COLOR_FORMAT_YVU420_ER
Specifies BT.601 colorspace - YVU420 ER multi-planar.
Definition: sources/includes/nvbufsurface.h:118
NVBUF_COLOR_FORMAT_UYVP_709
@ NVBUF_COLOR_FORMAT_UYVP_709
Specifies BT.709 colorspace - 10 bit YUV 4:2:2 interleaved.
Definition: sources/includes/nvbufsurface.h:328
NVBUF_COLOR_FORMAT_YUV444_709
@ NVBUF_COLOR_FORMAT_YUV444_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: sources/includes/nvbufsurface.h:252
NvBufSurfaceDeviceInfo::reserved
uint8_t reserved[60]
Reserved for future use.
Definition: sources/includes/nvbufsurface.h:736
NVBUF_COLOR_FORMAT_YUV420_709
@ NVBUF_COLOR_FORMAT_YUV420_709
Specifies BT.709 colorspace - YUV420 multi-planar.
Definition: sources/includes/nvbufsurface.h:170
NvBufSurfaceCreateParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: sources/includes/nvbufsurface.h:468
NVBUF_COLOR_FORMAT_UYVP
@ NVBUF_COLOR_FORMAT_UYVP
Specifies BT.601 colorspace - 10 bit YUV 4:2:2 interleaved.
Definition: sources/includes/nvbufsurface.h:246
NVBUF_COLOR_FORMAT_xRGB
@ NVBUF_COLOR_FORMAT_xRGB
Specifies xRGB-8-8-8-8 single plane.
Definition: sources/includes/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: sources/includes/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: sources/includes/nvbufsurface.h:222
NVBUF_MAX_PLANES
#define NVBUF_MAX_PLANES
Defines the maximum number of planes.
Definition: sources/includes/nvbufsurface.h:51
NVBUF_LAYOUT_PITCH
@ NVBUF_LAYOUT_PITCH
Specifies pitch layout.
Definition: sources/includes/nvbufsurface.h:342
NvBufSurfaceCreateParams::gpuId
uint32_t gpuId
Holds the GPU ID.
Definition: sources/includes/nvbufsurface.h:449
NVBUF_MEM_DEFAULT
@ NVBUF_MEM_DEFAULT
Specifies the default memory type, i.e.
Definition: sources/includes/nvbufsurface.h:355
NVBUF_COLOR_FORMAT_YUYV_ER
@ NVBUF_COLOR_FORMAT_YUYV_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:138
NVBUF_MEM_SYSTEM
@ NVBUF_MEM_SYSTEM
Specifies memory allocated by malloc().
Definition: sources/includes/nvbufsurface.h:367
NvBufSurfaceMapPlaneParams::flags
uint64_t flags
Holds flags associated with the planes.
Definition: sources/includes/nvbufsurface.h:638
NvBufSurfaceGPUL2SyncParams
Definition: sources/includes/nvbufsurface.h:746
NvBufSurface::numFilled
uint32_t numFilled
Holds the number valid and filled buffers.
Definition: sources/includes/nvbufsurface.h:604
NvBufSurfaceDestroy
int NvBufSurfaceDestroy(NvBufSurface *surf)
Free the batched buffers previously allocated through NvBufSurfaceCreate.
NvBufSurfaceNvmmBuffer::dataPtr
void * dataPtr
Holds a pointer to mapped nvmm memory.
Definition: sources/includes/nvbufsurface.h:695
NVBUF_COLOR_FORMAT_NV21_12LE
@ NVBUF_COLOR_FORMAT_NV21_12LE
Specifies BT.601 colorspace - Y/CrCb 4:2:0 12-bit multi-planar.
Definition: sources/includes/nvbufsurface.h:204
NvBufSurfacePlaneParams::psize
uint32_t psize[NVBUF_MAX_PLANES]
Holds the sizes of planes in bytes.
Definition: sources/includes/nvbufsurface.h:420
NvBufSurfaceExtendedMapParams_t
The extended map parameters NvBufSurface.
Definition: sources/includes/nvbufsurface.h:654
NVBUF_COLOR_FORMAT_YUV444_10LE
@ NVBUF_COLOR_FORMAT_YUV444_10LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
Definition: sources/includes/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: sources/includes/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: sources/includes/nvbufsurface.h:292
NVBUF_COLOR_FORMAT_ARGB
@ NVBUF_COLOR_FORMAT_ARGB
Specifies ARGB-8-8-8-8 single plane.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:262
NVBUF_COLOR_FORMAT_YVYU
@ NVBUF_COLOR_FORMAT_YVYU
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:140
NvBufSurfacePlaneParams::offset
uint32_t offset[NVBUF_MAX_PLANES]
Holds the offsets of planes in bytes.
Definition: sources/includes/nvbufsurface.h:418
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: sources/includes/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: sources/includes/nvbufsurface.h:180
NVBUF_COLOR_FORMAT_xBGR
@ NVBUF_COLOR_FORMAT_xBGR
Specifies xBGR-8-8-8-8 single plane.
Definition: sources/includes/nvbufsurface.h:160
NVBUF_COLOR_FORMAT_YUYV
@ NVBUF_COLOR_FORMAT_YUYV
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:136
NVBUF_DRIVER_TYPE_NVGPU
@ NVBUF_DRIVER_TYPE_NVGPU
Definition: sources/includes/nvbufsurface.h:707
NVBUF_COLOR_FORMAT_NV16_709
@ NVBUF_COLOR_FORMAT_NV16_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: sources/includes/nvbufsurface.h:220
NvBufSurfaceChromaSubsamplingParams::_reserved
uint8_t _reserved[6]
Reserved for alignment.
Definition: sources/includes/nvbufsurface.h:441
NVBUF_COLOR_FORMAT_NV24_10LE_ER
@ NVBUF_COLOR_FORMAT_NV24_10LE_ER
Specifies BT.601 ER colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
Definition: sources/includes/nvbufsurface.h:318
NVBUF_COLOR_FORMAT_B32F_G32F_R32F
@ NVBUF_COLOR_FORMAT_B32F_G32F_R32F
Specifies BGR-32bit Floating point multiplanar plane.
Definition: sources/includes/nvbufsurface.h:198
NvBufSurfaceParams::paramex
NvBufSurfaceParamsEx * paramex
pointers of extended parameters of single buffer in the batch.
Definition: sources/includes/nvbufsurface.h:587
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: sources/includes/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: sources/includes/nvbufsurface.h:270
NVBUF_PLATFORM_TYPE_T210
@ NVBUF_PLATFORM_TYPE_T210
Definition: sources/includes/nvbufsurface.h:715
NVBUF_MEM_CUDA_ARRAY
@ NVBUF_MEM_CUDA_ARRAY
Specifies CUDA Array memory type.
Definition: sources/includes/nvbufsurface.h:369
NvBufSurfaceDeviceInfo
Holds information about the underlying device.
Definition: sources/includes/nvbufsurface.h:724
STRUCTURE_PADDING
#define STRUCTURE_PADDING
Defines the default padding length for reserved fields of structures.
Definition: sources/includes/nvbufsurface.h:48
NvBufSurfaceMappedAddr::cudaPtr
void * cudaPtr
Holds a pointer to a mapped CUDA memory.
Definition: sources/includes/nvbufsurface.h:507
NVBUF_PLATFORM_TYPE_T234
@ NVBUF_PLATFORM_TYPE_T234
Definition: sources/includes/nvbufsurface.h:716
NvBufSurfaceAllocateParams::params
NvBufSurfaceCreateParams params
Hold legacy NvBufSurface creation parameters.
Definition: sources/includes/nvbufsurface.h:477
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: sources/includes/nvbufsurface.h:250
NvBufSurfaceParams
struct NvBufSurfaceParams NvBufSurfaceParams
Hold the information of single buffer in the batch.
NVBUF_PLATFORM_TYPE_UNKNOWN
@ NVBUF_PLATFORM_TYPE_UNKNOWN
Definition: sources/includes/nvbufsurface.h:712
NvBufSurfaceParams
Hold the information of single buffer in the batch.
Definition: sources/includes/nvbufsurface.h:562
NvBufSurfaceParamsEx
Hold the information(extended) of single buffer in the batch.
Definition: sources/includes/nvbufsurface.h:515
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: sources/includes/nvbufsurface.h:260
NvBufSurfaceMapParams::planes
NvBufSurfaceMapPlaneParams planes[NVBUF_MAX_PLANES]
Holds plane parameters.
Definition: sources/includes/nvbufsurface.h:683
NvBufSurfaceAllocateParams::memtag
NvBufSurfaceTag memtag
components tag to be used for memory allocation
Definition: sources/includes/nvbufsurface.h:483
NVBUF_COLOR_FORMAT_NV21
@ NVBUF_COLOR_FORMAT_NV21
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:304
NVBUF_PLATFORM_TYPE_T264
@ NVBUF_PLATFORM_TYPE_T264
Definition: sources/includes/nvbufsurface.h:718
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: sources/includes/nvbufsurface.h:240
NvBufSurfaceMapParams::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Holds chroma subsampling parameters.
Definition: sources/includes/nvbufsurface.h:681
NvBufSurfaceMappedAddr
Hold the pointers of mapped buffer.
Definition: sources/includes/nvbufsurface.h:499
NvBufSurfaceAllocateParams::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Chroma Subsampling parameters.
Definition: sources/includes/nvbufsurface.h:481
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: sources/includes/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: sources/includes/nvbufsurface.h:238
NVBUF_COLOR_FORMAT_INVALID
@ NVBUF_COLOR_FORMAT_INVALID
Specifies an invalid color format.
Definition: sources/includes/nvbufsurface.h:108
NVBUF_COLOR_FORMAT_RGB
@ NVBUF_COLOR_FORMAT_RGB
Specifies RGB-8-8-8 single plane.
Definition: sources/includes/nvbufsurface.h:162
NvBufSurfaceParams::cudaBuffer
NvBufSurfaceCudaBuffer * cudaBuffer
Holds a pointer to CUDA buffer.
Definition: sources/includes/nvbufsurface.h:589
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: sources/includes/nvbufsurface.h:236
NvBufSurfaceNvmmBuffer::bufferDesc
uint64_t bufferDesc
Holds a DMABUF FD.
Definition: sources/includes/nvbufsurface.h:697
NVBUF_COLOR_FORMAT_R8_G8_B8
@ NVBUF_COLOR_FORMAT_R8_G8_B8
Specifies RGB- unsigned 8 bit multiplanar plane.
Definition: sources/includes/nvbufsurface.h:192
NvBufSurfacePlaneParamsEx::secondfieldoffset
uint32_t secondfieldoffset[NVBUF_MAX_PLANES]
offset of the second field for interlaced buffer.
Definition: sources/includes/nvbufsurface.h:391
NvBufSurfaceCreateParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
Definition: sources/includes/nvbufsurface.h:461
NVBUF_COLOR_FORMAT_UYVY_709
@ NVBUF_COLOR_FORMAT_UYVY_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:286
NvBufSurfacePlaneParamsEx::physicaladdress
uint32_t physicaladdress[NVBUF_MAX_PLANES]
physical address of allocated planes.
Definition: sources/includes/nvbufsurface.h:395
NvBufSurface::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: sources/includes/nvbufsurface.h:615
NVBUF_COLOR_FORMAT_UYVP_709_ER
@ NVBUF_COLOR_FORMAT_UYVP_709_ER
Specifies BT.709 colorspace - 10 bit YUV ER 4:2:2 interleaved.
Definition: sources/includes/nvbufsurface.h:330
NvBufSurfaceCudaBuffer::reserved
uint8_t reserved[64]
Reserved.
Definition: sources/includes/nvbufsurface.h:556
NvBufSurfaceMapPlaneParams::reserved
uint8_t reserved[64]
Reserved.
Definition: sources/includes/nvbufsurface.h:640
NvBufSurfaceDeviceInfo::reserved2
bool reserved2
Definition: sources/includes/nvbufsurface.h:732
NvBufSurfaceParamsEx::planeParamsex
NvBufSurfacePlaneParamsEx planeParamsex
plane wise extended info
Definition: sources/includes/nvbufsurface.h:528
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: sources/includes/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: sources/includes/nvbufsurface.h:665
NvBufSurfaceUnMap
int NvBufSurfaceUnMap(NvBufSurface *surf, int index, int plane)
Unmaps previously mapped buffer(s).
NvBufSurfaceExtendedMapParams_t::memHandle
NvBufSurfaceCudaIpcMemHandle memHandle
Definition: sources/includes/nvbufsurface.h:656
NVBUF_DISPLAYSCANFORMAT_PROGRESSIVE
@ NVBUF_DISPLAYSCANFORMAT_PROGRESSIVE
Progessive scan formats.
Definition: sources/includes/nvbufsurface.h:378
NvBufSurfaceMapPlaneParams::pitch
uint32_t pitch
Holds the pitches of planes in bytes.
Definition: sources/includes/nvbufsurface.h:628
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: sources/includes/nvbufsurface.h:276
NvBufSurfacePlaneParams::pitch
uint32_t pitch[NVBUF_MAX_PLANES]
Holds the pitches of planes in bytes.
Definition: sources/includes/nvbufsurface.h:416
NVBUF_COLOR_FORMAT_YUV444_2020
@ NVBUF_COLOR_FORMAT_YUV444_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: sources/includes/nvbufsurface.h:256
NVBUF_COLOR_FORMAT_UYVY_ER
@ NVBUF_COLOR_FORMAT_UYVY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:130
NVBUF_PLATFORM_TYPE_T256
@ NVBUF_PLATFORM_TYPE_T256
Definition: sources/includes/nvbufsurface.h:717
NvBufSurfacePlaneParams::bytesPerPix
uint32_t bytesPerPix[NVBUF_MAX_PLANES]
Holds the number of bytes occupied by a pixel in each plane.
Definition: sources/includes/nvbufsurface.h:422
NvBufSurfaceParams::height
uint32_t height
Holds the height of the buffer.
Definition: sources/includes/nvbufsurface.h:566
NvBufSurfaceMappedAddr::addr
void * addr[NVBUF_MAX_PLANES]
Holds planewise pointers to a CPU mapped buffer.
Definition: sources/includes/nvbufsurface.h:501
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: sources/includes/nvbufsurface.h:526
NvBufSurfaceMapPlaneParams::height
uint32_t height
Holds the heights of planes.
Definition: sources/includes/nvbufsurface.h:626
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: sources/includes/nvbufsurface.h:228
NVBUF_COLOR_FORMAT_UYVY_2020
@ NVBUF_COLOR_FORMAT_UYVY_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 planar.
Definition: sources/includes/nvbufsurface.h:290
NVBUF_MAP_READ_WRITE
@ NVBUF_MAP_READ_WRITE
Specifies NvBufSurface mapping type "read/write.".
Definition: sources/includes/nvbufsurface.h:74
NVBUF_COLOR_FORMAT_NV24_12LE_709
@ NVBUF_COLOR_FORMAT_NV24_12LE_709
Specifies BT.709 colorspace - Y/CbCr 12 bit 4:4:4 multi-planar.
Definition: sources/includes/nvbufsurface.h:324
NvBufSurfaceTag
NvBufSurfaceTag
Defines tags that identify the components requesting a memory allocation.
Definition: sources/includes/nvbufsurface.h:84
NvBufSurfaceMapParams::extendedMapParams
void * extendedMapParams
Holds the extended Map parameters.
Definition: sources/includes/nvbufsurface.h:685
NVBUF_COLOR_FORMAT_LAST
@ NVBUF_COLOR_FORMAT_LAST
Definition: sources/includes/nvbufsurface.h:333
NvBufSurface::surfaceList
NvBufSurfaceParams * surfaceList
Holds a pointer to an array of batched buffers.
Definition: sources/includes/nvbufsurface.h:611
NvBufSurfaceMemType
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
Definition: sources/includes/nvbufsurface.h:350
NVBUF_GPU_L2_CACHE_FLUSH
@ NVBUF_GPU_L2_CACHE_FLUSH
Definition: sources/includes/nvbufsurface.h:742
NvBufSurfaceAllocateParams
Hold extended parameters required to allocate NvBufSurface.
Definition: sources/includes/nvbufsurface.h:475
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: sources/includes/nvbufsurface.h:114
NvBufSurfacePlaneParams::height
uint32_t height[NVBUF_MAX_PLANES]
Holds the heights of planes.
Definition: sources/includes/nvbufsurface.h:414
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...
NvBufSurfaceCudaBuffer::extMem
void * extMem
Holds a pointer to external CUDA memory for imported CUDA buffers.
Definition: sources/includes/nvbufsurface.h:552
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: sources/includes/nvbufsurface.h:274
NvBufSurfaceParams::planeParams
NvBufSurfacePlaneParams planeParams
Holds planewise information (width, height, pitch, offset, etc.).
Definition: sources/includes/nvbufsurface.h:582
NVBUF_COLOR_FORMAT_UYVP_ER
@ NVBUF_COLOR_FORMAT_UYVP_ER
Specifies BT.601 colorspace - 10 bit YUV ER 4:2:2 interleaved.
Definition: sources/includes/nvbufsurface.h:248
NvBufSurface::memType
NvBufSurfaceMemType memType
Holds type of memory for buffers in the batch.
Definition: sources/includes/nvbufsurface.h:609
NVBUF_COLOR_FORMAT_YVYU_ER
@ NVBUF_COLOR_FORMAT_YVYU_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: sources/includes/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: sources/includes/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: sources/includes/nvbufsurface.h:339
NvBufSurfaceChromaSubsamplingParams::chromaLocVert
uint8_t chromaLocVert
Definition: sources/includes/nvbufsurface.h:439
NvBufSurfaceDeviceInfo::isVicPresent
bool isVicPresent
Indicates if VIC is present on the platform.
Definition: sources/includes/nvbufsurface.h:728
NvBufSurfaceCudaBuffer
struct NvBufSurfaceCudaBuffer NvBufSurfaceCudaBuffer
Holds information of CUDA buffer.
NVBUF_GPU_L2_CACHE_FLUSH_INVALIDATE
@ NVBUF_GPU_L2_CACHE_FLUSH_INVALIDATE
Definition: sources/includes/nvbufsurface.h:743
NVBUF_COLOR_FORMAT_GRAY8_ER
@ NVBUF_COLOR_FORMAT_GRAY8_ER
Specifies 8 bit GRAY scale ER - single plane.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:491
NvBufSurfaceParams::bufferDesc
uint64_t bufferDesc
Holds a DMABUF FD.
Definition: sources/includes/nvbufsurface.h:575
NvBufSurfaceParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: sources/includes/nvbufsurface.h:591
NVBUF_COLOR_FORMAT_YUV422
@ NVBUF_COLOR_FORMAT_YUV422
Specifies BT.601 colorspace - YUV422 multi-planar.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:126
NvBufSurfaceMapParams::memType
NvBufSurfaceMemType memType
Holds type of memory.
Definition: sources/includes/nvbufsurface.h:673
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: sources/includes/nvbufsurface.h:254
NVBUF_COLOR_FORMAT_NV12_ER
@ NVBUF_COLOR_FORMAT_NV12_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: sources/includes/nvbufsurface.h:122
NVBUF_PLATFORM_TYPE_T186
@ NVBUF_PLATFORM_TYPE_T186
Definition: sources/includes/nvbufsurface.h:713
NvBufSurfaceCreateParams
struct NvBufSurfaceCreateParams NvBufSurfaceCreateParams
Holds parameters required to allocate an NvBufSurface.
NVBUF_MAP_READ
@ NVBUF_MAP_READ
Specifies NvBufSurface mapping type "read.".
Definition: sources/includes/nvbufsurface.h:71
NvBufSurfaceParamsEx::sizeofvaliddatainbytes
int32_t sizeofvaliddatainbytes
size of the valid data from the first to the last valid byte.
Definition: sources/includes/nvbufsurface.h:521
NVBUF_LAYOUT_BLOCK_LINEAR
@ NVBUF_LAYOUT_BLOCK_LINEAR
Specifies block linear layout.
Definition: sources/includes/nvbufsurface.h:344
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: sources/includes/nvbufsurface.h:298
NvBufSurfaceCreateParams::layout
NvBufSurfaceLayout layout
Holds the surface layout.
Definition: sources/includes/nvbufsurface.h:464
NvBufSurfaceChromaSubsamplingParams::chromaLocHoriz
uint8_t chromaLocHoriz
location settings
Definition: sources/includes/nvbufsurface.h:438
NVBUF_COLOR_FORMAT_NV24_ER
@ NVBUF_COLOR_FORMAT_NV24_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: sources/includes/nvbufsurface.h:218
NVBUF_COLOR_FORMAT_YUV444
@ NVBUF_COLOR_FORMAT_YUV444
Specifies BT.601 colorspace - YUV444 multi-planar.
Definition: sources/includes/nvbufsurface.h:144
NvBufSurfaceCudaIpcMemHandle_t
CUDA IPC memory handle for NvBufSurface.
Definition: sources/includes/nvbufsurface.h:646
NVBUF_COLOR_FORMAT_NV24_10LE
@ NVBUF_COLOR_FORMAT_NV24_10LE
Specifies BT.601 colorspace - Y/CrCb 4:4:4 10-bit multi-planar.
Definition: sources/includes/nvbufsurface.h:214
NvBufSurfacePlaneParamsEx::_reserved
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
Definition: sources/includes/nvbufsurface.h:401
NvBufSurfaceMapParams::totalSize
uint32_t totalSize
Holds the total size of allocated memory.
Definition: sources/includes/nvbufsurface.h:671
NvBufSurfaceMapNvmmBuffer
int NvBufSurfaceMapNvmmBuffer(NvBufSurface *surf, int index)
Creates an NVMM buffer from the memory of one or more NvBufSurface buffers.
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: sources/includes/nvbufsurface.h:268
NVBUF_COLOR_FORMAT_ABGR
@ NVBUF_COLOR_FORMAT_ABGR
Specifies ABGR-8-8-8-8 single plane.
Definition: sources/includes/nvbufsurface.h:152
NvBufSurfaceParams::mappedAddr
NvBufSurfaceMappedAddr mappedAddr
Holds pointers to mapped buffers.
Definition: sources/includes/nvbufsurface.h:585
NVBUF_COLOR_FORMAT_NV16_2020
@ NVBUF_COLOR_FORMAT_NV16_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: sources/includes/nvbufsurface.h:296
NVBUF_COLOR_FORMAT_NV24_12LE_ER
@ NVBUF_COLOR_FORMAT_NV24_12LE_ER
Specifies BT.601 ER colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
Definition: sources/includes/nvbufsurface.h:322
NvBufSurfaceDeviceInfo::platformType
NvBufSurfacePlatformType platformType
Indicates the Jetson platform type.
Definition: sources/includes/nvbufsurface.h:734
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: sources/includes/nvbufsurface.h:184
NVBUF_MAP_WRITE
@ NVBUF_MAP_WRITE
Specifies NvBufSurface mapping type "write.".
Definition: sources/includes/nvbufsurface.h:72
NvBufSurfacePlaneParams
Holds plane wise parameters of a buffer.
Definition: sources/includes/nvbufsurface.h:407
NVBUF_COLOR_FORMAT_NV16_ER
@ NVBUF_COLOR_FORMAT_NV16_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: sources/includes/nvbufsurface.h:216
NVBUF_COLOR_FORMAT_NV12
@ NVBUF_COLOR_FORMAT_NV12
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: sources/includes/nvbufsurface.h:120
NvBufSurfaceTag_VIDEO_ENC
@ NvBufSurfaceTag_VIDEO_ENC
tag for H264/H265 Video Encoder.
Definition: sources/includes/nvbufsurface.h:95
NvBufSurfaceParamsEx::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
chroma subsampling parameters.
Definition: sources/includes/nvbufsurface.h:524
NvBufSurfaceCudaBuffer::mipmap
void * mipmap
Holds a pointer to external CUDA mipmaped array for imported CUDA buffers.
Definition: sources/includes/nvbufsurface.h:554
NvBufSurfacePlaneParams::_reserved
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
Definition: sources/includes/nvbufsurface.h:424
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.
NvBufSurfaceMappedAddr::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: sources/includes/nvbufsurface.h:509
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: sources/includes/nvbufsurface.h:206
NVBUF_COLOR_FORMAT_BGR
@ NVBUF_COLOR_FORMAT_BGR
Specifies BGR-8-8-8 single plane.
Definition: sources/includes/nvbufsurface.h:164
NvBufSurfaceMapParams::fd
uint64_t fd
Holds a DMABUF FD.
Definition: sources/includes/nvbufsurface.h:669
NvBufSurfaceCreateParams::isContiguous
bool isContiguous
Holds a "contiguous memory" flag.
Definition: sources/includes/nvbufsurface.h:459
NvBufSurfaceTag_JPEG
@ NvBufSurfaceTag_JPEG
tag for Jpeg Encoder/Decoder.
Definition: sources/includes/nvbufsurface.h:91
NVBUF_PLATFORM_TYPE_T194
@ NVBUF_PLATFORM_TYPE_T194
Definition: sources/includes/nvbufsurface.h:714
NVBUF_GPU_L2_CACHE_INVALIDATE
@ NVBUF_GPU_L2_CACHE_INVALIDATE
Definition: sources/includes/nvbufsurface.h:741
NvBufSurfaceChromaSubsamplingParams
struct NvBufSurfaceChromaSubsamplingParams NvBufSurfaceChromaSubsamplingParams
Holds Chroma Subsampling parameters for NvBufSurface allocation.
NvBufSurfaceParams::pitch
uint32_t pitch
Holds the pitch of the buffer.
Definition: sources/includes/nvbufsurface.h:568
NVBUF_MEM_SURFACE_ARRAY
@ NVBUF_MEM_SURFACE_ARRAY
Specifies NVRM Surface Array type.
Definition: sources/includes/nvbufsurface.h:363
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: sources/includes/nvbufsurface.h:188
NvBufSurfaceUnMapNvmmBuffer
int NvBufSurfaceUnMapNvmmBuffer(NvBufSurface *surf, int index)
Destroys the previously created NVMM buffer.
NvBufSurfaceMapEglImage
int NvBufSurfaceMapEglImage(NvBufSurface *surf, int index)
Creates an EGLImage from the memory of one or more NvBufSurface buffers.
NVBUF_COLOR_FORMAT_UYVP_2020
@ NVBUF_COLOR_FORMAT_UYVP_2020
Specifies BT.2020 colorspace - 10 bit YUV 4:2:2 interleaved.
Definition: sources/includes/nvbufsurface.h:332
NVBUF_COLOR_FORMAT_RGBA
@ NVBUF_COLOR_FORMAT_RGBA
Specifies RGBA-8-8-8-8 single plane.
Definition: sources/includes/nvbufsurface.h:146
NvBufSurfaceCudaBuffer::basePtr
void * basePtr
Holds a base pointer to allocated CUDA memory.
Definition: sources/includes/nvbufsurface.h:544
NvBufSurfaceExtendedMapParams_t::reserved
void * reserved[64]
Definition: sources/includes/nvbufsurface.h:657
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: sources/includes/nvbufsurface.h:242
NvBufSurfacePlaneParamsEx::flags
uint64_t flags[NVBUF_MAX_PLANES]
flags associated with planes
Definition: sources/includes/nvbufsurface.h:397
NvBufSurfaceMapParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: sources/includes/nvbufsurface.h:687
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: sources/includes/nvbufsurface.h:288
NvBufSurfaceCreateParams
Holds parameters required to allocate an NvBufSurface.
Definition: sources/includes/nvbufsurface.h:447
NvBufSurface::batchSize
uint32_t batchSize
Holds the batch size.
Definition: sources/includes/nvbufsurface.h:601
NvBufSurfaceMemMapFlags
NvBufSurfaceMemMapFlags
Defines mapping types of NvBufSurface.
Definition: sources/includes/nvbufsurface.h:69
NvBufSurfaceDriverType
NvBufSurfaceDriverType
Defines the type of underlying kernel driver detected for GPU access.
Definition: sources/includes/nvbufsurface.h:705
NvBufSurfaceGPUL2SyncParams
struct NvBufSurfaceGPUL2SyncParams NvBufSurfaceGPUL2SyncParams
NvBufSurfaceDeviceInfo::isIntegratedGpu
bool isIntegratedGpu
Indicates GPU is integrated GPU or not.
Definition: sources/includes/nvbufsurface.h:730
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: sources/includes/nvbufsurface.h:232
NvBufSurfaceSyncGpuL2CacheForDevice
int NvBufSurfaceSyncGpuL2CacheForDevice(NvBufSurface *surf, int index, NvBufSurfaceGPUL2SyncParams *params)
Syncs the GPU L2 cache memory for the device.
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: sources/includes/nvbufsurface.h:266
NvBufSurfaceCudaBuffer::dataPtr
void * dataPtr
Holds a page aligned data pointer to CUDA memory for image buffers if CUDA allocated address is not p...
Definition: sources/includes/nvbufsurface.h:550
NvBufSurfaceParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
Definition: sources/includes/nvbufsurface.h:570
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: sources/includes/nvbufsurface.h:176
NVBUF_COLOR_FORMAT_YUV420
@ NVBUF_COLOR_FORMAT_YUV420
Specifies BT.601 colorspace - YUV420 multi-planar.
Definition: sources/includes/nvbufsurface.h:112
NVBUF_COLOR_FORMAT_NV24_2020
@ NVBUF_COLOR_FORMAT_NV24_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: sources/includes/nvbufsurface.h:316
NvBufSurfaceColorFormat
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
Definition: sources/includes/nvbufsurface.h:105
NvBufSurfaceTag_NONE
@ NvBufSurfaceTag_NONE
tag None.
Definition: sources/includes/nvbufsurface.h:87
NvBufSurfaceCreateParams::width
uint32_t width
Holds the width of the buffer.
Definition: sources/includes/nvbufsurface.h:451
NVBUF_COLOR_FORMAT_R32F_G32F_B32F
@ NVBUF_COLOR_FORMAT_R32F_G32F_B32F
Specifies RGB-32bit Floating point multiplanar plane.
Definition: sources/includes/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: sources/includes/nvbufsurface.h:234
NVBUF_COLOR_FORMAT_RGBx
@ NVBUF_COLOR_FORMAT_RGBx
Specifies RGBx-8-8-8-8 single plane.
Definition: sources/includes/nvbufsurface.h:154
NvBufSurfaceMappedAddr::eglImage
void * eglImage
Holds a pointer to a mapped EGLImage.
Definition: sources/includes/nvbufsurface.h:503
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: sources/includes/nvbufsurface.h:230