Home | History | Annotate | Download | only in spec
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
      2 <HTML
      3 ><HEAD
      4 ><TITLE
      5 >Colorspaces</TITLE
      6 ><META
      7 NAME="GENERATOR"
      8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
      9 REL="HOME"
     10 TITLE="Video for Linux Two API Specification"
     11 HREF="book1.htm"><LINK
     12 REL="UP"
     13 TITLE="Image Formats"
     14 HREF="c2030.htm"><LINK
     15 REL="PREVIOUS"
     16 TITLE="Image Formats"
     17 HREF="c2030.htm"><LINK
     18 REL="NEXT"
     19 TITLE="Indexed Format"
     20 HREF="x2428.htm"></HEAD
     21 ><BODY
     22 CLASS="SECTION"
     23 BGCOLOR="#FFFFFF"
     24 TEXT="#000000"
     25 LINK="#0000FF"
     26 VLINK="#840084"
     27 ALINK="#0000FF"
     28 ><DIV
     29 CLASS="NAVHEADER"
     30 ><TABLE
     31 SUMMARY="Header navigation table"
     32 WIDTH="100%"
     33 BORDER="0"
     34 CELLPADDING="0"
     35 CELLSPACING="0"
     36 ><TR
     37 ><TH
     38 COLSPAN="3"
     39 ALIGN="center"
     40 >Video for Linux Two API Specification: Revision 0.24</TH
     41 ></TR
     42 ><TR
     43 ><TD
     44 WIDTH="10%"
     45 ALIGN="left"
     46 VALIGN="bottom"
     47 ><A
     48 HREF="c2030.htm"
     49 ACCESSKEY="P"
     50 >Prev</A
     51 ></TD
     52 ><TD
     53 WIDTH="80%"
     54 ALIGN="center"
     55 VALIGN="bottom"
     56 >Chapter 2. Image Formats</TD
     57 ><TD
     58 WIDTH="10%"
     59 ALIGN="right"
     60 VALIGN="bottom"
     61 ><A
     62 HREF="x2428.htm"
     63 ACCESSKEY="N"
     64 >Next</A
     65 ></TD
     66 ></TR
     67 ></TABLE
     68 ><HR
     69 ALIGN="LEFT"
     70 WIDTH="100%"></DIV
     71 ><DIV
     72 CLASS="SECTION"
     73 ><H1
     74 CLASS="SECTION"
     75 ><A
     76 NAME="COLORSPACES"
     77 >2.2. Colorspaces</A
     78 ></H1
     79 ><P
     80 >[intro]</P
     81 ><P
     82 >      <P
     83 ></P
     84 ><DIV
     85 CLASS="VARIABLELIST"
     86 ><DL
     87 ><DT
     88 >Gamma Correction</DT
     89 ><DD
     90 ><P
     91 >[to do]</P
     92 ><P
     93 >E'<SUB
     94 >R</SUB
     95 > = f(R)</P
     96 ><P
     97 >E'<SUB
     98 >G</SUB
     99 > = f(G)</P
    100 ><P
    101 >E'<SUB
    102 >B</SUB
    103 > = f(B)</P
    104 ></DD
    105 ><DT
    106 >Construction of luminance and color-difference
    107 signals</DT
    108 ><DD
    109 ><P
    110 >[to do]</P
    111 ><P
    112 >E'<SUB
    113 >Y</SUB
    114 > =
    115 Coeff<SUB
    116 >R</SUB
    117 > E'<SUB
    118 >R</SUB
    119 >
    120 + Coeff<SUB
    121 >G</SUB
    122 > E'<SUB
    123 >G</SUB
    124 >
    125 + Coeff<SUB
    126 >B</SUB
    127 > E'<SUB
    128 >B</SUB
    129 ></P
    130 ><P
    131 >(E'<SUB
    132 >R</SUB
    133 > - E'<SUB
    134 >Y</SUB
    135 >) = E'<SUB
    136 >R</SUB
    137 >
    138 - Coeff<SUB
    139 >R</SUB
    140 > E'<SUB
    141 >R</SUB
    142 >
    143 - Coeff<SUB
    144 >G</SUB
    145 > E'<SUB
    146 >G</SUB
    147 >
    148 - Coeff<SUB
    149 >B</SUB
    150 > E'<SUB
    151 >B</SUB
    152 ></P
    153 ><P
    154 >(E'<SUB
    155 >B</SUB
    156 > - E'<SUB
    157 >Y</SUB
    158 >) = E'<SUB
    159 >B</SUB
    160 >
    161 - Coeff<SUB
    162 >R</SUB
    163 > E'<SUB
    164 >R</SUB
    165 >
    166 - Coeff<SUB
    167 >G</SUB
    168 > E'<SUB
    169 >G</SUB
    170 >
    171 - Coeff<SUB
    172 >B</SUB
    173 > E'<SUB
    174 >B</SUB
    175 ></P
    176 ></DD
    177 ><DT
    178 >Re-normalized color-difference signals</DT
    179 ><DD
    180 ><P
    181 >The color-difference signals are scaled back to unity
    182 range [-0.5;+0.5]:</P
    183 ><P
    184 >K<SUB
    185 >B</SUB
    186 > = 0.5 / (1 - Coeff<SUB
    187 >B</SUB
    188 >)</P
    189 ><P
    190 >K<SUB
    191 >R</SUB
    192 > = 0.5 / (1 - Coeff<SUB
    193 >R</SUB
    194 >)</P
    195 ><P
    196 >P<SUB
    197 >B</SUB
    198 > =
    199 K<SUB
    200 >B</SUB
    201 > (E'<SUB
    202 >B</SUB
    203 > - E'<SUB
    204 >Y</SUB
    205 >) =
    206   0.5 (Coeff<SUB
    207 >R</SUB
    208 > / Coeff<SUB
    209 >B</SUB
    210 >) E'<SUB
    211 >R</SUB
    212 >
    213 + 0.5 (Coeff<SUB
    214 >G</SUB
    215 > / Coeff<SUB
    216 >B</SUB
    217 >) E'<SUB
    218 >G</SUB
    219 >
    220 + 0.5 E'<SUB
    221 >B</SUB
    222 ></P
    223 ><P
    224 >P<SUB
    225 >R</SUB
    226 > =
    227 K<SUB
    228 >R</SUB
    229 > (E'<SUB
    230 >R</SUB
    231 > - E'<SUB
    232 >Y</SUB
    233 >) =
    234   0.5 E'<SUB
    235 >R</SUB
    236 >
    237 + 0.5 (Coeff<SUB
    238 >G</SUB
    239 > / Coeff<SUB
    240 >R</SUB
    241 >) E'<SUB
    242 >G</SUB
    243 >
    244 + 0.5 (Coeff<SUB
    245 >B</SUB
    246 > / Coeff<SUB
    247 >R</SUB
    248 >) E'<SUB
    249 >B</SUB
    250 ></P
    251 ></DD
    252 ><DT
    253 >Quantization</DT
    254 ><DD
    255 ><P
    256 >[to do]</P
    257 ><P
    258 >Y' = (Lum. Levels - 1) &middot; E'<SUB
    259 >Y</SUB
    260 > + Lum. Offset</P
    261 ><P
    262 >C<SUB
    263 >B</SUB
    264 > = (Chrom. Levels - 1)
    265 &middot; P<SUB
    266 >B</SUB
    267 > + Chrom. Offset</P
    268 ><P
    269 >C<SUB
    270 >R</SUB
    271 > = (Chrom. Levels - 1)
    272 &middot; P<SUB
    273 >R</SUB
    274 > + Chrom. Offset</P
    275 ><P
    276 >Rounding to the nearest integer and clamping to the range
    277 [0;255] finally yields the digital color components Y'CbCr
    278 stored in YUV images.</P
    279 ></DD
    280 ></DL
    281 ></DIV
    282 >
    283     </P
    284 ><DIV
    285 CLASS="EXAMPLE"
    286 ><A
    287 NAME="AEN2217"
    288 ></A
    289 ><P
    290 ><B
    291 >Example 2-1. ITU-R Rec. BT.601 color conversion</B
    292 ></P
    293 ><P
    294 >Forward Transformation</P
    295 ><PRE
    296 CLASS="PROGRAMLISTING"
    297 >int ER, EG, EB;         /* gamma corrected RGB input [0;255] */
    298 int Y1, Cb, Cr;         /* output [0;255] */
    299 
    300 double r, g, b;         /* temporaries */
    301 double y1, pb, pr;
    302 
    303 int
    304 clamp (double x)
    305 {
    306         int r = x;      /* round to nearest */
    307 
    308         if (r &lt; 0)         return 0;
    309         else if (r &gt; 255)  return 255;
    310         else               return r;
    311 }
    312 
    313 r = ER / 255.0;
    314 g = EG / 255.0;
    315 b = EB / 255.0;
    316 
    317 y1  =  0.299  * r + 0.587 * g + 0.114  * b;
    318 pb  = -0.169  * r - 0.331 * g + 0.5    * b;
    319 pr  =  0.5    * r - 0.419 * g - 0.081  * b;
    320 
    321 Y1 = clamp (219 * y1 + 16);
    322 Cb = clamp (224 * pb + 128);
    323 Cr = clamp (224 * pr + 128);
    324 
    325 /* or shorter */
    326 
    327 y1 = 0.299 * ER + 0.587 * EG + 0.114 * EB;
    328 
    329 Y1 = clamp ( (219 / 255.0)                    *       y1  + 16);
    330 Cb = clamp (((224 / 255.0) / (2 - 2 * 0.114)) * (EB - y1) + 128);
    331 Cr = clamp (((224 / 255.0) / (2 - 2 * 0.299)) * (ER - y1) + 128);
    332       </PRE
    333 ><P
    334 >Inverse Transformation</P
    335 ><PRE
    336 CLASS="PROGRAMLISTING"
    337 >int Y1, Cb, Cr;         /* gamma pre-corrected input [0;255] */
    338 int ER, EG, EB;         /* output [0;255] */
    339 
    340 double r, g, b;         /* temporaries */
    341 double y1, pb, pr;
    342 
    343 int
    344 clamp (double x)
    345 {
    346         int r = x;      /* round to nearest */
    347 
    348         if (r &lt; 0)         return 0;
    349         else if (r &gt; 255)  return 255;
    350         else               return r;
    351 }
    352 
    353 y1 = (255 / 219.0) * (Y1 - 16);
    354 pb = (255 / 224.0) * (Cb - 128);
    355 pr = (255 / 224.0) * (Cr - 128);
    356 
    357 r = 1.0 * y1 + 0     * pb + 1.402 * pr;
    358 g = 1.0 * y1 - 0.344 * pb - 0.714 * pr;
    359 b = 1.0 * y1 + 1.772 * pb + 0     * pr;
    360 
    361 ER = clamp (r * 255); /* [ok? one should prob. limit y1,pb,pr] */
    362 EG = clamp (g * 255);
    363 EB = clamp (b * 255);
    364       </PRE
    365 ></DIV
    366 ><DIV
    367 CLASS="TABLE"
    368 ><A
    369 NAME="V4L2-COLORSPACE"
    370 ></A
    371 ><P
    372 ><B
    373 >Table 2-2. enum v4l2_colorspace</B
    374 ></P
    375 ><TABLE
    376 BORDER="1"
    377 WIDTH="100%"
    378 CLASS="CALSTABLE"
    379 ><COL
    380 WIDTH="9%"
    381 ALIGN="LEFT"><COL
    382 WIDTH="9%"
    383 ALIGN="CENTER"><COL
    384 WIDTH="9%"
    385 ALIGN="LEFT"><COL
    386 WIDTH="9%"
    387 TITLE="CR"><COL
    388 WIDTH="9%"
    389 TITLE="CG"><COL
    390 WIDTH="9%"
    391 TITLE="CB"><COL
    392 WIDTH="9%"
    393 TITLE="WP"><COL
    394 WIDTH="9%"
    395 TITLE="GC"><COL
    396 WIDTH="9%"
    397 TITLE="LUM"><COL
    398 WIDTH="9%"
    399 TITLE="QY"><COL
    400 WIDTH="9%"
    401 TITLE="QC"><THEAD
    402 ><TR
    403 ><TH
    404 ROWSPAN="2"
    405 >Identifier</TH
    406 ><TH
    407 ROWSPAN="2"
    408 >Value</TH
    409 ><TH
    410 ROWSPAN="2"
    411 >Description</TH
    412 ><TH
    413 COLSPAN="3"
    414 >Chromaticities<A
    415 NAME="AEN2246"
    416 HREF="x2123.htm#FTN.AEN2246"
    417 ><SPAN
    418 CLASS="footnote"
    419 >[a]</SPAN
    420 ></A
    421 ></TH
    422 ><TH
    423 ROWSPAN="2"
    424 >White Point</TH
    425 ><TH
    426 ROWSPAN="2"
    427 >Gamma Correction</TH
    428 ><TH
    429 ROWSPAN="2"
    430 >Luminance E'<SUB
    431 >Y</SUB
    432 ></TH
    433 ><TH
    434 COLSPAN="2"
    435 >Quantization</TH
    436 ></TR
    437 ><TR
    438 ><TH
    439 >Red</TH
    440 ><TH
    441 >Green</TH
    442 ><TH
    443 >Blue</TH
    444 ><TH
    445 >Y'</TH
    446 ><TH
    447 >Cb, Cr</TH
    448 ></TR
    449 ></THEAD
    450 ><TBODY
    451 VALIGN="TOP"
    452 ><TR
    453 ><TD
    454 ><CODE
    455 CLASS="CONSTANT"
    456 >V4L2_COLORSPACE_SMPTE170M</CODE
    457 ></TD
    458 ><TD
    459 >1</TD
    460 ><TD
    461 >NTSC/PAL according to <A
    462 HREF="b17127.htm#SMPTE170M"
    463 ><ABBR
    464 CLASS="ABBREV"
    465 >SMPTE&nbsp;170M</ABBR
    466 ></A
    467 >,
    468 <A
    469 HREF="b17127.htm#ITU601"
    470 ><ABBR
    471 CLASS="ABBREV"
    472 >ITU&nbsp;BT.601</ABBR
    473 ></A
    474 ></TD
    475 ><TD
    476 >x&nbsp;=&nbsp;0.630, y&nbsp;=&nbsp;0.340</TD
    477 ><TD
    478 >x&nbsp;=&nbsp;0.310, y&nbsp;=&nbsp;0.595</TD
    479 ><TD
    480 >x&nbsp;=&nbsp;0.155, y&nbsp;=&nbsp;0.070</TD
    481 ><TD
    482 >x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290,
    483             Illuminant D<SUB
    484 >65</SUB
    485 ></TD
    486 ><TD
    487 >E' = 4.5&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.018,
    488 1.099&nbsp;I<SUP
    489 >0.45</SUP
    490 >&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&lt;&nbsp;I</TD
    491 ><TD
    492 >0.299&nbsp;E'<SUB
    493 >R</SUB
    494 >
    495 +&nbsp;0.587&nbsp;E'<SUB
    496 >G</SUB
    497 >
    498 +&nbsp;0.114&nbsp;E'<SUB
    499 >B</SUB
    500 ></TD
    501 ><TD
    502 >219&nbsp;E'<SUB
    503 >Y</SUB
    504 >&nbsp;+&nbsp;16</TD
    505 ><TD
    506 >224&nbsp;P<SUB
    507 >B,R</SUB
    508 >&nbsp;+&nbsp;128</TD
    509 ></TR
    510 ><TR
    511 ><TD
    512 ><CODE
    513 CLASS="CONSTANT"
    514 >V4L2_COLORSPACE_SMPTE240M</CODE
    515 ></TD
    516 ><TD
    517 >2</TD
    518 ><TD
    519 >1125-Line (US) HDTV, see <A
    520 HREF="b17127.htm#SMPTE240M"
    521 ><ABBR
    522 CLASS="ABBREV"
    523 >SMPTE&nbsp;240M</ABBR
    524 ></A
    525 ></TD
    526 ><TD
    527 >x&nbsp;=&nbsp;0.630, y&nbsp;=&nbsp;0.340</TD
    528 ><TD
    529 >x&nbsp;=&nbsp;0.310, y&nbsp;=&nbsp;0.595</TD
    530 ><TD
    531 >x&nbsp;=&nbsp;0.155, y&nbsp;=&nbsp;0.070</TD
    532 ><TD
    533 >x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290,
    534             Illuminant D<SUB
    535 >65</SUB
    536 ></TD
    537 ><TD
    538 >E' = 4&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.0228,
    539 1.1115&nbsp;I<SUP
    540 >0.45</SUP
    541 >&nbsp;-&nbsp;0.1115&nbsp;for&nbsp;0.0228&nbsp;&lt;&nbsp;I</TD
    542 ><TD
    543 >0.212&nbsp;E'<SUB
    544 >R</SUB
    545 >
    546 +&nbsp;0.701&nbsp;E'<SUB
    547 >G</SUB
    548 >
    549 +&nbsp;0.087&nbsp;E'<SUB
    550 >B</SUB
    551 ></TD
    552 ><TD
    553 >219&nbsp;E'<SUB
    554 >Y</SUB
    555 >&nbsp;+&nbsp;16</TD
    556 ><TD
    557 >224&nbsp;P<SUB
    558 >B,R</SUB
    559 >&nbsp;+&nbsp;128</TD
    560 ></TR
    561 ><TR
    562 ><TD
    563 ><CODE
    564 CLASS="CONSTANT"
    565 >V4L2_COLORSPACE_REC709</CODE
    566 ></TD
    567 ><TD
    568 >3</TD
    569 ><TD
    570 >HDTV and modern devices, see <A
    571 HREF="b17127.htm#ITU709"
    572 ><ABBR
    573 CLASS="ABBREV"
    574 >ITU&nbsp;BT.709</ABBR
    575 ></A
    576 ></TD
    577 ><TD
    578 >x&nbsp;=&nbsp;0.640, y&nbsp;=&nbsp;0.330</TD
    579 ><TD
    580 >x&nbsp;=&nbsp;0.300, y&nbsp;=&nbsp;0.600</TD
    581 ><TD
    582 >x&nbsp;=&nbsp;0.150, y&nbsp;=&nbsp;0.060</TD
    583 ><TD
    584 >x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290,
    585             Illuminant D<SUB
    586 >65</SUB
    587 ></TD
    588 ><TD
    589 >E' = 4.5&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.018,
    590 1.099&nbsp;I<SUP
    591 >0.45</SUP
    592 >&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&lt;&nbsp;I</TD
    593 ><TD
    594 >0.2125&nbsp;E'<SUB
    595 >R</SUB
    596 >
    597 +&nbsp;0.7154&nbsp;E'<SUB
    598 >G</SUB
    599 >
    600 +&nbsp;0.0721&nbsp;E'<SUB
    601 >B</SUB
    602 ></TD
    603 ><TD
    604 >219&nbsp;E'<SUB
    605 >Y</SUB
    606 >&nbsp;+&nbsp;16</TD
    607 ><TD
    608 >224&nbsp;P<SUB
    609 >B,R</SUB
    610 >&nbsp;+&nbsp;128</TD
    611 ></TR
    612 ><TR
    613 ><TD
    614 ><CODE
    615 CLASS="CONSTANT"
    616 >V4L2_COLORSPACE_BT878</CODE
    617 ></TD
    618 ><TD
    619 >4</TD
    620 ><TD
    621 >Broken Bt878 extents<A
    622 NAME="AEN2329"
    623 HREF="x2123.htm#FTN.AEN2329"
    624 ><SPAN
    625 CLASS="footnote"
    626 >[b]</SPAN
    627 ></A
    628 >, <A
    629 HREF="b17127.htm#ITU601"
    630 ><ABBR
    631 CLASS="ABBREV"
    632 >ITU&nbsp;BT.601</ABBR
    633 ></A
    634 ></TD
    635 ><TD
    636 >?</TD
    637 ><TD
    638 >?</TD
    639 ><TD
    640 >?</TD
    641 ><TD
    642 >?</TD
    643 ><TD
    644 >?</TD
    645 ><TD
    646 >0.299&nbsp;E'<SUB
    647 >R</SUB
    648 >
    649 +&nbsp;0.587&nbsp;E'<SUB
    650 >G</SUB
    651 >
    652 +&nbsp;0.114&nbsp;E'<SUB
    653 >B</SUB
    654 ></TD
    655 ><TD
    656 ><SPAN
    657 CLASS="emphasis"
    658 ><I
    659 CLASS="EMPHASIS"
    660 >237</I
    661 ></SPAN
    662 >&nbsp;E'<SUB
    663 >Y</SUB
    664 >&nbsp;+&nbsp;16</TD
    665 ><TD
    666 >224&nbsp;P<SUB
    667 >B,R</SUB
    668 >&nbsp;+&nbsp;128 (probably)</TD
    669 ></TR
    670 ><TR
    671 ><TD
    672 ><CODE
    673 CLASS="CONSTANT"
    674 >V4L2_COLORSPACE_470_SYSTEM_M</CODE
    675 ></TD
    676 ><TD
    677 >5</TD
    678 ><TD
    679 >M/NTSC<A
    680 NAME="AEN2352"
    681 HREF="x2123.htm#FTN.AEN2352"
    682 ><SPAN
    683 CLASS="footnote"
    684 >[c]</SPAN
    685 ></A
    686 > according to <A
    687 HREF="b17127.htm#ITU470"
    688 ><ABBR
    689 CLASS="ABBREV"
    690 >ITU&nbsp;BT.470</ABBR
    691 ></A
    692 >, <A
    693 HREF="b17127.htm#ITU601"
    694 ><ABBR
    695 CLASS="ABBREV"
    696 >ITU&nbsp;BT.601</ABBR
    697 ></A
    698 ></TD
    699 ><TD
    700 >x&nbsp;=&nbsp;0.67, y&nbsp;=&nbsp;0.33</TD
    701 ><TD
    702 >x&nbsp;=&nbsp;0.21, y&nbsp;=&nbsp;0.71</TD
    703 ><TD
    704 >x&nbsp;=&nbsp;0.14, y&nbsp;=&nbsp;0.08</TD
    705 ><TD
    706 >x&nbsp;=&nbsp;0.310, y&nbsp;=&nbsp;0.316, Illuminant C</TD
    707 ><TD
    708 >?</TD
    709 ><TD
    710 >0.299&nbsp;E'<SUB
    711 >R</SUB
    712 >
    713 +&nbsp;0.587&nbsp;E'<SUB
    714 >G</SUB
    715 >
    716 +&nbsp;0.114&nbsp;E'<SUB
    717 >B</SUB
    718 ></TD
    719 ><TD
    720 >219&nbsp;E'<SUB
    721 >Y</SUB
    722 >&nbsp;+&nbsp;16</TD
    723 ><TD
    724 >224&nbsp;P<SUB
    725 >B,R</SUB
    726 >&nbsp;+&nbsp;128</TD
    727 ></TR
    728 ><TR
    729 ><TD
    730 ><CODE
    731 CLASS="CONSTANT"
    732 >V4L2_COLORSPACE_470_SYSTEM_BG</CODE
    733 ></TD
    734 ><TD
    735 >6</TD
    736 ><TD
    737 >625-line PAL and SECAM systems according to <A
    738 HREF="b17127.htm#ITU470"
    739 ><ABBR
    740 CLASS="ABBREV"
    741 >ITU&nbsp;BT.470</ABBR
    742 ></A
    743 >, <A
    744 HREF="b17127.htm#ITU601"
    745 ><ABBR
    746 CLASS="ABBREV"
    747 >ITU&nbsp;BT.601</ABBR
    748 ></A
    749 ></TD
    750 ><TD
    751 >x&nbsp;=&nbsp;0.64, y&nbsp;=&nbsp;0.33</TD
    752 ><TD
    753 >x&nbsp;=&nbsp;0.29, y&nbsp;=&nbsp;0.60</TD
    754 ><TD
    755 >x&nbsp;=&nbsp;0.15, y&nbsp;=&nbsp;0.06</TD
    756 ><TD
    757 >x&nbsp;=&nbsp;0.313, y&nbsp;=&nbsp;0.329,
    758 Illuminant D<SUB
    759 >65</SUB
    760 ></TD
    761 ><TD
    762 >?</TD
    763 ><TD
    764 >0.299&nbsp;E'<SUB
    765 >R</SUB
    766 >
    767 +&nbsp;0.587&nbsp;E'<SUB
    768 >G</SUB
    769 >
    770 +&nbsp;0.114&nbsp;E'<SUB
    771 >B</SUB
    772 ></TD
    773 ><TD
    774 >219&nbsp;E'<SUB
    775 >Y</SUB
    776 >&nbsp;+&nbsp;16</TD
    777 ><TD
    778 >224&nbsp;P<SUB
    779 >B,R</SUB
    780 >&nbsp;+&nbsp;128</TD
    781 ></TR
    782 ><TR
    783 ><TD
    784 ><CODE
    785 CLASS="CONSTANT"
    786 >V4L2_COLORSPACE_JPEG</CODE
    787 ></TD
    788 ><TD
    789 >7</TD
    790 ><TD
    791 >JPEG Y'CbCr, see <A
    792 HREF="b17127.htm#JFIF"
    793 ><ABBR
    794 CLASS="ABBREV"
    795 >JFIF</ABBR
    796 ></A
    797 >, <A
    798 HREF="b17127.htm#ITU601"
    799 ><ABBR
    800 CLASS="ABBREV"
    801 >ITU&nbsp;BT.601</ABBR
    802 ></A
    803 ></TD
    804 ><TD
    805 >?</TD
    806 ><TD
    807 >?</TD
    808 ><TD
    809 >?</TD
    810 ><TD
    811 >?</TD
    812 ><TD
    813 >?</TD
    814 ><TD
    815 >0.299&nbsp;E'<SUB
    816 >R</SUB
    817 >
    818 +&nbsp;0.587&nbsp;E'<SUB
    819 >G</SUB
    820 >
    821 +&nbsp;0.114&nbsp;E'<SUB
    822 >B</SUB
    823 ></TD
    824 ><TD
    825 >256&nbsp;E'<SUB
    826 >Y</SUB
    827 >&nbsp;+&nbsp;16<A
    828 NAME="AEN2408"
    829 HREF="x2123.htm#FTN.AEN2408"
    830 ><SPAN
    831 CLASS="footnote"
    832 >[d]</SPAN
    833 ></A
    834 ></TD
    835 ><TD
    836 >256&nbsp;P<SUB
    837 >B,R</SUB
    838 >&nbsp;+&nbsp;128</TD
    839 ></TR
    840 ><TR
    841 ><TD
    842 ><CODE
    843 CLASS="CONSTANT"
    844 >V4L2_COLORSPACE_SRGB</CODE
    845 ></TD
    846 ><TD
    847 >8</TD
    848 ><TD
    849 >[?]</TD
    850 ><TD
    851 >x&nbsp;=&nbsp;0.640, y&nbsp;=&nbsp;0.330</TD
    852 ><TD
    853 >x&nbsp;=&nbsp;0.300, y&nbsp;=&nbsp;0.600</TD
    854 ><TD
    855 >x&nbsp;=&nbsp;0.150, y&nbsp;=&nbsp;0.060</TD
    856 ><TD
    857 >x&nbsp;=&nbsp;0.3127, y&nbsp;=&nbsp;0.3290,
    858             Illuminant D<SUB
    859 >65</SUB
    860 ></TD
    861 ><TD
    862 >E' = 4.5&nbsp;I&nbsp;for&nbsp;I&nbsp;&le;0.018,
    863 1.099&nbsp;I<SUP
    864 >0.45</SUP
    865 >&nbsp;-&nbsp;0.099&nbsp;for&nbsp;0.018&nbsp;&lt;&nbsp;I</TD
    866 ><TD
    867 COLSPAN="3"
    868 >n/a</TD
    869 ></TR
    870 ></TBODY
    871 ><TR
    872 ><TD
    873 COLSPAN="11"
    874 >Notes:<BR><A
    875 NAME="FTN.AEN2246"
    876 >a. </A
    877 >The coordinates of the color primaries are
    878 given in the CIE system (1931)<BR><A
    879 NAME="FTN.AEN2329"
    880 >b. </A
    881 >The ubiquitous Bt878 video capture chip
    882 quantizes E'<SUB
    883 >Y</SUB
    884 > to 238 levels, yielding a range
    885 of Y' = 16 &hellip; 253, unlike Rec. 601 Y' = 16 &hellip;
    886 235. This is not a typo in the Bt878 documentation, it has been
    887 implemented in silicon. The chroma extents are unclear.<BR><A
    888 NAME="FTN.AEN2352"
    889 >c. </A
    890 >No identifier exists for M/PAL which uses
    891 the chromaticities of M/NTSC, the remaining parameters are equal to B and
    892 G/PAL.<BR><A
    893 NAME="FTN.AEN2408"
    894 >d. </A
    895 >Note JFIF quantizes
    896 Y'P<SUB
    897 >B</SUB
    898 >P<SUB
    899 >R</SUB
    900 > in range [0;+1] and
    901 [-0.5;+0.5] to <SPAN
    902 CLASS="emphasis"
    903 ><I
    904 CLASS="EMPHASIS"
    905 >257</I
    906 ></SPAN
    907 > levels, however Y'CbCr signals
    908 are still clamped to [0;255].<BR></TD
    909 ></TR
    910 ></TABLE
    911 ></DIV
    912 ></DIV
    913 ><DIV
    914 CLASS="NAVFOOTER"
    915 ><HR
    916 ALIGN="LEFT"
    917 WIDTH="100%"><TABLE
    918 SUMMARY="Footer navigation table"
    919 WIDTH="100%"
    920 BORDER="0"
    921 CELLPADDING="0"
    922 CELLSPACING="0"
    923 ><TR
    924 ><TD
    925 WIDTH="33%"
    926 ALIGN="left"
    927 VALIGN="top"
    928 ><A
    929 HREF="c2030.htm"
    930 ACCESSKEY="P"
    931 >Prev</A
    932 ></TD
    933 ><TD
    934 WIDTH="34%"
    935 ALIGN="center"
    936 VALIGN="top"
    937 ><A
    938 HREF="book1.htm"
    939 ACCESSKEY="H"
    940 >Home</A
    941 ></TD
    942 ><TD
    943 WIDTH="33%"
    944 ALIGN="right"
    945 VALIGN="top"
    946 ><A
    947 HREF="x2428.htm"
    948 ACCESSKEY="N"
    949 >Next</A
    950 ></TD
    951 ></TR
    952 ><TR
    953 ><TD
    954 WIDTH="33%"
    955 ALIGN="left"
    956 VALIGN="top"
    957 >Image Formats</TD
    958 ><TD
    959 WIDTH="34%"
    960 ALIGN="center"
    961 VALIGN="top"
    962 ><A
    963 HREF="c2030.htm"
    964 ACCESSKEY="U"
    965 >Up</A
    966 ></TD
    967 ><TD
    968 WIDTH="33%"
    969 ALIGN="right"
    970 VALIGN="top"
    971 >Indexed Format</TD
    972 ></TR
    973 ></TABLE
    974 ></DIV
    975 ></BODY
    976 ></HTML
    977 >
    978