From c8f6e7b99efc8e873ef3ef9cfa5232ff1ee596bb Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 29 Sep 2017 14:54:56 -0700 Subject: [PATCH] Fix partition selection in speed features for arf overlay frame. For real-time mode. Move the switch to fixed partition for is_src_frame_alt_ref so all speeds may use it if use_altref_onepass is set. Improves metrics by ~2% for ytlive set at speed 4 (where use_altref_onepass is currently used). Change-Id: I033240386598c9dbd0364da89ccbcca64bc663ee --- vp9/encoder/vp9_speed_features.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index f49d8e410..c9821dec3 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -529,10 +529,7 @@ static void set_rt_speed_feature_framesize_independent( sf->partition_search_type = VAR_BASED_PARTITION; if (cpi->oxcf.rc_mode == VPX_VBR && cpi->oxcf.lag_in_frames > 0 && !is_keyframe) { - if (cpi->rc.is_src_frame_alt_ref) { - sf->partition_search_type = FIXED_PARTITION; - sf->always_this_block_size = BLOCK_64X64; - } else if (sf->use_altref_onepass && cpi->refresh_alt_ref_frame) { + if (sf->use_altref_onepass && cpi->refresh_alt_ref_frame) { sf->partition_search_type = REFERENCE_PARTITION; } } @@ -640,6 +637,10 @@ static void set_rt_speed_feature_framesize_independent( sf->use_simple_block_yrd = 1; } if (sf->use_altref_onepass) { + if (cpi->rc.is_src_frame_alt_ref && cm->frame_type != KEY_FRAME) { + sf->partition_search_type = FIXED_PARTITION; + sf->always_this_block_size = BLOCK_64X64; + } if (cpi->count_arf_frame_usage == NULL) cpi->count_arf_frame_usage = (uint8_t *)vpx_calloc((cm->mi_stride >> 3) * ((cm->mi_rows >> 3) + 1), -- 2.40.0