test/datarate_test.cc
TEST_P(DatarateTestVP9Large, BasicRateTargetingFrameParDecOff) {
  cfg_.rc_buf_initial_sz = 500;
  cfg_.rc_buf_optimal_sz = 500;
  cfg_.rc_buf_sz = 1000;
  cfg_.rc_dropframe_thresh = 1;
  cfg_.rc_min_quantizer = 0;
  cfg_.rc_max_quantizer = 63;
  cfg_.rc_end_usage = VPX_CBR;
  cfg_.g_lag_in_frames = 0;
  cfg_.g_error_resilient = 0;

  ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
                                       30, 1, 0, 140);
  for (int i = 150; i < 800; i += 200) {
    cfg_.rc_target_bitrate = i;
    ResetModel();
    frame_parallel_decoding_mode_ = 0;
    ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
    ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.85)
        << " The datarate for the file is lower than target by too much!";
    ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.15)
        << " The datarate for the file is greater than target by too much!";
  }
}
// Check basic rate targeting for CBR mode, with frame_parallel_decoding_mode
// off( and error_resilience off).
Check basic rate targeting for CBR mode, with frame_parallel_decoding_mode
off( and error_resilience off).
Check basic rate targeting for CBR mode with frame_parallel_decoding_mode off ( and error_resilience off ) .
TEST_P(DatarateTestVP9Large, BasicRateTargetingFrameParDecOff) {
  cfg_.rc_buf_initial_sz = 500;
  cfg_.rc_buf_optimal_sz = 500;
  cfg_.rc_buf_sz = 1000;
  cfg_.rc_dropframe_thresh = 1;
  cfg_.rc_min_quantizer = 0;
  cfg_.rc_max_quantizer = 63;
  cfg_.rc_end_usage = VPX_CBR;
  cfg_.g_lag_in_frames = 0;
  cfg_.g_error_resilient = 0;
  ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
                                       30, 1, 0, 140);
  for (int i = 150; i < 800; i += 200) {
    cfg_.rc_target_bitrate = i;
    ResetModel();
    frame_parallel_decoding_mode_ = 0;
    ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
    ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.85)
        << " The datarate for the file is lower than target by too much!";
    ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.15)
        << " The datarate for the file is greater than target by too much!";
  }
}
TEST_P ( DatarateTestVP9Large , BasicRateTargetingFrameParDecOff ) { cfg_ . rc_buf_initial_sz = 500 ; cfg_ . rc_buf_optimal_sz = 500 ; cfg_ . rc_buf_sz = 1000 ; cfg_ . rc_dropframe_thresh = 1 ; cfg_ . rc_min_quantizer = 0 ; cfg_ . rc_max_quantizer = 63 ; cfg_ . rc_end_usage = VPX_CBR ; cfg_ . g_lag_in_frames = 0 ; cfg_ . g_error_resilient = 0 ; :: libvpx_test :: I420VideoSource video ( " " , 352 , 288 , 30 , 1 , 0 , 140 ) ; for ( int i = 150 ; i < 800 ; i += 200 ) { cfg_ . rc_target_bitrate = i ; ResetModel ( ) ; frame_parallel_decoding_mode_ = 0 ; ASSERT_NO_FATAL_FAILURE ( RunLoop ( & video ) ) ; ASSERT_GE ( effective_datarate_ [ 0 ] , cfg_ . rc_target_bitrate * 0.85 ) << " " ; ASSERT_LE ( effective_datarate_ [ 0 ] , cfg_ . rc_target_bitrate * 1.15 ) << " " ; } }
Check basic rate targeting for CBR mode, with frame_parallel_decoding_mode
off( and error_resilience off).
Check basic rate targeting for CBR mode with frame_parallel_decoding_mode off ( and error_resilience off ) .