mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-15 23:32:35 +07:00
Merge "Ensure CTB size > 16 for clips with tiles and width/height >= 4096" into lmp-dev am: db15dd7102 am: 419fd4b745 am: 8e6cf47bf1 am: 61f3fbfe13
am: 107cdf1c41
Change-Id: Ia61dfffd09ed16728e8e67c9a4278320b83fd5f0
This commit is contained in:
commit
334f59340c
1 changed files with 13 additions and 0 deletions
|
|
@ -1811,6 +1811,19 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
|
|||
BITS_PARSE("tiles_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_tiles_enabled_flag = value;
|
||||
|
||||
/* When tiles are enabled and width or height is >= 4096,
|
||||
* CTB Size should at least be 32. 16x16 CTBs can result
|
||||
* in tile position greater than 255 for 4096,
|
||||
* which decoder does not support.
|
||||
*/
|
||||
if((ps_pps->i1_tiles_enabled_flag) &&
|
||||
(ps_sps->i1_log2_ctb_size == 4) &&
|
||||
((ps_sps->i2_pic_width_in_luma_samples >= 4096) ||
|
||||
(ps_sps->i2_pic_height_in_luma_samples >= 4096)))
|
||||
{
|
||||
return IHEVCD_INVALID_HEADER;
|
||||
}
|
||||
|
||||
BITS_PARSE("entropy_coding_sync_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_entropy_coding_sync_enabled_flag = value;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue