mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-18 14:56:17 +07:00
Merge "Correct Tiles rows and cols check" into lmp-dev
am: 7e3858b313
Change-Id: Icd1f4987a8ab0997ef6e6f77e401d7a83b29e60b
This commit is contained in:
commit
a78650de6d
1 changed files with 8 additions and 2 deletions
|
|
@ -1755,6 +1755,12 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
|
|||
ps_pps->i1_loop_filter_across_tiles_enabled_flag = 0;
|
||||
if(ps_pps->i1_tiles_enabled_flag)
|
||||
{
|
||||
WORD32 wd = ALIGN64(ps_codec->i4_wd);
|
||||
WORD32 ht = ALIGN64(ps_codec->i4_ht);
|
||||
|
||||
WORD32 max_tile_cols = (wd + MIN_TILE_WD - 1) / MIN_TILE_WD;
|
||||
WORD32 max_tile_rows = (ht + MIN_TILE_HT - 1) / MIN_TILE_HT;
|
||||
|
||||
UEV_PARSE("num_tile_columns_minus1", value, ps_bitstrm);
|
||||
ps_pps->i1_num_tile_columns = value + 1;
|
||||
|
||||
|
|
@ -1762,9 +1768,9 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
|
|||
ps_pps->i1_num_tile_rows = value + 1;
|
||||
|
||||
if((ps_pps->i1_num_tile_columns < 1) ||
|
||||
(ps_pps->i1_num_tile_columns > ps_sps->i2_pic_wd_in_ctb) ||
|
||||
(ps_pps->i1_num_tile_columns > max_tile_cols) ||
|
||||
(ps_pps->i1_num_tile_rows < 1) ||
|
||||
(ps_pps->i1_num_tile_rows > ps_sps->i2_pic_ht_in_ctb))
|
||||
(ps_pps->i1_num_tile_rows > max_tile_rows))
|
||||
return IHEVCD_INVALID_HEADER;
|
||||
|
||||
BITS_PARSE("uniform_spacing_flag", value, ps_bitstrm, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue