Claims
- 1. A method for fixed bit rate, intraframe compression of video, including a sequence of images, comprising, for each image:
transforming portions of the image to generate frequency domain coefficients for each portion; selecting a quantization matrix according to the desired bit rate; determining a bit rate for each transformed portion using a plurality of scale factors; estimating distortion for each portion according to the plurality of scale factors; selecting a scale factor for each portion to minimize the total distortion in the image to achieve a desired bit rate; quantizing the frequency domain coefficients for each portion using the selected quantization matrix as scaled by the selected scale factor for the portion; entropy encoding the quantized frequency domain coefficients using a variable length encoding to provide compressed data for each of the defined portions; and outputting the compressed data for each of the defined portions to provide a compressed bitstream at the desired bit rate.
- 2. The method of claim 1, wherein the distortion is estimated according to a square of the scale factor.
- 3. The method of claim 1, wherein quantizing the frequency domain coefficients further comprises scaling using a weighting factor selected from among a plurality of weighting factors according to the bit depth of the image data.
- 4. The method of claim 1, wherein each of the plurality of scale factors is a power of two.
- 5. The method of claim 4, wherein the selected scale factor is a power of two.
- 6. The method of claim 1, wherein determining a bit rate comprises:
determining a maximum scale factor that will cause the image data to be completely quantized; and interpolating to provide an estimated bit rate for one or more scale factors between the maximum scale factor and a largest scale factor for which a bit rate has been determined.
- 7. The method of claim 1, wherein entropy encoding comprises:
for each nonzero value not preceded by a zero value, determining whether the nonzero value is in a base range or an index range; for each nonzero value not preceded by a zero value and in the base range, encoding the nonzero value using a code word from a first set of code words; for each nonzero value not preceded by a zero value and in the index range, determining an index and encoding the nonzero value using a code word from a second set of code words, followed by the index; for each nonzero value preceded by a zero value, determining whether the nonzero value is in a base range or an index range; for each nonzero value preceded by a zero value and in the base range, encoding the nonzero value using a code word from a third set of code words and encoding the zero value using a code word from a fifth set of code words and after the code word for the nonzero value; and for each nonzero value preceded by a zero value and in the index range, determining an index and encoding the nonzero value using a code word from a fourth set of code words, followed by the index and encoding the zero value using a code word from the fifth set of code words and after the code word for the nonzero value.
- 8. The method of claim 1, wherein the quantization matrix includes a plurality of quantizers, wherein each quantizer corresponds to a frequency coefficient, and wherein quantizing the frequency coefficients includes quantizing each frequency coefficient using the corresponding quantizer so as to provide a deadzone having a width greater than a value of the quantizer.
- 9. A method for entropy encoding a series of values, comprising:
for each nonzero value not preceded by a zero value, determining whether the nonzero value is in a base range or an index range; for each nonzero value not preceded by a zero value and in the base range, encoding the nonzero value using a code word from a first set of code words; for each nonzero value not preceded by a zero value and in the index range, determining an index and encoding the nonzero value using a code word from a second set of code words, followed by the index; for each nonzero value preceded by a zero value, determining whether the nonzero value is in a base range or an index range; for each nonzero value preceded by a zero value and in the base range, encoding the nonzero value using a code word from a third set of code words and encoding the zero value using a code word from a fifth set of code words and after the code word for the nonzero value; and for each nonzero value preceded by a zero value and in the index range, determining an index and encoding the nonzero value using a code word from a fourth set of code words, followed by the index and encoding the zero value using a code word from the fifth set of code words and after the code word for the nonzero value.
- 10. A method for optimization of bit rate and distortion in compression of data, comprising:
determining a bit rate for each portion of the data being compressed using a plurality of scale factors, including:
determining a maximum scale factor that will cause total distortion to the portion of the data; and interpolating between the maximum scale factor and largest scale factor for which a bit rate has been determined to estimate a bit rate corresponding to a scale factor between the largest scale factor and the maximum scale factor; estimating distortion for each portion of the data being compressed according to the plurality of scale factors; and selecting scale factors for each portion to minimize the total distortion of the data to achieve a desired bit rate.
CROSS REFERENCE TO RELATED APPLICATION
[0001] This application claims the benefit of prior filed provisional application No. 60/460,517, filed Apr. 4, 2003, and is incorporated herein by reference.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60460517 |
Apr 2003 |
US |