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

Commit c6e1ea90 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Fix encoder entropy control"

parents 59b7a87c 6a102153
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -87,11 +87,6 @@ static const char *const mpeg2_level[] = {
	"3",
	NULL
};
static const char *const mpeg_vidc_video_entropy_mode[] = {
	"CAVLC Entropy Mode",
	"CABAC Entropy Mode",
	NULL
};

static struct msm_vidc_ctrl msm_vdec_ctrls[] = {
	{
@@ -427,21 +422,6 @@ static struct msm_vidc_ctrl msm_vdec_ctrls[] = {
		.qmenu = NULL,
		.flags = V4L2_CTRL_FLAG_VOLATILE,
	},
	{
		.id = V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE,
		.name = "Entropy Mode",
		.type = V4L2_CTRL_TYPE_MENU,
		.minimum = V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC,
		.maximum = V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC,
		.default_value = V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC,
		.step = 0,
		.menu_skip_mask = ~(
		(1 << V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC) |
		(1 << V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC)
		),
		.qmenu = mpeg_vidc_video_entropy_mode,
		.flags = V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY,
	},
	{
		.id = V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE,
		.name = "Frame Rate",
+2 −2
Original line number Diff line number Diff line
@@ -2481,8 +2481,7 @@ int msm_venc_set_entropy_mode(struct msm_vidc_inst *inst)
	}
	hdev = inst->core->device;

	if (inst->fmts[CAPTURE_PORT].fourcc != V4L2_PIX_FMT_H264 &&
		inst->fmts[CAPTURE_PORT].fourcc != V4L2_PIX_FMT_HEVC)
	if (inst->fmts[CAPTURE_PORT].fourcc != V4L2_PIX_FMT_H264)
		return 0;

	ctrl = msm_venc_get_ctrl(inst, V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE);
@@ -2493,6 +2492,7 @@ int msm_venc_set_entropy_mode(struct msm_vidc_inst *inst)
	entropy.entropy_mode = msm_comm_v4l2_to_hfi(
			V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE,
			ctrl->val);
	entropy.cabac_model = HFI_H264_CABAC_MODEL_2;

	dprintk(VIDC_DBG, "%s: %d\n", __func__, entropy.entropy_mode);
	rc = call_hfi_op(hdev, session_set_property, inst->session,
+0 −4
Original line number Diff line number Diff line
@@ -1587,9 +1587,6 @@ static int try_get_ctrl_for_instance(struct msm_vidc_inst *inst,
			inst->level);
		break;

	case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE:
		ctrl->val = inst->entropy_mode;
		break;

	case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE:
		bufreq = get_buff_req_buffer(inst, HAL_BUFFER_OUTPUT);
@@ -1746,7 +1743,6 @@ void *msm_vidc_open(int core_id, int session_type)
	inst->colour_space = MSM_VIDC_BT601_6_525;
	inst->profile = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE;
	inst->level = V4L2_MPEG_VIDEO_H264_LEVEL_UNKNOWN;
	inst->entropy_mode = V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC;
	inst->smem_ops = &msm_vidc_smem_ops;
	inst->rc_type = RATE_CONTROL_OFF;
	inst->dpb_extra_binfo = NULL;
+0 −1
Original line number Diff line number Diff line
@@ -1611,7 +1611,6 @@ static void handle_event_change(enum hal_command_response cmd, void *data)
	 * ptr[10] = level
	 */

	inst->entropy_mode = event_notify->entropy_mode;
	inst->profile = event_notify->profile;
	inst->level = event_notify->level;
	inst->prop.crop_info.left =
+0 −1
Original line number Diff line number Diff line
@@ -469,7 +469,6 @@ struct msm_vidc_inst {
	u32 colour_space;
	u32 profile;
	u32 level;
	u32 entropy_mode;
	u32 grid_enable;
	u32 frame_quality;
	u32 rc_type;