# US 5,710,595 A · Method and apparatus for controlling quantization and buffering for digital signal compression

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 5,710,595 A
- Document ID: US5710595A
- Status: Granted
- Kind: A
- Application number: 08/367,375
- Filed: 1994-12-29
- Granted: 1998-01-20
- Earliest claimed: 1994-12-29
- Assignees: Lucent Technologies Inc.
- Inventors: Hsueh-Ming Hang; Barin Geoffry Haskell; Shei-Zein Kiang
- Web page: https://patentgrep.com/patent/US5710595A

## CPC

- H04N 19/587: involving temporal sub-sampling or interpolation, e.g. decimation or subsequent interpolation of pictures in a video sequence
- H04N 19/115: Selection of the code volume for a coding unit prior to coding
- H04N 19/126: Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/152: by measuring the fullness of the transmission buffer
- H04N 19/172: the region being a picture, frame or field
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/60: using transform coding
- H04N 19/146: Data rate or code amount at the encoder output
- H04N 19/50: using predictive coding (H04N19/61 takes precedence)
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method and apparatus for controlling quantization and buffering for video digital signal compression wherein a processor determines a bit budget value based on a number of frames to be skipped and a target buffer fullness. The bit budget value is used to retrieve a default Q-step value from a table of default quantization step size values and corresponding bit budget values. A default Q-step value is used to quantize the input digital signal only if it is less than a maximum. If, however, the default quantization step size value exceeds the maximum, then the number of frames to be skipped and the target buffer fullness may be increased to achieve a lower default quantization step size.

## Claims

### Claim 1

A method for quantizing and buffering a digital signal for use in a digital signal compression system, said digital signal comprising one or more frames, each frame comprising one or more blocks, the system having a default number of frames to be skipped and a bit budget value for a buffer based on the default number of frames to be skipped, the method comprising:
establishing a maximum allowable step-size value ("maximum Q-step value"), said maximum Q-step value being selected to insure an acceptable frame quality;
determining a quantization step-size value default ("default Q-step value") based on the bit budget value;
determining whether the default Q-step value is greater than the maximum Q-step value, and if the default Q-step value is greater than maximum Q-step value, then
increasing the number of frames to be skipped,
updating the bit budget value, and
updating the default Q-step value to a value based on the updated bit budget value;
selecting an actual Q-step value based on the updated default Q-step value; and
quantizing a block of a frame of an input digital signal based on the actual Q-step value.

### Claim 2 (depends on 1)

The method of claim 1 further comprising the step of:
determining if the updated default Q-step value is greater than the maximum Q-step value and the number of frames to be skipped is equal to a maximum number of frames to be skipped, and if the updated default Q-step value is greater than the maximum Q-step value and the number of frames to be skipped is equal to the maximum number of frames to be skipped, then
increasing the target buffer fullness,
updating the bit budget value, and
updating the default Q-step value to a value based on the updated bit budget value.

### Claim 3 (depends on 1)

The method of claim 1 wherein the step of determining the bit budget value comprises determining an initial bit budget value and adding a bit offset value, said bit offset value based upon a bit budget value for a previous frame and an actual number of bits produced in the previous frame.

### Claim 4 (depends on 3)

The method of claim 3 wherein the step of quantizing a frame comprises producing an actual number of bits, the method further comprising the steps of:
determining the actual number of bits produced during the step of quantizing the input digital signal;
determining the difference between the actual number of bits produced by quantizing and the initial bit budget value; and
updating the bit offset value based on the difference between the actual number of bits produced by quantizing and the initial bit budget value.

### Claim 5 (depends on 4)

The method of claim 4 wherein the input digital signal is a video signal.

### Claim 6 (depends on 1)

The method of claim 1 wherein the step of quantizing a frame comprises producing an actual number of bits, and the method further comprises the steps of:
determining the actual number of bits produced during the step of quantizing the frame of the input digital signal;
determining the difference between the actual number of bits produced during the step of quantizing the frame and the bit budget value; and
updating a subsequently calculated default Q-step value based on the difference between the actual number of bits produced by quantizing and the bit budget value.

### Claim 7 (depends on 6)

The method of claim 6 wherein the input digital signal is a video signal.

### Claim 8 (depends on 1)

The method of claim 1 wherein the input digital signal is a video signal.

### Claim 9 (depends on 1)

The method of claim 1 wherein the step of quantizing a frame of the input digital signal further comprises the steps of
a) quantizing a first macroblock of the frame using the default Q-step value;
b) determining the number of bits produced for the first macroblock;
c) adding an adjustment to the default Q-step value based on the difference between the number of bits produced for the first macroblock and a portion of the bit budget value expected for the first macroblock to produce an adjusted default Q-step value;
d) quantizing a subsequent macroblock based on using the adjusted default Q-step value;
e) adding a further adjustment to the adjusted default Q-step value based upon a number of bits produced for the subsequent macroblock; and
f) repeating steps d) and e) for a plurality of subsequent macroblocks.

### Claim 10 (depends on 9)

The method of claim 9 wherein step c) further comprises increasing a default Q-step value by predetermined amount if the difference between the number of bits produced and the portion of the bit budget value expected for the first macroblock exceeds a predetermined upper limit.

### Claim 11 (depends on 9)

The method of claim 9 wherein step c) further comprises decreasing a default Q-step value by a predetermined amount if the difference between the number of bits produced and the portion of the bit budget value expected for the first macroblock is lower than a predetermined lower limit.

### Claim 12

A method for providing quantization and buffering of a digital signal for use in a digital signal compression system, said digital signal comprising one or more frames, each frame comprising one or more blocks, the system having a default target buffer fullness and a bit budget value for a buffer based on the target buffer fullness, the method comprising:
establishing a maximum allowable step-size value ("maximum Q-step value"), said maximum Q-step value being selected to insure an acceptable frame quality;
determining a default Q-step value based on the bit budget value;
determining if the default Q-step value is greater than the maximum Q-step value;
if the default Q-step value is greater than the maximum Q-step value, then
increasing the target buffer fullness,
updating the bit budget value, and
updating the default Q-step value to a value based on the bit budget value;
selecting an actual Q-step value based on the default Q-step value; and
quantizing a frame of an input digital signal based on the actual Q-step value.

### Claim 13

An apparatus for compressing and displaying a digital video signal, said video signal comprising a plurality of frames, the apparatus comprising:
a) a digital video signal source;
b) an encoder connected to the digital video signal source, the encoder comprising a processor connected to a quantization circuit and a memory for storing a plurality of bit budget values and a corresponding plurality of default Q-step values, the processor operable to
establish a maximum allowable step-size value ("maximum Q-step value"), said maximum Q-step value being selected to insure an acceptable picture quality;
determine a first bit budget value for a frame,
retrieve a default Q-step value from memory, said default Q-step value corresponding to the first bit budget value, and adjust the default Q-step value if the retrieved default quantization size exceeds the maximum Q-step value, and send the adjusted Q-step value to the quantization circuit, wherein said quantization circuit quantizes the frame using the adjusted Q-value.

### Claim 14 (depends on 13)

The apparatus of claim 13 further comprising:
a decoder operatively connected to the encoder; and
a video display connected to the decoder.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the decoder is operatively connected to the encoder by a transmission channel.

### Claim 16

An apparatus for providing quantization and buffering of a digital signal, the digital signal comprising a plurality of frames, the apparatus comprising:
a) a quantization circuit having an input for receiving an input digital signal and an output for supplying a quantized digital signal, said quantization circuit operable to quantize a frame of the input digital signal based on a Q-step value;
b) an encoder buffer connected to the output of the quantization circuit;
c) a memory connected to the processor, the memory including a table of a plurality of default Q-step values and a corresponding plurality of bit budget values;
d) a processor connected to each of the quantization circuit, the encoder buffer and the memory, wherein the processor is operable to establish a maximum Q-step value, the maximum Q-step value being selected to insure an acceptable frame quality, determine a first bit budget value for a frame, retrieve from the table a default Q-step value based on the first bit budget values, adjust the default Q-step value if the retrieved default quantization step size exceeds the maximum Q-step value, and provide the adjusted default Q-step value to the quantization circuit.

### Claim 17 (depends on 16)

The apparatus of claim 16 wherein the processor is further operable to determine the first bit budget value by determining an initial bit budget value and adding a bit offset value.

### Claim 18 (depends on 17)

The apparatus of claim 17 further comprising:
e) a bit counter connected to the output of the quantization circuit; and
wherein the processor is further operable to receive an actual number of bits produced by the quantization circuit after quantization from the bit counter, determine the difference between the actual number of bits produced and the initial bit budget value, and adjust the bit offset value based on the difference between the actual number of bits produced and the initial bit budget value.

### Claim 19 (depends on 17)

The apparatus of claim 17 wherein the input digital signal is a video signal.

### Claim 20 (depends on 16)

The apparatus of claim 16 wherein the processor is further operable to determine the first bit budget value by computing an initial bit budget value based on a number of frames to be skipped, the number of frames to be skipped initially being set to a default value; and
if a retrieved default Q-step value is greater than the maximum Q-step value, then increase the number of frames to be skipped, update the first bit budget value, and update the default Q-step value using the updated first bit budget value.

### Claim 21 (depends on 16)

The apparatus of claim 16 wherein the processor is further operable to determine the first bit budget value by computing an initial bit budget value based on a target buffer fullness, the target buffer fullness initially being set to a default value; and
if a retrieved default Q-step value is greater than the maximum Q-step value,
increase the target buffer fullness, update the first bit budget value, and update the default Q-step value using the updated first bit budget value.

### Claim 22 (depends on 16)

The apparatus of claim 16 wherein the processor is further operable to determine the first bit budget value by computing an initial bit budget value based on a number of frames to be skipped and a target buffer fullness, the number of frames to be skipped and the target buffer fullness initially set to default values,
and wherein the processor is further operable to determine if the retrieved default Q-step value is greater than a maximum, and if the retrieved default Q-step value is greater than the maximum Q-step value, then increase the number of frames to be skipped and the target buffer fullness, update the first bit budget value, and update the default Q-step value using the table in memory.

### Claim 23 (depends on 16)

The apparatus of claim 16 wherein the input digital signal is a video signal.

### Claim 24 (depends on 23)

The apparatus of claim 23 wherein the input digital signal is a video signal.
