fix[smt_rc]: Fix first frame QP error

Change-Id: Icc7c30e2f2153643c2b06482e21b1082d0e3e618
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
This commit is contained in:
timkingh.huang
2024-09-20 14:03:41 +08:00
committed by Herman Chen
parent a4bd0d2a69
commit 4a71a39dc7
2 changed files with 5 additions and 2 deletions

View File

@@ -747,7 +747,7 @@ MPP_RET rc_model_v2_smt_start(void *ctx, EncRcTask * task)
} else
qp_out_f0 = p->usr_cfg.init_quality;
p->qp_out = p->usr_cfg.scene_mode ? qp_out_f0 + 2 : qp_out_f0 + 6; //TODO: ok ??
p->qp_out = qp_out_f0;
p->count_real_bit = 0;
p->count_pred_bit = 0;
p->count_frame = 0;

View File

@@ -392,7 +392,7 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info)
mpp_enc_cfg_set_s32(cfg, "tune:deblur_str", cmd->deblur_str);
mpp_enc_cfg_set_s32(cfg, "tune:qpmap_en", 1);
mpp_enc_cfg_set_s32(cfg, "tune:rc_container", cmd->rc_container);
mpp_enc_cfg_set_s32(cfg, "tune:vmaf_opt", 1);
mpp_enc_cfg_set_s32(cfg, "tune:vmaf_opt", 0);
mpp_enc_cfg_set_s32(cfg, "hw:qbias_en", 1);
mpp_enc_cfg_set_s32(cfg, "hw:qbias_i", cmd->bias_i);
mpp_enc_cfg_set_s32(cfg, "hw:qbias_p", cmd->bias_p);
@@ -400,6 +400,9 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info)
mpp_enc_cfg_set_st(cfg, "hw:aq_thrd_p", aq_thd);
mpp_enc_cfg_set_st(cfg, "hw:aq_step_i", aq_step_i_ipc);
mpp_enc_cfg_set_st(cfg, "hw:aq_step_p", aq_step_p_ipc);
mpp_enc_cfg_set_s32(cfg, "hw:skip_bias_en", 0);
mpp_enc_cfg_set_s32(cfg, "hw:skip_bias", 4);
mpp_enc_cfg_set_s32(cfg, "hw:skip_sad", 8);
mpp_enc_cfg_set_s32(cfg, "prep:width", p->width);
mpp_enc_cfg_set_s32(cfg, "prep:height", p->height);