Symbian3/PDK/Source/GUID-47701648-CEC1-564C-A6BF-CC42E78E701F.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 11 Mar 2010 18:02:22 +0000
changeset 3 46218c8b8afa
parent 1 25a17d01db0c
child 5 f345bda72bc4
permissions -rw-r--r--
week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-47701648-CEC1-564C-A6BF-CC42E78E701F" xml:lang="en"><title>YUV
Pixel Formats Overview</title><shortdesc>The YUV model defines a color space in terms of one luma (Y) and
two chrominance (UV) components. The YUV color model is used for analog encoding
of color information in television transmissions (PAL). Y stands for the luminance
component (the brightness) and U (Cb) and V (Cr) are the chrominance (color)
components. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The requirement for a compatible signal transmission method
for both black-and-white and color information led to the invention of YUV
pixel formats. The UV signal was added to the existing luma component (Y)
black-and-white signal. This enabled color television transmissions within
the black and white infrastructure. </p>
<p>The YUV formats are divided into two groups: </p>
<ul>
<li id="GUID-E855EBD1-5009-511A-BBA7-4F13ECCBEEB7"><b>Interleaved formats</b> in
which the Y, U (Cb) and V (Cr) samples are packed together into macropixels
that are stored in a single array.</li>
<li id="GUID-C8C7882A-30AC-59E3-B14D-BB5761BAB350"><b>Planar format</b> in
which each component (Y, U (Cb) and V (Cr)) is stored as a separate array.
The final image is a fusion of the three separate planes. </li>
</ul>
<section id="GUID-640F2426-2CB3-5EC6-A611-C1F7DAFF9814"><title>Subsampling
intervals</title> <p>Chroma subsampling is the practice of encoding images
by implementing less resolution for chroma information (U (Cb) and V (Cr))
than for the luma (Y) information. </p> <p>The following table shows how U
and V are sampled relative to Y. </p> <table id="GUID-A3C869B2-5254-533B-8E64-E1B5755489C9">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<thead>
<row>
<entry>Subsampling scheme</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>4:4:4 </entry>
<entry>No downsampling of the chroma channels. </entry>
</row>
<row>
<entry>4:2:2 </entry>
<entry>2:1 horizontal downsampling, with no vertical downsampling. Every scanline
contains 4 Y samples for every 2 U or V samples. </entry>
</row>
<row>
<entry>4:2:0 </entry>
<entry>2:1 horizontal downsampling, with 2:1 vertical downsampling.  </entry>
</row>
</tbody>
</tgroup>
</table> <p>The subsampling scheme is commonly expressed as a three part ratio <i>J</i> <b>:</b> <i>a</i> <b>:</b> <i>b</i>,
where, </p> <ul>
<li id="GUID-66933A9C-2F14-55FF-B812-DD45CD39DE3E"><i>J</i> is the horizontal
sampling reference (the width of the conceptual region). This is usually,
4 </li>
<li id="GUID-38D6F452-4408-5E64-B884-994B91AC725B"><i>a</i> is the number
of chrominance samples (Cr, Cb) in the first row of <i>J</i> pixels. </li>
<li id="GUID-6838E688-B1AF-5A28-816A-40DC3F9A73EF"><i>b</i> is the number
of (additional) chrominance samples (Cr, Cb) in the second row of <i>J</i> pixels. </li>
</ul> <p>The horizontal subsampling interval describes how frequently across
a line a sample of that component is taken. The vertical subsampling interval
describes on which lines samples are taken. </p> <p>For example, the UYVY
(4:2:2) formats have a horizontal subsampling period of 2 for both the U and
V components. This indicates that the U and V samples are taken for every
second pixel across a line. The vertical subsampling period is 1, which indicates
that U and V samples are taken on each line of the image. The following table
summarizes the horizontal and vertical subsampling intervals for the YUV 4:2:2
formats. </p> <table id="GUID-A61B395A-1DF8-548B-97E7-A677A00428C0">
<tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/>
<thead>
<row>
<entry>Sample period</entry>
<entry>Horizontal</entry>
<entry>Vertical</entry>
</row>
</thead>
<tbody>
<row>
<entry>Y </entry>
<entry>1 </entry>
<entry>1 </entry>
</row>
<row>
<entry>U </entry>
<entry>2 </entry>
<entry>1 </entry>
</row>
<row>
<entry>V </entry>
<entry>2 </entry>
<entry>1 </entry>
</row>
</tbody>
</tgroup>
</table> <fig id="GUID-E9813B1D-6601-574E-800D-2EC6073A3413">
<title>              4:2:2 subsampling            </title>
<image href="GUID-D0F3FBB0-CE9E-53C0-93B6-A8E3FCCC1530_d0e207734_href.png" placement="inline"/>
</fig> <p>Contrast this to a subsampling scheme of 4:4:4. This has a horizontal
subsample period of 1 for both the U and V components and a vertical subsample
period of 1 for both the U and V components. </p> <fig id="GUID-A6DE3EED-90BE-59B9-A126-4C1046635AE7">
<title>              4:4:4 subsampling            </title>
<image href="GUID-ABA6144B-E861-5ABD-969E-03814BB2B38A_d0e207745_href.png" placement="inline"/>
</fig> <p>This reduction results in almost no perceivable visual difference. </p> </section>
</conbody><related-links>
<link href="GUID-D429672C-448D-5E91-ABA0-81680869D69E.dita"><linktext>YUV Pixel
Formats</linktext></link>
<link href="GUID-359E1198-B9F5-5EFD-B80B-C087E5A5DD1D.dita"><linktext> Color Conversion</linktext>
</link>
</related-links></concept>