Guard Avg16x16IntegerOverflow test w/ HIGHBITDEPTH Guard the EncodeAPI.Avg16x16IntegerOverflow test with CONFIG_AV1_HIGHBITDEPTH because it requires 12-bit support. Use ASSERT_EQ on the aom_codec_enc_init() call because the test should not proceed further if aom_codec_enc_init() fails. Bug: oss-fuzz:572842743 Change-Id: I6e7dd9393cd46dcc3ef33055524fa29b269e322d
diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc index eb7497f..d08748a 100644 --- a/test/encode_api_test.cc +++ b/test/encode_api_test.cc
@@ -4471,6 +4471,7 @@ ASSERT_EQ(aom_codec_destroy(&enc), AOM_CODEC_OK); } +#if CONFIG_AV1_HIGHBITDEPTH // A test that reproduces issues.oss-fuzz.com/issues/572842743: signed integer // overflow in fill_variance_tree_leaves(). TEST(EncodeAPI, Avg16x16IntegerOverflow) { @@ -4597,7 +4598,7 @@ cfg.rc_min_quantizer = 57; cfg.rc_max_quantizer = 63; aom_codec_ctx_t enc; - EXPECT_EQ(AOM_CODEC_OK, + ASSERT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, iface, &cfg, AOM_CODEC_USE_HIGHBITDEPTH)); EXPECT_EQ(AOM_CODEC_OK, aom_codec_control(&enc, AV1E_SET_TILE_ROWS, 5)); EXPECT_EQ(AOM_CODEC_OK, aom_codec_control(&enc, AV1E_SET_TILE_COLUMNS, 2)); @@ -4690,5 +4691,6 @@ EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc)); } +#endif // CONFIG_AV1_HIGHBITDEPTH } // namespace