ref: ebb015a5398e1da5e90864a1d23f9ed512ace8e2
parent: 9d278465b5a1107f5e91eb63161cbcc0e6c118d3
author: Marco <[email protected]>
date: Mon Sep 18 13:30:49 EDT 2017
vp9: Adjustments for ARF usage in 1 pass vbr. Only when USE_ALT_REF_ONE_PASS is enabled (off by default). Force fixed partition to 64x64 when is_src_alt_ref_frame is true, and don't force early exit for some modes in nonrd_pickmode for ARF noshow frames. Small gain ~0.2% on ytlive metrics for speed 6. Neutral speed difference. Change-Id: I27eb6622d0453c09a06ccdc3b16368762474d11d
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -4179,7 +4179,7 @@
int sb_offset2 = ((cm->mi_cols + 7) >> 3) * (mi_row >> 3) + (mi_col >> 3);
int64_t source_sad = avg_source_sad(cpi, x, shift, sb_offset2);
if (sf->adapt_partition_source_sad &&
- (cpi->oxcf.rc_mode == VPX_VBR &&
+ (cpi->oxcf.rc_mode == VPX_VBR && !cpi->rc.is_src_frame_alt_ref &&
source_sad > sf->adapt_partition_thresh &&
cpi->refresh_golden_frame))
partition_search_type = REFERENCE_PARTITION;
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1669,13 +1669,13 @@
frame_mv[this_mode][ref_frame].as_int != 0))
continue;
- if (cpi->rc.alt_ref_gf_group &&
+ if (cpi->rc.alt_ref_gf_group && cm->show_frame &&
cpi->rc.frames_since_golden > (cpi->rc.baseline_gf_interval >> 1) &&
ref_frame == GOLDEN_FRAME &&
frame_mv[this_mode][ref_frame].as_int != 0)
continue;
- if (cpi->rc.alt_ref_gf_group &&
+ if (cpi->rc.alt_ref_gf_group && cm->show_frame &&
cpi->rc.frames_since_golden < (cpi->rc.baseline_gf_interval >> 1) &&
ref_frame == ALTREF_FRAME &&
frame_mv[this_mode][ref_frame].as_int != 0)
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -523,6 +523,11 @@
if (speed >= 6) {
sf->partition_search_type = VAR_BASED_PARTITION;
+ if (cpi->oxcf.rc_mode == VPX_VBR && cpi->oxcf.lag_in_frames > 0 &&
+ cpi->rc.is_src_frame_alt_ref && !is_keyframe) {
+ sf->partition_search_type = FIXED_PARTITION;
+ sf->always_this_block_size = BLOCK_64X64;
+ }
// Turn on this to use non-RD key frame coding mode.
sf->use_nonrd_pick_mode = 1;
sf->mv.search_method = NSTEP;