837b6b5d9567db52a6ddee60fc4e5272bfc11226
[openwrt/staging/mans0n.git] /
1 From ac6ebed4a0e06b4102831976e826a5986732ed33 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 6 May 2020 18:09:04 +0100
4 Subject: [PATCH] staging: vc04_services: isp: Add support for 14bit
5 Bayer
6
7 The only thing missing was a set of defines, therefore add them in.
8
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
10 ---
11 .../bcm2835-isp/bcm2835_isp_fmts.h | 37 +++++++++++++++++++
12 .../vc04_services/vchiq-mmal/mmal-encodings.h | 6 +++
13 2 files changed, 43 insertions(+)
14
15 --- a/drivers/staging/vc04_services/bcm2835-isp/bcm2835_isp_fmts.h
16 +++ b/drivers/staging/vc04_services/bcm2835-isp/bcm2835_isp_fmts.h
17 @@ -254,6 +254,43 @@ static const struct bcm2835_isp_fmt supp
18 .colorspace = V4L2_COLORSPACE_RAW,
19 .step_size = 2,
20 }, {
21 + /* 14 bit */
22 + .fourcc = V4L2_PIX_FMT_SRGGB14P,
23 + .depth = 14,
24 + .bytesperline_align = 32,
25 + .flags = 0,
26 + .mmal_fmt = MMAL_ENCODING_BAYER_SRGGB14P,
27 + .size_multiplier_x2 = 2,
28 + .colorspace = V4L2_COLORSPACE_RAW,
29 + .step_size = 2,
30 + }, {
31 + .fourcc = V4L2_PIX_FMT_SBGGR14P,
32 + .depth = 14,
33 + .bytesperline_align = 32,
34 + .flags = 0,
35 + .mmal_fmt = MMAL_ENCODING_BAYER_SBGGR14P,
36 + .size_multiplier_x2 = 2,
37 + .colorspace = V4L2_COLORSPACE_RAW,
38 + .step_size = 2,
39 + }, {
40 + .fourcc = V4L2_PIX_FMT_SGRBG14P,
41 + .depth = 14,
42 + .bytesperline_align = 32,
43 + .flags = 0,
44 + .mmal_fmt = MMAL_ENCODING_BAYER_SGRBG14P,
45 + .size_multiplier_x2 = 2,
46 + .colorspace = V4L2_COLORSPACE_RAW,
47 + .step_size = 2,
48 + }, {
49 + .fourcc = V4L2_PIX_FMT_SGBRG14P,
50 + .depth = 14,
51 + .bytesperline_align = 32,
52 + .flags = 0,
53 + .mmal_fmt = MMAL_ENCODING_BAYER_SGBRG14P,
54 + .size_multiplier_x2 = 2,
55 + .colorspace = V4L2_COLORSPACE_RAW,
56 + .step_size = 2,
57 + }, {
58 /* 16 bit */
59 .fourcc = V4L2_PIX_FMT_SRGGB16,
60 .depth = 16,
61 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h
62 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h
63 @@ -90,6 +90,12 @@
64 #define MMAL_ENCODING_BAYER_SGBRG12P MMAL_FOURCC('p', 'G', '1', '2')
65 #define MMAL_ENCODING_BAYER_SRGGB12P MMAL_FOURCC('p', 'R', '1', '2')
66
67 +//14 bit per pixel Bayer formats.
68 +#define MMAL_ENCODING_BAYER_SBGGR14P MMAL_FOURCC('p', 'B', 'E', 'E')
69 +#define MMAL_ENCODING_BAYER_SGBRG14P MMAL_FOURCC('p', 'G', 'E', 'E')
70 +#define MMAL_ENCODING_BAYER_SGRBG14P MMAL_FOURCC('p', 'g', 'E', 'E')
71 +#define MMAL_ENCODING_BAYER_SRGGB14P MMAL_FOURCC('p', 'R', 'E', 'E')
72 +
73 /* 16 bit per pixel Bayer formats. */
74 #define MMAL_ENCODING_BAYER_SBGGR16 MMAL_FOURCC('B', 'G', '1', '6')
75 #define MMAL_ENCODING_BAYER_SGBRG16 MMAL_FOURCC('G', 'B', '1', '6')