From efd02817da3d38140278cc92668547ada662c2e6 Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Wed, 21 Aug 2019 16:04:40 -0700 Subject: Add MACRO MAX_INTER_REF_FRAMES Use MAX_INTER_REF_FRAMES wheneve it's suitable Change-Id: I0fad94371a6600099313685cbe38faebb44178c4 --- vp9/encoder/vp9_non_greedy_mv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vp9/encoder/vp9_non_greedy_mv.c') diff --git a/vp9/encoder/vp9_non_greedy_mv.c b/vp9/encoder/vp9_non_greedy_mv.c index 02a954eec..4ea06316d 100644 --- a/vp9/encoder/vp9_non_greedy_mv.c +++ b/vp9/encoder/vp9_non_greedy_mv.c @@ -179,7 +179,7 @@ Status vp9_alloc_motion_field_info(MotionFieldInfo *motion_field_info, motion_field_info->motion_field_array = vpx_calloc(frame_num, sizeof(*motion_field_info->motion_field_array)); for (frame_idx = 0; frame_idx < frame_num; ++frame_idx) { - for (rf_idx = 0; rf_idx < 3; ++rf_idx) { + for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) { for (square_block_idx = 0; square_block_idx < SQUARE_BLOCK_SIZES; ++square_block_idx) { BLOCK_SIZE bsize = square_block_idx_to_bsize(square_block_idx); @@ -235,7 +235,7 @@ void vp9_free_motion_field_info(MotionFieldInfo *motion_field_info) { if (motion_field_info->allocated) { int frame_idx, rf_idx, square_block_idx; for (frame_idx = 0; frame_idx < motion_field_info->frame_num; ++frame_idx) { - for (rf_idx = 0; rf_idx < 3; ++rf_idx) { + for (rf_idx = 0; rf_idx < MAX_INTER_REF_FRAMES; ++rf_idx) { for (square_block_idx = 0; square_block_idx < SQUARE_BLOCK_SIZES; ++square_block_idx) { MotionField *motion_field = -- cgit v1.2.3