shithub: libvpx

Download patch

ref: bb407a27b2e32f89f0e9eeee2bcd0aa9d5cfea3f
parent: 468e77b9ea78a5a7d60fb86d016b833982860d9c
parent: ed5a5a06bd5cc9524642e43c5307eb2c69aef00e
author: Yunqing Wang <yunqingwang@google.com>
date: Mon Jul 15 14:31:09 EDT 2019

Merge "Revert "Set up frame contexts based on frame type""

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -814,17 +814,7 @@
   if (frame_is_intra_only(cm) || cm->error_resilient_mode) {
     vp9_setup_past_independence(cm);
   } else {
-    if (!cpi->use_svc) {
-      const int boost_frame =
-          !cpi->rc.is_src_frame_alt_ref &&
-          (cpi->refresh_golden_frame || cpi->refresh_alt_ref_frame);
-      if (boost_frame)
-        cm->frame_context_idx = 1;
-      else if (cpi->rc.is_src_frame_alt_ref)
-        cm->frame_context_idx = 2;
-      else
-        cm->frame_context_idx = 3;
-    }
+    if (!cpi->use_svc) cm->frame_context_idx = cpi->refresh_alt_ref_frame;
   }
 
   // TODO(jingning): Overwrite the frame_context_idx index in multi-layer ARF