Decryption device and program
By controlling inverse transform processing in the decoding and encoding devices based on the positions of reference pixels, the proposed solution addresses the issue of increased entropy in HEVC, improving encoding efficiency when using lower or right reference pixels in intra prediction.
Patent Information
- Application Number
- JP2024095780
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2017-01-26
- Filing Date
- 2024-06-13
- Publication Date
- 2025-06-26
- Estimated Expiration
- 2037-02-16
AI Technical Summary
In conventional HEVC, the use of lower or right reference pixels in intra prediction leads to an increase in entropy of the residual signal, reducing encoding efficiency due to the asymmetric shape of the discrete sine transform (DST) impulse response.
A decoding device and encoding device are designed to control inverse transform processing based on the intra prediction mode and the positions of reference pixels, specifically inverting at least one of the horizontal and vertical bases during orthogonal transform processing when using reference pixels on the right or lower sides.
This approach reduces the increase in entropy, thereby enhancing encoding efficiency even when using reference pixels on the lower or right sides in intra prediction.
Smart Images

Figure 0007699272000001 
Figure 0007699272000002 
Figure 0007699272000003
Abstract
Description
Technical Field
[0001] The present invention relates to a decoding device and a program.
Background Art
[0002] In a moving image (video) coding method represented by H.265 / HEVC (High Efficiency Video Coding), prediction is performed while switching between two types of prediction: inter prediction using the temporal correlation between frames and intra prediction using the spatial correlation within a frame to generate a residual signal, and then orthogonal transformation processing, loop filter processing, and entropy coding processing are performed to output the obtained stream.
[0003] In intra prediction in HEVC, a total of 35 modes such as Planer prediction, DC prediction, and direction prediction are prepared, and intra prediction is performed using adjacent decoded reference pixels according to the mode determined by the encoder.
[0004] Here, in intra prediction, in a CU (Coding Unit) where there are no adjacent decoded reference pixels, such as an encoding target block located at the uppermost left in the frame (hereinafter referred to as "CU"), a reference pixel used for generating a prediction image is created by a process of filling with a specified value ("512" in the case of a 10-bit moving image).
[0005] Also, in conventional HEVC, since the encoding process is performed in raster scan order from the upper left, there may be a case where the reference pixel is not decoded. In such a case, a prediction image is generated using a value obtained by linearly extrapolating the nearest decoded reference pixel.
[0006] In particular, in the intra prediction of conventional HEVC, due to the encoding process in the raster scan order shown in FIG. 8(a), depending on the split shape of the TU, reference pixels located at the lower left or upper right of the CU are often not decoded even outside the frame edge (see FIG. 8(b)). In such cases, when performing direction prediction from the direction where non-decoded reference pixels exist, the prediction accuracy decreases and the encoding efficiency is reduced.
[0007] To solve such problems, in intra prediction, as the encoding process order for a plurality of transform blocks (hereinafter referred to as "TU: Transform Unit") existing in a CU, in addition to the raster scan order (e.g., Z-type), techniques are known that improve prediction accuracy by providing degrees of freedom in the encoding order such as U-type and X-type (see Non-Patent Document 1).
[0008] In the examples of FIGS. 8(a) and 8(b), it is configured to perform direction prediction in the direction from the lower left to the upper right (the reverse direction of the direction indicated by the dashed arrow in FIGS. 8(a) and 8(b)), and uses the lower left reference pixel to predict the pixels on the dashed arrow. In the figures of this specification, the arrow indicating the direction (prediction direction) of the intra prediction mode is from the pixel to be intra-predicted to the reference pixel, similar to the description in the HEVC standard document (the same applies hereinafter).
Prior Art Documents
Non-Patent Documents
[0009]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0010] In the conventional HEVC, as shown in FIG. 9, intra prediction is prediction using decoded reference pixels that are spatially adjacent on the upper side or the left side. By taking advantage of the fact that the accuracy of the predicted image at a position close to the decoded reference pixels is high and the accuracy of the predicted image at a position far from the decoded reference pixels tends to be low, orthogonal transforms such as discrete sine transform (hereinafter referred to as "DST") or discrete cosine transform (hereinafter referred to as "DCT") are applied in the horizontal and vertical directions from the left and upper directions where the decoded reference pixels are located to reduce the entropy of the residual signal.
[0011] In particular, since the shape of the impulse response of the DST is an asymmetric shape where one end is closed and the other end spreads out as shown in FIG. 10, as shown in FIG. 11, by applying the DST in accordance with the signal strength of the generated residual signal, the reduction of entropy can be effectively performed.
[0012] As described above, in the technique described in Non-Patent Document 1, there is a case where lower or right reference pixels are used in intra prediction.
[0013] In such a case, in the residual signal, the signal strength on the lower side or the right side close to the position of the reference pixel tends to be small, and the signal strength on the upper side or the left side far from the position of the reference pixel tends to be high. Therefore, if an orthogonal transform is applied as usual, the entropy may increase, which causes a problem of reducing the coding efficiency.
[0014] Therefore, the present invention has been made to solve the above-described problems, and an object thereof is to provide an encoding device, a decoding device, and a program that can reduce an increase in entropy even when lower or right reference pixels are used in intra prediction.
Means for Solving the Problems
[0015] The feature of the present invention is a decoding device configured to decode a target block obtained by dividing an original image in frame units constituting a moving image, and includes an intra prediction unit configured to generate a predicted image for the target block using an intra prediction mode indicating the type of intra prediction processing, and an inverse transform unit configured to perform inverse transform processing on the transform coefficients corresponding to the target block. The gist is that the inverse transform unit controls the inverse transform processing based on the intra prediction mode and the positions of reference pixels used by the intra prediction unit for prediction processing. An encoding device according to an embodiment is an encoding device configured to divide an original image in frame units constituting a moving image into encoding target blocks and perform encoding, and includes an intra prediction unit configured to generate a predicted image using an intra prediction mode, a residual signal generation unit configured to generate a residual signal based on the difference between the predicted image and the original image, and an orthogonal transform unit configured to perform orthogonal transform processing on the residual signal after inverting at least one of the horizontal and vertical bases when the intra prediction unit generates the predicted image using reference pixels located at least on one of the right and lower sides.
[0016] A decoding device according to an embodiment is a decoding device configured to divide an original image in frame units constituting a moving image into encoding target blocks and perform decoding, and includes an intra prediction unit configured to generate a predicted image using an intra prediction mode, and an inverse transform unit configured to generate a residual signal by performing inverse orthogonal transform processing on transform coefficients after inverting at least one of the horizontal and vertical bases when the intra prediction unit generates the predicted image using reference pixels located at least on one of the right and lower sides. The gist is that it includes these components.
[0017] An encoding device according to an embodiment is an encoding device configured to divide an original image in units of frames constituting a moving image into encoding target blocks and perform encoding, and includes an intra prediction unit configured to generate a prediction image using an intra prediction mode, a residual signal generation unit configured to generate a residual signal based on a difference between the prediction image and the original image, and an orthogonal conversion unit configured to perform orthogonal conversion processing on the residual signal after inverting the residual signal in at least one of the horizontal direction and the vertical direction when the intra prediction unit generates the prediction image using reference pixels located at least on one of the right side and the lower side.
[0018] A decoding device according to an embodiment is a decoding device configured to divide an original image in units of frames constituting a moving image into encoding target blocks and perform decoding, and includes an intra prediction unit configured to generate a prediction image using an intra prediction mode, and an inverse conversion unit configured to generate a residual signal by inverting a signal obtained by performing inverse orthogonal conversion processing on conversion coefficients in at least one of the horizontal direction and the vertical direction when the intra prediction unit generates the prediction image using reference pixels located at least on one of the right side and the lower side.
[0019] A program according to an embodiment is a program for causing a computer to function as the above-described encoding device.
[0020] A program according to an embodiment is a program for causing a computer to function as the above-described decoding device.
Advantages of the Invention
[0021] According to the present invention, there can be provided an encoding device, a decoding device, and a program capable of reducing an increase in entropy even when using reference pixels on the lower side or the right side in intra prediction.
Brief Description of the Drawings
[0022]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
[0023] (First Embodiment) Hereinafter, with reference to FIGS. 1 to 5, an encoding apparatus 1 and a decoding apparatus 3 according to the first embodiment of the present invention will be described. Here, the encoding apparatus 1 and the decoding apparatus 3 according to the present embodiment are configured to support intra prediction in a moving image encoding method such as HEVC. Note that the encoding apparatus 1 and the decoding apparatus 3 according to the present embodiment can be configured to support any moving image encoding method as long as it is a moving image encoding method that performs intra prediction.
[0024] The encoding device 1 according to this embodiment is configured to divide an original image in units of frames constituting a moving image into CUs and perform encoding. Further, the encoding device 1 according to this embodiment may be configured to be able to divide a CU into a plurality of TUs. Hereinafter, in this embodiment, a case where a CU is divided into a plurality of TUs will be described as an example, but the present invention is also applicable to a case where a CU is not divided into a plurality of TUs.
[0025] Note that, in this embodiment, for an encoding target CU such as a CU located at the uppermost left in a frame where there are no adjacent decoded reference pixels, a reference pixel used when generating a prediction image is created by a process of filling a prescribed value ("512" in the case of a 10-bit moving image). Therefore, it is assumed that all pixels adjacent to the left side of the encoding target CU can be used as reference pixels.
[0026] As shown in FIG. 1, the encoding device 1 according to this embodiment includes an intra prediction mode determination unit 11, a TU division determination unit 12, an encoding order control unit 13, a sequential local decoded image generation unit 14, a memory 15, and an entropy encoding unit 16.
[0027] The intra prediction mode determination unit 11 is configured to determine an optimal intra prediction mode to be applied to a CU.
[0028] The TU division determination unit 12 is configured to determine whether to divide a CU into a plurality of TUs. Note that, in this embodiment, as a method of dividing a CU into a plurality of TUs, a case of four-way division is described as an example, but the number of divisions and the division shape when dividing a CU into a plurality of TUs are not limited to such a case.
[0029] The encoding order control unit 13 is configured to determine the encoding order of TUs in a CU based on an intra prediction mode (for example, the direction of the intra prediction mode).
[0030] Specifically, when it is determined by the TU division determination unit 12 that the CU is divided into a plurality of TUs, as shown in FIGS. 2(a) to 2(d), when the direction of the intra prediction mode determined by the intra prediction mode determination unit 11 is a direction from the lower left to the upper right (that is, when direction prediction is performed from the lower left to the upper right), instead of the conventional raster scan order (Z-type as shown in FIG. 8(a)), as the encoding order of the TUs in the CU, the encoding order of TU#A3 (the lower left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A2 (the upper right TU in CU#A), or among the encoding orders of TU#A3 (the lower left TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A2 (the upper right TU in CU#A), a pre-specified encoding order may be adopted.
[0031] Further, when it is determined by the TU division determination unit 12 that the CU is divided into a plurality of TUs, and when the direction of the intra prediction mode determined by the intra prediction mode determination unit 11 is a direction from the upper right to the lower left (that is, when direction prediction is performed from the upper right to the lower left), instead of the conventional raster scan order (Z-type as shown in FIG. 8(a)), as the encoding order of the TUs in the CU, the encoding order of TU#A2 (the upper right TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A3 (the lower left TU in CU#A), or among the encoding orders of TU#A2 (the upper right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A3 (the lower left TU in CU#A), a pre-specified encoding order may be adopted.
[0032] The sequential local decoded image generation unit 14 is configured to generate a local decoded image (decoded image for each TU) based on the encoding order determined by the encoding order control unit 13 and the method of dividing the CU into TUs.
[0033] Specifically, when it is determined by the TU division determination unit 12 that the CU is divided into a plurality of TUs, the sequential local decoded image generation unit 14 is configured to sequentially generate local decoded images in accordance with the encoding order determined by the encoding order control unit 13.
[0034] As shown in FIG. 1, the sequential local decoded image generation unit 14 includes an intra prediction unit 14a, a residual signal generation unit 14b, an orthogonal transform / quantization unit 14c, an inverse quantization / inverse orthogonal transform unit 14d, and a local decoded image generation unit 14e.
[0035] The intra prediction unit 14a is configured to generate a prediction image using the intra prediction mode determined by the intra prediction mode determination unit 11. That is, the intra prediction unit 14a is configured to determine the positions of the reference pixels used when generating the prediction image.
[0036] Specifically, when it is determined by the TU division determination unit 12 that the CU is divided into a plurality of TUs, as shown in FIGS. 2(a) to 2(d), when the direction of the intra prediction mode (prediction direction) is from the lower left to the upper right, the encoding order of TU#A3 (the lower left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A2 (the upper right TU in CU#A), or the encoding order of TU#A3 (the lower left TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A2 (the upper right TU in CU#A), it may be configured to generate a prediction image in a predefined encoding order.
[0037] Here, as shown in FIGS. 2(c) and 2(d), for TU#A1 (the upper left TU in CU#A) and TU#A2 (the upper right TU in CU#A) in which the adjacent lower reference pixels have been decoded, the intra prediction unit 14a may be configured to generate a prediction image using the decoded reference pixels adjacent to the left and lower sides.
[0038] Also, in the encoding device 1 according to the present embodiment, when the CU is determined to be divided into a plurality of TUs by the TU division determination unit 12, and when the direction of the intra prediction mode (prediction direction) is from the upper right to the lower left, the encoding order is TU#A2 (the upper right TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A3 (the lower left TU in CU#A), or the encoding order is TU#A2 (the upper right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A3 (the lower left TU in CU#A). It may be configured to generate a prediction image in a predefined encoding order.
[0039] Here, for the TUs #A1 (the upper left TU in CU#A) and #A3 (the lower left TU in CU#A) where the adjacent right reference pixels have been decoded, the intra prediction unit 14a may be configured to generate a prediction image using the decoded reference pixels adjacent to the upper and right sides.
[0040] Alternatively, when the encoding order of TU#A3 (the lower left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A2 (the upper right TU in CU#A) or the encoding order of TU#A3 (the lower left TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A2 (the upper right TU in CU#A) is used, for the TUs (the TUs located at the uppermost stage among the divided TU groups, in the example of FIG. 2, TU#A1 and TU#A2) where the reference pixels adjacent to the upper side have been decoded, instead of a common intra prediction direction within CU#A, it may be configured to perform a predefined prediction such as linear interpolation using the decoded reference pixels adjacent to the left, upper, or lower side of such TUs.
[0041] That is, the intra prediction unit 14a may be configured to generate a prediction image using the decoded reference pixels adjacent to the three directions of the lower side, left side, and upper side.
[0042] Alternatively, the intra prediction unit 14a may be configured to generate a prediction image using decoded reference pixels adjacent in three directions such as the right side, the left side, and the upper side.
[0043] The residual signal generation unit 14b is configured to generate a residual signal based on the difference between the prediction image generated by the intra prediction unit 14a and the original image.
[0044] The orthogonal transform / quantization unit 14c is configured to perform an orthogonal transform process and a quantization process on the residual signal generated by the residual signal generation unit 14b to generate quantized transform coefficients.
[0045] Here, the orthogonal transform / quantization unit 14c is configured to determine whether to invert the basis used for the orthogonal transform process based on the positions of the reference pixels used when generating the prediction image determined by the intra prediction unit 14a.
[0046] For example, when the intra prediction unit 14a generates a prediction image using reference pixels located at least on one of the right side and the lower side (i.e., reference pixels adjacent to at least one of the right side and the lower side), the orthogonal transform / quantization unit 14c performs an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b after inverting at least one of the vertical and horizontal bases.
[0047] On the other hand, when the intra prediction unit 14a does not generate a prediction image using reference pixels located on either the right side or the lower side, the orthogonal transform / quantization unit 14c is configured to perform an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b without inverting the basis.
[0048] For example, when the intra prediction unit 14a generates a prediction image using reference pixels located on the left side and the lower side, the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process after inverting the vertical basis.
[0049] Also, when the intra prediction unit 14a generates a predicted image using reference pixels located on the right side and the upper side, the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process after inverting the basis in the horizontal direction.
[0050] Furthermore, when the intra prediction unit 14a generates a predicted image using reference pixels located on the right side and the lower side, the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process after inverting the bases in the vertical and horizontal directions.
[0051] Note that when the intra prediction unit 14a generates a predicted image using reference pixels located on at least one of the right side and the lower side, and the orthogonal transform process to be applied is an asymmetric orthogonal transform process (e.g., DST, etc.), the orthogonal transform / quantization unit 14c may be configured to invert at least one of the vertical and horizontal bases used for the orthogonal transform process with respect to the residual signal generated by the residual signal generation unit 14b.
[0052] That is, even when the intra prediction unit 14a generates a predicted image using reference pixels located on at least one of the right side and the lower side, when the orthogonal transform process to be applied is a symmetric orthogonal transform process (e.g., DCT, etc.), the orthogonal transform / quantization unit 14c may be configured not to invert the basis used for the orthogonal transform process with respect to the residual signal generated by the residual signal generation unit 14b.
[0053] Also, when the intra prediction unit 14a generates a predicted image using reference pixels adjacent in three directions such as the lower side, the left side, and the upper side, the orthogonal transform / quantization unit 14c may be configured not to invert the basis used for the orthogonal transform process with respect to the residual signal generated by the residual signal generation unit 14b.
[0054] According to such a configuration, in the residual signal, since the signal strength is likely to be low both above and below the reference pixel, the processing amount of the encoding apparatus 1 can be reduced by not performing the above-described inversion process.
[0055] Further, when the intra prediction unit 14a generates a prediction image using reference pixels adjacent in three directions such as the right side, the left side, and the upper side, the orthogonal transform / quantization unit 14c may be configured not to invert the basis used for the orthogonal transform process with respect to the residual signal generated by the residual signal generation unit 14b.
[0056] According to such a configuration, in the residual signal, since the signal strength is likely to be low both on the right side and the left side close to the reference pixel, the processing amount of the encoding apparatus 1 can be reduced by not performing the above-described inversion process.
[0057] The inverse quantization / inverse orthogonal transform unit 14d is configured to perform inverse quantization processing and inverse orthogonal transform processing again on the quantized transform coefficients generated by the orthogonal transform / quantization unit 14c to generate a residual signal.
[0058] Here, when the orthogonal transform / quantization unit 14c inverts the basis used in the orthogonal transform process, the inverse quantization / inverse orthogonal transform unit 14d is configured to perform the inverse orthogonal transform process after inverting the basis.
[0059] The local decoded image generation unit 14e is configured to generate a local decoded image by adding the prediction image generated by the intra prediction unit 14a to the residual signal generated by the inverse quantization / inverse orthogonal transform unit 14d.
[0060] The memory 15 is configured to hold the local decoded image generated by the sequential local decoded image generation unit 14 so that it can be used as a reference image.
[0061] The entropy encoding unit 16 is configured to perform entropy encoding processing on flag information including the intra prediction mode determined by the intra prediction mode determination unit 11 and the quantized transform coefficients, and output a stream.
[0062] FIG. 3 shows a flowchart for explaining an example of the operation of the encoding apparatus 1 according to the present embodiment.
[0063] As shown in FIG. 3, in step S101, the encoding apparatus 1 determines an optimal intra prediction mode to be applied to the CU.
[0064] In step S102, the encoding apparatus 1 determines whether to divide the CU into a plurality of TUs. If it is determined in step S102 to divide the CU into a plurality of TUs, this operation proceeds to step S103. On the other hand, if it is determined in step S102 not to divide the CU into a plurality of TUs, this operation proceeds to step S108.
[0065] In step S103, if it is determined that the direction of the intra prediction mode is a direction from bottom left to top right or a direction from top right to bottom left, this operation proceeds to step S105. On the other hand, if it is determined in step S103 that the direction of the intra prediction mode is other than the direction from bottom left to top right and the direction from top right to bottom left, this operation proceeds to step S104.
[0066] In step S104, the encoding apparatus 1 adopts the raster scan order (Z-type as shown in FIG. 8(a)) used in the conventional HEVC as the above-described encoding order.
[0067] In step S108, the encoding apparatus 1 performs a predefined prediction on the TU to be encoded using the decoded reference pixels adjacent to the left and upper sides of the TU.
[0068] When it is determined that the direction of the intra prediction mode is from the lower left to the upper right (step S105), in step S106, the encoding device 1 adopts, as the above-described encoding order, the encoding order of TU#A3 (the lower left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A2 (the upper right TU in CU#A), or the encoding order of TU#A3 (the lower left TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A2 (the upper right TU in CU#A), which is a pre-specified encoding order.
[0069] On the other hand, when it is determined that the direction of the intra prediction mode is not from the lower left to the upper right (step S105), in step S111, the encoding device 1 adopts, as the above-described encoding order, the encoding order of TU#A2 (the upper right TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A3 (the lower left TU in CU#A), or the encoding order of TU#A2 (the upper right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A3 (the lower left TU in CU#A), which is a pre-specified encoding order.
[0070] In step S107, the encoding device 1 determines whether the reference pixel adjacent to the upper side of the TU to be encoded has been decoded. In step S107, if it has been decoded, this operation proceeds to step S109, and if it has not been decoded, this operation proceeds to step S110.
[0071] In step S109, the encoding device 1 performs a pre-specified prediction on the TU to be encoded using the decoded reference pixels adjacent to the left side, upper side, and lower side of such TU.
[0072] In step S110, the encoding device 1 performs a pre-specified prediction on the TU to be encoded using the decoded reference pixels adjacent to the left side and lower side of such TU.
[0073] In step S112, the encoding device 1 determines whether the reference pixel adjacent to the left side of the TU to be encoded has been decoded. In step S112, if it has been decoded, this operation proceeds to step S113, and if it has not been decoded, this operation proceeds to step S114.
[0074] In step S113, the encoding device 1 performs a predefined prediction on the TU to be encoded using the decoded reference pixels adjacent to the left, upper, and right sides of the TU.
[0075] In step S114, the encoding device 1 performs a predefined prediction on the TU to be encoded using the decoded reference pixels adjacent to the right and upper sides of the TU.
[0076] In step S115, the encoding device 1 performs orthogonal transformation processing on the residual signal after inverting the basis, and then performs subsequent processing.
[0077] In step S116, the encoding device 1 performs orthogonal transformation processing on the residual signal without inverting the basis, and then performs subsequent processing.
[0078] According to the encoding device 1 according to this embodiment, when a predicted image is generated using reference pixels located at least on one of the right and lower sides, the residual signal is configured to perform orthogonal transformation processing after inverting the basis. Therefore, an increase in entropy can be reduced.
[0079] Further, the decoding device 3 according to this embodiment is configured to divide the original image in frame units constituting a moving image into CUs and decode them. Further, the decoding device 3 according to this embodiment is configured to be able to divide a CU into a plurality of TUs, similar to the encoding device 1 according to this embodiment.
[0080] As shown in FIG. 4, the decoding apparatus 3 according to the present embodiment includes an entropy decoding unit 31, a decoding order control unit 32, a sequential local decoded image generation unit 33, and a memory 34.
[0081] The entropy decoding unit 31 is configured to decode conversion coefficients, flag information, etc. from the stream output from the encoding apparatus 1. Here, the conversion coefficients are quantized conversion coefficients obtained as signals obtained by dividing the original image in frame units into CUs and encoding them by the encoding apparatus 1. The flag information includes accompanying information such as a prediction mode.
[0082] The decoding order control unit 32 is configured to determine the decoding order of TUs within a CU based on the intra prediction mode.
[0083] Specifically, the decoding order control unit 32 is configured to determine the decoding order of TUs within a CU according to a flag indicating whether TU division has been performed by the entropy decoding unit 31 (whether a CU is divided into a plurality of TUs) and the direction of the intra prediction mode.
[0084] For example, similar to the encoding order control unit 13, when a CU is divided into a plurality of TUs and the direction of the intra prediction mode is from the lower left to the upper right, the decoding order control unit 32 may be configured to perform decoding processing in a predefined decoding order among the decoding orders of TU#A3 (the lower left TU within CU#A) → TU#A4 (the lower right TU within CU#A) → TU#A1 (the upper left TU within CU#A) → TU#A2 (the upper right TU within CU#A), or TU#A3 (the lower left TU within CU#A) → TU#A1 (the upper left TU within CU#A) → TU#A4 (the lower right TU within CU#A) → TU#A2 (the upper right TU within CU#A).
[0085] Further, similar to the encoding sequence control unit 13, when the CU is divided into a plurality of TUs and the direction of the intra prediction mode is from the upper right to the lower left, the decoding sequence control unit 32 may be configured to perform decoding processing in a predefined decoding sequence among the decoding sequences of TU#A2 (the upper right TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A3 (the lower left TU in CU#A) or TU#A2 (the upper right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A3 (the lower left TU in CU#A).
[0086] The sequential local decoded image generation unit 33 is configured to generate a local decoded image (decoded image for each TU) based on the decoding sequence determined by the decoding sequence control unit 32 and the method of dividing the CU into TUs.
[0087] Specifically, when the CU is divided into a plurality of TUs, the sequential local decoded image generation unit 33 is configured to sequentially perform intra prediction, inverse quantization processing, and inverse orthogonal transformation processing on the quantized transform coefficients output by the entropy decoding unit 31 according to the decoding sequence determined by the decoding sequence control unit 32, thereby generating a local decoded image.
[0088] As shown in FIG. 4, the sequential local decoded image generation unit 33 includes an intra prediction unit 33a, an inverse quantization / inverse transformation unit 33b, and a decoded image generation unit 33c.
[0089] The intra prediction unit 33a may be configured to generate a predicted image using the intra prediction mode output by the entropy decoding unit 31 according to the decoding sequence determined by the decoding sequence control unit 32.
[0090] Specifically, when the CU is divided into a plurality of TUs and the direction of the intra prediction mode is from the lower left to the upper right, the intra prediction unit 33a may be configured to generate a predicted image in a decoding order of TU#A3 (the lower left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A2 (the upper right TU in CU#A), or a decoding order of TU#A3 (the lower left TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A2 (the upper right TU in CU#A), which is a predefined decoding order.
[0091] Here, as shown in FIGS. 2(c) and 2(d), for TU#A1 (the upper left TU in CU#A) and TU#A2 (the upper right TU in CU#A) in which adjacent lower reference pixels are decoded, the intra prediction unit 33a may be configured to generate a predicted image using the decoded reference pixels adjacent to the left side and the lower side.
[0092] Further, in the decoding apparatus 3 according to the present embodiment, when the CU is divided into a plurality of TUs and the direction of the intra prediction mode (prediction direction) is from the upper right to the lower left, the intra prediction unit 33a may be configured to generate a predicted image in a decoding order of TU#A2 (the upper right TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A3 (the lower left TU in CU#A), or a decoding order of TU#A2 (the upper right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A3 (the lower left TU in CU#A), which is a predefined decoding order.
[0093] Here, for TU#A1 (the upper left TU in CU#A) and TU#A3 (the lower left TU in CU#A) in which adjacent right reference pixels are decoded, the intra prediction unit 33a may be configured to generate a predicted image using the decoded reference pixels adjacent to the upper side and the right side.
[0094] Alternatively, when the intra prediction unit 33a uses the decoding order of TU#A3 (the bottom left TU in CU#A) → TU#A4 (the bottom right TU in CU#A) → TU#A1 (the top left TU in CU#A) → TU#A2 (the top right TU in CU#A), or the decoding order of TU#A3 (the bottom left TU in CU#A) → TU#A1 (the top left TU in CU#A) → TU#A4 (the bottom right TU in CU#A) → TU#A2 (the top right TU in CU#A), for TUs (the TUs located at the uppermost stage among the divided TU groups, in the example of FIG. 2, TU#A1 and TU#A2) where the reference pixels adjacent above are decoded, instead of using a common intra prediction direction within CU#A, it may be configured to perform a predefined prediction such as linear interpolation using the decoded reference pixels adjacent to the left side, upper side, or lower side of such TUs.
[0095] The inverse quantization and inverse transformation unit 33b is configured to generate a residual signal by performing inverse quantization processing and inverse transformation processing (for example, inverse orthogonal transformation processing) on the quantized transformation coefficients output by the entropy decoding unit 31.
[0096] For example, when the intra prediction unit 33a generates a prediction image using at least one of the reference pixels located on the right side and the lower side (that is, the reference pixels adjacent to at least one of the right side and the lower side), the inverse quantization and inverse transformation unit 33b is configured to generate a residual signal by performing inverse orthogonal transformation processing on the above-mentioned transformation coefficients after inverting at least one of the bases in the vertical direction and the horizontal direction.
[0097] On the other hand, when the intra prediction unit 33a does not generate a prediction image using any of the reference pixels located on the right side and the lower side, the inverse quantization and inverse transformation unit 33b is configured to generate a residual signal by performing inverse orthogonal transformation processing on the above-mentioned transformation coefficients without inverting the bases.
[0098] For example, when the intra prediction unit 33a generates a predicted image using reference pixels located on the left side and the lower side, the inverse quantization / inverse transformation unit 33b may be configured to generate a residual signal by performing an inverse orthogonal transformation process on the above-described transformation coefficients after inverting the basis in the vertical direction.
[0099] Also, when the intra prediction unit 33a generates a predicted image using reference pixels located on the right side and the upper side, the inverse quantization / inverse transformation unit 33b may be configured to generate a residual signal by performing an inverse orthogonal transformation process on the above-described transformation coefficients after inverting the basis in the horizontal direction.
[0100] Furthermore, when the intra prediction unit 33a generates a predicted image using reference pixels located on the right side and the lower side, the inverse quantization / inverse transformation unit 33b may be configured to generate a residual signal by performing an inverse orthogonal transformation process on the above-described transformation coefficients after inverting the bases in the vertical and horizontal directions.
[0101] Note that when the intra prediction unit 33a generates a predicted image using reference pixels located on at least one of the right side and the lower side, and the orthogonal transformation process to be applied is an asymmetric orthogonal transformation process (e.g., DST, etc.), the inverse quantization / inverse transformation unit 33b may be configured to generate a residual signal by performing an inverse orthogonal transformation process on the above-described transformation coefficients after inverting the basis.
[0102] That is, even when the intra prediction unit 33a generates a predicted image using reference pixels located on at least one of the right side and the lower side, if the orthogonal transformation process to be applied is a symmetric orthogonal transformation process (e.g., DCT, etc.), the inverse quantization / inverse transformation unit 33b may be configured to generate a residual signal by performing an inverse orthogonal transformation process on the above-described transformation coefficients without inverting the basis.
[0103] Further, when the intra prediction unit 33a generates a prediction image using reference pixels adjacent in three directions such as the lower side, the left side, and the upper side, the inverse quantization / inverse transformation unit 33b may be configured not to invert the basis used for the inverse orthogonal transformation process with respect to the above-described transformation coefficients.
[0104] Also, when the intra prediction unit 33a generates a prediction image using reference pixels adjacent in three directions such as the right side, the left side, and the upper side, the inverse quantization / inverse transformation unit 33b may be configured not to invert the basis used for the inverse orthogonal transformation process with respect to the above-described transformation coefficients.
[0105] The decoded image generation unit 33c is configured to generate a local decoded image by adding the prediction image generated by the intra prediction unit 33a and the residual signal generated by the inverse quantization / inverse transformation unit 33b.
[0106] The memory 34 is configured to hold the local decoded image generated by the sequential local decoded image generation unit 33 so that it can be used as a reference image for intra prediction and inter prediction.
[0107] FIG. 5 shows a flowchart for explaining an example of the operation of determining the above-described decoding order by the decoding apparatus 3 according to the present embodiment.
[0108] As shown in FIG. 5, in step S201, the decoding apparatus 3 acquires an intra prediction mode from the stream output from the encoding apparatus 1.
[0109] In step S202, the decoding apparatus 3 determines whether or not the CU is divided into a plurality of TUs based on the flag information included in the stream output from the encoding apparatus 1. If it is determined in step S202 that the CU is divided into a plurality of TUs, this operation proceeds to step S203. On the other hand, if it is determined in step S202 that the CU is not divided into a plurality of TUs, this operation proceeds to step S205.
[0110] In step S205, the decoding device 3 performs a prescribed prediction on the TU to be decoded, using the decoded reference pixels adjacent to the left and upper sides of the TU.
[0111] In step S203, the decoding device 3 determines whether the direction of the intra prediction mode is a direction from the lower left to the upper right or a direction from the upper right to the lower left. If it is determined in step S203 that the direction of the intra prediction mode is a direction from the lower left to the upper right or a direction from the upper right to the lower left, this operation proceeds to step S206.
[0112] On the other hand, if it is determined in step S203 that the direction of the intra prediction mode is other than the direction from the lower left to the upper right and the direction from the upper right to the lower left, this operation proceeds to step S204.
[0113] In step S204, the decoding device 3 adopts the conventional raster scan order (Z - type as shown in FIG. 8(a)) used in HEVC as the above - mentioned decoding order.
[0114] When it is determined that the direction of the intra prediction mode is a direction from the lower left to the upper right (step S206), in step S207, the decoding device 3 adopts a prescribed decoding order among the decoding orders of TU#A3 (the lower left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A2 (the upper right TU in CU#A), or the decoding order of TU#A3 (the lower left TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A2 (the upper right TU in CU#A) as the above - mentioned decoding order.
[0115] On the other hand, when it is determined that the direction of the intra prediction mode is not from the lower left to the upper right (step S206), in step S211, the decoding device 3 adopts a pre-specified decoding order from TU#A2 (the upper right TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A3 (the lower left TU in CU#A), or a decoding order from TU#A2 (the upper right TU in CU#A) → TU#A1 (the upper left TU in CU#A) → TU#A4 (the lower right TU in CU#A) → TU#A3 (the lower left TU in CU#A) as the above-mentioned decoding order.
[0116] In step S208, the decoding device 3 determines whether the reference pixels adjacent to the upper side of the TU to be decoded have been decoded. In step S208, if they have been decoded, this operation proceeds to step S209, and if they have not been decoded, this operation proceeds to step S210.
[0117] In step S209, the decoding device 3 performs a pre-specified prediction on the TU to be decoded using the decoded reference pixels adjacent to the left, upper, and lower sides of such TU.
[0118] In step S210, the decoding device 3 performs a pre-specified prediction on the TU to be decoded using the decoded reference pixels adjacent to the left and lower sides of such TU.
[0119] In step S212, the decoding device 3 determines whether the reference pixels adjacent to the left side of the TU to be decoded have been decoded. In step S212, if they have been decoded, this operation proceeds to step S213, and if they have not been decoded, this operation proceeds to step S214.
[0120] In step S213, the decoding device 3 performs a pre-specified prediction on the TU to be decoded using the decoded reference pixels adjacent to the left, upper, and right sides of such TU.
[0121] In step S214, the decoding device 3 performs a prescribed prediction on the TU to be decoded, using the decoded reference pixels adjacent to the right and above the TU.
[0122] In step S215, the decoding device 3 generates a residual signal by performing an inverse orthogonal transformation process on the above-described transformation coefficients after inverting at least one of the bases in the vertical and horizontal directions, and then performs subsequent processing.
[0123] In step S216, the decoding device 3 generates a residual signal by performing an inverse orthogonal transformation process on the above-described transformation coefficients without inverting the bases, and then performs subsequent processing.
[0124] According to the decoding device 3 according to the present embodiment, when a predicted image is generated using reference pixels located at least on one of the right and lower sides, the inverse orthogonal transformation process is performed on the transformation coefficients after inverting the bases, so that an increase in entropy can be reduced.
[0125] (Second Embodiment) Hereinafter, with reference to FIGS. 6 and 7, the encoding device 1 and the decoding device 3 according to the second embodiment of the present invention will be described focusing on the differences from the encoding device 1 and the decoding device 3 according to the above-described first embodiment.
[0126] In the encoding device 1 according to the present embodiment, when the intra prediction unit 14a generates a predicted image using reference pixels located at least on one of the right and lower sides, the orthogonal transformation / quantization unit 14c is configured to perform an orthogonal transformation process on the residual signal generated by the residual signal generation unit 14b after inverting it in at least one of the horizontal and vertical directions.
[0127] For example, when the intra prediction unit 14a generates a predicted image using reference pixels located on the left and lower sides, the orthogonal transformation / quantization unit 14c may be configured to perform an orthogonal transformation process on the residual signal generated by the residual signal generation unit 14b after inverting it in the vertical direction.
[0128] Further, when the intra prediction unit 14a generates a prediction image using reference pixels located on the right side and the upper side, the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b after inverting it in the horizontal direction.
[0129] Furthermore, when the intra prediction unit 14a generates a prediction image using reference pixels located on the right side and the lower side, the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b after inverting it in the vertical direction and the horizontal direction.
[0130] Note that when the intra prediction unit 14a generates a prediction image using reference pixels located on at least one of the right side and the lower side, and the orthogonal transform process to be applied is an asymmetric orthogonal transform process (for example, DST, etc.), the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b after inverting it in at least one of the horizontal direction and the vertical direction.
[0131] That is, even when the intra prediction unit 14a generates a prediction image using reference pixels located on at least one of the right side and the lower side, when the orthogonal transform process to be applied is a symmetric orthogonal transform process (for example, DCT, etc.), the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b without inverting it.
[0132] Also, when the intra prediction unit 14a generates a prediction image using reference pixels adjacent in three directions such as the lower side, the left side, and the upper side, the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b without inverting it.
[0133] Further, when the intra prediction unit 14a generates a prediction image using reference pixels adjacent in three directions such as the right side, the left side, and the upper side, the orthogonal transform / quantization unit 14c may be configured to perform an orthogonal transform process on the residual signal generated by the residual signal generation unit 14b without inverting it.
[0134] FIG. 6 shows a flowchart for explaining an example of the operation of the encoding device 1 according to the present embodiment.
[0135] As shown in FIG. 6, the operations in steps S301 to S314 are the same as the operations in steps S101 to S114 shown in FIG. 3.
[0136] In step 315, the encoding device 1 performs an orthogonal transform process on the above-described residual signal without inverting it, and then performs subsequent processing.
[0137] In step 316, the encoding device 1 performs an orthogonal transform process after inverting the above-described residual signal in at least one of the horizontal direction and the vertical direction, and then performs subsequent processing.
[0138] According to the encoding device 1 according to the present embodiment, when a prediction image is generated using reference pixels located in at least one of the right side and the lower side, the residual signal is inverted in at least one of the horizontal direction and the vertical direction and then an orthogonal transform process is performed. Therefore, an increase in entropy can be reduced.
[0139] In the decoding device 3 according to the present embodiment, when the intra prediction unit 33a generates a prediction image using reference pixels located in at least one of the right side and the lower side, the inverse quantization / inverse transform unit 33b is configured to invert the signal obtained by performing an inverse orthogonal transform process on the above-described transform coefficient in at least one of the horizontal direction and the vertical direction.
[0140] For example, when the intra prediction unit 33a generates a prediction image using reference pixels located on the left side and the lower side, the inverse quantization / inverse transformation unit 33b may be configured to invert the signal obtained by performing an inverse orthogonal transformation process on the above-described transformation coefficients in the vertical direction.
[0141] Further, when the intra prediction unit 33a generates a prediction image using reference pixels located on the right side and the upper side, the inverse quantization / inverse transformation unit 33b may be configured to invert the signal obtained by performing an inverse orthogonal transformation process on the above-described transformation coefficients in the horizontal direction.
[0142] Furthermore, when the intra prediction unit 33a generates a prediction image using reference pixels located on the right side and the lower side, the inverse quantization / inverse transformation unit 33b may be configured to invert the signal obtained by performing an inverse orthogonal transformation process on the above-described transformation coefficients in the vertical and horizontal directions.
[0143] Note that when the intra prediction unit 33a generates a prediction image using reference pixels located on at least one of the right side and the lower side, and the orthogonal transformation process to be applied is an asymmetric orthogonal transformation process (e.g., DST, etc.), the inverse quantization / inverse transformation unit 33b may be configured to invert the signal obtained by performing an inverse orthogonal transformation process on the above-described transformation coefficients.
[0144] That is, even when the intra prediction unit 33a generates a prediction image using reference pixels located on at least one of the right side and the lower side, if the orthogonal transformation process to be applied is a symmetric orthogonal transformation process (e.g., DCT, etc.), the inverse quantization / inverse transformation unit 33b may be configured not to invert the signal obtained by performing an inverse orthogonal transformation process on the above-described transformation coefficients.
[0145] Also, when the intra prediction unit 33a generates a prediction image using reference pixels adjacent in three directions such as the lower side, the left side, and the upper side, the inverse quantization / inverse transformation unit 33b may be configured not to invert the signal obtained by performing an inverse orthogonal transformation process on the above-described transformation coefficients.
[0146] Further, when the intra prediction unit 33a generates a prediction image using reference pixels adjacent in three directions such as the right side, the left side, and the upper side, the inverse quantization / inverse transformation unit 33b may be configured not to invert the signal obtained by performing the inverse orthogonal transformation process on the above-described transformation coefficients.
[0147] FIG. 7 shows a flowchart for explaining an example of the operation of the decoding apparatus 3 according to the present embodiment.
[0148] As shown in FIG. 7, the operations in steps S401 to S414 are the same as the operations in steps S201 to S214 shown in FIG. 5.
[0149] In step 415, the decoding apparatus 3 performs subsequent processing without inverting the signal obtained by performing the inverse orthogonal transformation process on the above-described transformation coefficients.
[0150] In step 416, the decoding apparatus 3 inverts the signal obtained by performing the inverse orthogonal transformation process on the above-described transformation coefficients in at least one of the horizontal direction and the vertical direction, and then performs subsequent processing.
[0151] (Other Embodiments) As described above, the present invention has been described by the above-described embodiments. However, the discussions and drawings that form part of the disclosure in such embodiments should not be understood to limit the present invention. Various alternative embodiments, examples, and operation techniques will become apparent to those skilled in the art from such disclosure.
[0152] Also, although not particularly mentioned in the above-described embodiments, a program for causing a computer to execute each process performed by the above-described encoding device 1 and decoding device 3 may be provided. Further, such a program may be recorded on a computer-readable medium. By using a computer-readable medium, it is possible to install such a program in a computer. Here, the computer-readable medium on which such a program is recorded may be a non-transitory recording medium. The non-transitory recording medium is not particularly limited, and may be, for example, a recording medium such as a CD-ROM or a DVD-ROM.
[0153] Alternatively, a chip configured by a memory that stores a program for realizing at least a part of the functions in the above-described encoding device 1 and decoding device 3 and a processor that executes the program stored in the memory may be provided.
Explanation of Signs
[0154] 1…Encoding device 11…Intra prediction mode determination unit 12…TU division determination unit 13…Encoding order control unit 14…Sequential local decoded image generation unit 14a…Intra prediction unit 14b…Residual signal generation unit 14c…Orthogonal transformation / quantization unit 14d…Inverse quantization / inverse orthogonal transformation unit 14e…Local decoded image generation unit 15…Memory 16…Entropy encoding unit 3…Decoding device 31…Entropy decoding unit 32…Decoding order control unit 33…Sequential local decoded image generation unit 33a…Intra prediction unit 33b…Inverse quantization / inverse transformation unit 33c…Decoded image generation unit 34…Memory
Claims
1. A decoding device configured to decode a target block obtained by dividing an original image in units of frames constituting a moving image, comprising: an intra prediction unit that generates a predicted image corresponding to the current block based on an intra prediction mode indicating a type of intra prediction processing; an inverse transform unit that performs an inverse transform process on a transform coefficient corresponding to the target block; The inverse transform unit controls the inverse transform process based on an intra prediction mode used by the intra prediction unit for a prediction process and a position of a reference pixel used by the intra prediction unit for the prediction process, the position being determined according to a predetermined block decoding order; The decoding device according to claim 1, wherein controlling the inverse transform process includes rearranging signals obtained by performing the inverse transform process on the transform coefficients in a predetermined direction.
2. A program for causing a computer to function as the decoding device according to claim 1.
Citation Information
Patent Citations
Image encoder, image decoder and programs thereof
JP2014045434A
Image encoding method, image encoding device, image decoding method, image decoding device, and image encoding / decoding device
WO2012096194A1