From 1c27e1f127e9f6c775b71922eb85de1e11fc81d4 Mon Sep 17 00:00:00 2001 From: Paul Wilkins Date: Thu, 26 Jun 2014 09:48:31 +0100 Subject: [PATCH] Fix quality regression for multi arf off case. 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 | 2 +- vp9/encoder/vp9_encoder.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index c69ed16..1bf826a 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -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]; } diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index ef31c74..11e5eef 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -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); } } -- 2.7.4