codekingpro/portable-devtools
114k
1 /* Copyright 2009-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2 *
3 * NOTICE TO LICENSEE:
4 *
5 * The source code and/or documentation ("Licensed Deliverables") are
6 * subject to NVIDIA intellectual property rights under U.S. and
7 * international Copyright laws.
8 *
9 * The Licensed Deliverables contained herein are PROPRIETARY and
10 * CONFIDENTIAL to NVIDIA and are being provided under the terms and
11 * conditions of a form of NVIDIA software license agreement by and
12 * between NVIDIA and Licensee ("License Agreement") or electronically
13 * accepted by Licensee. Notwithstanding any terms or conditions to
14 * the contrary in the License Agreement, reproduction or disclosure
15 * of the Licensed Deliverables to any third party without the express
16 * written consent of NVIDIA is prohibited.
17 *
18 * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
19 * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
20 * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. THEY ARE
21 * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
22 * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
23 * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
24 * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
25 * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
26 * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
27 * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
28 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
29 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
30 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
31 * OF THESE LICENSED DELIVERABLES.
32 *
33 * U.S. Government End Users. These Licensed Deliverables are a
34 * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
35 * 1995), consisting of "commercial computer software" and "commercial
36 * computer software documentation" as such terms are used in 48
37 * C.F.R. 12.212 (SEPT 1995) and are provided to the U.S. Government
38 * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
39 * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
40 * U.S. Government End Users acquire the Licensed Deliverables with
41 * only those rights set forth herein.
42 *
43 * Any use of the Licensed Deliverables in individual and commercial
44 * software must include, in the user documentation and internal
45 * comments to the code, the above Disclaimer and U.S. Government End
46 * Users Notice.
47 */
48#ifndef NV_NPPI_GEOMETRY_TRANSFORMS_H
49#define NV_NPPI_GEOMETRY_TRANSFORMS_H
50
51/**
52 * \file nppi_geometry_transforms.h
53 * Image Geometry Transform Primitives.
54 */
55
56#include "nppdefs.h"
57
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62
63/**
64 * \page image_geometry_transforms Geometry Transforms
65 * @defgroup image_geometry_transforms Geometry Transforms
66 * @ingroup nppi
67 *
68 * Routines manipulating an image geometry.
69 *
70 * These functions can be found in the nppig library. Linking to only the sub-libraries that you use can significantly
71 * save link time, application load time, and CUDA runtime startup time when using dynamic libraries.
72 *
73 * \section geometric_transform_api Geometric Transform API Specifics
74 *
75 * This section covers some of the unique API features common to the
76 * geometric transform primitives.
77 *
78 * \section geometric_transform_roi Geometric Transforms and ROIs
79 *
80 * Geometric transforms operate on source and destination ROIs. The way
81 * these ROIs affect the processing of pixels differs from other (non
82 * geometric) image-processing primitives: Only pixels in the intersection
83 * of the destination ROI and the transformed source ROI are being
84 * processed.
85 *
86 * The typical processing proceedes as follows:
87 * -# Transform the rectangular source ROI (given in source image coordinates)
88 * into the destination image space. This yields a quadrilateral.
89 * -# Write only pixels in the intersection of the transformed source ROI and
90 * the destination ROI.
91 *
92 * \section geometric_transforms_interpolation Pixel Interpolation
93 *
94 * The majority of image geometry transform operation need to perform a
95 * resampling of the source image as source and destination pixels are not
96 * coincident.
97 *
98 * NPP supports the following pixel inerpolation modes (in order from fastest to
99 * slowest and lowest to highest quality):
100 * - nearest neighbor
101 * - linear interpolation
102 * - cubic convolution
103 * - supersampling
104 * - interpolation using Lanczos window function
105 *
106 * \section resize_error_codes Resize Error Codes
107 * \subsection resize_error_codes Resize Error Codes
108 * The resize primitives return the following error codes:
109 *
110 * - NPP_WRONG_INTERSECTION_ROI_ERROR indicates an error condition if
111 * srcROIRect has no intersection with the source image.
112 * - NPP_RESIZE_NO_OPERATION_ERROR if either destination ROI width or
113 * height is less than 1 pixel.
114 * - NPP_RESIZE_FACTOR_ERROR Indicates an error condition if either nXFactor or
115 * nYFactor is less than or equal to zero or in the case of NPPI_INTER_SUPER are not both downscaling.
116 * - NPP_INTERPOLATION_ERROR if eInterpolation has an illegal value.
117 * - NPP_SIZE_ERROR if source size width or height is less than 2 pixels.
118 * - NPP_RECTANGLE_ERROR if either destination ROI width or
119 * height is less than 1 pixel.
120 * @{
121 *
122 */
123
124/**
125 * \section image_resize_square_pixel ResizeSqrPixel
126 * @defgroup image_resize_square_pixel ResizeSqrPixel
127 *
128 * ResizeSqrPixel functions attempt to choose source pixels that would approximately represent the center of the destination pixels.
129 * It does so by using the following scaling formula to select source pixels for interpolation:
130 *
131 * \code
132 * nAdjustedXFactor = 1.0 / nXFactor;
133 * nAdjustedYFactor = 1.0 / nYFactor;
134 * nAdjustedXShift = nXShift * nAdjustedXFactor + ((1.0 - nAdjustedXFactor) * 0.5);
135 * nAdjustedYShift = nYShift * nAdjustedYFactor + ((1.0 - nAdjustedYFactor) * 0.5);
136 * nSrcX = nAdjustedXFactor * nDstX - nAdjustedXShift;
137 * nSrcY = nAdjustedYFactor * nDstY - nAdjustedYShift;
138 * \endcode
139 *
140 * ResizeSqrPixel functions support the following interpolation modes:
141 *
142 * \code
143 * NPPI_INTER_NN
144 * NPPI_INTER_LINEAR
145 * NPPI_INTER_CUBIC
146 * NPPI_INTER_CUBIC2P_BSPLINE
147 * NPPI_INTER_CUBIC2P_CATMULLROM
148 * NPPI_INTER_CUBIC2P_B05C03
149 * NPPI_INTER_SUPER
150 * NPPI_INTER_LANCZOS
151 * \endcode
152 *
153 * In the ResizeSqrPixel functions below source image clip checking is handled as follows:
154 *
155 * If the source pixel fractional x and y coordinates are greater than or equal to oSizeROI.x and less than oSizeROI.x + oSizeROI.width and
156 * greater than or equal to oSizeROI.y and less than oSizeROI.y + oSizeROI.height then the source pixel is considered to be within
157 * the source image clip rectangle and the source image is sampled. Otherwise the source image is not sampled and a destination pixel is not
158 * written to the destination image.
159 *
160 *
161 * @{
162 *
163 */
164
165/** @name GetResizeRect
166 * Returns NppiRect which represents the offset and size of the destination rectangle that would be generated by
167 * resizing the source NppiRect by the requested scale factors and shifts.
168 *
169 * @{
170 *
171 */
172
173/**
174 * \param oSrcROI Region of interest in the source image.
175 * \param pDstRect User supplied host memory pointer to an NppiRect structure that will be filled in by this function with the region of interest in the destination image.
176 * \param nXFactor Factor by which x dimension is changed.
177 * \param nYFactor Factor by which y dimension is changed.
178 * \param nXShift Source pixel shift in x-direction.
179 * \param nYShift Source pixel shift in y-direction.
180 * \param eInterpolation The type of eInterpolation to perform resampling.
181 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
182 */
183NppStatus
184nppiGetResizeRect(NppiRect oSrcROI, NppiRect *pDstRect,
185 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
186
187/** @} */
188
189/** @name ResizeSqrPixel
190 * Resizes images.
191 *
192 * \section CommonResizeSqrPackedPixelParameters Common parameters for nppiResizeSqrPackedPixel functions:
193 *
194 * \param pSrc \ref source_image_pointer.
195 * \param nSrcStep \ref source_image_line_step.
196 * \param oSrcSize Size in pixels of the source image.
197 * \param oSrcROI Region of interest in the source image.
198 * \param pDst \ref destination_image_pointer.
199 * \param nDstStep \ref destination_image_line_step.
200 * \param oDstROI Region of interest in the destination image.
201 * \param nXFactor Factor by which x dimension is changed.
202 * \param nYFactor Factor by which y dimension is changed.
203 * \param nXShift Source pixel shift in x-direction.
204 * \param nYShift Source pixel shift in y-direction.
205 * \param eInterpolation The type of eInterpolation to perform resampling.
206 * \param nppStreamCtx \ref application_managed_stream_context.
207 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
208 *
209 * \section CommonResizeSqrPlanarPixelParameters Common parameters for nppiResizeSqrPlanarPixel functions:
210 *
211 * \param pSrc \ref source_planar_image_pointer_array (host memory array containing device memory image plane pointers).
212 * \param nSrcStep \ref source_image_line_step.
213 * \param oSrcSize Size in pixels of the source image.
214 * \param oSrcROI Region of interest in the source image.
215 * \param pDst \ref destination_planar_image_pointer_array (host memory array containing device memory image plane pointers).
216 * \param nDstStep \ref destination_image_line_step.
217 * \param oDstROI Region of interest in the destination image.
218 * \param nXFactor Factor by which x dimension is changed.
219 * \param nYFactor Factor by which y dimension is changed.
220 * \param nXShift Source pixel shift in x-direction.
221 * \param nYShift Source pixel shift in y-direction.
222 * \param eInterpolation The type of eInterpolation to perform resampling.
223 * \param nppStreamCtx \ref application_managed_stream_context.
224 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
225 *
226 * @{
227 *
228 */
229
230/**
231 * 1 channel 8-bit unsigned image resize.
232 *
233 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
234 *
235 */
236NppStatus
237nppiResizeSqrPixel_8u_C1R_Ctx(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
238 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
239 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
240/**
241 * 1 channel 8-bit unsigned image resize.
242 *
243 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
244 *
245 */
246NppStatus
247nppiResizeSqrPixel_8u_C1R(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
248 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
249 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
250
251/**
252 * 3 channel 8-bit unsigned image resize.
253 *
254 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
255 *
256 */
257NppStatus
258nppiResizeSqrPixel_8u_C3R_Ctx(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
259 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
260 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
261/**
262 * 3 channel 8-bit unsigned image resize.
263 *
264 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
265 *
266 */
267NppStatus
268nppiResizeSqrPixel_8u_C3R(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
269 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
270 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
271
272/**
273 * 4 channel 8-bit unsigned image resize.
274 *
275 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
276 *
277 */
278NppStatus
279nppiResizeSqrPixel_8u_C4R_Ctx(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
280 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
281 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
282/**
283 * 4 channel 8-bit unsigned image resize.
284 *
285 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
286 *
287 */
288NppStatus
289nppiResizeSqrPixel_8u_C4R(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
290 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
291 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
292
293/**
294 * 4 channel 8-bit unsigned image resize not affecting alpha.
295 *
296 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
297 *
298 */
299NppStatus
300nppiResizeSqrPixel_8u_AC4R_Ctx(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
301 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
302 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
303/**
304 * 4 channel 8-bit unsigned image resize not affecting alpha.
305 *
306 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
307 *
308 */
309NppStatus
310nppiResizeSqrPixel_8u_AC4R(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
311 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
312 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
313
314/**
315 * 3 channel 8-bit unsigned planar image resize.
316 *
317 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
318 *
319 */
320NppStatus
321nppiResizeSqrPixel_8u_P3R_Ctx(const Npp8u * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
322 Npp8u * pDst[3], int nDstStep, NppiRect oDstROI,
323 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
324/**
325 * 3 channel 8-bit unsigned planar image resize.
326 *
327 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
328 *
329 */
330NppStatus
331nppiResizeSqrPixel_8u_P3R(const Npp8u * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
332 Npp8u * pDst[3], int nDstStep, NppiRect oDstROI,
333 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
334
335/**
336 * 4 channel 8-bit unsigned planar image resize.
337 *
338 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
339 *
340 */
341NppStatus
342nppiResizeSqrPixel_8u_P4R_Ctx(const Npp8u * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
343 Npp8u * pDst[4], int nDstStep, NppiRect oDstROI,
344 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
345/**
346 * 4 channel 8-bit unsigned planar image resize.
347 *
348 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
349 *
350 */
351NppStatus
352nppiResizeSqrPixel_8u_P4R(const Npp8u * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
353 Npp8u * pDst[4], int nDstStep, NppiRect oDstROI,
354 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
355
356/**
357 * 1 channel 16-bit unsigned image resize.
358 *
359 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
360 *
361 */
362NppStatus
363nppiResizeSqrPixel_16u_C1R_Ctx(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
364 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
365 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
366/**
367 * 1 channel 16-bit unsigned image resize.
368 *
369 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
370 *
371 */
372NppStatus
373nppiResizeSqrPixel_16u_C1R(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
374 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
375 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
376
377/**
378 * 3 channel 16-bit unsigned image resize.
379 *
380 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
381 *
382 */
383NppStatus
384nppiResizeSqrPixel_16u_C3R_Ctx(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
385 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
386 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
387/**
388 * 3 channel 16-bit unsigned image resize.
389 *
390 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
391 *
392 */
393NppStatus
394nppiResizeSqrPixel_16u_C3R(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
395 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
396 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
397
398/**
399 * 4 channel 16-bit unsigned image resize.
400 *
401 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
402 *
403 */
404NppStatus
405nppiResizeSqrPixel_16u_C4R_Ctx(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
406 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
407 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
408/**
409 * 4 channel 16-bit unsigned image resize.
410 *
411 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
412 *
413 */
414NppStatus
415nppiResizeSqrPixel_16u_C4R(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
416 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
417 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
418
419/**
420 * 4 channel 16-bit unsigned image resize not affecting alpha.
421 *
422 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
423 *
424 */
425NppStatus
426nppiResizeSqrPixel_16u_AC4R_Ctx(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
427 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
428 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
429/**
430 * 4 channel 16-bit unsigned image resize not affecting alpha.
431 *
432 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
433 *
434 */
435NppStatus
436nppiResizeSqrPixel_16u_AC4R(const Npp16u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
437 Npp16u * pDst, int nDstStep, NppiRect oDstROI,
438 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
439
440/**
441 * 3 channel 16-bit unsigned planar image resize.
442 *
443 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
444 *
445 */
446NppStatus
447nppiResizeSqrPixel_16u_P3R_Ctx(const Npp16u * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
448 Npp16u * pDst[3], int nDstStep, NppiRect oDstROI,
449 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
450/**
451 * 3 channel 16-bit unsigned planar image resize.
452 *
453 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
454 *
455 */
456NppStatus
457nppiResizeSqrPixel_16u_P3R(const Npp16u * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
458 Npp16u * pDst[3], int nDstStep, NppiRect oDstROI,
459 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
460
461/**
462 * 4 channel 16-bit unsigned planar image resize.
463 *
464 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
465 *
466 */
467NppStatus
468nppiResizeSqrPixel_16u_P4R_Ctx(const Npp16u * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
469 Npp16u * pDst[4], int nDstStep, NppiRect oDstROI,
470 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
471/**
472 * 4 channel 16-bit unsigned planar image resize.
473 *
474 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
475 *
476 */
477NppStatus
478nppiResizeSqrPixel_16u_P4R(const Npp16u * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
479 Npp16u * pDst[4], int nDstStep, NppiRect oDstROI,
480 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
481
482/**
483 * 1 channel 16-bit signed image resize.
484 *
485 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
486 *
487 */
488NppStatus
489nppiResizeSqrPixel_16s_C1R_Ctx(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
490 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
491 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
492/**
493 * 1 channel 16-bit signed image resize.
494 *
495 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
496 *
497 */
498NppStatus
499nppiResizeSqrPixel_16s_C1R(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
500 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
501 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
502
503/**
504 * 3 channel 16-bit signed image resize.
505 *
506 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
507 *
508 */
509NppStatus
510nppiResizeSqrPixel_16s_C3R_Ctx(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
511 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
512 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
513/**
514 * 3 channel 16-bit signed image resize.
515 *
516 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
517 *
518 */
519NppStatus
520nppiResizeSqrPixel_16s_C3R(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
521 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
522 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
523
524/**
525 * 4 channel 16-bit signed image resize.
526 *
527 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
528 *
529 */
530NppStatus
531nppiResizeSqrPixel_16s_C4R_Ctx(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
532 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
533 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
534/**
535 * 4 channel 16-bit signed image resize.
536 *
537 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
538 *
539 */
540NppStatus
541nppiResizeSqrPixel_16s_C4R(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
542 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
543 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
544
545/**
546 * 4 channel 16-bit signed image resize not affecting alpha.
547 *
548 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
549 *
550 */
551NppStatus
552nppiResizeSqrPixel_16s_AC4R_Ctx(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
553 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
554 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
555/**
556 * 4 channel 16-bit signed image resize not affecting alpha.
557 *
558 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
559 *
560 */
561NppStatus
562nppiResizeSqrPixel_16s_AC4R(const Npp16s * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
563 Npp16s * pDst, int nDstStep, NppiRect oDstROI,
564 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
565
566/**
567 * 3 channel 16-bit signed planar image resize.
568 *
569 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
570 *
571 */
572NppStatus
573nppiResizeSqrPixel_16s_P3R_Ctx(const Npp16s * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
574 Npp16s * pDst[3], int nDstStep, NppiRect oDstROI,
575 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
576/**
577 * 3 channel 16-bit signed planar image resize.
578 *
579 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
580 *
581 */
582NppStatus
583nppiResizeSqrPixel_16s_P3R(const Npp16s * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
584 Npp16s * pDst[3], int nDstStep, NppiRect oDstROI,
585 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
586
587/**
588 * 4 channel 16-bit signed planar image resize.
589 *
590 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
591 *
592 */
593NppStatus
594nppiResizeSqrPixel_16s_P4R_Ctx(const Npp16s * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
595 Npp16s * pDst[4], int nDstStep, NppiRect oDstROI,
596 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
597/**
598 * 4 channel 16-bit signed planar image resize.
599 *
600 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
601 *
602 */
603NppStatus
604nppiResizeSqrPixel_16s_P4R(const Npp16s * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
605 Npp16s * pDst[4], int nDstStep, NppiRect oDstROI,
606 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
607
608/**
609 * 1 channel 32-bit floating point image resize.
610 *
611 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
612 *
613 */
614NppStatus
615nppiResizeSqrPixel_32f_C1R_Ctx(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
616 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
617 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
618/**
619 * 1 channel 32-bit floating point image resize.
620 *
621 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
622 *
623 */
624NppStatus
625nppiResizeSqrPixel_32f_C1R(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
626 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
627 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
628
629/**
630 * 3 channel 32-bit floating point image resize.
631 *
632 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
633 *
634 */
635NppStatus
636nppiResizeSqrPixel_32f_C3R_Ctx(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
637 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
638 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
639/**
640 * 3 channel 32-bit floating point image resize.
641 *
642 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
643 *
644 */
645NppStatus
646nppiResizeSqrPixel_32f_C3R(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
647 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
648 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
649
650/**
651 * 4 channel 32-bit floating point image resize.
652 *
653 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
654 *
655 */
656NppStatus
657nppiResizeSqrPixel_32f_C4R_Ctx(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
658 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
659 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
660/**
661 * 4 channel 32-bit floating point image resize.
662 *
663 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
664 *
665 */
666NppStatus
667nppiResizeSqrPixel_32f_C4R(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
668 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
669 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
670
671/**
672 * 4 channel 32-bit floating point image resize not affecting alpha.
673 *
674 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
675 *
676 */
677NppStatus
678nppiResizeSqrPixel_32f_AC4R_Ctx(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
679 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
680 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
681/**
682 * 4 channel 32-bit floating point image resize not affecting alpha.
683 *
684 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
685 *
686 */
687NppStatus
688nppiResizeSqrPixel_32f_AC4R(const Npp32f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
689 Npp32f * pDst, int nDstStep, NppiRect oDstROI,
690 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
691
692/**
693 * 3 channel 32-bit floating point planar image resize.
694 *
695 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
696 *
697 */
698NppStatus
699nppiResizeSqrPixel_32f_P3R_Ctx(const Npp32f * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
700 Npp32f * pDst[3], int nDstStep, NppiRect oDstROI,
701 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
702/**
703 * 3 channel 32-bit floating point planar image resize.
704 *
705 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
706 *
707 */
708NppStatus
709nppiResizeSqrPixel_32f_P3R(const Npp32f * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
710 Npp32f * pDst[3], int nDstStep, NppiRect oDstROI,
711 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
712
713/**
714 * 4 channel 32-bit floating point planar image resize.
715 *
716 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
717 *
718 */
719NppStatus
720nppiResizeSqrPixel_32f_P4R_Ctx(const Npp32f * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
721 Npp32f * pDst[4], int nDstStep, NppiRect oDstROI,
722 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
723/**
724 * 4 channel 32-bit floating point planar image resize.
725 *
726 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
727 *
728 */
729NppStatus
730nppiResizeSqrPixel_32f_P4R(const Npp32f * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
731 Npp32f * pDst[4], int nDstStep, NppiRect oDstROI,
732 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
733
734/**
735 * 1 channel 64-bit floating point image resize.
736 *
737 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
738 *
739 */
740NppStatus
741nppiResizeSqrPixel_64f_C1R_Ctx(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
742 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
743 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
744/**
745 * 1 channel 64-bit floating point image resize.
746 *
747 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
748 *
749 */
750NppStatus
751nppiResizeSqrPixel_64f_C1R(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
752 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
753 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
754
755/**
756 * 3 channel 64-bit floating point image resize.
757 *
758 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
759 *
760*/
761NppStatus
762nppiResizeSqrPixel_64f_C3R_Ctx(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
763 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
764 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
765/**
766 * 3 channel 64-bit floating point image resize.
767 *
768 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
769 *
770*/
771NppStatus
772nppiResizeSqrPixel_64f_C3R(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
773 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
774 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
775
776/**
777 * 4 channel 64-bit floating point image resize.
778 *
779 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
780 *
781 */
782NppStatus
783nppiResizeSqrPixel_64f_C4R_Ctx(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
784 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
785 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
786/**
787 * 4 channel 64-bit floating point image resize.
788 *
789 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
790 *
791 */
792NppStatus
793nppiResizeSqrPixel_64f_C4R(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
794 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
795 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
796
797/**
798 * 4 channel 64-bit floating point image resize not affecting alpha.
799 *
800 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
801 *
802 */
803NppStatus
804nppiResizeSqrPixel_64f_AC4R_Ctx(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
805 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
806 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
807/**
808 * 4 channel 64-bit floating point image resize not affecting alpha.
809 *
810 * For common parameter descriptions, see \ref CommonResizeSqrPackedPixelParameters.
811 *
812 */
813NppStatus
814nppiResizeSqrPixel_64f_AC4R(const Npp64f * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
815 Npp64f * pDst, int nDstStep, NppiRect oDstROI,
816 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
817
818/**
819 * 3 channel 64-bit floating point planar image resize.
820 *
821 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
822 *
823 */
824NppStatus
825nppiResizeSqrPixel_64f_P3R_Ctx(const Npp64f * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
826 Npp64f * pDst[3], int nDstStep, NppiRect oDstROI,
827 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
828/**
829 * 3 channel 64-bit floating point planar image resize.
830 *
831 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
832 *
833 */
834NppStatus
835nppiResizeSqrPixel_64f_P3R(const Npp64f * const pSrc[3], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
836 Npp64f * pDst[3], int nDstStep, NppiRect oDstROI,
837 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
838
839/**
840 * 4 channel 64-bit floating point planar image resize.
841 *
842 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
843 *
844 */
845NppStatus
846nppiResizeSqrPixel_64f_P4R_Ctx(const Npp64f * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
847 Npp64f * pDst[4], int nDstStep, NppiRect oDstROI,
848 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation, NppStreamContext nppStreamCtx);
849/**
850 * 4 channel 64-bit floating point planar image resize.
851 *
852 * For common parameter descriptions, see \ref CommonResizeSqrPlanarPixelParameters.
853 *
854 */
855NppStatus
856nppiResizeSqrPixel_64f_P4R(const Npp64f * const pSrc[4], NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
857 Npp64f * pDst[4], int nDstStep, NppiRect oDstROI,
858 double nXFactor, double nYFactor, double nXShift, double nYShift, int eInterpolation);
859
860/**
861 * Buffer size for \ref nppiResizeSqrPixel_8u_C1R_Advanced.
862 * \param oSrcROI \ref roi_specification.
863 * \param oDstROI \ref roi_specification.
864 * \param hpBufferSize Required buffer size. Important: hpBufferSize is a
865 * <em>host pointer.</em> \ref general_scratch_buffer.
866 * \param eInterpolationMode The type of eInterpolation to perform resampling. Currently only supports NPPI_INTER_LANCZOS3_Advanced.
867 * \return NPP_NULL_POINTER_ERROR if hpBufferSize is 0 (NULL), \ref roi_error_codes.
868 */
869NppStatus
870nppiResizeAdvancedGetBufferHostSize_8u_C1R(NppiSize oSrcROI, NppiSize oDstROI, int * hpBufferSize /* host pointer */, int eInterpolationMode);
871
872/**
873 * 1 channel 8-bit unsigned image resize. This primitive matches the behavior of GraphicsMagick++.
874 *
875 * \param pSrc \ref source_image_pointer.
876 * \param nSrcStep \ref source_image_line_step.
877 * \param oSrcSize Size in pixels of the source image.
878 * \param oSrcROI Region of interest in the source image.
879 * \param pDst \ref destination_image_pointer.
880 * \param nDstStep \ref destination_image_line_step.
881 * \param oDstROI Region of interest in the destination image.
882 * \param nXFactor Factor by which x dimension is changed.
883 * \param nYFactor Factor by which y dimension is changed.
884 * \param pBuffer Device buffer that is used during calculations.
885 * \param eInterpolationMode The type of eInterpolation to perform resampling. Currently only supports NPPI_INTER_LANCZOS3_Advanced.
886 * \param nppStreamCtx \ref application_managed_stream_context.
887 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
888 */
889NppStatus
890nppiResizeSqrPixel_8u_C1R_Advanced_Ctx(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
891 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
892 double nXFactor, double nYFactor, Npp8u * pBuffer, int eInterpolationMode, NppStreamContext nppStreamCtx);
893/**
894 * 1 channel 8-bit unsigned image resize. This primitive matches the behavior of GraphicsMagick++.
895 *
896 * \param pSrc \ref source_image_pointer.
897 * \param nSrcStep \ref source_image_line_step.
898 * \param oSrcSize Size in pixels of the source image.
899 * \param oSrcROI Region of interest in the source image.
900 * \param pDst \ref destination_image_pointer.
901 * \param nDstStep \ref destination_image_line_step.
902 * \param oDstROI Region of interest in the destination image.
903 * \param nXFactor Factor by which x dimension is changed.
904 * \param nYFactor Factor by which y dimension is changed.
905 * \param pBuffer Device buffer that is used during calculations.
906 * \param eInterpolationMode The type of eInterpolation to perform resampling. Currently only supports NPPI_INTER_LANCZOS3_Advanced.
907 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
908 */
909NppStatus
910nppiResizeSqrPixel_8u_C1R_Advanced(const Npp8u * pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI,
911 Npp8u * pDst, int nDstStep, NppiRect oDstROI,
912 double nXFactor, double nYFactor, Npp8u * pBuffer, int eInterpolationMode);
913/** @} */
914
915/** @} image_resize_square_pixel */
916
917/**
918 * \section image_resize Resize
919 * @defgroup image_resize Resize
920 *
921 * Resize functions use scale factor automatically determined by the width and height ratios of input and output \ref roi_specification.
922 *
923 * This simplified function replaces the previous version which was deprecated in an earlier release. In this function the resize
924 * scale factor is automatically determined by the width and height ratios of oSrcRectROI and oDstRectROI. If either of those
925 * parameters intersect their respective image sizes then pixels outside the image size width and height will not be processed.
926 *
927 * Resize supports the following interpolation modes:
928 *
929 * \code
930 * NPPI_INTER_NN
931 * NPPI_INTER_LINEAR
932 * NPPI_INTER_CUBIC
933 * NPPI_INTER_SUPER
934 * NPPI_INTER_LANCZOS
935 * \endcode
936 *
937 * The resize primitives return the following error codes: \ref resize_error_codes.
938 *
939 * @{
940 *
941 */
942
943/** @name GetResizeTiledSourceOffset
944 * Helper function that can be used when tiling a destination image with a source image using multiple Resize calls.
945 * oSrcRectROI and oDstRectROI widths and heights should remain unmodified even if they will overlap source and destination
946 * image sizes. oDstRectROI offsets should be set to the destination offset of the new tile.
947 * Resize function processing will stop when source or destination image sizes are reached, any unavailable source image pixels
948 * beyond source image size will be border replicated. There is no particular association assumed between source and destination image locations.
949 * The values of oSrcRectROI.x and oSrcRectROI.y are ignored during this function call.
950 *
951 * @{
952 *
953 */
954
955/**
956 *
957 * \param oSrcRectROI Region of interest in the source image (may overlap source image size width and height).
958 * \param oDstRectROI Region of interest in the destination image (may overlap destination image size width and height).
959 * \param pNewSrcRectOffset Pointer to host memory NppiPoint object that will contain the new source image ROI offset
960 * to be used in the nppiResize call to generate that tile.
961 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
962 */
963NppStatus
964nppiGetResizeTiledSourceOffset(NppiRect oSrcRectROI, NppiRect oDstRectROI, NppiPoint * pNewSrcRectOffset);
965
966/** @} */
967
968/** @name Resize
969 * Resizes images.
970 *
971 * \section CommonResizePackedPixelParameters Common parameters for nppiResize packed pixel functions:
972 *
973 * \param pSrc \ref source_image_pointer to origin of source image.
974 * \param nSrcStep \ref source_image_line_step.
975 * \param oSrcSize Size in pixels of the entire source image.
976 * \param oSrcRectROI Region of interest in the source image (may overlap source image size width and height).
977 * \param pDst \ref destination_image_pointer to origin of destination image.
978 * \param nDstStep \ref destination_image_line_step.
979 * \param oDstSize Size in pixels of the entire destination image.
980 * \param oDstRectROI Region of interest in the destination image (may overlap destination image size width and height).
981 * \param eInterpolation The type of eInterpolation to perform resampling (16f versions do not support Lanczos interpolation).
982 * \param nppStreamCtx \ref application_managed_stream_context.
983 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
984 *
985 * \section CommonResizePlanarPixelParameters Common parameters for nppiResize planar pixel functions:
986 *
987 * \param pSrc \ref source_planar_image_pointer_array (host memory array containing device memory image plane origin pointers).
988 * \param nSrcStep \ref source_image_line_step.
989 * \param oSrcSize Size in pixels of the entire source image.
990 * \param oSrcRectROI Region of interest in the source image (may overlap source image size width and height).
991 * \param pDst \ref destination_planar_image_pointer_array (host memory array containing device memory image plane origin pointers).
992 * \param nDstStep \ref destination_image_line_step.
993 * \param oDstSize Size in pixels of the entire destination image.
994 * \param oDstRectROI Region of interest in the destination image (may overlap destination image size width and height).
995 * \param eInterpolation The type of eInterpolation to perform resampling.
996 * \param nppStreamCtx \ref application_managed_stream_context.
997 * \return \ref image_data_error_codes, \ref roi_error_codes, \ref resize_error_codes
998 *
999 * @{
1000 *
1001 */
1002
1003/**
1004 * 1 channel 8-bit unsigned image resize.
1005 *
1006 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1007 *
1008 */
1009NppStatus
1010nppiResize_8u_C1R_Ctx(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1011 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1012/**
1013 * 1 channel 8-bit unsigned image resize.
1014 *
1015 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1016 *
1017 */
1018NppStatus
1019nppiResize_8u_C1R(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1020 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1021
1022/**
1023 * 3 channel 8-bit unsigned image resize.
1024 *
1025 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1026 *
1027 */
1028NppStatus
1029nppiResize_8u_C3R_Ctx(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1030 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1031/**
1032 * 3 channel 8-bit unsigned image resize.
1033 *
1034 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1035 *
1036 */
1037NppStatus
1038nppiResize_8u_C3R(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1039 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1040
1041/**
1042 * 4 channel 8-bit unsigned image resize.
1043 *
1044 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1045 *
1046 */
1047NppStatus
1048nppiResize_8u_C4R_Ctx(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1049 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1050/**
1051 * 4 channel 8-bit unsigned image resize.
1052 *
1053 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1054 *
1055 */
1056NppStatus
1057nppiResize_8u_C4R(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1058 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1059
1060/**
1061 * 4 channel 8-bit unsigned image resize not affecting alpha.
1062 *
1063 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1064 *
1065 */
1066NppStatus
1067nppiResize_8u_AC4R_Ctx(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1068 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1069/**
1070 * 4 channel 8-bit unsigned image resize not affecting alpha.
1071 *
1072 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1073 *
1074 */
1075NppStatus
1076nppiResize_8u_AC4R(const Npp8u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1077 Npp8u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1078
1079/**
1080 * 3 channel 8-bit unsigned planar image resize.
1081 *
1082 * For common parameter descriptions, see \ref CommonResizePlanarPixelParameters.
1083 *
1084 */
1085NppStatus
1086nppiResize_8u_P3R_Ctx(const Npp8u * pSrc[3], int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1087 Npp8u * pDst[3], int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1088/**
1089 * 3 channel 8-bit unsigned planar image resize.
1090 *
1091 * For common parameter descriptions, see \ref CommonResizePlanarPixelParameters.
1092 *
1093 */
1094NppStatus
1095nppiResize_8u_P3R(const Npp8u * pSrc[3], int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1096 Npp8u * pDst[3], int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1097
1098/**
1099 * 4 channel 8-bit unsigned planar image resize.
1100 *
1101 * For common parameter descriptions, see \ref CommonResizePlanarPixelParameters.
1102 *
1103 */
1104NppStatus
1105nppiResize_8u_P4R_Ctx(const Npp8u * pSrc[4], int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1106 Npp8u * pDst[4], int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1107/**
1108 * 4 channel 8-bit unsigned planar image resize.
1109 *
1110 * For common parameter descriptions, see \ref CommonResizePlanarPixelParameters.
1111 *
1112 */
1113NppStatus
1114nppiResize_8u_P4R(const Npp8u * pSrc[4], int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1115 Npp8u * pDst[4], int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1116
1117/**
1118 * 1 channel 16-bit unsigned image resize.
1119 *
1120 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1121 *
1122 */
1123NppStatus
1124nppiResize_16u_C1R_Ctx(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1125 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1126/**
1127 * 1 channel 16-bit unsigned image resize.
1128 *
1129 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1130 *
1131 */
1132NppStatus
1133nppiResize_16u_C1R(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1134 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1135
1136/**
1137 * 3 channel 16-bit unsigned image resize.
1138 *
1139 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1140 *
1141 */
1142NppStatus
1143nppiResize_16u_C3R_Ctx(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1144 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1145/**
1146 * 3 channel 16-bit unsigned image resize.
1147 *
1148 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1149 *
1150 */
1151NppStatus
1152nppiResize_16u_C3R(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1153 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1154
1155/**
1156 * 4 channel 16-bit unsigned image resize.
1157 *
1158 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1159 *
1160 */
1161NppStatus
1162nppiResize_16u_C4R_Ctx(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1163 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1164/**
1165 * 4 channel 16-bit unsigned image resize.
1166 *
1167 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1168 *
1169 */
1170NppStatus
1171nppiResize_16u_C4R(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1172 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1173
1174/**
1175 * 4 channel 16-bit unsigned image resize not affecting alpha.
1176 *
1177 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1178 *
1179 */
1180NppStatus
1181nppiResize_16u_AC4R_Ctx(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1182 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation, NppStreamContext nppStreamCtx);
1183/**
1184 * 4 channel 16-bit unsigned image resize not affecting alpha.
1185 *
1186 * For common parameter descriptions, see \ref CommonResizePackedPixelParameters.
1187 *
1188 */
1189NppStatus
1190nppiResize_16u_AC4R(const Npp16u * pSrc, int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
1191 Npp16u * pDst, int nDstStep, NppiSize oDstSize, NppiRect oDstRectROI, int eInterpolation);
1192
1193/**
1194 * 3 channel 16-bit unsigned planar image resize.
1195 *
1196 * For common parameter descriptions, see \ref CommonResizePlanarPixelParameters.
1197 *
1198 */
1199NppStatus
1200nppiResize_16u_P3R_Ctx(const Npp16u * pSrc[3], int nSrcStep, NppiSize oSrcSize, NppiRect oSrcRectROI,
