From 453aef6ef9157ce800304a2310c659712f9220b6 Mon Sep 17 00:00:00 2001 From: Zoe Liu Date: Wed, 19 Apr 2017 15:35:17 -0700 Subject: [PATCH] Fix the build failure combining ext-refs and tempmv-signaling Change-Id: I3673e84faccc0d4e1a7c433660f783f1eccbdb85 --- av1/encoder/encodeframe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index b769ac1a8..8ab42d25a 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c @@ -5145,6 +5145,9 @@ static void encode_frame_internal(AV1_COMP *cpi) { MACROBLOCKD *const xd = &x->e_mbd; RD_COUNTS *const rdc = &cpi->td.rd_counts; int i; +#if CONFIG_TEMPMV_SIGNALING || CONFIG_EXT_REFS + const int last_fb_buf_idx = get_ref_frame_buf_idx(cpi, LAST_FRAME); +#endif // CONFIG_TEMPMV_SIGNALING || CONFIG_EXT_REFS #if CONFIG_ADAPT_SCAN av1_deliver_eob_threshold(cm, xd); @@ -5293,7 +5296,6 @@ static void encode_frame_internal(AV1_COMP *cpi) { av1_initialize_me_consts(cpi, x, cm->base_qindex); init_encode_frame_mb_context(cpi); #if CONFIG_TEMPMV_SIGNALING - const int last_fb_buf_idx = get_ref_frame_buf_idx(cpi, LAST_FRAME); if (last_fb_buf_idx != INVALID_IDX) { cm->prev_frame = &cm->buffer_pool->frame_bufs[last_fb_buf_idx]; cm->use_prev_frame_mvs &= !cm->error_resilient_mode && @@ -5320,7 +5322,6 @@ static void encode_frame_internal(AV1_COMP *cpi) { // e.g. LAST_FRAME. if (cm->use_prev_frame_mvs && !enc_is_ref_frame_buf(cpi, cm->prev_frame)) { // Reassign the LAST_FRAME buffer to cm->prev_frame. - const int last_fb_buf_idx = get_ref_frame_buf_idx(cpi, LAST_FRAME); cm->prev_frame = &cm->buffer_pool->frame_bufs[last_fb_buf_idx]; } #endif // CONFIG_EXT_REFS -- GitLab