Jetson Linux API Reference

32.5 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nvbuf_utils.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  */
10 
25 #ifndef _NVBUF_UTILS_H_
26 #define _NVBUF_UTILS_H_
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
33 #include <EGL/egl.h>
34 #include <EGL/eglext.h>
35 #include <errno.h>
36 #include <stdbool.h>
37 
41 #define MAX_NUM_PLANES 4
42 
46 #define MAX_COMPOSITE_FRAME 16
47 
52 #define NVBUF_CHROMA_SUBSAMPLING_HORIZ_DEFAULT 0
53 #define NVBUF_CHROMA_SUBSAMPLING_VERT_DEFAULT 1
54 
58 #define NVBUF_MAX_SYNCOBJ_PARAMS 5
59 
66 #define NVBUFFER_SYNCPOINT_WAIT_INFINITE 0xFFFFFFFF
67 
71 typedef enum
72 {
78 
82 typedef enum
83 {
89 
93 typedef enum
94 {
100 
104 typedef enum
105 {
113 
119 typedef enum
120 {
135 } NvBufferTag;
136 
140 typedef enum
141 {
255 
259 typedef enum
260 {
278 
282 typedef enum
283 {
297 
301 typedef enum {
311 
315 typedef enum {
319  NVBUFFER_BLEND = 1 << 1,
321 
328 {
329  uint32_t syncpointID;
330  uint32_t value;
332 
336 typedef struct _NvBufferSyncObjRec
337 {
339  uint32_t num_insyncobj;
341  uint32_t use_outsyncobj;
343 
347 typedef struct
348 {
350  float r;
352  float g;
354  float b;
356 
360 typedef struct
361 {
363  uint32_t top;
365  uint32_t left;
367  uint32_t width;
369  uint32_t height;
370 }NvBufferRect;
371 
378 typedef struct _NvBufferSession * NvBufferSession;
379 
384 {
386  uint8_t chromaLocHoriz;
387  uint8_t chromaLocVert;
389 
390 #define NVBUF_CHROMA_SUBSAMPLING_PARAMS_DEFAULT \
391  { \
392  NVBUF_CHROMA_SUBSAMPLING_HORIZ_DEFAULT, \
393  NVBUF_CHROMA_SUBSAMPLING_VERT_DEFAULT \
394  }
395 
399 typedef struct _NvBufferCreateParams
400 {
402  int32_t width;
404  int32_t height;
408  int32_t memsize;
416 
420 typedef struct _NvBufferParams
421 {
423  uint32_t dmabuf_fd;
425  void *nv_buffer;
429  int32_t memsize;
431  uint32_t nv_buffer_size;
435  uint32_t num_planes;
449 
453 typedef struct _NvBufferParamsEx
454 {
482  void *reserved;
484 
489 {
491  uint32_t composite_flag;
493  uint32_t input_buf_count;
504  NvBufferSession session;
506 
511 {
513  uint32_t transform_flag;
524  NvBufferSession session;
526 
527 
536 int NvBufferSyncObjWait (NvBufferSyncObjParams *syncobj_params, unsigned int timeout);
537 
543 int NvBufferGetSize (void);
544 
556 EGLImageKHR NvEGLImageFromFd (EGLDisplay display, int dmabuf_fd);
557 
568 int NvDestroyEGLImage (EGLDisplay display, EGLImageKHR eglImage);
569 
582 int NvBufferCreate (int *dmabuf_fd, int width, int height,
583  NvBufferLayout layout, NvBufferColorFormat colorFormat);
584 
593 int NvBufferCreateEx (int *dmabuf_fd, NvBufferCreateParams *input_params);
594 
603 int NvBufferCreateInterlace (int *dmabuf_fd, NvBufferCreateParams *input_params);
604 
605 
615 int NvBufferCreateWithChromaLoc (int *dmabuf_fd, NvBufferCreateParams *input_params, NvBufferChromaSubsamplingParams *chromaSubsampling);
616 
624 int NvBufferGetParams (int dmabuf_fd, NvBufferParams *params);
625 
633 int NvBufferGetParamsEx (int dmabuf_fd, NvBufferParamsEx *exparams);
634 
641 int NvBufferDestroy (int dmabuf_fd);
642 
650 int ExtractFdFromNvBuffer (void *nvbuf, int *dmabuf_fd);
651 
659 int NvReleaseFd (int dmabuf_fd);
660 
672 int NvBufferMemSyncForCpu (int dmabuf_fd, unsigned int plane, void **pVirtAddr);
673 
686 int NvBufferMemSyncForCpuEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr);
687 
699 int NvBufferMemSyncForDevice (int dmabuf_fd, unsigned int plane, void **pVirtAddr);
700 
713 int NvBufferMemSyncForDeviceEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr);
714 
736 int NvBufferMemMap (int dmabuf_fd, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr);
737 
760 int NvBufferMemMapEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr);
761 
777 int NvBufferMemUnMap (int dmabuf_fd, unsigned int plane, void **pVirtAddr);
778 
795 int NvBufferMemUnMapEx (int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr);
796 
807 int NvBuffer2Raw (int dmabuf_fd, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr);
808 
819 int Raw2NvBuffer (unsigned char *ptr, unsigned int plane, unsigned int in_width, unsigned int in_height, int dmabuf_fd);
820 
827 NvBufferSession NvBufferSessionCreate(void);
828 
833 void NvBufferSessionDestroy(NvBufferSession session);
834 
844 int NvBufferTransform (int src_dmabuf_fd, int dst_dmabuf_fd, NvBufferTransformParams *transform_params);
845 
857 int NvBufferTransformEx (int src_dmabuf_fd, NvBufferParamsEx *input_params, int dst_dmabuf_fd, NvBufferParamsEx *output_params, NvBufferTransformParams *transform_params);
858 
869 int NvBufferTransformAsync (int src_dmabuf_fd, int dst_dmabuf_fd, NvBufferTransformParams *transform_params, NvBufferSyncObj *syncobj);
870 
871 
884 int NvBufferComposite (int *src_dmabuf_fds, int dst_dmabuf_fd, NvBufferCompositeParams *composite_params);
885 
886 #ifdef __cplusplus
887 }
888 #endif
889 
892 #endif
uint32_t layout[MAX_NUM_PLANES]
layout type of each planes of hardware buffer.
Definition: nvbuf_utils.h:447
uint32_t num_planes
number of planes of hardware buffer.
Definition: nvbuf_utils.h:435
NvBufferParams params
nvbuffer basic parameters.
Definition: nvbuf_utils.h:456
NvBufferSession session
NvBufferSession to be used for transform.
Definition: nvbuf_utils.h:524
int ExtractFdFromNvBuffer(void *nvbuf, int *dmabuf_fd)
Extracts the dmabuf_fd from the hardware buffer.
NvBufferColorFormat pixel_format
video format type of hardware buffer.
Definition: nvbuf_utils.h:433
BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbuf_utils.h:157
8-bit grayscale.
Definition: nvbuf_utils.h:217
uint32_t left
rectangle left.
Definition: nvbuf_utils.h:365
NvBufferRect src_comp_rect[MAX_COMPOSITE_FRAME]
source rectangle coordinates of input buffers for composition.
Definition: nvbuf_utils.h:497
void * reserved
reserved field.
Definition: nvbuf_utils.h:482
bool is_protected
get buffer vpr information.
Definition: nvbuf_utils.h:478
uint32_t transform_flag
flag to indicate which of the transform parameters are valid.
Definition: nvbuf_utils.h:513
NvBufferSyncObj syncobj
buffer sync point object parameters
Definition: nvbuf_utils.h:480
BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbuf_utils.h:169
BT.601 colorspace - YUV444 multi-planar.
Definition: nvbuf_utils.h:215
struct _NvBufferParamsEx NvBufferParamsEx
Holds extended parameters for a hardware buffer.
tag for H264/H265/VP9 Video Decoder.
Definition: nvbuf_utils.h:132
transform flag to set flip method.
Definition: nvbuf_utils.h:309
float g
background color value for g.
Definition: nvbuf_utils.h:352
uint32_t psize[MAX_NUM_PLANES]
size of each vodeo planes of hardware buffer.
Definition: nvbuf_utils.h:445
transform flag to set filter type.
Definition: nvbuf_utils.h:307
struct _NvBufferChromaSubSamplingParams NvBufferChromaSubsamplingParams
Holds Chroma Subsampling parameters.
int NvReleaseFd(int dmabuf_fd)
Releases the dmabuf_fd buffer.
Memory read.
Definition: nvbuf_utils.h:107
flag to set for composition.
Definition: nvbuf_utils.h:317
Memory write.
Definition: nvbuf_utils.h:109
struct _NvBufferSyncObjParams NvBufferSyncObjParams
Holds parameters for buffer sync point object.
transform flag to crop source rectangle.
Definition: nvbuf_utils.h:303
Video flip rotate 270 degree counter-clockwise.
Definition: nvbuf_utils.h:268
Video flip with respect to Y-axis.
Definition: nvbuf_utils.h:272
LegacyRGBA colorspace - BGRA-8-8-8-8 planar.
Definition: nvbuf_utils.h:177
int32_t sizeofvaliddatainbytes
size of the valid data from the first to the last valid byte.
Definition: nvbuf_utils.h:462
Non-linear RGB BT.2020 colorspace - BGRA-10-10-10-2 planar.
Definition: nvbuf_utils.h:251
uint32_t input_buf_count
number of the input buffers to be composited.
Definition: nvbuf_utils.h:493
tag for Video Transform/Composite.
Definition: nvbuf_utils.h:134
NvBufferTransform_Filter transform_filter
transform filter.
Definition: nvbuf_utils.h:517
int32_t memsize
size of the memory.
Definition: nvbuf_utils.h:408
Video flip inverse transpode.
Definition: nvbuf_utils.h:276
BT.601 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbuf_utils.h:223
Non-linear RGB BT.709 colorspace - RGBA-10-10-10-2 planar.
Definition: nvbuf_utils.h:245
NvBufferRect dst_comp_rect[MAX_COMPOSITE_FRAME]
destination rectangle coordinates of input buffers for composition.
Definition: nvbuf_utils.h:499
BT.709 colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
Definition: nvbuf_utils.h:237
int32_t width
width of the buffer.
Definition: nvbuf_utils.h:402
Video flip rotate 180 degree.
Definition: nvbuf_utils.h:266
Holds composition background r,g,b colors.
Definition: nvbuf_utils.h:347
int NvBufferMemUnMap(int dmabuf_fd, unsigned int plane, void **pVirtAddr)
Unmaps the mapped virtual address of the plane.
BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbuf_utils.h:171
uint32_t physicaladdress[MAX_NUM_PLANES]
physical address of allocated planes.
Definition: nvbuf_utils.h:470
BT.601 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbuf_utils.h:153
Pitch Layout.
Definition: nvbuf_utils.h:96
struct _NvBufferCreateParams NvBufferCreateParams
Holds the input parameters for hardware buffer creation.
BT.601 colorspace - Y/CrCb 4:2:0 10-bit multi-planar.
Definition: nvbuf_utils.h:191
BT.709 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: nvbuf_utils.h:185
transform filter bilinear.
Definition: nvbuf_utils.h:287
LegacyRGBA colorspace - XRGB-8-8-8-8 planar.
Definition: nvbuf_utils.h:179
LegacyRGBA colorspace - ARGB-8-8-8-8 planar.
Definition: nvbuf_utils.h:181
int NvBufferGetParamsEx(int dmabuf_fd, NvBufferParamsEx *exparams)
Gets buffer extended parameters.
buffer payload with hardware memory handle for specific memory size.
Definition: nvbuf_utils.h:76
transform filter 10 tap.
Definition: nvbuf_utils.h:291
uint32_t secondfieldoffset[MAX_NUM_PLANES]
offset of the second field for interlaced buffer.
Definition: nvbuf_utils.h:466
Holds parameters for a hardware buffer.
Definition: nvbuf_utils.h:420
uint32_t nv_buffer_size
size of hardware buffer.
Definition: nvbuf_utils.h:431
Holds Chroma Subsampling parameters.
Definition: nvbuf_utils.h:383
BT.709_ER colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbuf_utils.h:235
int NvBuffer2Raw(int dmabuf_fd, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr)
Copies the NvBuffer plane contents to a raw buffer plane.
Memory read & write.
Definition: nvbuf_utils.h:111
transform filter nearest.
Definition: nvbuf_utils.h:285
uint32_t composite_flag
flag to indicate which of the composition/blending parameters are valid.
Definition: nvbuf_utils.h:491
uint32_t height
rectangle height.
Definition: nvbuf_utils.h:369
transform filter smart.
Definition: nvbuf_utils.h:293
int Raw2NvBuffer(unsigned char *ptr, unsigned int plane, unsigned int in_width, unsigned int in_height, int dmabuf_fd)
Copies raw buffer plane contents to an NvBuffer plane.
int NvBufferMemUnMapEx(int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr)
Unmaps the mapped virtual address of the plane, API to be used for another process.
NvBufferTransform_Flag
Defines flags to indicate for valid transform.
Definition: nvbuf_utils.h:301
transform filter 5 tap.
Definition: nvbuf_utils.h:289
int NvBufferMemSyncForCpu(int dmabuf_fd, unsigned int plane, void **pVirtAddr)
Syncs the hardware memory cache for the CPU.
NvBufferComposite_Flag
Defines flags that specify valid composition/blending operations.
Definition: nvbuf_utils.h:315
int NvBufferMemMap(int dmabuf_fd, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr)
Gets the memory-mapped virtual address of the plane.
BT.709 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbuf_utils.h:203
BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbuf_utils.h:173
NvBufferChromaSubsamplingParams chromaSubsampling
chroma subsampling parameters
Definition: nvbuf_utils.h:476
Interlaced scan formats.
Definition: nvbuf_utils.h:87
uint32_t width
rectangle width.
Definition: nvbuf_utils.h:367
int NvBufferMemSyncForCpuEx(int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr)
Syncs the hardware memory cache for the CPU, API to be used for another process.
BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbuf_utils.h:167
NvBufferTag
Defines tags that identify the components requesting a memory allocation.
Definition: nvbuf_utils.h:119
BT.2020 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
Definition: nvbuf_utils.h:195
NvBufferSession NvBufferSessionCreate(void)
Creates a new NvBufferSession for parallel scheduling of buffer transformations and compositions...
float b
background color value for b.
Definition: nvbuf_utils.h:354
#define MAX_NUM_PLANES
Defines the maximum number of planes for a video frame.
Definition: nvbuf_utils.h:41
BT.601 colorspace - YVU420 ER multi-planar.
Definition: nvbuf_utils.h:151
tag for Camera.
Definition: nvbuf_utils.h:124
NvBufferColorFormat colorFormat
colorformat of the buffer.
Definition: nvbuf_utils.h:412
BT.601 colorspace - YUV420 multi-planar.
Definition: nvbuf_utils.h:143
struct _NvBufferCompositeParams NvBufferCompositeParams
Holds parameters related to compositing/blending.
Non-linear RGB BT.709 colorspace - BGRA-10-10-10-2 planar.
Definition: nvbuf_utils.h:249
NvBufferCompositeBackground composite_bgcolor
background color values for composition.
Definition: nvbuf_utils.h:501
NvBufferSyncObjParams insyncobj[NVBUF_MAX_SYNCOBJ_PARAMS]
Definition: nvbuf_utils.h:338
BT.2020 colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
Definition: nvbuf_utils.h:241
BT.709_ER colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbuf_utils.h:233
int32_t startofvaliddata
offset in bytes from the start of the buffer to the first valid byte.
Definition: nvbuf_utils.h:459
float dst_comp_rect_alpha[MAX_COMPOSITE_FRAME]
alpha values of input buffers for the blending.
Definition: nvbuf_utils.h:495
NvBufferDisplayScanFormat scanformat[MAX_NUM_PLANES]
display scan format - progressive/interlaced.
Definition: nvbuf_utils.h:464
int NvBufferCreateInterlace(int *dmabuf_fd, NvBufferCreateParams *input_params)
Allocates a hardware buffer for interlace scan format.
int NvBufferMemSyncForDeviceEx(int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, void **pVirtAddr)
Syncs the hardware memory cache for the device, API to be used for another process.
NvBufferPayloadType payloadType
payload type of the buffer.
Definition: nvbuf_utils.h:406
Holds extended parameters for a hardware buffer.
Definition: nvbuf_utils.h:453
NvBufferTransform_Flip transform_flip
flip method.
Definition: nvbuf_utils.h:515
uint32_t height[MAX_NUM_PLANES]
height of each planes of hardware buffer.
Definition: nvbuf_utils.h:439
#define NVBUF_MAX_SYNCOBJ_PARAMS
Defines the maximum number of sync object parameters.
Definition: nvbuf_utils.h:58
tag for Jpeg Encoder/Decoder.
Definition: nvbuf_utils.h:126
struct _NvBufferParams NvBufferParams
Holds parameters for a hardware buffer.
int NvBufferMemSyncForDevice(int dmabuf_fd, unsigned int plane, void **pVirtAddr)
Syncs the hardware memory cache for the device.
uint32_t blockheightlog2[MAX_NUM_PLANES]
block height of the planes for blockLinear layout hardware buffer.
Definition: nvbuf_utils.h:468
uint32_t width[MAX_NUM_PLANES]
width of each planes of hardware buffer.
Definition: nvbuf_utils.h:437
Holds parameters for buffer sync point object.
Definition: nvbuf_utils.h:327
uint32_t pitch[MAX_NUM_PLANES]
pitch of each planes of hardware buffer.
Definition: nvbuf_utils.h:441
uint32_t use_outsyncobj
Definition: nvbuf_utils.h:341
NvBufferDisplayScanFormat
Defines display scan formats for NvBuffer video planes.
Definition: nvbuf_utils.h:82
BT.709 ER colorspace - Y/CbCr 10 bit 4:4:4 multi-planar.
Definition: nvbuf_utils.h:239
int NvBufferCreate(int *dmabuf_fd, int width, int height, NvBufferLayout layout, NvBufferColorFormat colorFormat)
Allocates a hardware buffer (deprecated).
EGLImageKHR NvEGLImageFromFd(EGLDisplay display, int dmabuf_fd)
Creates an instance of EGLImage from a DMABUF FD.
BT.601 colorspace - YUV420 ER multi-planar.
Definition: nvbuf_utils.h:149
uint32_t dmabuf_fd
Holds the DMABUF FD of the hardware buffer.
Definition: nvbuf_utils.h:423
BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbuf_utils.h:163
int NvBufferCreateWithChromaLoc(int *dmabuf_fd, NvBufferCreateParams *input_params, NvBufferChromaSubsamplingParams *chromaSubsampling)
Allocates a hardware buffer with a given chroma subsampling location.
BT.709 colorspace - YUV420 ER multi-planar.
Definition: nvbuf_utils.h:201
uint32_t offset[MAX_NUM_PLANES]
memory offset values of each video planes of hardware buffer.
Definition: nvbuf_utils.h:443
buffer payload with hardware memory handle for set of planes.
Definition: nvbuf_utils.h:74
BlockLinear Layout.
Definition: nvbuf_utils.h:98
BT.601 colorspace - YUV420 multi-planar.
Definition: nvbuf_utils.h:145
uint32_t top
rectangle top.
Definition: nvbuf_utils.h:363
int32_t memsize
size of the memory.
Definition: nvbuf_utils.h:429
int NvBufferTransform(int src_dmabuf_fd, int dst_dmabuf_fd, NvBufferTransformParams *transform_params)
Transforms one DMA buffer to another DMA buffer.
int NvBufferGetSize(void)
This method can be used to get hardware Buffer struct size.
Video flip with respect to X-axis.
Definition: nvbuf_utils.h:270
Invalid color format.
Definition: nvbuf_utils.h:253
BT.709 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: nvbuf_utils.h:205
uint64_t flags[MAX_NUM_PLANES]
flags associated with planes
Definition: nvbuf_utils.h:472
void * nv_buffer
pointer to hardware buffer memory.
Definition: nvbuf_utils.h:425
void NvBufferSessionDestroy(NvBufferSession session)
Destroys an existing NvBufferSession.
Holds the input parameters for hardware buffer creation.
Definition: nvbuf_utils.h:399
int NvBufferTransformEx(int src_dmabuf_fd, NvBufferParamsEx *input_params, int dst_dmabuf_fd, NvBufferParamsEx *output_params, NvBufferTransformParams *transform_params)
Transforms one DMA buffer to another DMA buffer, API to be used for another process.
Non-linear RGB BT.2020 colorspace - RGBA-10-10-10-2 planar.
Definition: nvbuf_utils.h:247
int NvBufferGetParams(int dmabuf_fd, NvBufferParams *params)
Gets buffer parameters.
NvBufferPayloadType
Defines Payload types for NvBuffer.
Definition: nvbuf_utils.h:71
uint8_t chromaLocHoriz
location settings
Definition: nvbuf_utils.h:386
Progessive scan formats.
Definition: nvbuf_utils.h:85
int NvBufferTransformAsync(int src_dmabuf_fd, int dst_dmabuf_fd, NvBufferTransformParams *transform_params, NvBufferSyncObj *syncobj)
Transforms one DMA buffer to another DMA buffer asyncroniously (non-blocking).
int NvBufferComposite(int *src_dmabuf_fds, int dst_dmabuf_fd, NvBufferCompositeParams *composite_params)
Composites multiple input DMA buffers to one output DMA buffer.
int32_t height
height of the buffer.
Definition: nvbuf_utils.h:404
BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: nvbuf_utils.h:159
NvBufferTransform_Filter
Defines transform video filter types.
Definition: nvbuf_utils.h:282
BT.601 colorspace - Y/CbCr ER 4:2:0 multi-planar.
Definition: nvbuf_utils.h:155
BT.601 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: nvbuf_utils.h:183
BT.601 colorspace - Y/CbCr 4:2:0 12-bit multi-planar.
Definition: nvbuf_utils.h:193
buffer sync point object.
Definition: nvbuf_utils.h:336
BT.601 colorspace - Y/CrCb 4:2:0 12-bit multi-planar.
Definition: nvbuf_utils.h:197
Holds parameters for buffer transform functions.
Definition: nvbuf_utils.h:510
BT.601_ER colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbuf_utils.h:227
BT.709 colorspace - YUV420 multi-planar.
Definition: nvbuf_utils.h:199
NvBufferLayout layout
layout of the buffer.
Definition: nvbuf_utils.h:410
NvBufferTag nvbuf_tag
tag to associate with the buffer.
Definition: nvbuf_utils.h:414
BT.601 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbuf_utils.h:219
float r
background color value for r.
Definition: nvbuf_utils.h:350
struct _NvBufferSyncObjRec NvBufferSyncObj
buffer sync point object.
BT.601_ER colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbuf_utils.h:225
tag None.
Definition: nvbuf_utils.h:122
Video flip none.
Definition: nvbuf_utils.h:262
BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbuf_utils.h:165
struct _NvBufferTransformParams NvBufferTransformParams
Holds parameters for buffer transform functions.
uint32_t num_insyncobj
Definition: nvbuf_utils.h:339
transform flag to crop destination rectangle.
Definition: nvbuf_utils.h:305
BT.2020 colorspace - Y/CbCr 12 bit 4:4:4 multi-planar.
Definition: nvbuf_utils.h:243
BT.2020 colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: nvbuf_utils.h:189
Optical flow SAD calculation Buffer format.
Definition: nvbuf_utils.h:213
Video flip transpose.
Definition: nvbuf_utils.h:274
NvBufferPayloadType payloadType
payload type of the buffer.
Definition: nvbuf_utils.h:427
BT.709 colorspace - Y/CbCr 4:2:2 multi-planar.
Definition: nvbuf_utils.h:229
NvBufferSyncObjParams outsyncobj
Definition: nvbuf_utils.h:340
BT.2020 colorspace - Y/CbCr 4:2:0 multi-planar.
Definition: nvbuf_utils.h:209
NvBufferTransform_Flip
Defines video flip methods.
Definition: nvbuf_utils.h:259
BT.601 colorspace - YUV 4:2:2 planar.
Definition: nvbuf_utils.h:161
BT.601 colorspace - Y/CbCr 4:2:2 10-bit semi-planar.
Definition: nvbuf_utils.h:221
NvBufferRect dst_rect
destination rectangle coordinates for crop opeartion.
Definition: nvbuf_utils.h:521
void * payloadmetaInfo
metadata associated with the hardware buffer.
Definition: nvbuf_utils.h:474
NvBufferLayout
Defines Layout formats for NvBuffer video planes.
Definition: nvbuf_utils.h:93
tag for H264/H265 Video Encoder.
Definition: nvbuf_utils.h:130
int NvBufferDestroy(int dmabuf_fd)
Destroys a hardware buffer.
int NvBufferMemMapEx(int dmabuf_fd, NvBufferParamsEx *exparams, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr)
Gets the memory-mapped virtual address of the plane, API to be used for another process.
int NvBufferCreateEx(int *dmabuf_fd, NvBufferCreateParams *input_params)
Allocates a hardware buffer.
Holds coordinates for a rectangle.
Definition: nvbuf_utils.h:360
NvBufferColorFormat
Defines color formats for NvBuffer.
Definition: nvbuf_utils.h:140
Holds parameters related to compositing/blending.
Definition: nvbuf_utils.h:488
Video flip rotate 90 degree counter-clockwise.
Definition: nvbuf_utils.h:264
BT.709_ER colorspace - Y/CbCr 4:2:0 10-bit multi-planar.
Definition: nvbuf_utils.h:187
struct _NvBufferSession * NvBufferSession
Holds an opaque NvBuffer session type required for parallel buffer tranformations and compositions...
Definition: nvbuf_utils.h:378
transform filter nicest.
Definition: nvbuf_utils.h:295
BT.2020 colorspace - YUV420 multi-planar.
Definition: nvbuf_utils.h:207
tag for VPR Buffers.
Definition: nvbuf_utils.h:128
int NvBufferSyncObjWait(NvBufferSyncObjParams *syncobj_params, unsigned int timeout)
This method can be used to wait on sync point ID.
BT.709 colorspace - Y/CbCr 4:4:4 multi-planar.
Definition: nvbuf_utils.h:231
BT.601 colorspace - YUV422 multi-planar.
Definition: nvbuf_utils.h:147
NvBufferRect src_rect
source rectangle coordinates for crop opeartion.
Definition: nvbuf_utils.h:519
BT.601 colorspace - YUV ER 4:2:2 planar.
Definition: nvbuf_utils.h:175
int NvDestroyEGLImage(EGLDisplay display, EGLImageKHR eglImage)
Destroys an EGLImage object.
NvBufferSession session
NvBufferSession to be used for composition.
Definition: nvbuf_utils.h:504
flag to set for blending.
Definition: nvbuf_utils.h:319
NvBufferMemFlags
Defines memory access flags for NvBuffer.
Definition: nvbuf_utils.h:104
#define MAX_COMPOSITE_FRAME
Defines the maximum number of input video frames that can be used for composition.
Definition: nvbuf_utils.h:46