mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-14 23:02:35 +07:00
Merge "Check only allocated mv bufs for releasing from reference" into lmp-dev am: 397d2f6c42 am: 1ebd5e1d81 am: 998a1e26c0
am: a56dc1d7d0
Change-Id: I9a0d60cec34503652f87d6a68268c3b7703a5611
This commit is contained in:
commit
87c7e6a523
4 changed files with 11 additions and 6 deletions
|
|
@ -219,7 +219,7 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
{
|
||||
IHEVCD_ERROR_T ret = (IHEVCD_ERROR_T)IHEVCD_SUCCESS;
|
||||
WORD32 value;
|
||||
WORD32 i;
|
||||
WORD32 i, j;
|
||||
WORD32 sps_id;
|
||||
|
||||
pps_t *ps_pps;
|
||||
|
|
@ -884,11 +884,11 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
ihevc_dpb_mgr_del_ref((dpb_mgr_t *)ps_codec->pv_dpb_mgr, (buf_mgr_t *)ps_codec->pv_pic_buf_mgr, ps_pic_buf->i4_abs_poc);
|
||||
/* Find buffer id of the MV bank corresponding to the buffer being freed (Buffer with POC of u4_abs_poc) */
|
||||
ps_mv_buf = (mv_buf_t *)ps_codec->ps_mv_buf;
|
||||
for(i = 0; i < BUF_MGR_MAX_CNT; i++)
|
||||
for(j = 0; j < ps_codec->i4_max_dpb_size; j++)
|
||||
{
|
||||
if(ps_mv_buf && ps_mv_buf->i4_abs_poc == ps_pic_buf->i4_abs_poc)
|
||||
{
|
||||
ihevc_buf_mgr_release((buf_mgr_t *)ps_codec->pv_mv_buf_mgr, i, BUF_MGR_REF);
|
||||
ihevc_buf_mgr_release((buf_mgr_t *)ps_codec->pv_mv_buf_mgr, j, BUF_MGR_REF);
|
||||
break;
|
||||
}
|
||||
ps_mv_buf++;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ mv_buf_t* ihevcd_mv_mgr_get_poc(buf_mgr_t *ps_mv_buf_mgr, UWORD32 abs_poc)
|
|||
|
||||
WORD32 ihevcd_ref_list(codec_t *ps_codec, pps_t *ps_pps, sps_t *ps_sps, slice_header_t *ps_slice_hdr)
|
||||
{
|
||||
WORD32 i;
|
||||
WORD32 i, j;
|
||||
WORD32 st_rps_idx;
|
||||
WORD32 num_neg_pics, num_pos_pics;
|
||||
WORD8 *pi1_used;
|
||||
|
|
@ -503,11 +503,11 @@ WORD32 ihevcd_ref_list(codec_t *ps_codec, pps_t *ps_pps, sps_t *ps_sps, slice_he
|
|||
|
||||
/* Find buffer id of the MV bank corresponding to the buffer being freed (Buffer with POC of u4_abs_poc) */
|
||||
ps_mv_buf = (mv_buf_t *)ps_codec->ps_mv_buf;
|
||||
for(i = 0; i < BUF_MGR_MAX_CNT; i++)
|
||||
for(j = 0; j < ps_codec->i4_max_dpb_size; j++)
|
||||
{
|
||||
if(ps_mv_buf && ps_mv_buf->i4_abs_poc == ps_pic_buf->i4_abs_poc)
|
||||
{
|
||||
ihevc_buf_mgr_release((buf_mgr_t *)ps_codec->pv_mv_buf_mgr, i, BUF_MGR_REF);
|
||||
ihevc_buf_mgr_release((buf_mgr_t *)ps_codec->pv_mv_buf_mgr, j, BUF_MGR_REF);
|
||||
break;
|
||||
}
|
||||
ps_mv_buf++;
|
||||
|
|
|
|||
|
|
@ -1929,6 +1929,9 @@ struct _codec_t
|
|||
*/
|
||||
void *ps_mv_buf;
|
||||
|
||||
/** Holds the number of mv_buf_t structures allocated */
|
||||
WORD32 i4_max_dpb_size;
|
||||
|
||||
/**
|
||||
* Base address for Motion Vector bank buffer
|
||||
*/
|
||||
|
|
|
|||
2
decoder/ihevcd_utils.c
Normal file → Executable file
2
decoder/ihevcd_utils.c
Normal file → Executable file
|
|
@ -598,6 +598,8 @@ IHEVCD_ERROR_T ihevcd_mv_buf_mgr_add_bufs(codec_t *ps_codec)
|
|||
*/
|
||||
max_dpb_size++;
|
||||
|
||||
ps_codec->i4_max_dpb_size = max_dpb_size;
|
||||
|
||||
pu1_buf = (UWORD8 *)ps_codec->pv_mv_bank_buf_base;
|
||||
|
||||
ps_mv_buf = (mv_buf_t *)pu1_buf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue