decoder: Treat unsupported feature errors as fatal errors
am: 54160a6d3e
Change-Id: If8d2ad6d3219f1bda65ba140e2a92ffc048c2f6e
This commit is contained in:
commit
49a55273e4
3 changed files with 9 additions and 5 deletions
|
|
@ -50,6 +50,7 @@ extern "C" {
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Constant Macros */
|
/* Constant Macros */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
#define IVD_ERROR_MASK 0xFF
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Function Macros */
|
/* Function Macros */
|
||||||
|
|
|
||||||
|
|
@ -1549,7 +1549,7 @@ WORD32 ih264d_create(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ps_create_op->s_ivd_create_op_t.u4_error_code = IVD_MEM_ALLOC_FAILED;
|
ps_create_op->s_ivd_create_op_t.u4_error_code = IVD_MEM_ALLOC_FAILED;
|
||||||
ps_create_op->s_ivd_create_op_t.u4_error_code = 1 << IVD_FATALERROR;
|
ps_create_op->s_ivd_create_op_t.u4_error_code |= 1 << IVD_FATALERROR;
|
||||||
|
|
||||||
return IV_FAIL;
|
return IV_FAIL;
|
||||||
}
|
}
|
||||||
|
|
@ -1591,6 +1591,8 @@ UWORD32 ih264d_map_error(UWORD32 i4_err_status)
|
||||||
case ERROR_PROFILE_NOT_SUPPORTED:
|
case ERROR_PROFILE_NOT_SUPPORTED:
|
||||||
case ERROR_INIT_NOT_DONE:
|
case ERROR_INIT_NOT_DONE:
|
||||||
case IVD_MEM_ALLOC_FAILED:
|
case IVD_MEM_ALLOC_FAILED:
|
||||||
|
case ERROR_FEATURE_UNAVAIL:
|
||||||
|
case IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED:
|
||||||
temp = 1 << IVD_FATALERROR;
|
temp = 1 << IVD_FATALERROR;
|
||||||
H264_DEC_DEBUG_PRINT("\nFatal Error\n");
|
H264_DEC_DEBUG_PRINT("\nFatal Error\n");
|
||||||
break;
|
break;
|
||||||
|
|
@ -1625,7 +1627,6 @@ UWORD32 ih264d_map_error(UWORD32 i4_err_status)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ERROR_NOT_SUPP_RESOLUTION:
|
case ERROR_NOT_SUPP_RESOLUTION:
|
||||||
case ERROR_FEATURE_UNAVAIL:
|
|
||||||
case ERROR_ACTUAL_LEVEL_GREATER_THAN_INIT:
|
case ERROR_ACTUAL_LEVEL_GREATER_THAN_INIT:
|
||||||
temp = 1 << IVD_UNSUPPORTEDINPUT;
|
temp = 1 << IVD_UNSUPPORTEDINPUT;
|
||||||
break;
|
break;
|
||||||
|
|
@ -2260,6 +2261,8 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
|
||||||
|| (ret == ERROR_UNAVAIL_PICBUF_T)
|
|| (ret == ERROR_UNAVAIL_PICBUF_T)
|
||||||
|| (ret == ERROR_UNAVAIL_MVBUF_T)
|
|| (ret == ERROR_UNAVAIL_MVBUF_T)
|
||||||
|| (ret == ERROR_INV_SPS_PPS_T)
|
|| (ret == ERROR_INV_SPS_PPS_T)
|
||||||
|
|| (ret == ERROR_FEATURE_UNAVAIL)
|
||||||
|
|| (ret == IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED)
|
||||||
|| (ret == IVD_DISP_FRM_ZERO_OP_BUF_SIZE))
|
|| (ret == IVD_DISP_FRM_ZERO_OP_BUF_SIZE))
|
||||||
{
|
{
|
||||||
ps_dec->u4_slice_start_code_found = 0;
|
ps_dec->u4_slice_start_code_found = 0;
|
||||||
|
|
|
||||||
|
|
@ -608,7 +608,7 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm)
|
||||||
/* Monochrome is not supported */
|
/* Monochrome is not supported */
|
||||||
if(ps_seq->i4_chroma_format_idc != 1)
|
if(ps_seq->i4_chroma_format_idc != 1)
|
||||||
{
|
{
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_FEATURE_UNAVAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reading bit_depth_luma_minus8 */
|
/* reading bit_depth_luma_minus8 */
|
||||||
|
|
@ -617,7 +617,7 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm)
|
||||||
|
|
||||||
if(ps_seq->i4_bit_depth_luma_minus8 != 0)
|
if(ps_seq->i4_bit_depth_luma_minus8 != 0)
|
||||||
{
|
{
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_FEATURE_UNAVAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reading bit_depth_chroma_minus8 */
|
/* reading bit_depth_chroma_minus8 */
|
||||||
|
|
@ -626,7 +626,7 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm)
|
||||||
|
|
||||||
if(ps_seq->i4_bit_depth_chroma_minus8 != 0)
|
if(ps_seq->i4_bit_depth_chroma_minus8 != 0)
|
||||||
{
|
{
|
||||||
return ERROR_INV_SPS_PPS_T;
|
return ERROR_FEATURE_UNAVAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reading qpprime_y_zero_transform_bypass_flag */
|
/* reading qpprime_y_zero_transform_bypass_flag */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue