# US 2008/0304564 A1 · Bitrate control method and apparatus for intra-only video sequence coding

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

- Number: US 2008/0304564 A1
- Document ID: US20080304564A1
- Status: Published application
- Kind: A1
- Application number: 12/013,655
- Filed: 2008-01-14
- Published: 2008-12-11
- Earliest claimed: 2007-06-11
- Assignees: Samsung Electronics Co., Ltd.
- Inventors: Nak-hoon KIM; Byung-cheol Song; Yun-gu Lee
- Web page: https://patentgrep.com/patent/US20080304564A1

## CPC

- H04N 19/174: the region being a slice, e.g. a line of blocks or a group of blocks
- 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/149: by estimating the code amount by means of a model, e.g. mathematical model or statistical model
- H04N 19/152: by measuring the fullness of the transmission buffer
- H04N 19/177: the unit being a group of pictures [GOP]
- H04N 19/197: {including determination of the initial value of an encoding parameter (H04N19/56 takes precedence)}
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A bitrate control method and apparatus for video sequence coding by using only intra pictures are provided. The rate control method includes: separating a video sequence formed only with intra pictures, into picture group units, slice units, and macroblock units; and performing bitrate control so that a predetermined amount of bits can be generated when encoding is performed. According to the method and apparatus, overflow and underflow of a buffer can be prevented.

## Claims

### Claim 1

A method of controlling a bitrate when a video sequence formed only with intra pictures is encoded, the method comprising:
dividing the intra pictures into a plurality of picture groups, and determining target bit amounts of the plurality of picture groups;
dividing intra pictures included in a first picture group into a plurality of slices, and determining target bit amounts of the plurality of slices based on a target bit amount of the first picture group;
determining a target bit amount of a first macroblock included in a first slice of the plurality of slices based on a target bit amount of the first slice; and
calculating a quantization parameter of a current macroblock to be encoded, by considering the determined target bit amount of the first macroblock, a generated bit amount allocated to a previous macroblock, and buffer fullness.

### Claim 2 (depends on 1)

The method of claim 1, wherein the dividing of the intra pictures into the plurality of picture groups comprises, if the plurality of intra pictures are common mode intra pictures in which the plurality of intra pictures comprise images of a plurality of color components, dividing the plurality of intra pictures so that each of the plurality of picture groups comprises an identical number of intra pictures.

### Claim 3 (depends on 1)

The method of claim 1, wherein the dividing of the intra pictures into the plurality of picture groups comprises, if the plurality of intra pictures are common mode intra pictures in which intra pictures comprise images of a plurality of color components, dividing the plurality of intra pictures with reference to an intra picture in which a scene changes.

### Claim 4 (depends on 1)

The method of claim 1, wherein the dividing of the plurality of intra pictures into the plurality of picture groups comprises, if the plurality of intra pictures are independent mode intra pictures in which the plurality of intra pictures comprise images of only one corresponding color component among a plurality of color components, dividing the plurality of intra pictures so that a number of intra pictures having a first color component image in a first picture group is the same as a number of intra pictures having a second color component image in a second picture group.

### Claim 5 (depends on 1)

The method of claim 1, wherein the dividing of the plurality of intra pictures into the picture groups comprises, if the plurality of intra pictures are independent mode intra pictures in which the plurality of intra pictures comprise images of only one corresponding color component among a plurality of color components, dividing the plurality of intra pictures so that one picture group comprises intra pictures of images of only one color component selected from the plurality of color component images.

### Claim 6 (depends on 1)

The method of claim 1, wherein the determining of the target bit amounts of the plurality of picture groups comprises determining a target bit amount RGOP(i) of an i-th picture group to which a macroblock being currently encoded belongs using the following equation:
R
GOP

(
i
)
=
R
GOP

(
i
-
1
)
+
k
*
bit_rate
picture_rate
where RGOP(i) is the target bit amount of the i-th picture group (i≧0) to which the macroblock being currently encoded belongs, RGOP(i−1) is a target bit amount allocated to an (i−1)-th picture group previous to the current i-th picture group, RGOP(−1)=0, k is a total number of intra pictures included in the i-th picture group, bit_rate is an amount of bits which are generated per second, and picture_rate is a number of intra pictures which are generated per second.

### Claim 7 (depends on 1)

The method of claim 1, wherein the determining of the target bit amounts of the plurality of slices comprises,
determining a bit amount allocated to a current slice using the following equation:
T
slice

(
i
,
j
)
=
max
(
T
slice
min
,
R
GOP

(
i
,
j
)
N
Slice

(
i
,
j
)
)
where RGOP(i,j) is an amount of bits that can be used from among a bit amount allocated to an i-th picture group at a time when a j-th slice is encoded, NSlice(i,j) is a number of slices that are not encoded in the i-th picture group when the j-th slice of the i-th picture group is encoded, TSlicemin is a minimum value of a bit amount that should be allocated to a slice, and Tslice(i,j) is an amount of bits allocated to the current slice corresponding to the j-th slice of the i-th picture group.

### Claim 8 (depends on 1)

The method of claim 1, wherein the determining of the target bit amount of the first macroblock comprises determining the target bit amount of the current macroblock using the following equation:
T
MB

(
i
,
j
)
=
T
Slice

(
i
,
j
)
n
Slice
where TMB(i,j) is a target bit amount for the current macroblock at a j-th slice of an i-th picture group, and nSlice is a number of macroblocks included in the j-th slice.

### Claim 9 (depends on 1)

The method of claim 1, wherein the determining of the quantization parameter of the current macroblock comprises:
calculating the quantization parameter for encoding the current macroblock, by considering buffer fullness, the target bit amount for the first macroblock unit, and the bit amount allocated to the previous macroblock;
comparing the buffer fullness with a reference value, and according to a magnitude of the buffer fullness, determining whether or not an overflow or underflow of a buffer occurs, and generating a calibration value for calibrating the quantization parameter; and by adding the calibration value to the calculated quantization parameter, calculating a calibrated quantization parameter.

### Claim 10 (depends on 1)

The method of claim 1, further comprising, if encoding of all macroblocks included in the first slice is completed, updating values of variables related to bitrate control in order to encode a second slice of the plurality of slices.

### Claim 11

An apparatus for controlling a bitrate when a video sequence formed only with intra pictures is encoded, the apparatus comprising:
a buffer that temporarily stores an encoded bitstream;
a target bit amount determination unit for picture group units that divides the intra pictures into a plurality of picture groups, and determines target bit amounts of the plurality of picture groups;
a target bit amount determination unit for slice units that divides intra pictures included in a first picture group into a plurality of slices, and determines target bit amounts of the plurality of slices based on a target bit amount of the first picture group;
a target bit amount determination unit for macroblock units that determines a target bit amount of a first macroblock included in a first slice of the plurality of slices based on the target bit amount of the first slice;
a bitrate adjustment unit that determines a quantization parameter for encoding a current macroblock, by considering a buffer fullness, the determined target bit amount for the first macroblock unit, and a bit amount generated for a previous macroblock, and by comparing a magnitude of the buffer fullness with a reference value at a time when the current macroblock is encoded, generating a calibration value according to the buffer fullness, and by adding the generated calibration value to the quantization parameter, generating and outputting a calibrated quantization parameter; and
an encoding unit that quantizes the current macroblock based on the calibrated quantization parameter and generates a bitstream.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein, if the plurality of intra pictures are common mode intra pictures in which the plurality of intra picture comprises images of a plurality of color components, the target bit amount determination unit for picture group units divides the plurality of intra pictures so that each of the plurality of picture groups comprises an identical number of intra pictures.

### Claim 13 (depends on 11)

The apparatus claim 11, wherein, if the plurality of intra pictures are common mode intra pictures in which the plurality of intra pictures comprises images of a plurality of color components, the target bit amount determination unit for picture group units divides the plurality of intra pictures with reference to an intra picture in which a scene changes.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein, if the plurality of intra pictures are independent mode intra pictures in which the plurality of intra pictures comprises images of only one corresponding color component among a plurality of color components, the target bit amount determination unit for picture group units divides the plurality of intra pictures so that a number of intra pictures having a first color component image in a first picture group is the same as a number of intra pictures having a second color component image in a second picture group.

### Claim 15 (depends on 11)

The apparatus of claim 11, wherein, if the plurality of intra pictures are independent mode intra pictures in which the plurality of intra pictures comprises images of only one corresponding color component among a plurality of color components, the target bit amount determination unit for picture group units divides the plurality of intra pictures so that one picture group comprises intra pictures of images of only one color component selected from the plurality of color component images.

### Claim 16 (depends on 11)

The apparatus of claim 11, wherein the target bit amount determination unit for picture group units determines a target bit amount RGOP(i) of an i-th picture group to which a macroblock being currently encoded belongs using the following equation:
R
GOP

(
i
)
=
R
GOP

(
i
-
1
)
+
k
*
bit_rate
picture_rate
where RGOP(i) is the target bit amount of the i-th picture group (i≧0) to which the macroblock being currently encoded belongs, RGOP(i−1) is a target bit amount allocated to an (i−1)-th picture group previous to the current i-th picture group, RGOP(−1)=0, k is a total number of intra pictures included in the i-th picture group, bit_rate is an amount of bits which are generated per second, and picture_rate is a number of intra pictures which are generated per second.

### Claim 17 (depends on 11)

The apparatus of claim 11, wherein the target bit amount determination unit for slice units determines a bit amount allocated to a current slice using the following equation:
T
slice

(
i
,
j
)
=
max

(
T
slice
min
,
R
GOP

(
i
,
j
)
N
Slice

(
i
,
j
)
)
where RGOP(i,j) is an amount of bits that can be used from among a bit amount allocated to an i-th picture group at a time when a j-th slice is encoded, NSlice(i,j) is a number of slices that are not encoded in the i-th picture group when the j-th slice of the i-th picture group is encoded, TSlicemin is a minimum value of a bit amount that should be allocated to a slice, and Tslice(i,j) is an amount of bits allocated to the current slice corresponding to the j-th slice of the i-th picture group.

### Claim 18 (depends on 11)

The apparatus of claim 11, wherein the target bit amount determination unit for macroblock units determines the target bit amount of the current macroblock using the following equation:
T
MB

(
i
,
j
)
=
T
Slice

(
i
,
j
)
n
Slice
where TMB(i,j) is a target bit amount for the current macroblock at a j-th slice of an i-th picture group, and nSlice is a number of macroblocks included in the j-th slice.
