Error Handling and Concealment
8-49
8.6.1 Error Conditions Detected
The following error conditions can be detected by the Video Decoder:
1.
Variable Length Code (VLC) in error.
2.
Context error, i.e., a parameter in the bitstream that is not consistent
with the context or an illegal value in the bitstream.
3.
Unexpected start code. A start code in the MPEG syntax is defined
as a string of 23 0s, a 1, and the Start_code_identifier. Start codes
are used to separate and identify the various layers of syntax. If the
decoder is expecting a certain parameter in the bitstream in a given
layer of syntax and a transition to another layer is not expected, then
the presence of a start code at that point in the parsing of the
bitstream is treated as an error.
4.
Run-level errors. Inconsistent run-level variable length codes in the
block layer of the syntax (IDCT) are detected and flagged.
8.6.2 Recovery Mechanisms
Most of the error conditions listed previously occur inside the slice layer.
The recovery mechanism consists of searching for the next slice start
code or possibly a header at a higher level of syntax than the slice layer.
This ensures that the decoder resynchronizes with the bitstream. For the
portions of the picture that receive an erroneous bitstream or have
missing data, the decoder performs motion compensation using
concealment vectors (if they are present in the bitstream) to try to
conceal the errors. When the MPEG-2 encoder keeps slices relatively
small, the additional slice start codes provide a robust error recovery
mechanism.
The host can command the Video Decoder to ignore any concealment
vectors in the bitstream by setting the Concealment Copy Option bit
in Register 239 (
page 4-55
). In this mode, the Video Decoder copies
from the previously decoded valid picture. This bit is cleared at reset or
power-up.