Configure tiles in tests when using ext-tile.
With ext-tile enabled, the encoder test driver needs to configure the tile sizes wit different values to encode using a single tile, and to decode all tiles. This should fix most unit test failures. Change-Id: I0a0d26737414669791f3bd8d80c537db09f06072
This commit is contained in:
@@ -45,11 +45,14 @@ void Encoder::InitEncoder(VideoSource *video) {
|
|||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP10_ENCODER
|
#if CONFIG_VP10_ENCODER
|
||||||
if (CodecInterface() == &vpx_codec_vp10_cx_algo) {
|
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;
|
const int log2_tile_columns = 0;
|
||||||
res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
|
res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
|
||||||
log2_tile_columns);
|
log2_tile_columns);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
|
#endif // !CONFIG_EXT_TILE
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -175,6 +178,12 @@ void EncoderTest::MismatchHook(const vpx_image_t* /*img1*/,
|
|||||||
void EncoderTest::RunLoop(VideoSource *video) {
|
void EncoderTest::RunLoop(VideoSource *video) {
|
||||||
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
|
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();
|
stats_.Reset();
|
||||||
|
|
||||||
ASSERT_TRUE(passes_ == 1 || passes_ == 2);
|
ASSERT_TRUE(passes_ == 1 || passes_ == 2);
|
||||||
|
@@ -61,6 +61,10 @@ class SvcTest : public ::testing::Test {
|
|||||||
codec_enc_.kf_max_dist = 100;
|
codec_enc_.kf_max_dist = 100;
|
||||||
|
|
||||||
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
|
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;
|
VP9CodecFactory codec_factory;
|
||||||
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
|
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
|
||||||
|
|
||||||
|
@@ -33,6 +33,10 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
|
|||||||
cfg.w = 704;
|
cfg.w = 704;
|
||||||
cfg.h = 144;
|
cfg.h = 144;
|
||||||
cfg.threads = 1;
|
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);
|
fw_dec_ = codec_->CreateDecoder(cfg, 0);
|
||||||
inv_dec_ = codec_->CreateDecoder(cfg, 0);
|
inv_dec_ = codec_->CreateDecoder(cfg, 0);
|
||||||
inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1);
|
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));
|
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));
|
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 1, 1));
|
||||||
|
#endif // CONFIG_EXT_TILE
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@@ -32,6 +32,10 @@ class VPxEncoderThreadTest
|
|||||||
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
||||||
cfg.w = 1280;
|
cfg.w = 1280;
|
||||||
cfg.h = 720;
|
cfg.h = 720;
|
||||||
|
#if CONFIG_EXT_TILE
|
||||||
|
cfg.tile_col = -1;
|
||||||
|
cfg.tile_row = -1;
|
||||||
|
#endif // CONFIG_EXT_TILE
|
||||||
decoder_ = codec_->CreateDecoder(cfg, 0);
|
decoder_ = codec_->CreateDecoder(cfg, 0);
|
||||||
|
|
||||||
md5_.clear();
|
md5_.clear();
|
||||||
|
Reference in New Issue
Block a user