clz64 function for MSVC in cutils.h and tests/test_conv.c uses _BitScanReverse64 which is not defined for x86. I suggest to use the following implementation:
static inline int clz64(uint64_t a)
{
#if defined(_MSC_VER) && !defined(__clang__)
#if INTPTR_MAX == INT64_MAX
unsigned long index;
_BitScanReverse64(&index, a);
return 63 - index;
#else
if (a >> 32)
return clz32((unsigned)(a >> 32));
else
return clz32((unsigned)a) + 32;
#endif
#else
return __builtin_clzll(a);
#endif
}
clz64 function for MSVC in cutils.h and tests/test_conv.c uses _BitScanReverse64 which is not defined for x86. I suggest to use the following implementation:
Similar fix: videolan project