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
This commit is contained in:
Marco 2017-09-29 14:54:56 -07:00
parent f2c3d0a7a3
commit c8f6e7b99e

View File

@ -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),