Databases Reference
In-Depth Information
Macroblock
F I GU R E 19 . 12
A GOB consisting of 33 macroblocks.
The intra DC quantizer is a uniformmidrise quantizer with a step size of 8. The other quantizers
are midtread quantizers with a step size of an even value between 2 and 62. Given a particular
block of coefficients, if we use a quantizer with a smaller step size, we are likely to get a larger
number of nonzero coefficients. Because of the manner in which the labels are encoded, the
number of bits that will need to be transmitted will increase. Therefore, the availability of
transmission resources will have a major impact on the quantizer selection. We will discuss
this aspect further when we talk about the transmission buffer. Once a quantizer is selected,
the receiver has to be informed about the selection. In H.261, this is done in one of two
ways. Each macroblock is preceded by a header. The quantizer being used can be identified
as part of this header. When the amount of activity or motion in the sequence is relatively
constant, it is reasonable to expect that the same quantizer will be used for a large number
of macroblocks. In this case, it would be wasteful to identify the quantizer being used with
each macroblock. The macroblocks are organized into groups of blocks (GOBs), each of
which consists of three rows of 11 macroblocks. This hierarchical arrangement is shown in
Figure 19.12 . Only the luminance blocks are shown. The header preceding each GOB contains
a 5-bit field for identifying the quantizer. Once a quantizer has been identified in the GOB
header, the receiver assumes that quantizer is being used, unless this choice is overridden using
the macroblock header.
The quantization labels are encoded in a manner similar to, but not exactly the same as,
JPEG. The labels are scanned in a zigzag fashion like JPEG. The nonzero labels are coded
along with the number, or run, of coefficients quantized to zero. The 20 most commonly
occurring combinations of (run, label) are coded with a single variable-length codeword. All
other combinations of (run, label) are coded with a 20-bit word, made up of a 6-bit escape
sequence, a 6-bit code denoting the run, and an 8-bit code for the label.
In order to avoid transmitting blocks that have no nonzero quantized coefficient, the header
preceding each macroblock can contain a variable-length code called the coded block pattern
(CBP) that indicates which of the six blocks contain nonzero labels. The CBP can take on one
of 64 different pattern numbers, which is then encoded by a variable-length code. The pattern
number is given by
CBP
=
32 P 1 +
16 P 2 +
8 P 3 +
4 P 4 +
2 P 5 +
P 6
 
Search WWH ::




Custom Search