staging: vc04_services: isp: Set the YUV420/YVU420 format stride to 64 bytes
[platform/kernel/linux-rpi.git] / drivers / staging / vc04_services / bcm2835-isp / bcm2835-isp-fmts.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Broadcom BCM2835 ISP driver
4  *
5  * Copyright © 2019-2020 Raspberry Pi (Trading) Ltd.
6  *
7  * Author: Naushir Patuck (naush@raspberrypi.com)
8  *
9  */
10
11 #ifndef BCM2835_ISP_FMTS
12 #define BCM2835_ISP_FMTS
13
14 #include <linux/videodev2.h>
15 #include "vchiq-mmal/mmal-encodings.h"
16
17 struct bcm2835_isp_fmt {
18         u32 fourcc;
19         int depth;
20         int bytesperline_align;
21         u32 mmal_fmt;
22         int size_multiplier_x2;
23         u32 colorspace_mask;
24         enum v4l2_colorspace colorspace_default;
25         unsigned int step_size;
26 };
27
28 #define V4L2_COLORSPACE_MASK(colorspace) BIT(colorspace)
29
30 #define V4L2_COLORSPACE_MASK_JPEG V4L2_COLORSPACE_MASK(V4L2_COLORSPACE_JPEG)
31 #define V4L2_COLORSPACE_MASK_SMPTE170M V4L2_COLORSPACE_MASK(V4L2_COLORSPACE_SMPTE170M)
32 #define V4L2_COLORSPACE_MASK_REC709 V4L2_COLORSPACE_MASK(V4L2_COLORSPACE_REC709)
33 #define V4L2_COLORSPACE_MASK_SRGB V4L2_COLORSPACE_MASK(V4L2_COLORSPACE_SRGB)
34 #define V4L2_COLORSPACE_MASK_RAW V4L2_COLORSPACE_MASK(V4L2_COLORSPACE_RAW)
35
36 /*
37  * The colour spaces we support for YUV outputs. SRGB features here because,
38  * once you assign the default transfer func and so on, it and JPEG effectively
39  * mean the same.
40  */
41 #define V4L2_COLORSPACE_MASK_YUV (V4L2_COLORSPACE_MASK_JPEG | \
42                                   V4L2_COLORSPACE_MASK_SRGB | \
43                                   V4L2_COLORSPACE_MASK_SMPTE170M | \
44                                   V4L2_COLORSPACE_MASK_REC709)
45
46 static const struct bcm2835_isp_fmt supported_formats[] = {
47         {
48                 /* YUV formats */
49                 .fourcc             = V4L2_PIX_FMT_YUV420,
50                 .depth              = 8,
51                 .bytesperline_align = 64,
52                 .mmal_fmt           = MMAL_ENCODING_I420,
53                 .size_multiplier_x2 = 3,
54                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
55                 .colorspace_default = V4L2_COLORSPACE_JPEG,
56                 .step_size          = 2,
57         }, {
58                 .fourcc             = V4L2_PIX_FMT_YVU420,
59                 .depth              = 8,
60                 .bytesperline_align = 64,
61                 .mmal_fmt           = MMAL_ENCODING_YV12,
62                 .size_multiplier_x2 = 3,
63                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
64                 .colorspace_default = V4L2_COLORSPACE_SMPTE170M,
65                 .step_size          = 2,
66         }, {
67                 .fourcc             = V4L2_PIX_FMT_NV12,
68                 .depth              = 8,
69                 .bytesperline_align = 32,
70                 .mmal_fmt           = MMAL_ENCODING_NV12,
71                 .size_multiplier_x2 = 3,
72                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
73                 .colorspace_default = V4L2_COLORSPACE_SMPTE170M,
74                 .step_size          = 2,
75         }, {
76                 .fourcc             = V4L2_PIX_FMT_NV21,
77                 .depth              = 8,
78                 .bytesperline_align = 32,
79                 .mmal_fmt           = MMAL_ENCODING_NV21,
80                 .size_multiplier_x2 = 3,
81                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
82                 .colorspace_default = V4L2_COLORSPACE_SMPTE170M,
83                 .step_size          = 2,
84         }, {
85                 .fourcc             = V4L2_PIX_FMT_YUYV,
86                 .depth              = 16,
87                 .bytesperline_align = 64,
88                 .mmal_fmt           = MMAL_ENCODING_YUYV,
89                 .size_multiplier_x2 = 2,
90                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
91                 .colorspace_default = V4L2_COLORSPACE_SMPTE170M,
92                 .step_size          = 2,
93         }, {
94                 .fourcc             = V4L2_PIX_FMT_UYVY,
95                 .depth              = 16,
96                 .bytesperline_align = 64,
97                 .mmal_fmt           = MMAL_ENCODING_UYVY,
98                 .size_multiplier_x2 = 2,
99                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
100                 .colorspace_default = V4L2_COLORSPACE_SMPTE170M,
101                 .step_size          = 2,
102         }, {
103                 .fourcc             = V4L2_PIX_FMT_YVYU,
104                 .depth              = 16,
105                 .bytesperline_align = 64,
106                 .mmal_fmt           = MMAL_ENCODING_YVYU,
107                 .size_multiplier_x2 = 2,
108                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
109                 .colorspace_default = V4L2_COLORSPACE_SMPTE170M,
110                 .step_size          = 2,
111         }, {
112                 .fourcc             = V4L2_PIX_FMT_VYUY,
113                 .depth              = 16,
114                 .bytesperline_align = 64,
115                 .mmal_fmt           = MMAL_ENCODING_VYUY,
116                 .size_multiplier_x2 = 2,
117                 .colorspace_mask    = V4L2_COLORSPACE_MASK_YUV,
118                 .colorspace_default = V4L2_COLORSPACE_SMPTE170M,
119                 .step_size          = 2,
120         }, {
121                 /* RGB formats */
122                 .fourcc             = V4L2_PIX_FMT_RGB24,
123                 .depth              = 24,
124                 .bytesperline_align = 32,
125                 .mmal_fmt           = MMAL_ENCODING_RGB24,
126                 .size_multiplier_x2 = 2,
127                 .colorspace_mask    = V4L2_COLORSPACE_MASK_SRGB,
128                 .colorspace_default = V4L2_COLORSPACE_SRGB,
129                 .step_size          = 1,
130         }, {
131                 .fourcc             = V4L2_PIX_FMT_RGB565,
132                 .depth              = 16,
133                 .bytesperline_align = 32,
134                 .mmal_fmt           = MMAL_ENCODING_RGB16,
135                 .size_multiplier_x2 = 2,
136                 .colorspace_mask    = V4L2_COLORSPACE_MASK_SRGB,
137                 .colorspace_default = V4L2_COLORSPACE_SRGB,
138                 .step_size          = 1,
139         }, {
140                 .fourcc             = V4L2_PIX_FMT_BGR24,
141                 .depth              = 24,
142                 .bytesperline_align = 32,
143                 .mmal_fmt           = MMAL_ENCODING_BGR24,
144                 .size_multiplier_x2 = 2,
145                 .colorspace_mask    = V4L2_COLORSPACE_MASK_SRGB,
146                 .colorspace_default = V4L2_COLORSPACE_SRGB,
147                 .step_size          = 1,
148         }, {
149                 .fourcc             = V4L2_PIX_FMT_XBGR32,
150                 .depth              = 32,
151                 .bytesperline_align = 64,
152                 .mmal_fmt           = MMAL_ENCODING_BGRA,
153                 .size_multiplier_x2 = 2,
154                 .colorspace_mask    = V4L2_COLORSPACE_MASK_SRGB,
155                 .colorspace_default = V4L2_COLORSPACE_SRGB,
156                 .step_size          = 1,
157         }, {
158                 .fourcc             = V4L2_PIX_FMT_RGBX32,
159                 .depth              = 32,
160                 .bytesperline_align = 64,
161                 .mmal_fmt           = MMAL_ENCODING_RGBA,
162                 .size_multiplier_x2 = 2,
163                 .colorspace_mask    = V4L2_COLORSPACE_MASK_SRGB,
164                 .colorspace_default = V4L2_COLORSPACE_SRGB,
165                 .step_size          = 1,
166         }, {
167                 /* Bayer formats */
168                 /* 8 bit */
169                 .fourcc             = V4L2_PIX_FMT_SRGGB8,
170                 .depth              = 8,
171                 .bytesperline_align = 32,
172                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB8,
173                 .size_multiplier_x2 = 2,
174                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
175                 .colorspace_default = V4L2_COLORSPACE_RAW,
176                 .step_size          = 2,
177         }, {
178                 .fourcc             = V4L2_PIX_FMT_SBGGR8,
179                 .depth              = 8,
180                 .bytesperline_align = 32,
181                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR8,
182                 .size_multiplier_x2 = 2,
183                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
184                 .colorspace_default = V4L2_COLORSPACE_RAW,
185                 .step_size          = 2,
186         }, {
187                 .fourcc             = V4L2_PIX_FMT_SGRBG8,
188                 .depth              = 8,
189                 .bytesperline_align = 32,
190                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG8,
191                 .size_multiplier_x2 = 2,
192                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
193                 .colorspace_default = V4L2_COLORSPACE_RAW,
194                 .step_size          = 2,
195         }, {
196                 .fourcc             = V4L2_PIX_FMT_SGBRG8,
197                 .depth              = 8,
198                 .bytesperline_align = 32,
199                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG8,
200                 .size_multiplier_x2 = 2,
201                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
202                 .colorspace_default = V4L2_COLORSPACE_RAW,
203                 .step_size          = 2,
204         }, {
205                 /* 10 bit */
206                 .fourcc             = V4L2_PIX_FMT_SRGGB10P,
207                 .depth              = 10,
208                 .bytesperline_align = 32,
209                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB10P,
210                 .size_multiplier_x2 = 2,
211                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
212                 .colorspace_default = V4L2_COLORSPACE_RAW,
213                 .step_size          = 2,
214         }, {
215                 .fourcc             = V4L2_PIX_FMT_SBGGR10P,
216                 .depth              = 10,
217                 .bytesperline_align = 32,
218                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR10P,
219                 .size_multiplier_x2 = 2,
220                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
221                 .colorspace_default = V4L2_COLORSPACE_RAW,
222                 .step_size          = 2,
223         }, {
224                 .fourcc             = V4L2_PIX_FMT_SGRBG10P,
225                 .depth              = 10,
226                 .bytesperline_align = 32,
227                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG10P,
228                 .size_multiplier_x2 = 2,
229                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
230                 .colorspace_default = V4L2_COLORSPACE_RAW,
231                 .step_size          = 2,
232         }, {
233                 .fourcc             = V4L2_PIX_FMT_SGBRG10P,
234                 .depth              = 10,
235                 .bytesperline_align = 32,
236                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG10P,
237                 .size_multiplier_x2 = 2,
238                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
239                 .colorspace_default = V4L2_COLORSPACE_RAW,
240                 .step_size          = 2,
241         }, {
242                 /* 12 bit */
243                 .fourcc             = V4L2_PIX_FMT_SRGGB12P,
244                 .depth              = 12,
245                 .bytesperline_align = 32,
246                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB12P,
247                 .size_multiplier_x2 = 2,
248                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
249                 .colorspace_default = V4L2_COLORSPACE_RAW,
250                 .step_size          = 2,
251         }, {
252                 .fourcc             = V4L2_PIX_FMT_SBGGR12P,
253                 .depth              = 12,
254                 .bytesperline_align = 32,
255                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR12P,
256                 .size_multiplier_x2 = 2,
257                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
258                 .colorspace_default = V4L2_COLORSPACE_RAW,
259                 .step_size          = 2,
260         }, {
261                 .fourcc             = V4L2_PIX_FMT_SGRBG12P,
262                 .depth              = 12,
263                 .bytesperline_align = 32,
264                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG12P,
265                 .size_multiplier_x2 = 2,
266                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
267                 .colorspace_default = V4L2_COLORSPACE_RAW,
268                 .step_size          = 2,
269         }, {
270                 .fourcc             = V4L2_PIX_FMT_SGBRG12P,
271                 .depth              = 12,
272                 .bytesperline_align = 32,
273                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG12P,
274                 .size_multiplier_x2 = 2,
275                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
276                 .colorspace_default = V4L2_COLORSPACE_RAW,
277                 .step_size          = 2,
278         }, {
279                 /* 14 bit */
280                 .fourcc             = V4L2_PIX_FMT_SRGGB14P,
281                 .depth              = 14,
282                 .bytesperline_align = 32,
283                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB14P,
284                 .size_multiplier_x2 = 2,
285                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
286                 .colorspace_default = V4L2_COLORSPACE_RAW,
287                 .step_size          = 2,
288         }, {
289                 .fourcc             = V4L2_PIX_FMT_SBGGR14P,
290                 .depth              = 14,
291                 .bytesperline_align = 32,
292                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR14P,
293                 .size_multiplier_x2 = 2,
294                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
295                 .colorspace_default = V4L2_COLORSPACE_RAW,
296                 .step_size          = 2,
297         }, {
298                 .fourcc             = V4L2_PIX_FMT_SGRBG14P,
299                 .depth              = 14,
300                 .bytesperline_align = 32,
301                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG14P,
302                 .size_multiplier_x2 = 2,
303                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
304                 .colorspace_default = V4L2_COLORSPACE_RAW,
305                 .step_size          = 2,
306         }, {
307                 .fourcc             = V4L2_PIX_FMT_SGBRG14P,
308                 .depth              = 14,
309                 .bytesperline_align = 32,
310                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG14P,
311                 .size_multiplier_x2 = 2,
312                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
313                 .colorspace_default = V4L2_COLORSPACE_RAW,
314                 .step_size          = 2,
315         }, {
316                 /* 16 bit */
317                 .fourcc             = V4L2_PIX_FMT_SRGGB16,
318                 .depth              = 16,
319                 .bytesperline_align = 32,
320                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB16,
321                 .size_multiplier_x2 = 2,
322                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
323                 .colorspace_default = V4L2_COLORSPACE_RAW,
324                 .step_size          = 2,
325         }, {
326                 .fourcc             = V4L2_PIX_FMT_SBGGR16,
327                 .depth              = 16,
328                 .bytesperline_align = 32,
329                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR16,
330                 .size_multiplier_x2 = 2,
331                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
332                 .colorspace_default = V4L2_COLORSPACE_RAW,
333                 .step_size          = 2,
334         }, {
335                 .fourcc             = V4L2_PIX_FMT_SGRBG16,
336                 .depth              = 16,
337                 .bytesperline_align = 32,
338                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG16,
339                 .size_multiplier_x2 = 2,
340                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
341                 .colorspace_default = V4L2_COLORSPACE_RAW,
342                 .step_size          = 2,
343         }, {
344                 .fourcc             = V4L2_PIX_FMT_SGBRG16,
345                 .depth              = 16,
346                 .bytesperline_align = 32,
347                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG16,
348                 .size_multiplier_x2 = 2,
349                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
350                 .colorspace_default = V4L2_COLORSPACE_RAW,
351                 .step_size          = 2,
352         }, {
353                 /* Bayer formats unpacked to 16bpp */
354                 /* 10 bit */
355                 .fourcc             = V4L2_PIX_FMT_SRGGB10,
356                 .depth              = 16,
357                 .bytesperline_align = 32,
358                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB10,
359                 .size_multiplier_x2 = 2,
360                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
361                 .colorspace_default = V4L2_COLORSPACE_RAW,
362                 .step_size          = 2,
363         }, {
364                 .fourcc             = V4L2_PIX_FMT_SBGGR10,
365                 .depth              = 16,
366                 .bytesperline_align = 32,
367                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR10,
368                 .size_multiplier_x2 = 2,
369                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
370                 .colorspace_default = V4L2_COLORSPACE_RAW,
371                 .step_size          = 2,
372         }, {
373                 .fourcc             = V4L2_PIX_FMT_SGRBG10,
374                 .depth              = 16,
375                 .bytesperline_align = 32,
376                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG10,
377                 .size_multiplier_x2 = 2,
378                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
379                 .colorspace_default = V4L2_COLORSPACE_RAW,
380                 .step_size          = 2,
381         }, {
382                 .fourcc             = V4L2_PIX_FMT_SGBRG10,
383                 .depth              = 16,
384                 .bytesperline_align = 32,
385                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG10,
386                 .size_multiplier_x2 = 2,
387                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
388                 .colorspace_default = V4L2_COLORSPACE_RAW,
389                 .step_size          = 2,
390         }, {
391                 /* 12 bit */
392                 .fourcc             = V4L2_PIX_FMT_SRGGB12,
393                 .depth              = 16,
394                 .bytesperline_align = 32,
395                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB12,
396                 .size_multiplier_x2 = 2,
397                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
398                 .colorspace_default = V4L2_COLORSPACE_RAW,
399                 .step_size          = 2,
400         }, {
401                 .fourcc             = V4L2_PIX_FMT_SBGGR12,
402                 .depth              = 16,
403                 .bytesperline_align = 32,
404                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR12,
405                 .size_multiplier_x2 = 2,
406                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
407                 .colorspace_default = V4L2_COLORSPACE_RAW,
408                 .step_size          = 2,
409         }, {
410                 .fourcc             = V4L2_PIX_FMT_SGRBG12,
411                 .depth              = 16,
412                 .bytesperline_align = 32,
413                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG12,
414                 .size_multiplier_x2 = 2,
415                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
416                 .colorspace_default = V4L2_COLORSPACE_RAW,
417                 .step_size          = 2,
418         }, {
419                 .fourcc             = V4L2_PIX_FMT_SGBRG12,
420                 .depth              = 16,
421                 .bytesperline_align = 32,
422                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG12,
423                 .size_multiplier_x2 = 2,
424                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
425                 .colorspace_default = V4L2_COLORSPACE_RAW,
426                 .step_size          = 2,
427         }, {
428                 /* 14 bit */
429                 .fourcc             = V4L2_PIX_FMT_SRGGB14,
430                 .depth              = 16,
431                 .bytesperline_align = 32,
432                 .mmal_fmt           = MMAL_ENCODING_BAYER_SRGGB14,
433                 .size_multiplier_x2 = 2,
434                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
435                 .colorspace_default = V4L2_COLORSPACE_RAW,
436                 .step_size          = 2,
437         }, {
438                 .fourcc             = V4L2_PIX_FMT_SBGGR14,
439                 .depth              = 16,
440                 .bytesperline_align = 32,
441                 .mmal_fmt           = MMAL_ENCODING_BAYER_SBGGR14,
442                 .size_multiplier_x2 = 2,
443                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
444                 .colorspace_default = V4L2_COLORSPACE_RAW,
445                 .step_size          = 2,
446         }, {
447                 .fourcc             = V4L2_PIX_FMT_SGRBG14,
448                 .depth              = 16,
449                 .bytesperline_align = 32,
450                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGRBG14,
451                 .size_multiplier_x2 = 2,
452                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
453                 .colorspace_default = V4L2_COLORSPACE_RAW,
454                 .step_size          = 2,
455         }, {
456                 .fourcc             = V4L2_PIX_FMT_SGBRG14,
457                 .depth              = 16,
458                 .bytesperline_align = 32,
459                 .mmal_fmt           = MMAL_ENCODING_BAYER_SGBRG14,
460                 .size_multiplier_x2 = 2,
461                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
462                 .colorspace_default = V4L2_COLORSPACE_RAW,
463                 .step_size          = 2,
464         }, {
465                 /* Monochrome MIPI formats */
466                 /* 8 bit */
467                 .fourcc             = V4L2_PIX_FMT_GREY,
468                 .depth              = 8,
469                 .bytesperline_align = 32,
470                 .mmal_fmt           = MMAL_ENCODING_GREY,
471                 .size_multiplier_x2 = 2,
472                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
473                 .colorspace_default = V4L2_COLORSPACE_RAW,
474                 .step_size          = 2,
475         }, {
476                 /* 10 bit */
477                 .fourcc             = V4L2_PIX_FMT_Y10P,
478                 .depth              = 10,
479                 .bytesperline_align = 32,
480                 .mmal_fmt           = MMAL_ENCODING_Y10P,
481                 .size_multiplier_x2 = 2,
482                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
483                 .colorspace_default = V4L2_COLORSPACE_RAW,
484                 .step_size          = 2,
485         }, {
486                 /* 12 bit */
487                 .fourcc             = V4L2_PIX_FMT_Y12P,
488                 .depth              = 12,
489                 .bytesperline_align = 32,
490                 .mmal_fmt           = MMAL_ENCODING_Y12P,
491                 .size_multiplier_x2 = 2,
492                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
493                 .colorspace_default = V4L2_COLORSPACE_RAW,
494                 .step_size          = 2,
495         }, {
496                 /* 14 bit */
497                 .fourcc             = V4L2_PIX_FMT_Y14P,
498                 .depth              = 14,
499                 .bytesperline_align = 32,
500                 .mmal_fmt           = MMAL_ENCODING_Y14P,
501                 .size_multiplier_x2 = 2,
502                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
503                 .colorspace_default = V4L2_COLORSPACE_RAW,
504                 .step_size          = 2,
505         }, {
506                 /* 16 bit */
507                 .fourcc             = V4L2_PIX_FMT_Y16,
508                 .depth              = 16,
509                 .bytesperline_align = 32,
510                 .mmal_fmt           = MMAL_ENCODING_Y16,
511                 .size_multiplier_x2 = 2,
512                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
513                 .colorspace_default = V4L2_COLORSPACE_RAW,
514                 .step_size          = 2,
515         }, {
516                 /* 10 bit as 16bpp */
517                 .fourcc             = V4L2_PIX_FMT_Y10,
518                 .depth              = 16,
519                 .bytesperline_align = 32,
520                 .mmal_fmt           = MMAL_ENCODING_Y10,
521                 .size_multiplier_x2 = 2,
522                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
523                 .colorspace_default = V4L2_COLORSPACE_RAW,
524                 .step_size          = 2,
525         }, {
526                 /* 12 bit as 16bpp */
527                 .fourcc             = V4L2_PIX_FMT_Y12,
528                 .depth              = 16,
529                 .bytesperline_align = 32,
530                 .mmal_fmt           = MMAL_ENCODING_Y12,
531                 .size_multiplier_x2 = 2,
532                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
533                 .colorspace_default = V4L2_COLORSPACE_RAW,
534                 .step_size          = 2,
535         }, {
536                 /* 14 bit as 16bpp */
537                 .fourcc             = V4L2_PIX_FMT_Y14,
538                 .depth              = 16,
539                 .bytesperline_align = 32,
540                 .mmal_fmt           = MMAL_ENCODING_Y14,
541                 .size_multiplier_x2 = 2,
542                 .colorspace_mask    = V4L2_COLORSPACE_MASK_RAW,
543                 .colorspace_default = V4L2_COLORSPACE_RAW,
544                 .step_size          = 2,
545         }, {
546                 .fourcc             = V4L2_META_FMT_BCM2835_ISP_STATS,
547                 .mmal_fmt           = MMAL_ENCODING_BRCM_STATS,
548                 /* The rest are not valid fields for stats. */
549         }
550 };
551
552 #endif