Merge "Fix resolution change within a decode call." into mnc-dev

This commit is contained in:
TreeHugger Robot 2017-06-06 17:32:41 +00:00 committed by Android (Google) Code Review
commit 7fc42b801c
3 changed files with 12 additions and 0 deletions

View file

@ -2877,6 +2877,7 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
ps_dec->u4_bs_deblk_thread_created = 0;
ps_dec->u4_cur_bs_mb_num = 0;
ps_dec->u4_start_recon_deblk = 0;
ps_dec->u4_sps_cnt_in_process = 0;
DEBUG_THREADS_PRINTF(" Starting process call\n");

View file

@ -1221,6 +1221,16 @@ WORD32 ih264d_parse_nal_unit(iv_obj_t *dec_hdl,
/* ! */
ih264d_rbsp_to_sodb(ps_dec->ps_bitstrm);
i_status = ih264d_parse_sps(ps_dec, ps_bitstrm);
ps_dec->u4_sps_cnt_in_process++;
/*If a resolution change happens within a process call, due to multiple sps
* we will not support it.
*/
if((ps_dec->u4_sps_cnt_in_process > 1 ) &&
(i_status == IVD_RES_CHANGED))
{
i_status = ERROR_INV_SPS_PPS_T;
ps_dec->u1_res_changed = 0;
}
if(i_status == ERROR_INV_SPS_PPS_T)
return i_status;
if(!i_status)

View file

@ -1317,6 +1317,7 @@ typedef struct _DecStruct
UWORD32 u4_cur_bs_mb_num;
UWORD32 u4_bs_cur_slice_num_mbs;
UWORD32 u4_cur_deblk_mb_num;
UWORD32 u4_sps_cnt_in_process;
volatile UWORD16 u2_cur_slice_num_bs;
UWORD32 u4_deblk_mb_x;