aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2019-11-05 16:31:59 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-05 16:31:59 -0800
commitcce42ea92017c64eeecf096664bc5866da1b3574 (patch)
treed7c5e4367e5f9edd6887155c6e54414da44562e6
parent224bcf4592f339fd12987dc76b1629ccabcc352f (diff)
parent41fcd228ae6d6b89ff6299040f8ebf9375d52ae0 (diff)
downloadlibavc-cce42ea92017c64eeecf096664bc5866da1b3574.tar.gz
decoder: Move initialization of dbp_mgr entries to init_decoder() am: 01da7b5a52
am: 41fcd228ae Change-Id: Id8fa44c3401f7ac1d2a540fa35cf0f4346da2c42
-rw-r--r--decoder/ih264d_api.c47
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;