ref: 6298e232e168aba11e227ba9c0ec8e8dc3a190ae
parent: 84744a497a49ab8f527c18afd3a80c4787d4a138
parent: 1b5e9871f7a4fe7b89da047df046b0cfb4b3566d
author: Yunqing Wang <[email protected]>
date: Fri Jul 11 09:46:46 EDT 2014
Merge "Code refactoring: use defined inline functions"
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1827,7 +1827,7 @@
int bh, bw;
BLOCK_SIZE min_size = BLOCK_32X32;
BLOCK_SIZE max_size = BLOCK_8X8;
- int bsl = mi_width_log2_lookup[BLOCK_64X64];
+ int bsl = mi_width_log2(BLOCK_64X64);
const int search_range_ctrl = (((mi_row + mi_col) >> bsl) +
get_chessboard_index(cm)) % 2;
// Trap case where we do not have a prediction.
@@ -1976,8 +1976,8 @@
pc_tree->partitioning = PARTITION_NONE;
// Adjust threshold according to partition size.
- stop_thresh >>= 8 - (b_width_log2_lookup[bsize] +
- b_height_log2_lookup[bsize]);
+ stop_thresh >>= 8 - (b_width_log2(bsize) +
+ b_height_log2(bsize));
stop_thresh_rd = RDCOST(x->rdmult, x->rddiv, 0, stop_thresh);
// If obtained distortion is very small, choose current partition
@@ -2548,8 +2548,8 @@
pc_tree->partitioning = PARTITION_NONE;
// Adjust threshold according to partition size.
- stop_thresh >>= 8 - (b_width_log2_lookup[bsize] +
- b_height_log2_lookup[bsize]);
+ stop_thresh >>= 8 - (b_width_log2(bsize) +
+ b_height_log2(bsize));
stop_thresh_rd = RDCOST(x->rdmult, x->rddiv, 0, stop_thresh);
// If obtained distortion is very small, choose current partition
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -287,7 +287,7 @@
// Adjust ac threshold according to partition size.
thresh_ac >>=
- 8 - (b_width_log2_lookup[bsize] + b_height_log2_lookup[bsize]);
+ 8 - (b_width_log2(bsize) + b_height_log2(bsize));
thresh_dc = (xd->plane[0].dequant[0] * xd->plane[0].dequant[0] >> 6);
} else {
@@ -387,7 +387,7 @@
// Mode index conversion form THR_MODES to PREDICTION_MODE for a ref frame.
int mode_idx[MB_MODE_COUNT] = {0};
INTERP_FILTER filter_ref = cm->interp_filter;
- int bsl = mi_width_log2_lookup[bsize];
+ int bsl = mi_width_log2(bsize);
const int pred_filter_search = cm->interp_filter == SWITCHABLE ?
(((mi_row + mi_col) >> bsl) + get_chessboard_index(cm)) % 2 : 0;
int const_motion[MAX_REF_FRAMES] = { 0 };
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1793,8 +1793,8 @@
}
if (cpi->sf.adaptive_motion_search) {
- int bwl = b_width_log2_lookup[bsize];
- int bhl = b_height_log2_lookup[bsize];
+ int bwl = b_width_log2(bsize);
+ int bhl = b_height_log2(bsize);
int i;
int tlevel = x->pred_mv_sad[ref] >> (bwl + bhl + 4);
@@ -2266,8 +2266,8 @@
thresh_ac = clamp(thresh_ac, min_thresh, max_thresh);
// Adjust threshold according to partition size.
- thresh_ac >>= 8 - (b_width_log2_lookup[bsize] +
- b_height_log2_lookup[bsize]);
+ thresh_ac >>= 8 - (b_width_log2(bsize) +
+ b_height_log2(bsize));
thresh_dc = (xd->plane[0].dequant[0] * xd->plane[0].dequant[0] >> 6);
} else {
thresh_ac = 0;