aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-25 20:46:20 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-25 20:46:20 +0000
commitcbf530ce9ae941408e897a1f156372bae525c843 (patch)
tree0a2d7ad1328fea2b091429c242bc26d25bf8d600
parent2351c638c0c3273a1b7fa8bf56761d6b8d66e769 (diff)
parentd338f7d0abdcf7f61a8010dd53e014a69e23d283 (diff)
downloadlibavc-cbf530ce9ae941408e897a1f156372bae525c843.tar.gz
Change-Id: I2d5f6e080f4119df860544e0341a17e6896d92e2
-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 cc1d90f..f922cfe 100644
--- a/decoder/ih264d_parse_slice.c
+++ b/decoder/ih264d_parse_slice.c
@@ -1435,17 +1435,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;