Graphics Reference
In-Depth Information
4.2.2
Filtering Process of Reference Samples
The reference samples used by HEVC intra prediction are conditionally filtered by a
smoothing filter similarly to what was done in 8 8 intra prediction of H.264/AVC.
The intention of this processing is to improve visual appearance of the prediction
block by avoiding steps in the values of reference samples that could potentially
generate unwanted directional edges to the prediction block. For the optimal usage
of the smoothing filter, the decision to apply the filter is done based on the selected
intra prediction mode and size of the prediction block.
If DC prediction is used or if the prediction block is of size 4 4 the smoothing
filter is switched off. For other cases, block size and directionality of the prediction
are used to decide whether the smoothing filter is applied. For 8 8 prediction
blocks, the smoothing filter is only applied for the exactly diagonal directions
(angular modes 2, 18 and 34). For 16 16 prediction blocks, the smoothing filter
is applied to most cases except the near-horizontal and near-vertical directions
(angular modes 9, 10, 11, 25, 26 and 27). For 32 32 prediction blocks, only exactly
vertical and exactly horizontal directions (angular modes 10 and 26) are excluded
from the smoothing.
Once it is decided that filtering will be applied, one of two filtering processes is
chosen depending on the block size and the continuity of the reference samples. By
default, a three-tap [1 2 1]/4 smoothing filter is used. The outmost reference samples,
p [ 1][2 N 1] and p [2 N 1][ 1] are not modified. All other reference samples are
filtered by using two neighboring reference samples as:
1 D .p Œ 1Œ0 C 2p Œ 1 C pŒ0Œ 1 C 2/ >> 2
(4.1)
1Œy D .p Œ 1Œy C 1 C 2p Œ 1Œy C 1Œy 1 C 2/ >> 2
(4.2)
pŒxŒ 1 D .p Œ x C 1 C 2p Œ x Œ 1 C pŒx 1 C 2/ >> 2
(4.3)
for y D 0 :::2 N 2and x D 0 :::2 N 2, where “>>” indicates an arithmetic right
shift operation.
Otherwise, if the prediction block size is equal to 32 32 and the reference
samples are found to be sufficiently flat, the reference samples are generated by
applying linear interpolation between the three corner reference samples, p [ 1][63],
p [ 1][ 1] and p [63][ 1] instead of the three-tap smoothing filter. The flatness is
determined by using the following two inequalities based on the experimentally
determined thresholds.
j 1 C pŒ2N 1 2p Œ N 1 j <.1<<.b 5// (4.4)
Search WWH ::




Custom Search