]> git.sesse.net Git - movit/commitdiff
Another benchmarking data set fix.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 8 Jan 2018 23:27:05 +0000 (00:27 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 8 Jan 2018 23:27:09 +0000 (00:27 +0100)
resample_effect_test.cpp

index 71354f209c4a2858553c3f00b939bce3fec1bb70..a51c51d664d54801f2ea8389a69fbc94b632c0a0 100644 (file)
@@ -437,7 +437,7 @@ TEST(ResampleEffectTest, Precision) {
 }
 
 #ifdef HAVE_BENCHMARK
-template<> inline uint8_t from_fp32<uint8_t>(float x) { return x; }
+template<> inline uint8_t from_fp32<uint8_t>(float x) { return lrintf(x * 255.0f); }
 
 template<class T>
 void BM_ResampleEffect(benchmark::State &state, GammaCurve gamma_curve, GLenum output_format, const std::string &shader_type)