Commit e88ce744 authored by Debargha Mukherjee's avatar Debargha Mukherjee Committed by Gerrit Code Review
Browse files

Merge "Configure tiles in tests when using ext-tile." into nextgenv2

parents 9f35cafa 67a2ff7f
......@@ -45,11 +45,14 @@ void Encoder::InitEncoder(VideoSource *video) {
#endif
#if CONFIG_VP10_ENCODER
if (CodecInterface() == &vpx_codec_vp10_cx_algo) {
// Default to 1 tile column for VP10.
// Default to 1 tile column for VP10. With CONFIG_EXT_TILE, the
// default is already the largest possible tile size
#if !CONFIG_EXT_TILE
const int log2_tile_columns = 0;
res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
log2_tile_columns);
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
#endif // !CONFIG_EXT_TILE
} else
#endif
{
......@@ -175,6 +178,12 @@ void EncoderTest::MismatchHook(const vpx_image_t* /*img1*/,
void EncoderTest::RunLoop(VideoSource *video) {
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
#if CONFIG_EXT_TILE
// Decode all tiles.
dec_cfg.tile_col = -1;
dec_cfg.tile_row = -1;
#endif // CONFIG_EXT_TILE
stats_.Reset();
ASSERT_TRUE(passes_ == 1 || passes_ == 2);
......
......@@ -61,6 +61,10 @@ class SvcTest : public ::testing::Test {
codec_enc_.kf_max_dist = 100;
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
#if CONFIG_EXT_TILE
dec_cfg.tile_col = -1;
dec_cfg.tile_row = -1;
#endif // CONFIG_EXT_TILE
VP9CodecFactory codec_factory;
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
......
......@@ -33,6 +33,10 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
cfg.w = 704;
cfg.h = 144;
cfg.threads = 1;
#if CONFIG_EXT_TILE
cfg.tile_col = -1;
cfg.tile_row = -1;
#endif // CONFIG_EXT_TILE
fw_dec_ = codec_->CreateDecoder(cfg, 0);
inv_dec_ = codec_->CreateDecoder(cfg, 0);
inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1);
......@@ -104,5 +108,9 @@ TEST_P(TileIndependenceTest, MD5Match) {
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
#if CONFIG_EXT_TILE
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Values(1, 2, 32));
#else
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 1, 1));
#endif // CONFIG_EXT_TILE
} // namespace
......@@ -32,6 +32,10 @@ class VPxEncoderThreadTest
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.w = 1280;
cfg.h = 720;
#if CONFIG_EXT_TILE
cfg.tile_col = -1;
cfg.tile_row = -1;
#endif // CONFIG_EXT_TILE
decoder_ = codec_->CreateDecoder(cfg, 0);
md5_.clear();
......
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