Intra prediction method and device
The present invention relates to an intra prediction method and apparatus. The image decoding method according to the present invention may comprise decoding information on intra prediction; and generating a prediction block by performing intra prediction for a current block based on the information on intra prediction. The information on intra prediction may include information on an intra prediction mode, and the intra prediction mode may include a curved intra prediction mode.
1. An image decoding method performed by an image decoding apparatus, the method comprising:
obtaining a current coding tree block by partitioning an image;
repeatedly performing only quad tree partition on the current coding tree block until a size of coding blocks partitioned from the current coding tree block is 64×64; and
determining a partition type of a current coding block that is one of the coding blocks among a plurality of partition types including quad tree partition, horizontal binary tree partition, and vertical binary tree partition when the size of the current coding block is equal to or less than 64×64; and
reconstructing the current coding block based on the determined partitioned type,
wherein,
determining of the partition type of the current coding block comprises,
decoding a partition flag indicating whether to partition the current coding block;
in response to the partition flag indicating that the current coding block is partitioned, decoding a quad tree partition flag indicating whether the current coding block is quad-tree partitioned,
in response to the quad tree partition flag indicating that the current coding block is not quad-tree partitioned, decoding a partition direction flag indicating a partition direction of the current coding block, and
determining the partition type of the current coding block based on the partition flag, the quad tree partition flag, and the partition direction flag.
2. The image decoding method of claim 1 ,
wherein the reconstructing of the current coding block comprises performing intra prediction for the current coding block, and
the intra prediction is performed by using a reference sample line selected from a plurality of reference sample lines.
3. The image decoding method of claim 2 ,
wherein information for selecting the reference sample line from the plurality of reference sample lines is reconstructed from a bitstream.
4. An image encoding method performed by an image encoding apparatus, the method comprising:
obtaining a current coding tree block by partitioning an image;
repeatedly performing only quad tree partition on the current coding tree block until a size of coding blocks partitioned from the current coding tree block is 64×64; and
determining a partition type of a current coding block that is one of the coding blocks among a plurality of partition types including quad tree partition, horizontal binary tree partition, and vertical binary tree partition when the size of the current coding block is equal to or less than 64×64; and
encoding the current coding block based on the determined partitioned type,
wherein,
determining of the partition type of the current coding block comprises,
encoding a partition flag indicating whether to partition the current coding block based on the partition type of the current coding block;
in response to the partition flag indicating that the current coding block is partitioned, encoding a quad tree partition flag indicating whether the current coding block is quad-tree partitioned based on the partition type of the current coding block, and
in response to the quad tree partition flag indicating that the current coding block is not quad-tree partitioned, encoding a partition direction flag indicating a partition direction of the current coding block based on the partition type of the current coding block.
5. The image encoding method of claim 4 ,
wherein the encoding of the current coding block comprises performing intra prediction for the coding block, and
the intra prediction is performed by using a reference sample line selected from a plurality of reference sample lines.
6. The image encoding method of claim 5 ,
wherein information for selecting the reference sample line from the plurality of reference sample lines is encoded into a bitstream.
7. A non-transitory computer-readable recording medium storing a bitstream which is generated by an image encoding method,
the method comprising:
obtaining a current coding tree block by partitioning an image;
repeatedly performing only quad tree partition on the current coding tree block until a size of coding blocks partitioned from the current coding tree block is 64×64, and
determining a partition type of a current coding block that is one of the coding blocks among a plurality of partition types including quad tree partition, horizontal binary tree partition and vertical binary tree partition when the size of the current coding block is equal to or less than 64×64; and
encoding the current coding block based on the determined partitioned type,
wherein,
determining of the partition type of the current coding block comprises,
encoding a partition flag indicating whether to partition the current coding block based on the partition type of the current coding block;
in response to the partition flag indicating that the current coding block is partitioned, encoding a quad tree partition flag indicating whether the current coding block is quad-tree partitioned based on the partition type of the current coding block, and
in response to the quad tree partition flag indicating that the current coding block is not quad-tree partitioned, encoding a partition direction flag indicating a partition direction of the current coding block based on the partition type of the current coding block.