Lines Matching full:svc_
36 memset(&svc_, 0, sizeof(svc_));
44 svc_.first_frame_full_size = 1;
45 svc_.encoding_mode = INTER_LAYER_PREDICTION_IP;
46 svc_.log_level = SVC_LOG_DEBUG;
47 svc_.log_print = 0;
67 vpx_svc_release(&svc_);
72 SvcContext svc_;
85 res = vpx_svc_init(&svc_, NULL, codec_iface_, &codec_enc_);
87 res = vpx_svc_init(&svc_, &codec_, NULL, &codec_enc_);
90 res = vpx_svc_init(&svc_, &codec_, codec_iface_, NULL);
93 svc_.spatial_layers = 6; // too many layers
94 res = vpx_svc_init(&svc_, &codec_, codec_iface_, &codec_enc_);
97 svc_.spatial_layers = 0; // use default layers
98 res = vpx_svc_init(&svc_, &codec_, codec_iface_, &codec_enc_);
101 EXPECT_EQ(VPX_SS_DEFAULT_LAYERS, svc_.spatial_layers);
105 svc_.spatial_layers = 2;
106 vpx_svc_set_scale_factors(&svc_, "4/16,16*16"); // invalid scale values
107 vpx_codec_err_t res = vpx_svc_init(&svc_, &codec_, codec_iface_, &codec_enc_);
110 vpx_svc_set_scale_factors(&svc_, "4/16,16/16"); // valid scale values
111 res = vpx_svc_init(&svc_, &codec_, codec_iface_, &codec_enc_);
117 vpx_codec_err_t res = vpx_svc_set_options(&svc_, NULL);
120 res = vpx_svc_set_options(&svc_, "not-an-option=1");
122 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
127 vpx_codec_err_t res = vpx_svc_set_options(&svc_, "layers=3");
129 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
132 EXPECT_EQ(3, svc_.spatial_layers);
136 vpx_codec_err_t res = vpx_svc_set_options(&svc_, "encoding-mode=alt-ip");
138 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
141 EXPECT_EQ(ALT_INTER_LAYER_PREDICTION_IP, svc_.encoding_mode);
145 vpx_codec_err_t res = vpx_svc_set_options(&svc_, "layers=2 encoding-mode=ip");
146 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
149 EXPECT_EQ(2, svc_.spatial_layers);
150 EXPECT_EQ(INTER_LAYER_PREDICTION_IP, svc_.encoding_mode);
154 svc_.spatial_layers = 2;
156 vpx_svc_set_options(&svc_, "scale-factors=not-scale-factors");
158 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
161 res = vpx_svc_set_options(&svc_, "scale-factors=1/3,2/3");
163 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
169 svc_.spatial_layers = 2;
170 vpx_codec_err_t res = vpx_svc_set_options(&svc_, "quantizers=not-quantizers");
172 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
175 vpx_svc_set_options(&svc_, "quantizers=40,45");
176 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
185 res = vpx_svc_set_quantizers(&svc_, NULL);
188 svc_.first_frame_full_size = 0;
189 svc_.spatial_layers = 2;
190 res = vpx_svc_set_quantizers(&svc_, "40");
192 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
195 res = vpx_svc_set_quantizers(&svc_, "40,30");
197 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
206 res = vpx_svc_set_scale_factors(&svc_, NULL);
209 svc_.first_frame_full_size = 0;
210 svc_.spatial_layers = 2;
211 res = vpx_svc_set_scale_factors(&svc_, "4/16");
213 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
216 res = vpx_svc_set_scale_factors(&svc_, "4/16,16/16");
218 res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
227 svc_.first_frame_full_size = 0;
228 svc_.spatial_layers = 2;
229 vpx_svc_set_scale_factors(&svc_, "4/16,16/16");
230 vpx_svc_set_quantizers(&svc_, "40,30");
233 vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
242 res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
247 static_cast<const uint8_t *>(vpx_svc_get_buffer(&svc_)),
248 vpx_svc_get_frame_size(&svc_));
255 svc_.first_frame_full_size = 1;
256 svc_.spatial_layers = 2;
257 vpx_svc_set_scale_factors(&svc_, "4/16,16/16");
258 vpx_svc_set_quantizers(&svc_, "40,30");
261 vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
271 res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
274 EXPECT_EQ(1, vpx_svc_is_keyframe(&svc_));
277 static_cast<const uint8_t *>(vpx_svc_get_buffer(&svc_)),
278 vpx_svc_get_frame_size(&svc_));
284 res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
287 EXPECT_EQ(1, vpx_svc_is_keyframe(&svc_));
290 static_cast<const uint8_t *>(vpx_svc_get_buffer(&svc_)),
291 vpx_svc_get_frame_size(&svc_));
297 res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
300 EXPECT_EQ(0, vpx_svc_is_keyframe(&svc_));
303 static_cast<const uint8_t *>(vpx_svc_get_buffer(&svc_)),
304 vpx_svc_get_frame_size(&svc_));
309 svc_.first_frame_full_size = 0;
310 svc_.spatial_layers = 2;
311 vpx_svc_set_scale_factors(&svc_, "4/16,8/16");
312 vpx_svc_set_quantizers(&svc_, "40,30");
315 vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_);
321 res = vpx_svc_get_layer_resolution(&svc_, svc_.spatial_layers,
328 res = vpx_svc_get_layer_resolution(&svc_, 0, NULL, &layer_height);
331 res = vpx_svc_get_layer_resolution(&svc_, 0, &layer_width, NULL);
334 res = vpx_svc_get_layer_resolution(&svc_, 0, &layer_width, &layer_height);
339 res = vpx_svc_get_layer_resolution(&svc_, 1, &layer_width, &layer_height);