test/datarate_test.cc
TEST_P(DatarateTestVP9Large, BasicRateTargetingVBRLagZero) {
  cfg_.rc_min_quantizer = 0;
  cfg_.rc_max_quantizer = 63;
  cfg_.g_error_resilient = 0;
  cfg_.rc_end_usage = VPX_VBR;
  cfg_.g_lag_in_frames = 0;

  ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
                                       30, 1, 0, 300);
  for (int i = 400; i <= 800; i += 400) {
    cfg_.rc_target_bitrate = i;
    ResetModel();
    ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
    ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.75)
        << " The datarate for the file is lower than target by too much!";
    ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.30)
        << " The datarate for the file is greater than target by too much!";
  }
}
// Check basic rate targeting for VBR mode with 0 lag.
Check basic rate targeting for VBR mode with 0 lag.
Check basic rate targeting for VBR mode with 0 lag .
TEST_P(DatarateTestVP9Large, BasicRateTargetingVBRLagZero) {
  cfg_.rc_min_quantizer = 0;
  cfg_.rc_max_quantizer = 63;
  cfg_.g_error_resilient = 0;
  cfg_.rc_end_usage = VPX_VBR;
  cfg_.g_lag_in_frames = 0;
  ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
                                       30, 1, 0, 300);
  for (int i = 400; i <= 800; i += 400) {
    cfg_.rc_target_bitrate = i;
    ResetModel();
    ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
    ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.75)
        << " The datarate for the file is lower than target by too much!";
    ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.30)
        << " The datarate for the file is greater than target by too much!";
  }
}
TEST_P ( DatarateTestVP9Large , BasicRateTargetingVBRLagZero ) { cfg_ . rc_min_quantizer = 0 ; cfg_ . rc_max_quantizer = 63 ; cfg_ . g_error_resilient = 0 ; cfg_ . rc_end_usage = VPX_VBR ; cfg_ . g_lag_in_frames = 0 ; :: libvpx_test :: I420VideoSource video ( " " , 352 , 288 , 30 , 1 , 0 , 300 ) ; for ( int i = 400 ; i <= 800 ; i += 400 ) { cfg_ . rc_target_bitrate = i ; ResetModel ( ) ; ASSERT_NO_FATAL_FAILURE ( RunLoop ( & video ) ) ; ASSERT_GE ( effective_datarate_ [ 0 ] , cfg_ . rc_target_bitrate * 0.75 ) << " " ; ASSERT_LE ( effective_datarate_ [ 0 ] , cfg_ . rc_target_bitrate * 1.30 ) << " " ; } }
Check basic rate targeting for VBR mode with 0 lag.
Check basic rate targeting for VBR mode with 0 lag .