Commit 76750350 authored by Jerome Jiang's avatar Jerome Jiang
Browse files

Add unit test to expose vp8 bug when width is set odd.

BUG=b/64710201

Change-Id: Ia518af5494a42e80949cf1165244fbed59606cf7
parent 0726dd97
......@@ -79,4 +79,31 @@ TEST(EncodeAPI, HighBitDepthCapability) {
#endif
}
#if CONFIG_VP8_ENCODER
TEST(EncodeAPI, DISABLED_ImageSizeSetting) {
const int width = 711;
const int height = 360;
const int bps = 12;
vpx_image_t img;
vpx_codec_ctx_t enc;
vpx_codec_enc_cfg_t cfg;
uint8_t *img_buf = reinterpret_cast<uint8_t *>(
calloc(width * height * bps / 8, sizeof(*img_buf)));
vpx_codec_enc_config_default(vpx_codec_vp8_cx(), &cfg, 0);
cfg.g_w = width;
cfg.g_h = height;
vpx_img_wrap(&img, VPX_IMG_FMT_I420, width, height, 1, img_buf);
vpx_codec_enc_init(&enc, vpx_codec_vp8_cx(), &cfg, 0);
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_encode(&enc, &img, 0, 1, 0, 0));
free(img_buf);
vpx_codec_destroy(&enc);
}
#endif
} // namespace
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment