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

Commit bcf07815 authored by Praneeth Paladugu's avatar Praneeth Paladugu Committed by Salman Syed
Browse files

msm: vidc: Split HDR info into different ext controls



HDR info has two separate information sets. Hence group them
logically instead of passing as one block.

CRs-Fixed: 2100854
Change-Id: I2493f92bfbeb8a71c22147e218706af00bc635e0
Signed-off-by: default avatarPraneeth Paladugu <ppaladug@codeaurora.org>
Signed-off-by: default avatarSalman Syed <ssalman@codeaurora.org>
parent 5fe07b01
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -2183,11 +2183,8 @@ int msm_venc_s_ext_ctrl(struct msm_vidc_inst *inst,
	struct hal_frame_size blur_res;
	struct hal_quantization_range qp_range;
	struct hal_quantization qp;
	struct hal_hdr10_pq_sei hdr10_sei_params;
	struct msm_vidc_mastering_display_colour_sei_payload *mdisp_sei
		= &(hdr10_sei_params.disp_color_sei);
	struct msm_vidc_content_light_level_sei_payload *cll_sei
		= &(hdr10_sei_params.cll_sei);
	struct msm_vidc_mastering_display_colour_sei_payload *mdisp_sei = NULL;
	struct msm_vidc_content_light_level_sei_payload *cll_sei = NULL;

	if (!inst || !inst->core || !inst->core->device || !ctrl) {
		dprintk(VIDC_ERR, "%s invalid parameters\n", __func__);
@@ -2202,6 +2199,9 @@ int msm_venc_s_ext_ctrl(struct msm_vidc_inst *inst,

	control = ctrl->controls;

	mdisp_sei = &(inst->hdr10_sei_params.disp_color_sei);
	cll_sei = &(inst->hdr10_sei_params.cll_sei);

	for (i = 0; i < ctrl->count; i++) {
		switch (control[i].id) {
		case V4L2_CID_MPEG_VIDC_VIDEO_LTRCOUNT:
@@ -2264,9 +2264,10 @@ int msm_venc_s_ext_ctrl(struct msm_vidc_inst *inst,
			}
			break;
		case V4L2_CID_MPEG_VIDC_VENC_HDR_INFO:
			if (control[i].value == V4L2_MPEG_MSM_VIDC_DISABLE)
			if (control[i].value ==
				V4L2_MPEG_MSM_VIDC_DISABLE ||
					!mdisp_sei || !cll_sei)
				break;
			memset(&hdr10_sei_params, 0, sizeof(hdr10_sei_params));
			i++;
			while (i < ctrl->count) {
				switch (control[i].id) {
@@ -2327,7 +2328,7 @@ int msm_venc_s_ext_ctrl(struct msm_vidc_inst *inst,
			}
			property_id =
				HAL_PARAM_VENC_HDR10_PQ_SEI;
			pdata = &hdr10_sei_params;
			pdata = &inst->hdr10_sei_params;
			break;
		default:
			dprintk(VIDC_ERR, "Invalid id set: %d\n",
+1 −0
Original line number Diff line number Diff line
@@ -410,6 +410,7 @@ struct msm_vidc_inst {
	u32 level;
	u32 entropy_mode;
	struct msm_vidc_codec_data *codec_data;
	struct hal_hdr10_pq_sei hdr10_sei_params;
};

extern struct msm_vidc_drv *vidc_driver;