[h264e_sps]: Add parameters config for encoder

Encorder parameters: constraint_set0~5

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I7f90ff97881f875ffad77cf4125ee6623d179563
This commit is contained in:
xueman.ruan
2022-08-01 11:48:47 +08:00
committed by Herman Chen
parent a71135a060
commit 82ae30f031
5 changed files with 47 additions and 1 deletions

View File

@@ -405,6 +405,8 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info)
mpp_enc_cfg_set_s32(cfg, "codec:type", p->type);
switch (p->type) {
case MPP_VIDEO_CodingAVC : {
RK_U32 constraint_set;
/*
* H.264 profile_idc parameter
* 66 - Baseline profile
@@ -424,6 +426,10 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncMultiCtxInfo *info)
mpp_enc_cfg_set_s32(cfg, "h264:cabac_en", 1);
mpp_enc_cfg_set_s32(cfg, "h264:cabac_idc", 0);
mpp_enc_cfg_set_s32(cfg, "h264:trans8x8", 1);
mpp_env_get_u32("constraint_set", &constraint_set, 0);
if (constraint_set & 0x3f0000)
mpp_enc_cfg_set_s32(cfg, "h264:constraint_set", constraint_set);
} break;
case MPP_VIDEO_CodingHEVC :
case MPP_VIDEO_CodingMJPEG :