Image Processing Reference
In-Depth Information
This computation is represented as an RGB-to-luma/chroma conversion matrix as shown
below:
Y'
0.299
0.587
0.114
R
B-Y'
-0.299
-0.587
0.886
G
R-Y'
0.701
-0.587
-0.114
B
10.6.2
Testing the Luma Matrix Calculations
Now let's work that through with some test values. You can set the formula up in Excel if
you want to test this yourself. The results are summarized in Table 10-2.
Note that the output values are usually substantially less than the maximum input
values. The outputs are scaled in order to more effectively use the range of available
values when converted to a digital form.
There are three images to pass on to the encoder. One is the luma image at full reso-
lution and the other two contain the chroma information but at reduced (half) resolution
in X and Y.
10.7
Macroblocks
In order to reduce the difficulty of manufacturing B-frames and to increase the likelihood
of finding areas of the picture that are identical, the luma image is diced into squares of
16
×
16 pixels. These are called macroblocks.
Table 10-2 Worked Examples of RGB-to-Luma/Chroma Conversion
Color
R
G
B
Y
B-Y
R-Y
Red
1
0
0
0.299
0.299
0.701
Green
0
1
0
0.587
0.587
0.587
Blue
0
0
1
0.114
0.886
0.114
White
1
1
1
1
0
0
Cyan
0
1
1
0.701
0.299
0.701
Yellow
1
1
0
0.886
0.886
0.114
Magenta
1
0
1
0.413
0.587
0.587
Black
0
0
0
0
0
0
Mid gray
0.5
0.5
0.5
0.5
0
0
Search WWH ::




Custom Search