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 //                          License Agreement
11 //                For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 // Copyright (C) 2015, Itseez Inc., all rights reserved.
17 // Third party copyrights are property of their respective owners.
18 //
19 // Redistribution and use in source and binary forms, with or without modification,
20 // are permitted provided that the following conditions are met:
21 //
22 //   * Redistribution's of source code must retain the above copyright notice,
23 //     this list of conditions and the following disclaimer.
24 //
25 //   * Redistribution's in binary form must reproduce the above copyright notice,
26 //     this list of conditions and the following disclaimer in the documentation
27 //     and/or other materials provided with the distribution.
28 //
29 //   * The name of the copyright holders may not be used to endorse or promote products
30 //     derived from this software without specific prior written permission.
31 //
32 // This software is provided by the copyright holders and contributors "as is" and
33 // any express or implied warranties, including, but not limited to, the implied
34 // warranties of merchantability and fitness for a particular purpose are disclaimed.
35 // In no event shall the Intel Corporation or contributors be liable for any direct,
36 // indirect, incidental, special, exemplary, or consequential damages
37 // (including, but not limited to, procurement of substitute goods or services;
38 // loss of use, data, or profits; or business interruption) however caused
39 // and on any theory of liability, whether in contract, strict liability,
40 // or tort (including negligence or otherwise) arising in any way out of
41 // the use of this software, even if advised of the possibility of such damage.
42 //
43 //M*/
44 
45 #ifndef OPENCV_IMGPROC_HAL_REPLACEMENT_HPP
46 #define OPENCV_IMGPROC_HAL_REPLACEMENT_HPP
47 
48 #include "opencv2/core/hal/interface.h"
49 #include "opencv2/imgproc/hal/interface.h"
50 
51 #if defined __GNUC__
52 #  pragma GCC diagnostic push
53 #  pragma GCC diagnostic ignored "-Wunused-parameter"
54 #elif defined _MSC_VER
55 #  pragma warning( push )
56 #  pragma warning( disable: 4100 )
57 #endif
58 
59 //! @addtogroup imgproc_hal_interface
60 //! @note Define your functions to override default implementations:
61 //! @code
62 //! #undef hal_add8u
63 //! #define hal_add8u my_add8u
64 //! @endcode
65 //! @{
66 
67 /**
68 @brief Dummy structure storing filtering context
69 
70 Users can convert this pointer to any type they want. Initialisation and destruction should be made in Init and Free function implementations correspondingly.
71 Example:
72 @code{.cpp}
73 int my_hal_filterInit(cvhalFilter2D **context, ...) {
74     context = static_cast<cvhalFilter2D*>(new MyFilterData());
75     //... init
76 }
77 
78 int my_hal_filterFree(cvhalFilter2D *context) {
79     MyFilterData *c = static_cast<MyFilterData*>(context);
80     delete c;
81 }
82 @endcode
83  */
84 struct cvhalFilter2D {};
85 
86 /**
87    @brief hal_filterInit
88    @param context double pointer to user-defined context
89    @param kernel_data pointer to kernel data
90    @param kernel_step kernel step
91    @param kernel_type kernel type (CV_8U, ...)
92    @param kernel_width kernel width
93    @param kernel_height kernel height
94    @param max_width max possible image width, can be used to allocate working buffers
95    @param max_height max possible image height
96    @param src_type source image type
97    @param dst_type destination image type
98    @param borderType border processing mode (CV_HAL_BORDER_REFLECT, ...)
99    @param delta added to pixel values
100    @param anchor_x relative X position of center point within the kernel
101    @param anchor_y relative Y position of center point within the kernel
102    @param allowSubmatrix indicates whether the submatrices will be allowed as source image
103    @param allowInplace indicates whether the inplace operation will be possible
104    @sa cv::filter2D, cv::hal::Filter2D
105  */
hal_ni_filterInit(cvhalFilter2D ** context,uchar * kernel_data,size_t kernel_step,int kernel_type,int kernel_width,int kernel_height,int max_width,int max_height,int src_type,int dst_type,int borderType,double delta,int anchor_x,int anchor_y,bool allowSubmatrix,bool allowInplace)106 inline int hal_ni_filterInit(cvhalFilter2D **context, uchar *kernel_data, size_t kernel_step, int kernel_type, int kernel_width, int kernel_height, int max_width, int max_height, int src_type, int dst_type, int borderType, double delta, int anchor_x, int anchor_y, bool allowSubmatrix, bool allowInplace) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
107 /**
108    @brief hal_filter
109    @param context pointer to user-defined context
110    @param src_data source image data
111    @param src_step source image step
112    @param dst_data destination image data
113    @param dst_step destination image step
114    @param width images width
115    @param height images height
116    @param full_width full width of source image (outside the ROI)
117    @param full_height full height of source image (outside the ROI)
118    @param offset_x source image ROI offset X
119    @param offset_y source image ROI offset Y
120    @sa cv::filter2D, cv::hal::Filter2D
121  */
hal_ni_filter(cvhalFilter2D * context,uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int full_width,int full_height,int offset_x,int offset_y)122 inline int hal_ni_filter(cvhalFilter2D *context, uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step, int width, int height, int full_width, int full_height, int offset_x, int offset_y) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
123 /**
124    @brief hal_filterFree
125    @param context pointer to user-defined context
126    @sa cv::filter2D, cv::hal::Filter2D
127  */
hal_ni_filterFree(cvhalFilter2D * context)128 inline int hal_ni_filterFree(cvhalFilter2D *context) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
129 
130 //! @cond IGNORED
131 #define cv_hal_filterInit hal_ni_filterInit
132 #define cv_hal_filter hal_ni_filter
133 #define cv_hal_filterFree hal_ni_filterFree
134 //! @endcond
135 
136 /**
137    @brief hal_sepFilterInit
138    @param context double pointer to user-defined context
139    @param src_type source image type
140    @param dst_type destination image type
141    @param kernel_type kernels type
142    @param kernelx_data pointer to x-kernel data
143    @param kernelx_length x-kernel vector length
144    @param kernely_data pointer to y-kernel data
145    @param kernely_length y-kernel vector length
146    @param anchor_x relative X position of center point within the kernel
147    @param anchor_y relative Y position of center point within the kernel
148    @param delta added to pixel values
149    @param borderType border processing mode (CV_HAL_BORDER_REFLECT, ...)
150    @sa cv::sepFilter2D, cv::hal::SepFilter2D
151  */
hal_ni_sepFilterInit(cvhalFilter2D ** context,int src_type,int dst_type,int kernel_type,uchar * kernelx_data,int kernelx_length,uchar * kernely_data,int kernely_length,int anchor_x,int anchor_y,double delta,int borderType)152 inline int hal_ni_sepFilterInit(cvhalFilter2D **context, int src_type, int dst_type, int kernel_type, uchar *kernelx_data, int kernelx_length, uchar *kernely_data, int kernely_length, int anchor_x, int anchor_y, double delta, int borderType) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
153 /**
154    @brief hal_sepFilter
155    @param context pointer to user-defined context
156    @param src_data source image data
157    @param src_step source image step
158    @param dst_data destination image data
159    @param dst_step destination image step
160    @param width images width
161    @param height images height
162    @param full_width full width of source image (outside the ROI)
163    @param full_height full height of source image (outside the ROI)
164    @param offset_x source image ROI offset X
165    @param offset_y source image ROI offset Y
166    @sa cv::sepFilter2D, cv::hal::SepFilter2D
167  */
hal_ni_sepFilter(cvhalFilter2D * context,uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int full_width,int full_height,int offset_x,int offset_y)168 inline int hal_ni_sepFilter(cvhalFilter2D *context, uchar *src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int full_width, int full_height, int offset_x, int offset_y) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
169 /**
170    @brief hal_sepFilterFree
171    @param context pointer to user-defined context
172    @sa cv::sepFilter2D, cv::hal::SepFilter2D
173  */
hal_ni_sepFilterFree(cvhalFilter2D * context)174 inline int hal_ni_sepFilterFree(cvhalFilter2D *context) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
175 
176 //! @cond IGNORED
177 #define cv_hal_sepFilterInit hal_ni_sepFilterInit
178 #define cv_hal_sepFilter hal_ni_sepFilter
179 #define cv_hal_sepFilterFree hal_ni_sepFilterFree
180 //! @endcond
181 
182 /**
183    @brief hal_morphInit
184    @param context double pointer to user-defined context
185    @param operation morphology operation CV_HAL_MORPH_ERODE or CV_HAL_MORPH_DILATE
186    @param src_type source image type
187    @param dst_type destination image type
188    @param max_width max possible image width, can be used to allocate working buffers
189    @param max_height max possible image height
190    @param kernel_type kernel type (CV_8U, ...)
191    @param kernel_data pointer to kernel data
192    @param kernel_step kernel step
193    @param kernel_width kernel width
194    @param kernel_height kernel height
195    @param anchor_x relative X position of center point within the kernel
196    @param anchor_y relative Y position of center point within the kernel
197    @param borderType border processing mode (CV_HAL_BORDER_REFLECT, ...)
198    @param borderValue values to use for CV_HAL_BORDER_CONSTANT mode
199    @param iterations number of iterations
200    @param allowSubmatrix indicates whether the submatrices will be allowed as source image
201    @param allowInplace indicates whether the inplace operation will be possible
202    @sa cv::erode, cv::dilate, cv::morphologyEx, cv::hal::Morph
203  */
hal_ni_morphInit(cvhalFilter2D ** context,int operation,int src_type,int dst_type,int max_width,int max_height,int kernel_type,uchar * kernel_data,size_t kernel_step,int kernel_width,int kernel_height,int anchor_x,int anchor_y,int borderType,const double borderValue[4],int iterations,bool allowSubmatrix,bool allowInplace)204 inline int hal_ni_morphInit(cvhalFilter2D **context, int operation, int src_type, int dst_type, int max_width, int max_height, int kernel_type, uchar *kernel_data, size_t kernel_step, int kernel_width, int kernel_height, int anchor_x, int anchor_y, int borderType, const double borderValue[4], int iterations, bool allowSubmatrix, bool allowInplace) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
205 /**
206    @brief hal_morph
207    @param context pointer to user-defined context
208    @param src_data source image data
209    @param src_step source image step
210    @param dst_data destination image data
211    @param dst_step destination image step
212    @param width images width
213    @param height images height
214    @param src_full_width full width of source image (outside the ROI)
215    @param src_full_height full height of source image (outside the ROI)
216    @param src_roi_x source image ROI X offset
217    @param src_roi_y source image ROI Y offset
218    @param dst_full_width full width of destination image
219    @param dst_full_height full height of destination image
220    @param dst_roi_x destination image ROI X offset
221    @param dst_roi_y destination image ROI Y offset
222    @sa cv::erode, cv::dilate, cv::morphologyEx, cv::hal::Morph
223  */
hal_ni_morph(cvhalFilter2D * context,uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int src_full_width,int src_full_height,int src_roi_x,int src_roi_y,int dst_full_width,int dst_full_height,int dst_roi_x,int dst_roi_y)224 inline int hal_ni_morph(cvhalFilter2D *context, uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step, int width, int height, int src_full_width, int src_full_height, int src_roi_x, int src_roi_y, int dst_full_width, int dst_full_height, int dst_roi_x, int dst_roi_y) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
225 /**
226    @brief hal_morphFree
227    @param context pointer to user-defined context
228    @sa cv::erode, cv::dilate, cv::morphologyEx, cv::hal::Morph
229  */
hal_ni_morphFree(cvhalFilter2D * context)230 inline int hal_ni_morphFree(cvhalFilter2D *context) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
231 
232 //! @cond IGNORED
233 #define cv_hal_morphInit hal_ni_morphInit
234 #define cv_hal_morph hal_ni_morph
235 #define cv_hal_morphFree hal_ni_morphFree
236 //! @endcond
237 
238 /**
239    @brief hal_resize
240    @param src_type source and destination image type
241    @param src_data source image data
242    @param src_step source image step
243    @param src_width source image width
244    @param src_height source image height
245    @param dst_data destination image data
246    @param dst_step destination image step
247    @param dst_width destination image width
248    @param dst_height destination image height
249    @param inv_scale_x inversed scale X coefficient
250    @param inv_scale_y inversed scale Y coefficient
251    @param interpolation interpolation mode (CV_HAL_INTER_NEAREST, ...)
252    @sa cv::resize, cv::hal::resize
253  */
hal_ni_resize(int src_type,const uchar * src_data,size_t src_step,int src_width,int src_height,uchar * dst_data,size_t dst_step,int dst_width,int dst_height,double inv_scale_x,double inv_scale_y,int interpolation)254 inline int hal_ni_resize(int src_type, const uchar *src_data, size_t src_step, int src_width, int src_height, uchar *dst_data, size_t dst_step, int dst_width, int dst_height, double inv_scale_x, double inv_scale_y, int interpolation) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
255 /**
256    @brief hal_warpAffine
257    @param src_type source and destination image type
258    @param src_data source image data
259    @param src_step source image step
260    @param src_width source image width
261    @param src_height source image height
262    @param dst_data destination image data
263    @param dst_step destination image step
264    @param dst_width destination image width
265    @param dst_height destination image height
266    @param M 2x3 matrix with transform coefficients
267    @param interpolation interpolation mode (CV_HAL_INTER_NEAREST, ...)
268    @param borderType border processing mode (CV_HAL_BORDER_REFLECT, ...)
269    @param borderValue values to use for CV_HAL_BORDER_CONSTANT mode
270    @sa cv::warpAffine, cv::hal::warpAffine
271  */
hal_ni_warpAffine(int src_type,const uchar * src_data,size_t src_step,int src_width,int src_height,uchar * dst_data,size_t dst_step,int dst_width,int dst_height,const double M[6],int interpolation,int borderType,const double borderValue[4])272 inline int hal_ni_warpAffine(int src_type, const uchar *src_data, size_t src_step, int src_width, int src_height, uchar *dst_data, size_t dst_step, int dst_width, int dst_height, const double M[6], int interpolation, int borderType, const double borderValue[4]) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
273 /**
274    @brief hal_warpPerspective
275    @param src_type source and destination image type
276    @param src_data source image data
277    @param src_step source image step
278    @param src_width source image width
279    @param src_height source image height
280    @param dst_data destination image data
281    @param dst_step destination image step
282    @param dst_width destination image width
283    @param dst_height destination image height
284    @param M 3x3 matrix with transform coefficients
285    @param interpolation interpolation mode (CV_HAL_INTER_NEAREST, ...)
286    @param borderType border processing mode (CV_HAL_BORDER_REFLECT, ...)
287    @param borderValue values to use for CV_HAL_BORDER_CONSTANT mode
288    @sa cv::warpPerspective, cv::hal::warpPerspective
289  */
hal_ni_warpPerspective(int src_type,const uchar * src_data,size_t src_step,int src_width,int src_height,uchar * dst_data,size_t dst_step,int dst_width,int dst_height,const double M[9],int interpolation,int borderType,const double borderValue[4])290 inline int hal_ni_warpPerspective(int src_type, const uchar *src_data, size_t src_step, int src_width, int src_height, uchar *dst_data, size_t dst_step, int dst_width, int dst_height, const double M[9], int interpolation, int borderType, const double borderValue[4]) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
291 
292 //! @cond IGNORED
293 #define cv_hal_resize hal_ni_resize
294 #define cv_hal_warpAffine hal_ni_warpAffine
295 #define cv_hal_warpPerspective hal_ni_warpPerspective
296 //! @endcond
297 
298 /**
299    @brief hal_cvtBGRtoBGR
300    @param src_data,src_step source image data and step
301    @param dst_data,dst_step destination image data and step
302    @param width,height image size
303    @param depth image depth (one of CV_8U, CV_16U, CV_32F)
304    @param scn source image channels (3 or 4)
305    @param dcn destination image channels (3 or 4)
306    @param swapBlue if set to true B and R channels will be swapped (BGR->RGB or RGB->BGR)
307    Convert between BGR, BGRA, RGB and RGBA image formats.
308  */
hal_ni_cvtBGRtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int scn,int dcn,bool swapBlue)309 inline int hal_ni_cvtBGRtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, int dcn, bool swapBlue) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
310 
311 /**
312    @brief hal_cvtBGRtoBGR5x5
313    @param src_data,src_step source image data and step
314    @param dst_data,dst_step destination image data and step
315    @param width,height image size
316    @param scn source image channels (3 or 4)
317    @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
318    @param greenBits number of bits for green channel (5 or 6)
319    Convert from BGR, BGRA, RGB and RGBA to packed BGR or RGB (16 bits per pixel, 555 or 565).
320    Support only CV_8U images (input 3 or 4 channels, output 2 channels).
321  */
hal_ni_cvtBGRtoBGR5x5(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int scn,bool swapBlue,int greenBits)322 inline int hal_ni_cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int scn, bool swapBlue, int greenBits) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
323 
324 /**
325    @brief hal_cvtBGR5x5toBGR
326    @param src_data,src_step source image data and step
327    @param dst_data,dst_step destination image data and step
328    @param width,height image size
329    @param dcn destination image channels (3 or 4)
330    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
331    @param greenBits number of bits for green channel (5 or 6)
332    Convert from packed BGR or RGB (16 bits per pixel, 555 or 565) to BGR, BGRA, RGB and RGBA.
333    Support only CV_8U images (input 2 channels, output 3 or 4 channels).
334  */
hal_ni_cvtBGR5x5toBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int dcn,bool swapBlue,int greenBits)335 inline int hal_ni_cvtBGR5x5toBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int dcn, bool swapBlue, int greenBits) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
336 
337 /**
338    @brief hal_cvtBGRtoGray
339    @param src_data,src_step source image data and step
340    @param dst_data,dst_step destination image data and step
341    @param width,height image size
342    @param depth image depth (one of CV_8U, CV_16U or CV_32F)
343    @param scn source image channels (3 or 4)
344    @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
345    Convert from BGR, BGRA, RGB or RGBA to 1-channel gray.
346  */
hal_ni_cvtBGRtoGray(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int scn,bool swapBlue)347 inline int hal_ni_cvtBGRtoGray(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
348 
349 /**
350    @brief hal_cvtGraytoBGR
351    @param src_data,src_step source image data and step
352    @param dst_data,dst_step destination image data and step
353    @param width,height image size
354    @param depth image depth (one of CV_8U, CV_16U or CV_32F)
355    @param dcn destination image channels (3 or 4)
356    Convert from 1-channel gray to BGR, RGB, RGBA or BGRA.
357  */
hal_ni_cvtGraytoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int dcn)358 inline int hal_ni_cvtGraytoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int dcn) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
359 
360 /**
361    @brief hal_cvtBGR5x5toGray
362    @param src_data,src_step source image data and step
363    @param dst_data,dst_step destination image data and step
364    @param width,height image size
365    @param greenBits number of bits for green channel (5 or 6)
366    Convert from packed BGR (16 bits per pixel, 555 or 565) to 1-channel gray.
367    Support only CV_8U images.
368  */
hal_ni_cvtBGR5x5toGray(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int greenBits)369 inline int hal_ni_cvtBGR5x5toGray(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int greenBits) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
370 
371 /**
372    @brief hal_cvtGraytoBGR5x5
373    @param src_data,src_step source image data and step
374    @param dst_data,dst_step destination image data and step
375    @param width,height image size
376    @param greenBits number of bits for green channel (5 or 6)
377    Convert from 1-channel gray to packed BGR (16 bits per pixel, 555 or 565).
378    Support only CV_8U images.
379  */
hal_ni_cvtGraytoBGR5x5(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int greenBits)380 inline int hal_ni_cvtGraytoBGR5x5(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int greenBits) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
381 
382 /**
383    @brief hal_cvtBGRtoYUV
384    @param src_data,src_step source image data and step
385    @param dst_data,dst_step destination image data and step
386    @param width,height image size
387    @param depth image depth (one of CV_8U, CV_16U or CV_32F)
388    @param scn source image channels (3 or 4)
389    @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
390    @param isCbCr if set to true write output in YCbCr format
391    Convert from BGR, RGB, BGRA or RGBA to YUV or YCbCr.
392  */
hal_ni_cvtBGRtoYUV(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int scn,bool swapBlue,bool isCbCr)393 inline int hal_ni_cvtBGRtoYUV(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue, bool isCbCr) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
394 
395 /**
396    @brief hal_cvtYUVtoBGR
397    @param src_data,src_step source image data and step
398    @param dst_data,dst_step destination image data and step
399    @param width,height image size
400    @param depth image depth (one of CV_8U, CV_16U or CV_32F)
401    @param dcn destination image channels (3 or 4)
402    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
403    @param isCbCr if set to true treat source as YCbCr
404    Convert from YUV or YCbCr to BGR, RGB, BGRA or RGBA.
405  */
hal_ni_cvtYUVtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int dcn,bool swapBlue,bool isCbCr)406 inline int hal_ni_cvtYUVtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int dcn, bool swapBlue, bool isCbCr) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
407 
408 /**
409    @brief hal_cvtBGRtoXYZ
410    @param src_data,src_step source image data and step
411    @param dst_data,dst_step destination image data and step
412    @param width,height image size
413    @param depth image depth (one of CV_8U, CV_16U or CV_32F)
414    @param scn source image channels (3 or 4)
415    @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
416    Convert from BGR, RGB, BGRA or RGBA to XYZ.
417  */
hal_ni_cvtBGRtoXYZ(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int scn,bool swapBlue)418 inline int hal_ni_cvtBGRtoXYZ(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
419 
420 /**
421    @brief hal_cvtXYZtoBGR
422    @param src_data,src_step source image data and step
423    @param dst_data,dst_step destination image data and step
424    @param width,height image size
425    @param depth image depth (one of CV_8U, CV_16U or CV_32F)
426    @param dcn destination image channels (3 or 4)
427    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
428    Convert from XYZ to BGR, RGB, BGRA or RGBA.
429  */
hal_ni_cvtXYZtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int dcn,bool swapBlue)430 inline int hal_ni_cvtXYZtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int dcn, bool swapBlue) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
431 
432 /**
433    @brief hal_cvtBGRtoHSV
434    @param src_data,src_step source image data and step
435    @param dst_data,dst_step destination image data and step
436    @param width,height image size
437    @param depth image depth (one of CV_8U or CV_32F)
438    @param scn source image channels (3 or 4)
439    @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
440    @param isFullRange if set to true write hue in range 0-255 (0-360 for float) otherwise in range 0-180
441    @param isHSV if set to true write HSV otherwise HSL
442    Convert from BGR, RGB, BGRA or RGBA to HSV or HSL.
443  */
hal_ni_cvtBGRtoHSV(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int scn,bool swapBlue,bool isFullRange,bool isHSV)444 inline int hal_ni_cvtBGRtoHSV(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue, bool isFullRange, bool isHSV) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
445 
446 /**
447    @brief hal_cvtHSVtoBGR
448    @param src_data,src_step source image data and step
449    @param dst_data,dst_step destination image data and step
450    @param width,height image size
451    @param depth image depth (one of CV_8U or CV_32F)
452    @param dcn destination image channels (3 or 4)
453    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
454    @param isFullRange if set to true read hue in range 0-255 (0-360 for float) otherwise in range 0-180
455    @param isHSV if set to true treat source as HSV otherwise HSL
456    Convert from HSV or HSL to BGR, RGB, BGRA or RGBA.
457  */
hal_ni_cvtHSVtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int dcn,bool swapBlue,bool isFullRange,bool isHSV)458 inline int hal_ni_cvtHSVtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int dcn, bool swapBlue, bool isFullRange, bool isHSV) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
459 
460 /**
461    @brief hal_cvtBGRtoLab
462    @param src_data,src_step source image data and step
463    @param dst_data,dst_step destination image data and step
464    @param width,height image size
465    @param depth image depth (one of CV_8U or CV_32F)
466    @param scn source image channels (3 or 4)
467    @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
468    @param isLab if set to true write Lab otherwise Luv
469    @param srgb if set to true use sRGB gamma correction
470    Convert from BGR, RGB, BGRA or RGBA to Lab or Luv.
471  */
hal_ni_cvtBGRtoLab(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int scn,bool swapBlue,bool isLab,bool srgb)472 inline int hal_ni_cvtBGRtoLab(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int scn, bool swapBlue, bool isLab, bool srgb) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
473 
474 /**
475    @brief hal_cvtLabtoBGR
476    @param src_data,src_step source image data and step
477    @param dst_data,dst_step destination image data and step
478    @param width,height image size
479    @param depth image depth (one of CV_8U or CV_32F)
480    @param dcn destination image channels (3 or 4)
481    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
482    @param isLab if set to true treat input as Lab otherwise Luv
483    @param srgb if set to true use sRGB gamma correction
484    Convert from Lab or Luv to BGR, RGB, BGRA or RGBA.
485  */
hal_ni_cvtLabtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int dcn,bool swapBlue,bool isLab,bool srgb)486 inline int hal_ni_cvtLabtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int depth, int dcn, bool swapBlue, bool isLab, bool srgb) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
487 
488 /**
489    @brief hal_cvtTwoPlaneYUVtoBGR
490    @param src_data,src_step source image data and step
491    @param dst_data,dst_step destination image data and step
492    @param dst_width,dst_height destination image size
493    @param dcn destination image channels (3 or 4)
494    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
495    @param uIdx U-channel index in the interleaved U/V plane (0 or 1)
496    Convert from YUV (YUV420sp (or NV12/NV21) - Y plane followed by interleaved U/V plane) to BGR, RGB, BGRA or RGBA.
497    Only for CV_8U.
498  */
hal_ni_cvtTwoPlaneYUVtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int dst_width,int dst_height,int dcn,bool swapBlue,int uIdx)499 inline int hal_ni_cvtTwoPlaneYUVtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int dst_width, int dst_height, int dcn, bool swapBlue, int uIdx) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
500 
501 /**
502    @brief hal_cvtThreePlaneYUVtoBGR
503    @param src_data,src_step source image data and step
504    @param dst_data,dst_step destination image data and step
505    @param dst_width,dst_height destination image size
506    @param dcn destination image channels (3 or 4)
507    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
508    @param uIdx U-channel plane index (0 or 1)
509    Convert from YUV (YUV420p (or YV12/YV21) - Y plane followed by U and V planes) to BGR, RGB, BGRA or RGBA.
510    Only for CV_8U.
511  */
hal_ni_cvtThreePlaneYUVtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int dst_width,int dst_height,int dcn,bool swapBlue,int uIdx)512 inline int hal_ni_cvtThreePlaneYUVtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int dst_width, int dst_height, int dcn, bool swapBlue, int uIdx) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
513 
514 /**
515    @brief hal_cvtBGRtoThreePlaneYUV
516    @param src_data,src_step source image data and step
517    @param dst_data,dst_step destination image data and step
518    @param width,height image size
519    @param scn source image channels (3 or 4)
520    @param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
521    @param uIdx U-channel plane index (0 or 1)
522    Convert from BGR, RGB, BGRA or RGBA to YUV (YUV420p (or YV12/YV21) - Y plane followed by U and V planes).
523    Only for CV_8U.
524  */
hal_ni_cvtBGRtoThreePlaneYUV(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int scn,bool swapBlue,int uIdx)525 inline int hal_ni_cvtBGRtoThreePlaneYUV(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int scn, bool swapBlue, int uIdx) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
526 
527 /**
528    @brief hal_cvtOnePlaneYUVtoBGR
529    @param src_data,src_step source image data and step
530    @param dst_data,dst_step destination image data and step
531    @param width,height image size
532    @param dcn destination image channels (3 or 4)
533    @param swapBlue if set to true B and R destination channels will be swapped (write RGB)
534    @param uIdx U-channel index (0 or 1)
535    @param ycn Y-channel index (0 or 1)
536    Convert from UYVY, YUY2 or YVYU to BGR, RGB, BGRA or RGBA.
537    Only for CV_8U.
538  */
hal_ni_cvtOnePlaneYUVtoBGR(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int dcn,bool swapBlue,int uIdx,int ycn)539 inline int hal_ni_cvtOnePlaneYUVtoBGR(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height, int dcn, bool swapBlue, int uIdx, int ycn) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
540 
541 
542 /**
543    @brief hal_cvtRGBAtoMultipliedRGBA
544    @param src_data,src_step source image data and step
545    @param dst_data,dst_step destination image data and step
546    @param width,height image size
547    Convert from BGRA or RGBA to format with multiplied alpha channel.
548    Only for CV_8U.
549  */
hal_ni_cvtRGBAtoMultipliedRGBA(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height)550 inline int hal_ni_cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
551 
552 /**
553    @brief hal_cvtMultipliedRGBAtoRGBA
554    @param src_data,src_step source image data and step
555    @param dst_data,dst_step destination image data and step
556    @param width,height image size
557    Convert from format with multiplied alpha channel to BGRA or RGBA.
558    Only for CV_8U.
559  */
hal_ni_cvtMultipliedRGBAtoRGBA(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height)560 inline int hal_ni_cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
561 
562 //! @cond IGNORED
563 #define cv_hal_cvtBGRtoBGR hal_ni_cvtBGRtoBGR
564 #define cv_hal_cvtBGRtoBGR5x5 hal_ni_cvtBGRtoBGR5x5
565 #define cv_hal_cvtBGR5x5toBGR hal_ni_cvtBGR5x5toBGR
566 #define cv_hal_cvtBGRtoGray hal_ni_cvtBGRtoGray
567 #define cv_hal_cvtGraytoBGR hal_ni_cvtGraytoBGR
568 #define cv_hal_cvtBGR5x5toGray hal_ni_cvtBGR5x5toGray
569 #define cv_hal_cvtGraytoBGR5x5 hal_ni_cvtGraytoBGR5x5
570 #define cv_hal_cvtBGRtoYUV hal_ni_cvtBGRtoYUV
571 #define cv_hal_cvtYUVtoBGR hal_ni_cvtYUVtoBGR
572 #define cv_hal_cvtBGRtoXYZ hal_ni_cvtBGRtoXYZ
573 #define cv_hal_cvtXYZtoBGR hal_ni_cvtXYZtoBGR
574 #define cv_hal_cvtBGRtoHSV hal_ni_cvtBGRtoHSV
575 #define cv_hal_cvtHSVtoBGR hal_ni_cvtHSVtoBGR
576 #define cv_hal_cvtBGRtoLab hal_ni_cvtBGRtoLab
577 #define cv_hal_cvtLabtoBGR hal_ni_cvtLabtoBGR
578 #define cv_hal_cvtTwoPlaneYUVtoBGR hal_ni_cvtTwoPlaneYUVtoBGR
579 #define cv_hal_cvtThreePlaneYUVtoBGR hal_ni_cvtThreePlaneYUVtoBGR
580 #define cv_hal_cvtBGRtoThreePlaneYUV hal_ni_cvtBGRtoThreePlaneYUV
581 #define cv_hal_cvtOnePlaneYUVtoBGR hal_ni_cvtOnePlaneYUVtoBGR
582 #define cv_hal_cvtRGBAtoMultipliedRGBA hal_ni_cvtRGBAtoMultipliedRGBA
583 #define cv_hal_cvtMultipliedRGBAtoRGBA hal_ni_cvtMultipliedRGBAtoRGBA
584 //! @endcond
585 
586 /**
587    @brief Calculate integral image
588    @param depth,sdepth,sqdepth Depths of source image, sum image and square sum image
589    @param src_data,src_step Source image
590    @param sum_data,sum_step Sum image
591    @param sqsum_data,sqsum_step Square sum image
592    @param tilted_data,tilted_step Tilted sum image
593    @param width,height Source image dimensions
594    @param cn Number of channels
595    @note Following combinations of image depths are used:
596    Source | Sum | Square sum
597    -------|-----|-----------
598    CV_8U | CV_32S | CV_64F
599    CV_8U | CV_32S | CV_32F
600    CV_8U | CV_32S | CV_32S
601    CV_8U | CV_32F | CV_64F
602    CV_8U | CV_32F | CV_32F
603    CV_8U | CV_64F | CV_64F
604    CV_16U | CV_64F | CV_64F
605    CV_16S | CV_64F | CV_64F
606    CV_32F | CV_32F | CV_64F
607    CV_32F | CV_32F | CV_32F
608    CV_32F | CV_64F | CV_64F
609    CV_64F | CV_64F | CV_64F
610    @sa cv::integral
611 */
hal_ni_integral(int depth,int sdepth,int sqdepth,const uchar * src_data,size_t src_step,uchar * sum_data,size_t sum_step,uchar * sqsum_data,size_t sqsum_step,uchar * tilted_data,size_t tilted_step,int width,int height,int cn)612 inline int hal_ni_integral(int depth, int sdepth, int sqdepth, const uchar * src_data, size_t src_step, uchar * sum_data, size_t sum_step, uchar * sqsum_data, size_t sqsum_step, uchar * tilted_data, size_t tilted_step, int width, int height, int cn) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
613 
614 //! @cond IGNORED
615 #define cv_hal_integral hal_ni_integral
616 //! @endcond
617 
618 /**
619    @brief Calculate medianBlur filter
620    @param src_data,src_step Source image
621    @param dst_data,dst_step Destination image
622    @param width,height Source image dimensions
623    @param depth Depths of source and destination image
624    @param cn Number of channels
625    @param ksize Size of kernel
626 */
hal_ni_medianBlur(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int cn,int ksize)627 inline int hal_ni_medianBlur(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int depth, int cn, int ksize) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
628 
629 //! @cond IGNORED
630 #define cv_hal_medianBlur hal_ni_medianBlur
631 //! @endcond
632 
633 /**
634    @brief Calculates adaptive threshold
635    @param src_data,src_step Source image
636    @param dst_data,dst_step Destination image
637    @param width,height Source image dimensions
638    @param maxValue Value assigned to the pixels for which the condition is satisfied
639    @param adaptiveMethod Adaptive thresholding algorithm
640    @param thresholdType Thresholding type
641    @param blockSize Size of a pixel neighborhood that is used to calculate a threshold value
642    @param C Constant subtracted from the mean or weighted mean
643 */
hal_ni_adaptiveThreshold(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,double maxValue,int adaptiveMethod,int thresholdType,int blockSize,double C)644 inline int hal_ni_adaptiveThreshold(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
645 
646 //! @cond IGNORED
647 #define cv_hal_adaptiveThreshold  hal_ni_adaptiveThreshold
648 //! @endcond
649 
650 /**
651    @brief Calculates fixed-level threshold to each array element
652    @param src_data,src_step Source image
653    @param dst_data,dst_step Destination image
654    @param width,height Source image dimensions
655    @param depth Depths of source and destination image
656    @param cn Number of channels
657    @param thresh Threshold value
658    @param maxValue Value assigned to the pixels for which the condition is satisfied
659    @param thresholdType Thresholding type
660 */
hal_ni_threshold(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int cn,double thresh,double maxValue,int thresholdType)661 inline int hal_ni_threshold(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int depth, int cn, double thresh, double maxValue, int thresholdType) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
662 
663 //! @cond IGNORED
664 #define cv_hal_threshold hal_ni_threshold
665 //! @endcond
666 
667 /**
668    @brief Calculate box filter
669    @param src_data,src_step Source image
670    @param dst_data,dst_step Destination image
671    @param width,height Source image dimensions
672    @param src_depth,dst_depth Depths of source and destination image
673    @param cn Number of channels
674    @param margin_left,margin_top,margin_right,margin_bottom Margins for source image
675    @param ksize_width,ksize_height Size of kernel
676    @param anchor_x,anchor_y Anchor point
677    @param normalize If true then result is normalized
678    @param border_type Border type
679 */
hal_ni_boxFilter(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int src_depth,int dst_depth,int cn,int margin_left,int margin_top,int margin_right,int margin_bottom,size_t ksize_width,size_t ksize_height,int anchor_x,int anchor_y,bool normalize,int border_type)680 inline int hal_ni_boxFilter(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int src_depth, int dst_depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, size_t ksize_width, size_t ksize_height, int anchor_x, int anchor_y, bool normalize, int border_type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
681 
682 //! @cond IGNORED
683 #define cv_hal_boxFilter hal_ni_boxFilter
684 //! @endcond
685 
686 /**
687    @brief Blurs an image using a Gaussian filter.
688    @param src_data,src_step Source image
689    @param dst_data,dst_step Destination image
690    @param width,height Source image dimensions
691    @param depth Depth of source and destination image
692    @param cn Number of channels
693    @param margin_left,margin_top,margin_right,margin_bottom Margins for source image
694    @param ksize_width,ksize_height Size of kernel
695    @param sigmaX,sigmaY Gaussian kernel standard deviation.
696    @param border_type Border type
697 */
hal_ni_gaussianBlur(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int depth,int cn,size_t margin_left,size_t margin_top,size_t margin_right,size_t margin_bottom,size_t ksize_width,size_t ksize_height,double sigmaX,double sigmaY,int border_type)698 inline int hal_ni_gaussianBlur(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int depth, int cn, size_t margin_left, size_t margin_top, size_t margin_right, size_t margin_bottom, size_t ksize_width, size_t ksize_height, double sigmaX, double sigmaY, int border_type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
699 
700 //! @cond IGNORED
701 #define cv_hal_gaussianBlur hal_ni_gaussianBlur
702 //! @endcond
703 
704 /**
705    @brief Computes Sobel derivatives
706    @param src_depth,dst_depth Depths of source and destination image
707    @param src_data,src_step Source image
708    @param dst_data,dst_step Destination image
709    @param width,height Source image dimensions
710    @param cn Number of channels
711    @param margin_left,margin_top,margin_right,margin_bottom Margins for source image
712    @param dx,dy orders of the derivative x and y respectively
713    @param ksize Size of kernel
714    @param scale Scale factor for the computed derivative values
715    @param delta Delta value that is added to the results prior to storing them in dst
716    @param border_type Border type
717 */
hal_ni_sobel(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int src_depth,int dst_depth,int cn,int margin_left,int margin_top,int margin_right,int margin_bottom,int dx,int dy,int ksize,double scale,double delta,int border_type)718 inline int hal_ni_sobel(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int src_depth, int dst_depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int dx, int dy, int ksize, double scale, double delta, int border_type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
719 
720 //! @cond IGNORED
721 #define cv_hal_sobel hal_ni_sobel
722 //! @endcond
723 
724 /**
725    @brief Computes Scharr filter
726    @param src_depth,dst_depth Depths of source and destination image
727    @param src_data,src_step Source image
728    @param dst_data,dst_step Destination image
729    @param width,height Source image dimensions
730    @param cn Number of channels
731    @param margin_left,margin_top,margin_right,margin_bottom Margins for source image
732    @param dx,dy orders of the derivative x and y respectively
733    @param scale Scale factor for the computed derivative values
734    @param delta Delta value that is added to the results prior to storing them in dst
735    @param border_type Border type
736 */
hal_ni_scharr(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int src_depth,int dst_depth,int cn,int margin_left,int margin_top,int margin_right,int margin_bottom,int dx,int dy,double scale,double delta,int border_type)737 inline int hal_ni_scharr(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int src_depth, int dst_depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int dx, int dy, double scale, double delta, int border_type)  { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
738 
739 //! @cond IGNORED
740 #define cv_hal_scharr hal_ni_scharr
741 //! @endcond
742 
743 /**
744    @brief Perform Gaussian Blur and downsampling for input tile.
745    @param depth Depths of source and destination image
746    @param src_data,src_step Source image
747    @param dst_data,dst_step Destination image
748    @param src_width,src_height Source image dimensions
749    @param dst_width,dst_height Destination image dimensions
750    @param cn Number of channels
751    @param border_type Border type
752 */
hal_ni_pyrdown(const uchar * src_data,size_t src_step,int src_width,int src_height,uchar * dst_data,size_t dst_step,int dst_width,int dst_height,int depth,int cn,int border_type)753 inline int hal_ni_pyrdown(const uchar* src_data, size_t src_step, int src_width, int src_height, uchar* dst_data, size_t dst_step, int dst_width, int dst_height, int depth, int cn, int border_type) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
754 
755 //! @cond IGNORED
756 #define cv_hal_pyrdown hal_ni_pyrdown
757 //! @endcond
758 
759 /**
760    @brief Canny edge detector
761    @param src_data,src_step Source image
762    @param dst_data,dst_step Destination image
763    @param width,height Source image dimensions
764    @param cn Number of channels
765    @param lowThreshold, highThreshold Thresholds value
766    @param ksize Kernel size for Sobel operator.
767    @param L2gradient Flag, indicating use L2 or L1 norma.
768 */
hal_ni_canny(const uchar * src_data,size_t src_step,uchar * dst_data,size_t dst_step,int width,int height,int cn,double lowThreshold,double highThreshold,int ksize,bool L2gradient)769 inline int hal_ni_canny(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int cn, double lowThreshold, double highThreshold, int ksize, bool L2gradient) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
770 
771 //! @cond IGNORED
772 #define cv_hal_canny hal_ni_canny
773 //! @endcond
774 
775 //! @}
776 
777 #if defined __GNUC__
778 #  pragma GCC diagnostic pop
779 #elif defined _MSC_VER
780 #  pragma warning( pop )
781 #endif
782 
783 #include "custom_hal.hpp"
784 
785 //! @cond IGNORED
786 #define CALL_HAL_RET(name, fun, retval, ...) \
787     int res = __CV_EXPAND(fun(__VA_ARGS__, &retval)); \
788     if (res == CV_HAL_ERROR_OK) \
789         return retval; \
790     else if (res != CV_HAL_ERROR_NOT_IMPLEMENTED) \
791         CV_Error_(cv::Error::StsInternal, \
792             ("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res));
793 
794 
795 #define CALL_HAL(name, fun, ...) \
796     int res = __CV_EXPAND(fun(__VA_ARGS__)); \
797     if (res == CV_HAL_ERROR_OK) \
798         return; \
799     else if (res != CV_HAL_ERROR_NOT_IMPLEMENTED) \
800         CV_Error_(cv::Error::StsInternal, \
801             ("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res));
802 //! @endcond
803 
804 #endif
805