summaryrefslogtreecommitdiffstats
path: root/decoder
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2015-08-14 13:06:28 +0530
committerMarco Nelissen <marcone@google.com>2015-10-09 11:44:26 -0700
commitb2451d13750591966a2a9e57a1db771859a82fc7 (patch)
treeb9724d540d4fec3cb192cb610ce3bca283c7decc /decoder
parent233819f9a3456e7a51264b000b52284f74745b28 (diff)
downloadandroid_external_libhevc-b2451d13750591966a2a9e57a1db771859a82fc7.tar.gz
android_external_libhevc-b2451d13750591966a2a9e57a1db771859a82fc7.tar.bz2
android_external_libhevc-b2451d13750591966a2a9e57a1db771859a82fc7.zip
Fix in reading short_term_ref_pic_set_idx in slice header
This is to be set to 0, when num_short_term_ref_pic_sets in sps is 1. Change-Id: Ied061106952eddadd1c92281c6183fd510e2b0b0
Diffstat (limited to 'decoder')
-rw-r--r--decoder/ihevcd_parse_slice_header.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/decoder/ihevcd_parse_slice_header.c b/decoder/ihevcd_parse_slice_header.c
index 2afa4d2..e9c3073 100644
--- a/decoder/ihevcd_parse_slice_header.c
+++ b/decoder/ihevcd_parse_slice_header.c
@@ -419,10 +419,13 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
{
WORD32 numbits;
- numbits = 32 - CLZ(ps_sps->i1_num_short_term_ref_pic_sets - 1);
- BITS_PARSE("short_term_ref_pic_set_idx", value, ps_bitstrm, numbits);
- ps_slice_hdr->i1_short_term_ref_pic_set_idx = value;
- ps_slice_hdr->i1_short_term_ref_pic_set_idx = CLIP3(ps_slice_hdr->i1_short_term_ref_pic_set_idx, 0, MAX_STREF_PICS_SPS - 1);
+ ps_slice_hdr->i1_short_term_ref_pic_set_idx = 0;
+ if(ps_sps->i1_num_short_term_ref_pic_sets > 1)
+ {
+ numbits = 32 - CLZ(ps_sps->i1_num_short_term_ref_pic_sets - 1);
+ BITS_PARSE("short_term_ref_pic_set_idx", value, ps_bitstrm, numbits);
+ ps_slice_hdr->i1_short_term_ref_pic_set_idx = value;
+ }
st_rps_idx = ps_slice_hdr->i1_short_term_ref_pic_set_idx;
num_neg_pics = ps_sps->as_stref_picset[st_rps_idx].i1_num_neg_pics;