Index: source/libvpx/test/svc_test.cc |
=================================================================== |
--- source/libvpx/test/svc_test.cc (revision 284462) |
+++ source/libvpx/test/svc_test.cc (working copy) |
@@ -167,6 +167,24 @@ |
codec_initialized_ = true; |
} |
+TEST_F(SvcTest, SetAutoAltRefOption) { |
+ svc_.spatial_layers = 5; |
+ vpx_codec_err_t res = vpx_svc_set_options(&svc_, "auto-alt-refs=none"); |
+ EXPECT_EQ(VPX_CODEC_OK, res); |
+ res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); |
+ EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); |
+ |
+ res = vpx_svc_set_options(&svc_, "auto-alt-refs=1,1,1,1,0"); |
+ EXPECT_EQ(VPX_CODEC_OK, res); |
+ res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); |
+ EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); |
+ |
+ vpx_svc_set_options(&svc_, "auto-alt-refs=0,1,1,1,0"); |
+ res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); |
+ EXPECT_EQ(VPX_CODEC_OK, res); |
+ codec_initialized_ = true; |
+} |
+ |
TEST_F(SvcTest, SetQuantizers) { |
vpx_codec_err_t res = vpx_svc_set_quantizers(NULL, "40,30"); |
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); |
@@ -362,6 +380,7 @@ |
codec_enc_.g_pass = VPX_RC_FIRST_PASS; |
vpx_svc_set_scale_factors(&svc_, "4/16,16/16"); |
vpx_svc_set_quantizers(&svc_, "40,30"); |
+ vpx_svc_set_options(&svc_, "auto-alt-refs=1,1"); |
vpx_codec_err_t res = |
vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); |
@@ -410,6 +429,9 @@ |
vpx_codec_err_t res_dec; |
int frame_size; |
codec_enc_.g_pass = VPX_RC_LAST_PASS; |
+ vpx_svc_set_scale_factors(&svc_, "4/16,16/16"); |
+ vpx_svc_set_quantizers(&svc_, "40,30"); |
+ vpx_svc_set_options(&svc_, "auto-alt-refs=1,1"); |
codec_enc_.rc_twopass_stats_in.buf = &stats_buf[0]; |
codec_enc_.rc_twopass_stats_in.sz = stats_buf.size(); |