1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

ipp_countNonZero build fix;

Removed IPP port for tiny arithm.cpp functions

Additional warnings fix on various platforms.

Build without OPENCL and GCC warnings fixed

Fixed warnings, trailing spaces and removed unused secure_cpy.

IPP code refactored.

IPP code path  implemented as separate static functions to simplify future work with IPP code and make it more readable.
This commit is contained in:
Dmitry Budnikov
2015-05-15 11:15:00 +03:00
committed by Pavel Vlasov
parent b1a8e4f760
commit a5a21019b2
20 changed files with 2723 additions and 2395 deletions
+30 -7
View File
@@ -1220,7 +1220,10 @@ private:
}
void cv::calcHist( const Mat* images, int nimages, const int* channels,
#if defined(HAVE_IPP)
namespace cv
{
static bool ipp_calchist(const Mat* images, int nimages, const int* channels,
InputArray _mask, OutputArray _hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate )
{
@@ -1228,13 +1231,10 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
CV_Assert(dims > 0 && histSize);
const uchar* const histdata = _hist.getMat().ptr();
_hist.create(dims, histSize, CV_32F);
Mat hist = _hist.getMat(), ihist = hist;
ihist.flags = (ihist.flags & ~CV_MAT_TYPE_MASK)|CV_32S;
#ifdef HAVE_IPP
CV_IPP_CHECK()
{
if (nimages == 1 && images[0].type() == CV_8UC1 && dims == 1 && channels &&
channels[0] == 0 && mask.empty() && images[0].dims <= 2 &&
@@ -1256,14 +1256,37 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
if (ok)
{
ihist.convertTo(hist, CV_32F);
CV_IMPL_ADD(CV_IMPL_IPP|CV_IMPL_MT);
return;
CV_IMPL_ADD(CV_IMPL_IPP);
return true;
}
setIppErrorStatus();
}
}
return false;
}
}
#endif
void cv::calcHist( const Mat* images, int nimages, const int* channels,
InputArray _mask, OutputArray _hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate )
{
CV_IPP_RUN(nimages == 1 && images[0].type() == CV_8UC1 && dims == 1 && channels &&
channels[0] == 0 && _mask.getMat().empty() && images[0].dims <= 2 &&
!accumulate && uniform,
ipp_calchist(images, nimages, channels,
_mask, _hist, dims, histSize,
ranges, uniform, accumulate));
Mat mask = _mask.getMat();
CV_Assert(dims > 0 && histSize);
const uchar* const histdata = _hist.getMat().ptr();
_hist.create(dims, histSize, CV_32F);
Mat hist = _hist.getMat(), ihist = hist;
ihist.flags = (ihist.flags & ~CV_MAT_TYPE_MASK)|CV_32S;
if( !accumulate || histdata != hist.data )
hist = Scalar(0.);
else