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

Commit 7ae3d2f1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Adjust frame counts to set the requested Intraperiod"

parents 41eddc1b 3ddd1c55
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2128,6 +2128,19 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		property_id = HAL_CONFIG_VENC_INTRA_PERIOD;
		intra_period.pframes = num_p;
		intra_period.bframes = num_b;

		/*
		 *Incase firmware does not have B-Frame support,
		 *offload the b-frame count to p-frame to make up
		 *for the requested Intraperiod
		 */
		if (!inst->capability.bframe.max) {
			intra_period.pframes = num_p + num_b;
			intra_period.bframes = 0;
			dprintk(VIDC_DBG,
				"No bframe support, changing pframe from %d to %d\n",
				num_p, intra_period.pframes);
		}
		pdata = &intra_period;
		break;
	}