![](https://csdnimg.cn/release/download_crawler_static/7490351/bg4.jpg)
18
Chapter 3: Color Spaces
defined to have a nominal 8-bit range of 16–
235; Cb and Cr are defined to have a nominal
range of 16–240. There are several YCbCr sam-
pling formats, such as 4:4:4, 4:2:2, 4:1:1, and
4:2:0 that are also described.
RGB - YCbCr Equations: SDTV
The basic equations to convert between 8-bit
digital R´G´B´ data with a 16–235 nominal
range and YCbCr are:
Y
601
= 0.299R´ + 0.587G´ + 0.114B´
Cb = –0.172R´ – 0.339G´ + 0.511B´ + 128
Cr = 0.511R´ – 0.428G´ – 0.083B´ + 128
R´ = Y
601
+ 1.371(Cr – 128)
G´ = Y
601
– 0.698(Cr – 128)
– 0.336(Cb – 128)
B´ = Y
601
+ 1.732(Cb – 128)
When performing YCbCr to R´G´B´ con-
version, the resulting R´G´B´ values have a
nominal range of 16–235, with possible occa-
sional excursions into the 0–15 and 236–255
values. This is due to Y and CbCr occasionally
going outside the 16–235 and 16–240 ranges,
respectively, due to video processing and
noise. Note that 8-bit YCbCr and R´G´B´ data
should be saturated at the 0 and 255 levels to
avoid underflow and overflow wrap-around
problems.
Table 3.2 lists the YCbCr values for 75%
amplitude, 100% saturated color bars, a com-
mon video test signal.
Computer Systems Considerations
If the R´G´B´ data has a range of 0–255, as is
commonly found in computer systems, the fol-
lowing equations may be more convenient to
use:
Y
601
= 0.257R´ + 0.504G´ + 0.098B´ + 16
Cb = –0.148R´ – 0.291G´ + 0.439B´ + 128
Cr = 0.439R´ – 0.368G´ – 0.071B´ + 128
Table 3.2. 75% YCbCr Color Bars.
Nominal
Range
White
Yellow
Cyan
Green
Magenta
Red
Blue
Black
SDTV
Y 16 to 235 180 162 131 112 84 65 35 16
Cb 16 to 240 128 44 156 72 184 100 212 128
Cr 16 to 240 128 142 44 58 198 212 114 128
HDTV
Y 16 to 235 180 168 145 133 63 51 28 16
Cb 16 to 240 128 44 147 63 193 109 212 128
Cr 16 to 240 128 136 44 52 204 212 120 128