From 4a71a39dc75d2e875a6b58fcd5e50eeb5841c007 Mon Sep 17 00:00:00 2001 From: "timkingh.huang" Date: Fri, 20 Sep 2024 14:03:41 +0800 Subject: [PATCH] fix[smt_rc]: Fix first frame QP error Change-Id: Icc7c30e2f2153643c2b06482e21b1082d0e3e618 Signed-off-by: timkingh.huang --- mpp/codec/rc/rc_model_v2_smt.c | 2 +- test/mpi_enc_test.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mpp/codec/rc/rc_model_v2_smt.c b/mpp/codec/rc/rc_model_v2_smt.c index c7f3a10d..c94fdaed 100644 --- a/mpp/codec/rc/rc_model_v2_smt.c +++ b/mpp/codec/rc/rc_model_v2_smt.c @@ -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; diff --git a/test/mpi_enc_test.c b/test/mpi_enc_test.c index 7d9184aa..20d0ee8c 100644 --- a/test/mpi_enc_test.c +++ b/test/mpi_enc_test.c @@ -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);