Skip to content

Commit

Permalink
Merge pull request opencv#3230 from znah:ipp_median_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vpisarev committed Sep 17, 2014
2 parents 60a1cc3 + 0319120 commit 3bc174f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/imgproc/src/smooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2163,7 +2163,7 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
ippDataType, CV_MAT_CN(type), &bufSize) >= 0) \
{ \
Ipp8u * buffer = ippsMalloc_8u(bufSize); \
IppStatus status = ippiFilterMedianBorder_##flavor(src0.ptr<ippType>(), (int)src0.step, \
IppStatus status = ippiFilterMedianBorder_##flavor(src.ptr<ippType>(), (int)src.step, \
dst.ptr<ippType>(), (int)dst.step, dstRoiSize, maskSize, \
ippBorderRepl, (ippType)0, buffer); \
ippsFree(buffer); \
Expand All @@ -2178,6 +2178,11 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
{
Ipp32s bufSize;
IppiSize dstRoiSize = ippiSize(dst.cols, dst.rows), maskSize = ippiSize(ksize, ksize);
Mat src;
if( dst.data != src0.data )
src = src0;
else
src0.copyTo(src);

int type = src0.type();
if (type == CV_8UC1)
Expand Down

0 comments on commit 3bc174f

Please sign in to comment.