test/svc_datarate_test.cc
TEST_P(DatarateOnePassCbrSvcMultiBR, OnePassCbrSvc2SL3TL) {
  SetSvcConfig(2, 3);
  cfg_.rc_buf_initial_sz = 500;
  cfg_.rc_buf_optimal_sz = 500;
  cfg_.rc_buf_sz = 1000;
  cfg_.rc_min_quantizer = 0;
  cfg_.rc_max_quantizer = 63;
  cfg_.g_threads = 1;
  cfg_.rc_dropframe_thresh = 30;
  cfg_.kf_max_dist = 9999;
  ::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
                                       0, 400);
  top_sl_width_ = 640;
  top_sl_height_ = 480;
  const int bitrates[3] = { 200, 400, 600 };
  // TODO(marpan): Check that effective_datarate for each layer hits the
  // layer target_bitrate.
  cfg_.rc_target_bitrate = bitrates[GET_PARAM(2)];
  ResetModel();
  AssignLayerBitrates();
  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
  CheckLayerRateTargeting(number_spatial_layers_, number_temporal_layers_, 0.75,
                          1.2);
#if CONFIG_VP9_DECODER
  // The non-reference frames are expected to be mismatched frames as the
  // encoder will avoid loopfilter on these frames.
  EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
// 3 temporal layers. Run CIF clip with 1 thread.
Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
3 temporal layers. Run CIF clip with 1 thread.
Check basic rate targeting for 1 pass CBR SVC : 2 spatial layers and 3 temporal layers . Run CIF clip with 1 thread .
TEST_P(DatarateOnePassCbrSvcMultiBR, OnePassCbrSvc2SL3TL) {
  SetSvcConfig(2, 3);
  cfg_.rc_buf_initial_sz = 500;
  cfg_.rc_buf_optimal_sz = 500;
  cfg_.rc_buf_sz = 1000;
  cfg_.rc_min_quantizer = 0;
  cfg_.rc_max_quantizer = 63;
  cfg_.g_threads = 1;
  cfg_.rc_dropframe_thresh = 30;
  cfg_.kf_max_dist = 9999;
  ::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
                                       0, 400);
  top_sl_width_ = 640;
  top_sl_height_ = 480;
  const int bitrates[3] = { 200, 400, 600 };
  cfg_.rc_target_bitrate = bitrates[GET_PARAM(2)];
  ResetModel();
  AssignLayerBitrates();
  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
  CheckLayerRateTargeting(number_spatial_layers_, number_temporal_layers_, 0.75,
                          1.2);
#if CONFIG_VP9_DECODER
  EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
TEST_P ( DatarateOnePassCbrSvcMultiBR , OnePassCbrSvc2SL3TL ) { SetSvcConfig ( 2 , 3 ) ; cfg_ . rc_buf_initial_sz = 500 ; cfg_ . rc_buf_optimal_sz = 500 ; cfg_ . rc_buf_sz = 1000 ; cfg_ . rc_min_quantizer = 0 ; cfg_ . rc_max_quantizer = 63 ; cfg_ . g_threads = 1 ; cfg_ . rc_dropframe_thresh = 30 ; cfg_ . kf_max_dist = 9999 ; :: libvpx_test :: I420VideoSource video ( " " , 640 , 480 , 30 , 1 , 0 , 400 ) ; top_sl_width_ = 640 ; top_sl_height_ = 480 ; const int bitrates [ 3 ] = { 200 , 400 , 600 } ; cfg_ . rc_target_bitrate = bitrates [ GET_PARAM ( 2 ) ] ; ResetModel ( ) ; AssignLayerBitrates ( ) ; ASSERT_NO_FATAL_FAILURE ( RunLoop ( & video ) ) ; CheckLayerRateTargeting ( number_spatial_layers_ , number_temporal_layers_ , 0.75 , 1.2 ) ; #if CONFIG_VP9_DECODER EXPECT_EQ ( GetNonRefFrames ( ) , GetMismatchFrames ( ) ) ; #endif }
Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
3 temporal layers.
Check basic rate targeting for 1 pass CBR SVC : 2 spatial layers and 3 temporal layers .
// TODO(marpan): Check that effective_datarate for each layer hits the // layer target_bitrate. // The non-reference frames are expected to be mismatched frames as the // encoder will avoid loopfilter on these frames.