diff --git a/test/clpf_test.cc b/test/clpf_test.cc index d3b221d9b171a2080f13fa1a7a380621d56b9241..56a2dabfe7dc8c72573ecbe149f495b78e63434b 100644 --- a/test/clpf_test.cc +++ b/test/clpf_test.cc @@ -119,7 +119,7 @@ void test_clpf(int w, int h, int depth, int iterations, for (level = 0; level < (1 << depth) && !error; level += (1 + 4 * !!boundary) << (depth - 8)) { for (bits = 1; bits <= depth && !error; bits++) { - for (damp = 4; damp < depth - 1 && !error; damp++) { + for (damp = 4 + depth - 8; damp < depth - 1 && !error; damp++) { for (int i = 0; i < size * size; i++) s[i] = clamp((rnd.Rand16() & ((1 << bits) - 1)) + level, 0, (1 << depth) - 1);