/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.2.2/include/rppi_image_augmentations.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.2.2/include/rppi_image_augmentations.h Source File#

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.2.2/include/rppi_image_augmentations.h Source File
rppi_image_augmentations.h
Go to the documentation of this file.
1 /*
2 MIT License
3 
4 Copyright (c) 2019 - 2024 Advanced Micro Devices, Inc.
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
24 
25 #ifndef RPPI_IMAGE_AUGMENTATIONS_H
26 #define RPPI_IMAGE_AUGMENTATIONS_H
27 
28 #include "rpp.h"
29 #include "rppdefs.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
46 /******************** brightness ********************/
47 
48 // Adjusts brightness for a batch of images
49 
50 // *param[in] srcPtr Input image batch
51 // *param[in] srcSize Array containing an RppiSize for each image in the batch
52 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
53 // *param[out] dstPtr Output image batch
54 // *param[in] alpha Array containing an Rpp32f alpha for each image in the batch (0 <= alpha <= 20 for brightness calculation)
55 // *param[in] beta Array containing an Rpp32f beta for each image in the batch (0 <= beta <= 255 for brightness calculation)
56 // *param[in] nbatchSize Batch size or the number of images in the batch
57 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
58 // *returns a RppStatus enumeration.
59 // *retval RPP_SUCCESS : No error, Succesful completion
60 // *retval RPP_ERROR : Error
61 
62 RppStatus rppi_brightness_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32f *beta, Rpp32u nbatchSize, rppHandle_t rppHandle);
63 RppStatus rppi_brightness_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32f *beta, Rpp32u nbatchSize, rppHandle_t rppHandle);
64 RppStatus rppi_brightness_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32f *beta, Rpp32u nbatchSize, rppHandle_t rppHandle);
65 #ifdef GPU_SUPPORT
66 RppStatus rppi_brightness_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32f *beta, Rpp32u nbatchSize, rppHandle_t rppHandle);
67 RppStatus rppi_brightness_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32f *beta, Rpp32u nbatchSize, rppHandle_t rppHandle);
68 RppStatus rppi_brightness_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32f *beta, Rpp32u nbatchSize, rppHandle_t rppHandle);
69 #endif // GPU_SUPPORT
70 
71 /******************** gamma_correction ********************/
72 
73 // Gamma correction for a batch of images
74 
75 // *param[in] srcPtr Input image batch
76 // *param[in] srcSize Array containing an RppiSize for each image in the batch
77 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
78 // *param[out] dstPtr Output image batch
79 // *param[in] gamma Array containing an Rpp32f gamma for each image in the batch (gamma >= 0 for gamma correction)
80 // *param[in] nbatchSize Batch size or the number of images in the batch
81 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
82 // *returns a RppStatus enumeration.
83 // *retval RPP_SUCCESS : No error, Succesful completion
84 // *retval RPP_ERROR : Error
85 
86 RppStatus rppi_gamma_correction_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *gamma, Rpp32u nbatchSize, rppHandle_t rppHandle);
87 RppStatus rppi_gamma_correction_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *gamma, Rpp32u nbatchSize, rppHandle_t rppHandle);
88 RppStatus rppi_gamma_correction_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *gamma, Rpp32u nbatchSize, rppHandle_t rppHandle);
89 #ifdef GPU_SUPPORT
90 RppStatus rppi_gamma_correction_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *gamma, Rpp32u nbatchSize, rppHandle_t rppHandle);
91 RppStatus rppi_gamma_correction_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *gamma, Rpp32u nbatchSize, rppHandle_t rppHandle);
92 RppStatus rppi_gamma_correction_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *gamma, Rpp32u nbatchSize, rppHandle_t rppHandle);
93 #endif // GPU_SUPPORT
94 
95 /******************** blend ********************/
96 
97 // Alpha blends corresponding pixels between two batches of images
98 
99 // *param[in] srcPtr1 Input image1 batch
100 // *param[in] srcPtr2 Input image2 batch
101 // *param[in] srcSize Array containing an RppiSize for each image in the batch
102 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
103 // *param[out] dstPtr Output image batch
104 // *param[in] alpha Array containing an Rpp32f alpha for each image in the batch (transparency factor 0 <= alpha <= 1 for alpha-blending)
105 // *param[in] nbatchSize Batch size or the number of images in the batch
106 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
107 // *returns a RppStatus enumeration.
108 // *retval RPP_SUCCESS : No error, Succesful completion
109 // *retval RPP_ERROR : Error
110 
111 RppStatus rppi_blend_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
112 RppStatus rppi_blend_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
113 RppStatus rppi_blend_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
114 #ifdef GPU_SUPPORT
115 RppStatus rppi_blend_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
116 RppStatus rppi_blend_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
117 RppStatus rppi_blend_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
118 #endif // GPU_SUPPORT
119 
120 /******************** blur ********************/
121 
122 // Blurs a batch of images
123 
124 // *param[in] srcPtr Input image batch
125 // *param[in] srcSize Array containing an RppiSize for each image in the batch
126 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
127 // *param[out] dstPtr Output image batch
128 // *param[in] kernelSize Array containing an Rpp32u kernel size for each image in the batch (kernelSize = 3/5/7 for optimal use)
129 // *param[in] nbatchSize Batch size or the number of images in the batch
130 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
131 // *returns a RppStatus enumeration.
132 // *retval RPP_SUCCESS : No error, Succesful completion
133 // *retval RPP_ERROR : Error
134 
135 RppStatus rppi_blur_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
136 RppStatus rppi_blur_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
137 RppStatus rppi_blur_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
138 #ifdef GPU_SUPPORT
139 RppStatus rppi_blur_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
140 RppStatus rppi_blur_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
141 RppStatus rppi_blur_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
142 #endif // GPU_SUPPORT
143 
144 /******************** contrast ********************/
145 
146 // Adjusts contrast for a batch of images
147 
148 // *param[in] srcPtr Input image batch
149 // *param[in] srcSize Array containing an RppiSize for each image in the batch
150 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
151 // *param[out] dstPtr Output image batch
152 // *param[in] newMin Array containing an Rpp32u new minimum pixel-value for each image in the batch (0 <= newMin <= 255 for contrast calculation)
153 // *param[in] newMax Array containing an Rpp32u new maximum pixel-value for each image in the batch (0 <= newMax <= 255 for contrast calculation)
154 // *param[in] nbatchSize Batch size or the number of images in the batch
155 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
156 // *returns a RppStatus enumeration.
157 // *retval RPP_SUCCESS : No error, Succesful completion
158 // *retval RPP_ERROR : Error
159 
160 RppStatus rppi_contrast_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *newMin, Rpp32u *newMax, Rpp32u nbatchSize, rppHandle_t rppHandle);
161 RppStatus rppi_contrast_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *newMin, Rpp32u *newMax, Rpp32u nbatchSize, rppHandle_t rppHandle);
162 RppStatus rppi_contrast_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *newMin, Rpp32u *newMax, Rpp32u nbatchSize, rppHandle_t rppHandle);
163 #ifdef GPU_SUPPORT
164 RppStatus rppi_contrast_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *newMin, Rpp32u *newMax, Rpp32u nbatchSize, rppHandle_t rppHandle);
165 RppStatus rppi_contrast_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *newMin, Rpp32u *newMax, Rpp32u nbatchSize, rppHandle_t rppHandle);
166 RppStatus rppi_contrast_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *newMin, Rpp32u *newMax, Rpp32u nbatchSize, rppHandle_t rppHandle);
167 #endif // GPU_SUPPORT
168 
169 /******************** pixelate ********************/
170 
171 // Pixelates a batch of images
172 
173 // *param[in] srcPtr Input image batch
174 // *param[in] srcSize Array containing an RppiSize for each image in the batch
175 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
176 // *param[out] dstPtr Output image batch
177 // *param[in] nbatchSize Batch size or the number of images in the batch
178 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
179 // *returns a RppStatus enumeration.
180 // *retval RPP_SUCCESS : No error, Succesful completion
181 // *retval RPP_ERROR : Error
182 
183 RppStatus rppi_pixelate_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
184 RppStatus rppi_pixelate_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
185 RppStatus rppi_pixelate_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
186 #ifdef GPU_SUPPORT
187 RppStatus rppi_pixelate_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
188 RppStatus rppi_pixelate_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
189 RppStatus rppi_pixelate_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
190 #endif // GPU_SUPPORT
191 
192 /******************** jitter ********************/
193 
194 // Jitters a batch of images
195 
196 // *param[in] srcPtr Input image batch
197 // *param[in] srcSize Array containing an RppiSize for each image in the batch
198 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
199 // *param[out] dstPtr Output image batch
200 // *param[in] kernelSize Array containing an Rpp32u kernel size for each image in the batch (kernelSize = 3/5/7 for optimal use)
201 // *param[in] nbatchSize Batch size or the number of images in the batch
202 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
203 // *returns a RppStatus enumeration.
204 // *retval RPP_SUCCESS : No error, Succesful completion
205 // *retval RPP_ERROR : Error
206 
207 RppStatus rppi_jitter_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
208 RppStatus rppi_jitter_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
209 RppStatus rppi_jitter_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
210 #ifdef GPU_SUPPORT
211 RppStatus rppi_jitter_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kenelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
212 RppStatus rppi_jitter_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kenelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
213 RppStatus rppi_jitter_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kenelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
214 #endif // GPU_SUPPORT
215 
216 /******************** snow ********************/
217 
218 // Adds a snowfall overlay for a batch of images
219 
220 // *param[in] srcPtr Input image batch
221 // *param[in] srcSize Array containing an RppiSize for each image in the batch
222 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
223 // *param[out] dstPtr Output image batch
224 // *param[in] snowValue Array containing an Rpp32f snow-value for each image in the batch (0 <= snowValue <= 1)
225 // *param[in] nbatchSize Batch size or the number of images in the batch
226 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
227 // *returns a RppStatus enumeration.
228 // *retval RPP_SUCCESS : No error, Succesful completion
229 // *retval RPP_ERROR : Error
230 
231 RppStatus rppi_snow_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *snowValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
232 RppStatus rppi_snow_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *snowValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
233 RppStatus rppi_snow_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *snowValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
234 #ifdef GPU_SUPPORT
235 RppStatus rppi_snow_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *snowValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
236 RppStatus rppi_snow_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *snowValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
237 RppStatus rppi_snow_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *snowValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
238 #endif // GPU_SUPPORT
239 
240 /******************** noise ********************/
241 
242 // Adds a noise overlay for a batch of images
243 
244 // *param[in] srcPtr Input image batch
245 // *param[in] srcSize Array containing an RppiSize for each image in the batch
246 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
247 // *param[out] dstPtr Output image batch
248 // *param[in] noiseProbability Array containing an Rpp32f noise-probability for each image in the batch (0 <= noiseProbability <= 1)
249 // *param[in] nbatchSize Batch size or the number of images in the batch
250 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
251 // *returns a RppStatus enumeration.
252 // *retval RPP_SUCCESS : No error, Succesful completion
253 // *retval RPP_ERROR : Error
254 
255 RppStatus rppi_noise_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *noiseProbability, Rpp32u nbatchSize, rppHandle_t rppHandle);
256 RppStatus rppi_noise_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *noiseProbability, Rpp32u nbatchSize, rppHandle_t rppHandle);
257 RppStatus rppi_noise_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *noiseProbability, Rpp32u nbatchSize, rppHandle_t rppHandle);
258 #ifdef GPU_SUPPORT
259 RppStatus rppi_noise_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *noiseProbability, Rpp32u nbatchSize, rppHandle_t rppHandle);
260 RppStatus rppi_noise_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *noiseProbability, Rpp32u nbatchSize, rppHandle_t rppHandle);
261 RppStatus rppi_noise_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *noiseProbability, Rpp32u nbatchSize, rppHandle_t rppHandle);
262 #endif // GPU_SUPPORT
263 
264 /******************** random_shadow ********************/
265 
266 // Adds random shadows for a batch of images
267 
268 // *param[in] srcPtr Input image batch
269 // *param[in] srcSize Array containing an RppiSize for each image in the batch
270 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
271 // *param[out] dstPtr Output image batch
272 // *param[in] x1 Array containing an Rpp32u x1 for each image in the batch (x1 specifies Left-Top X coordinate for the subregion in which shadows will be created)
273 // *param[in] y1 Array containing an Rpp32u y1 for each image in the batch (y1 specifies Left-Top Y coordinate for the subregion in which shadows will be created)
274 // *param[in] x2 Array containing an Rpp32u x2 for each image in the batch (x1 specifies Right-Bottom X coordinate for the subregion in which shadows will be created)
275 // *param[in] y2 Array containing an Rpp32u y2 for each image in the batch (x1 specifies Right-Bottom Y coordinate for the subregion in which shadows will be created)
276 // *param[in] numberOfShadows Array containing an Rpp32u number-of-shadows for each image in the batch (numberOfShadows[n] >= 0)
277 // *param[in] maxSizeX Array containing an Rpp32u max-shadow-width for each image in the batch (None of the created shadows will exceed the maxSizeX[n] width for each image in the batch)
278 // *param[in] maxSizeY Array containing an Rpp32u max-shadow-height for each image in the batch (None of the created shadows will exceed the maxSizeY[n] height for each image in the batch)
279 // *param[in] nbatchSize Batch size or the number of images in the batch
280 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
281 // *returns a RppStatus enumeration.
282 // *retval RPP_SUCCESS : No error, Succesful completion
283 // *retval RPP_ERROR : Error
284 
285 RppStatus rppi_random_shadow_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *x1, Rpp32u *y1, Rpp32u *x2, Rpp32u *y2, Rpp32u *numberOfShadows, Rpp32u *maxSizeX, Rpp32u *maxSizeY, Rpp32u nbatchSize, rppHandle_t rppHandle);
286 RppStatus rppi_random_shadow_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *x1, Rpp32u *y1, Rpp32u *x2, Rpp32u *y2, Rpp32u *numberOfShadows, Rpp32u *maxSizeX, Rpp32u *maxSizeY, Rpp32u nbatchSize, rppHandle_t rppHandle);
287 RppStatus rppi_random_shadow_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *x1, Rpp32u *y1, Rpp32u *x2, Rpp32u *y2, Rpp32u *numberOfShadows, Rpp32u *maxSizeX, Rpp32u *maxSizeY, Rpp32u nbatchSize, rppHandle_t rppHandle);
288 #ifdef GPU_SUPPORT
289 RppStatus rppi_random_shadow_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *x1, Rpp32u *y1, Rpp32u *x2, Rpp32u *y2, Rpp32u *numberOfShadows, Rpp32u *maxSizeX, Rpp32u *maxSizeY, Rpp32u nbatchSize, rppHandle_t rppHandle);
290 RppStatus rppi_random_shadow_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *x1, Rpp32u *y1, Rpp32u *x2, Rpp32u *y2, Rpp32u *numberOfShadows, Rpp32u *maxSizeX, Rpp32u *maxSizeY, Rpp32u nbatchSize, rppHandle_t rppHandle);
291 RppStatus rppi_random_shadow_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *x1, Rpp32u *y1, Rpp32u *x2, Rpp32u *y2, Rpp32u *numberOfShadows, Rpp32u *maxSizeX, Rpp32u *maxSizeY, Rpp32u nbatchSize, rppHandle_t rppHandle);
292 #endif // GPU_SUPPORT
293 
294 /******************** fog ********************/
295 
296 // Adds a fog overlay for a batch of images
297 
298 // *param[in] srcPtr Input image batch
299 // *param[in] srcSize Array containing an RppiSize for each image in the batch
300 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
301 // *param[out] dstPtr Output image batch
302 // *param[in] fogValue Array containing an Rpp32f fog-value for each image in the batch (0 <= fogValue[n] <= 1)
303 // *param[in] nbatchSize Batch size or the number of images in the batch
304 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
305 // *returns a RppStatus enumeration.
306 // *retval RPP_SUCCESS : No error, Succesful completion
307 // *retval RPP_ERROR : Error
308 
309 RppStatus rppi_fog_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *fogValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
310 RppStatus rppi_fog_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *fogValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
311 RppStatus rppi_fog_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *fogValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
312 #ifdef GPU_SUPPORT
313 RppStatus rppi_fog_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *fogValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
314 RppStatus rppi_fog_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *fogValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
315 RppStatus rppi_fog_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *fogValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
316 #endif // GPU_SUPPORT
317 
318 /******************** rain ********************/
319 
320 // Adds a rainfall overlay for a batch of images
321 
322 // *param[in] srcPtr Input image batch
323 // *param[in] srcSize Array containing an RppiSize for each image in the batch
324 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
325 // *param[out] dstPtr Output image batch
326 // *param[in] rainPercentage Array containing an Rpp32f rain percentage for each image in the batch (0 <= rainPercentage[n] <= 1)
327 // *param[in] rainWidth Array containing an Rpp32u rain width for each image in the batch (rainWidth[n] >= 0)
328 // *param[in] rainHeight Array containing an Rpp32u rain height for each image in the batch (rainHeight[n] >= 0)
329 // *param[in] rainTransparency Array containing an Rpp32f rain transparency for each image in the batch (0 <= rainTransparency[n] <= 1)
330 // *param[in] nbatchSize Batch size or the number of images in the batch
331 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
332 // *returns a RppStatus enumeration.
333 // *retval RPP_SUCCESS : No error, Succesful completion
334 // *retval RPP_ERROR : Error
335 
336 RppStatus rppi_rain_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *rainPercentage, Rpp32u *rainWidth, Rpp32u *rainHeight, Rpp32f *transperancy, Rpp32u nbatchSize, rppHandle_t rppHandle);
337 RppStatus rppi_rain_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *rainPercentage, Rpp32u *rainWidth, Rpp32u *rainHeight, Rpp32f *transperancy, Rpp32u nbatchSize, rppHandle_t rppHandle);
338 RppStatus rppi_rain_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *rainPercentage, Rpp32u *rainWidth, Rpp32u *rainHeight, Rpp32f *transperancy, Rpp32u nbatchSize, rppHandle_t rppHandle);
339 #ifdef GPU_SUPPORT
340 RppStatus rppi_rain_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *rainPercentage, Rpp32u *rainWidth, Rpp32u *rainHeight, Rpp32f *transperancy, Rpp32u nbatchSize, rppHandle_t rppHandle);
341 RppStatus rppi_rain_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *rainPercentage, Rpp32u *rainWidth, Rpp32u *rainHeight, Rpp32f *transperancy, Rpp32u nbatchSize, rppHandle_t rppHandle);
342 RppStatus rppi_rain_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *rainPercentage, Rpp32u *rainWidth, Rpp32u *rainHeight, Rpp32f *transperancy, Rpp32u nbatchSize, rppHandle_t rppHandle);
343 #endif // GPU_SUPPORT
344 
345 /******************** random_crop_letterbox ********************/
346 
347 // Crops the ROI and adds a letterbox border for a batch of images
348 
349 // *param[in] srcPtr Input image batch
350 // *param[in] srcSize Array containing an RppiSize for each image in the batch
351 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
352 // *param[out] dstPtr Output image batch
353 // *param[in] dstSize Array containing an RppiSize for each image in the batch
354 // *param[in] maxDstSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
355 // *param[in] xRoiBegin Array containing an x1 (ROI Top-Left) for each image in the batch
356 // *param[in] xRoiEnd Array containing an x2 (ROI Right-Bottom) for each image in the batch
357 // *param[in] yRoiBegin Array containing an y1 (ROI Top-Left) for each image in the batch
358 // *param[in] yRoiEnd Array containing an y2 (ROI Right-Bottom) for each image in the batch
359 // *param[in] nbatchSize Batch size or the number of images in the batch
360 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
361 // *returns a RppStatus enumeration.
362 // *retval RPP_SUCCESS : No error, Succesful completion
363 // *retval RPP_ERROR : Error
364 
365 RppStatus rppi_random_crop_letterbox_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, RppiSize *dstSize, RppiSize maxDstSize, Rpp32u *xRoiBegin, Rpp32u *xRoiEnd, Rpp32u *yRoiBegin, Rpp32u *yRoiEnd, Rpp32u nbatchSize, rppHandle_t rppHandle);
366 RppStatus rppi_random_crop_letterbox_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, RppiSize *dstSize, RppiSize maxDstSize, Rpp32u *xRoiBegin, Rpp32u *xRoiEnd, Rpp32u *yRoiBegin, Rpp32u *yRoiEnd, Rpp32u nbatchSize, rppHandle_t rppHandle);
367 RppStatus rppi_random_crop_letterbox_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, RppiSize *dstSize, RppiSize maxDstSize, Rpp32u *xRoiBegin, Rpp32u *xRoiEnd, Rpp32u *yRoiBegin, Rpp32u *yRoiEnd, Rpp32u nbatchSize, rppHandle_t rppHandle);
368 #ifdef GPU_SUPPORT
369 RppStatus rppi_random_crop_letterbox_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, RppiSize *dstSize, RppiSize maxDstSize, Rpp32u *xRoiBegin, Rpp32u *xRoiEnd, Rpp32u *yRoiBegin, Rpp32u *yRoiEnd, Rpp32u nbatchSize, rppHandle_t rppHandle);
370 RppStatus rppi_random_crop_letterbox_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, RppiSize *dstSize, RppiSize maxDstSize, Rpp32u *xRoiBegin, Rpp32u *xRoiEnd, Rpp32u *yRoiBegin, Rpp32u *yRoiEnd, Rpp32u nbatchSize, rppHandle_t rppHandle);
371 RppStatus rppi_random_crop_letterbox_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, RppiSize *dstSize, RppiSize maxDstSize, Rpp32u *xRoiBegin, Rpp32u *xRoiEnd, Rpp32u *yRoiBegin, Rpp32u *yRoiEnd, Rpp32u nbatchSize, rppHandle_t rppHandle);
372 #endif // GPU_SUPPORT
373 
374 /******************** exposure ********************/
375 
376 // Adjusts exposure for a batch of images
377 
378 // *param[in] srcPtr Input image batch
379 // *param[in] srcSize Array containing an RppiSize for each image in the batch
380 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
381 // *param[out] dstPtr Output image batch
382 // *param[in] exposureValue Array containing an Rpp32f exposure factor for each image in the batch (exposureValue[n] >= 0)
383 // *param[in] nbatchSize Batch size or the number of images in the batch
384 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
385 // *returns a RppStatus enumeration.
386 // *retval RPP_SUCCESS : No error, Succesful completion
387 // *retval RPP_ERROR : Error
388 
389 RppStatus rppi_exposure_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *exposureValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
390 RppStatus rppi_exposure_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *exposureValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
391 RppStatus rppi_exposure_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *exposureValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
392 #ifdef GPU_SUPPORT
393 RppStatus rppi_exposure_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *exposureValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
394 RppStatus rppi_exposure_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *exposureValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
395 RppStatus rppi_exposure_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *exposureValue, Rpp32u nbatchSize, rppHandle_t rppHandle);
396 #endif // GPU_SUPPORT
397 
398 /******************** histogram_balance ********************/
399 
400 // Performs histogram balancee for a batch of images
401 
402 // *param[in] srcPtr Input image batch
403 // *param[in] srcSize Array containing an RppiSize for each image in the batch
404 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
405 // *param[out] dstPtr Output image batch
406 // *param[in] nbatchSize Batch size or the number of images in the batch
407 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
408 // *returns a RppStatus enumeration.
409 // *retval RPP_SUCCESS : No error, Succesful completion
410 // *retval RPP_ERROR : Error
411 
412 RppStatus rppi_histogram_balance_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
413 RppStatus rppi_histogram_balance_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
414 RppStatus rppi_histogram_balance_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
415 #ifdef GPU_SUPPORT
416 RppStatus rppi_histogram_balance_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
417 RppStatus rppi_histogram_balance_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
418 RppStatus rppi_histogram_balance_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
419 #endif // GPU_SUPPORT
420 
424 #ifdef __cplusplus
425 }
426 #endif
427 #endif
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:80
void * RppPtr_t
void pointer
Definition: rppdefs.h:92
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:100
float Rpp32f
32 bit float
Definition: rppdefs.h:88
RPP top-level header with RPP handle API.
RPP common HOST/GPU typedef, enum and structure definitions.
RPPI Image size(Width/Height dimensions) type struct.
Definition: rppdefs.h:317