]> granicus.if.org Git - libvpx/commitdiff
Fix quality regression for multi arf off case.
authorPaul Wilkins <paulwilkins@google.com>
Thu, 26 Jun 2014 08:48:31 +0000 (09:48 +0100)
committerPaul Wilkins <paulwilkins@google.com>
Thu, 26 Jun 2014 08:59:53 +0000 (09:59 +0100)
Bug introduced during multiple iterations on: I3831*

gf_group->arf_update_idx[] cannot currently be used
to select the arf buffer index if buffer flipping on overlays
is enabled (still currently the case when multi arf OFF).

Change-Id: I4ce9ea08f1dd03ac3ad8b3e27375a91ee1d964dc

vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_encoder.c

index c69ed16a70bdbd98c53b5293d3a62a41e88b5bec..1bf826a56f619e864e613afa41632d71c9eaf2b2 100644 (file)
@@ -904,7 +904,7 @@ static int get_refresh_mask(VP9_COMP *cpi) {
              (cpi->refresh_golden_frame << cpi->alt_fb_idx);
     } else {
       int arf_idx = cpi->alt_fb_idx;
-      if (cpi->pass == 2) {
+      if ((cpi->pass == 2) && cpi->multi_arf_allowed) {
         const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
         arf_idx = gf_group->arf_update_idx[gf_group->index];
       }
index ef31c747885cfa242f7bb712f4a6beeb646336c4..11e5eefff0a921a9dd23e3b33f263d186a80d502 100644 (file)
@@ -1514,7 +1514,7 @@ void vp9_update_reference_frames(VP9_COMP *cpi) {
   } else { /* For non key/golden frames */
     if (cpi->refresh_alt_ref_frame) {
       int arf_idx = cpi->alt_fb_idx;
-      if (cpi->pass == 2) {
+      if ((cpi->pass == 2) && cpi->multi_arf_allowed) {
         const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
         arf_idx = gf_group->arf_update_idx[gf_group->index];
       }
@@ -2481,7 +2481,7 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
       cm->show_frame = 1;
       cm->intra_only = 0;
 
-      // Check to see if the frame should be encoded is an arf overlay.
+      // Check to see if the frame should be encoded as an arf overlay.
       check_src_altref(cpi);
     }
   }