[mpp_enc]: Update i qp when it is not set

Change-Id: I01e9b6ae3ffc63229b9c906641271dd1129f12e6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2021-01-30 18:35:27 +08:00
parent d7b26bb3af
commit 7936ba3efe

View File

@@ -541,6 +541,11 @@ MPP_RET mpp_enc_proc_rc_cfg(MppEncRcCfg *dst, MppEncRcCfg *src)
ret = MPP_ERR_VALUE;
}
}
// if I frame min/max is not set use normal case
if (dst->qp_min_i <= 0)
dst->qp_min_i = dst->qp_min;
if (dst->qp_max_i <= 0)
dst->qp_max_i = dst->qp_max;
if (dst->qp_min < 0 || dst->qp_max < 0 || dst->qp_min > dst->qp_max ||
dst->qp_min_i < 0 || dst->qp_max_i < 0 ||
dst->qp_min_i > dst->qp_max_i ||