diff options
author | trav90 <travawine@palemoon.org> | 2018-10-19 23:05:00 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-19 23:05:03 -0500 |
commit | d2499ead93dc4298c0882fe98902acb1b5209f99 (patch) | |
tree | cb0b942aed59e5108f9a3e9d64e7b77854383421 /third_party/aom/test/invalid_file_test.cc | |
parent | 41fbdea457bf50c0a43e1c27c5cbf7f0a3a9eb33 (diff) | |
download | UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.gz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.lz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.xz UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.zip |
Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591
Diffstat (limited to 'third_party/aom/test/invalid_file_test.cc')
-rw-r--r-- | third_party/aom/test/invalid_file_test.cc | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/third_party/aom/test/invalid_file_test.cc b/third_party/aom/test/invalid_file_test.cc index 869f3da66..5b4f5a6c3 100644 --- a/third_party/aom/test/invalid_file_test.cc +++ b/third_party/aom/test/invalid_file_test.cc @@ -49,29 +49,31 @@ class InvalidFileTest : public ::libaom_test::DecoderTest, const libaom_test::CompressedVideoSource &video, libaom_test::Decoder *decoder) { EXPECT_TRUE(res_file_ != NULL); - int expected_res_dec; + int expected_res_dec = -1; // Read integer result. const int res = fscanf(res_file_, "%d", &expected_res_dec); EXPECT_NE(res, EOF) << "Read result data failed"; - // Check results match. - const DecodeParam input = GET_PARAM(1); - if (input.threads > 1) { - // The serial decode check is too strict for tile-threaded decoding as - // there is no guarantee on the decode order nor which specific error - // will take precedence. Currently a tile-level error is not forwarded so - // the frame will simply be marked corrupt. - EXPECT_TRUE(res_dec == expected_res_dec || - res_dec == AOM_CODEC_CORRUPT_FRAME) - << "Results don't match: frame number = " << video.frame_number() - << ". (" << decoder->DecodeError() - << "). Expected: " << expected_res_dec << " or " - << AOM_CODEC_CORRUPT_FRAME; - } else { - EXPECT_EQ(expected_res_dec, res_dec) - << "Results don't match: frame number = " << video.frame_number() - << ". (" << decoder->DecodeError() << ")"; + if (expected_res_dec != -1) { + // Check results match. + const DecodeParam input = GET_PARAM(1); + if (input.threads > 1) { + // The serial decode check is too strict for tile-threaded decoding as + // there is no guarantee on the decode order nor which specific error + // will take precedence. Currently a tile-level error is not forwarded + // so the frame will simply be marked corrupt. + EXPECT_TRUE(res_dec == expected_res_dec || + res_dec == AOM_CODEC_CORRUPT_FRAME) + << "Results don't match: frame number = " << video.frame_number() + << ". (" << decoder->DecodeError() + << "). Expected: " << expected_res_dec << " or " + << AOM_CODEC_CORRUPT_FRAME; + } else { + EXPECT_EQ(expected_res_dec, res_dec) + << "Results don't match: frame number = " << video.frame_number() + << ". (" << decoder->DecodeError() << ")"; + } } return !HasFailure(); @@ -106,6 +108,12 @@ TEST_P(InvalidFileTest, ReturnCode) { RunTest(); } const DecodeParam kAV1InvalidFileTests[] = { { 1, "invalid-bug-1814.ivf" }, + { 4, "invalid-oss-fuzz-9463.ivf" }, + { 1, "invalid-oss-fuzz-9482.ivf" }, + { 1, "invalid-oss-fuzz-9720.ivf" }, + { 1, "invalid-oss-fuzz-10061.ivf" }, + { 1, "invalid-oss-fuzz-10117-mc-buf-use-highbd.ivf" }, + { 1, "invalid-oss-fuzz-10227.ivf" }, }; AV1_INSTANTIATE_TEST_CASE(InvalidFileTest, |