Skip to content

Commit

Permalink
[iep2]: Add env params
Browse files Browse the repository at this point in the history
Change-Id: Ib9d5292c0f1ecb865652342cd254a56aae2dbd9d
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
  • Loading branch information
qvoid authored and Grey Li committed Dec 6, 2022
1 parent 796ec28 commit f939504
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mpp/codec/mpp_dec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ static MPP_RET mpp_dec_update_cfg(MppDecImpl *p)
p->enable_deinterlace = base->enable_vproc;
p->disable_error = base->disable_error;

mpp_env_get_u32("enable_deinterlace", &p->enable_deinterlace, base->enable_vproc);

return MPP_OK;
}

Expand Down
18 changes: 18 additions & 0 deletions mpp/vproc/iep2/iep2.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@

RK_U32 iep_debug = 0;

static MPP_RET get_param_from_env(struct iep2_api_ctx *ctx)
{
struct iep2_params *params = &ctx->params;
mpp_env_get_u32("md_theta", &params->md_theta, ctx->params.md_theta);
mpp_env_get_u32("md_r", &params->md_r, ctx->params.md_r);
mpp_env_get_u32("md_lambda", &params->md_lambda, ctx->params.md_lambda);

mpp_env_get_u32("mv_similar_thr", &params->mv_similar_thr, ctx->params.mv_similar_thr);
mpp_env_get_u32("mv_similar_num_thr0", &params->mv_similar_num_thr0, ctx->params.mv_similar_num_thr0);

mpp_env_get_u32("eedi_thr0", &params->eedi_thr0, ctx->params.eedi_thr0);
mpp_env_get_u32("comb_t_thr", &params->comb_t_thr, ctx->params.comb_t_thr);
mpp_env_get_u32("comb_feature_thr", &params->comb_feature_thr, ctx->params.comb_feature_thr);
return MPP_OK;
}

static MPP_RET iep2_init(IepCtx *ictx)
{
MPP_RET ret;
Expand Down Expand Up @@ -201,6 +217,7 @@ static MPP_RET iep2_done(struct iep2_api_ctx *ctx)
iep2_update_gmv(ctx, &ls);
iep2_check_ffo(ctx);
iep2_check_pd(ctx);
get_param_from_env(ctx);
#if 0
if (ctx->params.roi_en && ctx->params.osd_area_num > 0) {
struct iep2_rect r;
Expand All @@ -226,6 +243,7 @@ static MPP_RET iep2_done(struct iep2_api_ctx *ctx)
ctx->params.dil_mode == IEP2_DIL_MODE_PD) {
iep2_check_ffo(ctx);
iep2_check_pd(ctx);
get_param_from_env(ctx);
}

if (ctx->pd_inf.pdtype != PD_TYPES_UNKNOWN) {
Expand Down

0 comments on commit f939504

Please sign in to comment.