From 9addd7499cc06bac2c04f1aa2bd287a1ee1b67f3 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Fri, 5 Oct 2018 11:27:01 -0700 Subject: Reduce the cpi->scaled_ref_idx array size by 1. The last element of the cpi->scaled_ref_idx array was not used, so reduce the array size by 1. The corresponding libaom CL is https://aomedia-review.googlesource.com/c/aom/+/72445. Change-Id: I9166f0fbe1a7898c8b611b1535fcc74b4f766997 --- vp9/encoder/vp9_encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vp9/encoder/vp9_encoder.c') diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index e9dbd0eee..6404fa0cc 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -3260,7 +3260,7 @@ static void release_scaled_references(VP9_COMP *cpi) { } } } else { - for (i = 0; i < MAX_REF_FRAMES; ++i) { + for (i = 0; i < REFS_PER_FRAME; ++i) { const int idx = cpi->scaled_ref_idx[i]; if (idx != INVALID_IDX) { RefCntBuffer *const buf = &cm->buffer_pool->frame_bufs[idx]; @@ -6342,7 +6342,7 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags, level_rc_framerate(cpi, arf_src_index); if (cpi->oxcf.pass != 0 || cpi->use_svc || frame_is_intra_only(cm) == 1) { - for (i = 0; i < MAX_REF_FRAMES; ++i) cpi->scaled_ref_idx[i] = INVALID_IDX; + for (i = 0; i < REFS_PER_FRAME; ++i) cpi->scaled_ref_idx[i] = INVALID_IDX; } if (arf_src_index && cpi->sf.enable_tpl_model) { -- cgit v1.2.3