Fix UBSAN/IOC errors
1. test/dct16x16_test.cc 2. test/dct32x32_test.cc 3. test/fdct8x8_test.cc BUG=webm:1225 Change-Id: I9c9315fbd65ddb3b44f688e01ba265fd22192198
This commit is contained in:
Родитель
787b38ebb9
Коммит
6382727dc5
|
@ -373,10 +373,10 @@ class Trans16x16TestBase {
|
|||
|
||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
const uint32_t diff =
|
||||
const int32_t diff =
|
||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||
#else
|
||||
const uint32_t diff = dst[j] - src[j];
|
||||
const int32_t diff = dst[j] - src[j];
|
||||
#endif
|
||||
const uint32_t error = diff * diff;
|
||||
if (max_error < error)
|
||||
|
|
|
@ -154,10 +154,10 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
|
|||
|
||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
const uint32_t diff =
|
||||
const int32_t diff =
|
||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||
#else
|
||||
const uint32_t diff = dst[j] - src[j];
|
||||
const int32_t diff = dst[j] - src[j];
|
||||
#endif
|
||||
const uint32_t error = diff * diff;
|
||||
if (max_error < error)
|
||||
|
|
|
@ -458,7 +458,7 @@ class FwdTrans8x8TestBase {
|
|||
coeff_r[j] = static_cast<tran_low_t>(round(out_r[j]));
|
||||
|
||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||
const uint32_t diff = coeff[j] - coeff_r[j];
|
||||
const int32_t diff = coeff[j] - coeff_r[j];
|
||||
const uint32_t error = diff * diff;
|
||||
EXPECT_GE(9u << 2 * (bit_depth_ - 8), error)
|
||||
<< "Error: 8x8 DCT has error " << error
|
||||
|
|
Загрузка…
Ссылка в новой задаче