if (video->frame() == 0) {
encoder->Control(VP8E_SET_CPUUSED, 7);
encoder->Control(VP9E_SET_AQ_MODE, aq_mode_);
- encoder->Control(VP9E_SET_TUNE_CONTENT, 0);
+ if (rc_cfg_.is_screen) {
+ encoder->Control(VP9E_SET_TUNE_CONTENT, VP9E_CONTENT_SCREEN);
+ } else {
+ encoder->Control(VP9E_SET_TUNE_CONTENT, VP9E_CONTENT_DEFAULT);
+ }
encoder->Control(VP8E_SET_MAX_INTRA_BITRATE_PCT, 1000);
encoder->Control(VP9E_SET_RTC_EXTERNAL_RATECTRL, 1);
}
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
+ void RunOneLayerScreen() {
+ SetConfig(GET_PARAM(2));
+ rc_cfg_.is_screen = true;
+ rc_api_ = libvpx::VP9RateControlRTC::Create(rc_cfg_);
+ frame_params_.spatial_layer_id = 0;
+ frame_params_.temporal_layer_id = 0;
+
+ ::libvpx_test::I420VideoSource video("desktop_office1.1280_720-020.yuv",
+ 1280, 720, 30, 1, 0, kNumFrames);
+
+ ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
+ }
+
void RunOneLayerDropFramesCBR() {
if (GET_PARAM(2) != VPX_CBR) {
GTEST_SKIP() << "Frame dropping is only for CBR mode.";
TEST_P(RcInterfaceTest, OneLayerDropFramesCBR) { RunOneLayerDropFramesCBR(); }
+TEST_P(RcInterfaceTest, OneLayerScreen) { RunOneLayerScreen(); }
+
TEST_P(RcInterfaceTest, OneLayerVBRPeriodicKey) { RunOneLayerVBRPeriodicKey(); }
TEST_P(RcInterfaceSvcTest, Svc) { RunSvc(); }
cpi->rc.hybrid_intra_scene_change = 0;
cpi->rc.re_encode_maxq_scene_change = 0;
if (cm->show_frame && cpi->oxcf.mode == REALTIME &&
+ !cpi->disable_scene_detection_rtc_ratectrl &&
(cpi->oxcf.rc_mode == VPX_VBR ||
cpi->oxcf.content == VP9E_CONTENT_SCREEN ||
(cpi->oxcf.speed >= 5 && cpi->oxcf.speed < 8)))
else
q = qclamp;
}
- if (cpi->oxcf.content == VP9E_CONTENT_SCREEN)
+ if (cpi->oxcf.content == VP9E_CONTENT_SCREEN &&
+ cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
vp9_cyclic_refresh_limit_q(cpi, &q);
return VPXMAX(VPXMIN(q, cpi->rc.worst_quality), cpi->rc.best_quality);
}
oxcf->under_shoot_pct = rc_cfg.undershoot_pct;
oxcf->over_shoot_pct = rc_cfg.overshoot_pct;
oxcf->drop_frames_water_mark = rc_cfg.frame_drop_thresh;
+ oxcf->content = rc_cfg.is_screen ? VP9E_CONTENT_SCREEN : VP9E_CONTENT_DEFAULT;
oxcf->ss_number_layers = rc_cfg.ss_number_layers;
oxcf->ts_number_layers = rc_cfg.ts_number_layers;
oxcf->temporal_layering_mode = (VP9E_TEMPORAL_LAYERING_MODE)(