• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 //  By downloading, copying, installing or using the software you agree to this license.
6 //  If you do not agree to this license, do not download, install,
7 //  copy or use the software.
8 //
9 //
10 //                        Intel License Agreement
11 //                For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
14 // Third party copyrights are property of their respective owners.
15 //
16 // Redistribution and use in source and binary forms, with or without modification,
17 // are permitted provided that the following conditions are met:
18 //
19 //   * Redistribution's of source code must retain the above copyright notice,
20 //     this list of conditions and the following disclaimer.
21 //
22 //   * Redistribution's in binary form must reproduce the above copyright notice,
23 //     this list of conditions and the following disclaimer in the documentation
24 //     and/or other materials provided with the distribution.
25 //
26 //   * The name of Intel Corporation may not be used to endorse or promote products
27 //     derived from this software without specific prior written permission.
28 //
29 // This software is provided by the copyright holders and contributors "as is" and
30 // any express or implied warranties, including, but not limited to, the implied
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
33 // indirect, incidental, special, exemplary, or consequential damages
34 // (including, but not limited to, procurement of substitute goods or services;
35 // loss of use, data, or profits; or business interruption) however caused
36 // and on any theory of liability, whether in contract, strict liability,
37 // or tort (including negligence or otherwise) arising in any way out of
38 // the use of this software, even if advised of the possibility of such damage.
39 //
40 //M*/
41 
42 #ifndef _CV_IPP_H_
43 #define _CV_IPP_H_
44 
45 /****************************************************************************************\
46 *                                  Creating Borders                                      *
47 \****************************************************************************************/
48 
49 #define IPCV_COPY_BORDER( bordertype, flavor )                                      \
50 IPCVAPI_EX( CvStatus, icvCopy##bordertype##Border_##flavor##R,                      \
51     "ippiCopy" #bordertype "Border_" #flavor "R", CV_PLUGINS1(CV_PLUGIN_IPPI),      \
52     ( const void* pSrc,  int srcStep, CvSize srcRoiSize, void* pDst,  int dstStep,  \
53       CvSize dstRoiSize, int topBorderHeight, int leftBorderWidth ))                \
54                                                                                     \
55 IPCVAPI_EX( CvStatus, icvCopy##bordertype##Border_##flavor##IR,                     \
56     "ippiCopy" #bordertype "Border_" #flavor "IR", CV_PLUGINS1(CV_PLUGIN_IPPI),     \
57     ( const void* pSrc,  int srcDstStep, CvSize srcRoiSize,                         \
58       CvSize dstRoiSize, int topBorderHeight, int leftBorderWidth ))
59 
60 IPCV_COPY_BORDER( Replicate, 8u_C1 )
61 IPCV_COPY_BORDER( Replicate, 16s_C1 )
62 IPCV_COPY_BORDER( Replicate, 8u_C3 )
63 IPCV_COPY_BORDER( Replicate, 32s_C1 )
64 IPCV_COPY_BORDER( Replicate, 16s_C3 )
65 IPCV_COPY_BORDER( Replicate, 16s_C4 )
66 IPCV_COPY_BORDER( Replicate, 32s_C3 )
67 IPCV_COPY_BORDER( Replicate, 32s_C4 )
68 
69 /****************************************************************************************\
70 *                                        Moments                                         *
71 \****************************************************************************************/
72 
73 #define IPCV_MOMENTS( suffix, ipp_suffix, cn )                      \
74 IPCVAPI_EX( CvStatus, icvMoments##suffix##_C##cn##R,                \
75 "ippiMoments" #ipp_suffix "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),\
76 ( const void* img, int step, CvSize size, void* momentstate ))
77 
78 IPCV_MOMENTS( _8u, 64f_8u, 1 )
79 IPCV_MOMENTS( _32f, 64f_32f, 1 )
80 
81 #undef IPCV_MOMENTS
82 
83 IPCVAPI_EX( CvStatus, icvMomentInitAlloc_64f,
84             "ippiMomentInitAlloc_64f", CV_PLUGINS1(CV_PLUGIN_IPPI),
85             (void** momentstate, CvHintAlgorithm hint ))
86 
87 IPCVAPI_EX( CvStatus, icvMomentFree_64f,
88             "ippiMomentFree_64f", CV_PLUGINS1(CV_PLUGIN_IPPI),
89             (void* momentstate ))
90 
91 IPCVAPI_EX( CvStatus, icvGetSpatialMoment_64f,
92             "ippiGetSpatialMoment_64f", CV_PLUGINS1(CV_PLUGIN_IPPI),
93             (const void* momentstate, int mOrd, int nOrd,
94              int nChannel, CvPoint roiOffset, double* value ))
95 
96 /****************************************************************************************\
97 *                                  Background differencing                               *
98 \****************************************************************************************/
99 
100 /////////////////////////////////// Accumulation /////////////////////////////////////////
101 
102 #define IPCV_ACCUM( flavor, arrtype, acctype )                                      \
103 IPCVAPI_EX( CvStatus, icvAdd_##flavor##_C1IR,                                       \
104     "ippiAdd_" #flavor "_C1IR", CV_PLUGINS1(CV_PLUGIN_IPPCV),                       \
105     ( const arrtype* src, int srcstep, acctype* dst, int dststep, CvSize size ))    \
106 IPCVAPI_EX( CvStatus, icvAddSquare_##flavor##_C1IR,                                 \
107     "ippiAddSquare_" #flavor "_C1IR", CV_PLUGINS1(CV_PLUGIN_IPPCV),                 \
108     ( const arrtype* src, int srcstep, acctype* dst, int dststep, CvSize size ))    \
109 IPCVAPI_EX( CvStatus, icvAddProduct_##flavor##_C1IR,                                \
110     "ippiAddProduct_" #flavor "_C1IR", CV_PLUGINS1(CV_PLUGIN_IPPCV),                \
111     ( const arrtype* src1, int srcstep1, const arrtype* src2, int srcstep2,         \
112       acctype* dst, int dststep, CvSize size ))                                     \
113 IPCVAPI_EX( CvStatus, icvAddWeighted_##flavor##_C1IR,                               \
114     "ippiAddWeighted_" #flavor "_C1IR", CV_PLUGINS1(CV_PLUGIN_IPPCV),               \
115     ( const arrtype* src, int srcstep, acctype* dst, int dststep,                   \
116       CvSize size, acctype alpha ))                                                 \
117                                                                                     \
118 IPCVAPI_EX( CvStatus, icvAdd_##flavor##_C1IMR,                                      \
119     "ippiAdd_" #flavor "_C1IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),                      \
120     ( const arrtype* src, int srcstep, const uchar* mask, int maskstep,             \
121       acctype* dst, int dststep, CvSize size ))                                     \
122 IPCVAPI_EX( CvStatus, icvAddSquare_##flavor##_C1IMR,                                \
123     "ippiAddSquare_" #flavor "_C1IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),                \
124     ( const arrtype* src, int srcstep, const uchar* mask, int maskstep,             \
125       acctype* dst, int dststep, CvSize size ))                                     \
126 IPCVAPI_EX( CvStatus, icvAddProduct_##flavor##_C1IMR,                               \
127     "ippiAddProduct_" #flavor "_C1IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),               \
128     ( const arrtype* src1, int srcstep1, const arrtype* src2, int srcstep2,         \
129       const uchar* mask, int maskstep, acctype* dst, int dststep, CvSize size ))    \
130 IPCVAPI_EX( CvStatus, icvAddWeighted_##flavor##_C1IMR,                              \
131     "ippiAddWeighted_" #flavor "_C1IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),              \
132     ( const arrtype* src, int srcstep, const uchar* mask, int maskstep,             \
133       acctype* dst, int dststep, CvSize size, acctype alpha ))                      \
134                                                                                     \
135 IPCVAPI_EX( CvStatus, icvAdd_##flavor##_C3IMR,                                      \
136     "ippiAdd_" #flavor "_C3IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),                      \
137     ( const arrtype* src, int srcstep, const uchar* mask, int maskstep,             \
138       acctype* dst, int dststep, CvSize size ))                                     \
139 IPCVAPI_EX( CvStatus, icvAddSquare_##flavor##_C3IMR,                                \
140     "ippiAddSquare_" #flavor "_C3IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),                \
141     ( const arrtype* src, int srcstep, const uchar* mask, int maskstep,             \
142       acctype* dst, int dststep, CvSize size ))                                     \
143 IPCVAPI_EX( CvStatus, icvAddProduct_##flavor##_C3IMR,                               \
144     "ippiAddProduct_" #flavor "_C3IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),               \
145     ( const arrtype* src1, int srcstep1, const arrtype* src2, int srcstep2,         \
146       const uchar* mask, int maskstep, acctype* dst, int dststep, CvSize size ))    \
147 IPCVAPI_EX( CvStatus, icvAddWeighted_##flavor##_C3IMR,                              \
148     "ippiAddWeighted_" #flavor "_C3IMR", CV_PLUGINS1(CV_PLUGIN_IPPCV),              \
149     ( const arrtype* src, int srcstep, const uchar* mask, int maskstep,             \
150       acctype* dst, int dststep, CvSize size, acctype alpha ))
151 
152 IPCV_ACCUM( 8u32f, uchar, float )
153 IPCV_ACCUM( 32f, float, float )
154 
155 #undef IPCV_ACCUM
156 
157 /****************************************************************************************\
158 *                                       Pyramids                                         *
159 \****************************************************************************************/
160 
161 IPCVAPI_EX( CvStatus, icvPyrDownGetBufSize_Gauss5x5,
162            "ippiPyrDownGetBufSize_Gauss5x5", CV_PLUGINS1(CV_PLUGIN_IPPCV),
163             ( int roiWidth, CvDataType dataType, int channels, int* bufSize ))
164 
165 IPCVAPI_EX( CvStatus, icvPyrUpGetBufSize_Gauss5x5,
166            "ippiPyrUpGetBufSize_Gauss5x5", CV_PLUGINS1(CV_PLUGIN_IPPCV),
167             ( int roiWidth, CvDataType dataType, int channels, int* bufSize ))
168 
169 #define ICV_PYRDOWN( flavor, cn )                                           \
170 IPCVAPI_EX( CvStatus, icvPyrDown_Gauss5x5_##flavor##_C##cn##R,              \
171 "ippiPyrDown_Gauss5x5_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPCV), \
172 ( const void* pSrc, int srcStep, void* pDst, int dstStep,                   \
173   CvSize roiSize, void* pBuffer ))
174 
175 #define ICV_PYRUP( flavor, cn )                                             \
176 IPCVAPI_EX( CvStatus, icvPyrUp_Gauss5x5_##flavor##_C##cn##R,                \
177 "ippiPyrUp_Gauss5x5_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPCV),   \
178 ( const void* pSrc, int srcStep, void* pDst, int dstStep,                   \
179   CvSize roiSize, void* pBuffer ))
180 
181 ICV_PYRDOWN( 8u, 1 )
182 ICV_PYRDOWN( 8u, 3 )
183 ICV_PYRDOWN( 32f, 1 )
184 ICV_PYRDOWN( 32f, 3 )
185 
186 ICV_PYRUP( 8u, 1 )
187 ICV_PYRUP( 8u, 3 )
188 ICV_PYRUP( 32f, 1 )
189 ICV_PYRUP( 32f, 3 )
190 
191 #undef ICV_PYRDOWN
192 #undef ICV_PYRUP
193 
194 /****************************************************************************************\
195 *                                Geometric Transformations                               *
196 \****************************************************************************************/
197 
198 #define IPCV_RESIZE( flavor, cn )                                           \
199 IPCVAPI_EX( CvStatus, icvResize_##flavor##_C##cn##R,                        \
200             "ippiResize_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),\
201            (const void* src, CvSize srcsize, int srcstep, CvRect srcroi,    \
202             void* dst, int dststep, CvSize dstroi,                          \
203             double xfactor, double yfactor, int interpolation ))
204 
205 IPCV_RESIZE( 8u, 1 )
206 IPCV_RESIZE( 8u, 3 )
207 IPCV_RESIZE( 8u, 4 )
208 
209 IPCV_RESIZE( 16u, 1 )
210 IPCV_RESIZE( 16u, 3 )
211 IPCV_RESIZE( 16u, 4 )
212 
213 IPCV_RESIZE( 32f, 1 )
214 IPCV_RESIZE( 32f, 3 )
215 IPCV_RESIZE( 32f, 4 )
216 
217 #undef IPCV_RESIZE
218 
219 #define IPCV_WARPAFFINE_BACK( flavor, cn )                                  \
220 IPCVAPI_EX( CvStatus, icvWarpAffineBack_##flavor##_C##cn##R,                \
221     "ippiWarpAffineBack_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),\
222     (const void* src, CvSize srcsize, int srcstep, CvRect srcroi,           \
223     void* dst, int dststep, CvRect dstroi,                                  \
224     const double* coeffs, int interpolate ))
225 
226 IPCV_WARPAFFINE_BACK( 8u, 1 )
227 IPCV_WARPAFFINE_BACK( 8u, 3 )
228 IPCV_WARPAFFINE_BACK( 8u, 4 )
229 
230 IPCV_WARPAFFINE_BACK( 32f, 1 )
231 IPCV_WARPAFFINE_BACK( 32f, 3 )
232 IPCV_WARPAFFINE_BACK( 32f, 4 )
233 
234 #undef IPCV_WARPAFFINE_BACK
235 
236 #define IPCV_WARPPERSPECTIVE_BACK( flavor, cn )                             \
237 IPCVAPI_EX( CvStatus, icvWarpPerspectiveBack_##flavor##_C##cn##R,           \
238     "ippiWarpPerspectiveBack_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),\
239     (const void* src, CvSize srcsize, int srcstep, CvRect srcroi,           \
240     void* dst, int dststep, CvRect dstroi,                                  \
241     const double* coeffs, int interpolate ))
242 
243 IPCV_WARPPERSPECTIVE_BACK( 8u, 1 )
244 IPCV_WARPPERSPECTIVE_BACK( 8u, 3 )
245 IPCV_WARPPERSPECTIVE_BACK( 8u, 4 )
246 
247 IPCV_WARPPERSPECTIVE_BACK( 32f, 1 )
248 IPCV_WARPPERSPECTIVE_BACK( 32f, 3 )
249 IPCV_WARPPERSPECTIVE_BACK( 32f, 4 )
250 
251 #undef IPCV_WARPPERSPECTIVE_BACK
252 
253 
254 #define IPCV_WARPPERSPECTIVE( flavor, cn )                                  \
255 IPCVAPI_EX( CvStatus, icvWarpPerspective_##flavor##_C##cn##R,               \
256     "ippiWarpPerspective_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),\
257     (const void* src, CvSize srcsize, int srcstep, CvRect srcroi,           \
258     void* dst, int dststep, CvRect dstroi,                                  \
259     const double* coeffs, int interpolate ))
260 
261 IPCV_WARPPERSPECTIVE( 8u, 1 )
262 IPCV_WARPPERSPECTIVE( 8u, 3 )
263 IPCV_WARPPERSPECTIVE( 8u, 4 )
264 
265 IPCV_WARPPERSPECTIVE( 32f, 1 )
266 IPCV_WARPPERSPECTIVE( 32f, 3 )
267 IPCV_WARPPERSPECTIVE( 32f, 4 )
268 
269 #undef IPCV_WARPPERSPECTIVE
270 
271 #define IPCV_REMAP( flavor, cn )                                        \
272 IPCVAPI_EX( CvStatus, icvRemap_##flavor##_C##cn##R,                     \
273     "ippiRemap_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),     \
274     ( const void* src, CvSize srcsize, int srcstep, CvRect srcroi,      \
275       const float* xmap, int xmapstep, const float* ymap, int ymapstep, \
276       void* dst, int dststep, CvSize dstsize, int interpolation ))
277 
278 IPCV_REMAP( 8u, 1 )
279 IPCV_REMAP( 8u, 3 )
280 IPCV_REMAP( 8u, 4 )
281 
282 IPCV_REMAP( 32f, 1 )
283 IPCV_REMAP( 32f, 3 )
284 IPCV_REMAP( 32f, 4 )
285 
286 #undef IPCV_REMAP
287 
288 /****************************************************************************************\
289 *                                      Morphology                                        *
290 \****************************************************************************************/
291 
292 #define IPCV_MORPHOLOGY( minmaxtype, morphtype, flavor, cn )                    \
293 IPCVAPI_EX( CvStatus, icv##morphtype##Rect_##flavor##_C##cn##R,                 \
294     "ippiFilter" #minmaxtype "BorderReplicate_" #flavor "_C" #cn "R",           \
295     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( const void* src, int srcstep, void* dst,    \
296     int dststep, CvSize roi, CvSize esize, CvPoint anchor, void* buffer ))      \
297 IPCVAPI_EX( CvStatus, icv##morphtype##Rect_GetBufSize_##flavor##_C##cn##R,      \
298     "ippiFilter" #minmaxtype "GetBufferSize_" #flavor "_C" #cn "R",             \
299     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( int width, CvSize esize, int* bufsize ))    \
300                                                                                 \
301 IPCVAPI_EX( CvStatus, icv##morphtype##_##flavor##_C##cn##R,                     \
302     "ippi" #morphtype "BorderReplicate_" #flavor "_C" #cn "R",                  \
303     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( const void* src, int srcstep,               \
304     void* dst, int dststep, CvSize roi, int bordertype, void* morphstate ))
305 
306 IPCV_MORPHOLOGY( Min, Erode, 8u, 1 )
307 IPCV_MORPHOLOGY( Min, Erode, 8u, 3 )
308 IPCV_MORPHOLOGY( Min, Erode, 8u, 4 )
309 IPCV_MORPHOLOGY( Min, Erode, 16u, 1 )
310 IPCV_MORPHOLOGY( Min, Erode, 16u, 3 )
311 IPCV_MORPHOLOGY( Min, Erode, 16u, 4 )
312 IPCV_MORPHOLOGY( Min, Erode, 32f, 1 )
313 IPCV_MORPHOLOGY( Min, Erode, 32f, 3 )
314 IPCV_MORPHOLOGY( Min, Erode, 32f, 4 )
315 IPCV_MORPHOLOGY( Max, Dilate, 8u, 1 )
316 IPCV_MORPHOLOGY( Max, Dilate, 8u, 3 )
317 IPCV_MORPHOLOGY( Max, Dilate, 8u, 4 )
318 IPCV_MORPHOLOGY( Max, Dilate, 16u, 1 )
319 IPCV_MORPHOLOGY( Max, Dilate, 16u, 3 )
320 IPCV_MORPHOLOGY( Max, Dilate, 16u, 4 )
321 IPCV_MORPHOLOGY( Max, Dilate, 32f, 1 )
322 IPCV_MORPHOLOGY( Max, Dilate, 32f, 3 )
323 IPCV_MORPHOLOGY( Max, Dilate, 32f, 4 )
324 
325 #undef IPCV_MORPHOLOGY
326 
327 #define IPCV_MORPHOLOGY_INIT_ALLOC( flavor, cn )                            \
328 IPCVAPI_EX( CvStatus, icvMorphInitAlloc_##flavor##_C##cn##R,                \
329     "ippiMorphologyInitAlloc_" #flavor "_C" #cn "R",                        \
330     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( int width, const uchar* element,        \
331     CvSize esize, CvPoint anchor, void** morphstate ))
332 
333 IPCV_MORPHOLOGY_INIT_ALLOC( 8u, 1 )
334 IPCV_MORPHOLOGY_INIT_ALLOC( 8u, 3 )
335 IPCV_MORPHOLOGY_INIT_ALLOC( 8u, 4 )
336 IPCV_MORPHOLOGY_INIT_ALLOC( 16u, 1 )
337 IPCV_MORPHOLOGY_INIT_ALLOC( 16u, 3 )
338 IPCV_MORPHOLOGY_INIT_ALLOC( 16u, 4 )
339 IPCV_MORPHOLOGY_INIT_ALLOC( 32f, 1 )
340 IPCV_MORPHOLOGY_INIT_ALLOC( 32f, 3 )
341 IPCV_MORPHOLOGY_INIT_ALLOC( 32f, 4 )
342 
343 #undef IPCV_MORPHOLOGY_INIT_ALLOC
344 
345 IPCVAPI_EX( CvStatus, icvMorphFree, "ippiMorphologyFree",
346     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( void* morphstate ))
347 
348 
349 /****************************************************************************************\
350 *                                 Smoothing Filters                                      *
351 \****************************************************************************************/
352 
353 #define IPCV_FILTER_MEDIAN( flavor, cn )                                            \
354 IPCVAPI_EX( CvStatus, icvFilterMedian_##flavor##_C##cn##R,                          \
355             "ippiFilterMedian_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),  \
356             ( const void* src, int srcstep, void* dst, int dststep,                 \
357               CvSize roi, CvSize ksize, CvPoint anchor ))
358 
359 IPCV_FILTER_MEDIAN( 8u, 1 )
360 IPCV_FILTER_MEDIAN( 8u, 3 )
361 IPCV_FILTER_MEDIAN( 8u, 4 )
362 
363 #define IPCV_FILTER_BOX( flavor, cn )                                               \
364 IPCVAPI_EX( CvStatus, icvFilterBox_##flavor##_C##cn##R,                             \
365             "ippiFilterBox_" #flavor "_C" #cn "R", 0/*CV_PLUGINS1(CV_PLUGIN_IPPI)*/,\
366             ( const void* src, int srcstep, void* dst, int dststep,                 \
367               CvSize roi, CvSize ksize, CvPoint anchor ))
368 
369 IPCV_FILTER_BOX( 8u, 1 )
370 IPCV_FILTER_BOX( 8u, 3 )
371 IPCV_FILTER_BOX( 8u, 4 )
372 IPCV_FILTER_BOX( 32f, 1 )
373 IPCV_FILTER_BOX( 32f, 3 )
374 IPCV_FILTER_BOX( 32f, 4 )
375 
376 #undef IPCV_FILTER_BOX
377 
378 /****************************************************************************************\
379 *                                 Derivative Filters                                     *
380 \****************************************************************************************/
381 
382 #define IPCV_FILTER_SOBEL_BORDER( suffix, flavor, srctype )                             \
383 IPCVAPI_EX( CvStatus, icvFilterSobel##suffix##GetBufSize_##flavor##_C1R,                \
384     "ippiFilterSobel" #suffix "GetBufferSize_" #flavor "_C1R",                          \
385     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( CvSize roi, int masksize, int* buffersize ))        \
386 IPCVAPI_EX( CvStatus, icvFilterSobel##suffix##Border_##flavor##_C1R,                    \
387     "ippiFilterSobel" #suffix "Border_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),   \
388     ( const void* src, int srcstep, void* dst, int dststep, CvSize roi, int masksize,   \
389       int bordertype, srctype bordervalue, void* buffer ))
390 
391 IPCV_FILTER_SOBEL_BORDER( NegVert, 8u16s, uchar )
392 IPCV_FILTER_SOBEL_BORDER( Horiz, 8u16s, uchar )
393 IPCV_FILTER_SOBEL_BORDER( VertSecond, 8u16s, uchar )
394 IPCV_FILTER_SOBEL_BORDER( HorizSecond, 8u16s, uchar )
395 IPCV_FILTER_SOBEL_BORDER( Cross, 8u16s, uchar )
396 
397 IPCV_FILTER_SOBEL_BORDER( NegVert, 32f, float )
398 IPCV_FILTER_SOBEL_BORDER( Horiz, 32f, float )
399 IPCV_FILTER_SOBEL_BORDER( VertSecond, 32f, float )
400 IPCV_FILTER_SOBEL_BORDER( HorizSecond, 32f, float )
401 IPCV_FILTER_SOBEL_BORDER( Cross, 32f, float )
402 
403 #undef IPCV_FILTER_SOBEL_BORDER
404 
405 #define IPCV_FILTER_SCHARR_BORDER( suffix, flavor, srctype )                            \
406 IPCVAPI_EX( CvStatus, icvFilterScharr##suffix##GetBufSize_##flavor##_C1R,               \
407     "ippiFilterScharr" #suffix "GetBufferSize_" #flavor "_C1R",                         \
408     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( CvSize roi, int* buffersize ))                      \
409 IPCVAPI_EX( CvStatus, icvFilterScharr##suffix##Border_##flavor##_C1R,                   \
410     "ippiFilterScharr" #suffix "Border_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),  \
411     ( const void* src, int srcstep, void* dst, int dststep, CvSize roi,                 \
412       int bordertype, srctype bordervalue, void* buffer ))
413 
414 IPCV_FILTER_SCHARR_BORDER( Vert, 8u16s, uchar )
415 IPCV_FILTER_SCHARR_BORDER( Horiz, 8u16s, uchar )
416 
417 IPCV_FILTER_SCHARR_BORDER( Vert, 32f, float )
418 IPCV_FILTER_SCHARR_BORDER( Horiz, 32f, float )
419 
420 #undef IPCV_FILTER_SCHARR_BORDER
421 
422 
423 #define IPCV_FILTER_LAPLACIAN_BORDER( flavor, srctype )                                 \
424 IPCVAPI_EX( CvStatus, icvFilterLaplacianGetBufSize_##flavor##_C1R,                      \
425     "ippiFilterLaplacianGetBufferSize_" #flavor "_C1R",                                 \
426     CV_PLUGINS1(CV_PLUGIN_IPPCV), ( CvSize roi, int masksize, int* buffersize ))        \
427 IPCVAPI_EX( CvStatus, icvFilterLaplacianBorder_##flavor##_C1R,                          \
428     "ippiFilterLaplacianBorder_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),          \
429     ( const void* src, int srcstep, void* dst, int dststep, CvSize roi, int masksize,   \
430       int bordertype, srctype bordervalue, void* buffer ))
431 
432 IPCV_FILTER_LAPLACIAN_BORDER( 8u16s, uchar )
433 IPCV_FILTER_LAPLACIAN_BORDER( 32f, float )
434 
435 #undef IPCV_FILTER_LAPLACIAN_BORDER
436 
437 
438 /////////////////////////////////////////////////////////////////////////////////////////
439 
440 #define IPCV_FILTER_SOBEL( suffix, ipp_suffix, flavor )                             \
441 IPCVAPI_EX( CvStatus, icvFilterSobel##suffix##_##flavor##_C1R,                      \
442     "ippiFilterSobel" #ipp_suffix "_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI),  \
443     ( const void* src, int srcstep, void* dst, int dststep, CvSize roi, int aperture ))
444 
445 IPCV_FILTER_SOBEL( Vert, Vert, 8u16s )
446 IPCV_FILTER_SOBEL( Horiz, Horiz, 8u16s )
447 IPCV_FILTER_SOBEL( VertSecond, VertSecond, 8u16s )
448 IPCV_FILTER_SOBEL( HorizSecond, HorizSecond, 8u16s )
449 IPCV_FILTER_SOBEL( Cross, Cross, 8u16s )
450 
451 IPCV_FILTER_SOBEL( Vert, VertMask, 32f )
452 IPCV_FILTER_SOBEL( Horiz, HorizMask, 32f )
453 IPCV_FILTER_SOBEL( VertSecond, VertSecond, 32f )
454 IPCV_FILTER_SOBEL( HorizSecond, HorizSecond, 32f )
455 IPCV_FILTER_SOBEL( Cross, Cross, 32f )
456 
457 #undef IPCV_FILTER_SOBEL
458 
459 #define IPCV_FILTER_SCHARR( suffix, ipp_suffix, flavor )                            \
460 IPCVAPI_EX( CvStatus, icvFilterScharr##suffix##_##flavor##_C1R,                     \
461     "ippiFilterScharr" #ipp_suffix "_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
462     ( const void* src, int srcstep, void* dst, int dststep, CvSize roi ))
463 
464 IPCV_FILTER_SCHARR( Vert, Vert, 8u16s )
465 IPCV_FILTER_SCHARR( Horiz, Horiz, 8u16s )
466 IPCV_FILTER_SCHARR( Vert, Vert, 32f )
467 IPCV_FILTER_SCHARR( Horiz, Horiz, 32f )
468 
469 #undef IPCV_FILTER_SCHARR
470 
471 /****************************************************************************************\
472 *                                   Generic Filters                                      *
473 \****************************************************************************************/
474 
475 #define IPCV_FILTER( suffix, ipp_suffix, cn, ksizetype, anchortype )                    \
476 IPCVAPI_EX( CvStatus, icvFilter##suffix##_C##cn##R,                                     \
477             "ippiFilter" #ipp_suffix "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPI),         \
478             ( const void* src, int srcstep, void* dst, int dststep, CvSize size,        \
479               const float* kernel, ksizetype ksize, anchortype anchor ))
480 
481 IPCV_FILTER( _8u, 32f_8u, 1, CvSize, CvPoint )
482 IPCV_FILTER( _8u, 32f_8u, 3, CvSize, CvPoint )
483 IPCV_FILTER( _8u, 32f_8u, 4, CvSize, CvPoint )
484 
485 IPCV_FILTER( _16s, 32f_16s, 1, CvSize, CvPoint )
486 IPCV_FILTER( _16s, 32f_16s, 3, CvSize, CvPoint )
487 IPCV_FILTER( _16s, 32f_16s, 4, CvSize, CvPoint )
488 
489 IPCV_FILTER( _32f, _32f, 1, CvSize, CvPoint )
490 IPCV_FILTER( _32f, _32f, 3, CvSize, CvPoint )
491 IPCV_FILTER( _32f, _32f, 4, CvSize, CvPoint )
492 
493 IPCV_FILTER( Column_8u, Column32f_8u, 1, int, int )
494 IPCV_FILTER( Column_8u, Column32f_8u, 3, int, int )
495 IPCV_FILTER( Column_8u, Column32f_8u, 4, int, int )
496 
497 IPCV_FILTER( Column_16s, Column32f_16s, 1, int, int )
498 IPCV_FILTER( Column_16s, Column32f_16s, 3, int, int )
499 IPCV_FILTER( Column_16s, Column32f_16s, 4, int, int )
500 
501 IPCV_FILTER( Column_32f, Column_32f, 1, int, int )
502 IPCV_FILTER( Column_32f, Column_32f, 3, int, int )
503 IPCV_FILTER( Column_32f, Column_32f, 4, int, int )
504 
505 IPCV_FILTER( Row_8u, Row32f_8u, 1, int, int )
506 IPCV_FILTER( Row_8u, Row32f_8u, 3, int, int )
507 IPCV_FILTER( Row_8u, Row32f_8u, 4, int, int )
508 
509 IPCV_FILTER( Row_16s, Row32f_16s, 1, int, int )
510 IPCV_FILTER( Row_16s, Row32f_16s, 3, int, int )
511 IPCV_FILTER( Row_16s, Row32f_16s, 4, int, int )
512 
513 IPCV_FILTER( Row_32f, Row_32f, 1, int, int )
514 IPCV_FILTER( Row_32f, Row_32f, 3, int, int )
515 IPCV_FILTER( Row_32f, Row_32f, 4, int, int )
516 
517 #undef IPCV_FILTER
518 
519 
520 /****************************************************************************************\
521 *                                  Color Transformations                                 *
522 \****************************************************************************************/
523 
524 #define IPCV_COLOR( funcname, ipp_funcname, flavor )                            \
525 IPCVAPI_EX( CvStatus, icv##funcname##_##flavor##_C3R,                           \
526         "ippi" #ipp_funcname "_" #flavor "_C3R,"                                \
527         "ippi" #ipp_funcname "_" #flavor "_C3R",                                \
528         CV_PLUGINS2(CV_PLUGIN_IPPI,CV_PLUGIN_IPPCC),                            \
529         ( const void* src, int srcstep, void* dst, int dststep, CvSize size ))
530 
531 IPCV_COLOR( RGB2XYZ, RGBToXYZ, 8u )
532 IPCV_COLOR( RGB2XYZ, RGBToXYZ, 16u )
533 IPCV_COLOR( RGB2XYZ, RGBToXYZ, 32f )
534 IPCV_COLOR( XYZ2RGB, XYZToRGB, 8u )
535 IPCV_COLOR( XYZ2RGB, XYZToRGB, 16u )
536 IPCV_COLOR( XYZ2RGB, XYZToRGB, 32f )
537 
538 IPCV_COLOR( RGB2HSV, RGBToHSV, 8u )
539 IPCV_COLOR( HSV2RGB, HSVToRGB, 8u )
540 
541 IPCV_COLOR( RGB2HLS, RGBToHLS, 8u )
542 IPCV_COLOR( RGB2HLS, RGBToHLS, 32f )
543 IPCV_COLOR( HLS2RGB, HLSToRGB, 8u )
544 IPCV_COLOR( HLS2RGB, HLSToRGB, 32f )
545 
546 IPCV_COLOR( BGR2Lab, BGRToLab, 8u )
547 IPCV_COLOR( Lab2BGR, LabToBGR, 8u )
548 
549 IPCV_COLOR( RGB2Luv, RGBToLUV, 8u )
550 /*IPCV_COLOR( RGB2Luv, RGBToLUV, 32f )*/
551 IPCV_COLOR( Luv2RGB, LUVToRGB, 8u )
552 /*IPCV_COLOR( Luv2RGB, LUVToRGB, 32f )*/
553 
554 /****************************************************************************************\
555 *                                  Motion Templates                                      *
556 \****************************************************************************************/
557 
558 IPCVAPI_EX( CvStatus, icvUpdateMotionHistory_8u32f_C1IR,
559     "ippiUpdateMotionHistory_8u32f_C1IR", CV_PLUGINS1(CV_PLUGIN_IPPCV),
560     ( const uchar* silIm, int silStep, float* mhiIm, int mhiStep,
561       CvSize size,float  timestamp, float  mhi_duration ))
562 
563 /****************************************************************************************\
564 *                                 Template Matching                                      *
565 \****************************************************************************************/
566 
567 #define ICV_MATCHTEMPLATE( flavor, arrtype )                        \
568 IPCVAPI_EX( CvStatus, icvCrossCorrValid_Norm_##flavor##_C1R,        \
569         "ippiCrossCorrValid_Norm_" #flavor "_C1R",                  \
570         CV_PLUGINS1(CV_PLUGIN_IPPI),                                \
571         ( const arrtype* pSrc, int srcStep, CvSize srcRoiSize,      \
572         const arrtype* pTpl, int tplStep, CvSize tplRoiSize,        \
573         float* pDst, int dstStep ))                                 \
574 IPCVAPI_EX( CvStatus, icvCrossCorrValid_NormLevel_##flavor##_C1R,   \
575         "ippiCrossCorrValid_NormLevel_" #flavor "_C1R",             \
576         CV_PLUGINS1(CV_PLUGIN_IPPI),                                \
577         ( const arrtype* pSrc, int srcStep, CvSize srcRoiSize,      \
578         const arrtype* pTpl, int tplStep, CvSize tplRoiSize,        \
579         float* pDst, int dstStep ))                                 \
580 IPCVAPI_EX( CvStatus, icvSqrDistanceValid_Norm_##flavor##_C1R,      \
581         "ippiSqrDistanceValid_Norm_" #flavor "_C1R",                \
582         CV_PLUGINS1(CV_PLUGIN_IPPI),                                \
583         ( const arrtype* pSrc, int srcStep, CvSize srcRoiSize,      \
584         const arrtype* pTpl, int tplStep, CvSize tplRoiSize,        \
585         float* pDst, int dstStep ))
586 
587 ICV_MATCHTEMPLATE( 8u32f, uchar )
588 ICV_MATCHTEMPLATE( 32f, float )
589 
590 /****************************************************************************************/
591 /*                                Distance Transform                                    */
592 /****************************************************************************************/
593 
594 IPCVAPI_EX(CvStatus, icvDistanceTransform_3x3_8u32f_C1R,
595     "ippiDistanceTransform_3x3_8u32f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
596     ( const uchar* pSrc, int srcStep, float* pDst,
597       int dstStep, CvSize roiSize, const float* pMetrics ))
598 
599 IPCVAPI_EX(CvStatus, icvDistanceTransform_5x5_8u32f_C1R,
600     "ippiDistanceTransform_5x5_8u32f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
601     ( const uchar* pSrc, int srcStep, float* pDst,
602       int dstStep, CvSize roiSize, const float* pMetrics ))
603 
604 IPCVAPI_EX(CvStatus, icvDistanceTransform_3x3_8u_C1IR,
605     "ippiDistanceTransform_3x3_8u_C1IR", CV_PLUGINS1(CV_PLUGIN_IPPCV),
606     ( uchar* pSrc, int srcStep, CvSize roiSize, const int* pMetrics ))
607 
608 IPCVAPI_EX(CvStatus, icvDistanceTransform_3x3_8u_C1R,
609     "ippiDistanceTransform_3x3_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
610     ( const uchar* pSrc, int srcStep, uchar* pDst,
611       int dstStep, CvSize roiSize, const int* pMetrics ))
612 
613 /****************************************************************************************\
614 *                               Thresholding functions                                   *
615 \****************************************************************************************/
616 
617 IPCVAPI_EX( CvStatus, icvCompareC_8u_C1R_cv,
618             "ippiCompareC_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI),
619             ( const uchar* src1, int srcstep1, uchar scalar,
620               uchar* dst, int dststep, CvSize size, int cmp_op ))
621 IPCVAPI_EX( CvStatus, icvAndC_8u_C1R,
622             "ippiAndC_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI),
623             ( const uchar* src1, int srcstep1, uchar scalar,
624               uchar* dst, int dststep, CvSize size ))
625 IPCVAPI_EX( CvStatus, icvThreshold_GTVal_8u_C1R,
626             "ippiThreshold_GTVal_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI),
627             ( const uchar* pSrc, int srcstep, uchar* pDst, int dststep,
628               CvSize size, uchar threshold, uchar value ))
629 IPCVAPI_EX( CvStatus, icvThreshold_GTVal_32f_C1R,
630             "ippiThreshold_GTVal_32f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI),
631             ( const float* pSrc, int srcstep, float* pDst, int dststep,
632               CvSize size, float threshold, float value ))
633 IPCVAPI_EX( CvStatus, icvThreshold_LTVal_8u_C1R,
634             "ippiThreshold_LTVal_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI),
635             ( const uchar* pSrc, int srcstep, uchar* pDst, int dststep,
636               CvSize size, uchar threshold, uchar value ))
637 IPCVAPI_EX( CvStatus, icvThreshold_LTVal_32f_C1R,
638             "ippiThreshold_LTVal_32f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI),
639             ( const float* pSrc, int srcstep, float* pDst, int dststep,
640               CvSize size, float threshold, float value ))
641 
642 /****************************************************************************************\
643 *                                 Canny Edge Detector                                    *
644 \****************************************************************************************/
645 
646 IPCVAPI_EX( CvStatus, icvCannyGetSize, "ippiCannyGetSize", 0/*CV_PLUGINS1(CV_PLUGIN_IPPCV)*/,
647            ( CvSize roiSize, int* bufferSize ))
648 
649 IPCVAPI_EX( CvStatus, icvCanny_16s8u_C1R, "ippiCanny_16s8u_C1R", 0/*CV_PLUGINS1(CV_PLUGIN_IPPCV)*/,
650     ( const short* pSrcDx, int srcDxStep, const short* pSrcDy, int srcDyStep,
651       uchar*  pDstEdges, int dstEdgeStep, CvSize roiSize, float lowThresh,
652       float  highThresh, void* pBuffer ))
653 
654 
655 /****************************************************************************************\
656 *                                 Radial Distortion Removal                              *
657 \****************************************************************************************/
658 
659 IPCVAPI_EX( CvStatus, icvUndistortGetSize, "ippiUndistortGetSize",
660             CV_PLUGINS1(CV_PLUGIN_IPPCV), ( CvSize roiSize, int *pBufsize ))
661 
662 IPCVAPI_EX( CvStatus, icvCreateMapCameraUndistort_32f_C1R,
663             "ippiCreateMapCameraUndistort_32f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
664             (float *pxMap, int xStep, float *pyMap, int yStep, CvSize roiSize,
665             float fx, float fy, float cx, float cy, float k1, float k2,
666             float p1, float p2, uchar *pBuffer ))
667 
668 #define ICV_UNDISTORT_RADIAL( flavor, cn, arrtype )                                 \
669 IPCVAPI_EX( CvStatus, icvUndistortRadial_##flavor##_C##cn##R,                       \
670     "ippiUndistortRadial_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPCV),      \
671     ( const arrtype* pSrc, int srcStep, uchar* pDst, int dstStep, CvSize roiSize,   \
672       float fx, float fy, float cx, float cy, float k1, float k2, uchar *pBuffer ))
673 
674 ICV_UNDISTORT_RADIAL( 8u, 1, uchar )
675 ICV_UNDISTORT_RADIAL( 8u, 3, uchar )
676 
677 #undef ICV_UNDISTORT_RADIAL
678 
679 /****************************************************************************************\
680 *                            Subpixel-accurate rectangle extraction                      *
681 \****************************************************************************************/
682 
683 #define ICV_COPY_SUBPIX( flavor, cn, srctype, dsttype )                     \
684 IPCVAPI_EX( CvStatus, icvCopySubpix_##flavor##_C##cn##R,                    \
685     "ippiCopySubpix_" #flavor "_C" #cn "R", CV_PLUGINS1(CV_PLUGIN_IPPCV),   \
686     ( const srctype* pSrc, int srcStep, dsttype* pDst, int dstStep,         \
687     CvSize size, float dx, float dy ))
688 
689 ICV_COPY_SUBPIX( 8u, 1, uchar, uchar )
690 ICV_COPY_SUBPIX( 8u32f, 1, uchar, float )
691 //ICV_COPY_SUBPIX( 32f, 1, float, float )
692 
693 IPCVAPI_EX( CvStatus, icvCopySubpix_32f_C1R,
694     "ippiCopySubpix_32f_C1R", 0,
695     ( const float* pSrc, int srcStep, float* pDst, int dstStep,
696     CvSize size, float dx, float dy ))
697 
698 #undef ICV_COPY_SUBPIX
699 
700 /****************************************************************************************\
701 *                                Lucas-Kanade Optical Flow                               *
702 \****************************************************************************************/
703 
704 IPCVAPI_EX( CvStatus, icvOpticalFlowPyrLKInitAlloc_8u_C1R,
705             "ippiOpticalFlowPyrLKInitAlloc_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
706             ( void** ppState, CvSize roiSize, int winSize, int hint ))
707 
708 IPCVAPI_EX( CvStatus, icvOpticalFlowPyrLKFree_8u_C1R,
709             "ippiOpticalFlowPyrLKFree_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
710             ( void* pState ))
711 
712 IPCVAPI_EX( CvStatus, icvOpticalFlowPyrLK_8u_C1R,
713             "ippiOpticalFlowPyrLK_8u_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
714             ( CvPyramid *pPyr1, CvPyramid *pPyr2,
715             const float *pPrev, float* pNext, char *pStatus,
716             float *pError, int numFeat, int winSize,
717             int maxLev, int maxIter, float threshold, void* state ))
718 
719 
720 /****************************************************************************************\
721 *                                 Haar Object Detector                                   *
722 \****************************************************************************************/
723 
724 IPCVAPI_EX( CvStatus, icvIntegral_8u32s_C1R,
725             "ippiIntegral_8u32s_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
726             ( const uchar* pSrc, int srcStep, int* pDst, int dstStep,
727               CvSize roiSize, int val ))
728 
729 IPCVAPI_EX( CvStatus, icvSqrIntegral_8u32s64f_C1R,
730             "ippiSqrIntegral_8u32s64f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
731             ( const uchar* pSrc, int srcStep,
732               int* pDst, int dstStep, double* pSqr, int sqrStep,
733               CvSize roiSize, int val, double valSqr ))
734 
735 IPCVAPI_EX( CvStatus, icvRectStdDev_32f_C1R,
736             "ippiRectStdDev_32f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
737             ( const float* pSrc, int srcStep,
738               const double* pSqr, int sqrStep, float* pDst, int dstStep,
739               CvSize roiSize, CvRect rect ))
740 
741 IPCVAPI_EX( CvStatus, icvHaarClassifierInitAlloc_32f,
742             "ippiHaarClassifierInitAlloc_32f", CV_PLUGINS1(CV_PLUGIN_IPPCV),
743             ( void **pState, const CvRect* pFeature, const float* pWeight,
744               const float* pThreshold, const float* pVal1,
745               const float* pVal2, const int* pNum, int length ))
746 
747 IPCVAPI_EX( CvStatus, icvHaarClassifierFree_32f,
748             "ippiHaarClassifierFree_32f", CV_PLUGINS1(CV_PLUGIN_IPPCV),
749             ( void *pState ))
750 
751 IPCVAPI_EX( CvStatus, icvApplyHaarClassifier_32f_C1R,
752             "ippiApplyHaarClassifier_32f_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),
753             ( const float* pSrc, int srcStep, const float* pNorm,
754               int normStep, uchar* pMask, int maskStep,
755               CvSize roi, int *pPositive, float threshold,
756               void *pState ))
757 
758 #endif /*_CV_IPP_H_*/
759 
760