482e99adae1d0336f8a139e6c9f57270a4ee0ec6
[openwrt/staging/blocktrron.git] /
1 From 6201ef98a10f52c12d98a0d747154d60a305c2b9 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 8 Oct 2020 15:35:14 +0100
4 Subject: [PATCH] staging: bcm2835-camera: Replace deprecated
5 V4L2_PIX_FMT_BGR32
6
7 V4L2_PIX_FMT_BGR32 is deprecated as it is ambiguous over where
8 the alpha byte is. Cheese/GStreamer appear to get it wrong for
9 one, and qv4l2 gets red and blue swapped.
10
11 Swap to the newer V4L2_PIX_FMT_BGRX32 format.
12
13 https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=267736&p=1738912
14
15 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
16 ---
17 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
21 +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
22 @@ -176,7 +176,7 @@ static struct mmal_fmt formats[] = {
23 .ybbp = 1,
24 .remove_padding = 1,
25 }, {
26 - .fourcc = V4L2_PIX_FMT_BGR32,
27 + .fourcc = V4L2_PIX_FMT_BGRX32,
28 .mmal = MMAL_ENCODING_BGRA,
29 .depth = 32,
30 .mmal_component = COMP_CAMERA,