diff options
author | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-01-06 18:35:57 -0700 |
---|---|---|
committer | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-01-06 18:35:57 -0700 |
commit | 9a9e19f0a2247bf16ab5a4a0c626b1c0d75771ab (patch) | |
tree | b8dd30bff40791796214f635b4d5d34277362a70 | |
parent | 8b5c548571efb49da4c13d2d8b694b911cb98ecb (diff) | |
parent | c4b0440fb7a36cd8692126404f86f1bd7a19701e (diff) | |
download | android_external_libavc-9a9e19f0a2247bf16ab5a4a0c626b1c0d75771ab.tar.gz android_external_libavc-9a9e19f0a2247bf16ab5a4a0c626b1c0d75771ab.tar.bz2 android_external_libavc-9a9e19f0a2247bf16ab5a4a0c626b1c0d75771ab.zip |
Merge tag 'android-9.0.0_r52' into staging/lineage-16.0_merge-android-9.0.0_r52
Android 9.0.0 release 52
* tag 'android-9.0.0_r52':
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
Change-Id: I22faa3612450f20ae546dccfb8fc4e22810f02f4
-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; |