|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-359E1198-B9F5-5EFD-B80B-C087E5A5DD1D" xml:lang="en"><title>Color |
|
13 Conversion</title><shortdesc>This topic describes the color conversion between RGB and YUV. |
|
14 The details depend on which YUV color space is used.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 <p>For analogue signals (standard definition), the <b>ITU BT-601</b> formula |
|
16 is used. </p> |
|
17 <codeblock id="GUID-898BEBCA-ADC9-518A-B4AD-0C8DBF2AE87D" xml:space="preserve">R' = Y' + 1.403V' |
|
18 G' = Y' - 0.344U' - 0.714V' |
|
19 B' = Y' + 1.770U'</codeblock> |
|
20 <p>For high-definition signals, the <b> ITU BT-709</b> formula is used. </p> |
|
21 <codeblock id="GUID-24AA061D-9587-5D41-9246-5DBA5708BE75" xml:space="preserve">R' = Y' + 1.5701V' |
|
22 G' = Y' - 0.1870U' - 0.4664V' |
|
23 B' = Y' - 1.8556U'</codeblock> |
|
24 <p>Where, </p> |
|
25 <ul> |
|
26 <li id="GUID-5B70C4D2-8E2C-53D8-9B7F-E19FEAC5CA5A">Y' is Y scaled to be in |
|
27 the range [0, 1]. </li> |
|
28 <li id="GUID-6F311DD9-F8DB-5672-8447-DF6FA756B8F5">U' and V' are the corresponding |
|
29 samples scaled to the range [-0.5, 0.5]. </li> |
|
30 <li id="GUID-3F2ED876-7B73-567F-A3C6-40A90AD40053">R', G' and B' then have |
|
31 to be clamped to the range [0, 1] and scaled up as appropriate. </li> |
|
32 </ul> |
|
33 </conbody><related-links> |
|
34 <link href="GUID-47701648-CEC1-564C-A6BF-CC42E78E701F.dita"><linktext>YUV Pixel |
|
35 Formats Overview</linktext></link> |
|
36 </related-links></concept> |