The disclosure of Japanese Patent Application No. 2008-82470 filed on Mar. 27, 2008 including the specification, drawings and abstract is incorporated herein by reference in its entirety.
The present invention relates to an image encoding device and to technology which is effective when applied to a moving image recording and reproducing device at large, for example, a digital camera which possesses hardware and software for moving image encoding/decoding, a digital video camera, a DVD (Digital Versatile Disc)/HDD (Hard Disc Drive) recorder, a mobile-phone, and the like.
In the system treating a moving image code, HD (High-Definition) has entered the proliferation period, and utilization of a larger screen such as 4k digital cinema, a super Hi-Vision, etc. is advancing on the research level. An image encoding device and an image decoding device handling these signals are required to possess a high processing capability. In order to improve a processing capability with a low power consumption (at a low operating frequency), the parallel encoding is proposed, which will become indispensable technology when processing a moving image in the future. The H.264 standard can provide a high compression up to 1/100- 1/200, maintaining a high-quality image. Therefore, the H.264 standard is employed as a coding standard of terrestrial digital broadcasting and the next generation DVD standard, and also planned to be adopted as a coding standard of the future 4k digital cinema or super Hi-Vision.
The following documents treat the moving image parallel encoding technology and the encoding technology with a quantization parameter changing in units of macroblock.
Patent Document 1 (Japanese patent laid-open No. 2008-42571) discloses technology in which a screen of a moving picture is divided into plural areas, and encoding is performed in parallel, in order to encode a large screen moving picture. Patent Document 2 (Japanese patent laid-open No. 2000-333180) discloses a method in which, based on the reason that a first and a last macroblock of each slice of an image processing area should not be a skip macroblock, the macroblock type of the skip macroblock concerned is changed. Non-patent Document 1 (“Test Model 5”, MPEG.ORG, online, searched on Mar. 24, 2008, the Internet <URL:http://www.mpeg.org/MPEG/MSSG/tm5/>) discloses technology in which a quantization parameter is changed in units of macroblock in order to adjust the rate. Non-Document 2 (Tomokazu Murakami and Isao Karube; “A consideration on setting up a quantization parameter of the macroblock level in H.264/AVC”, PCSJ2004, November 2004) discloses technology in which a quantization parameter is changed in units of macroblock depending on an image to attain a high-quality image.
The present inventors have studied the processing of parallel encoding of plural macroblocks, in conformity with a moving image compression encoding system decided as H.264. That is, the present inventors have studied a case where an encoding target image is divided into plural areas, and a parallel processing is performed sequentially from a top for every divided area. In particular, it is premised that a slice is not formed among parallel processing areas. In parallel encoding for this case, a last macroblock (a macroblock is simply described also as MB) and a top MB of each area which undergo the parallel processing will continue across a parallel processing area boundary. At this time, the top MB of an area is encoded earlier than the last MB of the continuing area due to the parallel processing. Therefore, the quantization parameter of MB which continues across the parallel processing area boundary must be determined independently. In this meaning, when performing the parallel processing, the optimal quantization parameter according to an encoding target image will be supplied to a quantizer etc.
With respect to a quantization parameter, in the moving image encoding, MB not possessing a non-zero coefficient at all in the quantized orthogonally-transformed coefficient, which has been orthogonally transformed and quantized, may be sometimes encoded to a skip macroblock in variable-length coding, and not only a quantized orthogonally-transformed coefficient but also a quantization parameter is not included in the variable-length coding information. According to H.264, decoding such a skip macroblock will use the quantization parameter of the previous MB. Therefore, also in the parallel encoding, when there is no non-zero coefficient in the top MB of a certain parallel processing area, it is necessary to use the quantization parameter of the last MB of the adjoining processing area which is the previous MB in a screen. However, as mentioned above, in the parallel encoding, the top MB of each area which undergoes the parallel processing is encoded earlier than the last MB of the continuing previous area, therefore, the quantization parameter of the last MB of the previous area which is processed later cannot be used for quantization etc. of the top MB which is processed earlier than the last MB. If this problem is neglected, it will produce a decoding error in decoding, and it will become a cause of deterioration of decoded image quality.
In the H.264 standard, a deblocking filter is provided as an in-loop filter to decrease distortion in the image between frames, and an intra-frame prediction is performed. Therefore, with respect to a quantization parameter supplied to a deblocking filter, similarly as described above, the quantization parameter of the last MB of the previous area which is processed later cannot be used for quantization etc. of the top MB which is processed earlier than the last MB. In spite of the fact that slices are not formed, if a quantization parameter differs between the top MB of a certain parallel processing area and the last MB of an adjoining previous area, the top MB of the area will undergo deblocking filtering using an improper quantization parameter, and an improper encoding will be performed as the result.
A first simple method of avoiding the above described problem is to form a slice for every parallel processing area. This is because that reference of the quantization parameter across slices does not occur according to the standard. However, since prediction is not applied between slices, there is a problem that encoding efficiency deteriorates. A second simple method is to fix the quantization parameter in a picture. However, this method leads to the fact that a rate does not match and that control of the quantization parameter depending on an image is difficult; therefore, degradation of image quality is inevitable.
Any one of documents described above does not give a method of solving the problem, and primarily, does not pay attention to the problem in the H.264 standard.
The present invention has been made in view of the above circumstances and provides an image encoding device which does not necessitate reference of a quantization parameter between consecutive macroblocks across a parallel processing area boundary without forming slices.
The other purposes and the new feature of the present invention will become clear from the description of the present specification and the accompanying drawings.
The following explains simply an outline of typical one of the inventions disclosed by the present application.
(1) Reference of a quantization parameter crossing an area is avoided from occurring, by adding compulsorily a non-zero coefficient to a part of quantized orthogonally-transformed coefficients in a top macroblock of the area.
(2) In the case of the top macroblock of an area, even if all quantized orthogonally-transformed coefficients are zero, the value of a coded block pattern (coded_block_pattern), which is a flag indicating the existence or nonexistence of a non-zero coefficient included in variable-length coding information, is changed so as to indicate that the non-zero coefficient exists, and “mb_qp_delta” (a difference of the quantization parameter between adjoining macroblocks included in an encoding stream) is added. Accordingly, the reference of the quantization parameter crossing an area is avoided from occurring.
(3) Holding the quantization parameter used when encoding the top macroblock of an area, the reference of the quantization parameter crossing the area is enabled by encoding the last macroblock of an adjoining area with the use of the held quantization parameter. At this time, when all the quantized orthogonally-transformed coefficients of the last macroblock of an adjoining area are zero, the means of (1) or (2) described above is employed with respect to the macroblock concerned.
In either means of (1) and (2) described above, it is not necessary to provide slices; therefore, the prediction can be applied across a parallel processing area boundary, and encoding efficiency improves. An error is not generated in decoding and deterioration of decoded image quality is not induced. Since the quantization parameter in a picture can be unfixed, it is possible to realize a high-quality image by rate control and control of the quantization parameter depending on an image.
The following explains briefly the effect acquired by the typical one of the inventions disclosed by the present application.
That is, without forming slices, reference of a quantization parameter can be made unnecessary between consecutive macroblocks across a parallel processing area boundary, accordingly a high-quality image of a decoded image becomes realizable.
Hereinafter, with reference to the accompanying drawings, the embodiments of the present invention are explained in detail.
1. Outline of Embodiment
First, an outline is explained on typical embodiments of the invention disclosed in the present application. A numerical symbol in parentheses referring to a component of the drawing in the outline explanation about the typical embodiments only illustrates what is included in the concept of the component to which the numerical symbol is attached.
(1)<<Coefficient replacement to a non-zero coefficient in a top MB>> An image encoding device according to a first viewpoint of the present invention (refer to
(2) The image encoding device according to a more specific mode of the item (1) comprises an encoding element provided for every parallel processing area, as in the above. The encoding element includes an orthogonal transformation unit, a quantizer, a coefficient compensation unit, a variable-length encoder, and a quantization parameter calculating unit. The orthogonal transformation unit transforms orthogonally an image difference value between data of an encoding target image and data of a reference image. The quantizer quantizes the orthogonally-transformed coefficients orthogonally transformed by the orthogonal transformation unit and outputs quantized orthogonally-transformed coefficients. The coefficient compensation unit inputs the quantized orthogonally-transformed coefficients outputted by the quantizer. When the quantized orthogonally-transformed coefficients of a top macroblock of each of the processing area are all zero, the coefficient compensation unit outputs the quantized orthogonally-transformed coefficients concerned partly replaced with a non-zero coefficient, and when the quantized orthogonally-transformed coefficients are not all zero, the coefficient compensation unit outputs the quantized orthogonally-transformed coefficients concerned as they are. The encoder encodes the quantized orthogonally-transformed coefficients and necessary encoding information outputted by the coefficient compensation unit. The quantization parameter calculating unit generates a quantization parameter to be supplied to the quantizer and the encoder.
(3)<<Replacement position of a non-zero coefficient>> In the item (2), the non-zero coefficient replaced and outputted by the coefficient compensation unit is a one-valued coefficient. Increase of the amount of data by the replacement to the non-zero coefficient becomes small as much as possible.
(4) The image encoding device of the item (2) further comprises: an inverse quantization unit which quantizes inversely the quantized orthogonally-transformed coefficients outputted by the coefficient compensation unit; an inverse orthogonal transformation unit which transforms inverse-orthogonally the orthogonally-transformed coefficients outputted by the inverse quantization unit; an adder which generates a local decoded image by adding the reference image to an image difference value outputted by the inverse orthogonal transformation unit; an intra prediction image generating unit which generates an intra prediction image which is an intra-frame prediction image, based on the local decoded image; a deblocking filter unit which performs deblocking filtering to the local decoded image; an inter prediction image generating unit which generates an inter prediction image which is an inter-frame prediction image, based on an input image and the local decoded image after deblock-filtered; and a selector which selects, as the reference image, one of the intra prediction image outputted by the intra prediction image generating unit and the inter prediction image outputted by the inter prediction image generating unit.
(5)<<Change of a coded block pattern>> An image encoding device according to a second viewpoint of the present invention (refer to
(6)<<Change of a coded block pattern>> The image encoding device according to a more specific mode of the item (5) comprises an encoding element provided for every parallel processing area, as in the item (5). The encoding element includes an orthogonal transformation unit, a quantizer, a variable-length encoder, and a quantization parameter calculating unit. The orthogonal transformation unit transforms orthogonally an image difference value between data of an encoding target image and data of a reference image. The quantizer quantizes the orthogonally-transformed coefficients orthogonally transformed by the orthogonal transformation unit and outputs quantized orthogonally-transformed coefficients. The encoder encodes the quantized orthogonally-transformed coefficients and necessary encoding information outputted by a coefficient compensation unit. The quantization parameter calculating unit generates a quantization parameter to be supplied to the quantizer and the encoder. When the quantized orthogonally-transformed coefficients of the top macroblock of the processing area are all zero, the encoder generates a coded block pattern denoting existence of a non-zero coefficient, in exchange for a coded block pattern denoting that the quantized orthogonally-transformed coefficients are all zero.
(7) In the item (6), when the quantized orthogonally-transformed coefficients of the top macroblock of the processing area are all zero, the encoding information generated by the encoder excludes the quantized orthogonally-transformed coefficients.
(8)<<Allowance of a skip MB, replacement to a non-zero coefficient in the last MB>> An image encoding device according to a third viewpoint of the present invention (refer to
(9) The image encoding device according to a more specific mode of the item (8) comprises an encoding element provided for every parallel processing area as in the item (8), and comprises a quantization parameter controlling unit. The encoding element includes an orthogonal transformation unit, a quantizer, a coefficient compensation unit, an encoder, and a quantization parameter calculating unit. The orthogonal transformation unit transforms orthogonally an image difference value between data of an encoding target image and data of a reference image. The quantizer quantizes the orthogonally-transformed coefficients orthogonally transformed by the orthogonal transformation unit and outputs quantized orthogonally-transformed coefficients. The coefficient compensation unit inputs the quantized orthogonally-transformed coefficients outputted by the quantizer. When the quantized orthogonally-transformed coefficients of a last macroblock of each of the processing area are all zero, the coefficient compensation unit outputs the quantized orthogonally-transformed coefficients concerned partly replaced with a non-zero coefficient, and when the quantized orthogonally-transformed coefficients are not all zero, the coefficient compensation unit outputs the quantized orthogonally-transformed coefficients concerned as they are. The encoder encodes the quantized orthogonally-transformed coefficients and necessary encoding information outputted by the coefficient compensation unit. The quantization parameter calculating unit generates a quantization parameter to be supplied to the quantizer and the encoder. The quantization parameter controlling unit performs control so as to use the same quantization parameter to a top macroblock of each processing area and a last macroblock of an adjoining preceding processing area, in each of the encoding element.
(10) In the item (9), the quantization parameter controlling unit acquires and holds a quantization parameter of a top macroblock of every parallel processing area, generated by the respective quantization parameter calculating unit in each encoding element, and the quantization parameter controlling unit performs control so that, in processing the last macroblock of every processing area, the same quantization parameter as used in the top macroblock of a succeeding processing area adjoining to the macroblock concerned is used.
(11) In the item (9), the non-zero coefficient replaced and outputted by the coefficient compensation unit is a one-valued coefficient.
(12)<<Allowance of a skip MB, coded block pattern change>> An image encoding device according to a fourth viewpoint of the present invention (refer to
(13) The image encoding device according to a more specific mode of the item (12) comprises an encoding element provided for every parallel processing area as in the item (12). The encoding element includes an orthogonal transformation unit, a quantizer, an encoder, and a quantization parameter calculating unit. The orthogonal transformation unit transforms orthogonally an image difference value between data of an encoding target image and data of a reference image. The quantizer quantizes the orthogonally-transformed coefficients orthogonally transformed by the orthogonal transformation unit and outputs the quantized orthogonally-transformed coefficients. The encoder encodes the quantized orthogonally-transformed coefficients and necessary encoding information outputted by a coefficient compensation unit. The quantization parameter calculating unit generates a quantization parameter to be supplied to the quantizer and the encoder. The image encoding device comprises furthermore a quantization parameter controlling unit which controls the respective encoding element so as to use the same quantization parameter to a top macroblock of every processing area and to a last macroblock of an adjoining preceding processing area. When the quantized orthogonally-transformed coefficients of the last macroblock of the processing area are all zero, the encoder generates a coded block pattern denoting existence of a non-zero coefficient, in exchange for a coded block pattern denoting that the quantized orthogonally-transformed coefficients are all zero.
(14) In the item (13), the quantization parameter controlling unit acquires and holds a quantization parameter of a top macroblock of every parallel processing area, generated by the respective quantization parameter calculating unit in each encoding element. The quantization parameter controlling unit performs control so that, in processing a last macroblock of every processing area, the same quantization parameter as used in a top macroblock of a succeeding processing area adjoining to the macroblock concerned is used.
(15) In the item (13), when the quantized orthogonally-transformed coefficients of a top macroblock of every processing area are all zero, encoding information generated by the encoder excludes the quantized orthogonally-transformed coefficients.
2. Details of Embodiments
Embodiments are explained further in full detail. Hereafter, the embodiments for practicing the present invention are explained in detail based on drawings. In the entire diagrams for explaining the embodiments of the present invention, the same symbol is attached to an element which possesses the same function, and the repeated explanation thereof is omitted.
<<Embodiment 1<<
The configuration of one encoding element 120 of which the details are typically illustrated is explained with reference to
The coefficient compensation unit 130 serves as a circuit block which suppresses generation of a skip macroblock in the top macroblock of each parallel processing area. That is, when all the quantized orthogonally-transformed coefficients of the top macroblock of the parallel processing area are zero, the coefficient compensation unit 130 adds a non-zero coefficient to a part of the quantized orthogonally-transformed coefficients and changes the part to non-zero. Specifically, the coefficient compensation unit 130 includes a coefficient existence/nonexistence determination unit 113, a coefficient addition determination unit 115, a coefficient adding unit 116, a selector 117, and a selector 118. The area-top MB determination unit 114 determines whether the current processing target macroblock of a parallel processing area is a top macroblock. The coefficient existence/nonexistence determination unit 113 determines whether all the orthogonally-transformed coefficients after quantization (quantized orthogonally-transformed coefficients) corresponding to one macroblock obtained by the quantizer 102 are zero-valued coefficients. Based on the determination result of the area-top MB determination unit 114 determining whether the current processing target macroblock is a top macroblock, and the determination result of the coefficient existence/nonexistence determination unit 113 determining whether all the quantized orthogonally-transformed coefficients are zero, the coefficient addition determination unit 115 determines whether a non-zero coefficient is added to a part of the quantized orthogonally-transformed coefficients of the current macroblock, and controls switching of the selectors 117 and 118. That is, when the current macroblock is not a top macroblock, or when the current macroblock is a top macroblock but a non-zero coefficient is included, the output of the quantizer 102 is through outputted to the variable-length encoder 103 as it is. On the other hand, when the current macroblock is a top macroblock and a non-zero coefficient is not included at all, the output of the quantizer 102 is outputted to the variable-length encoder 103 after a non-zero coefficient is added to a part of the output of the quantizer 102 by the coefficient adding unit 116. In other words, the output of the quantizer 102 is partly replaced by a non-zero coefficient by the coefficient adding unit 116, and is outputted to the variable-length encoder 103.
Furthermore, the parallel encoding is totally explained with reference to
In moving image encoding, all values of the quantized orthogonally-transformed coefficients obtain by the quantizer 102 may be zero in some cases. According to the H.264 standard, when all the orthogonally-transformed coefficients are zero, a quantization parameter will not be added to the macroblock concerned of the stream after the variable-length encoding obtained by the stream integration unit 123, but the macroblock concerned will be processed in decoding using the quantization parameter of the adjoining previous MB. Namely, when all values of the quantized orthogonally-transformed coefficients of the top MB 204 of the parallel processing area in
In order to avoid the case, a possible method is to form a slice in units of processing area, and to add a quantization parameter to the top MB of the processing area. Since prediction between macroblocks crossing slices is no longer applied in the method, the amount of code will increase, and the encoding efficiency will decrease. Another possible method to avoid the case is to fix the quantization parameter in a picture. If the quantization parameter is fixed in a picture, quantization parameters do not differ in macroblocks across a parallel processing area boundary; therefore, encoding is performed normally. However, by fixing the quantization parameter, the rate may start to disagree, and the control of the quantization parameter depending on an image may become difficult; therefore, image quality is considered to deteriorate.
According to the present embodiment, by making non-zero a part of the orthogonally-transformed coefficients of the top MB of a processing area, generation of a skip macroblock is suppressed, and reference of the quantization parameter between consecutive macroblocks across a parallel processing area boundary becomes unnecessary. In
According to Embodiment 1, as illustrated in
<<Embodiment 2<<
The area-top MB determination unit 235 determines whether the current processing target macroblock of a parallel processing area is a top macroblock. In addition to the variable-length coding function in conformity with H.264, the variable-length encoder 233 possesses a coefficient existence/nonexistence determination unit 232 and a coded block pattern (CBP) encoder 234. The coefficient existence/nonexistence determination unit 232 determines whether all the orthogonally-transformed coefficients after quantization (quantized orthogonally-transformed coefficients) corresponding to one macroblock obtained by the quantizer 102 are zero-valued coefficients. The CBP encoder 234 receives the top MB determination result of a parallel processing area obtained by the area-top MB determination unit 235, and the determination result obtained by the coefficient existence/nonexistence determination unit 232 determining whether all the quantized orthogonally-transformed coefficients are zero, and encodes a coded block pattern (coded_block_pattern) in the syntax of H.264. When all the quantized orthogonally-transformed coefficients are zero in the case of the processing to the top macroblock of a parallel processing area, the CBP encoder 234 performs processing so that the coded block pattern denoting the existence of a non-zero coefficient is set, in exchange for the coded block pattern denoting that all the quantized orthogonally-transformed coefficients are zero, and that “mb_qp_delta” may always be added to a bit stream. According to H.264, “mb_qp_delta” is the difference of the quantization parameter between adjoining macroblocks included in an encoding stream, or in short, it is difference information using the quantization parameter used for quantization of the macroblock concerned.
By employing the image encoding device 2 according to Embodiment 2, it becomes possible to add a quantization parameter into a stream after variable-length encoding even when all the quantized orthogonally-transformed coefficients of an area-top MB are zero, and the stream which can guarantee the correct decoding can be generated. Since it is not necessary to form slices, the prediction is applied across a parallel processing area boundary, and encoding efficiency improves. Furthermore, since the quantization parameter in a picture can be unfixed, it is possible to realize a high-quality image by the rate control and the control of the quantization parameter depending on an image. Even when compared with Embodiment 1, since all quantized orthogonally-transformed coefficients with a poor encoding efficiency remain to be zero, the encoding efficiency is high, and a satisfactory image quality can be obtained.
<<Embodiment 3<<
The area-top-MB/last-MB determination unit 344 determines whether a processing target macroblock of a parallel processing area is a top MB or a last MB. The determination result is supplied to the quantization parameter controlling unit 350 and a coefficient addition determination unit 345.
The quantization parameter controlling unit 350 holds a quantization parameter used when encoding the top macroblock of the parallel processing area, and encodes the last macroblock of the adjoining region using the held quantization parameter. By this scheme, reference of the quantization parameter crossing the parallel processing area boundary of the parallel processing area is enabled. In other words, it is allowed that the top macroblock of a parallel processing area is a skip macroblock. At this time, when all the quantized orthogonally-transformed coefficients of the last macroblock of the adjoining area are zero, the macroblock concerned is suppressed to become a skip macroblock, using the coefficient compensation unit, and generation of contradiction that quantization parameters are different between the last macroblock concerned and the preceding macroblock is suppressed.
The coefficient compensation unit 330 serves as a circuit block in which, when all the quantized orthogonally-transformed coefficients of the last macroblock of the parallel processing area are zero, generation of a skip macroblock in the last macroblock of each parallel processing area is suppressed, by adding a non-zero coefficient to a part of the quantized orthogonally-transformed coefficients and changing the part to non-zero. Specifically, the coefficient compensation unit 330 includes a coefficient existence/nonexistence determination unit 343, a coefficient addition determination unit 345, a coefficient adding unit 346, a selector 347, and a selector 348. The coefficient existence/nonexistence determination unit 343 determines whether all the orthogonally-transformed coefficients after quantization (quantized orthogonally-transformed coefficients) corresponding to one macroblock obtained by the quantizer 102 are zero-valued coefficients. Based on the determination result of the area-top-MB/last-MB determination unit 344 determining whether the current processing target macroblock is a last macroblock, and the determination result of the coefficient existence/nonexistence determination unit 343 determining whether all the quantized orthogonally-transformed coefficients are zero, the coefficient addition determination unit 345 determines whether a non-zero coefficient is added to a part of the quantized orthogonally-transformed coefficients of the current macroblock, and controls switching of the selectors 347 and 348. That is, when the current macroblock is not a last macroblock, or when the current macroblock is a last macroblock but a non-zero coefficient is included, the output of the quantizer 102 is through outputted to the variable-length encoder 103 as it is. On the other hand, when the current macroblock is a last macroblock and the non-zero coefficient is not included at all, the output of the quantizer 102 is outputted to the variable-length encoder 103 after a non-zero coefficient is added to a part of the output of the quantizer 102 by the coefficient adding unit 346. In other words, the output of the quantizer 102 is partly replaced by a non-zero coefficient by the coefficient adding unit 346, and is outputted to the variable-length encoder 103. As for the non-zero coefficient replaced, the processing is the same as in the case of
The quantization parameter controlling unit 350 controls a quantization parameter depending on the determination result of the area-top-MB/last-MB determination unit 344. When the determination result indicates that the current macroblock is an area-top MB, the quantization parameter controlling unit 350 holds inside the quantization parameter currently outputted from the quantization parameter calculating unit 112. When the determination result indicates that the current macroblock is an area-last MB, the quantization parameter controlling unit 350 supplies the quantization parameter held at the top MB of the adjoining processing area to the quantization parameter calculating unit 112, to serve as the quantization parameter for the area-last MB. Although the present example illustrates the control which quantizes an area-last MB using the quantization parameter calculated at the area-top MB, the control which encodes the area-top MB and the area-last MB using the quantization parameter set up from the exterior is also possible.
In the image encoding device 3 of
<<Embodiment 4<<
The area-top-MB/last-MB determination unit 435 determines whether a processing target macroblock of a parallel processing area is a top MB or a last MB. The determination result is supplied to the quantization parameter controlling unit 450 and the CBP encoder 434.
The quantization parameter controlling unit 450 holds a quantization parameter used when encoding the top macroblock of the parallel processing area, and encodes the last macroblock of the adjoining area using the held quantization parameter. By this scheme, reference of the quantization parameter over the parallel processing area boundary of the parallel processing area is enabled. In other words, it is allowed that the top macroblock of a parallel processing area is a skip macroblock. At this time, when all the quantized orthogonally-transformed coefficients of the last macroblock of an adjoining area are zero, the macroblock concerned is suppressed to turn to a skip macroblock, by using the variable-length encoder 433, and generation of contradiction that quantization parameters are different between the last macroblock concerned and the preceding macroblock is suppressed.
In addition to the variable-length coding function in conformity with H.264, the variable-length encoder 433 possesses a coefficient existence/nonexistence determination unit 432 and a coded block pattern (CBP) encoder 434. The coefficient existence/nonexistence determination unit 432 determines whether all the orthogonally-transformed coefficients after quantization (quantized orthogonally-transformed coefficients) corresponding to one macroblock obtained by the quantizer 102 are zero-valued coefficients. The CBP encoder 434 receives the last MB determination result of a parallel processing area obtained by the area-top-MB/last-MB determination unit 435, and the determination result obtained by the coefficient existence/nonexistence determination unit 432 determining whether all the quantized orthogonally-transformed coefficients are zero, and encodes a coded block pattern (coded_block_pattern) in the syntax of H.264. When all quantized orthogonally-transformed coefficients are zero in the case of the processing to the last macroblock of a parallel processing area, the CBP encoder 434 performs processing so that the coded block pattern denoting the existence of a non-zero coefficient is set, in exchange for the coded block pattern denoting that all the quantized orthogonally-transformed coefficients are zero, and that “mb_qp_delta” may always be added to a bit stream.
The quantization parameter controlling unit 450 controls a quantization parameter depending on the determination result of the area-top-MB/last-MB determination unit 435. When the determination result indicates that the current macroblock is an area-top MB, the quantization parameter controlling unit 450 holds inside the quantization parameter currently outputted from the quantization parameter calculating unit 112. When the determination result indicates that the current macroblock is an area-last MB, the quantization parameter controlling unit 450 supplies the quantization parameter held at the top MB of the adjoining processing area to the quantization parameter calculating unit 112, so as to serve as the quantization parameter for the area-last MB. Although the present example illustrates the control which quantizes an area-last MB using the quantization parameter calculated at the area-top MB, the control which encodes an area-top MB and an area-last MB using the quantization parameter set up from the exterior is also possible.
According to the image encoding device 4 of
In the above, the invention accomplished by the present inventors has been specifically explained based on the embodiments. However, it cannot be overemphasized that the present invention is not restricted to the embodiments, and it can be changed variously in the range which does not deviate from the gist.
Number | Date | Country | Kind |
---|---|---|---|
2008-082470 | Mar 2008 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
4591909 | Kuroda et al. | May 1986 | A |
6141381 | Sugiyama | Oct 2000 | A |
7512278 | Magee et al. | Mar 2009 | B2 |
8111752 | Kumar et al. | Feb 2012 | B2 |
20020025000 | Takeuchi et al. | Feb 2002 | A1 |
20030133169 | Uchibayashi et al. | Jul 2003 | A1 |
20050249289 | Yagasaki et al. | Nov 2005 | A1 |
20070242892 | Sugimoto et al. | Oct 2007 | A1 |
20080031329 | Iwata et al. | Feb 2008 | A1 |
20080043845 | Nakaishi | Feb 2008 | A1 |
Number | Date | Country |
---|---|---|
2000-333180 | Nov 2000 | JP |
2002-27469 | Jan 2002 | JP |
2008-042571 | Feb 2008 | JP |
Entry |
---|
“Test Model 5” MPEG.ORG [online] searched Mar. 24, 2008, URL: http://www.mpeg.org/MPEG/MSSG/tm5/. |
Tomokazu Murakami, “Adaptive Macroblock Quantization Parameter Setting Method for H.264/AVC”, PCSJ2004, Nov. 2004. |
Office Action issued Jun. 5, 2012, in Chinese Patent Application No. 200910005428.4. |
Office Action issued on Feb. 23, 2012 in Japanese Appln. No. 2008-082470. |
Number | Date | Country | |
---|---|---|---|
20090245664 A1 | Oct 2009 | US |