msm: vidc: mark few standard controls as custom controls
Video driver extending few standard controls value and hence mark those controls as custom controls. Change-Id: I373ed21482bb577c4fc5c28fd011098963608f53 Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
This commit is contained in:
parent
20ebbed266
commit
24de1903d9
@ -19,6 +19,52 @@
|
||||
#define DEFAULT_VIDEO_CONCEAL_COLOR_BLACK 0x8020010
|
||||
#define MAX_VP9D_INST_COUNT 6
|
||||
|
||||
static const char *const mpeg_video_h264_profile[] = {
|
||||
"Baseline",
|
||||
"Constrained Baseline",
|
||||
"Main",
|
||||
"Extended",
|
||||
"High",
|
||||
"High 10",
|
||||
"High 422",
|
||||
"High 444 Predictive",
|
||||
"High 10 Intra",
|
||||
"High 422 Intra",
|
||||
"High 444 Intra",
|
||||
"CAVLC 444 Intra",
|
||||
"Scalable Baseline",
|
||||
"Scalable High",
|
||||
"Scalable High Intra",
|
||||
"Stereo High",
|
||||
"Multiview High",
|
||||
"Constrained High",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const char *const mpeg_video_h264_level[] = {
|
||||
"1",
|
||||
"1b",
|
||||
"1.1",
|
||||
"1.2",
|
||||
"1.3",
|
||||
"2",
|
||||
"2.1",
|
||||
"2.2",
|
||||
"3",
|
||||
"3.1",
|
||||
"3.2",
|
||||
"4",
|
||||
"4.1",
|
||||
"4.2",
|
||||
"5",
|
||||
"5.1",
|
||||
"5.2",
|
||||
"6.0",
|
||||
"6.1",
|
||||
"6.2",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const char *const vp8_profile_level[] = {
|
||||
"Unused",
|
||||
"0.0",
|
||||
@ -134,7 +180,7 @@ static struct msm_vidc_ctrl msm_vdec_ctrls[] = {
|
||||
(1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH) |
|
||||
(1 << V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH)
|
||||
),
|
||||
.qmenu = NULL,
|
||||
.qmenu = mpeg_video_h264_profile,
|
||||
},
|
||||
{
|
||||
.id = V4L2_CID_MPEG_VIDEO_H264_LEVEL,
|
||||
@ -165,7 +211,7 @@ static struct msm_vidc_ctrl msm_vdec_ctrls[] = {
|
||||
(1 << V4L2_MPEG_VIDEO_H264_LEVEL_6_1) |
|
||||
(1 << V4L2_MPEG_VIDEO_H264_LEVEL_6_2)
|
||||
),
|
||||
.qmenu = NULL,
|
||||
.qmenu = mpeg_video_h264_level,
|
||||
},
|
||||
{
|
||||
.id = V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,
|
||||
|
@ -46,15 +46,61 @@
|
||||
#define MIN_NUM_ENC_CAPTURE_BUFFERS 5
|
||||
|
||||
static const char *const mpeg_video_rate_control[] = {
|
||||
"VBR CFR",
|
||||
"CBR CFR",
|
||||
"MBR CFR",
|
||||
"VBR",
|
||||
"CBR",
|
||||
"CBR VFR",
|
||||
"MBR",
|
||||
"MBR VFR",
|
||||
"CQ",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *const mpeg_video_h264_profile[] = {
|
||||
"Baseline",
|
||||
"Constrained Baseline",
|
||||
"Main",
|
||||
"Extended",
|
||||
"High",
|
||||
"High 10",
|
||||
"High 422",
|
||||
"High 444 Predictive",
|
||||
"High 10 Intra",
|
||||
"High 422 Intra",
|
||||
"High 444 Intra",
|
||||
"CAVLC 444 Intra",
|
||||
"Scalable Baseline",
|
||||
"Scalable High",
|
||||
"Scalable High Intra",
|
||||
"Stereo High",
|
||||
"Multiview High",
|
||||
"Constrained High",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const char *const mpeg_video_h264_level[] = {
|
||||
"1",
|
||||
"1b",
|
||||
"1.1",
|
||||
"1.2",
|
||||
"1.3",
|
||||
"2",
|
||||
"2.1",
|
||||
"2.2",
|
||||
"3",
|
||||
"3.1",
|
||||
"3.2",
|
||||
"4",
|
||||
"4.1",
|
||||
"4.2",
|
||||
"5",
|
||||
"5.1",
|
||||
"5.2",
|
||||
"6.0",
|
||||
"6.1",
|
||||
"6.2",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const char *const vp8_profile_level[] = {
|
||||
"Unused",
|
||||
"0.0",
|
||||
@ -275,7 +321,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
|
||||
(1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH) |
|
||||
(1 << V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH)
|
||||
),
|
||||
.qmenu = NULL,
|
||||
.qmenu = mpeg_video_h264_profile,
|
||||
},
|
||||
{
|
||||
.id = V4L2_CID_MPEG_VIDEO_H264_LEVEL,
|
||||
@ -306,7 +352,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
|
||||
(1 << V4L2_MPEG_VIDEO_H264_LEVEL_6_1) |
|
||||
(1 << V4L2_MPEG_VIDEO_H264_LEVEL_6_2)
|
||||
),
|
||||
.qmenu = NULL,
|
||||
.qmenu = mpeg_video_h264_level,
|
||||
},
|
||||
{
|
||||
.id = V4L2_CID_MPEG_VIDEO_VP8_PROFILE,
|
||||
|
@ -538,6 +538,25 @@ int msm_comm_get_v4l2_level(int fourcc, int level, u32 sid)
|
||||
}
|
||||
}
|
||||
|
||||
static bool is_priv_ctrl(u32 id)
|
||||
{
|
||||
if (IS_PRIV_CTRL(id))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Treat below standard controls as private because
|
||||
* we have added custom values to the controls
|
||||
*/
|
||||
switch (id) {
|
||||
case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
|
||||
case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
|
||||
case V4L2_CID_MPEG_VIDEO_H264_LEVEL:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int msm_comm_ctrl_init(struct msm_vidc_inst *inst,
|
||||
struct msm_vidc_ctrl *drv_ctrls, u32 num_ctrls,
|
||||
const struct v4l2_ctrl_ops *ctrl_ops)
|
||||
@ -569,7 +588,7 @@ int msm_comm_ctrl_init(struct msm_vidc_inst *inst,
|
||||
for (; idx < (int) num_ctrls; idx++) {
|
||||
struct v4l2_ctrl *ctrl = NULL;
|
||||
|
||||
if (IS_PRIV_CTRL(drv_ctrls[idx].id)) {
|
||||
if (is_priv_ctrl(drv_ctrls[idx].id)) {
|
||||
/*add private control*/
|
||||
ctrl_cfg.def = drv_ctrls[idx].default_value;
|
||||
ctrl_cfg.flags = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user