From: Johann Date: Fri, 19 Dec 2014 01:36:58 +0000 (-0800) Subject: Ensure the error-concealment code is available X-Git-Tag: v1.4.0~196^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39a74e19fb1dd69933a5683f341aedeacb087965;p=libvpx Ensure the error-concealment code is available When it's configured, make sure it can be configured. When it's not, make sure it fails. Change-Id: I857d4b8014547ddbad70395f17e58d5838bd142f --- diff --git a/test/decode_api_test.cc b/test/decode_api_test.cc index 2837f8cbe..f9b13f631 100644 --- a/test/decode_api_test.cc +++ b/test/decode_api_test.cc @@ -57,6 +57,21 @@ TEST(DecodeAPI, InvalidParams) { } } +#if CONFIG_VP8_DECODER +TEST(DecodeAPI, OptionalParams) { + vpx_codec_ctx_t dec; + +#if CONFIG_ERROR_CONCEALMENT + EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, NULL, + VPX_CODEC_USE_ERROR_CONCEALMENT)); +#else + EXPECT_EQ(VPX_CODEC_INCAPABLE, + vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, NULL, + VPX_CODEC_USE_ERROR_CONCEALMENT)); +#endif // CONFIG_ERROR_CONCEALMENT +} +#endif // CONFIG_VP8_DECODER + #if CONFIG_VP9_DECODER // Test VP9 codec controls after a decode error to ensure the code doesn't // misbehave.