Merge "Decoder: Return correct error code for slice header errors" into mnc-dev
This commit is contained in:
commit
51ecbcabfb
2 changed files with 8 additions and 8 deletions
|
|
@ -1516,7 +1516,7 @@ WORD32 ih264d_mark_err_slice_skip(dec_struct_t * ps_dec,
|
||||||
//if valid SPS PPS is not found return error
|
//if valid SPS PPS is not found return error
|
||||||
if(j == -1)
|
if(j == -1)
|
||||||
{
|
{
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* call ih264d_start_of_pic only if it was not called earlier*/
|
/* call ih264d_start_of_pic only if it was not called earlier*/
|
||||||
|
|
|
||||||
|
|
@ -1152,19 +1152,19 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
|
||||||
|
|
||||||
u4_temp = ih264d_uev(pu4_bitstrm_ofst, pu4_bitstrm_buf);
|
u4_temp = ih264d_uev(pu4_bitstrm_ofst, pu4_bitstrm_buf);
|
||||||
if(u4_temp & MASK_ERR_PIC_SET_ID)
|
if(u4_temp & MASK_ERR_PIC_SET_ID)
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
/* discard slice if pic param is invalid */
|
/* discard slice if pic param is invalid */
|
||||||
COPYTHECONTEXT("SH: pic_parameter_set_id", u4_temp);
|
COPYTHECONTEXT("SH: pic_parameter_set_id", u4_temp);
|
||||||
ps_pps = &ps_dec->ps_pps[u4_temp];
|
ps_pps = &ps_dec->ps_pps[u4_temp];
|
||||||
if(FALSE == ps_pps->u1_is_valid)
|
if(FALSE == ps_pps->u1_is_valid)
|
||||||
{
|
{
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
}
|
}
|
||||||
ps_seq = ps_pps->ps_sps;
|
ps_seq = ps_pps->ps_sps;
|
||||||
if(!ps_seq)
|
if(!ps_seq)
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
if(FALSE == ps_seq->u1_is_valid)
|
if(FALSE == ps_seq->u1_is_valid)
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
|
|
||||||
/* Get the frame num */
|
/* Get the frame num */
|
||||||
u2_frame_num = ih264d_get_bits_h264(ps_bitstrm,
|
u2_frame_num = ih264d_get_bits_h264(ps_bitstrm,
|
||||||
|
|
@ -1213,7 +1213,7 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
|
||||||
u4_idr_pic_id = ih264d_uev(pu4_bitstrm_ofst,
|
u4_idr_pic_id = ih264d_uev(pu4_bitstrm_ofst,
|
||||||
pu4_bitstrm_buf);
|
pu4_bitstrm_buf);
|
||||||
if(u4_idr_pic_id > 65535)
|
if(u4_idr_pic_id > 65535)
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
COPYTHECONTEXT("SH: ", u4_idr_pic_id);
|
COPYTHECONTEXT("SH: ", u4_idr_pic_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1228,7 +1228,7 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
|
||||||
ps_bitstrm,
|
ps_bitstrm,
|
||||||
ps_seq->u1_log2_max_pic_order_cnt_lsb_minus);
|
ps_seq->u1_log2_max_pic_order_cnt_lsb_minus);
|
||||||
if(i_temp < 0 || i_temp >= ps_seq->i4_max_pic_order_cntLsb)
|
if(i_temp < 0 || i_temp >= ps_seq->i4_max_pic_order_cntLsb)
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
s_tmp_poc.i4_pic_order_cnt_lsb = i_temp;
|
s_tmp_poc.i4_pic_order_cnt_lsb = i_temp;
|
||||||
COPYTHECONTEXT("SH: pic_order_cnt_lsb", s_tmp_poc.i4_pic_order_cnt_lsb);
|
COPYTHECONTEXT("SH: pic_order_cnt_lsb", s_tmp_poc.i4_pic_order_cnt_lsb);
|
||||||
|
|
||||||
|
|
@ -1265,7 +1265,7 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
|
||||||
{
|
{
|
||||||
u4_temp = ih264d_uev(pu4_bitstrm_ofst, pu4_bitstrm_buf);
|
u4_temp = ih264d_uev(pu4_bitstrm_ofst, pu4_bitstrm_buf);
|
||||||
if(u4_temp > MAX_REDUNDANT_PIC_CNT)
|
if(u4_temp > MAX_REDUNDANT_PIC_CNT)
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_INV_SLICE_HDR_T;
|
||||||
u1_redundant_pic_cnt = u4_temp;
|
u1_redundant_pic_cnt = u4_temp;
|
||||||
COPYTHECONTEXT("SH: redundant_pic_cnt", u1_redundant_pic_cnt);
|
COPYTHECONTEXT("SH: redundant_pic_cnt", u1_redundant_pic_cnt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue