mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-17 06:16:06 +07:00
Check change in CTB size when decoding multiple SPS with same id
If an SPS is being overwritten, ensure CTB size remains same. If not, return from decoder and reset the decoder state in the subsequent decode call. Bug: 140322595 Test: poc in bug Change-Id: I5f1e52d3bd2b48874a088ab32054f5a89e62eeb5
This commit is contained in:
parent
9fcd94f316
commit
70940fbabd
1 changed files with 13 additions and 0 deletions
|
|
@ -1675,6 +1675,19 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
/* Check if CTB size is different in case of multiple SPS with same ID */
|
||||
{
|
||||
sps_t *ps_sps_old = (ps_codec->s_parse.ps_sps_base + sps_id);
|
||||
if(ps_sps_old->i1_sps_valid && ps_sps_old->i1_log2_ctb_size != ctb_log2_size_y)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
ps_sps->i1_log2_ctb_size = ctb_log2_size_y;
|
||||
|
||||
UEV_PARSE("log2_min_transform_block_size_minus2", value, ps_bitstrm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue