Cryptography Reference
In-Depth Information
output bit rate so that it will neither overflow nor underflow. Overflow means
some of the data bits can not be transmitted, which results in data loss; On
the other hand, underflow means that the resource (which is usually scarce in
video coding) is not fully utilized.
In order to control the bit rate of the video stream, the encoded bitstream
is buffered and the data are read out from the buffer at the required bit rate
according to the channel requirement. The fullness of the buffer can used
to control the quantization step in the encoder. For example, an increase in
scene activity will result in the buffer filling up. In order to reduce the buffer
fullness, we can increase the quantization step in the encoder, so as to reduce
the output bit rate. On the other hand, if the buffer starts to empty, the
quantization step should be reduced so that the output bit rate will increase.
The compression ratio, as well as the coding quality, can vary considerably
depending on the spatial complexity and the amount of motion in the video.
A relatively simple and static scene leads to low compression ratio and high
quality, and highly textured and active scene leads to high compression
ratio and lower quality. If the quantization level is too coarse, it may result in
significant coding artefact that is visually annoying [16].
In general, the quality of the frames used as references must be very good
to prevent the errors from propagating to other frames in a GOP. For this
reason, it is preferable to allocate more bits to I- and P-frames. Few bits are
allocated to B-frames because they are not used as a reference frame and
cannot spread errors to other frames. Furthermore, B-frames benefit from
more extensive motion-compensation tactics and therefore naturally consume
least amount of data bits.
Depending on the applications, rate control [10] can be implemented at
frame level, slice level, MB level and even video object level. The lower level
it goes, the more complicated the algorithm will be.
2.4.4 Video Encoder and Decoder
Fig. 2.17 shows the block diagram of a video encoder and video decoder. The
encoding and decoding of the I-, P- and B-frames are explained as follows:
The first frame in the GOP will always be Intra coded. During Intra coding
all the switches except K 2 are switched off, and each block of the I-frame is
directly DCT transformed, quantized, zigzag scanned, run length coded and
variable length coded as we described in Fig. 2.2. The Intra coded frame is also
Intra decoded immediately, and is then stored as previous frames which will
be used as the reference frame for predictive coding of P-frames and B-frames.
After the I-frame is coded, if there are B-frames, their encoding will be
delayed until the following P-frame is coded as the encoding of B-frame de-
pends on its future I- or P-frame. When encoding a P-frame, the switches are
all switched on. An MB of the P-frame is motion estimated by searching on
the reference frames (The previous I- or P-frame) to obtain motion vectors.
The motion compensator then shift MB in the reference frame according to
Search WWH ::




Custom Search