Merge "Correct Tiles rows and cols check" into lmp-dev am: 7e3858b313 am: a78650de6d am: 2bd3c9cd07 am: 576f2fd4ef am: af6ce4991f am: 98c1c3e1c1

am: 16db19a2f9

Change-Id: I50bd04797604451d2b9aad17cf4dd3e7ca28bb96
This commit is contained in:
Hangyu Kuang 2017-04-12 20:43:03 +00:00 • committed by android-build-merger
commit bfb52f7f70

View file

@ -1753,6 +1753,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;
@ -1760,9 +1766,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);