NVIDIA DeepStream SDK API Reference

9.1 Release
sources/libs/nvdsinfer/nvdsinfer_conversion.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
22 #ifndef __NVDSINFER_CONVERSION_H__
23 #define __NVDSINFER_CONVERSION_H__
24 
45 void
47  float *outBuffer,
48  unsigned char *inBuffer,
49  unsigned int width,
50  unsigned int height,
51  unsigned int pitch,
52  float scaleFactor,
53  float *meanDataBuffer,
54  cudaStream_t stream);
55 
76 void
78  float *outBuffer,
79  unsigned char *inBuffer,
80  unsigned int width,
81  unsigned int height,
82  unsigned int pitch,
83  float scaleFactor,
84  float *meanDataBuffer,
85  cudaStream_t stream);
86 
107 void
109  float *outBuffer,
110  unsigned char *inBuffer,
111  unsigned int width,
112  unsigned int height,
113  unsigned int pitch,
114  float scaleFactor,
115  float *meanDataBuffer,
116  cudaStream_t stream);
117 
138 void
140  float *outBuffer,
141  unsigned char *inBuffer,
142  unsigned int width,
143  unsigned int height,
144  unsigned int pitch,
145  float scaleFactor,
146  float *meanDataBuffer,
147  cudaStream_t stream);
148 
169 void
171  float *outBuffer,
172  unsigned char *inBuffer,
173  unsigned int width,
174  unsigned int height,
175  unsigned int pitch,
176  float scaleFactor,
177  float *meanDataBuffer,
178  cudaStream_t stream);
179 
200 void
202  float *outBuffer,
203  unsigned char *inBuffer,
204  unsigned int width,
205  unsigned int height,
206  unsigned int pitch,
207  float scaleFactor,
208  float *meanDataBuffer,
209  cudaStream_t stream);
210 
231 void
233  float *outBuffer,
234  unsigned char *inBuffer,
235  unsigned int width,
236  unsigned int height,
237  unsigned int pitch,
238  float scaleFactor,
239  float *meanDataBuffer,
240  cudaStream_t stream);
241 
262 void
264  float *outBuffer,
265  unsigned char *inBuffer,
266  unsigned int width,
267  unsigned int height,
268  unsigned int pitch,
269  float scaleFactor,
270  float *meanDataBuffer,
271  cudaStream_t stream);
272 
291 void
293  float *outBuffer,
294  unsigned char *inBuffer,
295  unsigned int width,
296  unsigned int height,
297  unsigned int pitch,
298  float scaleFactor,
299  float *meanDataBuffer,
300  cudaStream_t stream);
301 
302 void
304  float *outBuffer,
305  float *inBuffer,
306  unsigned int width,
307  unsigned int height,
308  unsigned int pitch,
309  float scaleFactor,
310  float *meanDataBuffer,
311  cudaStream_t stream);
312 
313 
318 typedef void (* NvDsInferConvertFcn)(
319  float *outBuffer,
320  unsigned char *inBuffer,
321  unsigned int width,
322  unsigned int height,
323  unsigned int pitch,
324  float scaleFactor,
325  float *meanDataBuffer,
326  cudaStream_t stream);
327 
328 typedef void (* NvDsInferConvertFcnFloat)(
329  float *outBuffer,
330  float *inBuffer,
331  unsigned int width,
332  unsigned int height,
333  unsigned int pitch,
334  float scaleFactor,
335  float *meanDataBuffer,
336  cudaStream_t stream);
337 
338 #endif /* __NVDSINFER_CONVERSION_H__ */
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: sources/includes/nvbufsurftransform.h:35
NvDsInferConvert_C4ToP3RFloat
void NvDsInferConvert_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...
NvDsInferConvert_C3ToL3RFloat
void NvDsInferConvert_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...
NvDsInferConvert_C4ToL3Float
void NvDsInferConvert_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...
NvDsInferConvert_C1ToP1Float
void NvDsInferConvert_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...
NvDsInferConvert_C3ToP3RFloat
void NvDsInferConvert_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...
NvDsInferConvert_C4ToL3RFloat
void NvDsInferConvert_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...
NvDsInferConvertFcn
void(* NvDsInferConvertFcn)(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 NvDsInferConvert functions can be assigned.
Definition: sources/libs/nvdsinfer/nvdsinfer_conversion.h:318
NvDsInferConvert_C4ToP3Float
void NvDsInferConvert_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...
NvDsInferConvert_FtFTensor
void NvDsInferConvert_FtFTensor(float *outBuffer, float *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
NvDsInferConvert_C3ToL3Float
void NvDsInferConvert_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...
NvDsInferConvertFcnFloat
void(* NvDsInferConvertFcnFloat)(float *outBuffer, float *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
Definition: sources/libs/nvdsinfer/nvdsinfer_conversion.h:328
NvDsInferConvert_C3ToP3Float
void NvDsInferConvert_C3ToP3Float(float *outBuffer, unsigned char *inBuffer, unsigned int width, unsigned int height, unsigned int pitch, float scaleFactor, float *meanDataBuffer, cudaStream_t stream)
This is a header file for pre-processing cuda kernels with normalization and mean subtraction require...