shithub: libvpx

Download patch

ref: 4a79503b3e7819b66b928978d2d86ef1a38b5360
parent: 623e988addfa8add7a21c69aa893ba42f7d5236e
author: paulwilkins <[email protected]>
date: Thu Dec 3 07:09:47 EST 2015

Fix bug when overlaying middle arfs in multi-arf groups.

Do not reset the alt ref active flag when overlaying the middle
arf(s) of a multi arf group.

Change-Id: Ia55a55a376973f3fd17161429fd2afb07b4df31f

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1257,8 +1257,12 @@
     rc->frames_since_golden = 0;
 
     // If we are not using alt ref in the up and coming group clear the arf
-    // active flag.
-    if (!rc->source_alt_ref_pending) {
+    // active flag. In multi arf group case, if the index is not 0 then
+    // we are overlaying a mid group arf so should not reset the flag.
+    if (cpi->oxcf.pass == 2) {
+      if (!rc->source_alt_ref_pending && (cpi->twopass.gf_group.index == 0))
+        rc->source_alt_ref_active = 0;
+    } else if (!rc->source_alt_ref_pending) {
       rc->source_alt_ref_active = 0;
     }