From: paulwilkins Date: Mon, 7 Dec 2015 15:23:46 +0000 (+0000) Subject: Fix bug when overlaying middle arfs in multi-arf groups. X-Git-Tag: v1.6.0~506 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d85ce8e0cc588629650690a5fa0ed559ed77d30;p=libvpx Fix bug when overlaying middle arfs in multi-arf groups. Fix copied over from VP9 master to VP10 master. Do not reset the alt ref active flag when overlaying the middle arf(s) of a multi arf group. Change-Id: I1b7392107e7c675640d5ee1624012f39cc374c58 --- diff --git a/vp10/encoder/ratectrl.c b/vp10/encoder/ratectrl.c index d4c25c048..3ff24768d 100644 --- a/vp10/encoder/ratectrl.c +++ b/vp10/encoder/ratectrl.c @@ -1210,8 +1210,12 @@ static void update_golden_frame_stats(VP10_COMP *cpi) { 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; }