Databases Reference
In-Depth Information
(
x c ,
y c )
, and the upper-left corner of the best matching macroblock is
(
x p ,
y p ), then
(
x c ,
y c )
y p ) have to satisfy the constraints x c
x p <
15 and y c
y p <
and
(
x p ,
15.
19.5.2 The Loop Filter
Sometimes sharp edges in the block used for prediction can result in the generation of sharp
changes in the prediction error. This in turn can cause high values for the high-frequency
coefficients in the transforms, which can increase the transmission rate. To avoid this, prior
to taking the difference, the prediction block can be smoothed by using a two-dimensional
spatial filter. The filter is separable; it can be implemented as a one-dimensional filter that
first operates on the rows, then on the columns. The filter coefficients are 4 ,
1
1
4 , except at
block boundaries where one of the filter taps would fall outside the block. To prevent this from
happening, the block boundaries remain unchanged by the filtering operation.
2 ,
Example19.5.3:
Let's filter the 4
4 block of pixel values shown in Table 19.2 using the filter specified for the
H.261 algorithm. From the pixel values we can see that this is a gray square with a white L in
it. (Recall that small pixel values correspond to darker pixels and large pixel values correspond
to lighter pixels, with 0 corresponding to black and 255 corresponding to white.)
×
T A B L E 19 . 2
Original block of pixels.
110
218
116
112
108
210
110
114
110
218
210
112
112
108
110
116
Let's filter the first row. We leave the first pixel value the same. The second value becomes
1
4 ×
1
2 ×
1
4 ×
110
+
218
+
116
=
165
where we have assumed integer division. The third filtered value becomes
1
4 ×
1
2 ×
1
4 ×
218
+
116
+
112
=
140
The final element in the first row of the filtered block remains unchanged. Continuing in this
fashion with all four rows, we get the 4
4 block shown in Table 19.3 .
Now repeat the filtering operation along the columns. The final 4
×
4 block is shown in
Table 19.4 . Notice how much more homogeneous this last block is compared to the original
block. This means that it will most likely not introduce any sharp variations in the difference
block, and the high-frequency coefficients in the transform will be closer to zero, leading to
compression.
×
 
Search WWH ::




Custom Search