From: Marco Paniconi Date: Fri, 24 May 2019 17:32:08 +0000 (-0700) Subject: vp9-rtc: Update overshoot_detection speed feature X-Git-Tag: v1.8.1~44^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93bb9d8328f9548efdce06ac9d3e84a5e0a28340;p=libvpx 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 --- diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index df2afceda..64881a5f9 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -618,8 +618,13 @@ static void set_rt_speed_feature_framesize_independent( // 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 @@ static void set_rt_speed_feature_framesize_independent( 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) {