summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_pickmode.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-10-07 12:30:33 -0700
committerJingning Han <jingning@google.com>2014-10-07 12:33:07 -0700
commitb66f7016c1eed780545efa2518a7f33ae401ee35 (patch)
treeee9231042fd360b37731dddc7ee59aa7cdd2ab89 /vp9/encoder/vp9_pickmode.c
parent5d9cdac08709d6343fbd028f280a92bd7fd7d04c (diff)
downloadlibvpx-b66f7016c1eed780545efa2518a7f33ae401ee35.tar
libvpx-b66f7016c1eed780545efa2518a7f33ae401ee35.tar.gz
libvpx-b66f7016c1eed780545efa2518a7f33ae401ee35.tar.bz2
libvpx-b66f7016c1eed780545efa2518a7f33ae401ee35.zip
Take out repeated block width/height lookup functions
The functions b_width_log2 and b_height_log2 only do direct table fetch. This commit unifies such use cases by using the table directly and removes these functions. Change-Id: I3103fc6ba959c1182886a2799d21b8b77c8a7b6b
Diffstat (limited to 'vp9/encoder/vp9_pickmode.c')
-rw-r--r--vp9/encoder/vp9_pickmode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 428767a44..9abc9d1fb 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -339,7 +339,7 @@ static void encode_breakout_test(VP9_COMP *cpi, MACROBLOCK *x,
// Adjust ac threshold according to partition size.
thresh_ac >>=
- 8 - (b_width_log2(bsize) + b_height_log2(bsize));
+ 8 - (b_width_log2_lookup[bsize] + b_height_log2_lookup[bsize]);
thresh_dc = (xd->plane[0].dequant[0] * xd->plane[0].dequant[0] >> 6);
#if CONFIG_VP9_HIGHBITDEPTH
@@ -433,7 +433,7 @@ static void estimate_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
pd->dst.buf = &dst_buf_base[4 * (j * dst_stride + i)];
// Use source buffer as an approximation for the fully reconstructed buffer.
vp9_predict_intra_block(xd, block >> (2 * tx_size),
- b_width_log2(plane_bsize),
+ b_width_log2_lookup[plane_bsize],
tx_size, args->mode,
p->src.buf, src_stride,
pd->dst.buf, dst_stride,