Graphics Reference
In-Depth Information
sample positions, original samples, and the reconstructed samples, respectively,
where k belongs to C , the set of samples inside the CTB that belong to a specific
SAO type (i.e., BO or EO), a starting band position or EO class, and a specific band
or category. The distortion between original samples and reconstructed samples can
be described by the following equation:
D pre D X
k
.s.k/ x.k// 2
(7.25)
2
C
The distortion between the original samples and samples modified by SAO can
be described by the following equation
D post D X
k
.s.k/ .x.k/ C h// 2
(7.26)
2
C
where h is the offset for the sample set. The distortion change is defined by the
following equation:
D D D post D pre D X
k2C
h 2 2h .s.k/ x.k// D Nh 2 2hE
(7.27)
where N is the number of samples in the set, and E is the sum of differences
between the original samples and the reconstructed samples (before SAO) as defined
by the following equation:
E D X
k2C
.s.k/ x.k//
(7.28)
Please note that the sample classification and ( 7.28 ) can be calculated right after
the input samples become available after the deblocking filtering. Thus, N and E
can be calculated only once and stored. Then, the delta rate-distortion cost is defined
as follows:
J D D C R
(7.29)
where is the Lagrange multiplier, and R represents the estimated bits of side
information.
For a given CTB with a specific SAO type (i.e., BO or EO), starting band position
or EO class, and a specific band or category, several h values (offsets) close to E/N
are tested, and the offset that minimizes J is chosen. After offsets for all bands
or categories have been chosen, the J for each of the 32 bands of BO or each of
the five categories of EO are added to obtain the delta (change) of the rate-distortion
cost of the entire CTB. The distortion of the BO bands using zero offsets and the EO
category 0 can be pre-calculated by ( 7.25 ) and stored for subsequent re-use. When
SAO decreases the cost for the entire CTB (i.e. the delta cost is negative), SAO is
enabled for this CTB. Similarly, the best SAO type and the best starting position or
EO class can be found by the fast distortion estimation.
Search WWH ::




Custom Search