This commit is contained in:
Ilya Lavrenov 2015-02-25 21:57:17 +03:00
parent bdb088dcca
commit b963d84b41

View File

@ -517,9 +517,11 @@ static const uchar * initPopcountTable()
unsigned int j = 0u; unsigned int j = 0u;
#if CV_POPCNT #if CV_POPCNT
if (checkHardwareSupport(CV_CPU_POPCNT)) if (checkHardwareSupport(CV_CPU_POPCNT))
{
for( ; j < 256u; j++ ) for( ; j < 256u; j++ )
tab[j] = (uchar)(8 - _mm_popcnt_u32(j)); tab[j] = (uchar)(8 - _mm_popcnt_u32(j));
#else }
#endif
for( ; j < 256u; j++ ) for( ; j < 256u; j++ )
{ {
int val = 0; int val = 0;
@ -527,7 +529,6 @@ static const uchar * initPopcountTable()
val += (j & mask) == 0; val += (j & mask) == 0;
tab[j] = (uchar)val; tab[j] = (uchar)val;
} }
#endif
initialized = true; initialized = true;
} }