a5bc8827480fbdd6d467b202488706be6eeb9c5b
[openwrt/staging/robimarko.git] /
1 From b935f992a71593042f118d004df7afb9c7f8b2f2 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
5 4.2
6
7 The driver said it supported H264 levels 4.1 and 4.2, but
8 was missing the V4L2 to MMAL mappings.
9
10 Add in those mappings.
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 ---
14 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 11 +++++++++++
15 1 file changed, 11 insertions(+)
16
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;
22 break;
23 + /*
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.
27 + */
28 + case V4L2_MPEG_VIDEO_H264_LEVEL_4_1:
29 + param.level = MMAL_VIDEO_LEVEL_H264_41;
30 + break;
31 + case V4L2_MPEG_VIDEO_H264_LEVEL_4_2:
32 + param.level = MMAL_VIDEO_LEVEL_H264_42;
33 + break;
34 default:
35 /* Should never get here */
36 break;