Image Processing Reference
In-Depth Information
DCT Transform
Luma or chroma x/y block
Frequency domain u/v block
Figure 10-11 DCT conversion.
10.7.2
Macroblock Coding
Before being compressed, the macroblocks are normalized by subtracting half of the full
range value for the bit depth (Z-axis value). For an 8-bit image, the value 128 is subtracted
because this is half of 2 8 (256). This normalization is done so that the encoder generates num-
bers within a controlled range. The core of the compression algorithm in MPEG-1 uses the
discrete cosine transform (DCT) to convert the spatially organized pixels into an array of fre-
quency values that are organized into the same rectangular shape. By organizing the image
into a frequency graph as shown in Figure 10-11, the image is described more concisely.
10.7.3
Inside the Math—Aargh!
In the introduction I promised there would not be much math in this topic. It is good to
stay as far away as possible from the mathematical theories involved in compression. In
order to frighten you just a little and to demonstrate why we don't want to get into this
topic too deeply at a mathematical level, consider the DCT formula that is at the basis of
the MPEG-1 encoder.
(
)
(
)
7
7
(2x + 1) u
(2y + 1) v
π
∑∑
π
F(u,v) = 0.25*C u C v
f(x,y)cos
cos
16
16
x=0
y=0
Where:
1
=
for u = 0 otherwise C u = 1
C u
2
1
=
for v = 0 otherwise C v = 1
C v
2                                       Search WWH ::

Custom Search