Disable inaccurate integer variance calculation for now

This commit is contained in:
Pauli Oikkonen 2020-03-02 19:18:55 +02:00
parent fc1b91335b
commit 60e7956dc5

View file

@ -1137,6 +1137,8 @@ static double pixel_var_avx2_largebuf(const kvz_pixel *buf, const uint32_t len)
return var_sum / len_f;
}
#ifdef INACCURATE_VARIANCE_CALCULATION
// Assumes that u is a power of two
static INLINE uint32_t ilog2(uint32_t u)
{
@ -1220,6 +1222,15 @@ static double pixel_var_avx2(const kvz_pixel *buf, const uint32_t len)
return (float)vars * varsum_to_f;
}
#else // INACCURATE_VARIANCE_CALCULATION
static double pixel_var_avx2(const kvz_pixel *buf, const uint32_t len)
{
return pixel_var_avx2_largebuf(buf, len);
}
#endif // !INACCURATE_VARIANCE_CALCULATION
#endif //COMPILE_INTEL_AVX2
int kvz_strategy_register_picture_avx2(void* opaque, uint8_t bitdepth)