Quantizer control method and apparatus
First Claim
1. A method for selecting an initial quantizer step size for use in encoding an image frame, each frame having a plurality of sectors, and each sector being divided into a plurality of blocks, the method comprising the steps ofselecting a quantizer step size equal to the quantizer step size of a previously encoded frame,adjusting said selected step size by a weighted function of the difference between the actual number of bits used to encode a previous frame and a desired number of bits for coding the present frame, the weighting function being a preselected first constant divided by the number of blocks expected to be encoded, andadjusting said now modified selected quantizer step size a second weighted function of the logarithm of the ratio of the geometric mean of the total energy of the number of blocks actually to be encoded for this frame multiplied by the number of blocks expected to be encoded, and the total energy of the number of blocks actually encoded for the previous frame multiplied by the number of blocks expected to be encoded in the previous frame.
4 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for enabling a real time video encoding system to accurately deliver the desired number of bits per frame, while coding the image only once, updates the quantization step size used to quantize coefficients which describe, for example, an image to be transmitted over a communications channel. The data is divided into sectors, each sector including a plurality of blocks. The blocks are encoded, for example, using DCT coding, to generate a sequence of coefficients for each block. The coefficients can be quantized, and depending upon the quantization step, the number of bits required to describe the data will vary significantly. At the end of the transmission of each sector of data, the method and apparatus of the invention compare the accumulated actual number of bits expended with the accumulated desired number of bits expended, for a selected number of sectors associated with the particular group of data. The system then readjusts the quantization step size to target a final desired number of data bits for a plurality of sectors, for example describing an image. Various methods are described for updating the quantization step size and determining desired bit allocations.
280 Citations
14 Claims
-
1. A method for selecting an initial quantizer step size for use in encoding an image frame, each frame having a plurality of sectors, and each sector being divided into a plurality of blocks, the method comprising the steps of
selecting a quantizer step size equal to the quantizer step size of a previously encoded frame, adjusting said selected step size by a weighted function of the difference between the actual number of bits used to encode a previous frame and a desired number of bits for coding the present frame, the weighting function being a preselected first constant divided by the number of blocks expected to be encoded, and adjusting said now modified selected quantizer step size a second weighted function of the logarithm of the ratio of the geometric mean of the total energy of the number of blocks actually to be encoded for this frame multiplied by the number of blocks expected to be encoded, and the total energy of the number of blocks actually encoded for the previous frame multiplied by the number of blocks expected to be encoded in the previous frame.
-
4. A method for transmitting a selected number of bits for representing an encoded image, the number of bits being transmitted being a function of a quantizer step size, said image being comprised of a plurality of sectors, each sector being comprised of a plurality of blocks, said method comprising the steps of
determining a desired number of bits to be allocated to each sector, transmitting said sectors in a selected sequence, and associating a quantizer step size with each sector, said associating step comprising setting the quantizer step size for a sector as a function of the difference in number of bits actually transmitted for all previous sectors of the image and the desired number of bits to be transmitted for all previous sectors of the image.
- 7. A method for transmitting a selected number of bits for representing an encoded image, the number of bits being transmitted being a function of a quantizer step size, said image being comprised of a plurality of sectors, each sector being comprised of a plurality of blocks, said apparatus comprising the step of
allocating available bits to blocks of the image to be encoded according to the relationship - space="preserve" listing-type="equation">B(n)=B.sub.d (n)/N(n)+1/2Log.sub.2 (E(n)/E.sub.TOT (n))
where B(n) is the number of bits allocated to block B for frame n; N(n) is the number of blocks of frame n actually coded; Bd (n) is the desired number of bits allocated to code frame n; E(n) is the prediction error energy for block B of frame n (wherein the DC component is omitted for intrablocks); and ETOT (n) is the geometric mean of energy for all blocks (N) actually to be coded for frame n.
-
8. An apparatus for selecting an initial quantizer step size for use in encoding an image frame, each frame having a plurality of sectors, and each sector being divided into a plurality of blocks, the apparatus comprising
means for selecting a quantizer step size equal to the quantizer step size of a previously encoded frame, means for adjusting said selected step size by a weighted function of the difference between the actual number of bits used to encode a previous frame and a desired number of bits for coding the present frame, the weighting function being a preselected first constant divided by the number of blocks expected to be encoded, and means for adjusting said now modified selected quantizer step size by a second weighted function of the logarithm of the ratio of the geometric mean of the total energy of the number of blocks actually to be encoded for this frame multiplied by the number of blocks expected to be encoded, and the total energy of the number of blocks actually encoded for the previous frame multiplied by the number of blocks expected to be encoded in the previous frame.
-
11. An apparatus for transmitting a selected number of bits for representing an encoded image, the number of bits being transmitted being a function of a quantizer step size, said image being comprised of a plurality of sectors, each sector being comprised of a plurality of blocks, said apparatus comprising
means for determining a desired number of bits to be allocated to each sector, means for transmitting said sectors in a selected sequence, and means for associating a quantizer step size with each sector, said associating means comprising means for setting the quantizer step size for a sector as a function of the difference in number of bits actually transmitted for all previous sectors of the image and the desired number of bits to be transmitted for all previous sectors of the image.
- 14. An apparatus for transmitting a selected number of bits for representing an encoded image, the number of bits being transmitted being a function of a quantizer step size, said image being comprised of a plurality of sectors, each sector being comprised of a plurality of blocks, said apparatus comprising means for allocating available bits to blocks of the image to be encoded according to the relationship
- space="preserve" listing-type="equation">B(n)=B.sub.d (n)/N(n)+1/2Log.sub.2 (E(n)/E.sub.TOT (n))
where B(n) is the number of bits allocated to block B for frame n; N(n) is the number of blocks of frame n actually coded; Bd (n) is the desired number of bits allocated to code frame n; E(n) is the prediction error energy for block B of frame n (wherein the DC component is omitted for intrablocks); and ETOT (n) is the geometric mean of energy for all blocks (N) actually to be coded for frame n.
Specification