summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-09-13 22:30:15 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-09-13 22:30:15 +0000
commit4ab019ea0ff4798314b9c0dc73ab1fc2d137d1d5 (patch)
tree8347f13a7065766e843dee0641dd3c81e045ab1f
parentbd1336f3058fdf37013f13b874432e80afaa926d (diff)
parentf34f99401bb3400d0d7799dbbd5e4f5870a9cff7 (diff)
downloadplatform_external_libhevc-nougat-mr1-volantis-release.tar.gz
platform_external_libhevc-nougat-mr1-volantis-release.tar.bz2
platform_external_libhevc-nougat-mr1-volantis-release.zip
Merge cherrypicks of [2892168, 2892830, 2892833, 2892799, 2892800, 2892658, 2892659, 2892512, 2892869, 2892870, 2892871, 2892872, 2892873, 2892874, 2892875, 2892513, 2892514, 2892876, 2892816, 2892817, 2892923, 2892422] into nyc-mr1-volantis-releaseandroid-7.1.1_r58nougat-mr1-volantis-release
Change-Id: I23ef2d0c29633f8f1de726b82775427228ea1ecb
-rw-r--r--decoder/ihevcd_decode.c1
-rw-r--r--decoder/ihevcd_parse_headers.c13
2 files changed, 13 insertions, 1 deletions
diff --git a/decoder/ihevcd_decode.c b/decoder/ihevcd_decode.c
index 87c3bd7..7b82e84 100644
--- a/decoder/ihevcd_decode.c
+++ b/decoder/ihevcd_decode.c
@@ -633,7 +633,6 @@ WORD32 ihevcd_decode(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op)
if(IHEVCD_IGNORE_SLICE == ret)
{
- ps_codec->s_parse.i4_cur_slice_idx = MAX(0, (ps_codec->s_parse.i4_cur_slice_idx - 1));
ps_codec->pu1_inp_bitsbuf += (nal_ofst + nal_len);
ps_codec->i4_bytes_remaining -= (nal_ofst + nal_len);
diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c
index 29a309d..06f35a3 100644
--- a/decoder/ihevcd_parse_headers.c
+++ b/decoder/ihevcd_parse_headers.c
@@ -1813,6 +1813,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;