The present invention relates to a video encoding technique, and in particular, to a technique for preventing degradation in image quality while suppressing the amount of code generated for an encoding target picture so that no buffer underflow occurs on the decoding side.
Priority is claimed on Japanese Patent Application No. 2010-106104, filed May 6, 2010, the contents of which are incorporated herein by reference.
In an ordinary decoder, received encoded data is stored in a buffer until the data is decoded to be displayed. The decoded encoded data is withdrawn from the buffer.
When encoding a video image, the state of the decoder-side buffer should be considered so as to prevent a result that the video cannot be decoded. Accordingly, a test using a virtual decoder buffer is performed during the encoding, so as to ensure that the decoding will succeed.
The decoder buffer has two abnormal states, that is, overflow and underflow.
In the overflow, encoded data reaches the decoder at a speed higher than a speed for decoding and displaying the data. If receiving encoded data at a speed higher than the decoding and displaying speed, the amount of code for the received data is larger than the amount of code for data withdrawn from the buffer, so that the amount of received data may exceed the capacity of the decoder buffer. In a known measure to prevent the overflow of the decoder buffer, useless data (for data staffing or filling) are inserted so as to reduce the speed for receiving necessary data, thereby preventing the overflow.
In contrast, in the underflow, necessary encoded data has not yet been received when decoding and displaying the data. In order to prevent the underflow, an appropriate target amount of code for preventing the underflow may be set so as to control the amount of generated code. In another method using a picture skip technique, the number of pictures to be encoded is reduced so as to prevent the underflow. Both methods prevent the underflow by suppressing the amount of generated code.
For example, Patent Document 1 discloses a method which performs a decoder buffer examination for determining whether or not an underflow has occurred. If an underflow has occurred, original encoded data is replaced with skip encoded data.
First, in the decoder buffer examination, it is determined whether or not an underflow has occurred (see step S100). If an underflow is detected, the amount of generated code is suppressed through a generated code amount control process (see step S101).
Suppression of the amount of generated code may be performed by a control method for reducing the difference between the amount of generated code and the target amount of code, a method of skipping a picture for which an underflow is detected, or a method of generating dummy encoded data which produces a minimum amount of generated code.
The detection of occurrence of the underflow is executed before or after the relevant encoding.
If executing the underflow detection after the encoding, an encoded stream of the picture for which the underflow has been detected should be cancelled.
In addition, the rate of occupancy in the decoder buffer immediately before the decoding of a picture at time t can be computed by the following formula.
B(t)=B(0)+R*t−ΣG(i)
where B(0) is an initial value of the rate of occupancy in the decoder buffer, R denotes a bit rate, and G(i) denotes the amount of code generated for a picture at time i.
A situation in which the underflow tends to occur, that is, the rate of occupancy in the decoder buffer decreases occurs when the amount of generated code is relatively large with respect to the bit rate.
When the rate of buffer occupancy is low, the amount of generated code should be suppressed so as to prevent the underflow. However, in a case in which complex video images (e.g., including any textures) continue, if the amount of generated code is extremely suppressed, a distortion in the encoding clearly appears. Such a state continues until the corresponding complex scene ends and the rate of occupancy in the decoder buffer returns to an appropriate level.
Conventional methods thus have a problem in which when the rate of occupancy in the decoder buffer decreases, degradation in the decoded image is prominent for a certain time.
In order to solve the problem, Patent Document 1 discloses a method of preferentially skipping a B picture which is not referred to by another picture.
However, B pictures originally generate a relatively small amount of code, and the number of B pictures to be inserted is restricted. Therefore, even with skipping, a considerable period of time is required until the rate of occupancy in the decoder buffer returns to an appropriate level. This means that a state in which the amount of generated code is suppressed and the image quality is degraded continues for a considerable period of time.
Therefore, an object of the present invention is to solve the problem accompanied with a decrease in the rate of occupancy of the decoder buffer, for which degradation in the decoded image clearly appears for a certain time in conventional methods, and to prevent degradation in quality of an encoding target picture after an underflow is detected.
In order to achieve the above object, the present invention provides a video encoding control method for controlling encoding of an input video signal, the method comprising the steps of:
detecting an underflow of a decoder buffer;
if the underflow of the decoder buffer has been detected, suppressing an amount of generated code by skipping an encoding target picture or by encoding the encoding target picture so as to produce a minimum amount of generated code;
after suppressing the amount of generated code, comparing a current rate of occupancy in the decoder buffer with a predetermined threshold for the rate of occupancy in the decoder buffer; and
performing a control for continuously suppressing the amount of code generated for each encoding target image by using the above step of suppressing the amount of generated code until the rate of occupancy in the decoder buffer exceeds the threshold based on a result of the above comparison.
The present invention also provides a video encoding control method for controlling encoding of an input video signal, the method comprising the steps of:
detecting an underflow of a decoder buffer;
if the underflow of the decoder buffer has been detected, computing a period of time for suppressing an amount of generated code based on a predetermined threshold for a rate of occupancy in the decoder buffer and an encoding bit rate; and
performing a control for continuously suppressing the amount of code generated for each encoding target image during the computed period of time, by skipping the encoding target picture or by encoding the encoding target picture so as to produce a minimum amount of generated code.
The present invention also provides a video encoding control apparatus for controlling encoding of an input video signal, the apparatus comprising:
a device that detects an underflow of a decoder buffer;
a device that suppresses an amount of generated code by skipping an encoding target picture or by encoding the encoding target picture so as to produce a minimum amount of generated code;
a device that compares a current rate of occupancy in the decoder buffer with a predetermined threshold for the rate of occupancy in the decoder buffer; and
a device that performs, if the underflow of the decoder buffer has been detected, a control for continuously suppressing the amount of code generated for each encoding target image by using the above device that suppresses the amount of generated code until the rate of occupancy in the decoder buffer exceeds the threshold.
The present invention also provides a video encoding control apparatus for controlling encoding of an input video signal, the apparatus comprising:
a device that detects an underflow of a decoder buffer;
a device that suppresses an amount of generated code by skipping an encoding target picture or by encoding the encoding target picture so as to produce a minimum amount of generated code;
a device that computes a period of time for suppressing an amount of generated code based on a predetermined threshold for a rate of occupancy in the decoder buffer and an encoding bit rate; and
a device that performs, if the underflow of the decoder buffer has been detected, a control for continuously suppressing the amount of code generated for each encoding target image during the computed period of time, by using the above device that suppresses the amount of generated code.
In accordance with the present invention, the amount of generated code can be suppressed until the rate of occupancy in the decoder buffer exceeds a threshold. Therefore, after detecting an underflow, it is unnecessary to continuously keep suppressing the amount of generated code so as to prevent the underflow. Accordingly, image quality can be improved.
First, the present invention is generally explained.
When the rate of occupancy in the decoder buffer decreases, degradation in the decoded image clearly appears for a certain period of time. This is because the amount of generated code is suppressed due to a low level (i.e., of the rate of occupancy) of the decoder buffer.
Therefore, in order to restore an appropriate level of the decoder buffer, the present invention performs a process (such as picture skipping) of minimizing the amount of code for a specific period of time. The minimization of the amount of generated code is continued until the level of the decoder buffer exceeds a predetermined threshold.
First, similar to conventional methods, a decoder buffer examination is executed (see step S1). If no problem is detected in the examination, the encoding process is continued.
If an underflow has been detected, a process for suppressing the amount of generated code is performed by subjecting an encoding target picture to skip or encode with a minimum amount of generated code, similar to conventional methods (see step S2).
Next, it is determined whether or not the rate of occupancy in the decoder buffer exceeds a predetermined threshold (see step S3).
If the rate is still under the threshold, the next picture input after the current encoding target picture is defined as a new encoding target picture, for which a generated code amount suppression process is executed (see step S2).
Such a process is iterated until the rate of occupancy in the decoder buffer exceeds the predetermined threshold.
As described above, in the present invention, a threshold for stopping the generated code amount suppressing means (e.g., picture skipping) is independently set in addition to a threshold for detecting a decoder buffer underflow, and a generated code amount suppressing process is continuously performed by the generated code amount suppressing means until the rate of occupancy in the decoder buffer exceeds a threshold. When the rate of occupancy exceeds the threshold, the operation returns to the ordinary encoding process.
According to such a method, it is possible to concentratedly suppress the generated code amount for a short period of time, thereby preventing degradation in the quality of the encoding target picture after an underflow of the decoder buffer is detected.
Although there is no point in setting the predetermined threshold to an extremely low level, an extremely high level increases the period of time for suppressing the generated code amount. Therefore, the threshold may be:
(i) half the maximum buffer size (approximately 40% to 6% of the maximum size); or
(ii) an initial buffer level when decoding of an encoding stream is started.
Below, specific embodiments of the present invention will be explained by referring to the drawings.
A predicted signal generating unit 101 generates a predicted signal based on a residual between an input video signal and an interframe predicted signal.
This predicted signal is input into an orthogonal transformation unit 102, which outputs transform coefficients obtained by an orthogonal transformation (e.g., DCT transform).
The transform coefficients are input into a quantization unit 103, where they are quantized in accordance with a quantization step size set by a quantization control unit 113.
The quantized transform coefficients are input into an information source encoding unit 104, where they are subjected to entropy encoding.
The encoded data output from the information source encoding unit 104 is stored via a switching unit 114 into an encoded data buffer 115.
Simultaneously, the quantized transform coefficients are subjected to inverse quantization in an inverse quantization unit 105, and further to an inverse orthogonal transformation in an inverse orthogonal transformation unit 106, thereby generating a decoded predicted signal.
This decoded predicted signal is added to the interframe predicted signal in an adder 107, thereby generating a decoded signal.
The decoded signal is subjected to clipping in a clipping unit 108, and is then stored in a frame memory 109 so as to be used as a reference image in the predictive encoding of the next frame.
A motion detection unit 110 performs motion detection of the input video signal by means of motion search, and outputs an obtained motion vector to a motion compensation unit 111 and the information source encoding unit 104.
The information source encoding unit 104 performs entropy encoding of the motion vector.
The motion compensation unit 111 refers to the frame memory 109 in accordance with the motion vector, so as to generate the interframe predicted signal.
In the present embodiment, underflow detection is executed after the encoding process, and an assumed process for suppressing the amount of generated code is picture skipping.
The encoding control unit 112 receives an encoding bit rate and the amount of generated code sent from the encoded data buffer 115, and computes the rate of occupancy in a decoder buffer on the decoding side.
If an underflow of the decoder buffer is detected, the encoding control unit 112 outputs encoded data cancellation information to the switching unit 114, so that encoded data of the corresponding picture is cancelled by opening the relevant switch (i.e., picture skipping). The open state of this switch is maintained, that is, picture skipping is continued until the rate of occupancy in the decoder buffer exceeds a threshold.
When the rate of occupancy in the decoder buffer exceeds the threshold, the switch is closed, so that the encoded data generated in the information source encoding unit 104 is set to the encoded data buffer 115.
First, the encoding target picture is encoded (see step S10). Next, examination of the decoder buffer is executed (see step S11). If no problem is found in the examination, the operation applied to the encoding target picture is completed.
If an underflow is found, encoded data that is a result of the encoding of the encoding target picture is cancelled, and a threshold is set for the rate of occupancy in the decoder buffer (see step S12).
Then the encoding target picture is cancelled (see step S13), and encoded data corresponding to the picture skipping is generated (see step S14).
After that, the rate of occupancy in the decoder buffer is compared with the threshold (see step S15).
According to the comparison, if the rate of occupancy in the decoder buffer is lower than or equal to the threshold, the input picture next to the current encoding target picture is determined to be a new encoding target picture, for which the cancellation of the encoding target picture (step S13) and the encoded data generation for the picture skipping (step S14) are performed again.
If the result of the comparison indicates that the relevant rate is higher than the threshold, the operation of suppressing the generated code amount according to the present encoding control is completed.
In the present embodiment, if an underflow is detected at time t, picture skipping is continued up to time t+n when the rate of occupancy in the decoder buffer exceeds a relevant threshold VBVth.
Since the amount of code generated for the picture skipping can be estimated to be almost 0, the rate of occupancy in the decoder buffer increases along a slope according to the bit rate for a time from t to t+n.
In the present embodiment, the picture skipping is iterated until the rate of occupancy in the decoder buffer exceeds the threshold. However, the number of pictures to be skipped may be computed in advance, based on the rate of occupancy at the time when the underflow was detected and the threshold.
Here, it is assumed that the buffer occupancy level at the time when the underflow was detected is B(t0), R denotes the bit rate, Gs denotes the amount of code generated for the picture skipping, and Bth denotes a predetermined threshold.
Then a natural number which exceeds n computed by the following formula can be determined to be the number of skipped pictures:
n=(Bth−B(t0))/(R−Gs)
If the amount of code generated for the picture skipping is 0, the following formula is used:
n=(Bth−B(t0))/R
First, the encoding target picture is encoded (see step S20).
Next, the examination of the decoder buffer is performed (see step S21). If no problem is found in the examination, the operation applied to the encoding target picture is completed.
If an underflow is found, encoded data that is a result of the encoding of the encoding target picture is cancelled (see step S22).
Next, computation of the number of pictures to be skipped is performed by computing the above-described n (see step S23). Then the computed number (for picture skipping) of encoding target pictures are cancelled (see step S24), and encoded data for the picture skipping in which the number of skipped pictures is designated is generated (see step S25).
After that, the operation of suppressing the generated code amount according to the present encoding control is completed.
As described above, in comparison with the flow in
Instead of computing the number of skipped pictures, similar effects can be obtained by computing a period of time for suppressing the amount of generated code by means of the picture skipping or the like. In other words, the number of pictures and the above period of time are taken as substantially synonymous with each other.
Although the picture skipping is used as the generated code amount suppressing means in the present embodiment, encoding may also be performed using (i) a maximum quantization step size or quantization matrix, (ii) a mode which produces a minimum amount of generated code (e.g., macroblock skipping), or the like.
In the above-explained
In addition, although the above-described embodiments execute the encoding so as to determine whether or not an underflow is found, the amount of generated code may be estimated without executing the encoding so as to detect the occurrence of the underflow. In this case, cancellation of the encoded data is unnecessary.
In the above embodiments, the threshold for the rate of occupancy in the decoder buffer may be set to substantially half the buffer size on the decoding side, or the level of the decoder buffer immediately before the decoding side receives encoded data of the head picture and starts decoding of the encoded data. In either case, an appropriately threshold which is not too high or low can be obtained.
Additionally, in the embodiments, the overflow of the decoder buffer is unconsidered.
In order to handle the overflow, it is necessary to determine whether the overflow is found, based on information about the maximum buffer size.
The above-described video encoding control operation may be implemented using a computer and a software program, and the software program may be stored in a computer-readable storage medium or provided via a network.
In accordance with the present invention, the amount of generated code can be suppressed until the rate of occupancy in the decoder buffer exceeds a threshold. Therefore, after detecting an underflow, it is unnecessary to continuously keep suppressing the amount of generated code so as to prevent the underflow. Accordingly, image quality can be improved.
Number | Date | Country | Kind |
---|---|---|---|
2010-106104 | May 2010 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2011/059727 | 4/20/2011 | WO | 00 | 11/1/2012 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2011/138900 | 11/10/2011 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5134476 | Aravind et al. | Jul 1992 | A |
5606369 | Keesman et al. | Feb 1997 | A |
5786858 | Yagasaki et al. | Jul 1998 | A |
5805228 | Proctor et al. | Sep 1998 | A |
5831678 | Proctor | Nov 1998 | A |
5864681 | Proctor et al. | Jan 1999 | A |
6072830 | Proctor et al. | Jun 2000 | A |
6101195 | Lyons et al. | Aug 2000 | A |
6208691 | Balakrishnan et al. | Mar 2001 | B1 |
6300973 | Feder et al. | Oct 2001 | B1 |
6310915 | Wells et al. | Oct 2001 | B1 |
6347117 | Kato et al. | Feb 2002 | B1 |
6493402 | Fimoff | Dec 2002 | B1 |
6522693 | Lu et al. | Feb 2003 | B1 |
6678332 | Gardere et al. | Jan 2004 | B1 |
6754279 | Zhou et al. | Jun 2004 | B2 |
6791609 | Yamauchi et al. | Sep 2004 | B2 |
6792047 | Bixby et al. | Sep 2004 | B1 |
6836289 | Koshiba et al. | Dec 2004 | B2 |
6873658 | Zhou | Mar 2005 | B2 |
6944221 | Keesman | Sep 2005 | B1 |
6990144 | Tsukagoshi et al. | Jan 2006 | B2 |
7023924 | Keller et al. | Apr 2006 | B1 |
7099389 | Yu et al. | Aug 2006 | B1 |
7346106 | Jiang et al. | Mar 2008 | B1 |
7356079 | Laksono et al. | Apr 2008 | B2 |
7613345 | Kajiwara et al. | Nov 2009 | B2 |
7688890 | Kondo et al. | Mar 2010 | B2 |
7970055 | Koto | Jun 2011 | B2 |
8107524 | Laksono | Jan 2012 | B2 |
8189679 | Tsukagoshi et al. | May 2012 | B2 |
20010003534 | Saunders et al. | Jun 2001 | A1 |
20010045988 | Yamauchi et al. | Nov 2001 | A1 |
20010053182 | Ishiyama | Dec 2001 | A1 |
20020003578 | Koshiba et al. | Jan 2002 | A1 |
20020012054 | Osamato | Jan 2002 | A1 |
20020012055 | Koshiba et al. | Jan 2002 | A1 |
20020012398 | Zhou et al. | Jan 2002 | A1 |
20020015447 | Zhou | Feb 2002 | A1 |
20020027604 | Hung | Mar 2002 | A1 |
20020094031 | Ngai et al. | Jul 2002 | A1 |
20020135683 | Tamama et al. | Sep 2002 | A1 |
20020159528 | Graziani et al. | Oct 2002 | A1 |
20020186774 | Pau et al. | Dec 2002 | A1 |
20030012290 | Fimoff et al. | Jan 2003 | A1 |
20030031251 | Koto | Feb 2003 | A1 |
20030039308 | Wu et al. | Feb 2003 | A1 |
20030222998 | Yamauchi et al. | Dec 2003 | A1 |
20040114817 | Jayant et al. | Jun 2004 | A1 |
20040208135 | Nakamura et al. | Oct 2004 | A1 |
20050053302 | Srinivasan et al. | Mar 2005 | A1 |
20050105883 | Holcomb et al. | May 2005 | A1 |
20050152448 | Crinon et al. | Jul 2005 | A1 |
20050193408 | Sull et al. | Sep 2005 | A1 |
20050210145 | Kim et al. | Sep 2005 | A1 |
20050286631 | Wu et al. | Dec 2005 | A1 |
20060126713 | Chou et al. | Jun 2006 | A1 |
20060256868 | Westerman | Nov 2006 | A1 |
20060274830 | Koto | Dec 2006 | A1 |
20070025441 | Ugur et al. | Feb 2007 | A1 |
20070025446 | Matsumoto et al. | Feb 2007 | A1 |
20070074266 | Raveendran et al. | Mar 2007 | A1 |
20070081586 | Raveendran et al. | Apr 2007 | A1 |
20070081587 | Raveendran et al. | Apr 2007 | A1 |
20070081588 | Raveendran et al. | Apr 2007 | A1 |
20070153914 | Hannuksela et al. | Jul 2007 | A1 |
20080080619 | Heng et al. | Apr 2008 | A1 |
20080101466 | Swenson et al. | May 2008 | A1 |
20090161766 | Bronstein et al. | Jun 2009 | A1 |
20090168900 | Shimoyama et al. | Jul 2009 | A1 |
20100232720 | Tsai et al. | Sep 2010 | A1 |
20110292995 | Kubota | Dec 2011 | A1 |
Number | Date | Country |
---|---|---|
1353547 | Jun 2002 | CN |
1926863 | Mar 2007 | CN |
1937777 | Mar 2007 | CN |
101087408 | Dec 2007 | CN |
1030523 | Apr 2010 | EP |
07-184196 | Jul 1995 | JP |
10-210475 | Aug 1998 | JP |
10-304311 | Nov 1998 | JP |
11-112601 | Apr 1999 | JP |
2000-209584 | Jul 2000 | JP |
2001-359097 | Dec 2001 | JP |
2003-092759 | Mar 2003 | JP |
2003-125400 | Apr 2003 | JP |
2005-072742 | Mar 2005 | JP |
2005-080004 | Mar 2005 | JP |
2006-180036 | Jul 2006 | JP |
2006-295535 | Oct 2006 | JP |
2006-332842 | Dec 2006 | JP |
2007-28647 | Feb 2007 | JP |
2007-208377 | Aug 2007 | JP |
2008-109259 | May 2008 | JP |
2008-252562 | Oct 2008 | JP |
2008-258858 | Oct 2008 | JP |
2009-260595 | Nov 2009 | JP |
10-1995-0030491 | Nov 1995 | KR |
10-1996-0009752 | Mar 1996 | KR |
10-1997-0025160 | May 1997 | KR |
10-1997-0032066 | Jun 1997 | KR |
10-2001-0030362 | Apr 2001 | KR |
10-2008-0061744 | Jul 2008 | KR |
10-2009-0112747 | Oct 2009 | KR |
2 123 769 | Dec 1998 | RU |
2385541 | Mar 2010 | RU |
404137 | Sep 2000 | TW |
02096120 | Nov 2002 | WO |
Entry |
---|
Notice of Allowance, Japanese Patent Application No. 2014-028378, Nov. 11, 2014. |
Office Action, Taiwanese Patent Application No. 100114408, May 21, 2014. |
International Search Report (Japanese and English) for PCT/JP2011/059727, ISA/JP, mailed Jul. 12, 2011. |
International Preliminary Report on Patentability (Japanese), IPEA/JP, mailed Aug. 21, 2012. |
Notice of Allowance, Japanese Patent Application No. 2012-513784, Jul. 15, 2014. |
Decision on Grant, Russian Patent Application No. 2012146549, Jul. 28, 2014. |
Office Action, Russian Patent Application No. 2012146549, Jan. 20, 2014. |
Notice of Allowance of Patent, Korean Patent Application No. 10-2012-7028198, Jan. 28, 2014. |
Li, Z.G., et al., “Adaptive rate control for H.264,” Journal of Visual Communication and Image Representation, vol. 17, No. 2, Apr. 2006, pp. 376-406. |
Chen, Jiann-Jone, et al., “Source Model for Transform Video Coder and Its Application—Part II: Variable Frame Rate Coding,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 7, No. 2, Apr. 1997, pp. 299-311. |
Search Report, European Patent Application No. 11777419.0, Nov. 20, 2013. |
Notice of Reasons for Rejection, Japanese Patent Application No. 2012-513784, Dec. 20, 2013. |
Kadono, Kikuchi, and Suzuki, “H.264/AVC Textbook, Third revised Version” Issued by Impress R & D, 2009, pp. 189-191. |
Okutomi, Ozawa, Shimizu, and Hori, “Digital Image Processing,” Corporation Picture Information Education Advancement Association, 2004, pp. 108-110. |
Westerink, P. H., et al., “Two-pass MPEG-2 variable-bit-rate encoding,” IBM Journal of Research and Development, vol. 43, No. 4, Jul. 1999, pp. 471-488. |
Ma, Siwei, et al., “Rate Control for JVT Video Coding Scheme with HRD Considerations,” Proceedings of 2003 International Conference on Image Processing, Sep. 14-17, 2003, pp. III-793-III-796. |
International Search Report for PCT/JP2011/060364, ISA/JP, mailed Jun. 21, 2011. |
Notice of Allowance of Patent, Korean Patent Application No. 10-2012-7028798, Jan. 28, 2014. |
Search Report, European Patent Application No. 11777442.2, Mar. 6, 2014. |
Decision on Grant, Russian Patent Application No. 2012146537, May 26, 2014. |
Office Action, U.S. Appl. No. 13/695,700, Jan. 5, 2015. |
Office Action, Chinese Patent Application No. 201180022113.6, Feb. 2, 2015. |
Notice of Allowance, Taiwanese Patent Application No. 100115438, Feb. 26, 2015. |
Notice of Allowance, U.S. Appl. No. 13/695,700, Jul. 7, 2015. |
Office Action, Canadian Patent Application No. 2,798,012, Aug. 7, 2015. |
Number | Date | Country | |
---|---|---|---|
20130058396 A1 | Mar 2013 | US |