mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[h265e]: Add fixqp flow
Move fixqp mode from VBR+CQP to rc_mode FIXQP. Change-Id: Ia29471ecd81bb1a4759f6e6f1d7e37515341eb8c Signed-off-by: sayon.chen <sayon.chen@rock-chips.com> Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -640,24 +640,22 @@ static MPP_RET mpi_rc_codec(MpiRcTestCtx *ctx)
|
||||
codec_cfg->h264.cabac_init_idc = 0;
|
||||
|
||||
codec_cfg->h264.qp_init = 0;
|
||||
if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_CBR) {
|
||||
if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_FIXQP) {
|
||||
/* constant QP mode qp is fixed */
|
||||
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) {
|
||||
if (rc_cfg->quality == MPP_ENC_RC_QUALITY_CQP) {
|
||||
/* constant QP mode qp is fixed */
|
||||
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 {
|
||||
/* 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;
|
||||
}
|
||||
/* 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) {
|
||||
|
Reference in New Issue
Block a user