diff options
author | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-01-07 21:33:00 -0700 |
---|---|---|
committer | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-01-07 21:33:00 -0700 |
commit | e04acc02e9d7280ea2edc774ac71fb0e5a0260ae (patch) | |
tree | d7c5e4367e5f9edd6887155c6e54414da44562e6 | |
parent | 91cd573f529ba1f003c07e36c5f6e7d38948280b (diff) | |
parent | 89af851902cc10de30cc0b522934597ab8ea95df (diff) | |
download | android_external_libavc-e04acc02e9d7280ea2edc774ac71fb0e5a0260ae.tar.gz android_external_libavc-e04acc02e9d7280ea2edc774ac71fb0e5a0260ae.tar.bz2 android_external_libavc-e04acc02e9d7280ea2edc774ac71fb0e5a0260ae.zip |
Merge tag 'android-8.1.0_r72' into staging/lineage-15.1_merge-android-8.1.0_r72
Android 8.1.0 release 72
* tag 'android-8.1.0_r72':
decoder: Move initialization of dbp_mgr entries to init_decoder()
Decoder: Delete node from st if lt and st point to same
decoder: Signal IVD_RES_CHANGED error for change in crop params
Decoder: Modify setting short term reference field flag
Encoder: Return error for odd resolution
Decoder: Set prev slice type for I slice.
Decoder: Fixed reset values in parse sps.
Decoder: Fixed memory overflow in shared display mode.
Decoder: Adding Error Check for Output Buffer Size in Shared Display Mode.
Decoder: Modified loop condition while parsing ref_list_reordering.
Decoder: Handle dec_hdl memory allocation failure gracefully
Decoder: Detect change of mbaff flag in SPS
Decoder: Increased allocation and added checks in sei parsing.
Decoder: Fixed incorrect use of mmco parameters.
Change-Id: I5513b7107ce585a657980e911e0e6d5d3cbdad39
-rw-r--r-- | decoder/ih264d_api.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c index c6999a6..2ebf386 100644 --- a/decoder/ih264d_api.c +++ b/decoder/ih264d_api.c @@ -963,6 +963,30 @@ void ih264d_init_decoder(void * ps_dec_params) /* Free any dynamic buffers that are allocated */ ih264d_free_dynamic_bufs(ps_dec); + { + UWORD8 i; + struct pic_buffer_t *ps_init_dpb; + ps_init_dpb = ps_dec->ps_dpb_mgr->ps_init_dpb[0][0]; + for(i = 0; i < 2 * MAX_REF_BUFS; i++) + { + ps_init_dpb->pu1_buf1 = NULL; + ps_init_dpb->u1_long_term_frm_idx = MAX_REF_BUFS + 1; + ps_dec->ps_dpb_mgr->ps_init_dpb[0][i] = ps_init_dpb; + ps_dec->ps_dpb_mgr->ps_mod_dpb[0][i] = ps_init_dpb; + ps_init_dpb++; + } + + ps_init_dpb = ps_dec->ps_dpb_mgr->ps_init_dpb[1][0]; + for(i = 0; i < 2 * MAX_REF_BUFS; i++) + { + ps_init_dpb->pu1_buf1 = NULL; + ps_init_dpb->u1_long_term_frm_idx = MAX_REF_BUFS + 1; + ps_dec->ps_dpb_mgr->ps_init_dpb[1][i] = ps_init_dpb; + ps_dec->ps_dpb_mgr->ps_mod_dpb[1][i] = ps_init_dpb; + ps_init_dpb++; + } + } + ps_cur_slice = ps_dec->ps_cur_slice; ps_dec->init_done = 0; @@ -1439,29 +1463,6 @@ WORD32 ih264d_allocate_static_bufs(iv_obj_t **dec_hdl, void *pv_api_ip, void *pv ps_dec->ps_col_mv_base = pv_buf; memset(ps_dec->ps_col_mv_base, 0, size); - { - UWORD8 i; - struct pic_buffer_t *ps_init_dpb; - ps_init_dpb = ps_dec->ps_dpb_mgr->ps_init_dpb[0][0]; - for(i = 0; i < 2 * MAX_REF_BUFS; i++) - { - ps_init_dpb->pu1_buf1 = NULL; - ps_init_dpb->u1_long_term_frm_idx = MAX_REF_BUFS + 1; - ps_dec->ps_dpb_mgr->ps_init_dpb[0][i] = ps_init_dpb; - ps_dec->ps_dpb_mgr->ps_mod_dpb[0][i] = ps_init_dpb; - ps_init_dpb++; - } - - ps_init_dpb = ps_dec->ps_dpb_mgr->ps_init_dpb[1][0]; - for(i = 0; i < 2 * MAX_REF_BUFS; i++) - { - ps_init_dpb->pu1_buf1 = NULL; - ps_init_dpb->u1_long_term_frm_idx = MAX_REF_BUFS + 1; - ps_dec->ps_dpb_mgr->ps_init_dpb[1][i] = ps_init_dpb; - ps_dec->ps_dpb_mgr->ps_mod_dpb[1][i] = ps_init_dpb; - ps_init_dpb++; - } - } ih264d_init_decoder(ps_dec); return IV_SUCCESS; |