NVIDIA DeepStream SDK API Reference

6.0.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvbufsurftransform.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2021, 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  */
11 
21 #ifndef NVBUFSURFTRANSFORM_H_
22 #define NVBUFSURFTRANSFORM_H_
23 #include <cuda.h>
24 #include <cuda_runtime.h>
25 #include "nvbufsurface.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
40 typedef enum
41 {
50 
51 
55 typedef enum
56 {
74 
75 
79 typedef enum
80 {
96 
100 typedef enum
101 {
113 
117 typedef enum {
128 
130 
134 typedef enum {
140 
144 typedef struct
145 {
147  uint32_t top;
149  uint32_t left;
151  uint32_t width;
153  uint32_t height;
155 
160 {
164 
166  int32_t gpu_id;
167 
170  cudaStream_t cuda_stream;
171 
173 
178 {
180  uint32_t transform_flag;
192 
197 {
199  uint32_t composite_flag;
201  uint32_t input_buf_count;
210 
212  double red;
215  double green;
218  double blue;
221  double alpha;
224 
229 {
233  uint32_t input_buf_count;
245  uint32_t *perform_blending;
246 
248 
254 typedef struct NvBufSurfTransformSyncObj* NvBufSurfTransformSyncObj_t;
255 
269 (NvBufSurfTransformConfigParams *config_params);
270 
281 (NvBufSurfTransformConfigParams *config_params);
282 
307  NvBufSurfTransformParams *transform_params);
308 
329  NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params);
330 
364  NvBufSurface *dst, NvBufSurfTransformParams *transform_params,
365  NvBufSurfTransformSyncObj_t *sync_obj);
366 
396  NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params,
397  NvBufSurfTransformSyncObj_t *sync_obj);
398 
424  NvBufSurface *src1, NvBufSurface *alpha, NvBufSurface *dst,
426 
427 
441 NvBufSurfTransformSyncObj_t sync_obj, uint32_t time_out);
442 
443 
455  NvBufSurfTransformSyncObj_t* sync_obj);
456 
458 #ifdef __cplusplus
459 }
460 #endif
461 #endif
NvBufSurfTransform_Error NvBufSurfTransformSetSessionParams(NvBufSurfTransformConfigParams *config_params)
Sets user-defined session parameters.
uint32_t left
Holds the rectangle left side.
Specifies video flip inverse transpose.
NvBufSurfTransformRect * dst_comp_rect
Holds destination rectangle coordinates of input buffers for compositing.
NvBufSurfTransform_Composite_Flag
Specifies types of composition operations.
struct _NvBufSurfTransformCompositeBlendParams NvBufSurfTransformCompositeBlendParams
Holds composite blend parameters for a composite blender call.
NvBufSurface Interface
uint32_t * perform_blending
Holds a boolean flag list indicating whether blending to be done for particular buffer, if NULL, blending will be on all buffers, if valid value API expects at least numFilled size list and each element can take value 0 or 1.
Specifies invalid input parameters.
NvBufSurfTransform_Error NvBufSurfTransformSyncObjDestroy(NvBufSurfTransformSyncObj_t *sync_obj)
Destroy the synchroization object.
Specifies GPU-Super, VIC-10 Tap interpolation.
uint32_t transform_flag
Holds a flag that indicates which transform parameters are valid.
double red
Holds the red component of color.
NvBufSurfTransform_Error NvBufSurfTransformComposite(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params)
Composites batched input images.
uint32_t composite_flag
Holds a flag that indicates which composition parameters are valid.
struct _NvBufSurfTransformCompositeParams NvBufSurfTransformCompositeParams
Holds composite parameters for a composite call.
struct NvBufSurfTransformSyncObj * NvBufSurfTransformSyncObj_t
Holds the information about synchronization objects for asynchronous transform/composite APIs...
NvBufSurfTransform_Compute compute_mode
Holds the mode of operation: VIC (Jetson) or GPU (iGPU + dGPU) If VIC is configured, gpu_id is ignored.
Specifies an unsupported feature or format.
NvBufSurfTransform_Error NvBufSurfTransform(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformParams *transform_params)
Performs a transformation on batched input images.
double green
Holds the green component of color.
Specifies no video flip.
NvBufSurfTransform_Compute
Specifies compute devices used by NvBufSurfTransform.
Specifies GPU-Cubic, VIC-5 Tap interpolation.
Specifies a composite to set the filter type.
Specifies GPU-Nearest, VIC-Nearest interpolation.
double blue
Holds the blue component of color.
Specifies Nearest Interpolation Method interpolation.
NvBufSurfTransform_Error NvBufSurfTransformCompositeAsync(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params, NvBufSurfTransformSyncObj_t *sync_obj)
Composites batched input images Asynchronously (non-blocking).
Specifies GPU-Lanzos, VIC-Smart interpolation.
uint32_t input_buf_count
Holds the number of input buffers to be composited.
NvBufSurfTransform_Flip transform_flip
Holds the flip method.
Holds composite blend parameters for a composite blender call.
struct _NvBufSurfTransformConfigParams NvBufSurfTransformConfigParams
Holds configuration parameters for a transform/composite session.
NvBufSurfTransform_Inter composite_filter
Holds a composite filter.
Specifies that the GPU is the compute device.
NvBufSurfTransform_Inter composite_blend_filter
Holds a blend/composite filter applicable only.
NvBufSurfTransformRect * src_comp_rect
Holds source rectangle coordinates of input buffers for compositing.
Specifies a runtime execution error.
Specifies that the VIC as a compute device.
Specifies video flip transpose.
struct _NvBufSurfaceTransformParams NvBufSurfTransformParams
Holds transform parameters for a transform call.
NvBufSurfTransform_Inter transform_filter
Holds a transform filter.
NvBufSurfTransform_Error NvBufSurfTransformAsync(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformParams *transform_params, NvBufSurfTransformSyncObj_t *sync_obj)
An asynchronous (non-blocking) transformation on batched input images.
NvBufSurfTransformRect * src_rect
Holds a pointer to a list of source rectangle coordinates for a crop operation.
uint32_t height
Holds the rectangle height.
cudaStream_t cuda_stream
User configure stream to be used.
uint32_t top
Holds the rectangle top.
Holds the coordinates of a rectangle.
NvBufSurfTransform_Error
Specifies error codes returned by NvBufSurfTransform functions.
Holds information about batched buffers.
Definition: nvbufsurface.h:294
Specifies an error in source or destination ROI.
struct _NvBufSurfTransform_ColorParams NvBufSurfTransform_ColorParams
double alpha
Holds the alpha component of color.
Specifies rotating 90 degrees clockwise.
Holds configuration parameters for a transform/composite session.
Specifies a flag to describe the requested compositing operation.
uint32_t width
Holds the rectangle width.
Specifies video flip with respect to the Y-axis.
NvBufSurfTransform_ColorParams * color_bg
Holds background color list for blending if background buffer is absent, if NULL it wont be used...
Specifies GPU-Ignored, VIC-Nicest interpolation.
uint32_t composite_blend_flag
Holds a flag that indicates which composition parameters are valid.
Specifies VIC as a compute device for Jetson or dGPU for an x86_64 system.
NvBufSurfTransform_Error NvBufSurfTransformSyncObjWait(NvBufSurfTransformSyncObj_t sync_obj, uint32_t time_out)
Wait on the synchroization object.
Holds composite parameters for a composite call.
NvBufSurfTransform_Error NvBufSurfTransformCompositeBlend(NvBufSurface *src0, NvBufSurface *src1, NvBufSurface *alpha, NvBufSurface *dst, NvBufSurfTransformCompositeBlendParams *blend_params)
Composites/Blends batched input images.
uint32_t input_buf_count
Holds the number of input buffers to be composited.
Specifies a transform to normalize output.
Specifies a transform to crop the destination rectangle.
NvBufSurfTransform_Transform_Flag
Specifies transform types.
Specifies a transform to set the flip method.
Holds transform parameters for a transform call.
NvBufSurfTransform_Inter
Specifies video interpolation methods.
Specifies a transform to crop the source rectangle.
Specifies rotating 180 degree clockwise.
Specifies a successful operation.
Specifies rotating 270 degree clockwise.
NvBufSurfTransform_Error NvBufSurfTransformGetSessionParams(NvBufSurfTransformConfigParams *config_params)
Gets the session parameters used by NvBufSurfTransform().
Specifies a transform to set the filter type.
Specifies video flip with respect to the X-axis.
NvBufSurfTransformRect * dst_rect
Holds a pointer to list of destination rectangle coordinates for a crop operation.
Specifies Bilinear Interpolation Method interpolation.
NvBufSurfTransform_Flip
Specifies video flip methods.
int32_t gpu_id
Holds the GPU ID to be used for processing.