NVIDIA DeepStream SDK API Reference
4.0.1 Release
Welcome
API Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
nvbufsurftransform.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019, 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
33
#ifndef NVBUFSURFTRANSFORM_H_
34
#define NVBUFSURFTRANSFORM_H_
35
#include <stdio.h>
36
#include <cuda.h>
37
#include <cuda_runtime.h>
38
#include <npp.h>
39
#include "
nvbufsurface.h
"
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
54
typedef
enum
55
{
58
NvBufSurfTransformCompute_Default
,
60
NvBufSurfTransformCompute_GPU
,
62
NvBufSurfTransformCompute_VIC
63
}
NvBufSurfTransform_Compute
;
64
65
69
typedef
enum
70
{
72
NvBufSurfTransform_None
,
74
NvBufSurfTransform_Rotate90
,
76
NvBufSurfTransform_Rotate180
,
78
NvBufSurfTransform_Rotate270
,
80
NvBufSurfTransform_FlipX
,
82
NvBufSurfTransform_FlipY
,
84
NvBufSurfTransform_Transpose
,
86
NvBufSurfTransform_InvTranspose
,
87
}
NvBufSurfTransform_Flip
;
88
89
93
typedef
enum
94
{
96
NvBufSurfTransformInter_Nearest
= 0,
98
NvBufSurfTransformInter_Bilinear
,
100
NvBufSurfTransformInter_Algo1
,
102
NvBufSurfTransformInter_Algo2
,
104
NvBufSurfTransformInter_Algo3
,
106
NvBufSurfTransformInter_Algo4
,
108
NvBufSurfTransformInter_Default
109
}
NvBufSurfTransform_Inter
;
110
114
typedef
enum
115
{
117
NvBufSurfTransformError_ROI_Error
= -4,
119
NvBufSurfTransformError_Invalid_Params
= -3,
121
NvBufSurfTransformError_Execution_Error
= -2,
123
NvBufSurfTransformError_Unsupported
= -1,
125
NvBufSurfTransformError_Success
= 0
126
}
NvBufSurfTransform_Error
;
127
131
typedef
enum
{
133
NVBUFSURF_TRANSFORM_CROP_SRC
= 1,
135
NVBUFSURF_TRANSFORM_CROP_DST
= 1 << 1,
137
NVBUFSURF_TRANSFORM_FILTER
= 1 << 2,
139
NVBUFSURF_TRANSFORM_FLIP
= 1 << 3,
140
}
NvBufSurfTransform_Transform_Flag
;
141
145
typedef
enum
{
147
NVBUFSURF_TRANSFORM_COMPOSITE
= 1,
148
}
NvBufSurfTransform_Composite_Flag
;
149
153
typedef
struct
154
{
156
uint32_t
top
;
158
uint32_t
left
;
160
uint32_t
width
;
162
uint32_t
height
;
163
}
NvBufSurfTransformRect
;
164
168
typedef
struct
_NvBufSurfTransformConfigParams
169
{
172
NvBufSurfTransform_Compute
compute_mode
;
173
175
int32_t
gpu_id
;
176
179
cudaStream_t
cuda_stream
;
180
181
}
NvBufSurfTransformConfigParams
;
182
186
typedef
struct
_NvBufSurfaceTransformParams
187
{
189
uint32_t
transform_flag
;
191
NvBufSurfTransform_Flip
transform_flip
;
193
NvBufSurfTransform_Inter
transform_filter
;
196
NvBufSurfTransformRect
*
src_rect
;
199
NvBufSurfTransformRect
*
dst_rect
;
200
}
NvBufSurfTransformParams
;
201
205
typedef
struct
_NvBufSurfTransformCompositeParams
206
{
208
uint32_t
composite_flag
;
210
uint32_t
input_buf_count
;
212
NvBufSurfTransformRect
*
src_comp_rect
;
215
NvBufSurfTransformRect
*
dst_comp_rect
;
216
}
NvBufSurfTransformCompositeParams
;
217
230
NvBufSurfTransform_Error
NvBufSurfTransformSetSessionParams
231
(
NvBufSurfTransformConfigParams
*config_params);
232
242
NvBufSurfTransform_Error
NvBufSurfTransformGetSessionParams
243
(
NvBufSurfTransformConfigParams
*config_params);
244
268
NvBufSurfTransform_Error
NvBufSurfTransform
(
NvBufSurface
*src,
NvBufSurface
*dst,
269
NvBufSurfTransformParams
*transform_params);
270
290
NvBufSurfTransform_Error
NvBufSurfTransformComposite
(
NvBufSurface
*src,
291
NvBufSurface
*dst,
NvBufSurfTransformCompositeParams
*composite_params);
292
293
#ifdef __cplusplus
294
}
295
#endif
296
#endif
297
NvBufSurfTransformConfigParams
struct _NvBufSurfTransformConfigParams NvBufSurfTransformConfigParams
Holds configuration parameters for a transform/composite session.
NvBufSurfTransformRect::left
uint32_t left
Holds the rectangle left side.
Definition:
nvbufsurftransform.h:158
_NvBufSurfTransformCompositeParams::dst_comp_rect
NvBufSurfTransformRect * dst_comp_rect
Holds destination rectangle coordinates of input buffers for compositing.
Definition:
nvbufsurftransform.h:215
NvBufSurfTransformInter_Algo1
Specifies GPU-Cubic, VIC-5 Tap interpolation.
Definition:
nvbufsurftransform.h:100
NvBufSurfTransformError_Execution_Error
Specifies a runtime execution error.
Definition:
nvbufsurftransform.h:121
NvBufSurfTransformCompute_Default
Specifies VIC as a compute device for Jetson or dGPU for an x86_64 system.
Definition:
nvbufsurftransform.h:58
nvbufsurface.h
NvBufSurface Interface
NvBufSurfTransformError_Success
Specifies a successful operation.
Definition:
nvbufsurftransform.h:125
_NvBufSurfaceTransformParams::transform_flag
uint32_t transform_flag
Holds a flag that indicates which transform parameters are valid.
Definition:
nvbufsurftransform.h:189
NvBufSurfTransformError_ROI_Error
Specifies an error in source or destination ROI.
Definition:
nvbufsurftransform.h:117
NvBufSurfTransform_Rotate270
Specifies rotating 270 degree clockwise.
Definition:
nvbufsurftransform.h:78
_NvBufSurfTransformCompositeParams::composite_flag
uint32_t composite_flag
Holds a flag that indicates which composition parameters are valid.
Definition:
nvbufsurftransform.h:208
_NvBufSurfTransformConfigParams::compute_mode
NvBufSurfTransform_Compute compute_mode
Holds the mode of operation: VIC (Jetson) or GPU (iGPU + dGPU) If VIC is configured, gpu_id is ignored.
Definition:
nvbufsurftransform.h:172
NvBufSurfTransformInter_Default
Specifies GPU-Nearest, VIC-Nearest interpolation.
Definition:
nvbufsurftransform.h:108
NvBufSurfTransform_Error
NvBufSurfTransform_Error
Specifies error codes returned by NvBufSurfTransform functions.
Definition:
nvbufsurftransform.h:114
NvBufSurfTransform
NvBufSurfTransform_Error NvBufSurfTransform(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformParams *transform_params)
Performs a transformation on batched input images.
NvBufSurfTransformInter_Algo4
Specifies GPU-Ignored, VIC-Nicest interpolation.
Definition:
nvbufsurftransform.h:106
NvBufSurfTransform_InvTranspose
Specifies video flip inverse transpose.
Definition:
nvbufsurftransform.h:86
NvBufSurfTransform_Rotate90
Specifies rotating 90 degrees clockwise.
Definition:
nvbufsurftransform.h:74
NvBufSurfTransformInter_Algo2
Specifies GPU-Super, VIC-10 Tap interpolation.
Definition:
nvbufsurftransform.h:102
_NvBufSurfTransformCompositeParams::input_buf_count
uint32_t input_buf_count
Holds the number of input buffers to be composited.
Definition:
nvbufsurftransform.h:210
_NvBufSurfaceTransformParams::transform_flip
NvBufSurfTransform_Flip transform_flip
Holds the flip method.
Definition:
nvbufsurftransform.h:191
NvBufSurfTransform_Transpose
Specifies video flip transpose.
Definition:
nvbufsurftransform.h:84
NvBufSurfTransform_Inter
NvBufSurfTransform_Inter
Specifies video interpolation methods.
Definition:
nvbufsurftransform.h:93
_NvBufSurfTransformCompositeParams::src_comp_rect
NvBufSurfTransformRect * src_comp_rect
Holds source rectangle coordinates of input buffers for compositing.
Definition:
nvbufsurftransform.h:212
NvBufSurfTransformError_Invalid_Params
Specifies invalid input parameters.
Definition:
nvbufsurftransform.h:119
NVBUFSURF_TRANSFORM_FILTER
Specifies a transform to set the filter type.
Definition:
nvbufsurftransform.h:137
NvBufSurfTransformInter_Bilinear
Specifies Bilinear Interpolation Method interpolation.
Definition:
nvbufsurftransform.h:98
NvBufSurfTransformError_Unsupported
Specifies an unsupported feature or format.
Definition:
nvbufsurftransform.h:123
_NvBufSurfaceTransformParams::transform_filter
NvBufSurfTransform_Inter transform_filter
Holds a transform filter.
Definition:
nvbufsurftransform.h:193
NVBUFSURF_TRANSFORM_FLIP
Specifies a transform to set the flip method.
Definition:
nvbufsurftransform.h:139
NVBUFSURF_TRANSFORM_CROP_SRC
Specifies a transform to crop the source rectangle.
Definition:
nvbufsurftransform.h:133
_NvBufSurfaceTransformParams::src_rect
NvBufSurfTransformRect * src_rect
Holds a pointer to a list of source rectangle coordinates for a crop operation.
Definition:
nvbufsurftransform.h:196
NvBufSurfTransformRect::height
uint32_t height
Holds the rectangle height.
Definition:
nvbufsurftransform.h:162
NvBufSurfTransform_Compute
NvBufSurfTransform_Compute
Specifies compute devices used by NvBufSurfTransform.
Definition:
nvbufsurftransform.h:54
_NvBufSurfTransformConfigParams::cuda_stream
cudaStream_t cuda_stream
User configure stream to be used.
Definition:
nvbufsurftransform.h:179
NvBufSurfTransformInter_Algo3
Specifies GPU-Lanzos, VIC-Smart interpolation.
Definition:
nvbufsurftransform.h:104
NvBufSurfTransformRect::top
uint32_t top
Holds the rectangle top.
Definition:
nvbufsurftransform.h:156
NvBufSurfTransformSetSessionParams
NvBufSurfTransform_Error NvBufSurfTransformSetSessionParams(NvBufSurfTransformConfigParams *config_params)
Sets user-defined session parameters.
NvBufSurfTransformRect
Holds the coordinates of a rectangle.
Definition:
nvbufsurftransform.h:153
NvBufSurfTransformGetSessionParams
NvBufSurfTransform_Error NvBufSurfTransformGetSessionParams(NvBufSurfTransformConfigParams *config_params)
Gets the session parameters used by NvBufSurfTransform().
NvBufSurfTransform_Flip
NvBufSurfTransform_Flip
Specifies video flip methods.
Definition:
nvbufsurftransform.h:69
NvBufSurfTransform_Transform_Flag
NvBufSurfTransform_Transform_Flag
Specifies transform types.
Definition:
nvbufsurftransform.h:131
NvBufSurface
Holds information about batched buffers.
Definition:
nvbufsurface.h:283
NvBufSurfTransformCompositeParams
struct _NvBufSurfTransformCompositeParams NvBufSurfTransformCompositeParams
Holds composite parameters for a composite call.
_NvBufSurfTransformConfigParams
Holds configuration parameters for a transform/composite session.
Definition:
nvbufsurftransform.h:168
NvBufSurfTransformRect::width
uint32_t width
Holds the rectangle width.
Definition:
nvbufsurftransform.h:160
NvBufSurfTransformInter_Nearest
Specifies Nearest Interpolation Method interpolation.
Definition:
nvbufsurftransform.h:96
NVBUFSURF_TRANSFORM_CROP_DST
Specifies a transform to crop the destination rectangle.
Definition:
nvbufsurftransform.h:135
NvBufSurfTransformComposite
NvBufSurfTransform_Error NvBufSurfTransformComposite(NvBufSurface *src, NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params)
Composites batched input images.
NvBufSurfTransform_Rotate180
Specifies rotating 180 degree clockwise.
Definition:
nvbufsurftransform.h:76
_NvBufSurfTransformCompositeParams
Holds composite parameters for a composite call.
Definition:
nvbufsurftransform.h:205
NvBufSurfTransform_FlipY
Specifies video flip with respect to the Y-axis.
Definition:
nvbufsurftransform.h:82
NvBufSurfTransformParams
struct _NvBufSurfaceTransformParams NvBufSurfTransformParams
Holds transform parameters for a transform call.
NvBufSurfTransformCompute_GPU
Specifies that the GPU is the compute device.
Definition:
nvbufsurftransform.h:60
_NvBufSurfaceTransformParams
Holds transform parameters for a transform call.
Definition:
nvbufsurftransform.h:186
NvBufSurfTransform_None
Specifies no video flip.
Definition:
nvbufsurftransform.h:72
NVBUFSURF_TRANSFORM_COMPOSITE
Specifies a flag to describe the requested compositing operation.
Definition:
nvbufsurftransform.h:147
NvBufSurfTransformCompute_VIC
Specifies that the VIC as a compute device.
Definition:
nvbufsurftransform.h:62
_NvBufSurfaceTransformParams::dst_rect
NvBufSurfTransformRect * dst_rect
Holds a pointer to list of destination rectangle coordinates for a crop operation.
Definition:
nvbufsurftransform.h:199
NvBufSurfTransform_Composite_Flag
NvBufSurfTransform_Composite_Flag
Specifies types of composition operations.
Definition:
nvbufsurftransform.h:145
NvBufSurfTransform_FlipX
Specifies video flip with respect to the X-axis.
Definition:
nvbufsurftransform.h:80
_NvBufSurfTransformConfigParams::gpu_id
int32_t gpu_id
Holds the GPU ID to be used for processing.
Definition:
nvbufsurftransform.h:175
Advance Information | Subject to Change | Generated by NVIDIA | Wed Sep 4 2019 11:55:17 | PR-09318-R32