FROMGIT: media: v4l2-ctrls: Fix h264 hierarchical coding type menu ctrl

Add a name of the menu and fill control type.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit a9e3863d00
 git://linuxtv.org/media_tree.git master)
Bug: 183580469
Link: https://lkml.org/lkml/2021/3/20/122
[dikshita : Resolved minor conflict in v4l2-ctrls.c]
Change-Id: Ib66f1dd1c27dc2d96919c1ebc99ca58d0b0cf633
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
This commit is contained in:
Stanimir Varbanov 2021-03-03 00:42:06 +02:00 committed by Todd Kjos
parent f8765be36f
commit 9d8af9284f

View File

@ -421,6 +421,11 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
"Annex B Start Code",
NULL,
};
static const char * const h264_hierarchical_coding_type[] = {
"Hier Coding B",
"Hier Coding P",
NULL,
};
static const char * const mpeg_mpeg2_level[] = {
"Low",
"Main",
@ -697,6 +702,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
return h264_decode_mode;
case V4L2_CID_MPEG_VIDEO_H264_START_CODE:
return h264_start_code;
case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE:
return h264_hierarchical_coding_type;
case V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL:
return mpeg_mpeg2_level;
case V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE:
@ -1324,6 +1331,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE:
case V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE:
case V4L2_CID_MPEG_VIDEO_H264_START_CODE:
case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE:
case V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL:
case V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE:
case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL: