NVIDIA DeepStream SDK API Reference

9.2 Release
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: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
35 #ifndef NVBUFSURFACE_H_
36 #define NVBUFSURFACE_H_
37 
38 #include <stdint.h>
39 #include <stdbool.h>
40 
41 #ifdef __cplusplus
42 extern "C"
43 {
44 #endif
45 
53 #define STRUCTURE_PADDING 4
54 
56 #define NVBUF_MAX_PLANES 4
57 
62 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_HORIZ_DEFAULT 0
63 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_VERT_DEFAULT 1
64 
65 #define NVBUFSURFACE_CHROMA_SUBSAMPLING_PARAMS_DEFAULT \
66  { \
67  NVBUFSURFACE_CHROMA_SUBSAMPLING_HORIZ_DEFAULT, \
68  NVBUFSURFACE_CHROMA_SUBSAMPLING_VERT_DEFAULT \
69  }
70 
74 typedef enum
75 {
82 
89 typedef enum
90 {
106 
110 typedef enum
111 {
340 
344 typedef enum
345 {
351 
355 typedef enum
356 {
376 
380 typedef enum
381 {
387 
392 {
408 
413 {
415  uint32_t num_planes;
431 
432 
441 {
443  uint8_t chromaLocHoriz;
444  uint8_t chromaLocVert;
446  uint8_t _reserved[6];
448 
452 typedef struct NvBufSurfaceCreateParams {
454  uint32_t gpuId;
456  uint32_t width;
458  uint32_t height;
461  uint32_t size;
475 
496  uint32_t _reservedParam;
500 
504 typedef struct NvBufSurfaceMappedAddr {
508  void *eglImage;
510  void *nvmmPtr;
512  void *cudaPtr;
516 
520 typedef struct NvBufSurfaceParamsEx {
534 
537 
542 typedef struct NvBufSurfaceCudaBuffer {
549  void *basePtr;
555  void *dataPtr;
557  void *extMem;
559  void *mipmap;
561  uint8_t reserved[64];
563 
567 typedef struct NvBufSurfaceParams {
569  uint32_t width;
571  uint32_t height;
573  uint32_t pitch;
580  uint64_t bufferDesc;
582  uint32_t dataSize;
585  void * dataPtr;
595 
598 
602 typedef struct NvBufSurface {
604  uint32_t gpuId;
606  uint32_t batchSize;
609  uint32_t numFilled;
619 
621 } NvBufSurface;
622 
627 {
629  uint32_t width;
631  uint32_t height;
633  uint32_t pitch;
635  uint32_t offset;
637  uint32_t psize;
641  uint32_t blockheightlog2;
643  uint64_t flags;
645  uint8_t reserved[64];
647 
652 {
653  char reserved[64];
655 
660 {
662  void *reserved[64];
664 
668 typedef struct NvBufSurfaceMapParams {
670  uint32_t num_planes;
672  uint32_t gpuId;
674  uint64_t fd;
676  uint32_t totalSize;
694 
698 typedef struct NvBufSurfaceNvmmBuffer {
700  void *dataPtr;
702  uint64_t bufferDesc;
704  uint8_t reserved[64];
706 
710 typedef enum {
715 
716 typedef enum {
725 
729 typedef struct NvBufSurfaceDeviceInfo {
736  bool reserved1;
737  bool reserved2;
741  uint8_t reserved[60];
743 
745 {
750 
752 {
758 
778 int NvBufSurfaceCreate (NvBufSurface **surf, uint32_t batchSize,
779  NvBufSurfaceCreateParams *params);
780 
797 int NvBufSurfaceAllocate (NvBufSurface **surf, uint32_t batchSize,
798  NvBufSurfaceAllocateParams *paramsext);
799 
808 
848 int NvBufSurfaceMap (NvBufSurface *surf, int index, int plane, NvBufSurfaceMemMapFlags type);
849 
861 int NvBufSurfaceUnMap (NvBufSurface *surf, int index, int plane);
862 
879 int NvBufSurfaceCopy (NvBufSurface *srcSurf, NvBufSurface *dstSurf);
880 
897 int NvBufSurface2Raw (NvBufSurface *Surf, unsigned int index, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr);
898 
915 int Raw2NvBufSurface (unsigned char *ptr, unsigned int index, unsigned int plane, unsigned int in_width, unsigned int in_height, NvBufSurface *Surf);
916 
931 int NvBufSurfaceSyncForCpu (NvBufSurface *surf, int index, int plane);
932 
947 int NvBufSurfaceSyncForDevice (NvBufSurface *surf, int index, int plane);
948 
957 int NvBufSurfaceFromFd (int dmabuf_fd, void **buffer);
958 
974 int NvBufSurfaceMemSet (NvBufSurface *surf, int index, int plane, uint8_t value);
975 
1002 int NvBufSurfaceMapEglImage (NvBufSurface *surf, int index);
1003 
1013 int NvBufSurfaceUnMapEglImage (NvBufSurface *surf, int index);
1014 
1026 int NvBufSurfaceImport (NvBufSurface **out_nvbuf_surf, const NvBufSurfaceMapParams *in_params);
1027 
1037 int NvBufSurfaceGetMapParams (const NvBufSurface *surf, int index, NvBufSurfaceMapParams *params);
1038 
1064 int NvBufSurfaceMapCudaBuffer (NvBufSurface *surf, int index);
1065 
1075 int NvBufSurfaceUnMapCudaBuffer (NvBufSurface *surf, int index);
1076 
1102 int NvBufSurfaceMapNvmmBuffer (NvBufSurface *surf, int index);
1103 
1113 int NvBufSurfaceUnMapNvmmBuffer (NvBufSurface *surf, int index);
1114 
1129 
1144 
1145 #ifdef __cplusplus
1146 }
1147 #endif
1148 #endif /* NVBUFSURFACE_H_ */
NvBufSurfaceParamsEx
struct NvBufSurfaceParamsEx NvBufSurfaceParamsEx
Hold the information(extended) of single buffer in the batch.
NvBufSurfacePlatformType
NvBufSurfacePlatformType
Definition: includes/nvbufsurface.h:716
NVBUF_COLOR_FORMAT_NV12_10LE
@ NVBUF_COLOR_FORMAT_NV12_10LE
Specifies BT.601 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: includes/nvbufsurface.h:171
NVBUF_COLOR_FORMAT_YUV420_709_ER
@ NVBUF_COLOR_FORMAT_YUV420_709_ER
Specifies BT.709 colorspace - YUV420 ER multi-planar.
Definition: includes/nvbufsurface.h:177
NvBufSurfaceParams::width
uint32_t width
Holds the width of the buffer.
Definition: includes/nvbufsurface.h:569
NvBufSurfacePlaneParamsEx::drmModifier
uint64_t drmModifier[NVBUF_MAX_PLANES]
DRM modifier for plane.
Definition: includes/nvbufsurface.h:404
NvBufSurfaceTag_VIDEO_DEC
@ NvBufSurfaceTag_VIDEO_DEC
tag for H264/H265/VP9 Video Decoder.
Definition: includes/nvbufsurface.h:102
NVBUF_COLOR_FORMAT_NV12_709
@ NVBUF_COLOR_FORMAT_NV12_709
Specifies BT.709 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: includes/nvbufsurface.h:179
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: includes/nvbufsurface.h:183
NvBufSurfaceMapPlaneParams::psize
uint32_t psize
Holds the sizes of planes in bytes.
Definition: includes/nvbufsurface.h:637
NVBUF_COLOR_FORMAT_NV16_12LE
@ NVBUF_COLOR_FORMAT_NV16_12LE
Specifies BT.601 colorspace - Y/CbCr 4:2:2 12-bit semi-planar.
Definition: includes/nvbufsurface.h:311
NvBufSurfaceChromaSubsamplingParams
Holds Chroma Subsampling parameters for NvBufSurface allocation.
Definition: includes/nvbufsurface.h:440
NvBufSurfacePlaneParamsEx
Holds plane wise parameters(extended) of a buffer.
Definition: includes/nvbufsurface.h:391
NVBUF_MEM_CUDA_PINNED
@ NVBUF_MEM_CUDA_PINNED
Specifies CUDA Host memory type.
Definition: includes/nvbufsurface.h:362
NvBufSurface::isContiguous
bool isContiguous
Holds an "is contiguous" flag.
Definition: includes/nvbufsurface.h:612
NVBUF_COLOR_FORMAT_A32
@ NVBUF_COLOR_FORMAT_A32
Specifies Optical flow SAD calculation Buffer format.
Definition: includes/nvbufsurface.h:249
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: includes/nvbufsurface.h:287
NvBufSurfaceMapPlaneParams
Holds plane parameters to map the buffer received from another process.
Definition: includes/nvbufsurface.h:626
NvBufSurfaceCudaIpcMemHandle_t::reserved
char reserved[64]
Definition: includes/nvbufsurface.h:653
NvBufSurfaceAllocateParams::displayscanformat
NvBufSurfaceDisplayScanFormat displayscanformat
Display scan format.
Definition: includes/nvbufsurface.h:484
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: includes/nvbufsurface.h:604
NvBufSurfaceTag_PROTECTED
@ NvBufSurfaceTag_PROTECTED
tag for VPR Buffers.
Definition: includes/nvbufsurface.h:98
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: includes/nvbufsurface.h:315
NvBufSurfaceCreateParams::height
uint32_t height
Holds the height of the buffer.
Definition: includes/nvbufsurface.h:458
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: includes/nvbufsurface.h:319
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: includes/nvbufsurface.h:317
NvBufSurfaceDeviceInfo::driverType
NvBufSurfaceDriverType driverType
The detected device type (nvgpu, OpenRM, etc.).
Definition: includes/nvbufsurface.h:731
NVBUF_COLOR_FORMAT_NV24_12LE
@ NVBUF_COLOR_FORMAT_NV24_12LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 12-bit multi-planar.
Definition: includes/nvbufsurface.h:325
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: includes/nvbufsurface.h:313
NVBUF_COLOR_FORMAT_VYUY
@ NVBUF_COLOR_FORMAT_VYUY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: includes/nvbufsurface.h:137
NVBUF_DISPLAYSCANFORMAT_INTERLACED
@ NVBUF_DISPLAYSCANFORMAT_INTERLACED
Interlaced scan formats.
Definition: includes/nvbufsurface.h:385
NvBufSurfaceMapParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format.
Definition: includes/nvbufsurface.h:684
NvBufSurfaceGPUL2SyncCacheOps
NvBufSurfaceGPUL2SyncCacheOps
Definition: includes/nvbufsurface.h:744
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: includes/nvbufsurface.h:269
NVBUF_COLOR_FORMAT_B8_G8_R8
@ NVBUF_COLOR_FORMAT_B8_G8_R8
Specifies BGR- unsigned 8 bit multiplanar plane.
Definition: includes/nvbufsurface.h:199
NVBUF_COLOR_FORMAT_UYVY
@ NVBUF_COLOR_FORMAT_UYVY
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: includes/nvbufsurface.h:133
NVBUF_COLOR_FORMAT_VYUY_ER
@ NVBUF_COLOR_FORMAT_VYUY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: includes/nvbufsurface.h:139
NvBufSurfaceDisplayScanFormat
NvBufSurfaceDisplayScanFormat
Defines display scan formats for NvBufSurface video planes.
Definition: includes/nvbufsurface.h:380
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: includes/nvbufsurface.h:415
NVBUF_COLOR_FORMAT_BGRA64_LE
@ NVBUF_COLOR_FORMAT_BGRA64_LE
Specifies 64 bit BGRA (B16 G16 R16 A16) interleaved.
Definition: includes/nvbufsurface.h:299
NvBufSurfaceTag_CAMERA
@ NvBufSurfaceTag_CAMERA
tag for Camera.
Definition: includes/nvbufsurface.h:94
NVBUF_DRIVER_TYPE_RM
@ NVBUF_DRIVER_TYPE_RM
Definition: includes/nvbufsurface.h:713
NvBufSurfaceMapPlaneParams::offset
uint32_t offset
Holds the offsets of planes in bytes.
Definition: includes/nvbufsurface.h:635
NVBUF_COLOR_FORMAT_GRAY8
@ NVBUF_COLOR_FORMAT_GRAY8
Specifies 8 bit GRAY scale - single plane.
Definition: includes/nvbufsurface.h:115
NVBUF_COLOR_FORMAT_BGRA
@ NVBUF_COLOR_FORMAT_BGRA
Specifies BGRA-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:153
NvBufSurfaceGPUL2SyncParams::type
NvBufSurfaceGPUL2SyncCacheOps type
Holds the type of GPU L2 cache sync operation.
Definition: includes/nvbufsurface.h:754
NvBufSurfacePlaneParamsEx::scanformat
NvBufSurfaceDisplayScanFormat scanformat[NVBUF_MAX_PLANES]
display scan format - progressive/interlaced.
Definition: includes/nvbufsurface.h:394
NvBufSurfaceParamsEx::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: includes/nvbufsurface.h:535
NvBufSurfaceParams::dataPtr
void * dataPtr
Holds a pointer to allocated memory.
Definition: includes/nvbufsurface.h:585
NvBufSurfaceNvmmBuffer
struct NvBufSurfaceNvmmBuffer NvBufSurfaceNvmmBuffer
Holds information about mapped CUDA buffer.
NvBufSurfaceMappedAddr::nvmmPtr
void * nvmmPtr
Holds a pointer to a mapped NVRM memory.
Definition: includes/nvbufsurface.h:510
NvBufSurfaceNvmmBuffer
Holds information about mapped CUDA buffer.
Definition: includes/nvbufsurface.h:698
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: includes/nvbufsurface.h:173
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: includes/nvbufsurface.h:213
NVBUF_COLOR_FORMAT_YUV420_ER
@ NVBUF_COLOR_FORMAT_YUV420_ER
Specifies BT.601 colorspace - YUV420 ER multi-planar.
Definition: includes/nvbufsurface.h:121
NvBufSurfaceCudaBuffer
Holds information of CUDA buffer.
Definition: includes/nvbufsurface.h:542
NvBufSurfaceDeviceInfo::reserved1
bool reserved1
Definition: includes/nvbufsurface.h:736
NvBufSurfaceNvmmBuffer::reserved
uint8_t reserved[64]
Reserved.
Definition: includes/nvbufsurface.h:704
NvBufSurface
Holds information about batched buffers.
Definition: includes/nvbufsurface.h:602
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: includes/nvbufsurface.h:231
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: includes/nvbufsurface.h:629
NvBufSurfaceAllocateParams::disablePitchPadding
bool disablePitchPadding
disable pitch padding allocation only applicable for cuda and system memory allocation pitch would be...
Definition: includes/nvbufsurface.h:494
NvBufSurfacePlaneParams::width
uint32_t width[NVBUF_MAX_PLANES]
Holds the widths of planes.
Definition: includes/nvbufsurface.h:417
NvBufSurfaceMapParams::scanformat
NvBufSurfaceDisplayScanFormat scanformat
Holds display scan format.
Definition: includes/nvbufsurface.h:682
NvBufSurfaceAllocateParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: includes/nvbufsurface.h:498
NvBufSurfaceMapPlaneParams::blockheightlog2
uint32_t blockheightlog2
Holds block height of the planes for blockLinear layout buffer.
Definition: includes/nvbufsurface.h:641
NvBufSurfaceParams::dataSize
uint32_t dataSize
Holds the amount of allocated memory.
Definition: includes/nvbufsurface.h:582
NvBufSurfaceTag_VIDEO_CONVERT
@ NvBufSurfaceTag_VIDEO_CONVERT
tag for Video Transform/Composite/Blend.
Definition: includes/nvbufsurface.h:104
NVBUF_MEM_HANDLE
@ NVBUF_MEM_HANDLE
Specifies NVRM Handle type.
Definition: includes/nvbufsurface.h:370
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: includes/nvbufsurface.h:285
NVBUF_COLOR_FORMAT_BGRx
@ NVBUF_COLOR_FORMAT_BGRx
Specifies BGRx-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:161
NVBUF_COLOR_FORMAT_NV16_10LE
@ NVBUF_COLOR_FORMAT_NV16_10LE
Specifies BT.601 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
Definition: includes/nvbufsurface.h:215
NvBufSurfaceCreateParams::memType
NvBufSurfaceMemType memType
Holds the type of memory to be allocated.
Definition: includes/nvbufsurface.h:471
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: includes/nvbufsurface.h:229
NvBufSurface::isImportedBuf
bool isImportedBuf
Holds a flag for Imported buffer.
Definition: includes/nvbufsurface.h:618
NvBufSurfaceParamsEx::startofvaliddata
int32_t startofvaliddata
offset in bytes from the start of the buffer to the first valid byte.
Definition: includes/nvbufsurface.h:523
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: includes/nvbufsurface.h:331
NvBufSurfaceMapParams::layout
NvBufSurfaceLayout layout
Holds BL or PL layout.
Definition: includes/nvbufsurface.h:680
NvBufSurfaceMapPlaneParams::secondfieldoffset
uint32_t secondfieldoffset
Holds offset of the second field for interlaced buffer.
Definition: includes/nvbufsurface.h:639
NvBufSurfaceCreateParams::size
uint32_t size
Holds the amount of memory to be allocated.
Definition: includes/nvbufsurface.h:461
NvBufSurfaceMapParams::gpuId
uint32_t gpuId
Holds a GPU ID.
Definition: includes/nvbufsurface.h:672
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: includes/nvbufsurface.h:668
NVBUF_MEM_CUDA_UNIFIED
@ NVBUF_MEM_CUDA_UNIFIED
Specifies CUDA Unified memory type.
Definition: includes/nvbufsurface.h:366
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: includes/nvbufsurface.h:191
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: includes/nvbufsurface.h:283
NvBufSurfaceParams::layout
NvBufSurfaceLayout layout
Holds BL or PL.
Definition: includes/nvbufsurface.h:577
NvBufSurfaceAllocate
int NvBufSurfaceAllocate(NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceAllocateParams *paramsext)
Allocate batch of buffers.
NVBUF_DRIVER_TYPE_UNKNOWN
@ NVBUF_DRIVER_TYPE_UNKNOWN
Definition: includes/nvbufsurface.h:711
NVBUF_MEM_CUDA_DEVICE
@ NVBUF_MEM_CUDA_DEVICE
Specifies CUDA Device memory type.
Definition: includes/nvbufsurface.h:364
NvBufSurfacePlaneParamsEx::blockheightlog2
uint32_t blockheightlog2[NVBUF_MAX_PLANES]
block height of the planes for blockLinear layout buffer.
Definition: includes/nvbufsurface.h:398
NvBufSurfaceGPUL2SyncParams::reserved
void * reserved[STRUCTURE_PADDING]
Reserved fields for future use.
Definition: includes/nvbufsurface.h:756
NVBUF_COLOR_FORMAT_YVU420_ER
@ NVBUF_COLOR_FORMAT_YVU420_ER
Specifies BT.601 colorspace - YVU420 ER multi-planar.
Definition: includes/nvbufsurface.h:123
NVBUF_COLOR_FORMAT_UYVP_709
@ NVBUF_COLOR_FORMAT_UYVP_709
Specifies BT.709 colorspace - 10 bit YUV 4:2:2 interleaved.
Definition: includes/nvbufsurface.h:333
NVBUF_COLOR_FORMAT_YUV444_709
@ NVBUF_COLOR_FORMAT_YUV444_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: includes/nvbufsurface.h:257
NvBufSurfaceDeviceInfo::reserved
uint8_t reserved[60]
Reserved for future use.
Definition: includes/nvbufsurface.h:741
NVBUF_COLOR_FORMAT_YUV420_709
@ NVBUF_COLOR_FORMAT_YUV420_709
Specifies BT.709 colorspace - YUV420 multi-planar.
Definition: includes/nvbufsurface.h:175
NvBufSurfaceCreateParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: includes/nvbufsurface.h:473
NVBUF_COLOR_FORMAT_UYVP
@ NVBUF_COLOR_FORMAT_UYVP
Specifies BT.601 colorspace - 10 bit YUV 4:2:2 interleaved.
Definition: includes/nvbufsurface.h:251
NVBUF_COLOR_FORMAT_xRGB
@ NVBUF_COLOR_FORMAT_xRGB
Specifies xRGB-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:163
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: includes/nvbufsurface.h:277
NVBUF_COLOR_FORMAT_NV24_709
@ NVBUF_COLOR_FORMAT_NV24_709
Specifies BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: includes/nvbufsurface.h:227
NVBUF_MAX_PLANES
#define NVBUF_MAX_PLANES
Defines the maximum number of planes.
Definition: includes/nvbufsurface.h:56
NVBUF_LAYOUT_PITCH
@ NVBUF_LAYOUT_PITCH
Specifies pitch layout.
Definition: includes/nvbufsurface.h:347
NvBufSurfaceCreateParams::gpuId
uint32_t gpuId
Holds the GPU ID.
Definition: includes/nvbufsurface.h:454
NVBUF_MEM_DEFAULT
@ NVBUF_MEM_DEFAULT
Specifies the default memory type, i.e.
Definition: includes/nvbufsurface.h:360
NVBUF_COLOR_FORMAT_YUYV_ER
@ NVBUF_COLOR_FORMAT_YUYV_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: includes/nvbufsurface.h:143
NVBUF_MEM_SYSTEM
@ NVBUF_MEM_SYSTEM
Specifies memory allocated by malloc().
Definition: includes/nvbufsurface.h:372
NvBufSurfaceMapPlaneParams::flags
uint64_t flags
Holds flags associated with the planes.
Definition: includes/nvbufsurface.h:643
NvBufSurfaceGPUL2SyncParams
Definition: includes/nvbufsurface.h:751
NvBufSurface::numFilled
uint32_t numFilled
Holds the number valid and filled buffers.
Definition: includes/nvbufsurface.h:609
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: includes/nvbufsurface.h:700
NVBUF_COLOR_FORMAT_NV21_12LE
@ NVBUF_COLOR_FORMAT_NV21_12LE
Specifies BT.601 colorspace - Y/CrCb 4:2:0 12-bit multi-planar.
Definition: includes/nvbufsurface.h:209
NvBufSurfacePlaneParams::psize
uint32_t psize[NVBUF_MAX_PLANES]
Holds the sizes of planes in bytes.
Definition: includes/nvbufsurface.h:425
NvBufSurfaceExtendedMapParams_t
The extended map parameters NvBufSurface.
Definition: includes/nvbufsurface.h:659
NVBUF_COLOR_FORMAT_YUV444_10LE
@ NVBUF_COLOR_FORMAT_YUV444_10LE
Specifies BT.601 colorspace - Y/CbCr 4:4:4 10-bit multi-planar.
Definition: includes/nvbufsurface.h:263
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: includes/nvbufsurface.h:217
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: includes/nvbufsurface.h:297
NVBUF_COLOR_FORMAT_ARGB
@ NVBUF_COLOR_FORMAT_ARGB
Specifies ARGB-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:155
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: includes/nvbufsurface.h:267
NVBUF_COLOR_FORMAT_YVYU
@ NVBUF_COLOR_FORMAT_YVYU
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: includes/nvbufsurface.h:145
NvBufSurfacePlaneParams::offset
uint32_t offset[NVBUF_MAX_PLANES]
Holds the offsets of planes in bytes.
Definition: includes/nvbufsurface.h:423
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: includes/nvbufsurface.h:187
NVBUF_COLOR_FORMAT_NV12_2020
@ NVBUF_COLOR_FORMAT_NV12_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: includes/nvbufsurface.h:185
NVBUF_COLOR_FORMAT_xBGR
@ NVBUF_COLOR_FORMAT_xBGR
Specifies xBGR-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:165
NVBUF_COLOR_FORMAT_YUYV
@ NVBUF_COLOR_FORMAT_YUYV
Specifies BT.601 colorspace - YUV 4:2:2 planar.
Definition: includes/nvbufsurface.h:141
NVBUF_DRIVER_TYPE_NVGPU
@ NVBUF_DRIVER_TYPE_NVGPU
Definition: includes/nvbufsurface.h:712
NVBUF_COLOR_FORMAT_NV16_709
@ NVBUF_COLOR_FORMAT_NV16_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: includes/nvbufsurface.h:225
NvBufSurfaceChromaSubsamplingParams::_reserved
uint8_t _reserved[6]
Reserved for alignment.
Definition: includes/nvbufsurface.h:446
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: includes/nvbufsurface.h:323
NVBUF_COLOR_FORMAT_B32F_G32F_R32F
@ NVBUF_COLOR_FORMAT_B32F_G32F_R32F
Specifies BGR-32bit Floating point multiplanar plane.
Definition: includes/nvbufsurface.h:203
NvBufSurfaceParams::paramex
NvBufSurfaceParamsEx * paramex
pointers of extended parameters of single buffer in the batch.
Definition: includes/nvbufsurface.h:592
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: includes/nvbufsurface.h:305
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: includes/nvbufsurface.h:275
NVBUF_PLATFORM_TYPE_T210
@ NVBUF_PLATFORM_TYPE_T210
Definition: includes/nvbufsurface.h:720
NVBUF_MEM_CUDA_ARRAY
@ NVBUF_MEM_CUDA_ARRAY
Specifies CUDA Array memory type.
Definition: includes/nvbufsurface.h:374
NvBufSurfaceDeviceInfo
Holds information about the underlying device.
Definition: includes/nvbufsurface.h:729
STRUCTURE_PADDING
#define STRUCTURE_PADDING
Defines the default padding length for reserved fields of structures.
Definition: includes/nvbufsurface.h:53
NvBufSurfaceMappedAddr::cudaPtr
void * cudaPtr
Holds a pointer to a mapped CUDA memory.
Definition: includes/nvbufsurface.h:512
NVBUF_PLATFORM_TYPE_T234
@ NVBUF_PLATFORM_TYPE_T234
Definition: includes/nvbufsurface.h:721
NvBufSurfaceAllocateParams::params
NvBufSurfaceCreateParams params
Hold legacy NvBufSurface creation parameters.
Definition: includes/nvbufsurface.h:482
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: includes/nvbufsurface.h:255
NvBufSurfaceParams
struct NvBufSurfaceParams NvBufSurfaceParams
Hold the information of single buffer in the batch.
NVBUF_PLATFORM_TYPE_UNKNOWN
@ NVBUF_PLATFORM_TYPE_UNKNOWN
Definition: includes/nvbufsurface.h:717
NvBufSurfaceParams
Hold the information of single buffer in the batch.
Definition: includes/nvbufsurface.h:567
NvBufSurfaceParamsEx
Hold the information(extended) of single buffer in the batch.
Definition: includes/nvbufsurface.h:520
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: includes/nvbufsurface.h:265
NvBufSurfaceMapParams::planes
NvBufSurfaceMapPlaneParams planes[NVBUF_MAX_PLANES]
Holds plane parameters.
Definition: includes/nvbufsurface.h:688
NvBufSurfaceAllocateParams::memtag
NvBufSurfaceTag memtag
components tag to be used for memory allocation
Definition: includes/nvbufsurface.h:488
NVBUF_COLOR_FORMAT_NV21
@ NVBUF_COLOR_FORMAT_NV21
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: includes/nvbufsurface.h:129
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: includes/nvbufsurface.h:309
NVBUF_PLATFORM_TYPE_T264
@ NVBUF_PLATFORM_TYPE_T264
Definition: includes/nvbufsurface.h:723
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: includes/nvbufsurface.h:245
NvBufSurfaceMapParams::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Holds chroma subsampling parameters.
Definition: includes/nvbufsurface.h:686
NvBufSurfaceMappedAddr
Hold the pointers of mapped buffer.
Definition: includes/nvbufsurface.h:504
NvBufSurfaceAllocateParams::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
Chroma Subsampling parameters.
Definition: includes/nvbufsurface.h:486
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: includes/nvbufsurface.h:195
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: includes/nvbufsurface.h:243
NVBUF_COLOR_FORMAT_INVALID
@ NVBUF_COLOR_FORMAT_INVALID
Specifies an invalid color format.
Definition: includes/nvbufsurface.h:113
NVBUF_COLOR_FORMAT_RGB
@ NVBUF_COLOR_FORMAT_RGB
Specifies RGB-8-8-8 single plane.
Definition: includes/nvbufsurface.h:167
NvBufSurfaceParams::cudaBuffer
NvBufSurfaceCudaBuffer * cudaBuffer
Holds a pointer to CUDA buffer.
Definition: includes/nvbufsurface.h:594
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: includes/nvbufsurface.h:241
NvBufSurfaceNvmmBuffer::bufferDesc
uint64_t bufferDesc
Holds a DMABUF FD.
Definition: includes/nvbufsurface.h:702
NVBUF_COLOR_FORMAT_R8_G8_B8
@ NVBUF_COLOR_FORMAT_R8_G8_B8
Specifies RGB- unsigned 8 bit multiplanar plane.
Definition: includes/nvbufsurface.h:197
NvBufSurfacePlaneParamsEx::secondfieldoffset
uint32_t secondfieldoffset[NVBUF_MAX_PLANES]
offset of the second field for interlaced buffer.
Definition: includes/nvbufsurface.h:396
NvBufSurfaceCreateParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
Definition: includes/nvbufsurface.h:466
NVBUF_COLOR_FORMAT_UYVY_709
@ NVBUF_COLOR_FORMAT_UYVY_709
Specifies BT.709 colorspace - Y/CbCr 4:2:2 planar.
Definition: includes/nvbufsurface.h:291
NvBufSurfacePlaneParamsEx::physicaladdress
uint32_t physicaladdress[NVBUF_MAX_PLANES]
physical address of allocated planes.
Definition: includes/nvbufsurface.h:400
NvBufSurface::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: includes/nvbufsurface.h:620
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: includes/nvbufsurface.h:335
NvBufSurfaceCudaBuffer::reserved
uint8_t reserved[64]
Reserved.
Definition: includes/nvbufsurface.h:561
NvBufSurfaceMapPlaneParams::reserved
uint8_t reserved[64]
Reserved.
Definition: includes/nvbufsurface.h:645
NvBufSurfaceDeviceInfo::reserved2
bool reserved2
Definition: includes/nvbufsurface.h:737
NvBufSurfaceParamsEx::planeParamsex
NvBufSurfacePlaneParamsEx planeParamsex
plane wise extended info
Definition: includes/nvbufsurface.h:533
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: includes/nvbufsurface.h:307
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: includes/nvbufsurface.h:670
NvBufSurfaceUnMap
int NvBufSurfaceUnMap(NvBufSurface *surf, int index, int plane)
Unmaps previously mapped buffer(s).
NvBufSurfaceExtendedMapParams_t::memHandle
NvBufSurfaceCudaIpcMemHandle memHandle
Definition: includes/nvbufsurface.h:661
NVBUF_DISPLAYSCANFORMAT_PROGRESSIVE
@ NVBUF_DISPLAYSCANFORMAT_PROGRESSIVE
Progessive scan formats.
Definition: includes/nvbufsurface.h:383
NvBufSurfaceMapPlaneParams::pitch
uint32_t pitch
Holds the pitches of planes in bytes.
Definition: includes/nvbufsurface.h:633
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: includes/nvbufsurface.h:281
NvBufSurfacePlaneParams::pitch
uint32_t pitch[NVBUF_MAX_PLANES]
Holds the pitches of planes in bytes.
Definition: includes/nvbufsurface.h:421
NVBUF_COLOR_FORMAT_YUV444_2020
@ NVBUF_COLOR_FORMAT_YUV444_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: includes/nvbufsurface.h:261
NVBUF_COLOR_FORMAT_UYVY_ER
@ NVBUF_COLOR_FORMAT_UYVY_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: includes/nvbufsurface.h:135
NVBUF_PLATFORM_TYPE_T256
@ NVBUF_PLATFORM_TYPE_T256
Definition: includes/nvbufsurface.h:722
NvBufSurfacePlaneParams::bytesPerPix
uint32_t bytesPerPix[NVBUF_MAX_PLANES]
Holds the number of bytes occupied by a pixel in each plane.
Definition: includes/nvbufsurface.h:427
NvBufSurfaceParams::height
uint32_t height
Holds the height of the buffer.
Definition: includes/nvbufsurface.h:571
NvBufSurfaceMappedAddr::addr
void * addr[NVBUF_MAX_PLANES]
Holds planewise pointers to a CPU mapped buffer.
Definition: includes/nvbufsurface.h:506
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: includes/nvbufsurface.h:531
NvBufSurfaceMapPlaneParams::height
uint32_t height
Holds the heights of planes.
Definition: includes/nvbufsurface.h:631
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: includes/nvbufsurface.h:233
NVBUF_COLOR_FORMAT_UYVY_2020
@ NVBUF_COLOR_FORMAT_UYVY_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 planar.
Definition: includes/nvbufsurface.h:295
NVBUF_MAP_READ_WRITE
@ NVBUF_MAP_READ_WRITE
Specifies NvBufSurface mapping type "read/write.".
Definition: includes/nvbufsurface.h:79
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: includes/nvbufsurface.h:329
NvBufSurfaceTag
NvBufSurfaceTag
Defines tags that identify the components requesting a memory allocation.
Definition: includes/nvbufsurface.h:89
NvBufSurfaceMapParams::extendedMapParams
void * extendedMapParams
Holds the extended Map parameters.
Definition: includes/nvbufsurface.h:690
NVBUF_COLOR_FORMAT_LAST
@ NVBUF_COLOR_FORMAT_LAST
Definition: includes/nvbufsurface.h:338
NvBufSurface::surfaceList
NvBufSurfaceParams * surfaceList
Holds a pointer to an array of batched buffers.
Definition: includes/nvbufsurface.h:616
NvBufSurfaceMemType
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
Definition: includes/nvbufsurface.h:355
NVBUF_GPU_L2_CACHE_FLUSH
@ NVBUF_GPU_L2_CACHE_FLUSH
Definition: includes/nvbufsurface.h:747
NvBufSurfaceAllocateParams
Hold extended parameters required to allocate NvBufSurface.
Definition: includes/nvbufsurface.h:480
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: includes/nvbufsurface.h:119
NvBufSurfacePlaneParams::height
uint32_t height[NVBUF_MAX_PLANES]
Holds the heights of planes.
Definition: includes/nvbufsurface.h:419
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: includes/nvbufsurface.h:557
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: includes/nvbufsurface.h:279
NvBufSurfaceParams::planeParams
NvBufSurfacePlaneParams planeParams
Holds planewise information (width, height, pitch, offset, etc.).
Definition: includes/nvbufsurface.h:587
NVBUF_COLOR_FORMAT_UYVP_ER
@ NVBUF_COLOR_FORMAT_UYVP_ER
Specifies BT.601 colorspace - 10 bit YUV ER 4:2:2 interleaved.
Definition: includes/nvbufsurface.h:253
NvBufSurface::memType
NvBufSurfaceMemType memType
Holds type of memory for buffers in the batch.
Definition: includes/nvbufsurface.h:614
NVBUF_COLOR_FORMAT_YVYU_ER
@ NVBUF_COLOR_FORMAT_YVYU_ER
Specifies BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: includes/nvbufsurface.h:147
NVBUF_COLOR_FORMAT_NV21_10LE
@ NVBUF_COLOR_FORMAT_NV21_10LE
Specifies BT.601 colorspace - Y/CrCb 4:2:0 10-bit multi-planar.
Definition: includes/nvbufsurface.h:207
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: includes/nvbufsurface.h:344
NvBufSurfaceChromaSubsamplingParams::chromaLocVert
uint8_t chromaLocVert
Definition: includes/nvbufsurface.h:444
NvBufSurfaceDeviceInfo::isVicPresent
bool isVicPresent
Indicates if VIC is present on the platform.
Definition: includes/nvbufsurface.h:733
NvBufSurfaceCudaBuffer
struct NvBufSurfaceCudaBuffer NvBufSurfaceCudaBuffer
Holds information of CUDA buffer.
NVBUF_GPU_L2_CACHE_FLUSH_INVALIDATE
@ NVBUF_GPU_L2_CACHE_FLUSH_INVALIDATE
Definition: includes/nvbufsurface.h:748
NVBUF_COLOR_FORMAT_GRAY8_ER
@ NVBUF_COLOR_FORMAT_GRAY8_ER
Specifies 8 bit GRAY scale ER - single plane.
Definition: includes/nvbufsurface.h:289
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: includes/nvbufsurface.h:496
NvBufSurfaceParams::bufferDesc
uint64_t bufferDesc
Holds a DMABUF FD.
Definition: includes/nvbufsurface.h:580
NvBufSurfaceParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Definition: includes/nvbufsurface.h:596
NVBUF_COLOR_FORMAT_YUV422
@ NVBUF_COLOR_FORMAT_YUV422
Specifies BT.601 colorspace - YUV422 multi-planar.
Definition: includes/nvbufsurface.h:205
NVBUF_COLOR_FORMAT_NV21_ER
@ NVBUF_COLOR_FORMAT_NV21_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: includes/nvbufsurface.h:131
NvBufSurfaceMapParams::memType
NvBufSurfaceMemType memType
Holds type of memory.
Definition: includes/nvbufsurface.h:678
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: includes/nvbufsurface.h:259
NVBUF_COLOR_FORMAT_NV12_ER
@ NVBUF_COLOR_FORMAT_NV12_ER
Specifies BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: includes/nvbufsurface.h:127
NVBUF_PLATFORM_TYPE_T186
@ NVBUF_PLATFORM_TYPE_T186
Definition: includes/nvbufsurface.h:718
NvBufSurfaceCreateParams
struct NvBufSurfaceCreateParams NvBufSurfaceCreateParams
Holds parameters required to allocate an NvBufSurface.
NVBUF_MAP_READ
@ NVBUF_MAP_READ
Specifies NvBufSurface mapping type "read.".
Definition: includes/nvbufsurface.h:76
NvBufSurfaceParamsEx::sizeofvaliddatainbytes
int32_t sizeofvaliddatainbytes
size of the valid data from the first to the last valid byte.
Definition: includes/nvbufsurface.h:526
NVBUF_LAYOUT_BLOCK_LINEAR
@ NVBUF_LAYOUT_BLOCK_LINEAR
Specifies block linear layout.
Definition: includes/nvbufsurface.h:349
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: includes/nvbufsurface.h:303
NvBufSurfaceCreateParams::layout
NvBufSurfaceLayout layout
Holds the surface layout.
Definition: includes/nvbufsurface.h:469
NvBufSurfaceChromaSubsamplingParams::chromaLocHoriz
uint8_t chromaLocHoriz
location settings
Definition: includes/nvbufsurface.h:443
NVBUF_COLOR_FORMAT_NV24_ER
@ NVBUF_COLOR_FORMAT_NV24_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: includes/nvbufsurface.h:223
NVBUF_COLOR_FORMAT_YUV444
@ NVBUF_COLOR_FORMAT_YUV444
Specifies BT.601 colorspace - YUV444 multi-planar.
Definition: includes/nvbufsurface.h:149
NvBufSurfaceCudaIpcMemHandle_t
CUDA IPC memory handle for NvBufSurface.
Definition: includes/nvbufsurface.h:651
NVBUF_COLOR_FORMAT_NV24_10LE
@ NVBUF_COLOR_FORMAT_NV24_10LE
Specifies BT.601 colorspace - Y/CrCb 4:4:4 10-bit multi-planar.
Definition: includes/nvbufsurface.h:219
NvBufSurfacePlaneParamsEx::_reserved
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
Definition: includes/nvbufsurface.h:406
NvBufSurfaceMapParams::totalSize
uint32_t totalSize
Holds the total size of allocated memory.
Definition: includes/nvbufsurface.h:676
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: includes/nvbufsurface.h:273
NVBUF_COLOR_FORMAT_ABGR
@ NVBUF_COLOR_FORMAT_ABGR
Specifies ABGR-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:157
NvBufSurfaceParams::mappedAddr
NvBufSurfaceMappedAddr mappedAddr
Holds pointers to mapped buffers.
Definition: includes/nvbufsurface.h:590
NVBUF_COLOR_FORMAT_NV16_2020
@ NVBUF_COLOR_FORMAT_NV16_2020
Specifies BT.2020 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: includes/nvbufsurface.h:301
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: includes/nvbufsurface.h:327
NvBufSurfaceDeviceInfo::platformType
NvBufSurfacePlatformType platformType
Indicates the Jetson platform type.
Definition: includes/nvbufsurface.h:739
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: includes/nvbufsurface.h:189
NVBUF_MAP_WRITE
@ NVBUF_MAP_WRITE
Specifies NvBufSurface mapping type "write.".
Definition: includes/nvbufsurface.h:77
NvBufSurfacePlaneParams
Holds plane wise parameters of a buffer.
Definition: includes/nvbufsurface.h:412
NVBUF_COLOR_FORMAT_NV16_ER
@ NVBUF_COLOR_FORMAT_NV16_ER
Specifies BT.601_ER colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: includes/nvbufsurface.h:221
NVBUF_COLOR_FORMAT_NV12
@ NVBUF_COLOR_FORMAT_NV12
Specifies BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: includes/nvbufsurface.h:125
NvBufSurfaceTag_VIDEO_ENC
@ NvBufSurfaceTag_VIDEO_ENC
tag for H264/H265 Video Encoder.
Definition: includes/nvbufsurface.h:100
NvBufSurfaceParamsEx::chromaSubsampling
NvBufSurfaceChromaSubsamplingParams chromaSubsampling
chroma subsampling parameters.
Definition: includes/nvbufsurface.h:529
NvBufSurfaceCudaBuffer::mipmap
void * mipmap
Holds a pointer to external CUDA mipmaped array for imported CUDA buffers.
Definition: includes/nvbufsurface.h:559
NvBufSurfacePlaneParams::_reserved
void * _reserved[STRUCTURE_PADDING *NVBUF_MAX_PLANES]
Holds the reserved space for future use.
Definition: includes/nvbufsurface.h:429
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: includes/nvbufsurface.h:514
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: includes/nvbufsurface.h:211
NVBUF_COLOR_FORMAT_BGR
@ NVBUF_COLOR_FORMAT_BGR
Specifies BGR-8-8-8 single plane.
Definition: includes/nvbufsurface.h:169
NvBufSurfaceMapParams::fd
uint64_t fd
Holds a DMABUF FD.
Definition: includes/nvbufsurface.h:674
NvBufSurfaceCreateParams::isContiguous
bool isContiguous
Holds a "contiguous memory" flag.
Definition: includes/nvbufsurface.h:464
NvBufSurfaceTag_JPEG
@ NvBufSurfaceTag_JPEG
tag for Jpeg Encoder/Decoder.
Definition: includes/nvbufsurface.h:96
NVBUF_PLATFORM_TYPE_T194
@ NVBUF_PLATFORM_TYPE_T194
Definition: includes/nvbufsurface.h:719
NVBUF_GPU_L2_CACHE_INVALIDATE
@ NVBUF_GPU_L2_CACHE_INVALIDATE
Definition: includes/nvbufsurface.h:746
NvBufSurfaceChromaSubsamplingParams
struct NvBufSurfaceChromaSubsamplingParams NvBufSurfaceChromaSubsamplingParams
Holds Chroma Subsampling parameters for NvBufSurface allocation.
NvBufSurfaceParams::pitch
uint32_t pitch
Holds the pitch of the buffer.
Definition: includes/nvbufsurface.h:573
NVBUF_MEM_SURFACE_ARRAY
@ NVBUF_MEM_SURFACE_ARRAY
Specifies NVRM Surface Array type.
Definition: includes/nvbufsurface.h:368
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: includes/nvbufsurface.h:193
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: includes/nvbufsurface.h:337
NVBUF_COLOR_FORMAT_RGBA
@ NVBUF_COLOR_FORMAT_RGBA
Specifies RGBA-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:151
NvBufSurfaceCudaBuffer::basePtr
void * basePtr
Holds a base pointer to allocated CUDA memory.
Definition: includes/nvbufsurface.h:549
NvBufSurfaceExtendedMapParams_t::reserved
void * reserved[64]
Definition: includes/nvbufsurface.h:662
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: includes/nvbufsurface.h:247
NvBufSurfacePlaneParamsEx::flags
uint64_t flags[NVBUF_MAX_PLANES]
flags associated with planes
Definition: includes/nvbufsurface.h:402
NvBufSurfaceMapParams::_reserved
void * _reserved[STRUCTURE_PADDING]
Holds the reserved space for future use.
Definition: includes/nvbufsurface.h:692
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: includes/nvbufsurface.h:293
NvBufSurfaceCreateParams
Holds parameters required to allocate an NvBufSurface.
Definition: includes/nvbufsurface.h:452
NvBufSurface::batchSize
uint32_t batchSize
Holds the batch size.
Definition: includes/nvbufsurface.h:606
NvBufSurfaceMemMapFlags
NvBufSurfaceMemMapFlags
Defines mapping types of NvBufSurface.
Definition: includes/nvbufsurface.h:74
NvBufSurfaceDriverType
NvBufSurfaceDriverType
Defines the type of underlying kernel driver detected for GPU access.
Definition: includes/nvbufsurface.h:710
NvBufSurfaceGPUL2SyncParams
struct NvBufSurfaceGPUL2SyncParams NvBufSurfaceGPUL2SyncParams
NvBufSurfaceDeviceInfo::isIntegratedGpu
bool isIntegratedGpu
Indicates GPU is integrated GPU or not.
Definition: includes/nvbufsurface.h:735
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: includes/nvbufsurface.h:237
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: includes/nvbufsurface.h:271
NvBufSurfaceCudaBuffer::dataPtr
void * dataPtr
Holds a page aligned data pointer to CUDA memory for image buffers if CUDA allocated address is not p...
Definition: includes/nvbufsurface.h:555
NvBufSurfaceParams::colorFormat
NvBufSurfaceColorFormat colorFormat
Holds the color format of the buffer.
Definition: includes/nvbufsurface.h:575
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: includes/nvbufsurface.h:181
NVBUF_COLOR_FORMAT_YUV420
@ NVBUF_COLOR_FORMAT_YUV420
Specifies BT.601 colorspace - YUV420 multi-planar.
Definition: includes/nvbufsurface.h:117
NVBUF_COLOR_FORMAT_NV24_2020
@ NVBUF_COLOR_FORMAT_NV24_2020
Specifies BT.2020 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: includes/nvbufsurface.h:321
NvBufSurfaceColorFormat
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
Definition: includes/nvbufsurface.h:110
NvBufSurfaceTag_NONE
@ NvBufSurfaceTag_NONE
tag None.
Definition: includes/nvbufsurface.h:92
NvBufSurfaceCreateParams::width
uint32_t width
Holds the width of the buffer.
Definition: includes/nvbufsurface.h:456
NVBUF_COLOR_FORMAT_R32F_G32F_B32F
@ NVBUF_COLOR_FORMAT_R32F_G32F_B32F
Specifies RGB-32bit Floating point multiplanar plane.
Definition: includes/nvbufsurface.h:201
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: includes/nvbufsurface.h:239
NVBUF_COLOR_FORMAT_RGBx
@ NVBUF_COLOR_FORMAT_RGBx
Specifies RGBx-8-8-8-8 single plane.
Definition: includes/nvbufsurface.h:159
NvBufSurfaceMappedAddr::eglImage
void * eglImage
Holds a pointer to a mapped EGLImage.
Definition: includes/nvbufsurface.h:508
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: includes/nvbufsurface.h:235