linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: hantro: Support H264 profile control
@ 2019-11-22  5:16 Hirokazu Honda
  2019-11-22 15:09 ` Nicolas Dufresne
  0 siblings, 1 reply; 11+ messages in thread
From: Hirokazu Honda @ 2019-11-22  5:16 UTC (permalink / raw)
  To: ezequiel, mchehab, gregkh, linux-media, devel, linux-kernel, tfiga
  Cc: Hirokazu Honda

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 <hiroh@chromium.org>
---
 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 6d9d41170832..9387619235d8 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -355,6 +355,16 @@ static const struct hantro_ctrl controls[] = {
 			.def = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B,
 			.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.24.0.432.g9d3f5f5b63-goog


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-02-03 13:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22  5:16 [PATCH] media: hantro: Support H264 profile control Hirokazu Honda
2019-11-22 15:09 ` Nicolas Dufresne
2019-11-22 16:00   ` Tomasz Figa
2019-11-22 16:52     ` Nicolas Dufresne
2019-11-29  0:16       ` Tomasz Figa
2020-01-10 12:31         ` Hans Verkuil
2020-01-11  4:59           ` Ezequiel Garcia
2020-01-18 13:31           ` Nicolas Dufresne
2020-02-03 11:13             ` Tomasz Figa
2020-02-03 11:59               ` Hans Verkuil
2020-02-03 13:48                 ` Tomasz Figa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).