merge in nougat-cts-release history after reset to nougat-cts-dev
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c
index 06cc8e9..801960b 100644
--- a/decoder/ih264d_api.c
+++ b/decoder/ih264d_api.c
@@ -2143,10 +2143,9 @@
ret1 = ih264d_mark_err_slice_skip(ps_dec, num_mb_skipped, ps_dec->u1_nal_unit_type == IDR_SLICE_NAL, ps_dec->ps_cur_slice->u2_frame_num,
&temp_poc, prev_slice_err);
- if((ret1 == ERROR_UNAVAIL_PICBUF_T) || (ret1 == ERROR_UNAVAIL_MVBUF_T) ||
- (ret1 == ERROR_INV_SPS_PPS_T))
+ if((ret1 == ERROR_UNAVAIL_PICBUF_T) || (ret1 == ERROR_UNAVAIL_MVBUF_T))
{
- ret = ret1;
+ return IV_FAIL;
}
}
diff --git a/decoder/ih264d_inter_pred.c b/decoder/ih264d_inter_pred.c
index b99a77c..01f2e01 100644
--- a/decoder/ih264d_inter_pred.c
+++ b/decoder/ih264d_inter_pred.c
@@ -474,7 +474,7 @@
UWORD8 i1_mc_wd, u1_dma_ht, u1_dma_wd, u1_dx, u1_dy;
pred_info_t * ps_pred ;
dec_slice_params_t * const ps_cur_slice = ps_dec->ps_cur_slice;
- const UWORD8 u1_slice_type = ps_dec->ps_decode_cur_slice->slice_type;
+ const UWORD8 u1_slice_type = ps_cur_slice->u1_slice_type;
UWORD8 u1_pod_bot, u1_pod_top;
/* load the pictype for pod u4_flag & chroma motion vector derivation */
@@ -1013,7 +1013,7 @@
UWORD32 u2_dest_wd_y, u2_dest_wd_uv;
UWORD32 u2_row_buf_wd_y = 0;
UWORD32 u2_row_buf_wd_uv = 0;
- UWORD32 u2_log2Y_crwd;
+ UWORD32 u2_log2Y_crwd = ps_dec->ps_cur_slice->u2_log2Y_crwd;
UWORD32 u4_wd_y, u4_ht_y, u1_dir, u4_wd_uv;
UWORD32 u4_ht_uv;
UWORD8 *pu1_temp_mc_buffer = ps_dec->pu1_temp_mc_buffer;
@@ -1039,7 +1039,8 @@
ps_pred_y_back = ps_pred;
ps_pred_cr_forw = ps_pred;
- u2_log2Y_crwd = ps_dec->ps_decode_cur_slice->u2_log2Y_crwd;
+ if(ps_dec->u1_separate_parse)
+ u2_log2Y_crwd = ps_dec->ps_decode_cur_slice->u2_log2Y_crwd;
if(!u1_pic_fld)
{
diff --git a/decoder/ih264d_parse_pslice.c b/decoder/ih264d_parse_pslice.c
index dfd1ba8..c712ed5 100644
--- a/decoder/ih264d_parse_pslice.c
+++ b/decoder/ih264d_parse_pslice.c
@@ -1489,27 +1489,10 @@
if(ps_dec->ps_cur_pic != NULL)
poc = ps_dec->ps_cur_pic->i4_poc + 2;
- j = -1;
+ j = 0;
for(i = 0; i < MAX_NUM_PIC_PARAMS; i++)
- {
if(ps_dec->ps_pps[i].u1_is_valid == TRUE)
- {
- if(ps_dec->ps_pps[i].ps_sps->u1_is_valid == TRUE)
- {
- j = i;
- break;
- }
- }
- }
-
- //if valid SPS PPS is not found return error
- if(j == -1)
- {
- return ERROR_INV_SPS_PPS_T;
- }
-
- /* call ih264d_start_of_pic only if it was not called earlier*/
- if(ps_dec->u4_pic_buf_got == 0)
+ j = i;
{
//initialize slice params required by ih264d_start_of_pic to valid values
ps_dec->ps_cur_slice->u1_slice_type = P_SLICE;
@@ -1580,8 +1563,7 @@
&& ps_parse_cur_slice == ps_dec->ps_parse_cur_slice)
{
// Slice data corrupted
- // in the case of mbaff, conceal from the even mb.
- u1_num_mbs = (ps_dec->u4_num_mbs_cur_nmb >> u1_mbaff ) << u1_mbaff;
+ u1_num_mbs = ps_dec->u4_num_mbs_cur_nmb;
if(u1_num_mbs)
{
diff --git a/decoder/ih264d_parse_slice.c b/decoder/ih264d_parse_slice.c
index 05a82a6..911b11d 100644
--- a/decoder/ih264d_parse_slice.c
+++ b/decoder/ih264d_parse_slice.c
@@ -441,8 +441,6 @@
/*make first entry of list0 point to cur pic,so that if first Islice is in error, ref pic struct will have valid entries*/
ps_dec->ps_ref_pic_buf_lx[0] = ps_dec->ps_dpb_mgr->ps_init_dpb[0];
*(ps_dec->ps_dpb_mgr->ps_init_dpb[0][0]) = *ps_cur_pic;
- /* Initialize for field reference as well */
- *(ps_dec->ps_dpb_mgr->ps_init_dpb[0][MAX_REF_BUFS]) = *ps_cur_pic;
}
if(!ps_dec->ps_cur_pic)
@@ -1431,11 +1429,6 @@
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->u4_first_slice_in_pic == 0))
- {
- ps_dec->ps_decode_cur_slice++;
- }
ps_dec->u1_slice_header_done = 0;
/*--------------------------------------------------------------------*/