An image decoding method for decoding an encoded image, the image decoding method comprising:
- generating a prediction image by a plurality of types of prediction image generating processing, the plurality of types of prediction image generating processing include an intra prediction, an inter prediction, and a synthesis prediction, wherein the synthesis prediction performs a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to a decoding-target block;
- and
- generating a decoded image based on the prediction image generated in the prediction image generation and a difference image of the decoding-target block, wherein
- types of predictions that can be used in the prediction image generation include a first prediction mode and a second prediction mode,
- the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and
- processing states of weighting processing include setting a smallest weighting for the prediction image of the intra prediction while the type of the intra prediction is the first prediction mode, wherein
- the first prediction mode is an intra prediction mode that includes generating a prediction image based on a first linear interpolation and a second linear interpolation, the first linear interpolation uses pixel values of a first pair of reference pixels, a first reference pixel of the first pair of reference pixels is located outside the decoding-target block and a second reference pixel of the first pair of reference pixels is located inside the decoding-target block, and the second linear interpolation uses pixel values of a second pair of reference pixels, a first reference pixel of the second pair of reference pixels is a reference pixel located outside the decoding-target block and a second reference pixel of the second pair of reference pixels is a reference pixel located inside the decoding-target block, and
- the second prediction mode is an angular prediction mode, wherein
- checking processing for checking both whether an available adjacent block exists immediately above the decoding-target block or not, whether an available adjacent block exists immediately on the left of the decoding-target block or not, are conducted for the weighting processing, and
- wherein both a result of checking whether an available adjacent block exists immediately above the decoding-target block or not, and a result of checking whether an available adjacent block exists immediately on the left of the decoding-target block or not, effect a result of the weighting processing, and
- a plurality of prediction directions including a horizontal direction and a vertical direction are defined to be used for the angular prediction mode.