shithub: libvpx

Download patch

ref: 310e3884239ec70fd390a42bfe3a81fcff155a29
parent: a80bdfd0813b9a05252c72796ddbc55bc1e48588
parent: ebb015a5398e1da5e90864a1d23f9ed512ace8e2
author: Marco Paniconi <[email protected]>
date: Tue Sep 19 12:29:19 EDT 2017

Merge "vp9: Adjustments for ARF usage in 1 pass vbr."

--- 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;