Image encoding device, image encoding method, image encoding program, image decoding device, image decoding method and image decoding program

By employing non-angular intra prediction modes and optimizing block sizes, the technique addresses inefficiencies in HEVC for high-definition images, enhancing coding efficiency and prediction accuracy.

JP2025102946AActive Publication Date: 2025-07-08JVC KENWOOD CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2025061784
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-09-28
Filing Date
2025-04-03
Publication Date
2025-07-08
Estimated Expiration
2039-09-13

AI Technical Summary

Technical Problem

Existing image encoding techniques, such as HEVC, face inefficiencies in intra prediction for high-definition images like 4K and 8K, particularly due to limitations in block size and the use of angular prediction modes which can lead to increased coding amounts and reduced prediction efficiency.

Method used

The technique introduces a method for intra prediction that includes determining whether to use a non-angular intra prediction mode based on adjacent block modes, encoding flags for this decision, and selecting prediction modes from candidate lists, allowing for improved encoding efficiency by using larger block sizes and reducing processing complexity.

Benefits of technology

This approach enhances coding efficiency in intra prediction by optimizing block sizes and prediction modes, particularly for high-definition images, thereby improving prediction accuracy and reducing computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025102946000001_ABST
    Figure 2025102946000001_ABST
Patent Text Reader

Abstract

To improve encoding efficiency in intra-prediction.SOLUTION: In an image encoding device, an intra-prediction selection unit includes: a prediction mode candidate generation section for generating a first intra-prediction mode candidate list and a second intra-prediction mode candidate list from an intra-prediction mode of a block adjacent to a prediction target block; a prediction mode selection section for selecting a first intra-prediction mode and a second intra-prediction mode from the first intra-prediction mode candidate list and the second intra-prediction mode candidate list; a prediction value calculation section for calculating a first prediction value from a decoded pixel adjacent to the prediction target block based on the first intra-prediction mode and calculating a second prediction value from a decoded pixel adjacent to the prediction target block based on the second intra-prediction mode; and a prediction value weighting section for calculating a third prediction value based on the first prediction value and the second prediction value.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a technique for encoding and decoding an image using intra prediction.

Background Art

[0002] There is an image encoding technique such as HEVC (H.265). In HEVC, in addition to inter prediction encoding (inter-picture prediction encoding), intra prediction encoding (intra-picture prediction encoding) is utilized.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] In HEVC, for a square block divided into a quadtree, intra prediction is executed with a maximum block size of 3 2 pixels × 32 pixels. For high-definition images such as 4K images and 8K images, or 3 60-degree images, intra prediction with higher efficiency is provided with a larger block size.

[0005] The present invention has been made in view of such a situation, and an object thereof is to provide a technique for improving the encoding efficiency in intra prediction.

Means for Solving the Problems

[0006] In order to solve the above problems, an image encoding apparatus according to an aspect of the present embodiment is based on an intra prediction mode of a block adjacent to a prediction target block, and the intra of the prediction target block prediction mode of the prediction target block is ​​Encode a first flag indicating whether to determine the prediction mode, and for the block to be predicted Encode a second flag indicating whether the intra prediction mode is a predetermined non-angular intra prediction mode When the second flag indicates that it is not the predetermined non-angular intra prediction mode, an encoding unit that encodes a candidate identification index, and when the first flag is true Based on the intra prediction mode of the block adjacent to the block to be predicted, determine the intra prediction mode of the block to be predicted When the second flag is true, select the predetermined non-angular intra prediction mode as the intra prediction mode of the block to be predicted When the second flag is false, select the intra prediction mode of the block to be predicted from an intra prediction mode candidate list generated so as not to include the predetermined intra prediction mode based on the candidate identification index And a prediction mode selection unit.

[0007] Another aspect of the present invention is an image decoding device. This device decodes a first flag indicating whether to determine the intra prediction mode of the block to be predicted based on the intra prediction mode of the block adjacent to the block to be predicted, and decodes a second flag indicating whether the intra prediction mode of the block to be predicted is a predetermined non-angular intra prediction mode. When the second flag indicates that it is not the predetermined non-angular intra prediction mode, a decoding unit that decodes a candidate identification index, and when the first flag is true, based on the intra prediction mode of the block adjacent to the block to be predicted, determine the intra prediction mode of the block to be predicted. When the second flag is true, select the predetermined non-angular intra prediction mode as the intra prediction mode of the block to be predicted ​​​​​​​​​​Select the measurement mode as the intra prediction mode of the block to be predicted, and the second flag is false, based on the candidate identification index, the intra prediction mode is not included, and select the intra prediction mode of the block to be predicted from the intra prediction mode candidate list generated accordingly having a prediction mode selection unit.

[0008] In addition, any combination of the above components, and those obtained by converting the expression of the present invention among a method, an apparatus, a system, a computer program, etc., are also effective as aspects of the present invention.

Advantages of the Invention

Effect of the Invention

[0009] According to the present invention, the coding efficiency in intra prediction can be improved.

Brief Description of the Drawings

[0010]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Embodiments for Carrying Out the Invention

[0011] First, the intra prediction of HEVC will be explained. FIG. 1 is a diagram for explaining the intra prediction mode of HEVC. As shown in FIG. 1, in HEVC a total of 35 modes from prediction mode 0 to prediction mode 34 are defined as intra prediction modes It is as follows. Prediction mode 0 is INTRA_PLANAR. For the adjacent pictures of the prediction target block, four reference pixels generated by filtering are used for interpolation prediction to calculate the prediction value. Prediction mode 1 is INTRA_DC. The prediction value is calculated by averaging the adjacent pixels in the horizontal direction that are twice the width of the prediction block of the prediction target block and the adjacent pixels in the vertical direction that are twice the height of the prediction block. For prediction modes 2 to 34, the prediction value is calculated from the reference pixels generated by filtering the adjacent pixels of the prediction target block according to each angle. Here, regarding the filtering of the adjacent pixels of the prediction target block, it is likely to act when the size of the prediction target block is large, and it is less likely to act when the size of the prediction target block is small. Note that a 3-tap filter of 1:2:1 is used for filtering. For prediction modes 2 to 34, the prediction value is calculated from the reference pixels generated by filtering the adjacent pixels of the prediction target block according to each angle. Here, regarding the filtering of the adjacent pixels of the prediction target block, it is likely to act when the size of the prediction target block is large, and it is less likely to act when the size of the prediction target block is small. Note that a 3-tap filter of 1:2:1 is used for filtering. Regarding the filtering of the adjacent pixels of the prediction target block, it is likely to act when the size of the prediction target block is large, and it is less likely to act when the size of the prediction target block is small. Note that a 3-tap filter of 1:2:1 is used for filtering. Regarding the filtering of the adjacent pixels of the prediction target block, it is likely to act when the size of the prediction target block is large, and it is less likely to act when the size of the prediction target block is small.

[0012] Figure 2 is a diagram for explaining the syntax related to the intra prediction mode of HEVC. The prev_intra_luma_pred_flag is a flag indicating whether to use the intra prediction mode candidate derived for each prediction target block. When prev_intra_luma_pred_flag is 1, the intra prediction mode candidate is used. When prev_intra_luma_pred_flag is 0, the intra prediction mode candidate is not used. When prev_intra_luma_pred_flag is 1, mpm_idx (mpm index) indicates the number of the intra prediction mode candidate, and the intra prediction mode candidate indicated by mpm_idx becomes the intra prediction mode of the prediction target block. The intra prediction mode candidate is determined for each prediction target block based on the intra prediction modes of adjacent blocks. When prev_intra_luma_pred_flag is 1, mpm_idx (mpm index) indicates the number of the intra prediction mode candidate, and the intra prediction mode candidate indicated by mpm_idx becomes the intra prediction mode of the prediction target block. The intra prediction mode candidate is determined for each prediction target block based on the intra prediction modes of adjacent blocks. The intra prediction mode candidate indicated by mpm_idx becomes the intra prediction mode of the prediction target block. The intra prediction mode candidate is determined for each prediction target block based on the intra prediction modes of adjacent blocks. Three are generated from all 35 intra prediction modes based on the mode, and mpm_idx becomes a value of 0, 1, or 2. prev_intra_luma_pred_flag If it is 0, the intra prediction mode number is derived from rem_intra_luma_pred_mode . rem_intra_luma_pred_mode indicates an intra prediction mode other than the intra prediction mode candidates. That is, rem_intra_lu ma_pred_mode indicates any one of 32 intra prediction modes excluding the intra prediction candidates from all 35 intra prediction modes. The intra prediction mode indicated by rem_intra_l uma_pred_mode becomes the intra prediction mode of the prediction target block. As described above, in HEVC, all 35 intra prediction modes may be encoded ( decoded) in both mpm_idx and rem_intra_luma_pred_mode. prev_intra_luma_pred_flag, m pm_idx, rem_intra_luma_pred_mode are binary arithmetic coded by fixed-length 2-bit quantization, truncated Rice 2-bit quantization, and fixed-length 2-bit quantization, respectively. rem_intra_luma_pred_mode is binary arithmetic coded by 5-bit fixed-length 2-bit quantization. Truncated Rice 2-bit quantization improves the coding efficiency as the value gets smaller . As described above, prediction modes 2 to 34 of HEVC calculate the predicted value of intra prediction based on one angle. This reduces the coding amount by predicting the edge direction included in the image, which causes an increase in the coding amount, and taking the difference. And the prediction target block

[0013] As described above, prediction modes 2 to 34 of HEVC calculate the predicted value of intra prediction based on one angle. This reduces the coding amount by predicting the edge direction included in the image, which causes an increase in the coding amount, and taking the difference. And the prediction target block ​​​​​When the size of the CU is large, if predicted from a single angle, the edge direction may shift within the block, resulting in insufficient prediction efficiency. Therefore, the neighboring pixels of the prediction target block are filtered.

[0014] In HEVC, the maximum size of the prediction target block was 32 pixels × 32 pixels (hereinafter also denoted as 32×32). In contrast, in 4K video, 8K video, etc., it is known that the prediction efficiency can be improved by using a larger size of the prediction target block, and increasing the size of the prediction target block is important for improving the prediction efficiency.

[0015] Therefore, in the following embodiments, an intra prediction suitable for the case where the maximum size of the prediction target block is larger is provided. Hereinafter, among a plurality of intra prediction modes, an intra prediction mode in which the neighboring pixels used for prediction have no angular dependence is referred to as a non-angular intra prediction mode, and an intra prediction mode in which the neighboring pixels used for prediction have angular dependence is referred to as an angular intra prediction mode. The angular intra prediction mode includes a horizontal intra prediction mode and a vertical intra prediction mode.

[0016] In HEVC, prediction mode 0 and prediction mode 1 are non-angular intra prediction modes, and prediction modes 2 to 34 are angular intra prediction modes. More specifically, prediction modes 2 to 17 are horizontal intra prediction modes, and prediction modes 18 to 34 are vertical intra prediction modes.

[0017] (Embodiment 1) Hereinafter, an image encoding apparatus, an image encoding method, and an image encoding program, as well as an image decoding apparatus, an image decoding method, and an image decoding program according to an embodiment of the present invention will be described in detail with reference to the drawings.

[0018] FIG. 3 is a diagram for explaining an image encoding apparatus 100 and an image decoding apparatus 200 according to Embodiment 1 of the present invention. The image encoding apparatus 100 according to Embodiment 1 includes a block size determination unit 11 0, an intra prediction selection unit 120, a conversion unit 130, and an encoding unit 140. An input image is input to the image encoding apparatus 100, and an encoded stream is output.

[0019] The image decoding apparatus 200 includes a decoding unit 210, a block size acquisition unit 220, an intra prediction unit 2 30, and an inverse conversion unit 240. An encoded stream is input to the image decoding apparatus 200 and a decoded image is output.

[0020] In the intra prediction unit 230 of Embodiment 1, the same intra prediction mode as that of HEVC is used. The image encoding apparatus 100 and the image decoding apparatus 200 are realized by hardware such as an information processing apparatus including a CPU (Central Processing Unit), a frame memory, a hard disk, and the like. First, the functions and operations of each unit of the image encoding apparatus 100 will be described. An input image is input to the image encoding apparatus

[0021] 100. The block size determination unit 110 determines the block

[0022] size for intra prediction encoding based on the input image, and the determined block size and the input pixels corresponding to the block size (input values ​) is supplied to the intra prediction selection unit 120. Regarding the method for determining the block size, this will not be described in detail here. As used in the reference software of HEVC etc., RDO (rate distortion optimization) that compares the evaluation values of multiple block sizes and selects the optimal block size, or pre-judgment based on the evaluation value may be used.

[0023] Here, the block size will be described. FIG. 4 shows an example in which a partial region of the image input to the image encoding apparatus 100 is divided into blocks based on the block size determined by the block size determination unit 110. The block sizes are 4×4, 8×4, 4×8, 8×8, 16×8, 8×16, 32×32, ···, 128×64, 64×128, 128×128. The input image is divided using the above block sizes so that each block does not overlap.

[0024] The intra prediction selection unit 120 selects one intra prediction mode from among a plurality of intra prediction modes based on the block size, input pixels, and encoded image, and derives a predicted value from the encoded pixels based on the selected intra prediction mode. The block size, selected intra prediction mode, input value, and predicted value are supplied to the conversion unit 130. Note that the encoded pixels are shared among the respective units within the image encoding apparatus 100 and are not shown here. Details of the intra prediction selection unit 120 will be described later.

[0025] The conversion unit 130 subtracts the predicted value from the input value to calculate a difference value, performs processes such as orthogonal conversion and quantization on the calculated difference value to calculate prediction error data, and supplies the block size, intra prediction mode, and the calculated prediction error data to the encoding unit 140. ​

[0026] The symbolization unit 140 symbolizes a header and other information as necessary, symbolizes the symbol string regarding the block size supplied from the conversion unit 130, symbolizes the intra prediction mode as a symbol string, symbolizes the prediction error data, and outputs it as a symbolized stream. Details of the symbolization process of the intra prediction mode will be described later. The symbolization unit 140 symbolizes a header and other information as necessary, symbolizes the symbol string regarding the block size supplied from the conversion unit 130, symbolizes the intra prediction mode as a symbol string, symbolizes the prediction error data, and outputs it as a symbolized stream. Details of the symbolization process of the intra prediction mode will be described later. The symbolization unit 140 symbolizes a header and other information as necessary, symbolizes the symbol string regarding the block size supplied from the conversion unit 130, symbolizes the intra prediction mode as a symbol string, symbolizes the prediction error data, and outputs it as a symbolized stream. Details of the symbolization process of the intra prediction mode will be described later. The symbolization unit 140 symbolizes a header and other information as necessary, symbolizes the symbol string regarding the block size supplied from the conversion unit 130, symbolizes the intra prediction mode as a symbol string, symbolizes the prediction error data, and outputs it as a symbolized stream. Details of the symbolization process of the intra prediction mode will be described later.

[0027] The image encoding device 100 repeats the above processes until all areas of the input image are encoded. The image encoding device 100 repeats the above processes until all areas of the input image are encoded.

[0028] Here, details of the intra prediction selection unit 120 will be described. FIG. 5 is a diagram showing the configuration of the intra prediction selection unit 120 according to Embodiment 1. The intra prediction selection unit 120 includes a mode number determination unit 121, a prediction mode candidate generation unit 122, a prediction mode selection unit 123, a predicted value calculation unit 124, and a predicted value weighting unit 125. FIG. 5 is a diagram showing the configuration of the intra prediction selection unit 120 according to Embodiment 1. The intra prediction selection unit 120 includes a mode number determination unit 121, a prediction mode candidate generation unit 122, a prediction mode selection unit 123, a predicted value calculation unit 124, and a predicted value weighting unit 125. FIG. 5 is a diagram showing the configuration of the intra prediction selection unit 120 according to Embodiment 1. The intra prediction selection unit 120 includes a mode number determination unit 121, a prediction mode candidate generation unit 122, a prediction mode selection unit 123, a predicted value calculation unit 124, and a predicted value weighting unit 125.

[0029] FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored. FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored. FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored. FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored. FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored. FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored. FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored. FIG. 6 is a flowchart for explaining the operation of the intra prediction selection unit 120 according to Embodiment 1. Hereinafter, details of the intra prediction selection unit 120 will be described with reference to FIGS. 5 and 6. First, the mode number determination unit 121 checks whether the prediction block width is greater than or equal to a predetermined threshold width and the prediction block height is greater than or equal to a predetermined threshold height (S100). Here, it is assumed that the predetermined threshold width and the predetermined threshold height are both 32, but the predetermined threshold width and the predetermined threshold height may be different values, such as the predetermined threshold width being 64 and the predetermined threshold height being 32. Note that the predetermined threshold width and the predetermined threshold height may be respectively encoded as an extended Golomb code string in a header such as an SPS (Sequence_parameter_set) and stored.

[0030] Next, if the predicted block width is greater than or equal to a predetermined threshold width and the predicted block height is greater than or equal to a predetermined threshold height (YES in S100), the number of prediction modes is set to 2 (S10 1). If the predicted block width is greater than or equal to a predetermined threshold width and the predicted block height is not greater than or equal to a predetermined threshold height (NO in S100), the number of prediction modes is set to 1 (S102).

[0031] Next, when the number of prediction modes is 1, the intra prediction selection unit 120 sets M to 0, and when the number of prediction modes is 2, it sets M to 0 and 1 and repeats from S103 to S107. Here, considering the reduction of the number of steps, when the number of prediction modes is 1, M is only processed as 0. However, considering the simplification of the circuit configuration, even when the number of prediction modes is 1, S103 to S107 may be repeated with M being 0 and 1. (

[0032] The prediction mode candidate generation unit 122 generates a prediction mode candidate list M from the encoded adjacent blocks existing around the prediction target block (S104), and supplies the generated prediction mode candidate list M to the prediction mode selection unit 123. Details of the generation process of the prediction mode candidate list will be described later. ( (

[0033] The prediction mode selection unit 123 calculates the evaluation values of prediction modes from prediction mode 0 to prediction mode 34 respectively, and based on the calculated evaluation values of each prediction mode, selects one selected prediction mode M from among prediction modes 0 to 34 (S105), and supplies the selected selected prediction mode M to the prediction value calculation unit 124. Here, the selected prediction mode M is selected as one by RDO determination from among the prediction modes of prediction mode 0 to prediction mode 34. ( ( ( (

[0034] ​​​​The predicted value calculation unit 124 calculates the predicted value M of the prediction target block based on the selected prediction mode M input from the prediction mode selection unit 123 (S106), and supplies the calculated predicted value M to the predicted value weighting unit 125. Here, the predicted value is derived from adjacent pixels. Subsequently, it supplies the calculated predicted value M to the predicted value weighting unit 125. Here, the predicted value is derived from adjacent pixels. Here, the predicted value is derived from adjacent pixels.

[0035] FIG. 7 is a diagram for explaining the derivation of the predicted value. The prediction target block in FIG. 7 is 32×32, each pixel in the prediction target block exists from P(0,0) to P(31,31), and the adjacent pixels utilize RH-1 to RH63 and RV0 to RV63. When there are no adjacent pixels, it is assumed that alternative pixels as defined in HEVC are used for filling. FIG. 7 shows an example where the number of prediction modes is 2, the selected prediction mode 0 is prediction mode 10, and the selected prediction mode 1 is prediction mode 34 (see FIG. 1). Here, the prediction target block in FIG. 7 is 32×32, each pixel in the prediction target block exists from P(0,0) to P(31,31), and the adjacent pixels utilize RH-1 to RH63 and RV0 to RV63. When there are no adjacent pixels, it is assumed that alternative pixels as defined in HEVC are used for filling. FIG. 7 shows an example where the number of prediction modes is 2, the selected prediction mode 0 is prediction mode 10, and the selected prediction mode 1 is prediction mode 34 (see FIG. 1). Here, the prediction target block in FIG. 7 is 32×32, each pixel in the prediction target block exists from P(0,0) to P(31,31), and the adjacent pixels utilize RH-1 to RH63 and RV0 to RV63. When there are no adjacent pixels, it is assumed that alternative pixels as defined in HEVC are used for filling. FIG. 7 shows an example where the number of prediction modes is 2, the selected prediction mode 0 is prediction mode 10, and the selected prediction mode 1 is prediction mode 34 (see FIG. 1). Here, the prediction target block in FIG. 7 is 32×32, each pixel in the prediction target block exists from P(0,0) to P(31,31), and the adjacent pixels utilize RH-1 to RH63 and RV0 to RV63. When there are no adjacent pixels, it is assumed that alternative pixels as defined in HEVC are used for filling. FIG. 7 shows an example where the number of prediction modes is 2, the selected prediction mode 0 is prediction mode 10, and the selected prediction mode 1 is prediction mode 34 (see FIG. 1). First, the derivation of the predicted value of the selected prediction mode 0 when the selected prediction mode 0 is prediction mode 10 will be explained. P(0,0), P(1,0), ···, P(31,0) use RV0 as the predicted value, P(0,1), ···, P(31,1) use RV1 as the predicted value, and P(0,31), ···, P(31,31) use RV31 as the predicted value. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. Here, the prediction target block in FIG. 7 is 32×32, each pixel in the prediction target block exists from P(0,0) to P(31,31), and the adjacent pixels utilize RH-1 to RH63 and RV0 to RV63. When there are no adjacent pixels, it is assumed that alternative pixels as defined in HEVC are used for filling. FIG. 7 shows an example where the number of prediction modes is 2, the selected prediction mode 0 is prediction mode 10, and the selected prediction mode 1 is prediction mode 34 (see FIG. 1).

[0036] First, the derivation of the predicted value of the selected prediction mode 0 when the selected prediction mode 0 is prediction mode 10 will be explained. P(0,0), P(1,0), ···, P(31,0) use RV0 as the predicted value, P(0,1), ···, P(31,1) use RV1 as the predicted value, and P(0,31), ···, P(31,31) use RV31 as the predicted value. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. First, the derivation of the predicted value of the selected prediction mode 0 when the selected prediction mode 0 is prediction mode 10 will be explained. P(0,0), P(1,0), ···, P(31,0) use RV0 as the predicted value, P(0,1), ···, P(31,1) use RV1 as the predicted value, and P(0,31), ···, P(31,31) use RV31 as the predicted value. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. P(0,0), P(1,0), ···, P(31,0) use RV0 as the predicted value, P(0,1), ···, P(31,1) use RV1 as the predicted value, and P(0,31), ···, P(31,31) use RV31 as the predicted value. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. P(0,0), P(1,0), ···, P(31,0) use RV0 as the predicted value, P(0,1), ···, P(31,1) use RV1 as the predicted value, and P(0,31), ···, P(31,31) use RV31 as the predicted value. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. Next, the derivation of the predicted value of the selected prediction mode 1 when the selected prediction mode 1 is prediction mode 34 will be explained. P(0,0) uses RH1 as the predicted value, P(1,0) and P(0,1) use RH2 as the predicted value, and P(31,31) uses RH63 as the predicted value. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. Different from HEVC which filters the adjacent pixels of the prediction target block to generate reference pixels, in this embodiment, the adjacent pixels are directly used as they are, so the filtering process is not required in this embodiment. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels. It is assumed that the calculation of the predicted value is the same as that of HEVC except for calculating the predicted value from the reference pixels.

[0037] Subsequent to S106, it is checked that the selection prediction mode M is not a non-angle intra prediction mode (S110). If the selection prediction mode M is not a non-angle intra prediction mode (YES in S110), the process proceeds to S107. If the selection prediction mode M is a non-angle intra prediction mode (NO in S110), the process proceeds to S108. Here, it is assumed that the non-angle intra prediction modes are INTRA_PLANAR and INTRA_DC. In this way, not only adjacent pixels at a specific angle such as INTRA_PLANAR or INTRA_DC are used, but also in the intra prediction mode using adjacent pixels in a plurality of directions, by setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. Subsequent to S106, it is checked that the selection prediction mode M is not a non-angle intra prediction mode (S110). If the selection prediction mode M is not a non-angle intra prediction mode (YES in S110), the process proceeds to S107. If the selection prediction mode M is a non-angle intra prediction mode (NO in S110), the process proceeds to S108. Here, it is assumed that the non-angle intra prediction modes are INTRA_PLANAR and INTRA_DC. In this way, not only adjacent pixels at a specific angle such as INTRA_PLANAR or INTRA_DC are used, but also in the intra prediction mode using adjacent pixels in a plurality of directions, by setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. Subsequent to S106, it is checked that the selection prediction mode M is not a non-angle intra prediction mode (S110). If the selection prediction mode M is not a non-angle intra prediction mode (YES in S110), the process proceeds to S107. If the selection prediction mode M is a non-angle intra prediction mode (NO in S110), the process proceeds to S108. Here, it is assumed that the non-angle intra prediction modes are INTRA_PLANAR and INTRA_DC. In this way, not only adjacent pixels at a specific angle such as INTRA_PLANAR or INTRA_DC are used, but also in the intra prediction mode using adjacent pixels in a plurality of directions, by setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. (S110's NO), the process proceeds to S108. Here, it is assumed that the non-angle intra prediction modes are INTRA_PLANAR and INTRA_DC. In this way, not only adjacent pixels at a specific angle such as INTRA_PLANAR or INTRA_DC are used, but also in the intra prediction mode using adjacent pixels in a plurality of directions, by setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. RA_PLANAR and INTRA_DC. In this way, not only adjacent pixels at a specific angle such as INTRA_PLANAR or INTRA_DC are used, but also in the intra prediction mode using adjacent pixels in a plurality of directions, by setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. RA_PLANAR and INTRA_DC. In this way, not only adjacent pixels at a specific angle such as INTRA_PLANAR or INTRA_DC are used, but also in the intra prediction mode using adjacent pixels in a plurality of directions, by setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. In the intra prediction mode using adjacent pixels in a plurality of directions, by setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. By setting the number of prediction modes to 1 instead of allowing the number of prediction modes to be 2, an increase in the processing amount can be suppressed. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined. That is, the prediction modes belonging to the non-angle intra prediction mode and the prediction modes belonging to the angle intra prediction mode are not combined.

[0038] Subsequent to S107, if the number of prediction modes is 1 or the selection prediction mode 0 is a non-angle intra prediction mode, the prediction value weighting unit 125 outputs the prediction value supplied from the prediction value calculation unit 124 as the prediction value as it is. If the number of prediction modes is 2, the prediction value weighting unit 125 averages the first prediction value of the selection prediction mode 0 and the second prediction value of the selection prediction mode 1 supplied from the prediction value calculation unit 124 and outputs the result as the third prediction value (S108). Subsequent to S107, if the number of prediction modes is 1 or the selection prediction mode 0 is a non-angle intra prediction mode, the prediction value weighting unit 125 outputs the prediction value supplied from the prediction value calculation unit 124 as the prediction value as it is. If the number of prediction modes is 2, the prediction value weighting unit 125 averages the first prediction value of the selection prediction mode 0 and the second prediction value of the selection prediction mode 1 supplied from the prediction value calculation unit 124 and outputs the result as the third prediction value (S108). Subsequent to S107, if the number of prediction modes is 1 or the selection prediction mode 0 is a non-angle intra prediction mode, the prediction value weighting unit 125 outputs the prediction value supplied from the prediction value calculation unit 124 as the prediction value as it is. If the number of prediction modes is 2, the prediction value weighting unit 125 averages the first prediction value of the selection prediction mode 0 and the second prediction value of the selection prediction mode 1 supplied from the prediction value calculation unit 124 and outputs the result as the third prediction value (S108). Subsequent to S107, if the number of prediction modes is 1 or the selection prediction mode 0 is a non-angle intra prediction mode, the prediction value weighting unit 125 outputs the prediction value supplied from the prediction value calculation unit 124 as the prediction value as it is. If the number of prediction modes is 2, the prediction value weighting unit 125 averages the first prediction value of the selection prediction mode 0 and the second prediction value of the selection prediction mode 1 supplied from the prediction value calculation unit 124 and outputs the result as the third prediction value (S108). Subsequent to S107, if the number of prediction modes is 1 or the selection prediction mode 0 is a non-angle intra prediction mode, the prediction value weighting unit 125 outputs the prediction value supplied from the prediction value calculation unit 124 as the prediction value as it is. If the number of prediction modes is 2, the prediction value weighting unit 125 averages the first prediction value of the selection prediction mode 0 and the second prediction value of the selection prediction mode 1 supplied from the prediction value calculation unit 124 and outputs the result as the third prediction value (S108).

[0039] Subsequently, the functions and operations of each part of the image decoding apparatus 200 will be described. The decoding unit 210 decodes the header and other information from the coded stream as necessary, and obtains the code sequence related to the block size, the code sequence of the intra prediction mode, and the prediction error data from the coded stream. Subsequently, the functions and operations of each part of the image decoding apparatus 200 will be described. The decoding unit 210 decodes the header and other information from the coded stream as necessary, and obtains the code sequence related to the block size, the code sequence of the intra prediction mode, and the prediction error data from the coded stream. Subsequently, the functions and operations of each part of the image decoding apparatus 200 will be described. The decoding unit 210 decodes the header and other information from the coded stream as necessary, and obtains the code sequence related to the block size, the code sequence of the intra prediction mode, and the prediction error data from the coded stream. Decode and supply the code sequence related to the decoded block size, the code sequence of the intra prediction mode, and the prediction error data to the block size acquisition unit 220. The decoding of the code sequence of the intra prediction mode is performed based on the syntax related to the intra prediction mode described later. .

[0040] The block size acquisition unit 220 acquires the block size from the code sequence related to the block size supplied from the decoding unit 210, and supplies the block size, the code sequence of the intra prediction mode, and the prediction error data to the intra prediction unit 230.

[0041] The intra prediction unit 230 selects the intra prediction mode from the code sequence of the intra prediction mode, derives a predicted value from the decoded pixels based on the selected intra prediction mode, and supplies the predicted value, the block size, and the prediction error data to the inverse conversion unit 240. Note that the decoded pixels are shared among the units in the image decoding apparatus 200 and are not shown here.

[0042] Here, the calculation of the predicted value in the intra prediction unit 230 is the same as the calculation of the predicted value in the intra prediction selection unit 120, and the reproduced image obtained by the image encoding apparatus 100 and the reproduced image output by the image decoding apparatus 200 are the same. That is, since the intra prediction unit 230 and the intra prediction selection unit 120 can have the same configuration, in this embodiment, the intra prediction unit 230 and the intra prediction selection unit 120 are described as having the same configuration. The operation of the intra prediction unit 230 will be described using FIG. 6, which is a flowchart for explaining the operation of the intra prediction selection unit 120. The difference from the intra prediction selection unit 120 is S105,

[0043] and will be described below. The intra prediction unit 230 performs S105D below instead of S105.

[0044] The prediction mode selection unit 123 selects one selected prediction mode based on the code string of the intra prediction mode. The prediction mode M is selected (S105D) and the selected prediction mode M is supplied to the prediction value calculation unit 124. The code string of the intra prediction mode will be described later.

[0045] The inverse transform unit 240 performs an inverse orthogonal transform on the prediction error data supplied from the intra prediction unit 230. The difference value is calculated by performing processes such as inverse quantization and dequantization, and the difference value and the predicted value are added to calculate the reconstructed pixel. and outputs the reconstructed pixels.

[0046] The image decoding device 200 continues to decode the above-mentioned code sequence until all the code sequences of the input coded stream are decoded. The process is repeated.

[0047] Here, the process of generating the prediction mode candidate list will be described in detail. The already-encoded adjacent blocks existing around a block will now be described. FIG. 8 is a diagram for explaining adjacent blocks of a prediction target block. In FIG. Block X is the block to be predicted, and blocks A to E are the neighboring blocks. So, the adjacent blocks are from block A to block E, but from block A to block D. Furthermore, the block to the upper left (above block A) and the block to the lower left (block C) of the prediction target block may be You can also add blocks such as the one below.

[0048] FIG. 9 is a flowchart illustrating the operation of the generation process of the prediction mode candidate list 0. A process for generating the prediction mode candidate list 0 will be described with reference to FIG. Assume that candidate list 0 is empty and the number of candidates included in prediction mode candidate list 0 is 0. Prediction mode candidate list 0 is abbreviated as candidate list 0.

[0049] Block X is successively subjected to the steps of S 210, S201, S202, S203 (S200 and S204) .

[0050] Check whether block X uses intra prediction (S210). If block X uses intra prediction (YES in S210), proceed to S201. If block X does not use intra prediction (NO in S210), proceed to S204.

[0051] Subsequent to S210, if the same selection prediction mode 0 as that of block X does not exist in candidate list 0 (YES in S201), add the selection prediction mode 0 of block X to candidate list 0 (S 202). Subsequently, check whether the number of prediction modes added to candidate list 0 has reached a predetermined number (S203). If the number of prediction modes added to candidate list 0 has reached the predetermined number (YES in S203), end the process. If the number of prediction modes added to candidate list 0 has not reached the predetermined number (NO in S203), proceed to S204. Here, the predetermined number is 3 . If the same selection prediction mode 0 as that of block X exists in candidate list 0 (NO in S201 ), proceed to S204.

[0052] Next, if the number of prediction modes added to candidate list 0 is less than the predetermined number (YES in S205 ), based on the priority order of the predetermined prediction modes, check whether the same prediction modes overlap in candidate list 0 Do not do so, and add prediction mode candidates to candidate list 0 in ascending order of priority (S20 6), and end the process. Here, FIG. 10 shows a table indicating the priorities of predetermined prediction modes. If the number of prediction modes added to candidate list 0 is not less than a predetermined number (NO in S205), end the process.

[0053] FIG. 11 is a flowchart for explaining the operation of the generation process of prediction mode candidate list 1 . The generation process of prediction mode candidate list 1 will be described based on FIG. 11. First, the prediction mode candidate list 1 is empty, and the number of candidates included in the prediction mode candidate list 1 is 0. The prediction mode candidate list is abbreviated as the candidate list.

[0054] Set block X to block A, block B, block C, block D, block E in this order and repeat the steps of S310, S301, S302, S303, S304, S305 (S300 and S306).

[0055] Check whether block X is using the angular intra prediction mode (S310). If block X is using the angular intra prediction mode (YES in S310), proceed to S301. If block X is not using the angular intra prediction mode (NO in S310), proceed to S306.

[0056] For the selection prediction mode N of block X, repeat the steps of S302, S303, S304 in the order of selection prediction mode 1 and selection prediction mode 0 (S301 and S305).

[0057] If the same selection prediction mode N as block X does not exist in candidate list 1 (YE in S302) S), add the prediction mode of block X to candidate list 1 (S303). Subsequently, check whether the number of prediction modes added to candidate list 1 has reached a predetermined number (S304). If the number of prediction modes added to candidate list 1 has reached the predetermined number (YES in S304), end the process. If the number of prediction modes added to candidate list 1 has not reached the predetermined number (NO in S304), proceed to S305. Here, the predetermined number is set to 3. If the same selective prediction mode N as block X exists in candidate list 1 (NO in S302), proceed to S305. Check whether the number of prediction modes added to candidate list 1 has reached a predetermined number (S304). If the number of prediction modes added to candidate list 1 has reached the predetermined number (YES in S304), end the process. If the number of prediction modes added to candidate list 1 has not reached the predetermined number (NO in S304), proceed to S305. Here, the predetermined number is set to 3. If the same selective prediction mode N as block X exists in candidate list 1 (NO in S302), proceed to S305. If the number of prediction modes added to candidate list 1 has reached the predetermined number (YES in S304), end the process. If the number of prediction modes added to candidate list 1 has not reached the predetermined number (NO in S304), proceed to S305. Here, the predetermined number is set to 3. If the same selective prediction mode N as block X exists in candidate list 1 (NO in S302), proceed to S305. Here, the predetermined number is set to 3. If the same selective prediction mode N as block X exists in candidate list 1 (NO in S302), proceed to S305. If the same selective prediction mode N as block X exists in candidate list 1 (NO in S302), proceed to S305.

[0058] Next, if the number of prediction modes added to candidate list 1 is less than the predetermined number (YES in S307), based on the priority order of the predetermined prediction modes, add prediction mode candidates to candidate list 1 in ascending order of priority so that the same prediction mode does not overlap (S308), and end the process. Here, the table showing the priority order of the predetermined prediction modes is shown in FIG. 12. Next, if the number of prediction modes added to candidate list 1 is less than the predetermined number (YES in S307), based on the priority order of the predetermined prediction modes, add prediction mode candidates to candidate list 1 in ascending order of priority so that the same prediction mode does not overlap (S308), and end the process. Here, the table showing the priority order of the predetermined prediction modes is shown in FIG. 12. Next, if the number of prediction modes added to candidate list 1 is less than the predetermined number (YES in S307), based on the priority order of the predetermined prediction modes, add prediction mode candidates to candidate list 1 in ascending order of priority so that the same prediction mode does not overlap (S308), and end the process. Here, the table showing the priority order of the predetermined prediction modes is shown in FIG. 12. Next, if the number of prediction modes added to candidate list 1 is less than the predetermined number (YES in S307), based on the priority order of the predetermined prediction modes, add prediction mode candidates to candidate list 1 in ascending order of priority so that the same prediction mode does not overlap (S308), and end the process. Here, the table showing the priority order of the predetermined prediction modes is shown in FIG. 12. Unlike the table in FIG. 10, the table in FIG. 12 does not include non-angular intra prediction modes (prediction modes 0 and 1). Also, in the priority order, the vertical intra prediction mode and the horizontal intra prediction mode are set alternately. If the number of prediction modes added to the candidate list is less than the predetermined number (NO in S307), end the process. Unlike the table in FIG. 10, the table in FIG. 12 does not include non-angular intra prediction modes (prediction modes 0 and 1). Also, in the priority order, the vertical intra prediction mode and the horizontal intra prediction mode are set alternately. If the number of prediction modes added to the candidate list is less than the predetermined number (NO in S307), end the process. Unlike the table in FIG. 10, the table in FIG. 12 does not include non-angular intra prediction modes (prediction modes 0 and 1). Also, in the priority order, the vertical intra prediction mode and the horizontal intra prediction mode are set alternately. If the number of prediction modes added to the candidate list is less than the predetermined number (NO in S307), end the process. Unlike the table in FIG. 10, the table in FIG. 12 does not include non-angular intra prediction modes (prediction modes 0 and 1). Also, in the priority order, the vertical intra prediction mode and the horizontal intra prediction mode are set alternately. If the number of prediction modes added to the candidate list is less than the predetermined number (NO in S307), end the process.

[0059] Here, the effects obtained by Embodiment 1 will be described. When the size of the prediction target block is large, it is highly likely that a plurality of edges are included in the prediction target block. Thus, when a plurality of edges are included in the prediction target block, if the prediction target block is predicted using only one intra prediction mode, the prediction efficiency is likely to decrease. When the size of the prediction target block is large, it is highly likely that a plurality of edges are included in the prediction target block. Thus, when a plurality of edges are included in the prediction target block, if the prediction target block is predicted using only one intra prediction mode, the prediction efficiency is likely to decrease. Thus, when a plurality of edges are included in the prediction target block, if the prediction target block is predicted using only one intra prediction mode, the prediction efficiency is likely to decrease.

[0060] Therefore, as described above, when the size of the prediction target block is large, by predicting in the two intra prediction modes, it is possible to handle the case where there are two-directional edges in the prediction target block and improve the prediction efficiency.

[0061] Next, the details of the encoding of the intra prediction mode (the code sequence of the intra prediction mode) will be described. FIG. 13 is a diagram for explaining the syntax related to the intra prediction mode of Embodiment 1. FIG. 13 shows the syntax of the prediction block, where pbWidth is the width of the prediction block, pbHeight is the height of the prediction block. pbWThread is a predetermined threshold width, and pb HThread is a predetermined threshold height. The encoding of the intra prediction mode and the decoding of the intra prediction mode are performed based on the syntax of FIG. 13.

[0062] prev_intra_luma_pred_flag, mpm_idx, and rem _intra_luma_pred_mode are the syntax related to the selected prediction mode 0. prev_intra_luma_pred_flag is a flag indicating whether to select the selected prediction mode 0 from the prediction mode candidate list 0. If prev_intra _luma_pred_flag is 1, the selected prediction mode 0 is selected from the prediction mode candidate list 0. If prev_intra_luma_pred_flag is 0 , the selected prediction mode 0 is selected from an intra prediction mode not included in the prediction mode candidate list 0. mpm_idx is an index indicating the selected prediction mode 0 selected from among the candidates included in the prediction mode candidate list 0. rem_intra_luma_pred_ mode is the syntax related to the selected prediction mode 0. rem_intra_luma_pred_ ​mode is the selected prediction mode selected from candidates not included in the prediction mode candidate list 0 It is an index indicating 0.

[0063] 2nd_prev_intra_luma_pred_flag, 2nd_mpm_i dx, and 2nd_rem_intra_luma_pred_mode are the syntax regarding the selected prediction mode 1. 2nd_prev_intra_luma_pred _flag is a flag indicating whether to select the selected prediction mode 1 from the prediction mode candidate list 1. If 2nd_prev_intra_luma_pred_flag is 1, the selected prediction mode 1 is selected from the prediction mode candidate list 1. If 2nd_prev_intra_luma_pred_flag is 0, the selected prediction mode 1 is selected from the intra prediction modes not included in the prediction mode candidate list 1. 2nd_mpm_idx is an index indicating the selected prediction mode 1 selected from candidates included in the prediction mode candidate list 1. 2nd_rem_intra_luma_pred_mode is an index indicating the selected prediction mode 1 selected from candidates not included in the prediction mode candidate list 1.

[0064] prev_intra_luma_pred_flag, rem_intra_lum a_pred_mode, 2nd_prev_intra_luma_pred_fla g, and 2nd_rem_intra_luma_pred_mode are fixed length (FL) binaryized, and mpm_idx, 2nd_mpm_idx are truncated Rice (TR ) binaryized.

[0065] (Modification Example 1 of Embodiment 1) Hereinafter, Modification Example 1 of Embodiment 1 will be described. In calculating the predicted value in the angular intra prediction mode (prediction mode 2 to prediction mode 34), instead of calculating the predicted value from the adjacent pixels of the prediction target block according to each angle, the predicted value may be calculated from the reference pixels generated by filtering the adjacent pixels of the prediction target block.

[0066] Also, when the number of prediction modes is 1, the predicted value may be calculated from the reference pixels generated by filtering the adjacent pixels of the prediction target block, and when the number of prediction modes is 2, the predicted value may be calculated from the adjacent pixels of the prediction target block. By doing so, the processing amounts in the case where the number of prediction modes is 1 and the case where the number of prediction modes is 2 can be equalized.

[0067] (Modification Example 2 of Embodiment 1) Hereinafter, Modification Example 2 of Embodiment 1 will be described. In Embodiment 1, the prediction mode candidate list 1 is generated as different from the prediction mode candidate list 0 as shown in FIG. 11, and the selected prediction mode 1 is selected from the prediction mode candidate list 1. However, the selected prediction mode 1 may be selected from the prediction mode candidate list 0. By doing so, the process of generating the prediction mode candidate list 1 can be reduced.

[0068] Also, the predetermined number of candidates in the prediction mode candidate list 0 can be made larger than 3. For example, the predetermined number of candidates in the prediction mode candidate list 0 may be set to 5. In this case, the probability that the selected prediction mode 1 is encoded as 2nd_mpm_idx can be increased, and the encoding efficiency can be improved. When the predetermined number is larger than 3, the priority order of the predetermined prediction mode is also related to the predetermined number. Prepare 4 or more in total. At this time, the priority order is to alternately set the vertical intra prediction mode and the horizontal intra prediction mode.

[0069] (Modification Example 3 of Embodiment 1) Hereinafter, Modification Example 3 of Embodiment 1 will be described. In Embodiment 1, the selection prediction mode 1 was selected from among prediction modes 0 to 34. In Modification Example 3, the selection prediction mode 1 may be selected from the prediction mode candidate list 1. At this time, 2nd_pre v_intra_luma_pred_flag and 2nd_rem_intra_lum a_pred_mode in FIG. 13 become unnecessary, and only 2nd_mpm_idx is sufficient. By doing so, the coding efficiency of the selection prediction mode 1 can be improved.

[0070] (Modification Example 4 of Embodiment 1) Hereinafter, Modification Example 4 of Embodiment 1 will be described. In Embodiment 1, the prediction mode candidate list 1 was generated as shown in FIG. 11 regardless of the selection prediction mode 0. In Modification Example 4, the prediction mode candidate list 1 is generated based on the selection prediction mode 0.

[0071] Here, the modes adjacent to the selection prediction mode 0 are added as the prediction mode candidate list 1 as shown in the following (Equation 1) and (Equation 2). Thereby, it becomes possible to generate an intermediate prediction mode between two adjacent prediction modes. Prediction mode candidate list 1[0]=(selection prediction mode 0 - 1)%35 ···(Equation 1) Prediction mode candidate list 1[1]=(selection prediction mode 0 + 1)%35 ···(Equation 2) "%" is the remainder operator, and "35" is the number of intra prediction modes. That is, (selection prediction mode 0 - 1)%35 calculates the remainder when the selection prediction mode 0 minus 1 is divided by 35, and (selection prediction mode 0 + 1)%35 calculates the remainder when the selection prediction mode 0 plus 1 is divided by 35. "%" is the remainder operator, and "35" is the number of intra prediction modes. That is, (selection The remainder obtained by dividing the selection prediction mode 0-1 by 35 is added to the prediction mode candidate list 1[0]. Similarly, the remainder obtained by dividing the (selection prediction mode 0+1) by 35 is added to the prediction mode candidate list 1 [1]. The remainder falls within the range of 0 to 34. Note that since the selection prediction mode 0 does not take the non-angular intra prediction mode, the selection prediction mode 0 will not take the prediction mode 0 or the prediction mode 1. Therefore, when the selection prediction mode 0 is the prediction mode 2, the prediction mode candidate list 1[0] becomes the prediction mode 1, but the prediction mode 1 is a non-angular intra prediction mode and is thus invalid. Similarly, when the selection prediction mode 0 is the prediction mode 34, the prediction mode candidate list 1[1] becomes the prediction mode 0, but the prediction mode 0 is a non-angular intra prediction mode and is thus invalid.

[0072] Also, the syntax regarding the intra prediction mode is different. FIG. 14 is a diagram for explaining the syntax regarding the intra prediction mode of Modification Example 4. If 2nd_intra_luma_pred_0_flag is 1, the prediction mode candidate list 1[0] is selected as the selection prediction mode 1, and if 2nd_intra_luma_pr ed_0_flag is 0, the prediction mode candidate list 1[1 is selected as the selection prediction mode 1. By doing so, the coding efficiency of the selection prediction mode 1 can be improved. When the selection prediction mode 0 is the prediction mode 2 or the prediction mode 34, the intra prediction mode is uniquely determined to be 0. Therefore, it is not necessary to code or decode 2nd_intra_luma_pre d_0_flag. As a result, the coding efficiency and the processing efficiency can be further improved.

[0073] (Modification Example 5 of Embodiment 1) Hereinafter, modification example 5 of Embodiment 1 will be described. The predicted value weighting unit 1 of Embodiment 1 25 simply averaged the predicted value of the selected prediction mode 0 and the predicted value of the selected prediction mode 1 as the predicted value when the number of prediction modes was 2. In modification example 5, the predicted value of the selected prediction mode 0 and the predicted value of the selected prediction mode 1 are weighted-averaged according to the distance to obtain the predicted value. Let d0 be the distance between the pixel to be predicted and the adjacent pixel N0 of the selected prediction mode 0, and d1 be the distance between the pixel to be predicted and the adjacent pixel N1 of the selected prediction mode 1. Then, the weighted average predicted value PP is calculated by (Equation 3 ).

[0074] PP = (N0 * d1 + N1 * d0) / (d0 + d1) ···(Equation 3) )

[0075] (Modification Example 6 of Embodiment 1) Hereinafter, modification example 6 of Embodiment 1 will be described. In Embodiment 1, whether to set the number of prediction modes to 1 or 2 was determined by whether the width of the block to be predicted was greater than or equal to a predetermined threshold width and whether the height of the block to be predicted was greater than or equal to a predetermined threshold height. For example, a prediction mode number flag indicating whether the number of prediction modes is 1 or 2 can be encoded (decoded) and specified. In this case, since more precise control can be achieved by the flag, the prediction efficiency is improved.

[0076] (Embodiment 2) Hereinafter, Embodiment 2 will be described. The configuration and operation of the intra prediction selection unit are different from those of Embodiment 1.

[0077] FIG. 15 is a diagram showing the configuration of the intra prediction selection unit 120 according to Embodiment 2 of the present invention. The intra prediction selection unit 120 includes a prediction mode candidate generation unit 122, a prediction mode selection unit 123, and a prediction ​​​​​​​It includes a measurement value calculation unit 124 and a predicted value weighting unit 125.

[0078] FIG. 16 is a flowchart for explaining the operation of the intra prediction selection unit 120. Hereinafter, the details of the intra prediction selection unit 120 will be described with reference to FIGS. 15 and 16. First, the prediction mode candidate generation unit 122 repeats S501 to S503 by the number of non-angular intra prediction modes K, and calculates the evaluation value of the non-angular intra prediction mode K (S502). When K is 0, INTRA_PLANAR is calculated, and when K is 1, the evaluation value of INTRA_DC is calculated.

[0079] Next, the prediction mode candidate generation unit 122 repeats S505 to S508 by the number of prediction mode candidate lists M. The prediction mode candidate generation unit 122 generates a prediction mode candidate list M from the encoded adjacent blocks existing around the prediction target block (S506), and supplies the generated prediction mode candidate list M to the prediction mode selection unit 123. The prediction mode candidate list M is generated to include the horizontal intra prediction mode if M is 0, and is generated to include the vertical intra prediction mode if M is 1. The prediction mode candidate list M does not include non-angular intra prediction modes.

[0080] When the prediction mode candidate generation unit 122 is the prediction mode candidate list 0, it calculates the prediction value and evaluation value of each of the prediction modes 2 to 17, which are the horizontal intra prediction modes included in the prediction mode candidate list 0, and selects one selected prediction mode 0 from the prediction modes 2 to 17 based on the calculated evaluation value of each prediction mode.

[0081] ​​​​​​When it comes to the prediction mode candidate list 1, the prediction mode candidate generation unit 122 calculates the prediction values and evaluation values of each of the prediction modes from prediction mode 18, which is the vertical intra prediction mode included in the prediction mode candidate list 1, to prediction mode 3 4, and selects one selected prediction mode 1 from among prediction modes 18 to 34 based on the evaluation values of the calculated prediction modes (S507 ). As described above, if M is 0, it indicates the horizontal intra prediction mode, and if M is 1 , it indicates the vertical intra prediction mode. That is, M indicates the direction of the intra prediction mode .

[0082] Next, the prediction mode candidate generation unit 122 calculates the evaluation value with a prediction mode number of 2 by weighted-averaging the prediction value of the selected prediction mode 0 and the prediction value of the selected prediction mode 1 (S510). Next, the prediction mode selection unit 123 selects one intra prediction mode from among prediction mode 0, prediction mode 1, and the evaluation value with a prediction mode number of 2 based on these (S511). Next, the prediction value weighting unit 125 outputs the prediction value based on the selected intra prediction mode (S512).

[0083] Also, Embodiment 2 has a different syntax regarding the intra prediction mode from Embodiment 1 .

[0084] FIG. 17 is a diagram for explaining the syntax regarding the intra prediction mode of Embodiment 2 . Encoding of the intra prediction mode and decoding of the intra prediction mode are performed based on the syntax of FIG. 17 .

[0085] intra_luma_merge_flag is related to the number of prediction modes of the prediction target block and ​​​​​​As an intra prediction mode, it is a merge flag indicating whether to use the number of prediction modes of adjacent blocks and the intra prediction mode. It is a merge flag indicating whether to use the number of prediction modes of adjacent blocks and the intra prediction mode.

[0086] intra_luma_merge_idx indicates the number of prediction modes of the block to be predicted and the number of prediction modes and intra prediction modes to be used as the intra prediction mode for adjacent blocks having the number of prediction modes and the intra prediction mode to be used as the intra prediction mode. It indicates.

[0087] Figure 18 is a table showing the relationship between intra_luma_merge_idx and adjacent blocks. For example, when intra_luma_merge_idx is 0, the number of prediction modes of adjacent block A is 1, and the selected prediction mode 0 is prediction mode 3, the number of prediction modes of the block to be predicted is 1, and the selected prediction mode 0 is prediction mode 3. In another example, when intra_luma_merge_idx is 2, the number of prediction modes of adjacent block C is 2, the selected prediction mode 0 is prediction mode 3, and the selected prediction mode 1 is prediction mode 20, the number of prediction modes of the block to be predicted is 2, the selected prediction mode 0 is prediction mode 3, and the selected prediction mode 1 is prediction mode 20. For example, when intra_luma_merge_idx is 2, the number of prediction modes of adjacent block C is 2, the selected prediction mode 0 is prediction mode 3, and the selected prediction mode 1 is prediction mode 20, the prediction target block has 2 prediction modes, the selected prediction mode 0 is prediction mode 3, and the selected prediction mode 1 is prediction mode 20.

[0088] intra_luma_non_angular_pred_flag is a flag indicating whether it is a non-angular intra prediction mode. Whether it is a non-angular intra prediction mode is indicated by a flag. When the flag indicating whether it is a non-angular intra prediction mode indicates that it is a non-angular intra prediction mode (when intra_luma_non_angular_pred_flag is 1), non_angular_idx is encoded (decoded), and the intra prediction mode indicated by non_angular_idx is selected as the selected prediction mode. non_angular_idx is the non-angular intra prediction mode When the flag indicating whether it is a non-angular intra prediction mode indicates that it is a non-angular intra prediction mode (when intra_luma_non_angular_pred_flag is 1), non_angular_idx is encoded (decoded), and the intra prediction mode indicated by non_angular_idx is selected as the selected prediction mode. non_angular_idx is the non-angular intra prediction mode and the intra prediction mode indicated by non_angular_idx is selected as the selected prediction mode. non_angular_idx is the non-angular intra prediction mode Indicates the prediction mode of the block. If non_angular_idx is 0, it indicates INTRA_P LANAR, and if it is 1, it indicates INTRA_DC. Whether it is a non-angular intra prediction mode or not, the flag indicating this is not a non-angular intra prediction mode (when intra_luma _non_angular_pred_flag is 0), then prev_intra_ luma_pred_h_flag, mpm_idx_h, rem_intra_lum a_pred_mode_h and other indices are encoded (decoded), and an intra prediction mode other than the non-angular intra prediction mode is selected as the selected prediction mode.

[0089] intra_luma_pred_idc indicates the number of prediction modes and the direction of intra prediction . If intra_luma_pred_idc is 0, it indicates that the number of prediction modes is 1 and the intra prediction mode is in the horizontal direction , and if intra_luma_pred_idc is 1 , it indicates that the number of prediction modes is 1 and the intra prediction mode is in the vertical direction. If intra_lu ma_pred_idc is 2, it indicates that the number of prediction modes is 2.

[0090] prev_intra_luma_pred_h_flag, mpm_idx_h, and rem_intra_luma_pred_mode_h are the syntax related to the intra prediction mode in the horizontal direction . prev_intra_luma_pred_v_f lag, mpm_idx_v, and rem_intra_luma_pred_mode _v are the syntax related to the intra prediction mode in the vertical direction. Here, rem_i ntra_luma_pred_mode_h and rem_intra_luma_pre The non-angular intra prediction mode is not included in d_mode_v.

[0091] As in Embodiment 2, by using the merge flag that uses the intra prediction mode of the adjacent block of the prediction target block as it is, when the number of prediction modes is 2 or when the prediction mode is not present in the prediction mode candidate list, the encoding efficiency can be improved.

[0092] Also, the intra prediction mode is classified into prediction mode 0 which is a non-angular intra prediction mode and prediction mode 1, prediction modes 2 to 17 which are horizontal intra prediction modes, and prediction modes 18 to 34 which are vertical intra prediction modes. The syntax related to the intra prediction mode is divided into syntax elements for non-angular intra prediction modes, syntax elements for horizontal direction prediction, and syntax elements for vertical direction prediction. In this way, when selecting a prediction mode that is not present in the prediction mode candidate list, the encoding efficiency can be improved.

[0093] That is, by encoding (decoding) intra_luma_non_angular_pred_flag before re m_intra_luma_pred_mode_h or rem_intra_luma_ pred_mode_v, in addition to the intra prediction mode candidates included in the prediction mode candidate list for rem_intra_lu ma_pred_mode_h or rem_intra_luma_pred_mode_ v, it is no longer necessary to include the non-angular intra prediction mode. Therefore, it can be specified by rem_intra_luma_pre d_mode_h or rem_intra_luma_pred_mode_v. ​​​The coding efficiency can be improved because the number of angular intra prediction modes can be increased. For example, if the intra prediction mode to be increased is a horizontal intra prediction mode, a new angle may be provided between prediction mode 9 and prediction mode 10 or between prediction mode 10 and prediction mode 11. If it is a vertical intra prediction mode, a new angular intra prediction mode may be provided between prediction mode 25 and prediction mode 26 or between prediction mode 26 and prediction mode 27.

[0094] Generally, the non-angular intra prediction mode has a higher selection probability than the angular intra prediction mode. Therefore, by encoding (decoding) the independent syntax intr a_luma_non_angular_pred_flag indicating the non-angular intra prediction mode before mpm_idx_h or m pm_idx_v, it is not necessary to include the non-angular intra prediction mode in prediction mode candidate list 0 or prediction mode candidate list 1. Therefore, when the selected prediction mode is a non-angular intra prediction mode, the processing cost of generating prediction mode candidate list 0 or prediction mode candidate list 1 can be reduced.

[0095] Furthermore, when the number of non-angular intra prediction modes is increased to more than 2, or when the types of non-angular intra prediction modes and the angles of intra prediction modes are classified in more detail, the merge flags and syntax classification effectively improve the coding efficiency. Note that intra_ luma_merge_idx, intra_luma_merge_idx or intr a_luma_non_angular_pred_flag, non_angular_ idx can also be applied to the syntax of FIG. 2 of the conventional example, FIGS. 13 and 14 of Embodiment 1, in the same manner as mpm to the section before _idx.

[0096] (Modification Example 1 of Embodiment 2) Hereinafter, Modification Example 1 of Embodiment 2 will be described. In Embodiment 2, the prediction mode candidates list 0 is a horizontal intra prediction mode, and the prediction mode candidate list 1 is a vertical intra prediction mode. The syntax classification regarding the prediction mode candidate list and the intra prediction mode was matched, but it is not limited to this. The prediction mode candidate list may include all of the non-angular intra prediction mode, the horizontal intra prediction mode, and the vertical intra prediction mode, like the prediction mode candidate list of Embodiment 1.

[0097] The prediction mode candidate list may include all of the non-angular intra prediction mode, the horizontal intra prediction mode, and the vertical intra prediction mode, like the prediction mode candidate list of Embodiment 1. The prediction mode candidate list may include all of the non-angular intra prediction mode, the horizontal intra prediction mode, and the vertical intra prediction mode, like the prediction mode candidate list of Embodiment 1. may be included.

[0098] (Modification Example 2 of Embodiment 2) The case where the prediction mode candidate list includes the horizontal intra prediction mode and the vertical intra prediction mode will be described. However, the non-angular intra prediction mode is not included in the prediction mode candidate list. FIG. 19 is a diagram for explaining the syntax regarding the intra prediction mode of Modification Example 2 of Embodiment 2. The encoding of the intra prediction mode and the decoding of the intra prediction mode regarding the intra prediction mode are performed based on the syntax of FIG. 19. The case where the prediction mode candidate list includes the horizontal intra prediction mode and the vertical intra prediction mode will be described. However, the non-angular intra prediction mode is not included in the prediction mode candidate list. FIG. 19 is a diagram for explaining the syntax regarding the intra prediction mode of Modification Example 2 of Embodiment 2. The encoding of the intra prediction mode and the decoding of the intra prediction mode regarding the intra prediction mode are performed based on the syntax of FIG. 19. The case where the prediction mode candidate list includes the horizontal intra prediction mode and the vertical intra prediction mode will be described. However, the non-angular intra prediction mode is not included in the prediction mode candidate list. FIG. 19 is a diagram for explaining the syntax regarding the intra prediction mode of Modification Example 2 of Embodiment 2. The encoding of the intra prediction mode and the decoding of the intra prediction mode regarding the intra prediction mode are performed based on the syntax of FIG. 19. The case where the prediction mode candidate list includes the horizontal intra prediction mode and the vertical intra prediction mode will be described. However, the non-angular intra prediction mode is not included in the prediction mode candidate list. FIG. 19 is a diagram for explaining the syntax regarding the intra prediction mode of Modification Example 2 of Embodiment 2. The encoding of the intra prediction mode and the decoding of the intra prediction mode regarding the intra prediction mode are performed based on the syntax of FIG. 19. The case where the prediction mode candidate list includes the horizontal intra prediction mode and the vertical intra prediction mode will be described. However, the non-angular intra prediction mode is not included in the prediction mode candidate list. FIG. 19 is a diagram for explaining the syntax regarding the intra prediction mode of Modification Example 2 of Embodiment 2. The encoding of the intra prediction mode and the decoding of the intra prediction mode regarding the intra prediction mode are performed based on the syntax of FIG. 19. are performed.

[0099] If prev_intra_luma_pred_flag is 1, the non-angular intra prediction mode or the selected prediction mode selected from the prediction mode candidate list is selected. A flag indicating whether it is the non-angular intra prediction mode indicates that it is the non-angular intra prediction mode in the place where it is shown The combination is such that the non-angular intra prediction mode indicated by non_angular_idx is selected as the prediction mode. If a flag indicating whether it is a non-angular intra prediction mode is not a non-angular intra prediction mode, the mpm index (mpm_idx) is encoded (decoded), and the intra prediction mode candidate indicated by mpm_idx included in the prediction mode candidate list is selected as the prediction mode. If prev_intra_lum a_pred_flag is 0, an intra prediction mode indicated by rem_intra_luma_pre d_mode from an intra prediction mode that is not a non-angular intra prediction mode and is not included in the prediction mode candidate list is selected as the prediction mode.

[0100] FIG. 20 is a diagram for explaining another syntax regarding the intra prediction mode of Modification 2 of Embodiment 2. Encoding of the intra prediction mode and decoding of the intra prediction mode regarding the intra prediction mode are performed based on the syntax of FIG. 20.

[0101] When intra_luma_non_angular_pred_flag is 1, the non-angular intra prediction mode indicated by non_angular_idx is selected as the prediction mode. When intra_luma_non_angular_pred_fla g is 0 and prev_intra_luma_pred_flag is 1, the intra prediction mode candidate indicated by mpm_idx included in the prediction mode candidate list is selected as the prediction mode. When intra_luma_non_angular_pred _flag is 0 and prev_intra_luma_pred_flag is 0 ​is an intra prediction mode that is not a non-angular intra prediction mode and is not included in the prediction mode candidate list, and the intra prediction mode indicated by rem_intra_luma_pred_mode is selected as the selected prediction mode. from the intra prediction mode to the intra prediction mode indicated by rem_intra_luma_pred_mode is selected as the selected prediction mode.

[0102] In Modification 2 of Embodiment 2, rem_intra_luma_pred_mode only needs to indicate 30 intra prediction modes excluding the intra prediction mode candidates and non-angular intra prediction modes from all 35 intra prediction modes, and the coding efficiency can be improved by adding a new intra prediction mode. Here, as the new intra prediction mode, for example, a new non-angular intra prediction mode may be provided between prediction mode 9 and prediction mode 10, between prediction mode 10 and prediction mode 11, between prediction mode 25 and prediction mode 26, or between prediction mode 26 and prediction mode 27. Also, in FIG. 20, since the non-angular intra prediction mode can be coded (decoded) by intra_luma_non_angular_pred_flag and non_angular_idx, when the selection probability of the non-angular intra prediction mode is relatively higher than that of other intra prediction modes, the processing efficiency and coding efficiency are improved. By adding a new intra prediction mode, the coding efficiency can be improved. Here, as the new intra prediction mode, for example, between prediction mode 9 and prediction mode 10, between prediction mode 10 and prediction mode 11, between prediction mode 25 and prediction mode 26, or between prediction mode 26 and prediction mode 27, a new non-angular intra prediction mode may be provided. Also, in FIG. 20, since the non-angular intra prediction mode can be coded (decoded) by intra_luma_non_angular_pred_flag and non_angular_idx, when the selection probability of the non-angular intra prediction mode is relatively higher than that of other intra prediction modes, the processing efficiency and coding efficiency are improved. For example, between prediction mode 9 and prediction mode 10, between prediction mode 10 and prediction mode 11, between prediction mode 25 and prediction mode 26, or between prediction mode 26 and prediction mode 27, a new non-angular intra prediction mode may be provided. Between prediction mode 25 and prediction mode 26, or between prediction mode 26 and prediction mode 27, a new non-angular intra prediction mode may be provided. Also, in FIG. 20, since the non-angular intra prediction mode can be coded (decoded) by intra_luma_non_angular_pred_flag and non_angular_idx, when the selection probability of the non-angular intra prediction mode is relatively higher than that of other intra prediction modes, the processing efficiency and coding efficiency are improved. In FIG. 20, since the non-angular intra prediction mode can be coded (decoded) by intra_luma_non_angular_pred_flag and non_angular_idx, when the selection probability of the non-angular intra prediction mode is relatively higher than that of other intra prediction modes, the processing efficiency and coding efficiency are improved. The non-angular intra prediction mode can be coded (decoded) by intra_luma_non_angular_pred_flag and non_angular_idx, so when the selection probability of the non-angular intra prediction mode is relatively higher than that of other intra prediction modes, the processing efficiency and coding efficiency are improved. When the selection probability of the non-angular intra prediction mode is relatively higher than that of other intra prediction modes, the processing efficiency and coding efficiency are improved.

[0103] (Modification 3 of Embodiment 2) Next, the case where the prediction mode candidate list includes the intra prediction modes of the INTRA_DC, horizontal direction intra prediction mode, and vertical direction intra prediction mode of the non-angular intra prediction mode will be described. However, INTRA_PLANAR is not included in the prediction mode candidate list. In Embodiment 2, a flag indicating whether it is a non-angular intra prediction mode is included in the prediction mode candidate list. In Embodiment 2, a flag indicating whether it is a non-angular intra prediction mode ​​​Encode the flag (intra_luma_non_angular_pred_flag). Decode it. In the third modification of the second embodiment, a flag indicating whether it is a non-angular intra prediction mode is encoded (decoded) only by limiting it to a flag indicating whether it is INTRA_PLANAR, which is the intra prediction mode with the highest selection probability among the intra prediction modes. When the selected prediction mode is INTRA_PLANAR, non_angular_idx does not need to be encoded (decoded), and the encoding efficiency of INTRA_PLANAR can be improved. When the flag indicating whether it is INTRA_PLANAR indicates that it is INTRA_PLANAR, INTRA_PLANAR is selected as the selected prediction mode. In FIG. 19, when the flag indicating whether it is INTRA_PLANAR indicates that it is not INTRA_PLANAR, mpm_idx is encoded (decoded), and an intra prediction mode other than INTRA_PLANAR is selected as the selected prediction mode. In FIG. 20, when the flag indicating whether it is INTRA_PLANAR indicates that it is not INTRA_PLANAR, indices such as prev_intra_luma_pred_flag and mpm_idx are encoded (decoded), and an intra prediction mode other than INTRA_PLANAR is selected as the selected prediction mode. In the third modification of the second embodiment, rem_intra_luma_pred_mode only needs to indicate 31 intra prediction modes excluding the intra prediction mode candidates and INTRA_PLANAR from all 35 intra prediction modes, and the encoding efficiency can be improved by adding a new intra prediction mode. Here, the new intra prediction mode When the flag indicating whether it is INTRA_PLANAR indicates that it is not INTRA_PLANAR, mpm_idx is encoded (decoded), and an intra prediction mode other than INTRA_PLANAR is selected as the selected prediction mode. In FIG. 20, when the flag indicating whether it is INTRA_PLANAR indicates that it is not INTRA_PLANAR, indices such as prev_intra_luma_pred_flag and mpm_idx are encoded (decoded), and an intra prediction mode other than INTRA_PLANAR is selected as the selected prediction mode. In the third modification of the second embodiment, rem_intra_luma_pred_mode only needs to indicate 31 intra prediction modes excluding the intra prediction mode candidates and INTRA_PLANAR from all 35 intra prediction modes, and the encoding efficiency can be improved by adding a new intra prediction mode. Here, the new intra prediction mode

[0104] In the third modification of the second embodiment, rem_intra_luma_pred_mode only needs to indicate 31 intra prediction modes excluding the intra prediction mode candidates and INTRA_PLANAR from all 35 intra prediction modes, and the encoding efficiency can be improved by adding a new intra prediction mode. Here, the new intra prediction mode can be added to improve the encoding efficiency. Here, the new intra prediction mode For example, between prediction mode 9 and prediction mode 10, between prediction mode 10 and prediction mode 11 Between prediction mode 25 and prediction mode 26, or between prediction mode 26 and prediction mode 27, a new angle intra prediction mode may be provided. Also, in FIG. 20, INTRA_PLANA R can be encoded with only one flag of intra_luma_non_angular_pred_flag, so when the selection probability of INTRA_PLANAR is relatively higher than that of other intra prediction modes, the encoding efficiency and processing efficiency can be optimized. Also, in FIG. 19, INTRA_PLANAR can be encoded with two flags of prev_intra_luma_pred_flag and i ntra_luma_non_angular_pred_flag, so when the selection probability of INTRA_PLANAR is relatively higher than that of other intra prediction modes, the encoding efficiency and processing efficiency are improved. INTRA_PLANAR is prev_intra_luma_pred_flag and i ntra_luma_non_angular_pred_flag's two flags for coding Therefore, when the selection probability of INTRA_PLANAR is relatively higher than that of other intra prediction modes, the encoding efficiency and processing efficiency are improved. The encoding stream output by the image encoding device of the above-described embodiment has a specific data format so that it can be decoded according to the encoding method used in the embodiment, and an image decoding device corresponding to the image encoding device can decode the encoding stream of this specific data format.

[0105] When a wired or wireless network is used to exchange the encoding stream between the image encoding device and the image decoding device, the encoding stream may be converted into a data format suitable for the transmission form of the communication path and then transmitted. In that case, the encoding stream output by the image encoding device is converted into encoded data in a data format suitable for the transmission form of the communication path and then transmitted over the network. It has a specific data format so that it can be decoded according to the encoding method used in the embodiment, and an image decoding device corresponding to the image encoding device can decode the encoding stream of this specific data format. The encoding stream output by the image encoding device has a specific data format so that it can be decoded according to the encoding method used in the embodiment, and an image decoding device corresponding to the image encoding device can decode the encoding stream of this specific data format. The encoding stream output by the image encoding device has a specific data format so that it can be decoded according to the encoding method used in the embodiment, and an image decoding device corresponding to the image encoding device can decode the encoding stream of this specific data format.

[0106] When a wired or wireless network is used to exchange the encoding stream between the image encoding device and the image decoding device, the encoding stream may be converted into a data format suitable for the transmission form of the communication path and then transmitted. When a wired or wireless network is used to exchange the encoding stream between the image encoding device and the image decoding device, the encoding stream may be converted into a data format suitable for the transmission form of the communication path and then transmitted. If so, the encoding stream output by the image encoding device may be converted into encoded data in a data format suitable for the transmission form of the communication path and then transmitted over the network. The encoding stream output by the image encoding device is converted into encoded data in a data format suitable for the transmission form of the communication path and then transmitted over the network. An image transmission device that transmits to, and an image reception device that receives encoded data from a network, restores it into an encoded stream and supplies it to an image decoding device are provided.

[0107] The image transmission device includes a memory that buffers the encoded stream output by the image encoding device , a packet processing unit that packetizes the encoded stream into encoded data, and a transmission unit that transmits the packetized encoded data via a network. The image reception device includes a reception unit that receives the packetized encoded data via a network, a packet processing unit that packet-processes the received encoded data into an encoded stream, and a memory that buffers the encoded stream, and the encoded stream in the buffer is supplied to the image decoding device.

[0108] Also, by adding a display unit that displays the image decoded by the image decoding device to the configuration, it can be made into a display device. In that case, the display unit displays the decoded image signal decoded by the image decoding device on the screen.

[0109] Also, by adding an imaging unit to the configuration and inputting the captured image into the image encoding device, it can be made into an imaging device. In that case, the imaging unit inputs the captured image signal to the block size determination unit 110.

[0110] Of course, the above processing related to encoding and decoding can be realized by using hardware transmission, storage, and reception devices, and can also be realized by firmware stored in a ROM (Read-Only Memory), a flash memory, etc., or software such as a computer. The firmware program and the software program ​ It is also possible to record and provide it on a computer-readable recording medium, or to provide it from a server through a wired or wireless network, or to provide it as data broadcast of terrestrial or satellite digital broadcast.

[0111] As described above, the present invention has been described based on the embodiments. The embodiments are examples, and it is understood by those skilled in the art that various modifications are possible for each component and combination of each processing process, and such modifications are also within the scope of the present invention. In addition, although a plurality of embodiments and modification examples have been described, they may be combined in any manner for each embodiment and modification example.

[0112] Note that the embodiments may be specified by the following items.

[0113] [Item 1] A prediction mode candidate generation unit (122) that generates a first intra prediction mode candidate list and a second intra prediction mode candidate list from the intra prediction modes of blocks adjacent to the block to be predicted, (122), A prediction mode selection unit (123) that selects a first intra prediction mode and a second intra prediction mode from the first intra prediction mode candidate list and the second intra prediction mode candidate list, respectively, (123), A predicted value calculation unit (12 4) that calculates a first predicted value from the encoded pixels adjacent to the block to be predicted based on the first intra prediction mode, and calculates a second predicted value from the encoded pixels adjacent to the block to be predicted based on the second intra prediction mode, (124), A predicted value weighting unit ( 125) that calculates a third predicted value based on the first predicted value and the second predicted value, ​​​​​An image encoding device (100) characterized by having [Item 2] The predicted value weighting unit (125) calculates the third predicted value by simply averaging or weighted-averaging the first predicted value and the second predicted value. The image encoding device (100) according to Item 1, characterized in that it is so. [Item 3] If the number of intra prediction modes is 2, the prediction mode candidate generation unit (122) generates the second intra prediction mode candidate list. If the number of intra prediction modes is 1, the second intra prediction mode candidate list is not generated. If the number of intra prediction modes is 2, the prediction mode selection unit (123) selects the second intra prediction mode. If the number of intra prediction modes is 1, the second intra prediction mode is not selected. If the number of intra prediction modes is 2, the predicted value calculation unit (124) calculates the second predicted value. If the number of intra prediction modes is 1, the second predicted value is not calculated. If the number of intra prediction modes is 2, the predicted value weighting unit (125) calculates the third predicted value based on the first predicted value and the second predicted value. If the number of intra prediction modes is 1, the first predicted value is used as the predicted value as it is. The image encoding device (100) according to Item 1 or 2, characterized in that it is so. [Item 4] If the width of the prediction target block is greater than or equal to a predetermined threshold width and the height of the prediction target block is greater than or equal to a predetermined threshold height, the number of intra prediction modes is set to 2. If the width of the prediction target block is greater than or equal to a predetermined threshold width and the height of the prediction target block is not greater than or equal to a predetermined threshold height, the image encoding device (100) further includes a mode number determination unit (121) that sets the number of intra prediction modes to 1. The image encoding device (100) according to Item 3, characterized in that it is so. it is so. [Item 5] When the number of intra prediction modes is determined by the mode number determination unit (121) and the first intra prediction mode is a non-angle intra prediction mode, the number of intra prediction modes is set to 1. The image encoding apparatus (100) according to Item 4. [Item 6] When the number of intra prediction modes is 2, the encoding unit (140) further encodes the information of the second intra prediction mode as a code string. The image encoding apparatus (100) according to any one of Items 3 to 5. [Item 7] A plurality of intra prediction modes for performing intra prediction using encoded pixels adjacent to the prediction target block are classified into a non-angle intra prediction mode and an angle intra prediction mode. The encoding unit (140) further divides the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode to generate a code string. The image encoding apparatus (100) according to any one of Items 1 to 5. [Item 8] The first intra prediction mode and the second intra prediction mode of the block adjacent to the prediction target block are obtained as the first intra prediction mode and the second intra prediction mode of the prediction target block, and the encoding unit (140) further encodes them into one syntax element. The image encoding apparatus (100) according to any one of Items 1 to 4. [Item 9] A prediction mode candidate step that generates a first intra prediction mode candidate list and a second intra prediction mode candidate list from the intra prediction modes of the blocks adjacent to the prediction target block, ​​​​​​​​​​​​​​the first intra prediction mode candidate list and the second intra prediction mode candidate list a prediction mode selection step of selecting a first intra prediction mode and a second intra prediction mode from each of them and, a predicted value calculation step of calculating a first predicted value from encoded pixels adjacent to the block to be predicted based on the first intra prediction mode, and calculating a second predicted value from encoded pixels adjacent to the block to be predicted based on the second intra prediction mode and, a predicted value weighting step of calculating a third predicted value based on the first predicted value and the second predicted value and An image encoding method characterized by comprising the above steps. [Item 10] a prediction mode candidate step of generating a first intra prediction mode candidate list and a second intra prediction mode candidate list from the intra prediction modes of blocks adjacent to the block to be predicted and, a prediction mode selection step of selecting a first intra prediction mode and a second intra prediction mode from each of the first intra prediction mode candidate list and the second intra prediction mode candidate list and, a predicted value calculation step of calculating a first predicted value from encoded pixels adjacent to the block to be predicted based on the first intra prediction mode, and calculating a second predicted value from encoded pixels adjacent to the block to be predicted based on the second intra prediction mode and, a predicted value weighting step of calculating a third predicted value based on the first predicted value and the second predicted value and An image encoding program characterized by causing a computer to execute the above steps. [Item 11] ​​​​​​An intra prediction method that performs intra prediction using encoded pixels adjacent to a prediction target block. An image encoding apparatus (100) in which a plurality of intra prediction modes are defined, wherein the plurality of intra prediction modes are classified into a non - angular intra prediction mode and an angular intra prediction mode, and a coding unit (140) is provided that divides the syntax elements of the non - angular intra prediction mode and the syntax elements of the angular intra prediction mode to generate a code stream. The image encoding apparatus (100) is characterized by this. [Item 12] An image encoding method in which a plurality of intra prediction modes are defined that perform intra prediction using encoded pixels adjacent to a prediction target block. The method is characterized by having a coding step of classifying the plurality of intra prediction modes into a non - angular intra prediction mode and an angular intra prediction mode, and dividing the syntax elements of the non - angular intra prediction mode and the syntax elements of the angular intra prediction mode to generate a code stream. The image encoding method is characterized by this. [Item 13] An image encoding program in which a plurality of intra prediction modes are defined that perform intra prediction using encoded pixels adjacent to a prediction target block. The program is characterized by causing a computer to execute a coding step of classifying the plurality of intra prediction modes into a non - angular intra prediction mode and an angular intra prediction mode, and dividing the syntax elements of the non - angular intra prediction mode and the syntax elements of the angular intra prediction mode to generate a code stream. The image encoding program is characterized by this. [Item 14] An image encoding apparatus (100) in which a plurality of intra prediction modes are defined that perform intra prediction using encoded pixels adjacent to a prediction target block. The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding unit (140) that encodes them into one syntax element is provided. An image encoding apparatus (100) characterized by this. Using the encoded pixels adjacent to the block to be predicted for intra prediction, there are a plurality of defined intra prediction modes in the image encoding method, The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. An image encoding program for performing intra prediction using the encoded pixels adjacent to the block to be predicted, where there are a plurality of defined intra prediction modes, [Item 15] The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. Using the encoded pixels adjacent to the block to be predicted for intra prediction, there are a plurality of defined intra prediction modes in the image encoding method, The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. Using the encoded pixels adjacent to the block to be predicted for intra prediction, there are a plurality of defined intra prediction modes in the image encoding method, [Item 16] An image encoding program for performing intra prediction using the encoded pixels adjacent to the block to be predicted, where there are a plurality of defined intra prediction modes, The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the block to be predicted are obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and an encoding step of encoding them into one syntax element is provided. An image encoding method characterized by this. [Item 17] A prediction mode candidate generation unit (122) that generates a first intra prediction mode candidate list and a second intra prediction mode candidate list from the intra prediction modes of the blocks adjacent to the block to be predicted, Selecting the first intra prediction mode from the code sequence of the first intra prediction mode, And Selecting the first intra prediction mode from the code sequence of the first intra prediction mode, and A prediction mode for selecting a second intra prediction mode from a code sequence of the second intra prediction mode a selection unit (123), a predicted value calculation unit (124) that calculates a first predicted value from decoded pixels adjacent to the block to be predicted based on the first intra prediction mode, and calculates a second predicted value from decoded pixels adjacent to the block to be predicted based on the second intra prediction mode and a predicted value weighting unit ( 125) that calculates a third predicted value based on the first predicted value and the second predicted value, characterized in that it has an image decoding apparatus (200). [Item 18] The predicted value weighting unit (125) calculates the third predicted value by simply averaging or weighted-averaging the first predicted value and the second predicted value, according to the image decoding apparatus (200) described in Item 17. [Item 19] If the number of intra prediction modes is 2, the prediction mode candidate generation unit (122) generates the second intra prediction mode candidate list. If the number of intra prediction modes is 1, the prediction mode candidate generation unit (122) does not generate the second intra prediction mode candidate list. If the number of intra prediction modes is 2, the prediction mode selection unit (123) selects the second intra prediction mode. If the number of intra prediction modes is 1, the prediction mode selection unit (123) does not select the second intra prediction mode. If the number of intra prediction modes is 2, the predicted value calculation unit (124) calculates the second predicted value. If the number of intra prediction modes is 1, the predicted value calculation unit (124) does not calculate the second predicted value. If the number of intra prediction modes is 2, the predicted value weighting unit (125) calculates the third predicted value based on the first predicted value and the second predicted value. If the number of intra prediction modes is 1, the predicted value weighting unit (125) does not calculate the third predicted value. ​​​​​​​​If so, the first predicted value is directly used as the predicted value, which is characterized in item 17 or 18 The image decoding apparatus (200) described. [Item 20] If the width of the prediction target block is equal to or greater than a predetermined threshold width and the height of the prediction target block is equal to or greater than a predetermined threshold height, the number of intra prediction modes is set to 2. If the width of the prediction target block is less than a predetermined threshold width or the height of the prediction target block is less than a predetermined threshold height, the number of intra prediction modes is set to 1. The image decoding apparatus (200) further includes a mode number determination unit (121), which is characterized in item 19. [Item 21] When the first intra prediction mode is a non-angle intra prediction mode, the mode number determination unit (121) sets the number of intra prediction modes to 1. The image decoding apparatus (200) is characterized in item 20. [Item 22] When the number of intra prediction modes is 2, the image decoding apparatus (200) further includes a decoding unit (210) for decoding the code sequence of the second intra prediction mode, which is characterized in any one of items 17 to 21. [Item 23] A plurality of intra prediction modes for performing intra prediction using decoded pixels adjacent to the prediction target block are classified into a non-angle intra prediction mode and an angle intra prediction mode. The image decoding apparatus (200) further includes a decoding unit (210) for decoding the code sequences generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode, which is characterized in any one of items 17 to 21. [Item 24] The first intra prediction mode and the second intra prediction mode of the blocks adjacent to the prediction target block The intra prediction mode is set as the first intra prediction mode of the block to be predicted and the second intra prediction mode, and further includes a decoding unit (210) for decoding a code sequence encoded in one syntax element The image decoding apparatus (200) according to any one of items 17 to 21, characterized in that it has the following features. [Item 25] A prediction mode candidate generation step of generating a first intra prediction mode candidate list and a second intra prediction mode candidate list from the intra prediction modes of blocks adjacent to the block to be predicted And, A prediction mode selection step of selecting a first intra prediction mode from the code sequence of the first intra prediction mode and selecting a second intra prediction mode from the code sequence of the second intra prediction mode And, A prediction value calculation step of calculating a first prediction value from the decoded pixels adjacent to the block to be predicted based on the first intra prediction mode and calculating a second prediction value from the decoded pixels adjacent to the block to be predicted based on the second intra prediction mode And, A prediction value weighting step of calculating a third prediction value based on the first prediction value and the second prediction value The image decoding method characterized by having the above steps. [Item 26] A prediction mode candidate generation step of generating a first intra prediction mode candidate list and a second intra prediction mode candidate list from the intra prediction modes of blocks adjacent to the block to be predicted And, A prediction mode selection step of selecting a first intra prediction mode from the code sequence of the first intra prediction mode and selecting a second intra prediction mode from the code sequence of the second intra prediction mode And, A prediction value calculation step of calculating a first prediction value from the decoded pixels adjacent to the block to be predicted based on the first intra prediction mode and calculating a second prediction value from the decoded pixels adjacent to the block to be predicted based on the second intra prediction mode And, ​​​​​Based on the first intra prediction mode, a decoded pixel adjacent to the prediction target block is used to calculate a first predicted value, and based on the second intra prediction mode, a decoded pixel adjacent to the prediction target block is used to calculate a second predicted value. A predicted value calculation step for calculating a second predicted value, and a predicted value weighting step for calculating a third predicted value based on the first predicted value and the second predicted value. An image decoding program characterized by causing a computer to execute the steps. Based on the first intra prediction mode, a decoded pixel adjacent to the prediction target block is used to calculate a first predicted value, and based on the second intra prediction mode, a decoded pixel adjacent to the prediction target block is used to calculate a second predicted value. A predicted value calculation step for calculating a second predicted value, and a predicted value weighting step for calculating a third predicted value based on the first predicted value and the second predicted value. An image decoding program characterized by causing a computer to execute the steps. A predicted value calculation step of calculating a first predicted value from the decoded pixels adjacent to the prediction target block based on the first intra prediction mode, and calculating a second predicted value from the decoded pixels adjacent to the prediction target block based on the second intra prediction mode; A predicted value weighting step of calculating a third predicted value based on the first predicted value and the second predicted value; And a step of weighting the predicted values. An image decoding program characterized by causing a computer to execute the steps. [Item 27] An image decoding apparatus (200) that performs intra prediction using decoded pixels adjacent to a prediction target block, in which a plurality of intra prediction modes are defined, The apparatus has a decoding unit (210) that classifies the plurality of intra prediction modes into a non-angle intra prediction mode and an angle intra prediction mode, and decodes a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding apparatus (200) characterized by the above. The plurality of intra prediction modes are classified into a non-angle intra prediction mode and an angle intra prediction mode, and a decoding unit (210) that decodes a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding apparatus (200) characterized by the above. The plurality of intra prediction modes are classified into a non-angle intra prediction mode and an angle intra prediction mode, and a decoding unit (210) that decodes a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding apparatus (200) characterized by the above. The apparatus has a decoding unit (210) that classifies the plurality of intra prediction modes into a non-angle intra prediction mode and an angle intra prediction mode, and decodes a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding apparatus (200) characterized by the above. An image decoding apparatus (200) characterized by the above. [Item 28] An image decoding method that performs intra prediction using decoded pixels adjacent to a prediction target block, in which a plurality of intra prediction modes are defined, The method includes a decoding step of classifying the plurality of intra prediction modes into a non-angle intra prediction mode and an angle intra prediction mode, and decoding a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding method characterized by the above. The plurality of intra prediction modes are classified into a non-angle intra prediction mode and an angle intra prediction mode, and a decoding step of decoding a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding method characterized by the above. The plurality of intra prediction modes are classified into a non-angle intra prediction mode and an angle intra prediction mode, and a decoding step of decoding a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding method characterized by the above. The method includes a decoding step of classifying the plurality of intra prediction modes into a non-angle intra prediction mode and an angle intra prediction mode, and decoding a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding method characterized by the above. An image decoding method characterized by the above. [Item 29] An image decoding program that performs intra prediction using decoded pixels adjacent to a prediction target block, in which a plurality of intra prediction modes are defined, The program includes a decoding step of classifying the plurality of intra prediction modes into a non-angle intra prediction mode and an angle intra prediction mode, and decoding a code sequence generated by dividing the syntax elements of the non-angle intra prediction mode and the syntax elements of the angle intra prediction mode. An image decoding program characterized by the above. classify the plurality of intra prediction modes into a non - angular intra prediction mode and an angular intra prediction mode and generate a decoding step for decoding a code sequence divided into a syntax element of the non - angular intra prediction mode and a syntax element of the angular intra prediction mode to be executed by a computer, an image decoding program characterized by this. [Item 30] An image decoding apparatus (200) in which a plurality of intra prediction modes for performing intra prediction using decoded pixels adjacent to a prediction target block are defined, characterized by obtaining a first intra prediction mode and a second intra prediction mode of a block adjacent to the prediction target block as the first intra prediction mode and the second intra prediction mode of the prediction target block, and having a decoding unit (21 0) for decoding a code sequence encoded into one syntax element. [Item 31] An image decoding method in which a plurality of intra prediction modes for performing intra prediction using decoded pixels adjacent to a prediction target block are defined, characterized by obtaining a first intra prediction mode and a second intra prediction mode of a block adjacent to the prediction target block as the first intra prediction mode and the second intra prediction mode of the prediction target block, and having a decoding step for decoding a code sequence encoded into one syntax element. [Item 32] An image decoding program in which a plurality of intra prediction modes for performing intra prediction using decoded pixels adjacent to a prediction target block are defined, characterized by obtaining a first intra prediction mode and a second intra prediction mode of a block adjacent to the prediction target block as the first intra prediction mode and the second intra prediction mode of the prediction target block. ​​​​​​​​The measurement mode is obtained as the first intra prediction mode and the second intra prediction mode of the block to be predicted, and a decoding step of decoding a code sequence encoded in one syntax element is characterized in that an image decoding program causes a computer to execute it. An image decoding program characterized by causing a computer to execute it.

Explanation of symbols

[0114] 100 Image encoding device, 110 Block size determination unit, 120 Intra prediction Selection unit, 130 Conversion unit, 140 Encoding unit, 200 Image decoding device, 210 Decoding unit, 220 Block size acquisition unit, 230 Intra prediction unit, 240 Inverse transform Unit.

Claims

1. Encode a first flag indicating whether to determine an intra prediction mode of a block to be predicted based on a first candidate specifying index, When the first flag indicates that the intra prediction mode of the block to be predicted is to be determined based on the first candidate specifying index, encode the first candidate specifying index, When the first flag does not indicate that the intra prediction mode of the block to be predicted is to be determined based on the first candidate specifying index, encode a second flag indicating whether the intra prediction mode of the block to be predicted is a predetermined non-angular intra prediction mode, An encoding unit that encodes a second candidate specifying index when the second flag does not indicate that the mode is the predetermined non-angular intra prediction mode, When the first flag indicates that the intra prediction mode of the block to be predicted is to be determined based on the first candidate specifying index, determine the intra prediction mode of the block to be predicted based on the first candidate specifying index, When the second flag indicates that the mode is the predetermined non-angular intra prediction mode, select the predetermined non-angular intra prediction mode as the intra prediction mode of the block to be predicted, When the second flag does not indicate that the mode is the predetermined non-angular intra prediction mode, based on the intra prediction modes of two blocks adjacent to the left and upper sides of the block to be predicted, from an intra prediction mode candidate list generated so as not to include the predetermined non-angular intra prediction mode, select the intra prediction mode of the block to be predicted based on the second candidate specifying index, a prediction mode selection unit; An image encoding apparatus, characterized by comprising:

2. Encode a first flag indicating whether to determine an intra prediction mode of a block to be predicted based on a first candidate specifying index, When the first flag indicates that the intra prediction mode of the block to be predicted is to be determined based on the first candidate specifying index, encode the first candidate specifying index, When the first flag does not indicate that the intra prediction mode of the block to be predicted is to be determined based on the first candidate specifying index, encode a second flag indicating whether the intra prediction mode of the block to be predicted is a predetermined non-angular intra prediction mode, When the second flag does not indicate that the prediction target block is in the predetermined non-angular intra prediction mode, an encoding step of encoding a second candidate identification index; When the first flag indicates that the intra prediction mode of the prediction target block is determined based on the first candidate identification index, determining the intra prediction mode of the prediction target block based on the first candidate identification index; When the second flag indicates that the prediction target block is in the predetermined non-angular intra prediction mode, selecting the predetermined non-angular intra prediction mode as the intra prediction mode of the prediction target block; When the second flag does not indicate that the prediction target block is in the predetermined non-angular intra prediction mode, based on the intra prediction modes of the two blocks adjacent to the left and upper sides of the prediction target block, from an intra prediction mode candidate list generated to exclude the predetermined non-angular intra prediction mode, selecting the intra prediction mode of the prediction target block based on the second candidate identification index in a prediction mode selection step; An image encoding method, characterized by comprising the above steps. **Claim 3** Encoding a first flag indicating whether to determine the intra prediction mode of the prediction target block based on the first candidate identification index; When the first flag indicates that the intra prediction mode of the prediction target block is determined based on the first candidate identification index, encoding the first candidate identification index; When the first flag does not indicate that the intra prediction mode of the prediction target block is determined based on the first candidate identification index, encoding a second flag indicating whether the intra prediction mode of the prediction target block is the predetermined non-angular intra prediction mode; When the second flag does not indicate that the prediction target block is in the predetermined non-angular intra prediction mode, an encoding step of encoding a second candidate identification index; When the first flag indicates that the intra prediction mode of the prediction target block is determined based on the first candidate identification index, determining the intra prediction mode of the prediction target block based on the first candidate identification index; When the second flag indicates that the prediction target block is in the predetermined non-angular intra prediction mode, selecting the predetermined non-angular intra prediction mode as the intra prediction mode of the prediction target block; When the second flag does not indicate that the prediction target block is in the predetermined non-angular intra prediction mode, based on the intra prediction modes of the two blocks adjacent to the left and upper sides of the prediction target block, from the intra prediction mode candidate list generated to exclude the predetermined non-angular intra prediction mode, based on the second candidate specifying index, a prediction mode selection step of selecting the intra prediction mode of the prediction target block; An image encoding program, characterized by comprising the same. **Claim 4** Decoding a first flag indicating whether to determine the intra prediction mode of the prediction target block based on the first candidate specifying index; When the first flag indicates that the intra prediction mode of the prediction target block is determined based on the first candidate specifying index, decoding the first candidate specifying index; When the first flag does not indicate that the intra prediction mode of the prediction target block is determined based on the first candidate specifying index, decoding a second flag indicating whether the intra prediction mode of the prediction target block is a predetermined non-angular intra prediction mode; A decoding unit that decodes a second candidate specifying index when the second flag does not indicate that the prediction target block is in the predetermined non-angular intra prediction mode; When the first flag indicates that the intra prediction mode of the prediction target block is determined based on the first candidate specifying index, determining the intra prediction mode of the prediction target block based on the first candidate specifying index; When the second flag indicates that the prediction target block is in the predetermined non-angular intra prediction mode, selecting the predetermined non-angular intra prediction mode as the intra prediction mode of the prediction target block; When the second flag does not indicate that the prediction target block is in the predetermined non-angular intra prediction mode, based on the intra prediction modes of the two blocks adjacent to the left and upper sides of the prediction target block, from the intra prediction mode candidate list generated to exclude the predetermined non-angular intra prediction mode, based on the second candidate specifying index, a prediction mode selection unit that selects the intra prediction mode of the prediction target block; An image decoding apparatus, characterized by comprising the same. **Claim 5** Decoding a first flag indicating whether to determine the intra prediction mode of the prediction target block based on the first candidate specifying index; When the first flag indicates determining an intra prediction mode of the block to be predicted based on the first candidate specifying index, decode the first candidate specifying index, When the first flag does not indicate determining an intra prediction mode of the block to be predicted based on the first candidate specifying index, decode a second flag indicating whether the intra prediction mode of the block to be predicted is a predetermined non-angular intra prediction mode, A decoding step of decoding a second candidate specifying index when the second flag does not indicate the predetermined non-angular intra prediction mode, When the first flag indicates determining an intra prediction mode of the block to be predicted based on the first candidate specifying index, determine the intra prediction mode of the block to be predicted based on the first candidate specifying index, When the second flag indicates the predetermined non-angular intra prediction mode, select the predetermined non-angular intra prediction mode as the intra prediction mode of the block to be predicted, When the second flag does not indicate the predetermined non-angular intra prediction mode, based on the intra prediction modes of the two blocks adjacent to the left and upper sides of the block to be predicted, select the intra prediction mode of the block to be predicted based on the second candidate specifying index from an intra prediction mode candidate list generated so as not to include the predetermined non-angular intra prediction mode. A prediction mode selection step, An image decoding method characterized by comprising the above.

6. Decode a first flag indicating whether to determine an intra prediction mode of a block to be predicted based on a first candidate specifying index, When the first flag indicates determining an intra prediction mode of the block to be predicted based on the first candidate specifying index, decode the first candidate specifying index, When the first flag does not indicate determining an intra prediction mode of the block to be predicted based on the first candidate specifying index, decode a second flag indicating whether the intra prediction mode of the block to be predicted is a predetermined non-angular intra prediction mode, A decoding step of decoding a second candidate specifying index when the second flag does not indicate the predetermined non-angular intra prediction mode, When the first flag indicates that the intra prediction mode of the block to be predicted is determined based on the first candidate identification index, determine the intra prediction mode of the block to be predicted based on the first candidate identification index, When the second flag indicates that the intra prediction mode is the predetermined non-angular intra prediction mode, select the predetermined non-angular intra prediction mode as the intra prediction mode of the block to be predicted, When the second flag does not indicate that the intra prediction mode is the predetermined non-angular intra prediction mode, based on the intra prediction modes of the two blocks on the left and upper sides adjacent to the block to be predicted, from the intra prediction mode candidate list generated so as not to include the predetermined non-angular intra prediction mode, a prediction mode selection step of selecting the intra prediction mode of the block to be predicted based on the second candidate identification index, An image decoding program characterized by having the above.

7. A storage method for storing an encoded stream generated according to the image encoding method described in claim 2 in a recording medium.

8. A transmission method for transmitting an encoded stream generated according to the image encoding method described in claim 2.

Citation Information

Patent Citations

  • Image encoding device, image encoding method, image encoding program, image decoding device, image decoding method, and image decoding program

    JP7494886B2

  • Method and apparatus for coding video and method and apparatus for decoding video, using intra prediction

    US20140133558A1

  • Neighbor based signaling of intra prediction modes

    US20170332084A1

  • Variable number of intra modes for video coding

    US20180098064A1

  • Intra-Prediction With Multiple Reference Lines

    US20180332284A1