Properly handle show existing internal ALTREF
The reference buffer virtual indices are being incorrectly
shifted on the encoder side when encoding
an error resilient ALTREF2 that is also a show_existing_frame.
This was causing a mismatch and noticeable artifacts.
BUG=aomedia:2159
Change-Id: I47c0fa8d6e8267aeb7f984e12aa3fd5889d14eb1
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 53c60a7..b9dbed9 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3544,7 +3544,7 @@
// TODO(zoeliu): Do we need to copy cpi->interp_filter_selected[0] over to
// cpi->interp_filter_selected[GOLDEN_FRAME]?
- } else if (cpi->rc.is_src_frame_ext_arf && cm->show_existing_frame) {
+ } else if (cpi->rc.is_src_frame_ext_arf && encode_show_existing_frame(cm)) {
#if CONFIG_DEBUG
const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
assert(gf_group->update_type[gf_group->index] == INTNL_OVERLAY_UPDATE);