aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2021-12-08 23:00:15 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-08 23:00:15 +0000
commit9ab629f2b294f268697241f0bff165e02c967cec (patch)
tree25cbc9caf9539f32fe45dd25b24e8e9b0fc0c806
parenta537f15bc9ff008cf3973297d41a968c90630147 (diff)
parentdc110841d6a3fb2f9c9f1af04b3b71da40fbd392 (diff)
downloadlibavc-9ab629f2b294f268697241f0bff165e02c967cec.tar.gz
Move slice increments after completing header parsing am: dc110841d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libavc/+/16407185 Change-Id: I64bc47c5e09ef577c7a9a7686ddd3e5e6c63936a
-rw-r--r--decoder/ih264d_parse_slice.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/decoder/ih264d_parse_slice.c b/decoder/ih264d_parse_slice.c
index 668ed5f..b578397 100644
--- a/decoder/ih264d_parse_slice.c
+++ b/decoder/ih264d_parse_slice.c
@@ -1423,23 +1423,6 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
i1_is_end_of_poc = 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++;
- }
- }
-
- ps_dec->u1_slice_header_done = 0;
-
-
if(u1_field_pic_flag)
{
ps_dec->u2_prv_frame_num = u2_frame_num;
@@ -1497,6 +1480,22 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
}
}
+ /* 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++;
+ }
+ }
+
+ ps_dec->u1_slice_header_done = 0;
+
/*--------------------------------------------------------------------*/
/* Copy the values read from the bitstream to the slice header and then*/
/* If the slice is first slice in picture, then do Start of Picture */