mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-19 07:16:01 +07:00
Alloc extra bytes for bits buf for parse optimzation am: 4cf597a518 am: 847da962ca am: 1a4160b448 am: 0f0d14ee95
am: 1f1b528420
Change-Id: I3fc4d067b43e0ed57744231d5aec6e67d7176321
This commit is contained in:
commit
c8d00a7dc9
1 changed files with 2 additions and 2 deletions
|
|
@ -1215,7 +1215,7 @@ WORD32 ihevcd_allocate_static_bufs(iv_obj_t **pps_codec_obj,
|
||||||
|
|
||||||
/* Request memory for static bitstream buffer which holds bitstream after emulation prevention */
|
/* Request memory for static bitstream buffer which holds bitstream after emulation prevention */
|
||||||
size = MIN_BITSBUF_SIZE;
|
size = MIN_BITSBUF_SIZE;
|
||||||
pv_buf = pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
pv_buf = pf_aligned_alloc(pv_mem_ctxt, 128, size + 16); //Alloc extra for parse optimization
|
||||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||||
ps_codec->pu1_bitsbuf_static = pv_buf;
|
ps_codec->pu1_bitsbuf_static = pv_buf;
|
||||||
ps_codec->u4_bitsbuf_size_static = size;
|
ps_codec->u4_bitsbuf_size_static = size;
|
||||||
|
|
@ -1908,7 +1908,7 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
||||||
size = wd * ht;
|
size = wd * ht;
|
||||||
if(size > MIN_BITSBUF_SIZE)
|
if(size > MIN_BITSBUF_SIZE)
|
||||||
{
|
{
|
||||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size + 16); //Alloc extra for parse optimization
|
||||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||||
ps_codec->pu1_bitsbuf_dynamic = pv_buf;
|
ps_codec->pu1_bitsbuf_dynamic = pv_buf;
|
||||||
ps_codec->u4_bitsbuf_size_dynamic = size;
|
ps_codec->u4_bitsbuf_size_dynamic = size;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue