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>V4L2_PIX_FMT_YUYV ('YUYV')</TITLE 6><META 7NAME="GENERATOR" 8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK 9REL="HOME" 10TITLE="Video for Linux Two API Specification" 11HREF="book1.htm"><LINK 12REL="UP" 13TITLE="YUV Formats" 14HREF="x3891.htm"><LINK 15REL="PREVIOUS" 16TITLE="V4L2_PIX_FMT_Y16 ('Y16 ')" 17HREF="r4246.htm"><LINK 18REL="NEXT" 19TITLE="V4L2_PIX_FMT_UYVY ('UYVY')" 20HREF="r4484.htm"></HEAD 21><BODY 22CLASS="REFENTRY" 23BGCOLOR="#FFFFFF" 24TEXT="#000000" 25LINK="#0000FF" 26VLINK="#840084" 27ALINK="#0000FF" 28><DIV 29CLASS="NAVHEADER" 30><TABLE 31SUMMARY="Header navigation table" 32WIDTH="100%" 33BORDER="0" 34CELLPADDING="0" 35CELLSPACING="0" 36><TR 37><TH 38COLSPAN="3" 39ALIGN="center" 40>Video for Linux Two API Specification: Revision 0.24</TH 41></TR 42><TR 43><TD 44WIDTH="10%" 45ALIGN="left" 46VALIGN="bottom" 47><A 48HREF="r4246.htm" 49ACCESSKEY="P" 50>Prev</A 51></TD 52><TD 53WIDTH="80%" 54ALIGN="center" 55VALIGN="bottom" 56></TD 57><TD 58WIDTH="10%" 59ALIGN="right" 60VALIGN="bottom" 61><A 62HREF="r4484.htm" 63ACCESSKEY="N" 64>Next</A 65></TD 66></TR 67></TABLE 68><HR 69ALIGN="LEFT" 70WIDTH="100%"></DIV 71><H1 72><A 73NAME="V4L2-PIX-FMT-YUYV" 74></A 75>V4L2_PIX_FMT_YUYV ('YUYV')</H1 76><DIV 77CLASS="REFNAMEDIV" 78><A 79NAME="AEN4343" 80></A 81><H2 82>Name</H2 83><CODE 84CLASS="CONSTANT" 85>V4L2_PIX_FMT_YUYV</CODE 86> -- Packed format with ½ horizontal chroma 87resolution, also known as YUV 4:2:2</DIV 88><DIV 89CLASS="REFSECT1" 90><A 91NAME="AEN4347" 92></A 93><H2 94>Description</H2 95><P 96>In this format each four bytes is two pixels. Each four 97bytes is two Y's, a Cb and a Cr. Each Y goes to one of the pixels, and 98the Cb and Cr belong to both pixels. As you can see, the Cr and Cb 99components have half the horizontal resolution of the Y component. 100<CODE 101CLASS="CONSTANT" 102>V4L2_PIX_FMT_YUYV </CODE 103> is known in the Windows 104environment as YUY2.</P 105><DIV 106CLASS="EXAMPLE" 107><A 108NAME="AEN4351" 109></A 110><P 111><B 112>Example 2-1. <CODE 113CLASS="CONSTANT" 114>V4L2_PIX_FMT_YUYV</CODE 115> 4 × 4 116pixel image</B 117></P 118><DIV 119CLASS="FORMALPARA" 120><P 121><B 122>Byte Order. </B 123>Each cell is one byte. 124 <DIV 125CLASS="INFORMALTABLE" 126><P 127></P 128><A 129NAME="AEN4357" 130></A 131><TABLE 132BORDER="0" 133FRAME="void" 134CLASS="CALSTABLE" 135><COL 136WIDTH="2*" 137ALIGN="LEFT"><COL><COL><COL><COL><COL><COL><COL><COL><TBODY 138VALIGN="TOP" 139><TR 140><TD 141>start + 0:</TD 142><TD 143>Y'<SUB 144>00</SUB 145></TD 146><TD 147>Cb<SUB 148>00</SUB 149></TD 150><TD 151>Y'<SUB 152>01</SUB 153></TD 154><TD 155>Cr<SUB 156>00</SUB 157></TD 158><TD 159>Y'<SUB 160>02</SUB 161></TD 162><TD 163>Cb<SUB 164>01</SUB 165></TD 166><TD 167>Y'<SUB 168>03</SUB 169></TD 170><TD 171>Cr<SUB 172>01</SUB 173></TD 174></TR 175><TR 176><TD 177>start + 8:</TD 178><TD 179>Y'<SUB 180>10</SUB 181></TD 182><TD 183>Cb<SUB 184>10</SUB 185></TD 186><TD 187>Y'<SUB 188>11</SUB 189></TD 190><TD 191>Cr<SUB 192>10</SUB 193></TD 194><TD 195>Y'<SUB 196>12</SUB 197></TD 198><TD 199>Cb<SUB 200>11</SUB 201></TD 202><TD 203>Y'<SUB 204>13</SUB 205></TD 206><TD 207>Cr<SUB 208>11</SUB 209></TD 210></TR 211><TR 212><TD 213>start + 16:</TD 214><TD 215>Y'<SUB 216>20</SUB 217></TD 218><TD 219>Cb<SUB 220>20</SUB 221></TD 222><TD 223>Y'<SUB 224>21</SUB 225></TD 226><TD 227>Cr<SUB 228>20</SUB 229></TD 230><TD 231>Y'<SUB 232>22</SUB 233></TD 234><TD 235>Cb<SUB 236>21</SUB 237></TD 238><TD 239>Y'<SUB 240>23</SUB 241></TD 242><TD 243>Cr<SUB 244>21</SUB 245></TD 246></TR 247><TR 248><TD 249>start + 24:</TD 250><TD 251>Y'<SUB 252>30</SUB 253></TD 254><TD 255>Cb<SUB 256>30</SUB 257></TD 258><TD 259>Y'<SUB 260>31</SUB 261></TD 262><TD 263>Cr<SUB 264>30</SUB 265></TD 266><TD 267>Y'<SUB 268>32</SUB 269></TD 270><TD 271>Cb<SUB 272>31</SUB 273></TD 274><TD 275>Y'<SUB 276>33</SUB 277></TD 278><TD 279>Cr<SUB 280>31</SUB 281></TD 282></TR 283></TBODY 284></TABLE 285><P 286></P 287></DIV 288> 289 </P 290></DIV 291><DIV 292CLASS="FORMALPARA" 293><P 294><B 295>Color Sample Location. </B 296> <DIV 297CLASS="INFORMALTABLE" 298><P 299></P 300><A 301NAME="AEN4436" 302></A 303><TABLE 304BORDER="0" 305FRAME="void" 306CLASS="CALSTABLE" 307><COL><COL><COL><COL><COL><COL><COL><TBODY 308VALIGN="TOP" 309><TR 310><TD 311> </TD 312><TD 313>0</TD 314><TD 315> </TD 316><TD 317>1</TD 318><TD 319> </TD 320><TD 321>2</TD 322><TD 323> </TD 324><TD 325>3</TD 326></TR 327><TR 328><TD 329>0</TD 330><TD 331>Y</TD 332><TD 333>C</TD 334><TD 335>Y</TD 336><TD 337> </TD 338><TD 339>Y</TD 340><TD 341>C</TD 342><TD 343>Y</TD 344></TR 345><TR 346><TD 347>1</TD 348><TD 349>Y</TD 350><TD 351>C</TD 352><TD 353>Y</TD 354><TD 355> </TD 356><TD 357>Y</TD 358><TD 359>C</TD 360><TD 361>Y</TD 362></TR 363><TR 364><TD 365>2</TD 366><TD 367>Y</TD 368><TD 369>C</TD 370><TD 371>Y</TD 372><TD 373> </TD 374><TD 375>Y</TD 376><TD 377>C</TD 378><TD 379>Y</TD 380></TR 381><TR 382><TD 383>3</TD 384><TD 385>Y</TD 386><TD 387>C</TD 388><TD 389>Y</TD 390><TD 391> </TD 392><TD 393>Y</TD 394><TD 395>C</TD 396><TD 397>Y</TD 398></TR 399></TBODY 400></TABLE 401><P 402></P 403></DIV 404> 405 </P 406></DIV 407></DIV 408></DIV 409><DIV 410CLASS="NAVFOOTER" 411><HR 412ALIGN="LEFT" 413WIDTH="100%"><TABLE 414SUMMARY="Footer navigation table" 415WIDTH="100%" 416BORDER="0" 417CELLPADDING="0" 418CELLSPACING="0" 419><TR 420><TD 421WIDTH="33%" 422ALIGN="left" 423VALIGN="top" 424><A 425HREF="r4246.htm" 426ACCESSKEY="P" 427>Prev</A 428></TD 429><TD 430WIDTH="34%" 431ALIGN="center" 432VALIGN="top" 433><A 434HREF="book1.htm" 435ACCESSKEY="H" 436>Home</A 437></TD 438><TD 439WIDTH="33%" 440ALIGN="right" 441VALIGN="top" 442><A 443HREF="r4484.htm" 444ACCESSKEY="N" 445>Next</A 446></TD 447></TR 448><TR 449><TD 450WIDTH="33%" 451ALIGN="left" 452VALIGN="top" 453>V4L2_PIX_FMT_Y16 ('Y16 ')</TD 454><TD 455WIDTH="34%" 456ALIGN="center" 457VALIGN="top" 458><A 459HREF="x3891.htm" 460ACCESSKEY="U" 461>Up</A 462></TD 463><TD 464WIDTH="33%" 465ALIGN="right" 466VALIGN="top" 467>V4L2_PIX_FMT_UYVY ('UYVY')</TD 468></TR 469></TABLE 470></DIV 471></BODY 472></HTML 473> 474