Commit e98ce77b authored by Dikshita Agarwal's avatar Dikshita Agarwal Committed by Mauro Carvalho Chehab

media: venus: venc : Add support for priority ID control.

Add support for base layer priority ID control in encoder.
This is a preparation patch to support v6.

[hverkuil: changed 54 to 51 in v4l2_ctrl_handler_init]
Signed-off-by: default avatarDikshita Agarwal <dikshita@codeaurora.org>
Acked-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6bde70da
......@@ -236,6 +236,8 @@ struct venc_controls {
u32 hevc;
u32 vp9;
} level;
u32 base_priority_id;
};
struct venus_buffer {
......
......@@ -259,6 +259,9 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE:
ctr->frame_skip_mode = ctrl->val;
break;
case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID:
ctr->base_priority_id = ctrl->val;
break;
default:
return -EINVAL;
}
......@@ -274,7 +277,7 @@ int venc_ctrl_init(struct venus_inst *inst)
{
int ret;
ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 50);
ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 51);
if (ret)
return ret;
......@@ -476,6 +479,10 @@ int venc_ctrl_init(struct venus_inst *inst)
(1 << V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT)),
V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED);
v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID, 0,
6, 1, 0);
ret = inst->ctrl_handler.error;
if (ret)
goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment