From: Steinar H. Gunderson Date: Thu, 3 Apr 2014 20:54:13 +0000 (+0200) Subject: Loosen up the 0.499 vs. 0.501 subpixel resample test. X-Git-Tag: 1.1~5 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=233ddaa1c94e8c11ef73740b4d9c1aa31a97dd5c Loosen up the 0.499 vs. 0.501 subpixel resample test. Seemingly these limits were a bit too tight for something that's actually supposed to be approximate. --- diff --git a/resample_effect_test.cpp b/resample_effect_test.cpp index 9a28013..e90f19e 100644 --- a/resample_effect_test.cpp +++ b/resample_effect_test.cpp @@ -334,11 +334,11 @@ TEST(ResampleEffectTest, ReadHalfPixelFromLeftAndScale) { // Check that we are (almost) the same no matter the rounding. ASSERT_TRUE(resample_effect->set_float("left", 0.499f)); tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_LINEAR); - expect_equal(expected_data, out_data, dst_width, 1); + expect_equal(expected_data, out_data, dst_width, 1, 1.5f / 255.0f, 0.4f / 255.0f); ASSERT_TRUE(resample_effect->set_float("left", 0.501f)); tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_LINEAR); - expect_equal(expected_data, out_data, dst_width, 1); + expect_equal(expected_data, out_data, dst_width, 1, 1.5f / 255.0f, 0.4f / 255.0f); } TEST(ResampleEffectTest, Zoom) {