Encoder, decoder, encoding method, and decoding method
A decoder which decodes a video. At least two items of prediction information are obtained for a first partition included in the video. A template is derived. At least two costs are calculated using the template and the at least two items of prediction information. A first direction is determined from a plurality of directions using the calculated at least two costs, where the first direction is substantially perpendicular to a second direction in which a second partition is opposed to a third partition in the first partition. One of the at least two items of prediction information is assigned to the second partition, and another of the at least two items of prediction information is assigned to the third partition. The first partition is decoded according to the at least two items of prediction information.
1 . A decoder which decodes a video, the decoder comprising:
circuitry; and
memory coupled to the circuitry, wherein using the memory, the circuitry:
obtains at least two items of prediction information for a first partition included in the video;
derives a template;
calculates at least two costs, using the template and the at least two items of prediction information;
using the at least two costs, (i) determines, from a plurality of directions, a first direction which is substantially perpendicular to a second direction in which a second partition is opposed to a third partition in the first partition and (ii) assigns one of the at least two items of prediction information to the second partition, and another of the at least two items of prediction information to the third partition; and
decodes the first partition according to the at least two items of prediction information, and
the plurality of directions include at least one of a horizontal direction, a vertical direction, a diagonal direction from a top-left corner of the first partition to a bottom-right corner of the first partition, or a diagonal direction from a top-right corner of the first partition to a bottom-left corner of the first partition.
2 . An encoder which encodes a video, the encoder comprising:
circuitry; and
memory coupled to the circuitry, wherein using the memory, the circuitry:
obtains at least two items of prediction information for a first partition included in the video;
derives a template;
calculates at least two costs, using the template and the at least two items of prediction information;
using the at least two costs, (i) determines, from a plurality of directions, a first direction which is substantially perpendicular to a second direction in which a second partition is opposed to a third partition in the first partition and (ii) assigns one of the at least two items of prediction information to the second partition, and another of the at least two items of prediction information to the third partition; and
encodes the first partition according to the at least two items of prediction information, and
the plurality of directions include at least one of a horizontal direction, a vertical direction, a diagonal direction from a top-left corner of the first partition to a bottom-right corner of the first partition, or a diagonal direction from a top-right corner of the first partition to a bottom-left corner of the first partition.