Pulse or digital communications – Bandwidth reduction or expansion – Television or motion video signal
Reexamination Certificate
2000-03-28
2001-01-09
Kelley, Chris S. (Department: 2713)
Pulse or digital communications
Bandwidth reduction or expansion
Television or motion video signal
Reexamination Certificate
active
06173012
ABSTRACT:
TECHNICAL FIELD
The present invention relates to a method and apparatus for digital compression encoding of images, such as video signals, and more particularly to an apparatus and method for controlling the quantizing width when encoding and/or controlling the number of bits generated.
BACKGROUND OF THE INVENTION
An international standard for compressing image signals and converting same into a digital code is known as ISO/IEC 13818-2, also known as MPEG2. A typical method of digital encoding image signals conforming to that format is shown in Test Model 3 of ISO-IEC/JTC/SC29/WG11 No. 328.
FIG. 1
of the present drawings is a block diagram of a typical MPEG2 video encoding apparatus. This MPEG2 video encoding apparatus comprises a frame converter
101
for shuffling input video signal into encoding sequence, a block converter
102
for converting picture data into encoding units called macro blocks, a subtractor
103
for determining the difference between an input macro block and a predicted value with respect to its image data, a DCT (discrete cosine transform)
104
, a quantizer
105
, a variable length encoder
106
, an inverse quantizer
107
, an IDCT (inverse discrete cosine transform)
108
, a motion compensation block
109
, a mode discriminator
110
a motion detector
111
, a quantizer control block
112
, an encoder buffer
113
, and an adder
114
.
Prior to explaining the operation of the above-described MPEG2 video encoding apparatus, a data structure for image encoding is described with reference to FIG.
2
.
Each picture of an image to be encoded is divided into macro blocks and encoded. The picture is an image of, for example, a frame or field unit, and unless otherwise noted in the following description, a frame is referred to as a picture. The macro block is a data area of 16×16 pixels, and the luminance and color difference signals are respectively encoded in blocks of 8×8 pixels each.
One data unit called a slice is composed of a plurality of macro blocks, and one picture is composed of a plurality of slices. The picture consists of an I picture encoded using information only from itself, a P picture predicted from a past picture in time, and a B picture predicted from both past and future pictures in time. The picture configuration in
FIG. 2
is a typical example in which a P picture, three pictures ahead, is predicted by using a first I picture, and B pictures are arranged on both sides of the P picture. Therefore, when encoding, it is necessary to first encode the I picture, then the P picture, and then the B pictures, which requires rearrangement of images in the original time direction.
Furthermore, with a plurality of pictures starting from an I picture, a group of pictures (GOP) is composed, and one video sequence is composed of an arbitrary number of GOPs. Thus, again, the macro block is defined as an image segment, and the slice, picture, and GOP composed of a plurality of macro blocks may be defined as image segment groups. Supposing the GOP to be an image segment group, then for example, a picture that is a smaller image segment group may be defined as a sub-set of a GOP or image segment group.
With the understanding of the above-described data structure, the operation of the MPEG2 video encoding apparatus of
FIG. 1
is described below.
An input signal is fed into the frame converter
101
, and the sequence of pictures of input image is converted. The output of the frame converter
101
is supplied to the block converter
102
, and the block converter
102
divides the entered image into macro blocks of 16×16 pixels each, and supplies those macro blocks to the subtractor
103
. In the subtractor
103
, the predicted value obtained from the motion compensation block
109
is subtracted from the signal supplied from the block converter
102
, and a predicted error is determined. That predicted error is transformed in the DCT
104
into each block of 8×8, and each resulting transformed coefficient is quantized in the quantizer
105
, thereby creating quantized data. The quantized data is variable length encoded in the variable length encoder
106
, and compressed encoded data is thereby created. The compressed encoded data is, in order to be transmitted at a desired transmission rate, stored in the encoder buffer
113
, and thereafter issued.
The data quantized in the quantizer
105
is reproduced in the inverse quantizer
107
and IDCT
108
to produce a predicted image. The reproduced image data is passed to the motion compensation block
109
, and a predicted value is calculated and supplied to the subtractor
103
. The motion detector
111
calculates the motion vector in every macro block, and the motion vector is supplied to the motion compensation block
109
, and is also supplied to the variable length encoder
106
. The quantizer control block
112
compares the number of generated bits in the bit stream transmitted from the variable length encoder
106
and a target number of generated bits converted from a target bit rate, and controls the quantizing width of the quantizer
105
so that encoding is finally completed with the target number of bits.
Processing in the quantizer control block
112
is described below. The target number of bits per GOP converted from the target bit rate is G, the number of bits left over in this GOP in the process of encoding is R, the number of generated bits of the image of I, P, and B pictures encoded immediately before are respectively SI, SP, SB, and the averages of quantizing parameters at this time are respectively Qng QP, QB. Thus, the difficulty in encoding each picture XI, XP, XB is respectively defined as XI=SI×QI, XP=SP×QP, XB=SB×QB, and the target number of bits for encoding each picture is calculated, with respect to I, P and B pictures, as follows:
TI
=
R
1
+
NP
·
XP
XI
·
Kp
+
NB
·
XB
XI
·
Kb
(
1
)
TP
=
R
NP
+
Kp
·
NB
·
XB
XP
·
Kb
(
2
)
TB
=
R
NP
+
Kb
·
NP
·
XB
XB
·
Kp
(
3
)
where Kp, Kb are constants, and HP, NB are the numbers of remaining P pictures and B pictures not yet encoded. The value of R is updated at R=R−S, supposing the number of bits generated in the picture to be S, and is updated at R=R+G at the beginning of the GOP. That is, the number of bits generated per GOP is determined, bits are assigned and encoded depending on the composition ratio of each picture, the number of generated bits is determined in each picture, the value is subtracted from R, the target number of generated bits is corrected and assigned in each picture again, and the same procedure repeats. Further, when the number of bits required for encoding one GOP is different from the target number of bits assigned in the GOP, either one is assigned in the target number of generated bits in the next GOP.
The method of controlling the quantizing parameters from the target number of generated bits of each picture is described below. First, virtual buffers are assumed for I, P and B pictures, and supposing the target number of generated bits in each macro block is constant when encoding an i-th macro block, the data remainders of the virtual buffers dIi, dPi, dBi are expressed as follows.
dIi=dI
0
+B
i−1
−TI
×(
i−
1)/
MB
—
cnt
(4)
dPi=dP
0+
B
i−1
−TP
×(
i−
1)/
MB
—
cnt
(5)
dBi=dB
0
+B
i−1
−TB
×(
i−
1)/
MB
—
cnt
(6)
where Bi is the number of generated bits in all preceding macro blocks including i, MB_cnt is the number of macro blocks contained in one picture, and dI0, dP0, dB0 are initial values of buffer remainders at the beginning of each picture. In these formulas, the second term, i.e., B
i−1
, refers to the number of bits required to encode up to the immediately preceding macro block, and the third term, i.e., T
i
×(i−1)/MB_cnt, expresses the target number of bits req
Katta Noboru
Nakamura Kazuhiko
An Shawn S.
Kelley Chris S.
Matsushita Electric - Industrial Co., Ltd.
Parkhurst & Wendel L.L.P.
LandOfFree
Moving picture encoding apparatus and method does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Moving picture encoding apparatus and method, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Moving picture encoding apparatus and method will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2479638