Moves error concealment allocations from common parts to decoder

The backup MODE_INFO buffer used in the error concealment was
allocated in the codec common parts allocation even though this is a
decoder only resource. Moved the allocation to the decoder side.
No need to update_mode_info_border as mode_info buffers are zero
allocated.

This fixes also a potential memory leak as the EC overlaps buffer was not
properly released before reallocation after a frame size change.

Change-Id: I12803d3e012308d95669069980b1c95973fb775f
This commit is contained in:
Attila Nagy
2012-04-24 15:33:44 +03:00
parent 0c483d6b68
commit 24e7b1b90d
5 changed files with 34 additions and 45 deletions

View File

@@ -51,12 +51,13 @@ int vp8_alloc_overlap_lists(VP8D_COMP *pbi)
vpx_free(pbi->overlaps);
pbi->overlaps = NULL;
}
pbi->overlaps = vpx_calloc(pbi->common.mb_rows * pbi->common.mb_cols,
sizeof(MB_OVERLAP));
if (pbi->overlaps == NULL)
return -1;
vpx_memset(pbi->overlaps, 0,
sizeof(MB_OVERLAP) * pbi->common.mb_rows * pbi->common.mb_cols);
return 0;
}