NVIDIA DeepStream SDK API Reference

7.0 Release
nvdspreprocess_conversion.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 
29 #ifndef __NVDSPREPROCESS_CONVERSION_H__
30 #define __NVDSPREPROCESS_CONVERSION_H__
31 
32 #include <cuda_fp16.h>
33 
54 void
56  float *outBuffer,
57  unsigned char *inBuffer,
58  unsigned int width,
59  unsigned int height,
60  unsigned int pitch,
61  float scaleFactor,
62  float *meanDataBuffer,
63  cudaStream_t stream);
64 
85 void
87  float *outBuffer,
88  unsigned char *inBuffer,
89  unsigned int width,
90  unsigned int height,
91  unsigned int pitch,
92  float scaleFactor,
93  float *meanDataBuffer,
94  cudaStream_t stream);
95 
116 void
118  float *outBuffer,
119  unsigned char *inBuffer,
120  unsigned int width,
121  unsigned int height,
122  unsigned int pitch,
123  float scaleFactor,
124  float *meanDataBuffer,
125  cudaStream_t stream);
126 
147 void
149  half *outBuffer,
150  unsigned char *inBuffer,
151  unsigned int width,
152  unsigned int height,
153  unsigned int pitch,
154  float scaleFactor,
155  float *meanDataBuffer,
156  cudaStream_t stream);
157 
178 void
180  float *outBuffer,
181  unsigned char *inBuffer,
182  unsigned int width,
183  unsigned int height,
184  unsigned int pitch,
185  float scaleFactor,
186  float *meanDataBuffer,
187  cudaStream_t stream);
188 
209 void
211  float *outBuffer,
212  unsigned char *inBuffer,
213  unsigned int width,
214  unsigned int height,
215  unsigned int pitch,
216  float scaleFactor,
217  float *meanDataBuffer,
218  cudaStream_t stream);
219 
240 void
242  float *outBuffer,
243  unsigned char *inBuffer,
244  unsigned int width,
245  unsigned int height,
246  unsigned int pitch,
247  float scaleFactor,
248  float *meanDataBuffer,
249  cudaStream_t stream);
250 
271 void
273  half *outBuffer,
274  unsigned char *inBuffer,
275  unsigned int width,
276  unsigned int height,
277  unsigned int pitch,
278  float scaleFactor,
279  float *meanDataBuffer,
280  cudaStream_t stream);
281 
302 void
304  float *outBuffer,
305  unsigned char *inBuffer,
306  unsigned int width,
307  unsigned int height,
308  unsigned int pitch,
309  float scaleFactor,
310  float *meanDataBuffer,
311  cudaStream_t stream);
312 
333 void
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 
362 void
364  float *outBuffer,
365  unsigned char *inBuffer,
366  unsigned int width,
367  unsigned int height,
368  unsigned int pitch,
369  float scaleFactor,
370  float *meanDataBuffer,
371  cudaStream_t stream);
372 
373 void
375  float *outBuffer,
376  float *inBuffer,
377  unsigned int width,
378  unsigned int height,
379  unsigned int pitch,
380  float scaleFactor,
381  float *meanDataBuffer,
382  cudaStream_t stream);
383 
389  half *outBuffer,
390  unsigned char *inBuffer,
391  unsigned int width,
392  unsigned int height,
393  unsigned int pitch,
394  float scaleFactor,
395  float *meanDataBuffer,
396  cudaStream_t stream);
397 
402 typedef void (* NvDsPreProcessConvertFcn)(
403  float *outBuffer,
404  unsigned char *inBuffer,
405  unsigned int width,
406  unsigned int height,
407  unsigned int pitch,
408  float scaleFactor,
409  float *meanDataBuffer,
410  cudaStream_t stream);
411 
412 #endif /* __NVDSPREPROCESS_CONVERSION_H__ */
NvDsPreProcessConvert_C4ToP3Half
void NvDsPreProcessConvert_C4ToP3Half(half *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 half ...
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:402
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:34
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...
NvDsPreProcessConvertFcnHalf
void(* NvDsPreProcessConvertFcnHalf)(half *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:388
cvcore::half
std::uint16_t half
Definition: Tensor.h:22
NvDsPreProcessConvert_C4ToP3RHalf
void NvDsPreProcessConvert_C4ToP3RHalf(half *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...