+
+TEST(BlurEffectTest, BlurTwoDotsSmallRadiusFewerTaps) {
+ const float sigma = 3.0f;
+ const int size = 32;
+ const int x1 = 8;
+ const int y1 = 8;
+ const int x2 = 20;
+ const int y2 = 10;
+
+ float data[size * size], out_data[size * size], expected_data[size * size];
+ memset(data, 0, sizeof(data));
+ memset(expected_data, 0, sizeof(expected_data));
+
+ data[y1 * size + x1] = 1.0f;
+ data[y2 * size + x2] = 1.0f;
+
+ add_blurred_point(expected_data, size, x1, y1, 1.0f, sigma);
+ add_blurred_point(expected_data, size, x2, y2, 1.0f, sigma);
+
+ EffectChainTester tester(data, size, size, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR);
+ Effect *blur_effect = tester.get_chain()->add_effect(new BlurEffect());
+ ASSERT_TRUE(blur_effect->set_float("radius", sigma));
+ ASSERT_TRUE(blur_effect->set_int("num_taps", 10));
+ tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_LINEAR);
+
+ // Set the limits a bit tighter than usual, since there is so little energy in here.
+ expect_equal(expected_data, out_data, size, size, 1e-3, 1e-5);
+}
+
+} // namespace movit