fix[mpp]: Add atf set, atf value 0~3

Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: I5c92e73b4e79d63871290f84460a882d5741d35c
This commit is contained in:
toby.zhang
2025-04-04 21:09:19 +08:00
committed by Herman Chen
parent cea5507d3f
commit 1981815f77
2 changed files with 12 additions and 1 deletions

View File

@@ -617,6 +617,7 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info)
/* setup fine tuning paramters */
mpp_enc_cfg_set_s32(cfg, "tune:anti_flicker_str", p->anti_flicker_str);
mpp_enc_cfg_set_s32(cfg, "tune:atf_str", cmd->atf_str);
mpp_enc_cfg_set_s32(cfg, "tune:atr_str_i", p->atr_str_i);
mpp_enc_cfg_set_s32(cfg, "tune:atr_str_p", p->atr_str_p);
mpp_enc_cfg_set_s32(cfg, "tune:atl_str", p->atl_str);

View File

@@ -540,7 +540,16 @@ RK_S32 mpi_enc_opt_atf(void *ctx, const char *next)
MpiEncTestArgs *cmd = (MpiEncTestArgs *)ctx;
if (next) {
cmd->anti_flicker_str = atoi(next);
RK_S32 val = atoi(next);
if (val >= 0 && val <= 3 ) {
cmd->anti_flicker_str = val;
cmd->atf_str = val;
} else {
cmd->anti_flicker_str = 0;
cmd->atf_str = 0;
mpp_err("invalid atf_str %d set to default 0\n", val);
}
return 1;
}
@@ -752,6 +761,7 @@ static MppOptInfo enc_opts[] = {
{"lmd", "lambda idx", "lambda_idx_p 0~8", mpi_enc_opt_lmd},
{"lmdi", "lambda i idx", "lambda_idx_i 0~8", mpi_enc_opt_lmdi},
{"speed", "enc speed", "speed mode", mpi_enc_opt_speed},
{"atf", "atf", "anti_flicker_str, 0:off 1 2 3", mpi_enc_opt_atf},
{"kmpp", "kmpp path enable", "kmpp path enable", mpi_enc_opt_kmpp}
};