codekingpro/portable-devtools
114k
1 /* Copyright 2009-2022 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_LINEAR_TRANSFORMS_H
49#define NV_NPPI_LINEAR_TRANSFORMS_H
50
51/**
52 * \file nppi_linear_transforms.h
53 * NPP Image Processing Functionality.
54 */
55
56#include "nppdefs.h"
57
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62
63/**
64 * \page image_linear_transforms Linear Transforms
65 * @defgroup image_linear_transforms Linear Transforms
66 * @ingroup nppi
67 *
68 * Linear image transformations.
69 *
70 * @{
71 *
72 * These functions can be found in the nppist library. Linking to only the sub-libraries that you use can significantly
73 * save link time, application load time, and CUDA runtime startup time when using dynamic libraries.
74 *
75 */
76
77/**
78 * \section image_fourier_transforms Fourier Transforms
79 * @defgroup image_fourier_transforms Fourier Transforms
80 * The set of Fourier transform functions available in the library.
81 * @{
82 *
83 */
84
85/**
86 * 32-bit floating point complex to 32-bit floating point magnitude.
87 *
88 * Converts complex-number pixel image to single channel image computing
89 * the result pixels as the magnitude of the complex values.
90 * \param pSrc \ref source_image_pointer.
91 * \param nSrcStep \ref source_image_line_step.
92 * \param pDst \ref destination_image_pointer.
93 * \param nDstStep \ref destination_image_line_step.
94 * \param oSizeROI \ref roi_specification.
95 * \param nppStreamCtx \ref application_managed_stream_context
96 * \return \ref image_data_error_codes, \ref roi_error_codes
97 */
98NppStatus
99nppiMagnitude_32fc32f_C1R_Ctx(const Npp32fc * pSrc, int nSrcStep,
100 Npp32f * pDst, int nDstStep,
101 NppiSize oSizeROI, NppStreamContext nppStreamCtx);
102/**
103 * 32-bit floating point complex to 32-bit floating point magnitude.
104 *
105 * Converts complex-number pixel image to single channel image computing
106 * the result pixels as the magnitude of the complex values.
107 * \param pSrc \ref source_image_pointer.
108 * \param nSrcStep \ref source_image_line_step.
109 * \param pDst \ref destination_image_pointer.
110 * \param nDstStep \ref destination_image_line_step.
111 * \param oSizeROI \ref roi_specification.
112 * \return \ref image_data_error_codes, \ref roi_error_codes
113 */
114NppStatus
115nppiMagnitude_32fc32f_C1R(const Npp32fc * pSrc, int nSrcStep,
116 Npp32f * pDst, int nDstStep,
117 NppiSize oSizeROI);
118
119/**
120 * 32-bit floating point complex to 32-bit floating point squared magnitude.
121 *
122 * Converts complex-number pixel image to single channel image computing
123 * the result pixels as the squared magnitude of the complex values.
124 *
125 * The squared magnitude is an itermediate result of magnitude computation and
126 * can thus be computed faster than actual magnitude. If magnitudes are required
127 * for sorting/comparing only, using this function instead of nppiMagnitude_32fc32f_C1R
128 * can be a worthwhile performance optimization.
129 *
130 * \param pSrc \ref source_image_pointer.
131 * \param nSrcStep \ref source_image_line_step.
132 * \param pDst \ref destination_image_pointer.
133 * \param nDstStep \ref destination_image_line_step.
134 * \param oSizeROI \ref roi_specification.
135 * \param nppStreamCtx \ref application_managed_stream_context
136 * \return \ref image_data_error_codes, \ref roi_error_codes
137 */
138NppStatus
139nppiMagnitudeSqr_32fc32f_C1R_Ctx(const Npp32fc * pSrc, int nSrcStep,
140 Npp32f * pDst, int nDstStep,
141 NppiSize oSizeROI, NppStreamContext nppStreamCtx);
142/**
143 * 32-bit floating point complex to 32-bit floating point squared magnitude.
144 *
145 * Converts complex-number pixel image to single channel image computing
146 * the result pixels as the squared magnitude of the complex values.
147 *
148 * The squared magnitude is an itermediate result of magnitude computation and
149 * can thus be computed faster than actual magnitude. If magnitudes are required
150 * for sorting/comparing only, using this function instead of nppiMagnitude_32fc32f_C1R
151 * can be a worthwhile performance optimization.
152 *
153 * \param pSrc \ref source_image_pointer.
154 * \param nSrcStep \ref source_image_line_step.
155 * \param pDst \ref destination_image_pointer.
156 * \param nDstStep \ref destination_image_line_step.
157 * \param oSizeROI \ref roi_specification.
158 * \return \ref image_data_error_codes, \ref roi_error_codes
159 */
160NppStatus
161nppiMagnitudeSqr_32fc32f_C1R(const Npp32fc * pSrc, int nSrcStep,
162 Npp32f * pDst, int nDstStep,
163 NppiSize oSizeROI);
164
165/** @} image_fourier_transforms */
166
167/** @} image_linear_transforms */
168
169#ifdef __cplusplus
170} /* extern "C" */
171#endif
172
173#endif /* NV_NPPI_LINEAR_TRANSFORMS_H */
174 