Skip to content

Commit 61492ea

Browse files
committed
Merge pull request opencv#6708 from alalek:pr6477
2 parents 96937ba + 5e91922 commit 61492ea

File tree

5 files changed

+1578
-1001
lines changed

5 files changed

+1578
-1001
lines changed

modules/core/src/hal_replacement.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,21 +703,25 @@ inline int hal_ni_gemm64fc(const double* src1, size_t src1_step, const double* s
703703

704704
//! @cond IGNORED
705705
#define CALL_HAL_RET(name, fun, retval, ...) \
706+
{ \
706707
int res = fun(__VA_ARGS__, &retval); \
707708
if (res == CV_HAL_ERROR_OK) \
708709
return retval; \
709710
else if (res != CV_HAL_ERROR_NOT_IMPLEMENTED) \
710711
CV_Error_(cv::Error::StsInternal, \
711-
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res));
712+
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res)); \
713+
}
712714

713715

714716
#define CALL_HAL(name, fun, ...) \
717+
{ \
715718
int res = fun(__VA_ARGS__); \
716719
if (res == CV_HAL_ERROR_OK) \
717720
return; \
718721
else if (res != CV_HAL_ERROR_NOT_IMPLEMENTED) \
719722
CV_Error_(cv::Error::StsInternal, \
720-
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res));
723+
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res)); \
724+
}
721725
//! @endcond
722726

723727
#endif

modules/core/src/stat.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2718,19 +2718,25 @@ static bool ipp_norm(Mat &src, int normType, Mat &mask, double &result)
27182718
ippiMaskNormFuncC3 ippFuncC3 =
27192719
normType == NORM_INF ?
27202720
(type == CV_8UC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_8u_C3CMR :
2721+
#if IPP_VERSION_X100 < 900
27212722
type == CV_8SC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_8s_C3CMR :
2723+
#endif
27222724
type == CV_16UC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_16u_C3CMR :
27232725
type == CV_32FC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_32f_C3CMR :
27242726
0) :
27252727
normType == NORM_L1 ?
27262728
(type == CV_8UC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_8u_C3CMR :
2729+
#if IPP_VERSION_X100 < 900
27272730
type == CV_8SC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_8s_C3CMR :
2731+
#endif
27282732
type == CV_16UC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_16u_C3CMR :
27292733
type == CV_32FC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_32f_C3CMR :
27302734
0) :
27312735
normType == NORM_L2 || normType == NORM_L2SQR ?
27322736
(type == CV_8UC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_8u_C3CMR :
2737+
#if IPP_VERSION_X100 < 900
27332738
type == CV_8SC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_8s_C3CMR :
2739+
#endif
27342740
type == CV_16UC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_16u_C3CMR :
27352741
type == CV_32FC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_32f_C3CMR :
27362742
0) : 0;

modules/imgproc/include/opencv2/imgproc/hal/hal.hpp

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,108 @@ CV_EXPORTS void warpPerspectve(int src_type,
7575
uchar * dst_data, size_t dst_step, int dst_width, int dst_height,
7676
const double M[9], int interpolation, int borderType, const double borderValue[4]);
7777

78+
CV_EXPORTS void cvtBGRtoBGR(const uchar * src_data, size_t src_step,
79+
uchar * dst_data, size_t dst_step,
80+
int width, int height,
81+
int depth, int scn, int dcn, bool swapBlue);
82+
83+
CV_EXPORTS void cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step,
84+
uchar * dst_data, size_t dst_step,
85+
int width, int height,
86+
int scn, bool swapBlue, int greenBits);
87+
88+
CV_EXPORTS void cvtBGR5x5toBGR(const uchar * src_data, size_t src_step,
89+
uchar * dst_data, size_t dst_step,
90+
int width, int height,
91+
int dcn, bool swapBlue, int greenBits);
92+
93+
CV_EXPORTS void cvtBGRtoGray(const uchar * src_data, size_t src_step,
94+
uchar * dst_data, size_t dst_step,
95+
int width, int height,
96+
int depth, int scn, bool swapBlue);
97+
98+
CV_EXPORTS void cvtGraytoBGR(const uchar * src_data, size_t src_step,
99+
uchar * dst_data, size_t dst_step,
100+
int width, int height,
101+
int depth, int dcn);
102+
103+
CV_EXPORTS void cvtBGR5x5toGray(const uchar * src_data, size_t src_step,
104+
uchar * dst_data, size_t dst_step,
105+
int width, int height,
106+
int greenBits);
107+
108+
CV_EXPORTS void cvtGraytoBGR5x5(const uchar * src_data, size_t src_step,
109+
uchar * dst_data, size_t dst_step,
110+
int width, int height,
111+
int greenBits);
112+
CV_EXPORTS void cvtBGRtoYUV(const uchar * src_data, size_t src_step,
113+
uchar * dst_data, size_t dst_step,
114+
int width, int height,
115+
int depth, int scn, bool swapBlue, bool isCbCr);
116+
117+
CV_EXPORTS void cvtYUVtoBGR(const uchar * src_data, size_t src_step,
118+
uchar * dst_data, size_t dst_step,
119+
int width, int height,
120+
int depth, int dcn, bool swapBlue, bool isCbCr);
121+
122+
CV_EXPORTS void cvtBGRtoXYZ(const uchar * src_data, size_t src_step,
123+
uchar * dst_data, size_t dst_step,
124+
int width, int height,
125+
int depth, int scn, bool swapBlue);
126+
127+
CV_EXPORTS void cvtXYZtoBGR(const uchar * src_data, size_t src_step,
128+
uchar * dst_data, size_t dst_step,
129+
int width, int height,
130+
int depth, int dcn, bool swapBlue);
131+
132+
CV_EXPORTS void cvtBGRtoHSV(const uchar * src_data, size_t src_step,
133+
uchar * dst_data, size_t dst_step,
134+
int width, int height,
135+
int depth, int scn, bool swapBlue, bool isFullRange, bool isHSV);
136+
137+
CV_EXPORTS void cvtHSVtoBGR(const uchar * src_data, size_t src_step,
138+
uchar * dst_data, size_t dst_step,
139+
int width, int height,
140+
int depth, int dcn, bool swapBlue, bool isFullRange, bool isHSV);
141+
142+
CV_EXPORTS void cvtBGRtoLab(const uchar * src_data, size_t src_step,
143+
uchar * dst_data, size_t dst_step,
144+
int width, int height,
145+
int depth, int scn, bool swapBlue, bool isLab, bool srgb);
146+
147+
CV_EXPORTS void cvtLabtoBGR(const uchar * src_data, size_t src_step,
148+
uchar * dst_data, size_t dst_step,
149+
int width, int height,
150+
int depth, int dcn, bool swapBlue, bool isLab, bool srgb);
151+
152+
CV_EXPORTS void cvtTwoPlaneYUVtoBGR(const uchar * src_data, size_t src_step,
153+
uchar * dst_data, size_t dst_step,
154+
int dst_width, int dst_height,
155+
int dcn, bool swapBlue, int uIdx);
156+
157+
CV_EXPORTS void cvtThreePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
158+
uchar * dst_data, size_t dst_step,
159+
int dst_width, int dst_height,
160+
int dcn, bool swapBlue, int uIdx);
161+
162+
CV_EXPORTS void cvtBGRtoThreePlaneYUV(const uchar * src_data, size_t src_step,
163+
uchar * dst_data, size_t dst_step,
164+
int width, int height,
165+
int scn, bool swapBlue, int uIdx);
166+
167+
CV_EXPORTS void cvtOnePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
168+
uchar * dst_data, size_t dst_step,
169+
int width, int height,
170+
int dcn, bool swapBlue, int uIdx, int ycn);
171+
172+
CV_EXPORTS void cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_step,
173+
uchar * dst_data, size_t dst_step,
174+
int width, int height);
175+
176+
CV_EXPORTS void cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_step,
177+
uchar * dst_data, size_t dst_step,
178+
int width, int height);
179+
78180
//! @}
79181

80182
}}

0 commit comments

Comments
 (0)