1 From a7c3abc971eb4e7771697a70f8b6ca42bc2b1db0 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 25 Mar 2021 18:28:40 +0000
4 Subject: [PATCH] staging/bcm2835-codec: Fix support for levels 4.1 and
7 The driver said it supported H264 levels 4.1 and 4.2, but
8 was missing the V4L2 to MMAL mappings.
10 Add in those mappings.
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
14 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 11 +++++++++++
15 1 file changed, 11 insertions(+)
17 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
18 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
19 @@ -1789,6 +1789,17 @@ static int bcm2835_codec_set_level_profi
20 case V4L2_MPEG_VIDEO_H264_LEVEL_4_0:
21 param.level = MMAL_VIDEO_LEVEL_H264_4;
24 + * Note that the hardware spec is level 4.0. Levels above that
25 + * are there for correctly encoding the headers and may not
26 + * be able to keep up with real-time.
28 + case V4L2_MPEG_VIDEO_H264_LEVEL_4_1:
29 + param.level = MMAL_VIDEO_LEVEL_H264_41;
31 + case V4L2_MPEG_VIDEO_H264_LEVEL_4_2:
32 + param.level = MMAL_VIDEO_LEVEL_H264_42;
35 /* Should never get here */