mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-19 07:16:01 +07:00
Fix reallocation for new sps
am: faa26fa3d7
Change-Id: I7c2d161e6f167c319b77a933db1a8e9a66a2e2f0
This commit is contained in:
commit
7bdfbc2d01
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
|
/* Check if sps_max_dec_pic_buffering or sps_max_num_reorder_pics
|
||||||
has changed */
|
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;
|
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] !=
|
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])
|
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;
|
ps_codec->i4_reset_flag = 1;
|
||||||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
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] !=
|
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])
|
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;
|
ps_codec->i4_reset_flag = 1;
|
||||||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
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 /
|
ps_sps->i2_pic_ht_in_min_cb = numerator /
|
||||||
(1 << ps_sps->i1_log2_min_coding_block_size);
|
(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_wd != ps_sps->i2_pic_width_in_luma_samples) ||
|
||||||
(ps_codec->i4_ht != ps_sps->i2_pic_height_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;
|
ps_codec->i4_reset_flag = 1;
|
||||||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue