mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-19 07:16:01 +07:00
Fix reallocation for new sps
Bug: 34779227 Bug: 62815506 Change-Id: I345f149eee46ae4ff4261526abca10d7ebc05ac5
This commit is contained in:
parent
c67922bab6
commit
faa26fa3d7
1 changed files with 14 additions and 2 deletions
|
|
@ -1361,12 +1361,16 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
|
||||
/* Check if sps_max_dec_pic_buffering or sps_max_num_reorder_pics
|
||||
has changed */
|
||||
if(0 != ps_codec->i4_first_pic_done)
|
||||
if(0 != ps_codec->u4_allocate_dynamic_done)
|
||||
{
|
||||
sps_t *ps_sps_old = ps_codec->s_parse.ps_sps;
|
||||
if(ps_sps_old->ai1_sps_max_dec_pic_buffering[ps_sps_old->i1_sps_max_sub_layers - 1] !=
|
||||
ps_sps->ai1_sps_max_dec_pic_buffering[ps_sps->i1_sps_max_sub_layers - 1])
|
||||
{
|
||||
if(0 == ps_codec->i4_first_pic_done)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_codec->i4_reset_flag = 1;
|
||||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
||||
}
|
||||
|
|
@ -1374,6 +1378,10 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
if(ps_sps_old->ai1_sps_max_num_reorder_pics[ps_sps_old->i1_sps_max_sub_layers - 1] !=
|
||||
ps_sps->ai1_sps_max_num_reorder_pics[ps_sps->i1_sps_max_sub_layers - 1])
|
||||
{
|
||||
if(0 == ps_codec->i4_first_pic_done)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_codec->i4_reset_flag = 1;
|
||||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
||||
}
|
||||
|
|
@ -1547,10 +1555,14 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
ps_sps->i2_pic_ht_in_min_cb = numerator /
|
||||
(1 << ps_sps->i1_log2_min_coding_block_size);
|
||||
}
|
||||
if((0 != ps_codec->i4_first_pic_done) &&
|
||||
if((0 != ps_codec->u4_allocate_dynamic_done) &&
|
||||
((ps_codec->i4_wd != ps_sps->i2_pic_width_in_luma_samples) ||
|
||||
(ps_codec->i4_ht != ps_sps->i2_pic_height_in_luma_samples)))
|
||||
{
|
||||
if(0 == ps_codec->i4_first_pic_done)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_codec->i4_reset_flag = 1;
|
||||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue