From c65e5a1e7b271ad4a4a87503d01e2f9c10ca9f7f Mon Sep 17 00:00:00 2001 From: vbystricky Date: Fri, 28 Mar 2014 11:33:19 +0400 Subject: [PATCH] Fix error BGRA2RGBA color convertion by ipp. Uncomment ipp color converstion, which pass tests --- modules/imgproc/src/color.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/imgproc/src/color.cpp b/modules/imgproc/src/color.cpp index b2699d22e5..4cc2382394 100644 --- a/modules/imgproc/src/color.cpp +++ b/modules/imgproc/src/color.cpp @@ -252,6 +252,7 @@ bool CvtColorIPPLoopCopy(Mat& src, Mat& dst, const Cvt& cvt) } bool ok; parallel_for_(Range(0, source.rows), CvtColorIPPLoop_Invoker(source, dst, cvt, &ok), source.total()/(double)(1<<16) ); + //ok = cvt(src.ptr(0), (int)src.step[0], dst.ptr(0), (int)dst.step[0], src.cols, src.rows); return ok; } @@ -299,8 +300,8 @@ static ippicviReorderFunc ippicviSwapChannelsC3RTab[] = static ippicviReorderFunc ippicviSwapChannelsC4RTab[] = { - (ippicviReorderFunc)ippicviSwapChannels_8u_AC4R, 0, (ippicviReorderFunc)ippicviSwapChannels_16u_AC4R, 0, - 0, (ippicviReorderFunc)ippicviSwapChannels_32f_AC4R, 0, 0 + (ippicviReorderFunc)ippicviSwapChannels_8u_C4R, 0, (ippicviReorderFunc)ippicviSwapChannels_16u_C4R, 0, + 0, (ippicviReorderFunc)ippicviSwapChannels_32f_C4R, 0, 0 }; static ippicviColor2GrayFunc ippicviColor2GrayC3Tab[] = @@ -3310,7 +3311,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) CV_Assert( scn == 3 || scn == 4 ); _dst.create(sz, CV_MAKETYPE(depth, 1)); dst = _dst.getMat(); -/* +/**/ #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) if( code == CV_BGR2GRAY ) { @@ -3333,7 +3334,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) return; } #endif -*/ +/**/ bidx = code == CV_BGR2GRAY || code == CV_BGRA2GRAY ? 0 : 2; if( depth == CV_8U )