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

@@ -456,7 +456,6 @@ struct Hamming
ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const
{
ResultType result = 0;
#ifdef __GNUC__
#ifdef __ARM_NEON__
{
uint32x4_t bits = vmovq_n_u32(0);
@@ -473,7 +472,7 @@ struct Hamming
result = vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),0);
result += vgetq_lane_s32 (vreinterpretq_s32_u64(bitSet2),2);
}
#else
#elif __GNUC__
{
//for portability just use unsigned long -- and use the __builtin_popcountll (see docs for __builtin_popcountll)
typedef unsigned long long pop_t;
@@ -493,8 +492,8 @@ struct Hamming
result += __builtin_popcountll(a_final ^ b_final);
}
}
#endif //NEON
#else
#else // NO NEON and NOT GNUC
typedef unsigned long long pop_t;
HammingLUT lut;
result = lut(reinterpret_cast<const unsigned char*> (a),
reinterpret_cast<const unsigned char*> (b), size * sizeof(pop_t));