mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
added status check
This commit is contained in:
@@ -503,6 +503,7 @@ void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _m
|
||||
|
||||
if (status >= 0)
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -584,6 +585,7 @@ void cv::accumulateProduct( InputArray _src1, InputArray _src2,
|
||||
|
||||
if (status >= 0)
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -663,6 +665,7 @@ void cv::accumulateWeighted( InputArray _src, InputOutputArray _dst,
|
||||
|
||||
if (status >= 0)
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -59,10 +59,14 @@ static bool ippCanny(const Mat& _src, Mat& _dst, float low, float high)
|
||||
int size = 0, size1 = 0;
|
||||
IppiSize roi = { _src.cols, _src.rows };
|
||||
|
||||
ippiFilterSobelNegVertGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size);
|
||||
ippiFilterSobelHorizGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size1);
|
||||
if (ippiFilterSobelNegVertGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size) < 0)
|
||||
return false;
|
||||
if (ippiFilterSobelHorizGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size1) < 0)
|
||||
return false;
|
||||
size = std::max(size, size1);
|
||||
ippiCannyGetSize(roi, &size1);
|
||||
|
||||
if (ippiCannyGetSize(roi, &size1) < 0)
|
||||
return false;
|
||||
size = std::max(size, size1);
|
||||
|
||||
AutoBuffer<uchar> buf(size + 64);
|
||||
@@ -286,9 +290,12 @@ void cv::Canny( InputArray _src, OutputArray _dst,
|
||||
#endif
|
||||
|
||||
#ifdef USE_IPP_CANNY
|
||||
if( aperture_size == 3 && !L2gradient && 1 == cn &&
|
||||
ippCanny(src, dst, (float)low_thresh, (float)high_thresh) )
|
||||
return;
|
||||
if( aperture_size == 3 && !L2gradient && 1 == cn )
|
||||
{
|
||||
if (ippCanny(src, dst, (float)low_thresh, (float)high_thresh))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
Mat dx(src.rows, src.cols, CV_16SC(cn));
|
||||
|
||||
@@ -3288,32 +3288,38 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if ( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 0, 1, 2)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_BGRA2BGR )
|
||||
{
|
||||
if ( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippiCopyAC4C3RTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_BGR2RGBA )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 2, 1, 0)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGBA2BGR )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC4C3RTab[depth], 2, 1, 0)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2BGR )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC3RTab[depth], 2, 1, 0)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#if !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_X100 >= 801)
|
||||
else if( code == CV_RGBA2BGRA )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC4RTab[depth], 2, 1, 0)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -3343,24 +3349,29 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiBGRToBGR565_8u16u_C3R)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_BGRA2BGR565)
|
||||
{
|
||||
if (CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
(ippiGeneralFunc)ippiBGRToBGR565_8u16u_C3R, 0, 1, 2, depth)))
|
||||
if (CvtColorIPPLoopCopy(src, dst,
|
||||
IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
(ippiGeneralFunc)ippiBGRToBGR565_8u16u_C3R, 0, 1, 2, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_RGB2BGR565)
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth],
|
||||
(ippiGeneralFunc)ippiBGRToBGR565_8u16u_C3R, 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_RGBA2BGR565)
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
(ippiGeneralFunc)ippiBGRToBGR565_8u16u_C3R, 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
CV_SUPPRESS_DEPRECATED_END
|
||||
#endif
|
||||
@@ -3392,24 +3403,28 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiBGR565ToBGR_16u8u_C3R)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_BGR5652RGB)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiBGR565ToBGR_16u8u_C3R,
|
||||
ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
if (code == CV_BGR5652BGRA)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiBGR565ToBGR_16u8u_C3R,
|
||||
ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_BGR5652RGBA)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiBGR565ToBGR_16u8u_C3R,
|
||||
ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
CV_SUPPRESS_DEPRECATED_END
|
||||
#endif
|
||||
@@ -3432,21 +3447,25 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPColor2GrayFunctor(ippiColor2GrayC3Tab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2GRAY )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippiRGB2GrayC3Tab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_BGRA2GRAY )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPColor2GrayFunctor(ippiColor2GrayC4Tab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGBA2GRAY )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippiRGB2GrayC4Tab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3484,11 +3503,13 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGray2BGRFunctor(ippiCopyP3C3RTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_GRAY2BGRA )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGray2BGRAFunctor(ippiCopyP3C3RTab[depth], ippiSwapChannelsC3C4RTab[depth], depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3532,24 +3553,28 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiRGBToYUV_8u_C3R)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_BGR2YUV && scn == 3 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth],
|
||||
(ippiGeneralFunc)ippiRGBToYUV_8u_C3R, 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_RGB2YUV && scn == 4 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
(ippiGeneralFunc)ippiRGBToYUV_8u_C3R, 0, 1, 2, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_BGR2YUV && scn == 4 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
(ippiGeneralFunc)ippiRGBToYUV_8u_C3R, 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3587,24 +3612,28 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiYUVToRGB_8u_C3R)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_YUV2BGR && dcn == 3 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiYUVToRGB_8u_C3R,
|
||||
ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_YUV2RGB && dcn == 4 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiYUVToRGB_8u_C3R,
|
||||
ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_YUV2BGR && dcn == 4 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiYUVToRGB_8u_C3R,
|
||||
ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3629,21 +3658,25 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2XYZTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_BGR2XYZ && scn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2XYZTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2XYZ && scn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiRGB2XYZTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2XYZ && scn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2XYZTab[depth], 0, 1, 2, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3668,21 +3701,25 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippiXYZ2RGBTab[depth], ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_XYZ2BGR && dcn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiXYZ2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
if( code == CV_XYZ2RGB && dcn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiXYZ2RGBTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_XYZ2RGB && dcn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiXYZ2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3713,41 +3750,49 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2HSVTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_BGR2HSV_FULL && scn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HSVTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2HSV_FULL && scn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiRGB2HSVTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2HSV_FULL && scn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HSVTab[depth], 0, 1, 2, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_BGR2HLS_FULL && scn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2HLSTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_BGR2HLS_FULL && scn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HLSTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2HLS_FULL && scn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiRGB2HLSTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_RGB2HLS_FULL && scn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HLSTab[depth], 0, 1, 2, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -3794,41 +3839,49 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippiHSV2RGBTab[depth], ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_HSV2BGR_FULL && dcn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHSV2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_HSV2RGB_FULL && dcn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiHSV2RGBTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_HSV2RGB_FULL && dcn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHSV2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_HLS2BGR_FULL && dcn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippiHLS2RGBTab[depth], ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_HLS2BGR_FULL && dcn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHLS2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_HLS2RGB_FULL && dcn == 3 )
|
||||
{
|
||||
if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiHLS2RGBTab[depth])) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_HLS2RGB_FULL && dcn == 4 )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHLS2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -3868,47 +3921,55 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiBGRToLab_8u_C3R)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_LBGR2Lab && scn == 4 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
(ippiGeneralFunc)ippiBGRToLab_8u_C3R, 0, 1, 2, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_LRGB2Lab && scn == 3 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth],
|
||||
(ippiGeneralFunc)ippiBGRToLab_8u_C3R, 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_LRGB2Lab && scn == 4 && depth == CV_8U)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
(ippiGeneralFunc)ippiBGRToLab_8u_C3R, 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_LRGB2Luv && scn == 3)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippiRGBToLUVTab[depth])))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_LRGB2Luv && scn == 4)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
ippiRGBToLUVTab[depth], 0, 1, 2, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_LBGR2Luv && scn == 3)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth],
|
||||
ippiRGBToLUVTab[depth], 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if (code == CV_LBGR2Luv && scn == 4)
|
||||
{
|
||||
if (CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth],
|
||||
ippiRGBToLUVTab[depth], 2, 1, 0, depth)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3949,24 +4010,28 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiLabToBGR_8u_C3R)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_Lab2LBGR && dcn == 4 && depth == CV_8U )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiLabToBGR_8u_C3R,
|
||||
ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
if( code == CV_Lab2LRGB && dcn == 3 && depth == CV_8U )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiLabToBGR_8u_C3R,
|
||||
ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
else if( code == CV_Lab2LRGB && dcn == 4 && depth == CV_8U )
|
||||
{
|
||||
if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor((ippiGeneralFunc)ippiLabToBGR_8u_C3R,
|
||||
ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
if( code == CV_Luv2LRGB && dcn == 3 )
|
||||
@@ -4194,6 +4259,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
|
||||
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
|
||||
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiAlphaPremul_8u_AC4R)))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
#endif
|
||||
CvtColorLoop(src, dst, RGBA2mRGBA<uchar>());
|
||||
}
|
||||
|
||||
@@ -456,6 +456,7 @@ void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
|
||||
Mat src = _src.getMat(), dst = _dst.getMat();
|
||||
if (IPPDeriv(src, dst, ddepth, dx, dy, ksize,scale))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
int ktype = std::max(CV_32F, std::max(ddepth, sdepth));
|
||||
@@ -498,6 +499,7 @@ void cv::Scharr( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
|
||||
Mat src = _src.getMat(), dst = _dst.getMat();
|
||||
if(IPPDerivScharr(src, dst, ddepth, dx, dy, scale))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
int ktype = std::max(CV_32F, std::max(ddepth, sdepth));
|
||||
@@ -630,6 +632,7 @@ void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize,
|
||||
|
||||
if (status >= 0)
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
}
|
||||
#undef IPP_FILTER_LAPLACIAN
|
||||
|
||||
@@ -752,6 +752,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
|
||||
src.ptr<uchar>(), (int)src.step,
|
||||
dst.ptr<float>(), (int)dst.step, roi, _mask) >= 0 )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
Mat zpix = src == 0;
|
||||
|
||||
@@ -1488,7 +1488,10 @@ private:
|
||||
ippBorderRepl, borderValue[0], bufptr) < 0) ||
|
||||
(cn == 3 && ippiFilterRowBorderPipeline_32f_C3R(src, step, &dst, roisz, _kx, _ksize, 0,
|
||||
ippBorderRepl, borderValue, bufptr) < 0))
|
||||
{
|
||||
setIppErrorStatus();
|
||||
return 0;
|
||||
}
|
||||
return width - _ksize + 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1255,6 +1255,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
|
||||
ihist.convertTo(hist, CV_32F);
|
||||
return;
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2424,6 +2424,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
|
||||
parallel_for_(range, invoker, dst.total()/(double)(1<<16));
|
||||
if( ok )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
}
|
||||
#undef IPP_RESIZE_EPS
|
||||
@@ -4281,6 +4282,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
|
||||
parallel_for_(range, invoker, dst.total()/(double)(1<<16));
|
||||
if( ok )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
@@ -4524,6 +4526,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
|
||||
parallel_for_(range, invoker, dst.total()/(double)(1<<16));
|
||||
if( ok )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
@@ -519,6 +519,7 @@ cv::Moments cv::moments( InputArray _src, bool binary )
|
||||
}
|
||||
ippiMomentFree_64f(moment);
|
||||
}
|
||||
setIppErrorStatus();
|
||||
CV_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1466,6 +1466,7 @@ static void morphOp( int op, InputArray _src, OutputArray _dst,
|
||||
#if IPP_VERSION_X100 >= 801
|
||||
if( IPPMorphOp(op, _src, _dst, kernel, anchor, iterations, borderType, borderValue) )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
#endif
|
||||
|
||||
if (iterations == 0 || kernel.rows*kernel.cols == 1)
|
||||
|
||||
@@ -390,9 +390,13 @@ void cv::getRectSubPix( InputArray _image, Size patchSize, Point2f center,
|
||||
srctype == CV_8UC1 && ddepth == CV_32F ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_8u32f_C1R :
|
||||
srctype == CV_32FC1 && ddepth == CV_32F ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_32f_C1R : 0;
|
||||
|
||||
if( ippfunc && ippfunc(image.data, (int)image.step, src_size, patch.data,
|
||||
(int)patch.step, win_size, icenter, &minpt, &maxpt) >= 0 )
|
||||
return;
|
||||
if( ippfunc)
|
||||
{
|
||||
if (ippfunc(image.data, (int)image.step, src_size, patch.data,
|
||||
(int)patch.step, win_size, icenter, &minpt, &maxpt) >= 0 )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
if( depth == CV_8U && ddepth == CV_8U )
|
||||
|
||||
@@ -888,6 +888,7 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
|
||||
if (status >= 0) \
|
||||
return; \
|
||||
} \
|
||||
setIppErrorStatus(); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
if (stype == CV_8UC1)
|
||||
@@ -1193,6 +1194,7 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
|
||||
return;
|
||||
}
|
||||
}
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2033,6 +2035,7 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
|
||||
if (status >= 0) \
|
||||
return; \
|
||||
} \
|
||||
setIppErrorStatus(); \
|
||||
} \
|
||||
while ((void)0, 0)
|
||||
|
||||
@@ -2433,6 +2436,7 @@ bilateralFilter_8u( const Mat& src, Mat& dst, int d,
|
||||
parallel_for_(Range(0, dst.rows), body, dst.total()/(double)(1<<16));
|
||||
if( ok )
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -393,6 +393,7 @@ void cv::integral( InputArray _src, OutputArray _sum, OutputArray _sqsum, Output
|
||||
}
|
||||
if (0 <= status)
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -423,6 +423,12 @@ void crossCorr( const Mat& img, const Mat& _templ, Mat& corr,
|
||||
Size corrsize, int ctype,
|
||||
Point anchor, double delta, int borderType )
|
||||
{
|
||||
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
|
||||
if (ipp_crossCorr(img, _templ, corr))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
#endif
|
||||
|
||||
const double blockScale = 4.5;
|
||||
const int minBlockSize = 256;
|
||||
std::vector<uchar> buf;
|
||||
@@ -639,8 +645,12 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result,
|
||||
#endif
|
||||
|
||||
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
|
||||
if (method == CV_TM_SQDIFF && ipp_sqrDistance(img, templ, result))
|
||||
return;
|
||||
if (method == CV_TM_SQDIFF)
|
||||
{
|
||||
if (ipp_sqrDistance(img, templ, result))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
}
|
||||
#endif
|
||||
|
||||
int cn = img.channels();
|
||||
|
||||
@@ -75,14 +75,17 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type )
|
||||
case THRESH_TRUNC:
|
||||
if (0 <= ippiThreshold_GT_8u_C1R(_src.data, (int)src_step, _dst.data, (int)dst_step, sz, thresh))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
case THRESH_TOZERO:
|
||||
if (0 <= ippiThreshold_LTVal_8u_C1R(_src.data, (int)src_step, _dst.data, (int)dst_step, sz, thresh+1, 0))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
case THRESH_TOZERO_INV:
|
||||
if (0 <= ippiThreshold_GTVal_8u_C1R(_src.data, (int)src_step, _dst.data, (int)dst_step, sz, thresh, 0))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@@ -313,14 +316,17 @@ thresh_16s( const Mat& _src, Mat& _dst, short thresh, short maxval, int type )
|
||||
case THRESH_TRUNC:
|
||||
if (0 <= ippiThreshold_GT_16s_C1R(src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
case THRESH_TOZERO:
|
||||
if (0 <= ippiThreshold_LTVal_16s_C1R(src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh+1, 0))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
case THRESH_TOZERO_INV:
|
||||
if (0 <= ippiThreshold_GTVal_16s_C1R(src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh, 0))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@@ -504,14 +510,17 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
|
||||
case THRESH_TRUNC:
|
||||
if (0 <= ippiThreshold_GT_32f_C1R(src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
case THRESH_TOZERO:
|
||||
if (0 <= ippiThreshold_LTVal_32f_C1R(src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh+FLT_EPSILON, 0))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
case THRESH_TOZERO_INV:
|
||||
if (0 <= ippiThreshold_GTVal_32f_C1R(src, (int)src_step*sizeof(src[0]), dst, (int)dst_step*sizeof(dst[0]), sz, thresh, 0))
|
||||
return;
|
||||
setIppErrorStatus();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user