[mpp_enc_cfg]: Fix debug logic error.

Update trie node initial value by now.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I5a01f452a689ad7587d4d249cdb6f760c35b8444
This commit is contained in:
xueman.ruan 2023-03-08 10:49:09 +08:00 committed by Herman Chen
parent e6ef3d1d7a
commit cb7db08174

View file

@ -365,7 +365,7 @@ MppEncCfgService::MppEncCfgService() :
MPP_RET ret;
RK_S32 i;
ret = mpp_trie_init(&trie, 1644, cfg_cnt);
ret = mpp_trie_init(&trie, 1724, cfg_cnt);
if (ret) {
mpp_err_f("failed to init enc cfg set trie\n");
return ;
@ -377,6 +377,8 @@ MppEncCfgService::MppEncCfgService() :
mInfo = mpp_enc_cfg_flaten(trie, cfgs);
mCfgSize = mInfo->head.cfg_size;
mpp_enc_cfg_dbg_func("node cnt: %d\n", get_node_count());
mpp_trie_deinit(trie);
}
@ -420,6 +422,8 @@ MPP_RET mpp_enc_cfg_init(MppEncCfg *cfg)
return MPP_ERR_NULL_PTR;
}
mpp_env_get_u32("mpp_enc_cfg_debug", &mpp_enc_cfg_debug, 0);
cfg_size = MppEncCfgService::get()->get_cfg_size();
p = mpp_calloc_size(MppEncCfgImpl, cfg_size + sizeof(p->size));
if (NULL == p) {
@ -432,8 +436,6 @@ MPP_RET mpp_enc_cfg_init(MppEncCfg *cfg)
p->size = cfg_size;
mpp_enc_cfg_set_default(&p->cfg);
mpp_env_get_u32("mpp_enc_cfg_debug", &mpp_enc_cfg_debug, 0);
*cfg = p;
return MPP_OK;