aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Essick <essick@google.com>2021-06-08 04:57:54 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-06-08 04:57:54 +0000
commit83c84781df23783d6dddfbbac914ffef85547a12 (patch)
tree05df8b4a8e46668d6722ec131bd38c90e2a90be8
parenta45e73ed02e6a71558a356c0c556f8d57dcee29a (diff)
parenta537f15bc9ff008cf3973297d41a968c90630147 (diff)
downloadlibavc-83c84781df23783d6dddfbbac914ffef85547a12.tar.gz
Merge "Decoder: Update check for increment u2_cur_slice_num" into oc-mr1-dev am: 6b338befbc am: 6ddeb05426 am: a537f15bc9
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libavc/+/14460944 Change-Id: Iafcffc3094782c99dfe832f4bcfe91324e37a7fc
-rw-r--r--decoder/ih264d_parse_slice.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/decoder/ih264d_parse_slice.c b/decoder/ih264d_parse_slice.c
index 0f5598f..1bc3048 100644
--- a/decoder/ih264d_parse_slice.c
+++ b/decoder/ih264d_parse_slice.c
@@ -1427,17 +1427,20 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
i1_is_end_of_poc = 0;
}
- if (ps_dec->u4_first_slice_in_pic == 0)
+ /* Increment only if the current slice has atleast 1 more MB */
+ if (ps_dec->u4_first_slice_in_pic == 0 &&
+ (ps_dec->ps_parse_cur_slice->u4_first_mb_in_slice <
+ (UWORD32)(ps_dec->u2_total_mbs_coded >> ps_dec->ps_cur_slice->u1_mbaff_frame_flag)))
{
ps_dec->ps_parse_cur_slice++;
ps_dec->u2_cur_slice_num++;
+ // in the case of single core increment ps_decode_cur_slice
+ if(ps_dec->u1_separate_parse == 0)
+ {
+ ps_dec->ps_decode_cur_slice++;
+ }
}
- // in the case of single core increment ps_decode_cur_slice
- if((ps_dec->u1_separate_parse == 0) && (ps_dec->u4_first_slice_in_pic == 0))
- {
- ps_dec->ps_decode_cur_slice++;
- }
ps_dec->u1_slice_header_done = 0;