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:
@@ -228,23 +228,21 @@ MPP_RET test_mpp_setup(MpiEncTestData *p)
|
||||
rc_cfg->rc_mode = MPP_ENC_RC_MODE_CBR;
|
||||
rc_cfg->quality = MPP_ENC_RC_QUALITY_MEDIUM;
|
||||
|
||||
if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_CBR) {
|
||||
if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_FIXQP) {
|
||||
/* constant QP does not have bps */
|
||||
rc_cfg->bps_target = -1;
|
||||
rc_cfg->bps_max = -1;
|
||||
rc_cfg->bps_min = -1;
|
||||
} else if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_CBR) {
|
||||
/* constant bitrate has very small bps range of 1/16 bps */
|
||||
rc_cfg->bps_target = p->bps;
|
||||
rc_cfg->bps_max = p->bps * 17 / 16;
|
||||
rc_cfg->bps_min = p->bps * 15 / 16;
|
||||
} else if (rc_cfg->rc_mode == MPP_ENC_RC_MODE_VBR) {
|
||||
if (rc_cfg->quality == MPP_ENC_RC_QUALITY_CQP) {
|
||||
/* constant QP does not have bps */
|
||||
rc_cfg->bps_target = -1;
|
||||
rc_cfg->bps_max = -1;
|
||||
rc_cfg->bps_min = -1;
|
||||
} else {
|
||||
/* variable bitrate has large bps range */
|
||||
rc_cfg->bps_target = p->bps;
|
||||
rc_cfg->bps_max = p->bps * 17 / 16;
|
||||
rc_cfg->bps_min = p->bps * 1 / 16;
|
||||
}
|
||||
/* variable bitrate has large bps range */
|
||||
rc_cfg->bps_target = p->bps;
|
||||
rc_cfg->bps_max = p->bps * 17 / 16;
|
||||
rc_cfg->bps_min = p->bps * 1 / 16;
|
||||
}
|
||||
|
||||
/* fix input / output frame rate */
|
||||
|
Reference in New Issue
Block a user