Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d94ee17 authored by Srikanth Katteboina's avatar Srikanth Katteboina
Browse files

msm: vidc: If QP_value is invalid,assign default_QP



Client is expected to set the init QP,in case if
the client doesn't set the init QP,initialize
the QP with default QP.

Signed-off-by: default avatarSrikanth Katteboina <quic_skattebo@quicinc.com>
parent 6f8e71b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2884,7 +2884,7 @@ int msm_venc_set_frame_qp(struct msm_vidc_inst *inst)
	 *   Enable QP types which have been set by client.
	 * When RC is OFF:
	 *   I_QP value must be set by client.
	 *   If other QP value is invalid, then, assign I_QP value to it.
	 *   If QP value is invalid, then, assign default QP.
	 */
	if (inst->rc_type != RATE_CONTROL_OFF) {
		if (!(inst->client_set_ctrls & CLIENT_SET_I_QP))
@@ -2900,7 +2900,7 @@ int msm_venc_set_frame_qp(struct msm_vidc_inst *inst)
		if (!(inst->client_set_ctrls & CLIENT_SET_I_QP)) {
			s_vpr_e(inst->sid,
				"%s: Client value is not valid\n", __func__);
			return -EINVAL;
			i_qp->val = DEFAULT_QP;
		}
		if (!(inst->client_set_ctrls & CLIENT_SET_P_QP))
			p_qp->val = i_qp->val;