Error detection using a maximum distance among four block-motion-vectors in a macroblock in a corrupted MPEG-4 bitstream
First Claim
1. An error detector for a video bitstream comprising:
- a macroblock parser for locating macroblock data in the video bitstream for a current macroblock;
a motion vector reader, coupled to the macroblock parser, for outputting a plurality of block motion vectors for a plurality of blocks within the current macroblock when the current macroblock is encoded as the plurality of blocks;
a calculation unit, receiving the plurality of block motion vectors from the motion vector reader, for performing a predetermined function on pairs of block motion vectors in the plurality of block motion vectors to generate a function result for each of the pairs of block motion vectors; and
a comparator, receiving the function result from the calculation unit, for comparing the function result to a predetermined threshold, the comparator signaling an error when the function result for any of the pairs of block motion vectors exceeds the predetermined threshold, whereby pairs of block motion vectors for blocks within the macroblock are operated on by the predetermined function and compared to the predetermined threshold to detect the error.
2 Assignments
0 Petitions
Accused Products
Abstract
Errors are detected in a motion-picture-experts group (MPEG) bitstream that has been corrupted by wireless transmission. Some 16×16 pixel macroblocks are divided into four smaller 8×8 blocks. A motion vector is encoded for each block. The Euclid distance is generated for each possible pair of the four motion vectors, and the maximum of these distances is compared to a threshold distance. When the maximum distance among the motion vectors in a macroblock exceeds the threshold, a bitstream error is signaled and error concealment is triggered. Since the four blocks within a macroblock usually stay close to each other in adjacent video frames, large jumps in the relative location of one block usually indicate a bitstream error. Squares of the distances can be generated and compared to reduce the computational load by eliminating square-root operations.
-
Citations
20 Claims
-
1. An error detector for a video bitstream comprising:
-
a macroblock parser for locating macroblock data in the video bitstream for a current macroblock;
a motion vector reader, coupled to the macroblock parser, for outputting a plurality of block motion vectors for a plurality of blocks within the current macroblock when the current macroblock is encoded as the plurality of blocks;
a calculation unit, receiving the plurality of block motion vectors from the motion vector reader, for performing a predetermined function on pairs of block motion vectors in the plurality of block motion vectors to generate a function result for each of the pairs of block motion vectors; and
a comparator, receiving the function result from the calculation unit, for comparing the function result to a predetermined threshold, the comparator signaling an error when the function result for any of the pairs of block motion vectors exceeds the predetermined threshold, whereby pairs of block motion vectors for blocks within the macroblock are operated on by the predetermined function and compared to the predetermined threshold to detect the error. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
wherein when the current macroblock is encoded as a single macroblock a single macroblock motion vector is output by the motion vector reader and the calculation unit and comparator are disabled for detecting the error, whereby errors are detected for block motion vectors but not for macroblock motion vectors.
-
-
3. The error detector of claim 2 wherein the current macroblock is a 16×
- 16 pixel square in a video object plane;
wherein each block is an 8×
8 pixel block within the current macroblock;
wherein each block motion vector indicates a relative location of the 8×
8 pixel block in a previous video object plane;
wherein the macroblock motion vector indicates a relative location of the 16×
16 pixel square in the previous video object plane;
wherein the current macroblock is encoded by either the single macroblock motion vector or by 4 block motion vectors without the pixels when compression occurs.
- 16 pixel square in a video object plane;
-
4. The error detector of claim 3 wherein the video bitstream is an motion-picture-experts group (MPEG) encoded bitstream.
-
5. The error detector of claim 4 wherein the video bitstream contains errors caused by transmission over a wireless network.
-
6. The error detector of claim 1 wherein the current macroblock also includes an error term indicating changed pixels in the current macroblock from the pixels stored for a previous video object plane located by a motion vector.
-
7. The error detector of claim 1 wherein the predetermined function is a Euclid distance between a pair of block motion vectors, or a square of the Euclid distance, or an absolute-value difference of coordinates of block motion vectors.
-
8. The error detector of claim 1 wherein the calculation unit calculates a difference for each coordinate of the pair of block motion vectors, the calculation unit also calculating a square of the difference, the calculation unit summing the squares of the differences to generate the function result of the predetermined function.
-
9. The error detector of claim 1 wherein the predetermined threshold is a maximum distance between two block motion vectors in a pair of block motion vectors,
whereby distances between pairs of block motion vectors are compared to a maximum distance to detect bitstream errors. -
10. The error detector of claim 1 further comprising:
-
a pixel fetcher, receiving the macroblock motion vector or the block motion vectors from the motion vector reader, for accessing a memory storing pixels in a previous video object plane using the macroblock motion vector as a pointer to a relative location of pixels for the current macroblock in the memory, or using each of the block motion vectors to locate pixels for each block in the previous video object plane, whereby pixels are fetched from the previous video object plane.
-
-
11. The error detector of claim 1 further comprising:
an error concealer, activated by the error signal from the comparator, for concealing detected errors in the current macroblock.
-
12. The error detector of claim 11 wherein the error concealer substitutes another of the block motion vectors in the current macroblock for a block motion vector causing the error.
-
13. A method for detecting errors in a current macroblock in a compressed video bitstream comprising:
-
parsing a compressed-video bitstream;
for a current macroblock in a current video object plane; determining a number of motion vectors that encode the current macroblock;
when only one motion vector encodes the current macroblock; using the only one motion vector to generate an address to access a memory;
reading pixels from the memory for the current macroblock;
moving a location of the pixels read from the memory to a location for the current macroblock in the current video object plane;
when multiple motion vectors encode the current macroblock; executing a predetermined function on the multiple motion vectors to generate a result value;
comparing the result value to a threshold;
signaling a macroblock error when the result value meets error criteria indicated by the threshold;
when the macroblock error is not signaled, using the multiple motion vectors to generate the address to access the memory and reading pixels from the memory for the current macroblock; and
moving a location of the pixels read from the memory to a location for the current macroblock in the current video object plane, whereby the macroblock error is detected by executing the predetermined function on the multiple motion vectors for the current macroblock and threshold comparison. - View Dependent Claims (14, 15, 16, 17, 18)
calculating a distance among pairs of motion vectors in the current macroblock;
wherein the threshold indicates a maximum allowed distance among motion vectors in a macroblock.
-
-
15. The method of claim 14 wherein executing the predetermined function comprises:
-
calculating a square of a distance for each pair of motion vectors in the current macroblock;
storing a maximum square of the distance for all pairs as the result value.
-
-
16. The method of claim 14 wherein executing the predetermined function comprises:
-
calculating a square of a distance for each pair of motion vectors in the current macroblock;
wherein comparing the result value to the threshold comprises comparing each square of the distance for each pair of motion vectors to the threshold.
-
-
17. The method of claim 16 wherein the multiple motion vectors comprise 4 motion vectors for 4 blocks within the current macroblock, the 4 motion vectors indicating movement of pixels in the blocks.
-
18. The method of claim 17 wherein using the multiple motion vectors to generate the address to access the memory and reading pixels from the memory for the current macroblock comprises:
-
reading the memory for a block of pixels for each motion vector in the multiple motion vectors, wherein blocks in a previous video object plane can be located in different macroblocks, but are in a same current macroblock in the current video object plane, whereby blocks can move independently of macroblocks.
-
-
19. An error-detecting motion-picture-experts group (MPEG) decoder comprising:
-
motion-vector means for reading four motion vectors for four blocks in a current macroblock;
function means for operating on pairs of the four motion vectors to generate a result;
threshold means for comparing the result to a threshold;
error signaling means for signaling an error when the result exceeds the threshold;
pixel fetching means for reading pixels from a memory storing pixels in a previous video object plane using the four motion vectors to generate four addresses for four blocks in the previous video object plane containing pixels for the four blocks in the current video object plane;
arranging means for storing the pixels for the four block in the memory for the current video object plane, whereby the error is signaled when the four motion vectors for the current macroblock cause the threshold to be exceeded. - View Dependent Claims (20)
-
Specification