diff --git a/inc/rk_venc_cmd.h b/inc/rk_venc_cmd.h index 1639edfa..faeae399 100644 --- a/inc/rk_venc_cmd.h +++ b/inc/rk_venc_cmd.h @@ -1439,7 +1439,6 @@ typedef enum MppEncFineTuneCfgChange_e { MPP_ENC_TUNE_CFG_CHANGE_ATL_STR = (1 << 9), MPP_ENC_TUNE_CFG_CHANGE_SAO_STR_I = (1 << 10), MPP_ENC_TUNE_CFG_CHANGE_SAO_STR_P = (1 << 11), - MPP_ENC_TUNE_CFG_CHANGE_QPMAP_EN = (1 << 12), MPP_ENC_TUNE_CFG_CHANGE_RC_CONTAINER = (1 << 13), MPP_ENC_TUNE_CFG_CHANGE_VMAF_OPT = (1 << 14) } MppEncFineTuneCfgChange; @@ -1458,7 +1457,6 @@ typedef struct MppEncFineTuneCfg_t { RK_S32 atl_str; /* anti_stripe */ RK_S32 sao_str_i; /* anti blur */ RK_S32 sao_str_p; /* anti blur */ - RK_S32 qpmap_en; RK_S32 rc_container; RK_S32 vmaf_opt; } MppEncFineTuneCfg; diff --git a/mpp/base/mpp_enc_cfg.cpp b/mpp/base/mpp_enc_cfg.cpp index a461e063..fc2ab5ce 100644 --- a/mpp/base/mpp_enc_cfg.cpp +++ b/mpp/base/mpp_enc_cfg.cpp @@ -266,7 +266,6 @@ public: ENTRY(tune, atl_str, S32, MPP_ENC_TUNE_CFG_CHANGE_ATL_STR, tune, atl_str) \ ENTRY(tune, sao_str_i, S32, MPP_ENC_TUNE_CFG_CHANGE_SAO_STR_I, tune, sao_str_i) \ ENTRY(tune, sao_str_p, S32, MPP_ENC_TUNE_CFG_CHANGE_SAO_STR_P, tune, sao_str_p) \ - ENTRY(tune, qpmap_en, S32, MPP_ENC_TUNE_CFG_CHANGE_QPMAP_EN, tune, qpmap_en) \ ENTRY(tune, rc_container, S32, MPP_ENC_TUNE_CFG_CHANGE_RC_CONTAINER, tune, rc_container) \ ENTRY(tune, vmaf_opt, S32, MPP_ENC_TUNE_CFG_CHANGE_VMAF_OPT, tune, vmaf_opt) diff --git a/mpp/codec/enc/h264/h264e_api_v2.c b/mpp/codec/enc/h264/h264e_api_v2.c index 7c5970cc..00edf49e 100644 --- a/mpp/codec/enc/h264/h264e_api_v2.c +++ b/mpp/codec/enc/h264/h264e_api_v2.c @@ -102,7 +102,7 @@ static void init_h264e_cfg_set(MppEncCfgSet *cfg, MppClientType type) h264->profile = H264_PROFILE_BASELINE; h264->level = H264_LEVEL_3_1; cfg->tune.scene_mode = MPP_ENC_SCENE_MODE_DEFAULT; - cfg->tune.qpmap_en = 0; + cfg->tune.deblur_en = 0; cfg->tune.vmaf_opt = 0; switch (type) { diff --git a/mpp/codec/enc/h265/h265e_api.c b/mpp/codec/enc/h265/h265e_api.c index c040ad98..bf032919 100644 --- a/mpp/codec/enc/h265/h265e_api.c +++ b/mpp/codec/enc/h265/h265e_api.c @@ -119,7 +119,7 @@ static MPP_RET h265e_init(void *ctx, EncImplCfg *ctrlCfg) p->cfg->tune.sao_str_i = 0; p->cfg->tune.sao_str_p = 1; p->cfg->tune.deblur_str = 3; - p->cfg->tune.qpmap_en = 0; + p->cfg->tune.deblur_en = 0; p->cfg->tune.rc_container = 0; p->cfg->tune.vmaf_opt = 0; diff --git a/mpp/codec/mpp_enc_impl.cpp b/mpp/codec/mpp_enc_impl.cpp index d31fe192..6de4e892 100644 --- a/mpp/codec/mpp_enc_impl.cpp +++ b/mpp/codec/mpp_enc_impl.cpp @@ -942,14 +942,6 @@ MPP_RET mpp_enc_proc_tune_cfg(MppEncFineTuneCfg *dst, MppEncFineTuneCfg *src) ret = MPP_ERR_VALUE; } - if (change & MPP_ENC_TUNE_CFG_CHANGE_QPMAP_EN) - dst->qpmap_en = src->qpmap_en; - - if (dst->qpmap_en < 0 || dst->qpmap_en > 1) { - mpp_err("invalid qpmap_en %d not in range [0, 1]\n", dst->qpmap_en); - ret = MPP_ERR_VALUE; - } - if (change & MPP_ENC_TUNE_CFG_CHANGE_RC_CONTAINER) dst->rc_container = src->rc_container; diff --git a/mpp/hal/rkenc/h264e/hal_h264e_vepu580.c b/mpp/hal/rkenc/h264e/hal_h264e_vepu580.c index 22b2e7b1..0b57b8e2 100644 --- a/mpp/hal/rkenc/h264e/hal_h264e_vepu580.c +++ b/mpp/hal/rkenc/h264e/hal_h264e_vepu580.c @@ -2162,7 +2162,7 @@ static MPP_RET hal_h264e_vepu580_gen_regs(void *hal, HalEncTask *task) if (frm_status->is_i_refresh) setup_vepu580_intra_refresh(regs, ctx, frm_status->seq_idx % cfg->rc.gop); - if (cfg->tune.qpmap_en && (!rc_task->info.complex_scene) && + if (cfg->tune.deblur_en && (!rc_task->info.complex_scene) && cfg->rc.rc_mode == MPP_ENC_RC_MODE_SMTRC && cfg->tune.scene_mode == MPP_ENC_SCENE_MODE_IPC) { if (MPP_OK != setup_vepu580_qpmap_buf(ctx)) diff --git a/mpp/hal/rkenc/h264e/hal_h264e_vepu580_tune.c b/mpp/hal/rkenc/h264e/hal_h264e_vepu580_tune.c index e0b26c3e..367fd14a 100644 --- a/mpp/hal/rkenc/h264e/hal_h264e_vepu580_tune.c +++ b/mpp/hal/rkenc/h264e/hal_h264e_vepu580_tune.c @@ -348,8 +348,8 @@ static MPP_RET setup_vepu580_qpmap_buf(HalH264eVepu580Ctx *ctx) RK_S32 md_flag_size = ctx->md_flag_size = mb_w * mb_h; - if (!ctx->cfg->tune.qpmap_en) { - mpp_log("qpmap_en is closed!\n"); + if (!ctx->cfg->tune.deblur_en) { + mpp_log("deblurring is closed!\n"); goto __RET; } diff --git a/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c b/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c index 935edb58..90e40fa1 100644 --- a/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c +++ b/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c @@ -2764,7 +2764,7 @@ MPP_RET hal_h265e_v580_gen_regs(void *hal, HalEncTask *task) if (frm->is_i_refresh) setup_intra_refresh(ctx, frm->seq_idx % ctx->cfg->rc.gop); - if (cfg->tune.qpmap_en && (!rc_task->info.complex_scene) && + if (cfg->tune.deblur_en && (!rc_task->info.complex_scene) && cfg->rc.rc_mode == MPP_ENC_RC_MODE_SMTRC && cfg->tune.scene_mode == MPP_ENC_SCENE_MODE_IPC) { if (MPP_OK != vepu580_setup_qpmap_buf(ctx)) diff --git a/mpp/hal/rkenc/h265e/hal_h265e_vepu580_tune.c b/mpp/hal/rkenc/h265e/hal_h265e_vepu580_tune.c index 809cc190..18e2d5dd 100644 --- a/mpp/hal/rkenc/h265e/hal_h265e_vepu580_tune.c +++ b/mpp/hal/rkenc/h265e/hal_h265e_vepu580_tune.c @@ -633,8 +633,8 @@ static MPP_RET vepu580_setup_qpmap_buf(H265eV580HalContext *ctx) RK_S32 md_flag_size = ctx->md_flag_size = ctu_w * ctu_h * 16; - if (!ctx->cfg->tune.qpmap_en) { - mpp_log("qpmap_en is closed!\n"); + if (!ctx->cfg->tune.deblur_en) { + mpp_log("deblurring is closed!\n"); goto __RET; } diff --git a/test/mpi_enc_test.c b/test/mpi_enc_test.c index 20d0ee8c..38957e5f 100644 --- a/test/mpi_enc_test.c +++ b/test/mpi_enc_test.c @@ -390,7 +390,6 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info) mpp_enc_cfg_set_s32(cfg, "tune:scene_mode", p->scene_mode); mpp_enc_cfg_set_s32(cfg, "tune:deblur_en", cmd->deblur_en); 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", 0); mpp_enc_cfg_set_s32(cfg, "hw:qbias_en", 1);