summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2015-12-04 10:33:55 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-12-04 10:33:55 +0000
commit2b5baea8fdb7086dc5eb654cd8fb62bef0635793 (patch)
tree852d44fa572876107c59e78a42983fe781785c81
parent6202ce5ada148f6a4de393d5f943b064669d5dff (diff)
parent4a79503b3e7819b66b928978d2d86ef1a38b5360 (diff)
downloadlibvpx-2b5baea8fdb7086dc5eb654cd8fb62bef0635793.tar
libvpx-2b5baea8fdb7086dc5eb654cd8fb62bef0635793.tar.gz
libvpx-2b5baea8fdb7086dc5eb654cd8fb62bef0635793.tar.bz2
libvpx-2b5baea8fdb7086dc5eb654cd8fb62bef0635793.zip
Merge "Fix bug when overlaying middle arfs in multi-arf groups."
-rw-r--r--vp9/encoder/vp9_ratectrl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index fdff36315..45445df8d 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1257,8 +1257,12 @@ static void update_golden_frame_stats(VP9_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;
}