68d53280add1063dee32a858b6953a8b4814ccd1
[openwrt/staging/blogic.git] /
1 From f65a0ba774c5ef012f45ea3136565713aa4884d5 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Wed, 13 Feb 2019 12:33:29 +0000
4 Subject: [PATCH 358/703] staging: mmal_vchiq: Add in the Bayer encoding
5 formats
6
7 The list of formats was copied before Bayer support was added.
8 The ISP supports Bayer and is being supported by the bcm2835_codec
9 driver, so add in the encodings for them.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12 ---
13 .../vc04_services/vchiq-mmal/mmal-encodings.h | 27 +++++++++++++++++++
14 1 file changed, 27 insertions(+)
15
16 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h
17 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h
18 @@ -69,6 +69,33 @@
19 */
20 #define MMAL_ENCODING_OPAQUE MMAL_FOURCC('O', 'P', 'Q', 'V')
21
22 +/* Bayer formats
23 + * FourCC values copied from V4L2 where defined.
24 + */
25 +/* 8 bit per pixel Bayer formats. */
26 +#define MMAL_ENCODING_BAYER_SBGGR8 MMAL_FOURCC('B', 'A', '8', '1')
27 +#define MMAL_ENCODING_BAYER_SGBRG8 MMAL_FOURCC('G', 'B', 'R', 'G')
28 +#define MMAL_ENCODING_BAYER_SGRBG8 MMAL_FOURCC('G', 'R', 'B', 'G')
29 +#define MMAL_ENCODING_BAYER_SRGGB8 MMAL_FOURCC('R', 'G', 'G', 'B')
30 +
31 +/* 10 bit per pixel packed Bayer formats. */
32 +#define MMAL_ENCODING_BAYER_SBGGR10P MMAL_FOURCC('p', 'B', 'A', 'A')
33 +#define MMAL_ENCODING_BAYER_SGRBG10P MMAL_FOURCC('p', 'g', 'A', 'A')
34 +#define MMAL_ENCODING_BAYER_SGBRG10P MMAL_FOURCC('p', 'G', 'A', 'A')
35 +#define MMAL_ENCODING_BAYER_SRGGB10P MMAL_FOURCC('p', 'R', 'A', 'A')
36 +
37 +/* 12 bit per pixel packed Bayer formats. */
38 +#define MMAL_ENCODING_BAYER_SBGGR12P MMAL_FOURCC('p', 'B', '1', '2')
39 +#define MMAL_ENCODING_BAYER_SGRBG12P MMAL_FOURCC('p', 'g', '1', '2')
40 +#define MMAL_ENCODING_BAYER_SGBRG12P MMAL_FOURCC('p', 'G', '1', '2')
41 +#define MMAL_ENCODING_BAYER_SRGGB12P MMAL_FOURCC('p', 'R', '1', '2')
42 +
43 +/* 16 bit per pixel Bayer formats. */
44 +#define MMAL_ENCODING_BAYER_SBGGR16 MMAL_FOURCC('B', 'G', '1', '6')
45 +#define MMAL_ENCODING_BAYER_SGBRG16 MMAL_FOURCC('G', 'B', '1', '6')
46 +#define MMAL_ENCODING_BAYER_SGRBG16 MMAL_FOURCC('G', 'R', '1', '6')
47 +#define MMAL_ENCODING_BAYER_SRGGB16 MMAL_FOURCC('R', 'G', '1', '6')
48 +
49 /** An EGL image handle
50 */
51 #define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E', 'G', 'L', 'I')