Removed bmi copy to/from BLOCKD

for SPLITMV and B_PRED modes.  Modified code to use the bmi
found in mode_info_context instead of BLOCKD.  On the decode
side, the uvmvs are calculated only when required, instead of
every macroblock.  This is WIP. (bmi should eventually be
removed from BLOCKD)
Small performance gains noticed for RT encodes and decodes.(VGA)

Change-Id: I2ed7f0fd5ca733655df684aa82da575c77a973e7
This commit is contained in:
Scott LaVarnway
2011-08-24 14:42:26 -04:00
parent 1de5da80c9
commit b870947d42
9 changed files with 233 additions and 201 deletions

View File

@@ -28,7 +28,6 @@
extern void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd);
extern void clamp_mvs(MACROBLOCKD *xd);
extern void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel);
#if CONFIG_RUNTIME_CPU_DETECT
#define RTCD_VTABLE(x) (&(pbi)->common.rtcd.x)
@@ -83,6 +82,11 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd, MB_ROW_D
{
mbd->block[j].dequant = xd->block[j].dequant;
}
mbd->fullpixel_mask = 0xffffffff;
if(pc->full_pixel)
mbd->fullpixel_mask = 0xfffffff8;
}
for (i=0; i< pc->mb_rows; i++)
@@ -212,8 +216,9 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int m
for (i = 0; i < 16; i++)
{
BLOCKD *b = &xd->block[i];
int b_mode = xd->mode_info_context->bmi[i].as_mode;
vp8mt_predict_intra4x4(pbi, xd, b->bmi.as_mode, b->predictor, mb_row, mb_col, i);
vp8mt_predict_intra4x4(pbi, xd, b_mode, b->predictor, mb_row, mb_col, i);
if (xd->eobs[i] > 1)
{
@@ -313,8 +318,6 @@ static THREAD_FUNCTION thread_decoding_proc(void *p_data)
}
}
update_blockd_bmi(xd);
/* Distance of MB to the various image edges.
* These are specified to 8th pel as they are always
* compared to values that are in 1/8th pel units.
@@ -378,7 +381,6 @@ static THREAD_FUNCTION thread_decoding_proc(void *p_data)
xd->corrupted |= pc->yv12_fb[ref_fb_idx].corrupted;
}
vp8_build_uvmvs(xd, pc->full_pixel);
decode_macroblock(pbi, xd, mb_row, mb_col);
/* check if the boolean decoder has suffered an error */
@@ -819,8 +821,6 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
}
}
update_blockd_bmi(xd);
/* Distance of MB to the various image edges.
* These are specified to 8th pel as they are always compared to
* values that are in 1/8th pel units.
@@ -879,7 +879,6 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
xd->corrupted |= pc->yv12_fb[ref_fb_idx].corrupted;
}
vp8_build_uvmvs(xd, pc->full_pixel);
decode_macroblock(pbi, xd, mb_row, mb_col);
/* check if the boolean decoder has suffered an error */