mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-08 10:30:04 +08:00
[h264e]: fix bps check failed when mpi setup to fix_qp mode
mpp codec will check bps, but bps will be set to -1 when choose fix qp mode. Change-Id: I570769b09d2f432cf5a11337dddc923027a7afc2 Signed-off-by: leo.ding <leo.ding@rock-chips.com>
This commit is contained in:
@@ -239,12 +239,15 @@ MPP_RET h264e_config(void *ctx, RK_S32 cmd, void *param)
|
||||
rc->quality);
|
||||
ret = MPP_ERR_VALUE;
|
||||
}
|
||||
if ((rc->bps_target >= 100 * SZ_1M || rc->bps_target <= 1 * SZ_1K) ||
|
||||
(rc->bps_max >= 100 * SZ_1M || rc->bps_max <= 1 * SZ_1K) ||
|
||||
(rc->bps_min >= 100 * SZ_1M || rc->bps_min <= 1 * SZ_1K)) {
|
||||
mpp_err("invalid bit per second %d [%d:%d] out of range 1K~100M\n",
|
||||
rc->bps_target, rc->bps_min, rc->bps_max);
|
||||
ret = MPP_ERR_VALUE;
|
||||
if (rc->rc_mode != MPP_ENC_RC_MODE_VBR ||
|
||||
rc->quality != MPP_ENC_RC_QUALITY_CQP) {
|
||||
if ((rc->bps_target >= 100 * SZ_1M || rc->bps_target <= 1 * SZ_1K) ||
|
||||
(rc->bps_max >= 100 * SZ_1M || rc->bps_max <= 1 * SZ_1K) ||
|
||||
(rc->bps_min >= 100 * SZ_1M || rc->bps_min <= 1 * SZ_1K)) {
|
||||
mpp_err("invalid bit per second %d [%d:%d] out of range 1K~100M\n",
|
||||
rc->bps_target, rc->bps_min, rc->bps_max);
|
||||
ret = MPP_ERR_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
|
Reference in New Issue
Block a user