Digital Signal Processing Reference
In-Depth Information
(VBV) in the encoder. The input buffer in the decoder is conser-
vatively sized, due to consumer cost sensitivity. The encoder will
use the VBV model to mirror the actual video decoder state, and
the state of the VBV can be used to drive the rate control algo-
rithm, which in turn dynamically adjusts the quantization scale
factor used in the encode process and is sent to the decoder.
This closes the feedback loop in the encoder to ensure the
decoder buffer does not over- or underflow.
Rate
Controller
Buffer
Fullness
Mquant
Uncompressed
Video Input
Compressed
Video
Bitstream
Difference
Block
+
DCT,
Scale and
Quantize
Frame
Buffer and
DCT of
Difference
Frame
Buffer and
Entropy
Encode
Sub-
tract
_
tract
Reorder
Reorder
Motion
Predict
Motion Estimation Vectors
Header
info
Prediction
Block
MQuant
Previous
Recon-
structed
Frame
Motion
Compensate
Reconstructed
Frame Buffer
+
+
De-
Quantize
and Rescale
Decoded
Residual
Block
Add
IDCT
Current Reconstructed Frame
Figure 14.6. Video compression encoder.
The video encoder is shown as a simplified block diagram. The
following steps take place in the video encoder:
1. Input video frames are buffered and then ordered. Each
video frame is processed macroblock by macroblock.
2. For P- or B-frames, the video frame is compared to an
encoded reference frame (another I- or P-frame). The motion
estimation function searches for matches between macro-
blocks of the current and previously encoded frames. The
spatial offset between the macroblock position in the two
frames is the motion vector associated with macroblock.
3. The motion vector points to be best-matched macroblock in
the previous frame
called a motion-compensated prediction
macroblock. It is subtracted from the current frame macro-
block to form the residual or difference.
e
Search WWH ::




Custom Search