mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
[enc_cfg]: Update mirror transformation.
1. constraint the range of input argument. 2. add flip config, equal to vertical mirror transformation. 3. add mirroring_ext and rotation_ext to config set, for supporting GET_CFG control. Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com> Change-Id: I01c0b9187a18851354e81b5f08afc6dcaaba8365
This commit is contained in:
@@ -292,6 +292,9 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info)
|
||||
MppEncCfg cfg = p->cfg;
|
||||
RK_U32 quiet = cmd->quiet;
|
||||
MPP_RET ret;
|
||||
RK_U32 rotation;
|
||||
RK_U32 mirroring;
|
||||
RK_U32 flip;
|
||||
|
||||
/* setup default parameter */
|
||||
if (p->fps_in_den == 0)
|
||||
@@ -456,6 +459,14 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info)
|
||||
mpp_enc_cfg_set_s32(cfg, "split:out", p->split_out);
|
||||
}
|
||||
|
||||
mpp_env_get_u32("mirroring", &mirroring, 0);
|
||||
mpp_env_get_u32("rotation", &rotation, 0);
|
||||
mpp_env_get_u32("flip", &flip, 0);
|
||||
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:mirroring", mirroring);
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:rotation", rotation);
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:flip", flip);
|
||||
|
||||
ret = mpi->control(ctx, MPP_ENC_SET_CFG, cfg);
|
||||
if (ret) {
|
||||
mpp_err("mpi control enc set cfg failed ret %d\n", ret);
|
||||
|
Reference in New Issue
Block a user