From 9c32ad7126890dfaa79fd29affaaf07de335fa3a Mon Sep 17 00:00:00 2001 From: Ritu Baldwa Date: Tue, 16 Jan 2018 13:41:30 +0530 Subject: Decoder: Fixed reset values in parse sps. Memset to zero whenever new sps occurs. Bug: 70897394 Test: manual Change-Id: I5936fd55265ff8ad2b275a72b175cdb540bb7933 --- decoder/ih264d_parse_headers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/decoder/ih264d_parse_headers.c b/decoder/ih264d_parse_headers.c index 48c5ebe..5d461f8 100644 --- a/decoder/ih264d_parse_headers.c +++ b/decoder/ih264d_parse_headers.c @@ -30,6 +30,8 @@ * \author AI ************************************************************************** */ +#include + #include "ih264_typedefs.h" #include "ih264_macros.h" #include "ih264_platform_macros.h" @@ -564,6 +566,8 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm) /*--------------------------------------------------------------------*/ ps_seq = ps_dec->pv_scratch_sps_pps; + memset(ps_seq, 0, sizeof(dec_seq_params_t)); + if(ps_dec->i4_header_decoded & 1) { *ps_seq = *ps_dec->ps_cur_sps; -- cgit v1.2.3 From aecdfd1aff2505da11ad48ad4f9f918054ce0c97 Mon Sep 17 00:00:00 2001 From: Ritu Baldwa Date: Tue, 16 Jan 2018 13:48:41 +0530 Subject: Decoder: Set prev slice type for I slice. Fixed initialization of u1_pr_sl_type for I slice. Bug: 70897454 Test: ran PoC before/after patch Change-Id: I0c37317513b72236be98c2b25482a67bf2b56052 --- decoder/ih264d_parse_slice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoder/ih264d_parse_slice.c b/decoder/ih264d_parse_slice.c index e100ceb..48e6d39 100644 --- a/decoder/ih264d_parse_slice.c +++ b/decoder/ih264d_parse_slice.c @@ -1833,7 +1833,7 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice, ps_dec->ps_cur_pic->u4_pack_slc_typ |= I_SLC_BIT; ret = ih264d_parse_islice(ps_dec, u2_first_mb_in_slice); - + ps_dec->u1_pr_sl_type = u1_slice_type; if(ps_dec->i4_pic_type != B_SLICE && ps_dec->i4_pic_type != P_SLICE) ps_dec->i4_pic_type = I_SLICE; -- cgit v1.2.3