summaryrefslogtreecommitdiff
path: root/vp8/encoder/pickinter.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2010-09-02 16:17:52 -0400
committerJohn Koleszar <jkoleszar@google.com>2010-09-03 16:43:23 -0400
commit0de458f6b9627844160768c0b2417058c7a865bc (patch)
tree4f13f57aaad1737adab700a9c11a0b16b9af604d /vp8/encoder/pickinter.c
parentb0519a26b120c8a5763f89f097f8b128d9257a6c (diff)
downloadlibvpx-0de458f6b9627844160768c0b2417058c7a865bc.tar
libvpx-0de458f6b9627844160768c0b2417058c7a865bc.tar.gz
libvpx-0de458f6b9627844160768c0b2417058c7a865bc.tar.bz2
libvpx-0de458f6b9627844160768c0b2417058c7a865bc.zip
Reduced the size of MB_MODE_INFO
Moved partition_bmi and partition_count out of MB_MODE_INFO and placed into MACROBLOCK. Also reduced the size of other members of the MB_MODE_INFO struct. For 1080p, the memory was reduced by 1,209,516 bytes. The decoder performance appeared to improve by 3% for the clip used. Note: The main goal for this change is to improve the decoder performance. The encoder will be revisited at a later date for further structure cleanup. Change-Id: I4733621292ee9cc3fffa4046cb3fd4d99bd14613
Diffstat (limited to 'vp8/encoder/pickinter.c')
-rw-r--r--vp8/encoder/pickinter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vp8/encoder/pickinter.c b/vp8/encoder/pickinter.c
index 9da715e99..2be412c99 100644
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -430,6 +430,7 @@ int vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int rec
MACROBLOCKD *xd = &x->e_mbd;
B_MODE_INFO best_bmodes[16];
MB_MODE_INFO best_mbmode;
+ PARTITION_INFO best_partition;
MV best_ref_mv1;
MV mode_mv[MB_MODE_COUNT];
MB_PREDICTION_MODE this_mode;
@@ -832,6 +833,7 @@ int vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int rec
*returndistortion = distortion2;
best_rd = this_rd;
vpx_memcpy(&best_mbmode, &x->e_mbd.mode_info_context->mbmi, sizeof(MB_MODE_INFO));
+ vpx_memcpy(&best_partition, x->partition_info, sizeof(PARTITION_INFO));
if (this_mode == B_PRED || this_mode == SPLITMV)
for (i = 0; i < 16; i++)
@@ -906,6 +908,7 @@ int vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int rec
best_mbmode.dc_diff = 0;
vpx_memcpy(&x->e_mbd.mode_info_context->mbmi, &best_mbmode, sizeof(MB_MODE_INFO));
+ vpx_memcpy(x->partition_info, &best_partition, sizeof(PARTITION_INFO));
for (i = 0; i < 16; i++)
{
@@ -920,6 +923,7 @@ int vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int rec
// macroblock modes
vpx_memcpy(&x->e_mbd.mode_info_context->mbmi, &best_mbmode, sizeof(MB_MODE_INFO));
+ vpx_memcpy(x->partition_info, &best_partition, sizeof(PARTITION_INFO));
if (x->e_mbd.mode_info_context->mbmi.mode == B_PRED || x->e_mbd.mode_info_context->mbmi.mode == SPLITMV)
for (i = 0; i < 16; i++)