ref: e34944ad26d710e243109c38e2b6731963fee0a2
parent: 5b7960fa82b7c290d0ee833579e799369619ddb5
parent: 95d2dc8981f1ec2da22784c011e1d11e726601e5
author: James Zern <[email protected]>
date: Thu Jun 9 18:54:12 EDT 2016
Merge changes I58081309,I502fd707 * changes: fdct8x8_test: fix unsigned overflow fdct4x4_test: fix unsigned overflow
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -141,11 +141,11 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
- const uint32_t diff =
+ const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
ASSERT_EQ(VPX_BITS_8, bit_depth_);
- const uint32_t diff = dst[j] - src[j];
+ const int diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
if (max_error < error)
@@ -258,10 +258,10 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
- const uint32_t diff =
+ const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
- const uint32_t diff = dst[j] - src[j];
+ const int diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
EXPECT_GE(static_cast<uint32_t>(limit), error)
--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -425,10 +425,10 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
- const uint32_t diff =
+ const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
- const uint32_t diff = dst[j] - src[j];
+ const int diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
EXPECT_GE(1u << 2 * (bit_depth_ - 8), error)
@@ -511,10 +511,10 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
- const uint32_t diff =
+ const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
#else
- const uint32_t diff = dst[j] - ref[j];
+ const int diff = dst[j] - ref[j];
#endif
const uint32_t error = diff * diff;
EXPECT_EQ(0u, error)