Commit 43edb7b1 authored by Steinar Midtskogen's avatar Steinar Midtskogen

Avoid invalid parameter combinations in CLPF test

Change-Id: I1aaa06846ad409dd83ab50a0fb34c8a7e77e45e7
parent 7b069a57
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment