From 858eff03578c621728d219acfcc96b64938b0350 Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Fri, 22 Nov 2019 06:16:08 +0100 Subject: [PATCH] media: hantro: Support H264 profile control The Hantro G1 decoder supports H.264 profiles from Baseline to High, with the exception of the Extended profile. Expose the V4L2_CID_MPEG_VIDEO_H264_PROFILE control, so that the applications can query the driver for the list of supported profiles. Signed-off-by: Hirokazu Honda Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/hantro/hantro_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index c988353..ca8b133 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -362,6 +362,16 @@ static const struct hantro_ctrl controls[] = { .max = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B, }, }, { + .codec = HANTRO_H264_DECODER, + .cfg = { + .id = V4L2_CID_MPEG_VIDEO_H264_PROFILE, + .min = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE, + .max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, + .menu_skip_mask = + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED), + .def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN, + } + }, { }, }; -- 2.7.4