|
|
@ -80,13 +80,27 @@ void cv::updateMotionHistory( InputArray _silhouette, InputOutputArray _mhi, |
|
|
|
|
|
|
|
|
|
|
|
Mat silh = _silhouette.getMat(), mhi = _mhi.getMat(); |
|
|
|
Mat silh = _silhouette.getMat(), mhi = _mhi.getMat(); |
|
|
|
Size size = silh.size(); |
|
|
|
Size size = silh.size(); |
|
|
|
|
|
|
|
#ifdef HAVE_IPP |
|
|
|
|
|
|
|
int silhstep = (int)silh.step, mhistep = (int)mhi.step; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if( silh.isContinuous() && mhi.isContinuous() ) |
|
|
|
if( silh.isContinuous() && mhi.isContinuous() ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
size.width *= size.height; |
|
|
|
size.width *= size.height; |
|
|
|
size.height = 1; |
|
|
|
size.height = 1; |
|
|
|
|
|
|
|
#ifdef HAVE_IPP |
|
|
|
|
|
|
|
silhstep = (int)silh.total(); |
|
|
|
|
|
|
|
mhistep = (int)mhi.total() * sizeof(Ipp32f); |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_IPP |
|
|
|
|
|
|
|
IppStatus status = ippiUpdateMotionHistory_8u32f_C1IR((const Ipp8u *)silh.data, silhstep, (Ipp32f *)mhi.data, mhistep, |
|
|
|
|
|
|
|
ippiSize(size.width, size.height), (Ipp32f)timestamp, (Ipp32f)duration); |
|
|
|
|
|
|
|
if (status >= 0) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if CV_SSE2 |
|
|
|
#if CV_SSE2 |
|
|
|
volatile bool useSIMD = cv::checkHardwareSupport(CV_CPU_SSE2); |
|
|
|
volatile bool useSIMD = cv::checkHardwareSupport(CV_CPU_SSE2); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|