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 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="YUV Formats" 14 HREF="x3891.htm"><LINK 15 REL="PREVIOUS" 16 TITLE="V4L2_PIX_FMT_Y16 ('Y16 ')" 17 HREF="r4246.htm"><LINK 18 REL="NEXT" 19 TITLE="V4L2_PIX_FMT_UYVY ('UYVY')" 20 HREF="r4484.htm"></HEAD 21 ><BODY 22 CLASS="REFENTRY" 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="r4246.htm" 49 ACCESSKEY="P" 50 >Prev</A 51 ></TD 52 ><TD 53 WIDTH="80%" 54 ALIGN="center" 55 VALIGN="bottom" 56 ></TD 57 ><TD 58 WIDTH="10%" 59 ALIGN="right" 60 VALIGN="bottom" 61 ><A 62 HREF="r4484.htm" 63 ACCESSKEY="N" 64 >Next</A 65 ></TD 66 ></TR 67 ></TABLE 68 ><HR 69 ALIGN="LEFT" 70 WIDTH="100%"></DIV 71 ><H1 72 ><A 73 NAME="V4L2-PIX-FMT-YUYV" 74 ></A 75 >V4L2_PIX_FMT_YUYV ('YUYV')</H1 76 ><DIV 77 CLASS="REFNAMEDIV" 78 ><A 79 NAME="AEN4343" 80 ></A 81 ><H2 82 >Name</H2 83 ><CODE 84 CLASS="CONSTANT" 85 >V4L2_PIX_FMT_YUYV</CODE 86 > -- Packed format with ½ horizontal chroma 87 resolution, also known as YUV 4:2:2</DIV 88 ><DIV 89 CLASS="REFSECT1" 90 ><A 91 NAME="AEN4347" 92 ></A 93 ><H2 94 >Description</H2 95 ><P 96 >In this format each four bytes is two pixels. Each four 97 bytes is two Y's, a Cb and a Cr. Each Y goes to one of the pixels, and 98 the Cb and Cr belong to both pixels. As you can see, the Cr and Cb 99 components have half the horizontal resolution of the Y component. 100 <CODE 101 CLASS="CONSTANT" 102 >V4L2_PIX_FMT_YUYV </CODE 103 > is known in the Windows 104 environment as YUY2.</P 105 ><DIV 106 CLASS="EXAMPLE" 107 ><A 108 NAME="AEN4351" 109 ></A 110 ><P 111 ><B 112 >Example 2-1. <CODE 113 CLASS="CONSTANT" 114 >V4L2_PIX_FMT_YUYV</CODE 115 > 4 × 4 116 pixel image</B 117 ></P 118 ><DIV 119 CLASS="FORMALPARA" 120 ><P 121 ><B 122 >Byte Order. </B 123 >Each cell is one byte. 124 <DIV 125 CLASS="INFORMALTABLE" 126 ><P 127 ></P 128 ><A 129 NAME="AEN4357" 130 ></A 131 ><TABLE 132 BORDER="0" 133 FRAME="void" 134 CLASS="CALSTABLE" 135 ><COL 136 WIDTH="2*" 137 ALIGN="LEFT"><COL><COL><COL><COL><COL><COL><COL><COL><TBODY 138 VALIGN="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 292 CLASS="FORMALPARA" 293 ><P 294 ><B 295 >Color Sample Location. </B 296 > <DIV 297 CLASS="INFORMALTABLE" 298 ><P 299 ></P 300 ><A 301 NAME="AEN4436" 302 ></A 303 ><TABLE 304 BORDER="0" 305 FRAME="void" 306 CLASS="CALSTABLE" 307 ><COL><COL><COL><COL><COL><COL><COL><TBODY 308 VALIGN="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 410 CLASS="NAVFOOTER" 411 ><HR 412 ALIGN="LEFT" 413 WIDTH="100%"><TABLE 414 SUMMARY="Footer navigation table" 415 WIDTH="100%" 416 BORDER="0" 417 CELLPADDING="0" 418 CELLSPACING="0" 419 ><TR 420 ><TD 421 WIDTH="33%" 422 ALIGN="left" 423 VALIGN="top" 424 ><A 425 HREF="r4246.htm" 426 ACCESSKEY="P" 427 >Prev</A 428 ></TD 429 ><TD 430 WIDTH="34%" 431 ALIGN="center" 432 VALIGN="top" 433 ><A 434 HREF="book1.htm" 435 ACCESSKEY="H" 436 >Home</A 437 ></TD 438 ><TD 439 WIDTH="33%" 440 ALIGN="right" 441 VALIGN="top" 442 ><A 443 HREF="r4484.htm" 444 ACCESSKEY="N" 445 >Next</A 446 ></TD 447 ></TR 448 ><TR 449 ><TD 450 WIDTH="33%" 451 ALIGN="left" 452 VALIGN="top" 453 >V4L2_PIX_FMT_Y16 ('Y16 ')</TD 454 ><TD 455 WIDTH="34%" 456 ALIGN="center" 457 VALIGN="top" 458 ><A 459 HREF="x3891.htm" 460 ACCESSKEY="U" 461 >Up</A 462 ></TD 463 ><TD 464 WIDTH="33%" 465 ALIGN="right" 466 VALIGN="top" 467 >V4L2_PIX_FMT_UYVY ('UYVY')</TD 468 ></TR 469 ></TABLE 470 ></DIV 471 ></BODY 472 ></HTML 473 > 474