Intra compression of pixel blocks using predicted mean
First Claim
1. A method for encoding a video frame to be transmitted over a communications medium, the method comprising the steps of:
- obtaining a video frame;
separating the frame into a plurality of blocks;
encoding a plurality of blocks using inter compression;
encoding the plurality of blocks using predictive intra compression;
selecting better block compression between said steps of inter compression and intra compression for the plurality of blocks;
wherein said steps of encoding of the plurality of blocks is performed on a block by block basis, to provide optimum compression of the video frame for a given bit rate; and
wherein predictive intra compression comprises the steps of;
obtaining pixel values that are adjacent to a first block in the plurality of blocks;
predicting pixel values for the first block in the plurality of blocks from the obtained adjacent pixel values;
calculating a distance between the predicted pixal values and the actual pixel values for the first block in the plurality of blocks;
creating a residual from the calculated distance; and
encoding the residual.
2 Assignments
0 Petitions
Accused Products
Abstract
An apparatus and method for encoding video frames is provided. The video frames are divided into blocks for encoding. Encoding of the video blocks utilizes motion detection, motion estimation and adaptive compression, to obtain the desired compression for a particular bit rate. Adaptive compression includes intra compression (without regard to other frames) and inter compression (with regard to other frames). Intra compression, inter compression with motion detection, and inter compression with motion estimation are performed on a block by block basis, as needed. Segmentation is provided to compare encoding of a block with encoding of its sub-blocks, and to select the best block size for encoding.
141 Citations
50 Claims
-
1. A method for encoding a video frame to be transmitted over a communications medium, the method comprising the steps of:
-
obtaining a video frame;
separating the frame into a plurality of blocks;
encoding a plurality of blocks using inter compression;
encoding the plurality of blocks using predictive intra compression;
selecting better block compression between said steps of inter compression and intra compression for the plurality of blocks;
wherein said steps of encoding of the plurality of blocks is performed on a block by block basis, to provide optimum compression of the video frame for a given bit rate; and
wherein predictive intra compression comprises the steps of;
obtaining pixel values that are adjacent to a first block in the plurality of blocks;
predicting pixel values for the first block in the plurality of blocks from the obtained adjacent pixel values;
calculating a distance between the predicted pixal values and the actual pixel values for the first block in the plurality of blocks;
creating a residual from the calculated distance; and
encoding the residual. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
separating the frame into a plurality of macroblocks; and
separating the macroblocks into a plurality of blocks.
-
-
12. The method for encoding a video frame, as recited in claim 11, wherein the macroblocks are of size 16×
- 16 pixels.
-
13. The method for encoding a video frame, as recited in claim 11, wherein the blocks are of size 8×
- 8 pixels.
-
14. The method for encoding a video frame, as recited in claim 11, wherein the blocks are of size 8×
- 4 pixels.
-
15. The method for encoding a video frame, as recited in claim 1, wherein inter compression motion estimation of a second block in the plurality of blocks with a second block having an identical spatial location, but in a different video frame.
-
16. The method for encoding a video frame, as recited in claim 15, wherein said step of encoding the plurality of blocks using inter compression comprises comparing a second distance between the second block in the plurality of blocks with the second block in the different video frame.
-
17. The method for encoding a video frame, as recited in claim 16, wherein the second distance comprises a squared error difference of pixel values between the second block in the plurality of blocks and the second block in the different video frame.
-
18. The method for encoding a video frame, as recited in claim 17, wherein if the squared error is less than a predefined threshold, said step of encoding the plurality of blocks using inter compression comprises:
-
creating a header having a motion vector of 0,0; and
encoding the header using adaptive compression.
-
-
19. The method for encoding a video frame, as recited in claim 1, wherein inter compression comprises performing motion estimation of a second block in the plurality of blocks with a second block having a different spatial location in a different video frame.
-
20. The method for encoding a video frame, as recited in claim 1, wherein said step of encoding the plurality of blocks using inter compression comprises:
-
searching for corresponding block within a different video frame whose difference to a second block in the plurality of blocks is minimum;
calculating the difference between the second block in the plurality of blocks and the corresponding block in the different video frame;
creating a second residual from said step of calculating the difference between the second second block in the plurality of blocks and the corresponding block in the different video frame;
creating a motion vector for the second residual of corresponding to an offset between the corresponding block in the different video frame, and a second block in the different video frame having an identical spatial location to that of the second block in the plurality of blocks; and
encoding the motion vector and the second residual using adaptive compression.
-
-
21. The method for encoding a video frame, as recited in claim 20, wherein said step of searching is restricted to a predefined search area that surrounds the second block in the different video frame, but is less than the size of the different video frame.
-
22. The method for encoding a video frame, as recited in claim 20, wherein if a corresponding block in the different video frame is not found, then encoding the second block in the plurality of blocks using predictive intra compression.
-
23. The method for encoding a video frame, as recited in claim 1, wherein said step of obtaining adjacent pixel values comprises:
-
a) obtaining pixel values across the top of the first block, if available;
b) obtaining pixel values across a left side of the first block, if available;
c) calculating a mean of the pixel values obtained in steps a) and b); and
d) using the calculated mean as the predicted pixel values for the first block.
-
-
24. The method for encoding a video frame, as recited in claim 1, wherein predictive intra compression comprises:
-
a) obtaining pixel values across a top of the first block, if available;
b) obtaining pixel values across a left side of the first block, if available;
c) developing a training sequence from the pixel values obtained in steps a) and b); and
d) using the training sequence to predict pixel values for the first block.
-
-
25. The method for encoding a video frame, as recited in claim 1, wherein said steps of encoding the plurality of blocks are applied to different block sizes within a video frame.
-
26. The method for encoding a video frame, as recited in claim 1, wherein the method further comprises the step of:
segmenting the plurality of blocks into segmented blocks of different sizes, said step of segmenting for optimizing compression of the video frame.
-
27. The method for encoding a video frame, as recited in claim 1, wherein said step of segmenting comprises:
-
a) adaptively compressing a second block of a first size;
b) adaptively compressing a plurality of sub blocks of smaller size, within the second block;
c) comparing steps a) and b) to determine which block size provided optimum compression; and
d) segmenting the first block according to step c) to obtain optimum compression for the first block.
-
-
28. The method for encoding a video frame, as recited in claim 27, wherein steps b)-d) are performed recursively on selectively smaller sub blocks within the second block.
-
29. A method for encoding a video frame, the method comprising:
-
obtaining a video frame;
encoding a plurality of blocks of the video frame using inter compression;
encoding the plurality of blocks using predictive intra compression, wherein encoding the plurality of blocks using predictive intra compression comprises;
obtaining pixel values that are adjacent to the first block in the plurality of blocks, predicting pixel values for the first block in the plurality of blocks from the obtained adjacent pixel values;
calculating a distance between the predicted pixal values and the actual pixel values for the first block in the plurality of blocks;
creating a residual from the calculated distance; and
encoding the residual; and
selecting better block compression between the inter compression and the intra compression for the plurality of blocks. - View Dependent Claims (30, 31, 32)
searching for a corresponding block within a different video frame whose difference to a second block of the plurality of blocks is a minimum;
calculating the difference between the second block in the plurality of blocks and the corresponding block in the different video frame;
creating a second residual from the calculating the difference between the second block in the plurality of blocks and the corresponding block in the different video frame;
creating a motion vector for the second residual corresponding to an offset between the corresponding block in the different video frame, and a second block in the different video frame having an identical spatial location to that of the second block in the plurality of blocks; and
encoding the motion vector and the second residual using adaptive compression.
-
-
32. A method as recited in claim 29, wherein the encoding using inter compression and the encoding using predictive intra compression are applied to different block sizes within the video frame.
-
33. One or more computer readable media having stored thereon a plurality of instructions for encoding a video frame, wherein the instructions, when executed by a processor, cause the processor to perform acts comprising:
-
encoding a block of a video frame using inter compression;
encoding the block using predictive intra compression, wherein encoding the block using predictive intra compression comprises;
obtaining pixel values that are adjacent to the block, predicting pixel values for the block from the obtained adjacent pixel values, calculating a distance between the predicated pixel values and the actual pixel values for the block, creating a residual from the calculated distance, and encoding the residual;
identifying which of the encodings of the block results in a higher compression ratio for the block;
selecting the encoding of the block that results in the higher compression ratio for the block; and
repeating both of the encodings using inter compression and predictive intra compression, the identifying, and the selecting for additional blocks of the video frame. - View Dependent Claims (34, 35, 36, 37)
separating the video frame into a plurality of macroblocks; and
separating the macroblocks into the plurality of blocks.
-
-
36. One or more computer readable media as recited in claim 33, wherein encoding the block using inter compression comprises:
-
searching for a corresponding block within a different video frame whose difference to the block is smaller than other blocks within the different video frame;
calculating the difference between the block and the corresponding block;
creating a residual from the calculating the difference between the block and the corresponding block;
creating a motion vector for the residual corresponding to an offset between the corresponding block in the different video frame, and a first block in the different video frame having an identical spatial location to that of the block in the video frame; and
encoding the motion vector and the residual using adaptive compression.
-
-
37. One or more computer readable media as recited in claim 33, wherein the encoding using inter compression and the encoding using predictive intra compression are applied to different block sizes within the video frame.
-
38. A method comprising:
-
encoding a block of a video frame using inter compression;
encoding the block using predictive intra compression, wherein encoding the block using predictive intra compression comprises;
obtaining pixel values that are adjacent to the block, predicting pixel values for the block from the obtained adjacent pixel values, calculating a distance between the predicated pixel values and the actual pixel values for the block, and creating a residual from the calculated distance, and encoding the residual;
selecting the one of the encodings that results in better compression for the block. - View Dependent Claims (39, 40, 41, 42)
separating the video frame into a plurality of macroblocks; and
separating the macroblocks into a plurality of blocks, wherein the block is one of the plurality of blocks.
-
-
41. A method as recited in claim 38, wherein encoding the block using inter compression comprises:
-
searching for a corresponding block within a different video frame whose difference to the block is smaller than other blocks within the different video frame;
calculating the difference between the block and the corresponding block;
creating a second residual from the calculating the difference between the block and the corresponding block;
creating a motion vector for the second residual corresponding to an offset between the corresponding block in the different video frame, and a first block in the video frame; and
encoding the motion vector and the second residual using adaptive compression.
-
-
42. A method as recited in claim 38, wherein the encoding using inter compression and the encoding using intra compression are applied to different block sizes within the video frame.
-
43. A method comprising:
-
analyzing each of a plurality of blocks of a video frame to determine whether inter compression or predictive intra compression results in better compression for the block; and
selecting, for each of the plurality of blocks, the one of inter compression and predictive intra compression that results in better compression for the block; and
encoding a first block of the plurality of blocks using predictive intra compression by;
obtaining pixel values that are adjacent to the block, predicting pixel values for the block from the obtained adjacent pixel values, calculating a distance between the predicted pixel values and the actual pixel values for the block, creating a residual from the calculated distance, and encoding the residual. - View Dependent Claims (44, 45, 46, 47, 48, 49, 50)
separating the video frame into a plurality of macroblocks; and
separating the macroblocks into the plurality of blocks.
-
-
45. A method as recited in claim 43, wherein inter compression comprises performing motion estimation of a second block in the plurality of blocks with a second block, having an identical spatial location, but in a different video frame.
-
46. A method as recited in claim 43, wherein inter compression comprises performing motion estimation of a second block in the plurality of blocks with a second block having a different spatial location, in a different video frame.
-
47. A method as recited in claim 43, further comprising encoding a second block of the plurality of blocks using inter compression by:
-
searching for a corresponding block within a different video frame whose difference to the block is smaller than other blocks within the different video frame;
calculating the difference between the block and the corresponding block;
creating a second residual from the calculating the difference between the block and the corresponding block;
creating a second residual from the calculating the difference between the second block and the corresponding block;
creating a motion vector for the second residual corresponding to an offset between the corresponding block and another block in the different video frame having an identical spatial location to that of the second block in the plurality of blocks; and
encoding the motion vector and the second residual using adaptive compression.
-
-
48. A method as recited in claim 47, wherein if a corresponding block in the different video frame is not found, then encoding the second block in the plurality of blocks using predictive intra compression.
-
49. A method as recited in claim 43, further comprising:
-
receiving another video frame;
determining whether a block of the other video frame was compressed using inter compression or intra compression;
decompressing the block of the other video frame based on at least one additional video frame if the block of the other video frame was compressed using inter compression; and
decompressing the block of the other video frame independent of any additional video frames if the block of the other video frame was compressed using intra compression.
-
-
50. A method as recited in claim 49, wherein the video frame and the other video frame are the same frame.
Specification