Include space for chroma in the padding allocated in ih264e_get_total_pic_buf_size
Chroma is already accounted for in e.g. num_samples by multiplying the number of luma samples by 3/2, so include it in the padding calculation as well. This fixes encoding 176x144 at level 1.0 - normally this isn't an issue since the padding is a bit overestimated, but for this particular resolution/level combination, it fails unless this is calculated properly. Change-Id: Id5df6e5aee4d3d78f4c28a3b7d5fed6fe42a1f2c
This commit is contained in:
parent
eb7b34579c
commit
df06a38c5b
1 changed files with 1 additions and 1 deletions
|
|
@ -366,7 +366,7 @@ WORD32 ih264e_get_total_pic_buf_size(WORD32 pic_size,
|
|||
size = num_samples * max_num_bufs;
|
||||
|
||||
/* Account for padding area */
|
||||
size += ((pad * pad) + pad * (max_wd + min_ht)) * max_num_bufs;
|
||||
size += ((pad * pad) + pad * (max_wd + min_ht)) * 3 / 2 * max_num_bufs;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue