summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHien Ho <hienho@google.com>2019-08-21 22:13:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-08-21 22:13:35 +0000
commit0d4453c8fe16a3423c8b17546488e9f464e2fff4 (patch)
treede1b9c6024451304571f8150ce8baa0109196cd3 /test
parent9b8acbfee4608db95c761e95887aadf69015d045 (diff)
parenta7059eca33bc3bac7e3b71e2099b2fc578230353 (diff)
downloadlibvpx-0d4453c8fe16a3423c8b17546488e9f464e2fff4.tar
libvpx-0d4453c8fe16a3423c8b17546488e9f464e2fff4.tar.gz
libvpx-0d4453c8fe16a3423c8b17546488e9f464e2fff4.tar.bz2
libvpx-0d4453c8fe16a3423c8b17546488e9f464e2fff4.zip
Merge "test/lpf_test: fix int sanitizer warning"
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++;
}