[mpp_enc]: Separate qp change flag

Separate H.264 QP limit change flag into 3 flags

Change-Id: I658ab337569f8f715bde7633dce02b631a7d4239
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2020-12-15 17:26:29 +08:00
parent 711459b3c5
commit de8ace6622
7 changed files with 32 additions and 29 deletions

View File

@@ -645,17 +645,14 @@ static MPP_RET mpi_rc_codec(MpiRcTestCtx *ctx)
codec_cfg->h264.qp_init = 26;
codec_cfg->h264.qp_max = 26;
codec_cfg->h264.qp_min = 26;
codec_cfg->h264.qp_max_step = 0;
} else if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_CBR) {
/* constant bitrate do not limit qp range */
codec_cfg->h264.qp_max = 48;
codec_cfg->h264.qp_min = 4;
codec_cfg->h264.qp_max_step = 16;
} else if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_VBR) {
/* variable bitrate has qp min limit */
codec_cfg->h264.qp_max = 40;
codec_cfg->h264.qp_min = 12;
codec_cfg->h264.qp_max_step = 8;
}
ret = enc_mpi->control(enc_ctx, MPP_ENC_SET_CODEC_CFG, codec_cfg);
if (ret) {