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

Commit 67890245 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: set poc during encoding"

parents 7e12da28 25b8c234
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2170,6 +2170,14 @@ static int create_3x_pkt_cmd_session_set_property(
				hfi_buffer_count_actual);
		break;
	}
	case HAL_PARAM_VENC_H264_PIC_ORDER_CNT:
	{
		pkt->rg_property_data[0] =
			HFI_PROPERTY_PARAM_VENC_H264_PICORDER_CNT_TYPE;
		pkt->rg_property_data[1] = *(u32 *)pdata;
		pkt->size += sizeof(u32) * 2;
		break;
	}
	default:
		rc = create_pkt_cmd_session_set_property(pkt,
				session, ptype, pdata);
+19 −0
Original line number Diff line number Diff line
@@ -1183,6 +1183,17 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
		.default_value = V4L2_CID_MPEG_VIDC_VIDEO_VENC_BITRATE_ENABLE,
		.step = 1,
	},
	{
		.id = V4L2_CID_MPEG_VIDC_VIDEO_H264_PIC_ORDER_CNT,
		.name = "Set H264 Picture Order Count",
		.type = V4L2_CTRL_TYPE_INTEGER,
		.minimum = 0,
		.maximum = 2,
		.default_value = 0,
		.step = 2,
		.qmenu = NULL,
	},

};

#define NUM_CTRLS ARRAY_SIZE(msm_venc_ctrls)
@@ -2035,6 +2046,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
	int max_hierp_layers;
	int baselayerid = 0;
	int frameqp = 0;
	int pic_order_cnt = 0;

	if (!inst || !inst->core || !inst->core->device) {
		dprintk(VIDC_ERR, "%s invalid parameters\n", __func__);
@@ -2952,6 +2964,13 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		pdata = &enable;
		break;
	}
	case V4L2_CID_MPEG_VIDC_VIDEO_H264_PIC_ORDER_CNT:
	{
		property_id = HAL_PARAM_VENC_H264_PIC_ORDER_CNT;
		pic_order_cnt = ctrl->val;
		pdata = &pic_order_cnt;
		break;
	}
	default:
		dprintk(VIDC_ERR, "Unsupported index: %x\n", ctrl->id);
		rc = -ENOTSUPP;
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ enum hal_property {
	HAL_PROPERTY_PARAM_VENC_ASPECT_RATIO,
	HAL_CONFIG_VDEC_ENTROPY,
	HAL_PARAM_VENC_BITRATE_TYPE,
	HAL_PARAM_VENC_H264_PIC_ORDER_CNT,
};

enum hal_domain {
+2 −0
Original line number Diff line number Diff line
@@ -1116,6 +1116,8 @@ enum v4l2_mpeg_vidc_video_venc_bitrate_type_enable {
	V4L2_CID_MPEG_VIDC_VIDEO_VENC_BITRATE_ENABLE	= 1
};

#define V4L2_CID_MPEG_VIDC_VIDEO_H264_PIC_ORDER_CNT \
		(V4L2_CID_MPEG_MSM_VIDC_BASE + 86)

/*  Camera class control IDs */