Patent ID: 6876705

Claim:
A method of recovering useful data from a video packet that has been corrupted, the method comprising: receiving the video packet; ending without recovering data when corruption is detected in a video packet header of the video packet; ending without recovering data when corruption is detected in a DC portion of the video packet; ending without recovering data when corruption is detected in a motion vector portion of the video packet; initiating decoding of the video packet in a forward direction; maintaining a first count of a number of macroblocks decoded without error in the forward direction; storing codewords decoded in the forward direction; storing a first bit location when an error is first detected in the forward direction; initiating decoding of the video packet in a reverse direction; maintaining a second count of a number of macroblocks decoded without error in the reverse direction; storing codewords decoded in the reverse direction; storing a second bit location when an error is first detected in the reverse direction; determining if there is an overlapping region, where the overlapping region corresponds to a region identified in both the forward direction and in the reverse direction as having an error; if there is an overlapping region, discarding the data in the overlapping region and using the data in a remaining portion of the video packet; and if there is no overlapping region, discarding the data between a first backtracking amount ahead of the first error location in the forward direction and a second backtracking amount behind the second error location in the first location, and recovering the remaining portion of the video packet.