From a7ccc12973e86f40bd18861f6a26dc88a4b1f2ef Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Wed, 3 Sep 2014 12:20:29 -0700 Subject: [PATCH] Small cleanup: reusing existing code. Change-Id: Iac4775ad98e988f2b9cf5bd0dc91ab994d0262ce --- vp9/encoder/vp9_pickmode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 28d8302fa..9651ceef5 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -394,7 +394,7 @@ static void estimate_block_intra(int plane, int block, BLOCK_SIZE plane_bsize, args->dist += dist; } -static const THR_MODES mode_idx[MAX_REF_FRAMES - 1][4] = { +static const THR_MODES mode_idx[MAX_REF_FRAMES - 1][INTER_MODES] = { {THR_NEARESTMV, THR_NEARMV, THR_ZEROMV, THR_NEWMV}, {THR_NEARESTG, THR_NEARG, THR_ZEROG, THR_NEWG}, {THR_NEARESTA, THR_NEARA, THR_ZEROA, THR_NEWA}, @@ -547,7 +547,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, continue; mode_rd_thresh = rd_threshes[mode_idx[ref_frame - LAST_FRAME] - [this_mode - NEARESTMV]]; + [INTER_OFFSET(this_mode)]]; if (rd_less_than_thresh(best_rd, mode_rd_thresh, rd_thresh_freq_fact[this_mode])) continue;