# US 6,728,318 B2 · Error recovery of corrupted MPEG-4 bitstreams using fuzzy decoding of start codes and resync markers

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 6,728,318 B2
- Document ID: US6728318B2
- Status: Granted
- Kind: B2
- Application number: 09/681,234
- Filed: 2001-03-02
- Published: 2002-09-05
- Granted: 2004-04-27
- Earliest claimed: 2001-03-02
- Assignees: RedRock Semiconductor, Ltd.
- Inventors: Tao Lin; Stephen Molloy
- Web page: https://patentgrep.com/patent/US6728318B2

## CPC

- H04N 19/68: involving the insertion of resynchronisation markers into the bitstream
- H04N 19/89: involving methods or arrangements for detection of transmission errors at the decoder
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A decoder for motion-picture-experts group (MPEG-4) video detects start codes at the beginning of video object planes (VOP) and resync markers at the start of each video packet (VP) in the VOP. When an error occurs in the bitstream, a parser searched for a next start code or resync marker to find the start of the next video packet. A partial match of the unique start-code bit sequence signals a fuzzy match, allowing the VOP header and data to be decoded even when bit errors occur in the VOP start code. A fuzzy match of the shorter resync marker can also be enabled. Fuzzy matching of VOP start codes and resync markers allows for faster recovery from corrupted bitstreams such as those transmitted over wireless networks.

## Claims

### Claim 1

A fuzzy bitstream decoder comprising:
a bitstream parser, receiving a bitstream containing bit errors, the bitstream encoding compressed video arranged as video object planes each having a plurality of video packets;
a fuzzy start-code decoder, coupled to the bitstream parser, for detecting a fuzzy start code in the bitstream, the fuzzy start code including at least a portion of a start code, the start code for marking a start of a video object plane;
a resync marker decoder, coupled to the bitstream parser, for detecting a resync marker in the bitstream, the resync marker for marking a beginning of a video packet; and
a macroblock decoder, coupled to the bitstream parser, for extracting video macroblocks from data fields in the bitstream;
wherein a corrupted start code in a corrupted bitstream is detected when bit errors occur in the start code but not in the fuzzy start code portion of the start code,
whereby the bitstream is recovered from the corrupted start code.

### Claim 2 (depends on 1)

The fuzzy bitstream decoder of claim 1 wherein each video packet comprises a resync marker or a start code followed by a header and a data field, the data field containing video macroblocks.

### Claim 3 (depends on 2)

The fuzzy bitstream decoder of claim 2 wherein the macroblock decoder extracts video macroblocks from a data field of a corrupted video packet, the corrupted video packet having a bit error in the start code but not in the at least a portion of the start codes that is included in the fuzzy start code, whereby data is recovered from the corrupted video packet with the bit error in the start code.

### Claim 4 (depends on 3)

The fuzzy bitstream decoder of claim 3 wherein the start code and the resync marker are unique bit sequences that do not occur in the data fields.

### Claim 5 (depends on 4)

The fuzzy bitstream decoder of claim 4 wherein the start code includes a sequence of 23 zero bits followed by a one bit.

### Claim 6 (depends on 5)

The fuzzy bitstream decoder of claim 5 wherein the resync marker is a sequence of 16 zero bits followed by a one bit.

### Claim 7 (depends on 6)

The fuzzy bitstream decoder of claim 6 wherein the fuzzy start code is detected when a sequence of at least 17 zeros is detected.

### Claim 8 (depends on 7)

The fuzzy bitstream decoder of claim 7 wherein the start code is 0000 0000 0000 0000 0000 0001 1011 0110 and wherein the fuzzy start code portion is XXXX XX00 0000 0000 0000 0001 1011 0110,
wherein X are bits that are in the start code but not in the fuzzy start code.

### Claim 9 (depends on 3)

The fuzzy bitstream decoder of claim 3 further comprising:
an error detector, coupled to the macroblock decoder, for detecting an error in the bitstream, the error detector for activating the fuzzy start-code decoder to detect fuzzy start codes;
wherein decoding of the fuzzy start code is enabled when a bitstream error is detected.

### Claim 10 (depends on 9)

The fuzzy bitstream decoder of claim 9 wherein the macroblock decoder extracts a motion vector, the motion vector indicating a change in location of a video macroblock from one video object plane to another video object plane in the bitstream.

### Claim 11 (depends on 10)

The fuzzy bitstream decoder of claim 10 wherein the error detector signals an error when the motion vector is outside of a predetermined search range,
whereby corrupted motion vectors are detected.

### Claim 12 (depends on 10)

The fuzzy bitstream decoder of claim 10 wherein the bitstream is an motion-picture-experts group (MPEG) encoded bitstream.

### Claim 13 (depends on 12)

The fuzzy bitstream decoder of claim 12 wherein the bitstream is received from a wireless network, the wireless network introducing bit errors to the bitstream.

### Claim 14 (depends on 3)

The fuzzy bitstream decoder of claim 3 wherein the resync marker decoder also detects a fuzzy resync marker, the fuzzy resync marker including at least a portion of the resync marker,
wherein a corrupted resync marker in a corrupted bitstream is detected when bit errors occur in the resync marker but not in a portion of the resync marker contained in the fuzzy resync marker,
whereby fuzzy decoding of resync markers is performed.

### Claim 15 (depends on 14)

The fuzzy bitstream decoder of claim 14 wherein a motion-vector search range is limited, limiting a number of successive zero bits in the data fields to be less than a number of successive zero bits in the fuzzy resync marker.

### Claim 16

An error-recovering motion-picture-experts group (MPEG) decoder comprising:
a bitstream input for receiving an MPEG bitstream, the MPEG bitstream being a sequence of video packets arranged into video object planes, each video object plane encoding an image frame of a video;
wherein each video packet after a first video packet in a video object plane begins with a resync marker, a header, and a data field;
wherein each video object plane begins with a start code, followed by a header and a data field for a first video packet in the video object plane;
a start-code detector, coupled to the bitstream input, for detecting the start code at a beginning of each new video object plane;
a resync-marker detector, coupled to the bitstream input, for detecting the resync marker at a beginning of video packets in the video object plane;
a macroblock processor, receiving data fields from the bitstream input, for processing macroblocks in the data fields, the macroblocks representing a portion of the image frame encoded by the video object plane; and
a fuzzy detector, coupled to the bitstream input, for detecting a partial match of the start code, the fuzzy detector signaling the macroblock processor to process macroblocks in the data field of a first video packet in a video object plane when the partial match is detected with a corrupted start code for the first video packet;
whereby partial matches of the start code allow macroblocks to be processed.

### Claim 17 (depends on 16)

The error-recovering MPEG decoder of claim 16 further comprising:
an error detector, coupled to the macroblock processor, for signaling the fuzzy detector to search for partial matches when a macroblock error is detected.

### Claim 18

An motion-picture-experts group (MPEG) bitstream decoder comprising:
parser means for receiving a bitstream containing bit errors, the bitstream encoding compressed video arranged as video object planes each having a plurality of video packets;
fuzzy start-code decoder means, coupled to the parser means, for detecting a fuzzy start code in the bitstream, the fuzzy start code including a set of predetermined codes that match a portion of a start code, but have bit errors that do not match other portions of the start code, the start code for marking a start of a video object plane;
resync marker decoder means, coupled to the parser means, for detecting a resync marker in the bitstream, the resync marker for marking a beginning of a video packet; and
macroblock decoder means, coupled to the parser means, for extracting video macroblocks from data fields in the bitstream;
wherein a corrupted start code in a corrupted bitstream is detected when bit errors occur in the start code but not in the fuzzy start code portion of the start code,
whereby the bitstream is recovered from the corrupted start code.

### Claim 19 (depends on 18)

The MPEG bitstream decoder of claim 18 wherein each video packet comprises a resync marker or a start code followed by a header and a data field, the data field containing video macroblocks;
wherein the macroblock decoder means includes means for extracting macroblocks from a data field of a corrupted video packet, the corrupted video packet having a bit error in the start code but not in the fuzzy start code,
whereby data is recovered from the corrupted video packet with the bit error in the start code.

### Claim 20 (depends on 18)

The MPEG bitstream decoder of claim 18 further comprising: error detector means, coupled to the macroblock decoder means, for activating the fuzzy start-code decoder means to search for the fuzzy start code when a macroblock error is detected.
