Merge pull request #770 from asmorkalov:winrt

This commit is contained in:
Andrey Kamaev
2013-04-04 20:01:55 +04:00
committed by OpenCV Buildbot
2 changed files with 4 additions and 2 deletions

View File

@@ -315,6 +315,8 @@ CV_INLINE int cvRound( double value )
fistp t;
}
return t;
#elif defined _MSC_VER && defined _M_ARM && defined HAVE_TEGRA_OPTIMIZATION
TEGRA_ROUND(value);
#elif defined HAVE_LRINT || defined CV_ICC || defined __GNUC__
# ifdef HAVE_TEGRA_OPTIMIZATION
TEGRA_ROUND(value);
@@ -324,7 +326,7 @@ CV_INLINE int cvRound( double value )
#else
double intpart, fractpart;
fractpart = modf(value, &intpart);
if ((abs(fractpart) != 0.5) || ((((int)intpart) % 2) != 0))
if ((fabs(fractpart) != 0.5) || ((((int)intpart) % 2) != 0))
return (int)(value + (value >= 0 ? 0.5 : -0.5));
else
return (int)intpart;