X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=resample_effect_test.cpp;h=a51c51d664d54801f2ea8389a69fbc94b632c0a0;hb=29888c096ef7aeea7d4d15ae40a5fece05b016ac;hp=71354f209c4a2858553c3f00b939bce3fec1bb70;hpb=037ee905bc05fcbb278ac3a0b1f73249efada9b2;p=movit diff --git a/resample_effect_test.cpp b/resample_effect_test.cpp index 71354f2..a51c51d 100644 --- a/resample_effect_test.cpp +++ b/resample_effect_test.cpp @@ -437,7 +437,7 @@ TEST(ResampleEffectTest, Precision) { } #ifdef HAVE_BENCHMARK -template<> inline uint8_t from_fp32(float x) { return x; } +template<> inline uint8_t from_fp32(float x) { return lrintf(x * 255.0f); } template void BM_ResampleEffect(benchmark::State &state, GammaCurve gamma_curve, GLenum output_format, const std::string &shader_type)