ref: 93bb9d8328f9548efdce06ac9d3e84a5e0a28340
parent: 73ab008d26a0b61920267b6d24b31101bbfde2f3
author: Marco Paniconi <marpan@google.com>
date: Fri May 24 06:32:08 EDT 2019
vp9-rtc: Update overshoot_detection speed feature Keep the overshoot_detection_cbr_rt to the fast mode (FAST_DETECTION_MAXQ), except for low-resoln at speed 5, for non-screen content. The increase in encode time (from using the more accurate RE_ENCODE_MAXQ) is acceptable for speed 5 at low resoln. Change-Id: I3089d1505553154ef046056465bc18130f7bd55a
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -618,8 +618,13 @@
// increase in encoding time.
if (cpi->use_svc && svc->spatial_layer_id > 0) sf->nonrd_keyframe = 1;
if (cm->frame_type != KEY_FRAME && cpi->resize_state == ORIG &&
- cpi->oxcf.rc_mode == VPX_CBR)
- sf->overshoot_detection_cbr_rt = FAST_DETECTION_MAXQ;
+ cpi->oxcf.rc_mode == VPX_CBR) {
+ if (cm->width * cm->height <= 352 * 288 && !cpi->use_svc &&
+ cpi->oxcf.content != VP9E_CONTENT_SCREEN)
+ sf->overshoot_detection_cbr_rt = RE_ENCODE_MAXQ;
+ else
+ sf->overshoot_detection_cbr_rt = FAST_DETECTION_MAXQ;
+ }
if (cpi->oxcf.rc_mode == VPX_VBR && cpi->oxcf.lag_in_frames > 0 &&
cm->width <= 1280 && cm->height <= 720) {
sf->use_altref_onepass = 1;
@@ -660,6 +665,9 @@
sf->limit_newmv_early_exit = 0;
sf->base_mv_aggressive = 1;
}
+ if (cm->frame_type != KEY_FRAME && cpi->resize_state == ORIG &&
+ cpi->oxcf.rc_mode == VPX_CBR)
+ sf->overshoot_detection_cbr_rt = FAST_DETECTION_MAXQ;
}
if (speed >= 7) {