diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-01-13 23:49:01 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-01-13 23:49:01 +0000 |
commit | cb596b472be2c187c686a397c9954443a6777250 (patch) | |
tree | 285e64e74e80a1bde811cad45280c74ed616f028 | |
parent | 7247e6e4017e540e6b2a99f728362ee997af58b0 (diff) | |
parent | 75eb07f0dbf1769bf8e4871018ae4556ad699f7a (diff) | |
download | libhevc-android11-mainline-cellbroadcast-release.tar.gz |
Snap for 7080740 from 75eb07f0dbf1769bf8e4871018ae4556ad699f7a to mainline-cellbroadcast-releaseandroid-mainline-11.0.0_r37android-mainline-11.0.0_r26android-mainline-11.0.0_r13android11-mainline-cellbroadcast-release
Change-Id: I820e1af1961f6f7e45c0590864203cdad594f8d0
-rw-r--r-- | decoder/ihevcd_sao.c | 24 | ||||
-rw-r--r-- | encoder/ihevce_lap_interface.c | 2 | ||||
-rw-r--r-- | encoder/ihevce_rc_interface.c | 24 |
3 files changed, 25 insertions, 25 deletions
diff --git a/decoder/ihevcd_sao.c b/decoder/ihevcd_sao.c index 3940b6a..243e2ce 100644 --- a/decoder/ihevcd_sao.c +++ b/decoder/ihevcd_sao.c @@ -103,16 +103,14 @@ void ihevcd_sao_ctb(sao_ctxt_t *ps_sao_ctxt) UWORD8 *pu1_no_loop_filter_flag; WORD32 loop_filter_strd; - WORD8 ai1_offset_y[5]; - WORD8 ai1_offset_cb[5]; - WORD8 ai1_offset_cr[5]; + /* Only first 5 values are used, but arrays are large + enough so that SIMD functions can read 64 bits at a time */ + WORD8 ai1_offset_y[8] = {0}; + WORD8 ai1_offset_cb[8] = {0}; + WORD8 ai1_offset_cr[8] = {0}; PROFILE_DISABLE_SAO(); - ai1_offset_y[0] = 0; - ai1_offset_cb[0] = 0; - ai1_offset_cr[0] = 0; - ps_sps = ps_sao_ctxt->ps_sps; log2_ctb_size = ps_sps->i1_log2_ctb_size; ctb_size = (1 << log2_ctb_size); @@ -568,19 +566,15 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt) UWORD8 *pu1_sao_src_top_left_luma_bot_left; UWORD8 *au1_sao_src_top_left_chroma_bot_left; UWORD8 *pu1_sao_src_top_left_chroma_bot_left; - /* Only 5 values are used, but arrays are large + /* Only first 5 values are used, but arrays are large enough so that SIMD functions can read 64 bits at a time */ - WORD8 ai1_offset_y[8]; - WORD8 ai1_offset_cb[8]; - WORD8 ai1_offset_cr[8]; + WORD8 ai1_offset_y[8] = {0}; + WORD8 ai1_offset_cb[8] = {0}; + WORD8 ai1_offset_cr[8] = {0}; WORD32 chroma_yuv420sp_vu = ps_sao_ctxt->is_chroma_yuv420sp_vu; PROFILE_DISABLE_SAO(); - ai1_offset_y[0] = 0; - ai1_offset_cb[0] = 0; - ai1_offset_cr[0] = 0; - ps_sps = ps_sao_ctxt->ps_sps; ps_pps = ps_sao_ctxt->ps_pps; ps_tile = ps_sao_ctxt->ps_tile; diff --git a/encoder/ihevce_lap_interface.c b/encoder/ihevce_lap_interface.c index 4ace17a..9112e1d 100644 --- a/encoder/ihevce_lap_interface.c +++ b/encoder/ihevce_lap_interface.c @@ -1710,7 +1710,7 @@ void ihevce_pre_rel_lapout_update(lap_struct_t *ps_lap_struct, ihevce_lap_enc_bu } ps_lap_struct->pv_prev_inp_buf = (void *)ps_lap_out_buf; - ps_lap_out_buf->s_lap_out.i4_is_prev_pic_in_Tid0_same_scene = 0; + ps_lap_out_buf->s_lap_out.i4_is_prev_pic_in_Tid0_same_scene = 1; /*with force idr below check is not valid*/ #if(!FORCE_IDR_TEST) diff --git a/encoder/ihevce_rc_interface.c b/encoder/ihevce_rc_interface.c index 17ffa78..71be434 100644 --- a/encoder/ihevce_rc_interface.c +++ b/encoder/ihevce_rc_interface.c @@ -4929,13 +4929,11 @@ void ihevce_rc_store_retrive_update_info( &ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc], ps_rc_lap_out, sizeof(rc_lap_out_params_t)); - //BUG_FIX related to the releasing of the next lap out buffers and retrieving of the data for the delayed update. { - rc_lap_out_params_t *ps_rc_lap_out_next_encode; - ps_rc_lap_out_next_encode = - (rc_lap_out_params_t *)((rc_lap_out_params_t *)ps_rc_lap_out) - ->ps_rc_lap_out_next_encode; + rc_lap_out_params_t *ps_rc_lap_out_curr = (rc_lap_out_params_t *)ps_rc_lap_out; + rc_lap_out_params_t *ps_rc_lap_out_next_encode = + (rc_lap_out_params_t *)ps_rc_lap_out_curr->ps_rc_lap_out_next_encode; if(NULL != ps_rc_lap_out_next_encode) { @@ -4946,12 +4944,20 @@ void ihevce_rc_store_retrive_update_info( } else { - ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc].i4_next_pic_type = -1; + if(ps_rc_ctxt->u4_intra_frame_interval <= 1 || + (ps_rc_lap_out_curr->i4_rc_display_num && + (ps_rc_lap_out_curr->i4_rc_display_num % + (ps_rc_ctxt->u4_intra_frame_interval - 1)) == 0)) + { + ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc].i4_next_pic_type = IV_I_FRAME; + } + else + { + ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc].i4_next_pic_type = -1; + } ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc].i4_next_scene_type = -1; } - - ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc].ps_rc_lap_out_next_encode = - NULL; //RC_BUG_FIX + ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc].ps_rc_lap_out_next_encode = NULL; } } else if(2 == i4_store_retrive) |