NVIDIA DeepStream SDK API Reference

6.3 Release
nvdspreprocess_conversion.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_CONVERSION_H__
39 #define __NVDSPREPROCESS_CONVERSION_H__
40 
61 void
63  float *outBuffer,
64  unsigned char *inBuffer,
65  unsigned int width,
66  unsigned int height,
67  unsigned int pitch,
68  float scaleFactor,
69  float *meanDataBuffer,
70  cudaStream_t stream);
71 
92 void
94  float *outBuffer,
95  unsigned char *inBuffer,
96  unsigned int width,
97  unsigned int height,
98  unsigned int pitch,
99  float scaleFactor,
100  float *meanDataBuffer,
101  cudaStream_t stream);
102 
123 void
125  float *outBuffer,
126  unsigned char *inBuffer,
127  unsigned int width,
128  unsigned int height,
129  unsigned int pitch,
130  float scaleFactor,
131  float *meanDataBuffer,
132  cudaStream_t stream);
133 
154 void
156  float *outBuffer,
157  unsigned char *inBuffer,
158  unsigned int width,
159  unsigned int height,
160  unsigned int pitch,
161  float scaleFactor,
162  float *meanDataBuffer,
163  cudaStream_t stream);
164 
185 void
187  float *outBuffer,
188  unsigned char *inBuffer,
189  unsigned int width,
190  unsigned int height,
191  unsigned int pitch,
192  float scaleFactor,
193  float *meanDataBuffer,
194  cudaStream_t stream);
195 
216 void
218  float *outBuffer,
219  unsigned char *inBuffer,
220  unsigned int width,
221  unsigned int height,
222  unsigned int pitch,
223  float scaleFactor,
224  float *meanDataBuffer,
225  cudaStream_t stream);
226 
247 void
249  float *outBuffer,
250  unsigned char *inBuffer,
251  unsigned int width,
252  unsigned int height,
253  unsigned int pitch,
254  float scaleFactor,
255  float *meanDataBuffer,
256  cudaStream_t stream);
257 
278 void
280  float *outBuffer,
281  unsigned char *inBuffer,
282  unsigned int width,
283  unsigned int height,
284  unsigned int pitch,
285  float scaleFactor,
286  float *meanDataBuffer,
287  cudaStream_t stream);
288 
307 void
309  float *outBuffer,
310  unsigned char *inBuffer,
311  unsigned int width,
312  unsigned int height,
313  unsigned int pitch,
314  float scaleFactor,
315  float *meanDataBuffer,
316  cudaStream_t stream);
317 
318 void
320  float *outBuffer,
321  float *inBuffer,
322  unsigned int width,
323  unsigned int height,
324  unsigned int pitch,
325  float scaleFactor,
326  float *meanDataBuffer,
327  cudaStream_t stream);
328 
329 
334 typedef void (* NvDsPreProcessConvertFcn)(
335  float *outBuffer,
336  unsigned char *inBuffer,
337  unsigned int width,
338  unsigned int height,
339  unsigned int pitch,
340  float scaleFactor,
341  float *meanDataBuffer,
342  cudaStream_t stream);
343 
344 #endif /* __NVDSPREPROCESS_CONVERSION_H__ */
NvDsPreProcessConvert_C3ToL3RFloat
void NvDsPreProcessConvert_C3ToL3RFloat(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 3 channel buffer of width x height resolution into an linear 3-channel float...
NvDsPreProcessConvertFcn
void(* NvDsPreProcessConvertFcn)(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Function pointer type to which any of the NvDsPreProcessConvert functions can be assigned.
Definition: nvdspreprocess_conversion.h:334
NvDsPreProcessConvert_C4ToL3RFloat
void NvDsPreProcessConvert_C4ToL3RFloat(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 4 channel buffer of width x height resolution into an linear 3-channel float...
NvDsPreProcessConvert_C4ToP3Float
void NvDsPreProcessConvert_C4ToP3Float(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 3 channel buffer of width x height resolution into an planar 3-channel float...
NvDsPreProcessConvert_C4ToP3RFloat
void NvDsPreProcessConvert_C4ToP3RFloat(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 4 channel buffer of width x height resolution into an planar 3-channel float...
NvDsPreProcessConvert_FtFTensor
void NvDsPreProcessConvert_FtFTensor(float *outBuffer, float *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
NvDsPreProcessConvert_C4ToL3Float
void NvDsPreProcessConvert_C4ToL3Float(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 3 channel buffer of width x height resolution into an linear 3-channel float...
NvDsPreProcessConvert_C3ToL3Float
void NvDsPreProcessConvert_C3ToL3Float(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 3 channel buffer of width x height resolution into an linear 3-channel float...
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: nvbufsurftransform.h:29
NvDsPreProcessConvert_C3ToP3Float
void NvDsPreProcessConvert_C3ToP3Float(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 3 channel buffer of width x height resolution into an planar 3-channel float...
NvDsPreProcessConvert_C3ToP3RFloat
void NvDsPreProcessConvert_C3ToP3RFloat(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an input packed 3 channel buffer of width x height resolution into an planar 3-channel float...
NvDsPreProcessConvert_C1ToP1Float
void NvDsPreProcessConvert_C1ToP1Float(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Converts an 1 channel UINT8 input of width x height resolution into an 1 channel float buffer of widt...