NVIDIA DeepStream SDK API Reference

6.3 Release
nvdspreprocess_lib.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20  * DEALINGS IN THE SOFTWARE.
21  */
22 
38 #ifndef __NVDSPREPROCESS_LIB__
39 #define __NVDSPREPROCESS_LIB__
40 
41 #include "nvbufsurface.h"
42 #include "nvbufsurftransform.h"
43 #include "nvdspreprocess_interface.h"
44 
46 #define _PATH_MAX 4096
47 
49 #define NVDSPREPROCESS_USER_CONFIGS_PIXEL_NORMALIZATION_FACTOR "pixel-normalization-factor"
50 
52 #define NVDSPREPROCESS_USER_CONFIGS_MEAN_FILE "mean-file"
53 
55 #define NVDSPREPROCESS_USER_CONFIGS_OFFSETS "offsets"
56 
60 extern "C"
62  NvBufSurface *out_surf,
63  CustomTransformParams &params);
64 
68 extern "C"
70  NvBufSurface *out_surf,
71  CustomTransformParams &params);
72 
76 extern "C"
78  CustomTensorParams &tensorParam, NvDsPreProcessAcquirer *acquirer);
79 
83 extern "C"
85 
89 extern "C"
90 void deInitLib(CustomCtx *ctx);
91 
92 #endif
CustomInitParams
Custom Initialization parameter for custom library.
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:194
initLib
CustomCtx * initLib(CustomInitParams initparams)
custom library initialization function
NvBufSurface
Holds information about batched buffers.
Definition: nvbufsurface.h:501
NvDsPreProcessBatch
Holds information about the batch of frames to be inferred.
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:257
NvDsPreProcessStatus
NvDsPreProcessStatus
Enum for the status codes returned by NvDsPreProcessImpl.
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:59
CustomTransformParams
custom transformation parameter for calling nvbufsurftransform api for scaling and converting the ROI...
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:126
CustomAsyncTransformation
NvDsPreProcessStatus CustomAsyncTransformation(NvBufSurface *in_surf, NvBufSurface *out_surf, CustomTransformParams &params)
Custom Asynchronus group transformation function.
CustomTensorPreparation
NvDsPreProcessStatus CustomTensorPreparation(CustomCtx *ctx, NvDsPreProcessBatch *batch, NvDsPreProcessCustomBuf *&buf, CustomTensorParams &tensorParam, NvDsPreProcessAcquirer *acquirer)
Custom tensor preparation function for NCHW/NHWC network order.
deInitLib
void deInitLib(CustomCtx *ctx)
custom library deinitialization function
CustomTensorParams
Tensor params passed to custom library for tensor preparation.
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:183
NvDsPreProcessCustomBuf
Custom Buffer passed to the custom lib for preparing tensor.
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:209
NvDsPreProcessAcquirer
class for acquiring and releasing a buffer from tensor pool by custom lib.
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:219
CustomCtx
struct CustomCtx CustomCtx
Context for custom library.
Definition: gst-plugins/gst-nvdspreprocess/include/nvdspreprocess_interface.h:54
nvbufsurftransform.h
nvbufsurface.h
CustomTransformation
NvDsPreProcessStatus CustomTransformation(NvBufSurface *in_surf, NvBufSurface *out_surf, CustomTransformParams &params)
Custom transformation function for group.