Intra-frame quantizer selection for video compression
First Claim
1. A method for processing digital image data of an already digitized image in accordance with a compression algorithm that imposes a maximum difference between quantization levels for consecutive macroblocks in the digitized image, comprising the steps of:
- (a) identifying one or more macroblocks corresponding to a region of interest in the digitized image;
(b) identifying one or more macroblocks corresponding to a transition region in the digitized image located between the region of interest and a least-important region in the digitized image;
(c) selecting a first quantization level for each macroblock in the region of interest;
(d) selecting a second quantization level for each macroblock in the transition region, wherein the second quantization level is greater than the first quantization level;
(e) selecting a third quantization level for each macroblock in the least-important region, wherein;
the third quantization level is greater than the second quantization level; and
the difference between the third and first quantization levels is up to twice as large as the maximum difference imposed by the compression algorithm; and
(f) encoding the digitized image based on the selected first, second, and third quantization levels in accordance with the compression algorithm.
2 Assignments
0 Petitions
Accused Products
Abstract
An image is divided into one or more (e.g., foreground) regions of interest with transition regions defined between each region of interest and the relatively least-important (e.g., background) region. Each region is encoded using a single selected quantization level, where quantizer values can differ between different regions. In general, in order to optimize video quality while still meeting target bit allocations, the quantizer assigned to a region of interest is preferably lower than the quantizer assigned to the corresponding transition region, which is itself preferably lower than the quantizer assigned to the background region. The present invention can be implemented iteratively to adjust the quantizer values as needed to meet the frame'"'"'s specified bit target. The present invention can also be implemented using a non-iterative scheme that can be more easily implemented in real time. The present invention enables a video compression algorithm to meet a frame-level bit target, while ensuring spatial and temporal smoothness in frame quality, thus resulting in improved visual perception during playback.
230 Citations
20 Claims
-
1. A method for processing digital image data of an already digitized image in accordance with a compression algorithm that imposes a maximum difference between quantization levels for consecutive macroblocks in the digitized image, comprising the steps of:
-
(a) identifying one or more macroblocks corresponding to a region of interest in the digitized image;
(b) identifying one or more macroblocks corresponding to a transition region in the digitized image located between the region of interest and a least-important region in the digitized image;
(c) selecting a first quantization level for each macroblock in the region of interest;
(d) selecting a second quantization level for each macroblock in the transition region, wherein the second quantization level is greater than the first quantization level;
(e) selecting a third quantization level for each macroblock in the least-important region, wherein;
the third quantization level is greater than the second quantization level; and
the difference between the third and first quantization levels is up to twice as large as the maximum difference imposed by the compression algorithm; and
(f) encoding the digitized image based on the selected first, second, and third quantization levels in accordance with the compression algorithm. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
(g) comparing the number of bits used to encode the image in step (f) to a bit target for the image;
(h) adjusting one or more of the first, second, and third quantization levels in accordance with the comparison of step (g); and
(i) re-encoding the image based on the adjusted quantization levels.
-
-
3. The invention of claim 2, wherein steps (g)-(i) are repeated until the number of bits used to encode the image is sufficiently close to the bit target.
-
4. The invention of claim 2, wherein:
-
if the number of bits in step (g) is sufficiently low, then step (h) comprises the step of decreasing the first quantization level and, if appropriate, decreasing the second quantization level, and then, if appropriate, decreasing the third quantization level; and
if the number of bits in step (g) is sufficiently high, then step (h) comprises the step of increasing the third quantization level and, if appropriate, increasing the second quantization level, and then, if appropriate, increasing the first quantization level.
-
-
5. The invention of claim 1, wherein the image has two or more regions of interest and each region of interest is assigned its own quantization level, which may differ between regions of interest.
-
6. The invention of claim 1, wherein the region of interest corresponds to a talking head and the least-important region corresponds to a relatively stationary background.
-
7. The invention of claim 1, wherein at least one of the first, second, and third quantization levels is selected based on modeling of rate-distortion curves at different quantization levels.
-
8. The invention of claim 7, wherein a number of bits used to encode a macroblock is modeled as follows:
-
9. The invention of claim 8, wherein the model is initialized between an I frame and the following P frame by encoding each macroblock of an intervening frame using two or more quantization levels.
-
10. The invention of claim 8, wherein the model is updated as the image data are coded.
-
11. A computer-readable medium having stored thereon a plurality of instructions, the plurality of instructions including instructions which, when executed by a processor, cause the processor to implement a method for processing digital image data of an already digitized image in accordance with a compression algorithm that imposes a maximum difference between quantization levels for consecutive macroblocks in the digitized image, the method comprising the steps of:
-
(a) identifying one or more macroblocks corresponding to a region of interest in the digitized image;
(b) identifying one or more macroblocks corresponding to a transition region in the digitized image located between the region of interest and a least-important region in the digitized image;
(c) selecting a first quantization level for each macroblock in the region of interest;
(d) selecting a second quantization level for each macroblock in the transition region, wherein the second quantization level is greater than the first quantization level;
(e) selecting a third quantization level for each macroblock in the least-important region, wherein;
the third quantization level is greater than the second quantization level; and
the difference between the third and first quantization levels is up to twice as large as the maximum difference imposed by the compression algorithm; and
(f) encoding the digitized image based on the selected first, second, and third quantization levels in accordance with the compression algorithm. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
(g) comparing the number of bits used to encode the image in step (f) to a bit target for the image;
(h) adjusting one or more of the first, second, and third quantization levels in accordance with the comparison of step (g); and
(i) re-encoding the image based on the adjusted quantization levels.
-
-
13. The invention of claim 12, wherein steps (g)-(i) are repeated until the number of bits used to encode the image is sufficiently close to the bit target.
-
14. The invention of claim 12, wherein:
-
if the number of bits in step (g) is sufficiently low, then step (h) comprises the step of decreasing the first quantization level and, if appropriate, decreasing the second quantization level, and then, if appropriate, decreasing the third quantization level; and
if the number of bits in step (g) is sufficiently high, then step (h) comprises the step of increasing the third quantization level and, if appropriate, increasing the second quantization level, and then, if appropriate, increasing the first quantization level.
-
-
15. The invention of claim 11, wherein the image has two or more regions of interest and each region interest is assigned its own quantization level, which may differ between regions of interest.
-
16. The invention of claim 11, wherein the region of interest corresponds to a talking head and the least-important region corresponds to a relatively stationary background.
-
17. The invention of claim 11, wherein at least one of the first, second, and third quantization levels is selected based on modeling of rate-distortion curves at different quantization levels.
-
18. The invention of claim 17, wherein a number of bits used to encode a macroblock is modeled as follows:
-
19. The invention of claim 18, wherein the model is initialized between an I frame and the following P frame by encoding each macroblock of an intervening frame using two or more quantization levels.
-
20. The invention of claim 18, wherein the model is updated as the image data are coded.
Specification