summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lpf_test.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/lpf_test.cc b/test/lpf_test.cc
index dfdd51599..9db1181c6 100644
--- a/test/lpf_test.cc
+++ b/test/lpf_test.cc
@@ -75,9 +75,9 @@ void InitInput(Pixel *s, Pixel *ref_s, ACMRandom *rnd, const uint8_t limit,
if (j < 1) {
tmp_s[j] = rnd->Rand16();
} else if (val & 0x20) { // Increment by a value within the limit.
- tmp_s[j] = tmp_s[j - 1] + (limit - 1);
+ tmp_s[j] = static_cast<uint16_t>(tmp_s[j - 1] + (limit - 1));
} else { // Decrement by a value within the limit.
- tmp_s[j] = tmp_s[j - 1] - (limit - 1);
+ tmp_s[j] = static_cast<uint16_t>(tmp_s[j - 1] - (limit - 1));
}
j++;
}
@@ -94,11 +94,11 @@ void InitInput(Pixel *s, Pixel *ref_s, ACMRandom *rnd, const uint8_t limit,
if (j < 1) {
tmp_s[j] = rnd->Rand16();
} else if (val & 0x20) { // Increment by a value within the limit.
- tmp_s[(j % 32) * 32 + j / 32] =
- tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] + (limit - 1);
+ tmp_s[(j % 32) * 32 + j / 32] = static_cast<uint16_t>(
+ tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] + (limit - 1));
} else { // Decrement by a value within the limit.
- tmp_s[(j % 32) * 32 + j / 32] =
- tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] - (limit - 1);
+ tmp_s[(j % 32) * 32 + j / 32] = static_cast<uint16_t>(
+ tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] - (limit - 1));
}
j++;
}