Databases Reference
In-Depth Information
TABLE 19.9
M(Q M ,r) values in H.264.
Q M
r = 0
r = 1
r = 2
0
13107
5243
8066
1
11916
4660
7490
2
10082
4194
6554
3
9362
3647
5825
4
8192
3355
5243
5
7282
2893
4559
TABLE 19.10
S
(
Q M ,
r
) values in H.264.
Q M
r = 0
r = 1
r = 2
0
10
16
13
1
11
18
14
2
13
20
16
3
14
23
18
4
16
25
20
5
18
29
23
×
DC coefficients in the macroblock. In the case of the luminance block, this is a 4
4 transform
for the 16 DC coefficients. The smaller chrominance block contains four DC coefficients, so
weusea2
×
2 discrete Walsh-Hadamard transform.
19.11.5 Coding
The H.264 standard contains two options for binary coding. The first uses exponential Golomb
codes to encode the parameters and a context-adaptive variable-length code (CAVLC) to encode
the quantizer labels [ 262 ]. The second binarizes all the values and then uses a context-adaptive
binary arithmetic code (CABAC) [ 44 ].
An exponential Golomb code for a positive number x can be obtained as the unary code
for M
1. The unary
code for a number x is given as x zeros followed by a 1. The exponential Golomb code for
zero is 1.
The quantizer labels are first scanned in a zigzag fashion. In many cases the last nonzero
labels in the zigzag scan have a magnitude of 1. The number N of nonzero labels and the
number T of trailing 1s are used as an index into a codebook that is selected based on the values
of N and T for the neighboring blocks. The maximum allowed value of T is 3. If the number
of trailing labels with a magnitude of 1 is greater than 3, the remaining are encoded in the
same manner as the other nonzero labels. The nonzero labels are then coded in reverse order.
That is, the quantizer labels corresponding to the higher-frequency coefficients are encoded
first. First the signs of the trailing 1s are encoded with 0s signifying positive values and 1s
=
log 2 (
x
+
1
)
concatenated with the M -bit natural binary code for x
+
 
Search WWH ::




Custom Search