summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodemb.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2013-09-06 12:33:34 -0400
committerScott LaVarnway <slavarnway@google.com>2013-09-06 12:33:34 -0400
commitdae17734ece414091ba1184f7becd0aa6c0004f1 (patch)
treecd7b9f5a0a3d1d9f2ac5885773873a2006dba256 /vp9/encoder/vp9_encodemb.c
parente4e864586c6e020d7ed028cc5c1e93de4fd8ee10 (diff)
downloadlibvpx-dae17734ece414091ba1184f7becd0aa6c0004f1.tar
libvpx-dae17734ece414091ba1184f7becd0aa6c0004f1.tar.gz
libvpx-dae17734ece414091ba1184f7becd0aa6c0004f1.tar.bz2
libvpx-dae17734ece414091ba1184f7becd0aa6c0004f1.zip
New mode_info_context storage
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of a pointer to a MODE_INFO struct and a "in the image" flag. The MODE_INFO structs are now stored as a stream, eliminating unnecessary copies and is a little more cache friendly. For the test clips used, the decoder performance improved by ~4.3% (1080p) and ~9.7% (720p). Patch Set 2: Re-encoded clips with latest. Now ~1.7% (1080p) and 5.9% (720p). Change-Id: I846f29e88610fce2523ca697a9a9ef2a182e9256
Diffstat (limited to 'vp9/encoder/vp9_encodemb.c')
-rw-r--r--vp9/encoder/vp9_encodemb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index da9a3bda0..13287f4f1 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -147,7 +147,7 @@ static void optimize_b(MACROBLOCK *mb,
TX_SIZE tx_size) {
MACROBLOCKD *const xd = &mb->e_mbd;
struct macroblockd_plane *pd = &xd->plane[plane];
- const int ref = is_inter_block(&xd->mode_info_context->mbmi);
+ const int ref = is_inter_block(&xd->this_mi->mbmi);
vp9_token_state tokens[1025][2];
unsigned best_index[1025][2];
const int16_t *coeff_ptr = BLOCK_OFFSET(mb->plane[plane].coeff, block);
@@ -199,7 +199,7 @@ static void optimize_b(MACROBLOCK *mb,
/* Now set up a Viterbi trellis to evaluate alternative roundings. */
rdmult = mb->rdmult * err_mult;
- if (mb->e_mbd.mode_info_context->mbmi.ref_frame[0] == INTRA_FRAME)
+ if (mb->e_mbd.mi_8x8[0]->mbmi.ref_frame[0] == INTRA_FRAME)
rdmult = (rdmult * 9) >> 4;
rddiv = mb->rddiv;
/* Initialize the sentinel node of the trellis. */
@@ -385,7 +385,7 @@ static void optimize_init_b(int plane, BLOCK_SIZE bsize,
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize];
const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize];
- const MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
+ const MB_MODE_INFO *mbmi = &xd->this_mi->mbmi;
const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi) : mbmi->tx_size;
int i;
@@ -569,7 +569,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
struct encode_b_args* const args = arg;
MACROBLOCK *const x = args->x;
MACROBLOCKD *const xd = &x->e_mbd;
- MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
+ MB_MODE_INFO *mbmi = &xd->this_mi->mbmi;
struct macroblock_plane *const p = &x->plane[plane];
struct macroblockd_plane *const pd = &xd->plane[plane];
int16_t *coeff = BLOCK_OFFSET(p->coeff, block);
@@ -679,7 +679,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
scan = get_scan_4x4(tx_type);
iscan = get_iscan_4x4(tx_type);
if (mbmi->sb_type < BLOCK_8X8 && plane == 0)
- mode = xd->mode_info_context->bmi[block].as_mode;
+ mode = xd->this_mi->bmi[block].as_mode;
else
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;