[rc]: Fix rc issue in async mode

1. Add async rc preset function.
2. Update rc_task pointer on async_wait task.
3. Save frame type in rc task info rather than in rc ctx.

Change-Id: I956b5f14a01e5c2cdc8b4c5f9c26660274a7f0e4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2022-03-30 17:24:07 +08:00
parent e86db5e072
commit 7a5544b8ec
8 changed files with 143 additions and 82 deletions

View File

@@ -374,7 +374,7 @@ MPP_RET test_mt_cfg_setup(MpiEncMtCtxInfo *info)
case MPP_ENC_RC_MODE_CBR :
case MPP_ENC_RC_MODE_VBR :
case MPP_ENC_RC_MODE_AVBR : {
mpp_enc_cfg_set_s32(cfg, "rc:qp_init", 26);
mpp_enc_cfg_set_s32(cfg, "rc:qp_init", -1);
mpp_enc_cfg_set_s32(cfg, "rc:qp_max", 51);
mpp_enc_cfg_set_s32(cfg, "rc:qp_min", 10);
mpp_enc_cfg_set_s32(cfg, "rc:qp_max_i", 51);