Symbolizing device, decoding device, and program
By dividing images into blocks and applying secondary orthogonal transformations based on reference pixel positions, the encoding and decoding apparatus optimizes entropy reduction and coding performance in HEVC intra prediction.
Patent Information
- Application Number
- JP2024066609
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2036-05-24
AI Technical Summary
Existing HEVC intra prediction methods fail to consider the position of reference pixels, leading to potential increases in entropy and decreased coding performance when using reference pixels on the right or bottom sides.
An encoding and decoding apparatus that divides images into blocks, performs intra prediction using reference pixels, and applies secondary orthogonal transformations based on the position of these pixels, inverting residual signals in horizontal or vertical directions as needed to optimize entropy reduction.
This approach efficiently reduces entropy and improves coding performance by selecting appropriate secondary orthogonal transformations based on the position of reference pixels, enhancing encoding efficiency.
Smart Images

Figure 0007714724000001 
Figure 0007714724000002 
Figure 0007714724000003
Abstract
Description
Technical Field
[0001] The present invention relates to an encoding device, a decoding device, and a program.
Background Art
[0002] In a moving image (video) encoding method typified by H.265 / HEVC (High Efficiency Video Coding), prediction is performed while switching between two types of prediction: inter prediction using temporal correlation between frames and intra prediction using spatial correlation within a frame to generate a residual signal, and then orthogonal transformation processing, loop filter processing, and entropy encoding processing are performed to output the obtained stream.
[0003] In intra prediction in HEVC, a total of 35 types of intra prediction modes such as Planar prediction, DC prediction, and directional prediction are prepared, and intra prediction is performed using adjacent decoded reference pixels according to the intra prediction mode determined by the encoder. Hereinafter, unless otherwise specified, the description of "reference pixel" indicates a decoded reference pixel.
[0004] Here, in intra prediction in HEVC, for a CU (Coding Unit) such as an encoding target block located at the uppermost left within a frame where there are no adjacent reference pixels, a reference pixel used for generating a prediction image is created by a process of filling a prescribed 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 a 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 raster scan order, reference pixels located in the lower left or upper right of the CU are often not decoded. In such cases, when performing direction prediction from the direction where the non-decoded reference pixels exist, the prediction accuracy decreases and the encoding efficiency is reduced.
[0007] In order to solve such problems, in intra prediction, as an 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 (for example, Z-type), techniques are known to 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] Also, the intra prediction used in HEVC is a prediction that uses spatially adjacent upper or left reference pixels. The accuracy of the predicted pixels near the reference pixels is high, and the accuracy of the predicted pixels far from the reference pixels tends to be low (see FIG. 10).
[0009] 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).
[0010] In conventional HEVC, by utilizing such properties, orthogonal transform processing such as discrete sine transform (DST) or discrete cosine transform (DCT) is applied in the horizontal and vertical directions from the left and upper directions where the reference pixels are located to reduce the entropy of the residual signal.
[0011] In particular, as shown in FIG. 11, since the shape of the impulse response of DST has an asymmetric shape where one of its endpoints is closed and the other endpoint spreads, as shown in FIG. 12, by applying DST according to the signal strength of the residual signal, the reduction of entropy can be effectively performed.
[0012] Incidentally, Non-Patent Document 2 discloses a technique for efficiently reducing entropy by applying a secondary orthogonal transformation process (hereinafter referred to as the secondary orthogonal transformation process) to a residual signal whose entropy is difficult to reduce in the orthogonal transformation process (DCT or DST) applied in conventional HEVC.
[0013] Specifically, in the technique described in Non-Patent Document 2, after applying the conventional orthogonal transformation process to the residual signal obtained by intra prediction, the obtained orthogonal transformation coefficients are divided into small blocks, and the secondary orthogonal transformation process is applied to each block.
[0014] Here, the encoding device is configured to select an optimal secondary orthogonal transformation process from a group of secondary orthogonal transformation processes (set of secondary orthogonal transformation processes) for which a plurality of types of bases are prepared, and output flag information indicating the selected secondary orthogonal transformation process as a stream (when it is more optimal not to apply the secondary orthogonal transformation process, output flag information indicating not to apply the secondary orthogonal transformation process as a stream).
[0015] Also, in the technique described in Non-Patent Document 2, since the characteristics of the residual signal and the characteristics of the orthogonal transformation coefficients differ depending on the direction of the intra prediction mode, it is configured to switch the group of secondary orthogonal transformation processes that can be selected according to the intra prediction mode.
[0016] As a result, it becomes possible to select an optimal secondary orthogonal transformation process from the group of secondary orthogonal transformation processes defined for each intra prediction mode, and it is possible to reduce the amount of information required for the flag indicating which secondary orthogonal transformation process is used.
Prior Art Documents
Non-Patent Documents
[0017]
Non-Patent Document 1
Non - Patent Document 2
Summary of the Invention
Problems to be Solved by the Invention
[0018] However, in the technology described in Non - Patent Document 2, without considering the position of the reference pixels used in the intra - prediction mode, it is configured to determine the optimal secondary orthogonal transformation process from the group of secondary orthogonal transformation processes according to the intra - prediction mode.
[0019] Here, the characteristics of the residual signal obtained by intra - prediction using the reference pixels on the right or bottom side are different from those of the residual signal obtained by intra - prediction using the reference signals on the upper or left side.
[0020] Therefore, in the technology described in Non - Patent Document 2, when intra - prediction using the reference pixels on the right or bottom side is performed, if the secondary orthogonal transformation process group is switched only by the intra - prediction mode, there is a problem that the entropy may increase instead, and the coding performance may decrease.
[0021] 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 efficiently reduce entropy and improve coding performance in intra - prediction.
Means for Solving the Problems
[0022] A first feature of the present invention is an encoding apparatus configured to divide an original image in frame units constituting a moving image into encoding target blocks and perform encoding, the encoding apparatus including: 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 generated by the intra prediction unit and the original image; an orthogonal transformation unit configured to perform orthogonal transformation processing on the residual signal generated by the residual signal generation unit after inverting the residual signal in at least one of a horizontal direction and a vertical direction when at least one of a right side and a lower side is included in a position of a reference pixel used for generating the prediction image; and a secondary orthogonal transformation unit configured to select a secondary orthogonal transformation process to be applied from among a predefined secondary orthogonal transformation group according to the intra prediction mode and the position of the reference pixel, and perform the selected secondary orthogonal transformation process on a signal output from the orthogonal transformation unit.
[0023] A second feature of the present invention is a decoding apparatus configured to divide an original image in frame units constituting a moving image into encoding target blocks and perform decoding, the decoding apparatus including: an intra prediction unit configured to generate a prediction image using an intra prediction mode; an inverse quantization unit configured to perform inverse quantization processing on quantized transform coefficients; a secondary inverse orthogonal transformation unit configured to select a secondary inverse orthogonal transformation process to be applied from among a predefined secondary inverse orthogonal transformation group according to the intra prediction mode and the position of the reference pixel used for generating the prediction image, and perform the selected secondary inverse orthogonal transformation process on a signal output from the inverse quantization unit; and an inverse orthogonal transformation unit configured to perform inverse orthogonal transformation processing on the signal output from the secondary inverse orthogonal transformation unit after inverting the signal in at least one of a horizontal direction and a vertical direction when at least one of a right side and a lower side is included in the position of the reference pixel.
[0024] A third feature of the present invention is an encoding apparatus configured to divide an original image in frame units constituting a moving image into encoding target blocks and perform encoding, the encoding apparatus including: 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 generated by the intra prediction unit and the original image; an orthogonal transformation unit configured to perform an orthogonal transformation process on the residual signal generated by the residual signal generation unit after inverting at least one of a horizontal basis and a vertical basis when at least one of the right side and the lower side is included in positions of reference pixels used for generating the prediction image; and a secondary orthogonal transformation unit configured to select a secondary orthogonal transformation process to be applied from among a predefined secondary orthogonal transformation group according to the intra prediction mode and the positions of the reference pixels, and perform the selected secondary orthogonal transformation process on the signal output from the orthogonal transformation unit.
[0025] A fourth feature of the present invention is a decoding apparatus configured to divide an original image in frame units constituting a moving image into encoding target blocks and perform decoding, the decoding apparatus including: an intra prediction unit configured to generate a prediction image using an intra prediction mode; an inverse quantization unit configured to perform an inverse quantization process on quantized transform coefficients; a secondary inverse orthogonal transformation unit configured to select a secondary inverse orthogonal transformation process to be applied from among a predefined secondary inverse orthogonal transformation group according to the intra prediction mode and the positions of the reference pixels used for generating the prediction image, and perform the selected secondary inverse orthogonal transformation process on the signal output from the inverse quantization unit; and an inverse orthogonal transformation unit configured to perform an inverse orthogonal transformation process on the signal output from the secondary inverse orthogonal transformation unit after inverting at least one of a horizontal basis and a vertical basis when at least one of the right side and the lower side is included in the positions of the reference pixels.
[0026] A fifth feature of the present invention is a program for causing a computer to function as the encoding apparatus according to the first and third features described above.
[0027] The sixth feature of the present invention is summarized as a program for causing a computer to function as the decoding device described in the above-described second and fourth features.
Effects of the Invention
[0028] According to the present invention, it is possible to provide an encoding device, a decoding device, and a program that can efficiently reduce entropy and improve encoding performance in intra prediction.
Brief Description of the Drawings
[0029]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Embodiment for Carrying Out the Invention
[0030] (First Embodiment) Hereinafter, with reference to FIGS. 1 to 9, the encoding device 1 and the decoding device 3 according to the first embodiment of the present invention will be described.
[0031] Here, the encoding device 1 and the decoding device 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 device 1 and the decoding device 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.
[0032] The encoding device 1 according to the present embodiment is configured to divide the original image in units of frames constituting a moving image into CUs and perform encoding. Further, the encoding device 1 according to the present embodiment may be configured to be able to divide a CU into a plurality of TUs. Hereinafter, in the present 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 and the positions of reference pixels of the CU include the lower side or the right side.
[0033] Note that, in the present embodiment, for a CU to be encoded that has no adjacent decoded reference pixels, such as a CU located at the uppermost left within a frame, a reference pixel used when generating a prediction image is created by a process of filling a specified 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 CU to be encoded can be used as reference pixels.
[0034] As shown in FIG. 1, the encoding device 1 according to the present 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.
[0035] The intra prediction mode determination unit 11 is configured to determine an optimal intra prediction mode to be applied to the CU.
[0036] The TU division determination unit 12 is configured to determine whether to divide the CU into a plurality of TUs. In the present embodiment, as an example of a method of dividing the CU into a plurality of TUs, a case of four-way division is described. However, the number of divisions and the division shape when dividing the CU into a plurality of TUs are not limited to such a case.
[0037] The encoding order control unit 13 is configured to determine the encoding order of the TUs in the CU based on the intra prediction mode (for example, the direction of the intra prediction mode).
[0038] For example, when it is determined by the TU division determination unit 12 that the CU is divided into a plurality of TUs, the encoding order control unit 13 determines that 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), the encoding order of the TUs in the CU is not the conventional raster scan order, but the encoding order of the lower left TU in the CU → the lower right TU in the CU → the upper left TU in the CU → the upper right TU in the CU, or the lower left TU in the CU → the upper left TU in the CU → the lower right TU in the CU → the upper right TU in the CU. Among them, a predefined encoding order may be adopted.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] The intra prediction unit 14a is configured to generate a predicted image using the intra prediction mode determined by the intra prediction mode determination unit 11. That is, the intra prediction unit 14a determines the positions of the reference pixels used when generating the predicted image according to such an intra prediction mode, and is configured to generate the predicted image using such reference pixels.
[0043] Furthermore, the intra prediction unit 14a may be configured to generate a predicted image in the encoding order determined by the encoding order control unit 13.
[0044] The residual signal generation unit 14b is configured to generate a residual signal based on the difference between the predicted image generated by the intra prediction unit 14a and the original image.
[0045] The orthogonal transform / quantization unit 14c is configured to perform orthogonal transform processing and quantization processing on the residual signal generated by the residual signal generation unit 14b to generate quantized transform coefficients.
[0046] As shown in FIG. 2, the orthogonal transform / quantization unit 14c includes an orthogonal transform unit 14c1, a secondary orthogonal transform unit 14c2, and a quantization unit 14c3.
[0047] The orthogonal transform unit 14c1 is configured to perform orthogonal transform processing on the residual signal generated by the residual signal generation unit 14b.
[0048] Specifically, when at least one of the right side and the lower side is included in the position of the reference pixel used for generating the predicted image (when generating the predicted image using the reference pixel adjacent to at least one of the right side and the lower side), the orthogonal transformation unit 14c1 is configured to obtain orthogonal transformation coefficients by performing orthogonal transformation processing after inverting the residual signal generated by the residual signal generation unit 14b in at least one of the horizontal direction and the vertical direction.
[0049] For example, when the lower side is included in the position of the reference pixel (when generating the predicted image using the reference pixel adjacent to the lower side), the orthogonal transformation unit 14c1 may be configured to perform the orthogonal transformation processing after inverting the residual signal in the vertical direction.
[0050] Alternatively, when the right side is included in the position of the reference pixel (when generating the predicted image using the reference pixel adjacent to the right side), the orthogonal transformation unit 14c1 may be configured to perform the orthogonal transformation processing after inverting the residual signal in the horizontal direction.
[0051] The second orthogonal transformation unit 14c2 is configured to select a second orthogonal transformation process to be applied from among the pre-defined second orthogonal transformation groups according to the intra prediction mode and the position of the reference pixel, and perform the selected second orthogonal transformation process on the signal (orthogonal transformation coefficients) output from the orthogonal transformation unit 14c1.
[0052] FIG. 3 shows an example of the intra prediction mode used in the present embodiment. As shown in FIG. 3, in the present embodiment, the intra prediction modes 2 to 9 are classified into category A, the intra prediction modes 10 to 26 are classified into category B, and the intra prediction modes 27 to 34 are classified into category C.
[0053] Note that, in the present embodiment, an example using the intra prediction mode in HEVC shown in FIG. 3 will be described, but the present invention is also applicable to an example in which other intra prediction modes are used.
[0054] Here, the secondary orthogonal transformation process is a transformation process applied to further reduce the entropy with respect to the orthogonal transformation coefficients obtained by applying the orthogonal transformation process to the residual signal.
[0055] Note that the energy distribution of the residual signal is statistically proportional to the distance from the reference pixels used for intra prediction. Therefore, in the intra prediction mode that uses only the reference pixels located on the left side and the intra prediction mode that uses the reference pixels located on the left side and the upper side, the energy distribution of the residual signal is different. Also, the energy distribution of the orthogonal transformation coefficients obtained by applying the orthogonal transformation process to these residual signals also differs depending on the intra prediction mode.
[0056] Therefore, the technique described in Non-Patent Document 2 is configured to switch the group of secondary orthogonal transformation processes that can be selected according to the direction of the intra prediction mode by utilizing the correlation between the bias of the energy of the orthogonal transformation coefficients and the direction of the intra prediction mode.
[0057] Figs. 4(a) and 4(b) show, as an example of the energy distribution of the residual signal, the difference in the energy distribution of the residual signal in intra prediction mode 2 (intra prediction mode that uses only the reference pixels located on the left side) and intra prediction mode 18 (intra prediction mode that uses the reference pixels located on the left side and the upper side) in HEVC.
[0058] However, as shown in Fig. 5, when performing the direction prediction of intra prediction mode 2 using the reference pixels located on the left side and the lower side, compared with the case of performing the direction prediction of intra prediction mode 2 using only the reference pixels located on the left side, due to the different positions of the reference pixels, the energy distribution of the residual signal is also different.
[0059] The energy distribution of the residual signal by the direction prediction of intra prediction mode 2 using the reference pixels located on the left side and the lower side (see Fig. 5) has the same energy distribution as that obtained by vertically inverting the residual signal by the direction prediction of intra prediction mode 18 using the reference pixels located on the left side and the upper side shown in Fig. 4(b).
[0060] That is, when performing directional prediction in intra prediction mode 2, when the left and lower sides are included as the positions of reference pixels and orthogonal transformation processing is applied after inverting the residual signal in the vertical direction, the energy distribution of the orthogonal transformation coefficients obtained is the same as the energy distribution of the orthogonal transformation coefficients obtained when performing directional prediction in intra prediction mode 18, when the left and upper sides are included as the positions of reference pixels and orthogonal transformation processing is applied without inverting the residual signal in the horizontal and vertical directions (see FIGS. 4(b) and 5).
[0061] Since the energy distribution of the orthogonal transformation coefficients obtained by orthogonal transformation processing on the residual signal by directional prediction in intra prediction mode 2 differs depending on the position of the reference pixels used for intra prediction, there is a risk that the entropy will increase and the coding performance will deteriorate by determining the applicable secondary orthogonal transformation processing group based only on the intra prediction mode.
[0062] Therefore, the secondary orthogonal transformation unit 14c2 is configured to use a group of secondary orthogonal transformation processes defined in advance according to the direction in which the direction of the intra prediction mode is inverted in at least one of the vertical and horizontal directions according to the position of the reference pixels, rather than in the direction of the intra prediction mode.
[0063] That is, when the intra prediction mode belongs to category B, the secondary orthogonal transformation unit 14c2 may be configured to select the secondary orthogonal transformation process to be applied from among the secondary orthogonal transformation groups defined in advance according to the direction of the intra prediction mode.
[0064] For example, when the intra prediction mode is 18, the secondary orthogonal transformation unit 14c2 may be configured to select the secondary orthogonal transformation process to be applied from among the secondary orthogonal transformation groups defined in advance according to the direction of the intra prediction mode 18.
[0065] Alternatively, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction of the intra prediction mode when the intra prediction mode belongs to category A and the lower side is not included as the position of the reference pixel.
[0066] For example, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction of the intra prediction mode 2 when the intra prediction mode is 2 and the lower side is not included as the position of the reference pixel.
[0067] Alternatively, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction of the intra prediction mode when the intra prediction mode belongs to category C and the right side is not included as the position of the reference pixel.
[0068] For example, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction of the intra prediction mode 34 when the intra prediction mode is 34 and the right side is not included as the position of the reference pixel.
[0069] Further, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction obtained by inverting the direction of the intra prediction mode vertically when the lower side is included in the position of the reference pixel.
[0070] Here, "inverting the direction of the intra prediction mode in the vertical direction" means, in the example of FIG. 3, converting between the directions of intra prediction modes 2 to 9 and the directions of intra prediction modes 18 to 11, respectively. That is, it means converting the direction of each intra prediction mode to the direction of an intra prediction mode having a line-symmetric positional relationship with respect to the direction of intra prediction mode 10.
[0071] That is, the second orthogonal conversion unit 14c2 may be configured to select a second orthogonal conversion process to be applied from among a group of second orthogonal conversions defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the vertical direction when the intra prediction mode belongs to category A and the lower side is included as the position of the reference pixel.
[0072] For example, the second orthogonal conversion unit 14c2 may be configured to select a second orthogonal conversion process to be applied from among a group of second orthogonal conversions defined in advance according to the direction obtained by inverting the direction of intra prediction mode 2 in the vertical direction (the direction of intra prediction mode 18) when the intra prediction mode is 2 and the lower side is included as the position of the reference pixel.
[0073] Alternatively, the second orthogonal conversion unit 14c2 may be configured to select a second orthogonal conversion process to be applied from among a group of second orthogonal conversions defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the horizontal direction when the right side is included in the position of the reference pixel.
[0074] Here, "inverting the direction of the intra prediction mode in the horizontal direction" means, in the example of FIG. 3, converting between the directions of intra prediction modes 18 to 25 and the directions of intra prediction modes 34 to 27, respectively. That is, it means converting the direction of each intra prediction mode to the direction of an intra prediction mode having a line-symmetric positional relationship with respect to the direction of intra prediction mode 26.
[0075] That is, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction obtained by inverting the direction of the intra prediction mode horizontally when the intra prediction mode belongs to category C and the right side is included as the position of the reference pixel.
[0076] For example, when the intra prediction mode is 34 and the right side is included as the position of the reference pixel, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction obtained by inverting the direction of the intra prediction mode 34 horizontally (the direction of the intra prediction mode 18).
[0077] The quantization unit 14c3 is configured to perform quantization processing on the signal output from the second orthogonal transformation unit 14c2 to generate quantized transform coefficients.
[0078] The inverse quantization unit and inverse orthogonal transformation unit 14d is configured to perform inverse quantization processing, second inverse orthogonal transformation, and inverse orthogonal transformation processing again on the quantized transform coefficients generated by the orthogonal transformation and quantization unit 14c to generate a residual signal.
[0079] 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 unit and inverse orthogonal transformation unit 14d.
[0080] 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.
[0081] The entropy encoding unit 16 is configured to perform entropy encoding processing on the 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.
[0082] FIG. 6 shows a flowchart for explaining an example of the operation of the encoding device 1 according to the present embodiment.
[0083] As shown in FIG. 6, in step S101, the encoding device 1 determines the positions of reference pixels used when generating a prediction image according to the determined intra prediction mode, and generates a prediction image using such reference pixels.
[0084] In step S102, the encoding device 1 generates a residual signal based on the difference between the prediction image and the original image.
[0085] In step S103, when at least one of the right side and the lower side is included in the positions of the reference pixels used for generating the prediction image, the encoding device 1 inverts the residual signal in at least one of the horizontal direction and the vertical direction and then performs an orthogonal transformation process.
[0086] In step S104, the encoding device 1 selects an orthogonal transformation process to be applied from among a predefined set of secondary orthogonal transformation groups according to the intra prediction mode and the positions of the reference pixels, and performs the selected secondary orthogonal transformation process on the orthogonal transformation coefficients.
[0087] In step S105, the encoding device 1 performs quantization processing on the signal subjected to the secondary orthogonal transformation process to generate quantized transformation coefficients.
[0088] In step S106, the encoding device 1 performs entropy encoding processing on the flag information including the intra prediction mode and the like and the quantized transformation coefficients, and outputs a stream.
[0089] Also, the decoding device 3 according to the present embodiment is configured to divide the original image in units of frames constituting a moving image into CUs and decode them. Also, the decoding device 3 according to the present embodiment is configured to be able to divide a CU into a plurality of TUs, similar to the encoding device 1 according to the present embodiment.
[0090] As shown in FIG. 7, the decoding apparatus 3 according to the present embodiment includes an entropy decoding unit 31, a decoding order control unit 32, a sequential decoding image generation unit 33, and a memory 34.
[0091] The entropy decoding unit 31 is configured to decode conversion coefficients, flag information, etc. from the stream output from the encoding apparatus 1 by performing entropy decoding processing on the stream output from the encoding apparatus 1. Here, the conversion coefficient is a quantized conversion coefficient obtained as a signal obtained by dividing the original image in units of frames into CUs and encoding them by the encoding apparatus 1.
[0092] The decoding order control unit 32 is configured to determine the decoding order of TUs in the CU based on the intra prediction mode.
[0093] Specifically, the decoding order control unit 32 is configured to determine the decoding order of TUs in the CU according to a flag indicating whether TU division has been performed by the entropy decoding unit 31 (whether the CU is divided into a plurality of TUs) and the direction of the intra prediction mode.
[0094] For example, similar to the encoding order control unit 13, 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 decoding order control unit 32 may be configured to perform decoding processing in a predefined decoding order, such as the decoding order of the lower left TU in the CU → the lower right TU in the CU → the upper left TU in the CU → the upper right TU in the CU, or the decoding order of the lower left TU in the CU → the upper left TU in the CU → the lower right TU in the CU → the upper right TU in the CU.
[0095] The sequential decoding image generation unit 33 is configured to generate a decoded image (decoded image for each TU) based on the decoding order determined by the decoding order control unit 32 and the method of dividing the CU into TUs.
[0096] Specifically, when a CU is divided into a plurality of TUs, the sequential decoding image generation unit 33 is configured to generate a decoded image by sequentially performing inverse quantization processing, inverse orthogonal transformation processing, and intra prediction on the quantized transform coefficients output by the entropy decoding unit 31 in accordance with the decoding order determined by the decoding order control unit 32.
[0097] As shown in FIG. 7, the sequential decoding image generation unit 33 includes an intra prediction unit 33a, an inverse quantization / inverse transformation unit 33b, and a decoded image generation unit 33c.
[0098] 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 in accordance with the decoding order determined by the decoding order control unit 32.
[0099] The inverse quantization / inverse transformation unit 33b is configured to generate a residual signal by performing inverse quantization processing and inverse transformation processing (e.g., inverse orthogonal transformation processing) on the quantized transform coefficients output by the entropy decoding unit 31.
[0100] As shown in FIG. 8, the inverse quantization / inverse transformation unit 33b includes an inverse quantization unit 33b1, a secondary inverse orthogonal transformation unit 33b2, and an inverse orthogonal transformation unit 33b3.
[0101] The inverse quantization unit 33b1 is configured to perform inverse quantization processing on the quantized transform coefficients output by the entropy decoding unit 31.
[0102] The secondary inverse orthogonal transformation unit 33b2 is configured to perform secondary inverse orthogonal transformation processing on the signal (transform coefficients) output from the inverse quantization unit 33b1.
[0103] Specifically, similar to the second orthogonal transformation unit 14c2, the second inverse orthogonal transformation unit 33b2 selects an inverse second orthogonal transformation process to be applied from among the pre-defined second inverse orthogonal transformation groups according to the intra prediction mode and the position of the reference pixels used for generating the prediction image, and is configured to perform the selected second inverse orthogonal transformation process on the signal output from the inverse quantization unit 33b1.
[0104] That is, the second inverse orthogonal transformation unit 33b2 may be configured to select an inverse second orthogonal transformation process to be applied from among the pre-defined second inverse orthogonal transformation groups according to the direction of the intra prediction mode when the intra prediction mode belongs to category B.
[0105] For example, the second inverse orthogonal transformation unit 33b2 may be configured to select an inverse second orthogonal transformation process to be applied from among the pre-defined second inverse orthogonal transformation groups according to the direction of the intra prediction mode 18 when the intra prediction mode is 18.
[0106] Alternatively, the second inverse orthogonal transformation unit 33b2 may be configured to select an inverse second orthogonal transformation process to be applied from among the pre-defined second inverse orthogonal transformation groups according to the direction of the intra prediction mode when the intra prediction mode belongs to category A and the lower side is not included as the position of the reference pixels.
[0107] For example, the second inverse orthogonal transformation unit 33b2 may be configured to select an inverse second orthogonal transformation process to be applied from among the pre-defined second inverse orthogonal transformation groups according to the direction of the intra prediction mode 2 when the intra prediction mode is 2 and the lower side is not included as the position of the reference pixels.
[0108] Alternatively, the second inverse orthogonal transformation unit 33b2 may be configured to select an inverse second orthogonal transformation process to be applied from among the pre-defined second inverse orthogonal transformation groups according to the direction of the intra prediction mode when the intra prediction mode belongs to category C and the right side is not included as the position of the reference pixels.
[0109] For example, when the intra prediction mode is 34 and the right side is not included as the position of the reference pixel, the secondary inverse orthogonal transform unit 33b2 may be configured to select a secondary inverse orthogonal transform process to be applied from among the secondary inverse orthogonal transform groups defined in advance according to the direction of the intra prediction mode 34.
[0110] Further, when the lower side is included in the position of the reference pixel, the secondary inverse orthogonal transform unit 33b2 may be configured to select a secondary inverse orthogonal transform process to be applied from among the secondary inverse orthogonal transform groups defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the vertical direction.
[0111] That is, when the intra prediction mode belongs to category A and the lower side is included as the position of the reference pixel, the secondary inverse orthogonal transform unit 33b2 may be configured to select a secondary inverse orthogonal transform process to be applied from among the secondary inverse orthogonal transform groups defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the vertical direction.
[0112] For example, when the intra prediction mode is 2 and the lower side is included as the position of the reference pixel, the secondary inverse orthogonal transform unit 33b2 may be configured to select a secondary inverse orthogonal transform process to be applied from among the secondary inverse orthogonal transform groups defined in advance according to the direction obtained by inverting the direction of the intra prediction mode 2 in the vertical direction (the direction of the intra prediction mode 18).
[0113] Alternatively, when the right side is included in the position of the reference pixel, the secondary inverse orthogonal transform unit 33b2 may be configured to select a secondary inverse orthogonal transform process to be applied from among the secondary inverse orthogonal transform groups defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the horizontal direction.
[0114] That is, the second inverse orthogonal transformation unit 33b2 may be configured to select a second inverse orthogonal transformation process to be applied from among a group of second inverse orthogonal transformations defined in advance according to the direction in which the direction of the intra prediction mode is reversed horizontally when the intra prediction mode belongs to category C and the right side is included as the position of the reference pixel.
[0115] For example, when the intra prediction mode is 34 and the right side is included as the position of the reference pixel, the second inverse orthogonal transformation unit 33b2 may be configured to select a second inverse orthogonal transformation process to be applied from among a group of second inverse orthogonal transformations defined in advance according to the direction in which the direction of the intra prediction mode 34 is reversed horizontally (the direction of the intra prediction mode 18).
[0116] The inverse orthogonal transformation unit 33b3 is configured to perform an inverse orthogonal transformation process on the signal output from the second inverse orthogonal transformation unit 33b2.
[0117] Specifically, when at least one of the right side and the lower side is included in the position of the reference pixel, the inverse orthogonal transformation unit 33b3 is configured to perform an inverse orthogonal transformation process after inverting the signal output from the second inverse orthogonal transformation unit 33b2 in at least one of the horizontal direction and the vertical direction.
[0118] For example, when the lower side is included in the position of the reference pixel, the inverse orthogonal transformation unit 33b3 may be configured to perform an inverse orthogonal transformation process after inverting the signal output from the second inverse orthogonal transformation unit 33b2 in the vertical direction.
[0119] Alternatively, when the right side is included in the position of the reference pixel, the inverse orthogonal transformation unit 33b3 may be configured to perform an inverse orthogonal transformation process after inverting the signal output from the second inverse orthogonal transformation unit 33b2 in the horizontal direction.
[0120] The decoded image generation unit 33c is configured to generate a decoded image by adding the predicted image generated by the intra prediction unit 33a and the residual signal generated by the inverse quantization / inverse transformation unit 33b.
[0121] The memory 34 is configured to hold the decoded image generated by the sequential decoding image generation unit 33 so as to be usable as a reference image for intra prediction and inter prediction.
[0122] FIG. 9 shows a flowchart for explaining an example of the operation of the decoding apparatus 3 according to the present embodiment.
[0123] As shown in FIG. 9, in step S201, the decoding apparatus 3 generates a prediction image using the intra prediction mode.
[0124] In step S202, the decoding apparatus 3 performs an inverse quantization process on the quantized transform coefficients.
[0125] In step S203, the decoding apparatus 3 selects an inverse secondary orthogonal transform process to be applied from among a predefined group of inverse secondary orthogonal transforms according to the intra prediction mode and the position of the reference pixels used for generating the prediction image, and performs the selected inverse secondary orthogonal transform process on the signal subjected to the inverse quantization process.
[0126] In step S204, when at least one of the right side and the bottom side is included in the position of the reference pixels, the decoding apparatus 3 inverts the signal subjected to the inverse secondary orthogonal transform process in at least one of the horizontal and vertical directions and then performs an inverse orthogonal transform process.
[0127] According to the encoding apparatus 1 and the decoding apparatus 3 according to the present embodiment, it is possible to switch and use different groups of secondary orthogonal transform processes according to the position of the reference pixels for the orthogonal transform coefficients obtained by performing an orthogonal transform process on the residual signal obtained by intra prediction, thereby reducing the entropy and improving the encoding efficiency.
[0128] (Second Embodiment) Hereinafter, 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.
[0129] In the encoding device 1 according to the present embodiment, when at least one of the right side and the lower side is included in the position of the reference pixel used for generating the predicted image, instead of inverting the residual signal generated by the residual signal generation unit 14b in at least one of the horizontal direction and the vertical direction, for the residual signal generated by the residual signal generation unit 14b, after inverting at least one of the bases in the horizontal direction and the vertical direction, it is configured to perform an orthogonal transformation process.
[0130] For example, when the lower side is included in the position of the reference pixel, the orthogonal transformation unit 14c1 may be configured to perform an orthogonal transformation process after inverting the vertical base with respect to the residual signal.
[0131] Alternatively, when the right side is included in the position of the reference pixel, the orthogonal transformation unit 14c1 may be configured to perform an orthogonal transformation process after inverting the horizontal base with respect to the residual signal.
[0132] In the encoding device 1 according to the present embodiment, the second orthogonal transformation unit 14c2 selects an orthogonal transformation process to be applied from among a predefined group of second orthogonal transformations according to the intra prediction mode and the position of the reference pixel, and is configured to perform the selected second orthogonal transformation process on the signal (orthogonal transformation coefficient) output from the orthogonal transformation unit 14c1.
[0133] For example, when the lower side is included in the position of the reference pixel, the second orthogonal transformation unit 14c2 may be configured to select an orthogonal transformation process to be applied from among a predefined group of second orthogonal transformations according to the direction in which the direction of the intra prediction mode is inverted vertically.
[0134] Alternatively, when the position of the reference pixel includes the right side, the second orthogonal transformation unit 14c2 may be configured to select a second orthogonal transformation process to be applied from among a group of second orthogonal transformations defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the horizontal direction.
[0135] Further, in the decoding apparatus 3 according to the present embodiment, the second inverse orthogonal transformation unit 33b2 selects a second inverse orthogonal transformation process to be applied from among a group of second inverse orthogonal transformations defined in advance according to the intra prediction mode and the position of the reference pixel used for generating the prediction image, and performs the selected second inverse orthogonal transformation process on the signal output from the inverse quantization unit.
[0136] For example, when the position of the reference pixel includes the lower side, the second inverse orthogonal transformation unit 33b2 may be configured to select a second inverse orthogonal transformation process to be applied from among a group of second inverse orthogonal transformations defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the vertical direction.
[0137] Alternatively, when the position of the reference pixel includes the right side, the second inverse orthogonal transformation unit 33b2 may be configured to select a second inverse orthogonal transformation process to be applied from among a group of second inverse orthogonal transformations defined in advance according to the direction obtained by inverting the direction of the intra prediction mode in the horizontal direction.
[0138] In the decoding apparatus 3 according to the present embodiment, when at least one of the right side and the lower side is included in the position of the reference pixel, instead of inverting the signal output from the second inverse orthogonal transformation unit 33b2 in at least one of the horizontal direction and the vertical direction, the inverse orthogonal transformation unit 33b3 is configured to perform an inverse orthogonal transformation process on the signal output from the second inverse orthogonal transformation unit 33b2 after inverting at least one of the horizontal and vertical bases.
[0139] For example, when the position of the reference pixel includes the lower side, the inverse orthogonal transformation unit 33b3 may be configured to perform an inverse orthogonal transformation process on the signal output from the second inverse orthogonal transformation unit 33b2 after inverting the vertical basis.
[0140] Alternatively, the inverse orthogonal transform unit 33b3 may be configured to perform an inverse orthogonal transform process on the signal output from the secondary inverse orthogonal transform unit 33b2 after inverting the horizontal basis with respect to the position of the reference pixel when the right side is included in the position of the reference pixel.
[0141] (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.
[0142] Also, although not particularly mentioned in the above embodiments, a program may be provided that causes a computer to execute each process performed by the above-described encoding device 1 and decoding device 3. 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 on 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.
[0143] Alternatively, a chip may be provided that includes a memory that stores a program for realizing at least some 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.
Explanation of Signs
[0144] 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 and Quantization Unit 14c1…Orthogonal Transformation Unit 14c2…Second Orthogonal Transformation Unit 14c3…Quantization Unit 14d…Inverse Quantization and Inverse Orthogonal Transformation Unit 14e…Local Decoded Image Generation Unit 15…Memory 16…Entropy Encoding Unit 3…Decoder 31…Entropy Decoding Unit 32…Decoding Order Control Unit 33…Sequential Local Decoded Image Generation Unit 33a…Intra Prediction Unit 33b…Inverse Quantization and Inverse Transformation Unit 33b1…Inverse Quantization Unit 33b2…Second Inverse Orthogonal Transformation Unit 33b3…Inverse Orthogonal Transformation Unit 33c…Decoded Image Generation Unit 34…Memory
Claims
1. An encoding device that divides and encodes an original image in frame units constituting a moving image into blocks, comprising: an intra prediction unit that generates a prediction image using an intra prediction mode indicating a type of intra prediction processing; a residual signal generation unit that generates a residual signal based on a difference between the prediction image generated by the intra prediction unit and the original image; a conversion unit that performs a conversion process on the residual signal generated by the residual signal generation unit; a secondary conversion unit that switches and uses different secondary conversion processes from among a group of predefined secondary conversion processes for the signal output from the conversion unit according to the position of available reference pixels used for generating the prediction image and the intra prediction mode, which are determined according to the block encoding order; An encoding device characterized by comprising the above.
2. The secondary conversion unit according to claim 1, wherein the secondary conversion unit switches and uses different secondary conversion processes from among the group of predefined secondary conversion processes for the signal output from the conversion unit according to the position of the available reference pixels and whether the intra prediction mode is within a predetermined range.
3. A decoding device that decodes in block units obtained by dividing an original image in frame units constituting a moving image, comprising: an intra prediction unit that generates a prediction image using an intra prediction mode indicating a type of intra prediction processing; an inverse quantization unit that performs an inverse quantization process on the quantized conversion coefficients; a secondary inverse conversion unit that switches and uses different secondary inverse conversion processes from among a group of predefined secondary conversion processes for the signal output from the inverse quantization unit according to the intra prediction mode and the position of available reference pixels used for generating the prediction image, which are determined according to the block decoding order; A decoding device characterized by comprising the above.
4. The secondary inverse conversion unit according to claim 3, wherein the secondary inverse conversion unit switches and uses different secondary inverse conversion processes from among the group of predefined secondary conversion processes for the signal output from the inverse quantization unit according to whether the intra prediction mode is within a predetermined range and the position of the available reference pixels.
5. A program for causing a computer to function as the encoding device according to claim 1 or 2.
6. A program for causing a computer to function as the decoding device according to claim 3 or 4.
Citation Information
Patent Citations
JPP7476279B
Dynamic image encoding method, dynamic image decoding method, and device
WO2007055158A1