Merge branch 'pm-cpufreq'
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-007.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 ********************************
4 Detailed Colorspace Descriptions
5 ********************************
6
7
8 .. _col-smpte-170m:
9
10 Colorspace SMPTE 170M (V4L2_COLORSPACE_SMPTE170M)
11 =================================================
12
13 The :ref:`smpte170m` standard defines the colorspace used by NTSC and
14 PAL and by SDTV in general. The default transfer function is
15 ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is
16 ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited
17 range. The chromaticities of the primary colors and the white reference
18 are:
19
20
21
22 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
23
24 .. flat-table:: SMPTE 170M Chromaticities
25     :header-rows:  1
26     :stub-columns: 0
27     :widths:       1 1 2
28
29     * - Color
30       - x
31       - y
32     * - Red
33       - 0.630
34       - 0.340
35     * - Green
36       - 0.310
37       - 0.595
38     * - Blue
39       - 0.155
40       - 0.070
41     * - White Reference (D65)
42       - 0.3127
43       - 0.3290
44
45
46 The red, green and blue chromaticities are also often referred to as the
47 SMPTE C set, so this colorspace is sometimes called SMPTE C as well.
48
49 The transfer function defined for SMPTE 170M is the same as the one
50 defined in Rec. 709.
51
52 .. math::
53
54     L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le-0.018
55
56     L' = 4.5L \text{, for } -0.018 < L < 0.018
57
58     L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018
59
60 Inverse Transfer function:
61
62 .. math::
63
64     L = -\left( \frac{L' - 0.099}{-1.099} \right) ^{\frac{1}{0.45}} \text{, for } L' \le -0.081
65
66     L = \frac{L'}{4.5} \text{, for } -0.081 < L' < 0.081
67
68     L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081
69
70 The luminance (Y') and color difference (Cb and Cr) are obtained with
71 the following ``V4L2_YCBCR_ENC_601`` encoding:
72
73 .. math::
74
75     Y' = 0.2990R' + 0.5870G' + 0.1140B'
76
77     Cb = -0.1687R' - 0.3313G' + 0.5B'
78
79     Cr = 0.5R' - 0.4187G' - 0.0813B'
80
81 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
82 [-0.5…0.5]. This conversion to Y'CbCr is identical to the one defined in
83 the :ref:`itu601` standard and this colorspace is sometimes called
84 BT.601 as well, even though BT.601 does not mention any color primaries.
85
86 The default quantization is limited range, but full range is possible
87 although rarely seen.
88
89
90 .. _col-rec709:
91
92 Colorspace Rec. 709 (V4L2_COLORSPACE_REC709)
93 ============================================
94
95 The :ref:`itu709` standard defines the colorspace used by HDTV in
96 general. The default transfer function is ``V4L2_XFER_FUNC_709``. The
97 default Y'CbCr encoding is ``V4L2_YCBCR_ENC_709``. The default Y'CbCr
98 quantization is limited range. The chromaticities of the primary colors
99 and the white reference are:
100
101
102
103 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
104
105 .. flat-table:: Rec. 709 Chromaticities
106     :header-rows:  1
107     :stub-columns: 0
108     :widths:       1 1 2
109
110     * - Color
111       - x
112       - y
113     * - Red
114       - 0.640
115       - 0.330
116     * - Green
117       - 0.300
118       - 0.600
119     * - Blue
120       - 0.150
121       - 0.060
122     * - White Reference (D65)
123       - 0.3127
124       - 0.3290
125
126
127 The full name of this standard is Rec. ITU-R BT.709-5.
128
129 Transfer function. Normally L is in the range [0…1], but for the
130 extended gamut xvYCC encoding values outside that range are allowed.
131
132 .. math::
133
134     L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le -0.018
135
136     L' = 4.5L \text{, for } -0.018 < L < 0.018
137
138     L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018
139
140 Inverse Transfer function:
141
142 .. math::
143
144     L = -\left( \frac{L' - 0.099}{-1.099} \right)^\frac{1}{0.45} \text{, for } L' \le -0.081
145
146     L = \frac{L'}{4.5}\text{, for } -0.081 < L' < 0.081
147
148     L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081
149
150 The luminance (Y') and color difference (Cb and Cr) are obtained with
151 the following ``V4L2_YCBCR_ENC_709`` encoding:
152
153 .. math::
154
155     Y' = 0.2126R' + 0.7152G' + 0.0722B'
156
157     Cb = -0.1146R' - 0.3854G' + 0.5B'
158
159     Cr = 0.5R' - 0.4542G' - 0.0458B'
160
161 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
162 [-0.5…0.5].
163
164 The default quantization is limited range, but full range is possible
165 although rarely seen.
166
167 The ``V4L2_YCBCR_ENC_709`` encoding described above is the default for
168 this colorspace, but it can be overridden with ``V4L2_YCBCR_ENC_601``,
169 in which case the BT.601 Y'CbCr encoding is used.
170
171 Two additional extended gamut Y'CbCr encodings are also possible with
172 this colorspace:
173
174 The xvYCC 709 encoding (``V4L2_YCBCR_ENC_XV709``, :ref:`xvycc`) is
175 similar to the Rec. 709 encoding, but it allows for R', G' and B' values
176 that are outside the range [0…1]. The resulting Y', Cb and Cr values are
177 scaled and offset:
178
179 .. math::
180
181     Y' = \frac{219}{256} * (0.2126R' + 0.7152G' + 0.0722B') + \frac{16}{256}
182
183     Cb = \frac{224}{256} * (-0.1146R' - 0.3854G' + 0.5B')
184
185     Cr = \frac{224}{256} * (0.5R' - 0.4542G' - 0.0458B')
186
187 The xvYCC 601 encoding (``V4L2_YCBCR_ENC_XV601``, :ref:`xvycc`) is
188 similar to the BT.601 encoding, but it allows for R', G' and B' values
189 that are outside the range [0…1]. The resulting Y', Cb and Cr values are
190 scaled and offset:
191
192 .. math::
193
194     Y' = \frac{219}{256} * (0.2990R' + 0.5870G' + 0.1140B') + \frac{16}{256}
195
196     Cb = \frac{224}{256} * (-0.1687R' - 0.3313G' + 0.5B')
197
198     Cr = \frac{224}{256} * (0.5R' - 0.4187G' - 0.0813B')
199
200 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
201 [-0.5…0.5]. The non-standard xvYCC 709 or xvYCC 601 encodings can be
202 used by selecting ``V4L2_YCBCR_ENC_XV709`` or ``V4L2_YCBCR_ENC_XV601``.
203 The xvYCC encodings always use full range quantization.
204
205
206 .. _col-srgb:
207
208 Colorspace sRGB (V4L2_COLORSPACE_SRGB)
209 ======================================
210
211 The :ref:`srgb` standard defines the colorspace used by most webcams
212 and computer graphics. The default transfer function is
213 ``V4L2_XFER_FUNC_SRGB``. The default Y'CbCr encoding is
214 ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full range.
215 The chromaticities of the primary colors and the white reference are:
216
217
218
219 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
220
221 .. flat-table:: sRGB Chromaticities
222     :header-rows:  1
223     :stub-columns: 0
224     :widths:       1 1 2
225
226     * - Color
227       - x
228       - y
229     * - Red
230       - 0.640
231       - 0.330
232     * - Green
233       - 0.300
234       - 0.600
235     * - Blue
236       - 0.150
237       - 0.060
238     * - White Reference (D65)
239       - 0.3127
240       - 0.3290
241
242
243 These chromaticities are identical to the Rec. 709 colorspace.
244
245 Transfer function. Note that negative values for L are only used by the
246 Y'CbCr conversion.
247
248 .. math::
249
250     L' = -1.055(-L)^{\frac{1}{2.4} } + 0.055\text{, for }L < -0.0031308
251
252     L' = 12.92L\text{, for }-0.0031308 \le L \le 0.0031308
253
254     L' = 1.055L ^{\frac{1}{2.4} } - 0.055\text{, for }0.0031308 < L \le 1
255
256 Inverse Transfer function:
257
258 .. math::
259
260     L = -((-L' + 0.055) / 1.055) ^{2.4}\text{, for }L' < -0.04045
261
262     L = L' / 12.92\text{, for }-0.04045 \le L' \le 0.04045
263
264     L = ((L' + 0.055) / 1.055) ^{2.4}\text{, for }L' > 0.04045
265
266 The luminance (Y') and color difference (Cb and Cr) are obtained with
267 the following ``V4L2_YCBCR_ENC_601`` encoding as defined by :ref:`sycc`:
268
269 .. math::
270
271     Y' = 0.2990R' + 0.5870G' + 0.1140B'
272
273     Cb = -0.1687R' - 0.3313G' + 0.5B'
274
275     Cr = 0.5R' - 0.4187G' - 0.0813B'
276
277 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
278 [-0.5…0.5]. This transform is identical to one defined in SMPTE
279 170M/BT.601. The Y'CbCr quantization is full range.
280
281
282 .. _col-adobergb:
283
284 Colorspace Adobe RGB (V4L2_COLORSPACE_ADOBERGB)
285 ===============================================
286
287 The :ref:`adobergb` standard defines the colorspace used by computer
288 graphics that use the AdobeRGB colorspace. This is also known as the
289 :ref:`oprgb` standard. The default transfer function is
290 ``V4L2_XFER_FUNC_ADOBERGB``. The default Y'CbCr encoding is
291 ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full
292 range. The chromaticities of the primary colors and the white reference
293 are:
294
295
296
297 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
298
299 .. flat-table:: Adobe RGB Chromaticities
300     :header-rows:  1
301     :stub-columns: 0
302     :widths:       1 1 2
303
304     * - Color
305       - x
306       - y
307     * - Red
308       - 0.6400
309       - 0.3300
310     * - Green
311       - 0.2100
312       - 0.7100
313     * - Blue
314       - 0.1500
315       - 0.0600
316     * - White Reference (D65)
317       - 0.3127
318       - 0.3290
319
320
321
322 Transfer function:
323
324 .. math::
325
326     L' = L ^{\frac{1}{2.19921875}}
327
328 Inverse Transfer function:
329
330 .. math::
331
332     L = L'^{(2.19921875)}
333
334 The luminance (Y') and color difference (Cb and Cr) are obtained with
335 the following ``V4L2_YCBCR_ENC_601`` encoding:
336
337 .. math::
338
339     Y' = 0.2990R' + 0.5870G' + 0.1140B'
340
341     Cb = -0.1687R' - 0.3313G' + 0.5B'
342
343     Cr = 0.5R' - 0.4187G' - 0.0813B'
344
345 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
346 [-0.5…0.5]. This transform is identical to one defined in SMPTE
347 170M/BT.601. The Y'CbCr quantization is full range.
348
349
350 .. _col-bt2020:
351
352 Colorspace BT.2020 (V4L2_COLORSPACE_BT2020)
353 ===========================================
354
355 The :ref:`itu2020` standard defines the colorspace used by Ultra-high
356 definition television (UHDTV). The default transfer function is
357 ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is
358 ``V4L2_YCBCR_ENC_BT2020``. The default R'G'B' quantization is limited
359 range (!), and so is the default Y'CbCr quantization. The chromaticities
360 of the primary colors and the white reference are:
361
362
363
364 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
365
366 .. flat-table:: BT.2020 Chromaticities
367     :header-rows:  1
368     :stub-columns: 0
369     :widths:       1 1 2
370
371     * - Color
372       - x
373       - y
374     * - Red
375       - 0.708
376       - 0.292
377     * - Green
378       - 0.170
379       - 0.797
380     * - Blue
381       - 0.131
382       - 0.046
383     * - White Reference (D65)
384       - 0.3127
385       - 0.3290
386
387
388
389 Transfer function (same as Rec. 709):
390
391 .. math::
392
393     L' = 4.5L\text{, for }0 \le L < 0.018
394
395     L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1
396
397 Inverse Transfer function:
398
399 .. math::
400
401     L = L' / 4.5\text{, for } L' < 0.081
402
403     L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081
404
405 The luminance (Y') and color difference (Cb and Cr) are obtained with
406 the following ``V4L2_YCBCR_ENC_BT2020`` encoding:
407
408 .. math::
409
410     Y' = 0.2627R' + 0.6780G' + 0.0593B'
411
412     Cb = -0.1396R' - 0.3604G' + 0.5B'
413
414     Cr = 0.5R' - 0.4598G' - 0.0402B'
415
416 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
417 [-0.5…0.5]. The Y'CbCr quantization is limited range.
418
419 There is also an alternate constant luminance R'G'B' to Yc'CbcCrc
420 (``V4L2_YCBCR_ENC_BT2020_CONST_LUM``) encoding:
421
422 Luma:
423
424 .. math::
425     :nowrap:
426
427     \begin{align*}
428     Yc' = (0.2627R + 0.6780G + 0.0593B)'& \\
429     B' - Yc' \le 0:& \\
430         &Cbc = (B' - Yc') / 1.9404 \\
431     B' - Yc' > 0: & \\
432         &Cbc = (B' - Yc') / 1.5816 \\
433     R' - Yc' \le 0:& \\
434         &Crc = (R' - Y') / 1.7184 \\
435     R' - Yc' > 0:& \\
436         &Crc = (R' - Y') / 0.9936
437     \end{align*}
438
439 Yc' is clamped to the range [0…1] and Cbc and Crc are clamped to the
440 range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range.
441
442
443 .. _col-dcip3:
444
445 Colorspace DCI-P3 (V4L2_COLORSPACE_DCI_P3)
446 ==========================================
447
448 The :ref:`smpte431` standard defines the colorspace used by cinema
449 projectors that use the DCI-P3 colorspace. The default transfer function
450 is ``V4L2_XFER_FUNC_DCI_P3``. The default Y'CbCr encoding is
451 ``V4L2_YCBCR_ENC_709``. The default Y'CbCr quantization is limited range.
452
453 .. note::
454
455    Note that this colorspace standard does not specify a
456    Y'CbCr encoding since it is not meant to be encoded to Y'CbCr. So this
457    default Y'CbCr encoding was picked because it is the HDTV encoding.
458
459 The chromaticities of the primary colors and the white reference are:
460
461
462
463 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
464
465 .. flat-table:: DCI-P3 Chromaticities
466     :header-rows:  1
467     :stub-columns: 0
468     :widths:       1 1 2
469
470     * - Color
471       - x
472       - y
473     * - Red
474       - 0.6800
475       - 0.3200
476     * - Green
477       - 0.2650
478       - 0.6900
479     * - Blue
480       - 0.1500
481       - 0.0600
482     * - White Reference
483       - 0.3140
484       - 0.3510
485
486
487
488 Transfer function:
489
490 .. math::
491
492     L' = L^{\frac{1}{2.6}}
493
494 Inverse Transfer function:
495
496 .. math::
497
498     L = L'^{(2.6)}
499
500 Y'CbCr encoding is not specified. V4L2 defaults to Rec. 709.
501
502
503 .. _col-smpte-240m:
504
505 Colorspace SMPTE 240M (V4L2_COLORSPACE_SMPTE240M)
506 =================================================
507
508 The :ref:`smpte240m` standard was an interim standard used during the
509 early days of HDTV (1988-1998). It has been superseded by Rec. 709. The
510 default transfer function is ``V4L2_XFER_FUNC_SMPTE240M``. The default
511 Y'CbCr encoding is ``V4L2_YCBCR_ENC_SMPTE240M``. The default Y'CbCr
512 quantization is limited range. The chromaticities of the primary colors
513 and the white reference are:
514
515
516
517 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
518
519 .. flat-table:: SMPTE 240M Chromaticities
520     :header-rows:  1
521     :stub-columns: 0
522     :widths:       1 1 2
523
524     * - Color
525       - x
526       - y
527     * - Red
528       - 0.630
529       - 0.340
530     * - Green
531       - 0.310
532       - 0.595
533     * - Blue
534       - 0.155
535       - 0.070
536     * - White Reference (D65)
537       - 0.3127
538       - 0.3290
539
540
541 These chromaticities are identical to the SMPTE 170M colorspace.
542
543 Transfer function:
544
545 .. math::
546
547     L' = 4L\text{, for } 0 \le L < 0.0228
548
549     L' = 1.1115L ^{0.45} - 0.1115\text{, for } 0.0228 \le L \le 1
550
551 Inverse Transfer function:
552
553 .. math::
554
555     L = \frac{L'}{4}\text{, for } 0 \le L' < 0.0913
556
557     L = \left( \frac{L' + 0.1115}{1.1115}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.0913
558
559 The luminance (Y') and color difference (Cb and Cr) are obtained with
560 the following ``V4L2_YCBCR_ENC_SMPTE240M`` encoding:
561
562 .. math::
563
564     Y' = 0.2122R' + 0.7013G' + 0.0865B'
565
566     Cb = -0.1161R' - 0.3839G' + 0.5B'
567
568     Cr = 0.5R' - 0.4451G' - 0.0549B'
569
570 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the
571 range [-0.5…0.5]. The Y'CbCr quantization is limited range.
572
573
574 .. _col-sysm:
575
576 Colorspace NTSC 1953 (V4L2_COLORSPACE_470_SYSTEM_M)
577 ===================================================
578
579 This standard defines the colorspace used by NTSC in 1953. In practice
580 this colorspace is obsolete and SMPTE 170M should be used instead. The
581 default transfer function is ``V4L2_XFER_FUNC_709``. The default Y'CbCr
582 encoding is ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is
583 limited range. The chromaticities of the primary colors and the white
584 reference are:
585
586
587
588 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
589
590 .. flat-table:: NTSC 1953 Chromaticities
591     :header-rows:  1
592     :stub-columns: 0
593     :widths:       1 1 2
594
595     * - Color
596       - x
597       - y
598     * - Red
599       - 0.67
600       - 0.33
601     * - Green
602       - 0.21
603       - 0.71
604     * - Blue
605       - 0.14
606       - 0.08
607     * - White Reference (C)
608       - 0.310
609       - 0.316
610
611
612 .. note::
613
614    This colorspace uses Illuminant C instead of D65 as the white
615    reference. To correctly convert an image in this colorspace to another
616    that uses D65 you need to apply a chromatic adaptation algorithm such as
617    the Bradford method.
618
619 The transfer function was never properly defined for NTSC 1953. The Rec.
620 709 transfer function is recommended in the literature:
621
622 .. math::
623
624     L' = 4.5L\text{, for } 0 \le L < 0.018
625
626     L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1
627
628 Inverse Transfer function:
629
630 .. math::
631
632     L = \frac{L'}{4.5} \text{, for } L' < 0.081
633
634     L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081
635
636 The luminance (Y') and color difference (Cb and Cr) are obtained with
637 the following ``V4L2_YCBCR_ENC_601`` encoding:
638
639 .. math::
640
641     Y' = 0.2990R' + 0.5870G' + 0.1140B'
642
643     Cb = -0.1687R' - 0.3313G' + 0.5B'
644
645     Cr = 0.5R' - 0.4187G' - 0.0813B'
646
647 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
648 [-0.5…0.5]. The Y'CbCr quantization is limited range. This transform is
649 identical to one defined in SMPTE 170M/BT.601.
650
651
652 .. _col-sysbg:
653
654 Colorspace EBU Tech. 3213 (V4L2_COLORSPACE_470_SYSTEM_BG)
655 =========================================================
656
657 The :ref:`tech3213` standard defines the colorspace used by PAL/SECAM
658 in 1975. In practice this colorspace is obsolete and SMPTE 170M should
659 be used instead. The default transfer function is
660 ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is
661 ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited
662 range. The chromaticities of the primary colors and the white reference
663 are:
664
665
666
667 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
668
669 .. flat-table:: EBU Tech. 3213 Chromaticities
670     :header-rows:  1
671     :stub-columns: 0
672     :widths:       1 1 2
673
674     * - Color
675       - x
676       - y
677     * - Red
678       - 0.64
679       - 0.33
680     * - Green
681       - 0.29
682       - 0.60
683     * - Blue
684       - 0.15
685       - 0.06
686     * - White Reference (D65)
687       - 0.3127
688       - 0.3290
689
690
691
692 The transfer function was never properly defined for this colorspace.
693 The Rec. 709 transfer function is recommended in the literature:
694
695 .. math::
696
697     L' = 4.5L\text{, for } 0 \le L < 0.018
698
699     L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1
700
701 Inverse Transfer function:
702
703 .. math::
704
705     L = \frac{L'}{4.5} \text{, for } L' < 0.081
706
707     L = \left(\frac{L' + 0.099}{1.099} \right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081
708
709 The luminance (Y') and color difference (Cb and Cr) are obtained with
710 the following ``V4L2_YCBCR_ENC_601`` encoding:
711
712 .. math::
713
714     Y' = 0.2990R' + 0.5870G' + 0.1140B'
715
716     Cb = -0.1687R' - 0.3313G' + 0.5B'
717
718     Cr = 0.5R' - 0.4187G' - 0.0813B'
719
720 Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
721 [-0.5…0.5]. The Y'CbCr quantization is limited range. This transform is
722 identical to one defined in SMPTE 170M/BT.601.
723
724
725 .. _col-jpeg:
726
727 Colorspace JPEG (V4L2_COLORSPACE_JPEG)
728 ======================================
729
730 This colorspace defines the colorspace used by most (Motion-)JPEG
731 formats. The chromaticities of the primary colors and the white
732 reference are identical to sRGB. The transfer function use is
733 ``V4L2_XFER_FUNC_SRGB``. The Y'CbCr encoding is ``V4L2_YCBCR_ENC_601``
734 with full range quantization where Y' is scaled to [0…255] and Cb/Cr are
735 scaled to [-128…128] and then clipped to [-128…127].
736
737 .. note::
738
739    The JPEG standard does not actually store colorspace
740    information. So if something other than sRGB is used, then the driver
741    will have to set that information explicitly. Effectively
742    ``V4L2_COLORSPACE_JPEG`` can be considered to be an abbreviation for
743    ``V4L2_COLORSPACE_SRGB``, ``V4L2_YCBCR_ENC_601`` and
744    ``V4L2_QUANTIZATION_FULL_RANGE``.