MODE_INFO size reduction
Declared the bmi in MODE_INFO as a union instead of B_MODE_INFO. This reduced the memory footprint by 518,400 bytes for 1080 resolutions. The decoder performance improved by ~4% for the clip used and the encoder showed very small improvements. (0.5%) This reduction was first mentioned to me by John K. and in a later discussion by Yaowu. This is WIP. Change-Id: I8e175fdbc46d28c35277302a04bee4540efc8d29
This commit is contained in:
@@ -477,8 +477,24 @@ void encode_mb_row(VP8_COMP *cpi,
|
||||
x->mb_activity_ptr++;
|
||||
x->mb_norm_activity_ptr++;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
vpx_memcpy(&xd->mode_info_context->bmi[i], &xd->block[i].bmi, sizeof(xd->block[i].bmi));
|
||||
if(cm->frame_type != INTRA_FRAME)
|
||||
{
|
||||
if (xd->mode_info_context->mbmi.mode != B_PRED)
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
xd->mode_info_context->bmi[i].mv.as_int = xd->block[i].bmi.mv.as_int;
|
||||
}else
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
xd->mode_info_context->bmi[i].as_mode = xd->block[i].bmi.mode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(xd->mode_info_context->mbmi.mode != B_PRED)
|
||||
for (i = 0; i < 16; i++)
|
||||
xd->mode_info_context->bmi[i].as_mode = xd->block[i].bmi.mode;
|
||||
}
|
||||
|
||||
// adjust to the next column of macroblocks
|
||||
x->src.y_buffer += 16;
|
||||
|
||||
Reference in New Issue
Block a user