From 43edb7b13b5197083eebddf76c5fdc3130317c11 Mon Sep 17 00:00:00 2001 From: Steinar Midtskogen Date: Thu, 13 Apr 2017 09:18:48 +0200 Subject: [PATCH] Avoid invalid parameter combinations in CLPF test Change-Id: I1aaa06846ad409dd83ab50a0fb34c8a7e77e45e7 --- test/clpf_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/clpf_test.cc b/test/clpf_test.cc index d3b221d9b..56a2dabfe 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); -- GitLab