diff options
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | 2016-04-20 16:13:52 +0530 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-07-08 16:24:46 -0700 |
commit | 41ec1f864cf94957e7d14f49e99bdd6e27e35635 (patch) | |
tree | 379485f0394515abed0636a24003e08daeea3a7e /decoder/ih264d_parse_pslice.c | |
parent | 699a4f70913cb2f4afcc9a36b1c1878212d2c3df (diff) | |
download | android_external_libavc-41ec1f864cf94957e7d14f49e99bdd6e27e35635.tar.gz android_external_libavc-41ec1f864cf94957e7d14f49e99bdd6e27e35635.tar.bz2 android_external_libavc-41ec1f864cf94957e7d14f49e99bdd6e27e35635.zip |
Decoder: Initialize slice parameters before concealing error MBs
Also memset ps_dec_op structure to zero.
For error input, this ensures dimensions are initialized to zero
Bug: 28165661
Ticket: CYNGNOS-3020
Change-Id: I66eb2ddc5e02e74b7ff04da5f749443920f37141
(cherry picked from commit a52b5f6890479576333de325be20c29e829122e7)
Diffstat (limited to 'decoder/ih264d_parse_pslice.c')
-rw-r--r-- | decoder/ih264d_parse_pslice.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/decoder/ih264d_parse_pslice.c b/decoder/ih264d_parse_pslice.c index b023343..1127838 100644 --- a/decoder/ih264d_parse_pslice.c +++ b/decoder/ih264d_parse_pslice.c @@ -1494,6 +1494,12 @@ WORD32 ih264d_mark_err_slice_skip(dec_struct_t * ps_dec, if(ps_dec->ps_pps[i].u1_is_valid == TRUE) j = i; { + //initialize slice params required by ih264d_start_of_pic to valid values + ps_dec->ps_cur_slice->u1_bottom_field_flag = 0; + ps_dec->ps_cur_slice->u1_field_pic_flag = 0; + ps_dec->ps_cur_slice->u1_slice_type = P_SLICE; + ps_dec->ps_cur_slice->u1_nal_ref_idc = 1; + ps_dec->ps_cur_slice->u1_nal_unit_type = 1; ret = ih264d_start_of_pic(ps_dec, poc, ps_cur_poc, ps_dec->ps_cur_slice->u2_frame_num, &ps_dec->ps_pps[j]); @@ -1671,6 +1677,9 @@ WORD32 ih264d_mark_err_slice_skip(dec_struct_t * ps_dec, } ps_dec->ps_cur_slice->u2_first_mb_in_slice = ps_dec->u2_total_mbs_coded << u1_mbaff; + ps_dec->ps_cur_slice->i1_slice_alpha_c0_offset = 0; + ps_dec->ps_cur_slice->i1_slice_beta_offset = 0; + if(ps_dec->ps_cur_slice->u1_field_pic_flag) ps_dec->u2_prv_frame_num = ps_dec->ps_cur_slice->u2_frame_num; |