test/svc_datarate_test.cc
// Check basic rate targeting for 1 pass CBR SVC: 3 spatial layers and
// 2 temporal layers, with a change on the fly from the fixed SVC pattern to one
// generate via SVC_SET_REF_FRAME_CONFIG. The new pattern also disables
// inter-layer prediction.
Check basic rate targeting for 1 pass CBR SVC: 3 spatial layers and
2 temporal layers, with a change on the fly from the fixed SVC pattern to one
generate via SVC_SET_REF_FRAME_CONFIG. The new pattern also disables
inter-layer prediction.
Check basic rate targeting for 1 pass CBR SVC : 3 spatial layers and 2 temporal layers with a change on the fly from the fixed SVC pattern to one generate via SVC_SET_REF_FRAME_CONFIG . The new pattern also disables inter - layer prediction .
TEST_P(DatarateOnePassCbrSvcSingleBR, OnePassCbrSvc3SL2TLDynamicPatternChange) {
  SetSvcConfig(3, 2);
  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;
  cfg_.rc_target_bitrate = 800;
  ResetModel();
  update_pattern_ = 1;
  AssignLayerBitrates();
  ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
  CheckLayerRateTargeting(number_spatial_layers_, number_temporal_layers_, 0.78,
                          1.15);
#if CONFIG_VP9_DECODER
  EXPECT_EQ(GetNonRefFrames(), GetMismatchFrames());
#endif
}
TEST_P ( DatarateOnePassCbrSvcSingleBR , OnePassCbrSvc3SL2TLDynamicPatternChange ) { SetSvcConfig ( 3 , 2 ) ; 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 ; cfg_ . rc_target_bitrate = 800 ; ResetModel ( ) ; update_pattern_ = 1 ; AssignLayerBitrates ( ) ; ASSERT_NO_FATAL_FAILURE ( RunLoop ( & video ) ) ; CheckLayerRateTargeting ( number_spatial_layers_ , number_temporal_layers_ , 0.78 , 1.15 ) ; #if CONFIG_VP9_DECODER EXPECT_EQ ( GetNonRefFrames ( ) , GetMismatchFrames ( ) ) ; #endif }
Check basic rate targeting for 1 pass CBR SVC: 3 spatial layers and
2 temporal layers, with a change on the fly from the fixed SVC pattern to one
generate via SVC_SET_REF_FRAME_CONFIG.
Check basic rate targeting for 1 pass CBR SVC : 3 spatial layers and 2 temporal layers with a change on the fly from the fixed SVC pattern to one generate via SVC_SET_REF_FRAME_CONFIG .
// Change SVC pattern on the fly. // The non-reference frames are expected to be mismatched frames as the // encoder will avoid loopfilter on these frames.