Merge "Fix tile index buf alloc size" into lmp-dev

This commit is contained in:
Marco Nelissen 2017-09-13 05:00:56 +00:00 committed by Android (Google) Code Review
commit 4b9053c15c

View file

@ -2283,10 +2283,11 @@ WORD32 ihevcd_fill_num_mem_rec(void *pv_api_ip, void *pv_api_op)
{
WORD32 size = 0;
/* Max CTBs in a row */
size = max_wd_luma / MIN_CTB_SIZE + 2 /* Top row and bottom row extra. This ensures accessing left,top in first row
and right in last row will not result in invalid access*/;
size = max_wd_luma / MIN_CTB_SIZE;
/* Max CTBs in a column */
size *= max_ht_luma / MIN_CTB_SIZE;
size *= (max_ht_luma / MIN_CTB_SIZE + 2) /* Top row and bottom row extra. This ensures accessing left,top in first row
and right in last row will not result in invalid access*/;
size *= sizeof(UWORD16);
ps_mem_rec->u4_mem_size = size;