Back to Jetson Inference

Jetson Inference: jetson

docs/html/cudaYUV_8h_source.html

latest10.1 KB
Original Source

| | Jetson Inference

DNN Vision Library |

cudaYUV.h

Go to the documentation of this file.

1 /*

2 * Copyright (c) 2017, 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

23 #ifndef __CUDA_YUV_CONVERT_H

24 #define __CUDA_YUV_CONVERT_H

25

26

27 #include "cudaUtility.h"

28

29

35

37

41 cudaError_t cudaI420ToRGB(void* input, uchar3* output, size_t width, size_t height);

42

46 cudaError_t cudaI420ToRGB(void* input, float3* output, size_t width, size_t height);

47

51 cudaError_t cudaI420ToRGBA(void* input, uchar4* output, size_t width, size_t height);

52

56 cudaError_t cudaI420ToRGBA(void* input, float4* output, size_t width, size_t height);

57

59

60

66

68

72 cudaError_t cudaYV12ToRGB(void* input, uchar3* output, size_t width, size_t height);

73

77 cudaError_t cudaYV12ToRGB(void* input, float3* output, size_t width, size_t height);

78

82 cudaError_t cudaYV12ToRGBA(void* input, uchar4* output, size_t width, size_t height);

83

87 cudaError_t cudaYV12ToRGBA(void* input, float4* output, size_t width, size_t height);

88

90

91

97

99

103 cudaError_t cudaRGBToI420( uchar3* input, void* output, size_t width, size_t height );

104

108 cudaError_t cudaRGBToI420( float3* input, void* output, size_t width, size_t height );

109

113 cudaError_t cudaRGBAToI420( uchar4* input, void* output, size_t width, size_t height );

114

118 cudaError_t cudaRGBAToI420( float4* input, void* output, size_t width, size_t height );

119

121

122

128

130

134 cudaError_t cudaRGBToYV12( uchar3* input, void* output, size_t width, size_t height );

135

139 cudaError_t cudaRGBToYV12( float3* input, void* output, size_t width, size_t height );

140

144 cudaError_t cudaRGBAToYV12( uchar4* input, void* output, size_t width, size_t height );

145

149 cudaError_t cudaRGBAToYV12( float4* input, void* output, size_t width, size_t height );

150

152

153

159

161

165 cudaError_t cudaYUYVToRGB( void* input, uchar3* output, size_t width, size_t height );

166

170 cudaError_t cudaYUYVToRGB( void* input, float3* output, size_t width, size_t height );

171

175 cudaError_t cudaYUYVToRGBA( void* input, uchar4* output, size_t width, size_t height );

176

180 cudaError_t cudaYUYVToRGBA( void* input, float4* output, size_t width, size_t height );

181

183

184

190

192

196 cudaError_t cudaYVYUToRGB( void* input, uchar3* output, size_t width, size_t height );

197

201 cudaError_t cudaYVYUToRGB( void* input, float3* output, size_t width, size_t height );

202

206 cudaError_t cudaYVYUToRGBA( void* input, uchar4* output, size_t width, size_t height );

207

211 cudaError_t cudaYVYUToRGBA( void* input, float4* output, size_t width, size_t height );

212

214

215

221

223

227 cudaError_t cudaUYVYToRGB( void* input, uchar3* output, size_t width, size_t height );

228

232 cudaError_t cudaUYVYToRGB( void* input, float3* output, size_t width, size_t height );

233

237 cudaError_t cudaUYVYToRGBA( void* input, uchar4* output, size_t width, size_t height );

238

242 cudaError_t cudaUYVYToRGBA( void* input, float4* output, size_t width, size_t height );

243

245

246

252

254

259 cudaError_t cudaNV12ToRGB( void* input, uchar3* output, size_t width, size_t height );

260

265 cudaError_t cudaNV12ToRGB( void* input, float3* output, size_t width, size_t height );

266

271 cudaError_t cudaNV12ToRGBA( void* input, uchar4* output, size_t width, size_t height );

272

277 cudaError_t cudaNV12ToRGBA( void* input, float4* output, size_t width, size_t height );

278

280

281 #endif

282

cudaUtility.h

cudaUYVYToRGBA

cudaError_t cudaUYVYToRGBA(void *input, uchar4 *output, size_t width, size_t height)

Convert a UYVY 422 packed image into RGBA uchar4.

cudaRGBAToYV12

cudaError_t cudaRGBAToYV12(uchar4 *input, void *output, size_t width, size_t height)

Convert an RGBA uchar4 buffer into YUV YV12 planar.

cudaRGBToYV12

cudaError_t cudaRGBToYV12(uchar3 *input, void *output, size_t width, size_t height)

Convert an RGB uchar3 buffer into YUV YV12 planar.

cudaNV12ToRGB

cudaError_t cudaNV12ToRGB(void *input, uchar3 *output, size_t width, size_t height)

Convert an NV12 texture (semi-planar 4:2:0) to RGB uchar3 format.

cudaNV12ToRGBA

cudaError_t cudaNV12ToRGBA(void *input, uchar4 *output, size_t width, size_t height)

Convert an NV12 texture (semi-planar 4:2:0) to RGBA uchar4 format.

cudaYUYVToRGB

cudaError_t cudaYUYVToRGB(void *input, uchar3 *output, size_t width, size_t height)

Convert a YUYV 422 packed image into RGB uchar3.

cudaYVYUToRGB

cudaError_t cudaYVYUToRGB(void *input, uchar3 *output, size_t width, size_t height)

Convert a YVYU 422 packed image into RGB uchar3.

cudaUYVYToRGB

cudaError_t cudaUYVYToRGB(void *input, uchar3 *output, size_t width, size_t height)

Convert a UYVY 422 packed image into RGB uchar3.

cudaRGBToI420

cudaError_t cudaRGBToI420(uchar3 *input, void *output, size_t width, size_t height)

Convert an RGB uchar3 buffer into YUV I420 planar.

cudaYUYVToRGBA

cudaError_t cudaYUYVToRGBA(void *input, uchar4 *output, size_t width, size_t height)

Convert a YUYV 422 packed image into RGBA uchar4.

cudaYVYUToRGBA

cudaError_t cudaYVYUToRGBA(void *input, uchar4 *output, size_t width, size_t height)

Convert a YVYU 422 packed image into RGBA uchar4.

cudaYV12ToRGB

cudaError_t cudaYV12ToRGB(void *input, uchar3 *output, size_t width, size_t height)

Convert a YUV YV12 planar image to RGB uchar3.

cudaYV12ToRGBA

cudaError_t cudaYV12ToRGBA(void *input, uchar4 *output, size_t width, size_t height)

Convert a YUV YV12 planar image to RGBA uchar4.

cudaRGBAToI420

cudaError_t cudaRGBAToI420(uchar4 *input, void *output, size_t width, size_t height)

Convert an RGBA uchar4 buffer into YUV I420 planar.

cudaI420ToRGBA

cudaError_t cudaI420ToRGBA(void *input, uchar4 *output, size_t width, size_t height)

Convert a YUV I420 planar image to RGBA uchar4.

cudaI420ToRGB

cudaError_t cudaI420ToRGB(void *input, uchar3 *output, size_t width, size_t height)

Convert a YUV I420 planar image to RGB uchar3.