Digital Signal Processing Reference
In-Depth Information
Some encoders also compare the number of bits used to
encode the motion vector and residual to ensure there is a saving
when using the predictive representation. Otherwise, the mac-
roblock can be intra-coded.
14.6 Compressing B-frames
B-frames try to find a match using both preceding and
following I- or P-frames for each macroblock. The encoder
searches for a motion vector resulting in a good match over both
the previous and following I- or P-frame, and if found uses that
frame to inter-code the macroblock. If unsuccessful, then the
macroblock must be intra-coded. Another option is to use the
motion vector
but with both preceding and following frames
simultaneously. When computing the residual, the B macroframe
pixels are subtracted to the average of the macroblocks in the two
I- or P-frames. This is done for each pixel, to compute the 256
residuals, which are then quantized and encoded.
Many encoders then compare the number of bits used to
encode the motion vector and residual using the preceding,
following, or average of both frames to see which provides the
most bit savings with predictive representation. Otherwise, the
macroblock is intra-coded.
e
14.7 Rate Control and Buffering
Video rate control is an important part of image compression.
The decoder has a video buffer of fixed size, and the encoding
process must ensure that this buffer never under- or overruns the
buffer size, as either of these events can cause noticeable
discontinuities for the viewer.
The video compression and decompression process requires
processing of the frames in a non-sequential order. Normally, this
is done in real-time. Consider these three scenarios:
Video storage
video frames arriving at 30 frames per minute
must be compressed (encoded) and stored to a file.
Video readback
e
a compressed video file is decompressed
(decoded), producing 30 video frames per minute.
Streaming video
e
a video source at 30 frames per minute
must be compressed (encoded) to transmit over a band-
width-limited channel (only able to support a maximum
number of bits/second throughput). The decompressed
(decoded) video is to be displayed at 30 frames per minute
at the destination.
e
Search WWH ::




Custom Search