Moves the def from vpx_encoder.h -> vpx_codec.h. The defined value is changed as part of this move. Adds the value to decoder capabilities when CONFIG_VP9_HIGHBITDEPTH.
Showing the changes to test/encode_api_test.cc (1 of 5 files). Show all
Unified · Split
| @@ -62,4 +62,21 @@ TEST(EncodeAPI, InvalidParams) { · 61 unmodified lines | ||
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | +TEST(EncodeAPI, HighBitDepthCapability) { | |
| 66 | +// VP8 should not claim VP9 HBD as a capability. | |
| 67 | +#if CONFIG_VP8_ENCODER | |
| 68 | + const vpx_codec_caps_t vp8_caps = vpx_codec_get_caps(&vpx_codec_vp8_cx_algo); | |
| 69 | + EXPECT_EQ(vp8_caps & VPX_CODEC_CAP_HIGHBITDEPTH, 0); | |
| 70 | +#endif | |
| 71 | + | |
| 72 | +#if CONFIG_VP9_ENCODER | |
| 73 | + const vpx_codec_caps_t vp9_caps = vpx_codec_get_caps(&vpx_codec_vp9_cx_algo); | |
| 74 | +#if CONFIG_VP9_HIGHBITDEPTH | |
| 75 | + EXPECT_EQ(vp9_caps & VPX_CODEC_CAP_HIGHBITDEPTH, VPX_CODEC_CAP_HIGHBITDEPTH); | |
| 76 | +#else | |
| 77 | + EXPECT_EQ(vp9_caps & VPX_CODEC_CAP_HIGHBITDEPTH, 0); | |
| 78 | +#endif | |
| 79 | +#endif | |
| 80 | +} | |
| 81 | + | |
| 65 | 82 | } // namespace |