Multiple fixes for WinRT

Fixed flann build with NEON;
Fixed Haming distance with NEON;
Honest cvRound for WinRT added;
cvRound test added;
Video IO with direct show disabled;
This commit is contained in:
Alexander Smorkalov
2013-03-26 17:19:52 -07:00
parent 7ec2b6bad0
commit 6f68640d4d
9 changed files with 59 additions and 54 deletions

View File

@@ -136,7 +136,6 @@ CV_INLINE IppiSize ippiSize(int width, int height)
#ifdef __ARM_NEON__
# include <arm_neon.h>
# define CV_NEON 1
# define CPU_HAS_NEON_FEATURE (true)
#endif
#ifndef CV_SSE

View File

@@ -323,7 +323,12 @@ CV_INLINE int cvRound( double value )
# endif
#else
// while this is not IEEE754-compliant rounding, it's usually a good enough approximation
return (int)(value + (value >= 0 ? 0.5 : -0.5));
double intpart, fractpart;
fractpart = modf(value, &intpart);
if ((abs(fractpart) != 0.5) || ((((int)intpart) % 2) != 0))
return (int)(value + (value >= 0 ? 0.5 : -0.5));
else
return (int)intpart;
#endif
}