# US 5,703,646 A · Picture encoding method, picture encoding apparatus and picture recording medium

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

- Number: US 5,703,646 A
- Document ID: US5703646A
- Status: Granted
- Kind: A
- Application number: 08/770,593
- Filed: 1996-12-19
- Granted: 1997-12-30
- Earliest claimed: 1993-04-09
- Assignees: Sony Corporation
- Inventors: Tsuyoshi Oda
- Web page: https://patentgrep.com/patent/US5703646A

## CPC

- H04N 9/8042: {involving data reduction}
- H04N 19/00: Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N 19/115: Selection of the code volume for a coding unit prior to coding
- H04N 19/124: Quantisation
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/15: by monitoring actual compressed data size at the memory before deciding storage at the transmission buffer
- H04N 19/172: the region being a picture, frame or field
- H04N 19/177: the unit being a group of pictures [GOP]
- H04N 19/192: the adaptation method, adaptation tool or adaptation type being iterative or recursive
- H04N 19/423: characterised by memory arrangements (H04N19/433 takes precedence)
- H04N 19/577: Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
- H04N 19/587: involving temporal sub-sampling or interpolation, e.g. decimation or subsequent interpolation of pictures in a video sequence
- H04N 19/59: involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
- H04N 19/60: using transform coding
- H04N 19/61: in combination with predictive coding
- H04N 5/781: on disks or drums
- H04N 5/85: on discs or drums
- H04N 19/107: between spatial and temporal predictive coding, e.g. picture refresh
- H04N 19/146: Data rate or code amount at the encoder output
- H04N 19/152: by measuring the fullness of the transmission buffer
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

This invention employs a scheme to allow an input video signal to undergo encoding, e.g., predictive encoding, DCT processing, quantization at fixed quantization step size and variable length encoding to generate first encoded data to determine (calculate) allocated code quantity every frame or every GOP on the basis of data quantity every predetermined time, e.g., every frame or every GOP of the first encoded data and total quantity of usable data to encode the input video signal every predetermined time on the basis of the allocated code quantity to generate second encoded data. Thus, variable rate encoding such that encoding rate changes every predetermined time is realized. As a result, even if pictures (frames) of complicated are successive, there is no possibility that quantization step size is caused to be large with respect to these pictures as in the conventional apparatus. Thus, uniform high picture quality can be obtained through the entirety. Further, since second encoded data obtained in a manner as described above has variable rate, in the case where such encoded data is recorded onto picture recording media, limited memory capacity can be effectively used, and recording time of picture recording media can be prolonged. In addition, picture data of high picture quality uniform over the entirety can be reproduced from the picture recording media.

## Claims

### Claim 1

An encoding method, comprising the steps of:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining an encoding rate of said first bit stream every GOP as a function of a data quantity of intra-frame and forward-predictive encoded pictures only in the GOP;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
setting a variable step size according to the encoding rate determined every GOP;
quantizing said second coefficient data by said variable step size;
variable length encoding said second quantized data to generate a second bit stream; and
outputting said second bit stream.

### Claim 2

An encoding apparatus, comprising:
means for receiving an input video signal;
means for selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
means for transform encoding said first encoded data to generate first coefficient data;
means for quantizing said first coefficient data by a fixed step size;
means for variable length encoding said first quantized data to generate a first bit stream;
means for determining an encoding rate of said first bit stream every GOP as a function of a data quantity of intra-frame and forward-predictive encoded pictures only in the GOP;
means for selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
means for transform encoding said second encoded data to generate second coefficient data;
means for setting a variable step size according to the encoding rate determined every GOP;
means for quantizing said second coefficient data by said variable step size;
means for variable length encoding said second quantized data to generate a second bit stream; and
means for outputting said second bit stream.

### Claim 3

A recording medium on which there is recorded a second bit stream obtained by:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining an encoding rate of said first bit stream every GOP as a function of a data quantity of intra-frame and forward-predictive encoded pictures only in the GOP;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
setting a variable step size according to the encoded data rate determined every GOP;
quantizing said second coefficient data by said variable step size;
variable length encoding said second quantized data to generate a second bit stream; and
recording said second bit stream on said recording medium.

### Claim 4

An encoding method, comprising the steps of:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by inter-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining a difficulty of encoding said first bit stream every GOP based on inter-frame and forward-predictive encoded pictures only in the GOP;
calculating an encoding rate from said difficulty of encoding determined every GOP;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing the second coefficient data by a step size set according to said calculated encoding rate;
variable length encoding said second quantized data to generate a second bit stream; and
outputting said second bit stream.

### Claim 5

An encoding apparatus, comprising:
means for receiving an input video signal;
means for selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
means for transform encoding said first encoded data to generate first coefficient data;
means for quantizing said first coefficient data by a fixed step size;
means for variable length encoding said first quantized data to generate a first bit stream;
means for determining a difficulty of encoding said first bit stream every GOP based on intra-frame and forward-predictive encoded pictures only in the GOP;
means for calculating an encoding rate from said difficulty of encoding determined every GOP;
means for selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
means for transform encoding said second encoded data to generate second coefficient data;
means for quantizing the second coefficient data by a step size set according to said calculated encoding rate;
means for variable length encoding said second quantized data to generate a second bit stream; and
means for outputting said second bit stream.

### Claim 6

A recording medium on which there is recorded a second bit stream obtained by:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining a difficulty of encoding said first bit stream every GOP based on intra-frame and forward-predictive encoded pictures only in the GOP;
calculating an encoding rate from said difficulty of encoding determined every GOP;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing the second coefficient data by a step size set according to said calculated encoding rate;
variable length encoding said second quantized data to generate a second bit stream; and
recording said second bit stream on said recording medium.

### Claim 7

An encoding method, comprising the steps of:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame or predictive encoding to generate first encoded data representing intra-frame or predictive encoded pictures, respectively;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
counting a data quantity of said first bit stream every predetermined time to indicate a difficulty of encoding;
determining said difficulty of encoding said first bit stream based on intra-frame and forward-predictive encoded pictures only;
calculating an allocated code quantity for each unit of predetermined time as a function of said difficulty of encoding so that said allocated code quantity is set to be larger for complex pictures and smaller for simple pictures;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing said second coefficient data at a step size set in response to said allocated code quantity;
variable length encoding said second quantized data to generate a second bit stream; and
outputting said second bit stream.

### Claim 8 (depends on 7)

A method according to claim 7, wherein the fixed quantization step size equals one.

### Claim 9 (depends on 7)

A method according to claim 7, further comprising the step of storing said second bit stream in a buffer before it is output, wherein said quantization step size is further based on a quantity of said second bit stream stored in said buffer.

### Claim 10 (depends on 7)

A method according to claim 7, wherein said predetermined time is a frame.

### Claim 11

An encoding apparatus, comprising:
means for receiving an input video signal;
means for selectively encoding at least a portion of said input video signal by intra-frame or predictive encoding to generate first encoded data representing intra-frame or predictive encoded pictures, respectively;
means for transform encoding said first encoded data to generate first coefficient data;
means for quantizing said first coefficient data by a fixed step size;
means for variable length encoding said first quantized data to generate a first bit stream;
means for counting a data quantity of said first bit stream every predetermined time to indicate a difficulty of encoding;
means for determining said difficulty of encoding said first bit stream based on intra-frame and forward-predictive encoded pictures only;
means for calculating an allocated code quantity for each unit of predetermined time as a function of said difficulty of encoding so that said allocated code quantity is set to be larger for complicated pictures and smaller for simple pictures;
means for selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
means for transform encoding said second encoded data to generate second coefficient data;
means for quantizing said second coefficient data at a step size set in response to said allocated code quantity;
means for variable length encoding said second quantized data to generate a second bit stream; and
means for outputting said second bit stream.

### Claim 12 (depends on 11)

An apparatus according to claim 11, wherein the fixed quantization step size equals one.

### Claim 13 (depends on 11)

An apparatus according to claim 11, further comprising a buffer for storing said second bit stream before it is output, wherein said quantization step size is further based on a quantity of said second bit stream stored in said buffer.

### Claim 14 (depends on 11)

An apparatus according to claim 11, wherein said predetermined time is a frame.

### Claim 15

A recording medium on which there is recorded a second bit stream obtained by:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame or predictive encoding to generate first encoded data representing intra-frame or predictive encoded pictures, respectively;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
counting a data quantity of said first bit stream every predetermined time to indicate a difficulty of encoding;
determining said difficulty of encoding said first bit stream based on intra-frame and forward-predictive encoded pictures only;
calculating an allocated code quantity for each unit of predetermined time as a function of said difficulty of encoding so that said allocated code quantity is set to be larger for complicated pictures and smaller for simple pictures;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing said second coefficient data at a step size set in response to said allocated code quantity;
variable length encoding said second quantized data to generate a second bit stream; and
recording said second bit stream on said recording medium.
