ImmortalWrt/target/linux/bcm27xx/patches-5.15/950-0383-staging-bcm2835-codec-Fix-support-for-levels-4.1-and.patch
Álvaro Fernández Rojas 20ea6adbf1 bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-17 15:11:22 +02:00

37 lines
1.2 KiB
Diff

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