Method and apparatus for encoding/decoding image
The objective of the present invention is to provide a method and an apparatus for intra-prediction. In addition, the objective of the present invention is to provide a method and an apparatus for intra-prediction on a subblock unit basis. Furthermore, the objective of the present invention is to provide a method and an apparatus for determining a division and an encoding order of subblock units.
1 . An intra-prediction method performed by an image decoding apparatus, the method comprising:
dividing, based on partitioning information of a coding block, the coding block into a plurality of sub-blocks, the partitioning information including at least one of first partitioning information indicating whether to divide into four sub-blocks, second partitioning information indicating whether to divide into two sub-blocks or third partitioning information indicating a partitioning direction;
determining a coding order of the sub-blocks based on the partitioning information and a size of the coding block;
generating a prediction block of each sub-block by performing intra prediction based on the coding order of the sub-blocks and an intra-prediction mode of the each sub-block; and
reconstructing the coding block based on the prediction block,
wherein the reconstructing the coding block is further comprising:
generating a residual block of the each sub-block; and
reconstructing the coding block further based on the residual block,
wherein the coding block is reconstructed by adding the prediction block and the residual block.
2 . The method of claim 1 ,
wherein the coding order is determined based on whether the coding block is divided in a vertical direction or a horizontal direction according to the third partitioning information.
3 . The method of claim 1 ,
wherein the coding order is determined by further considering whether or not a shape of the coding block is a non-square with a width greater than a height.
4 . The method of claim 3 ,
wherein determining the coding order of the coding block comprises obtaining, from a bitstream, selection information for determining the coding order of the coding block among pre-defined coding order candidates, and
wherein the coding order is determined by further considering the obtained selection information.
5 . The method of claim 4 ,
wherein the pre-defined coding order candidates include a horizontal scan and an inverse- horizontal scan.
6 . The method of claim 5 ,
wherein the prediction block is generated by using a neighboring block of a current block,
wherein the current block is representative of one of the sub-blocks, and
wherein the neighboring block includes at least one of a left neighboring block, a top neighboring block, a top-left neighboring block, a bottom-left neighboring block, or a top-right neighboring block.
7 . The method of claim 6 ,
wherein the neighboring block further includes at least one of a right neighboring block or a bottom-right neighboring block.
8 . The method of claim 7 ,
wherein a position of the neighboring block for intra prediction of the current block is variably determined based on the determined coding order.
9 . An intra-prediction method performed by an image encoding apparatus, the method comprising:
determining partitioning information for dividing a coding block into a plurality of sub-blocks, the partitioning information including at least one of first partitioning information indicating whether to divide into four sub-blocks, second partitioning information indicating whether to divide into two sub-blocks or third partitioning information indicating a partitioning direction;
determining a coding order of the sub-blocks based on the partitioning information and a size of the coding block;
generating a prediction block of each sub-block by performing intra prediction based on the coding order of the sub-blocks and an intra-prediction mode of the each sub-block; and
encoding the coding block based on the prediction block,
wherein the encoding the coding block is further comprising:
generating a residual block of the each sub-block based on the prediction block; and
encoding the coding block based on the residual block,
wherein the residual block is generated by subtracting the prediction block from the coding block.
10 . A method for transmitting a bitstream that is generated by an intra-prediction method performed by an image encoding apparatus, the method comprising:
determining partitioning information for dividing a coding block into a plurality of sub-blocks, the partitioning information including at least one of first partitioning information indicating whether to divide into four sub-blocks, second partitioning information indicating whether to divide into two sub-blocks or third partitioning information indicating a partitioning direction;
determining a coding order of the sub-blocks based on the partitioning information and a size of the coding block;
generating a prediction block of each sub-block by performing intra prediction based on the coding order of the sub-blocks and an intra-prediction mode of the each sub-block;
encoding the coding block into the bitstream based on the prediction block; and
transmitting the bitstream to an image decoding apparatus,
wherein the encoding the coding block is further comprising:
generating a residual block of the each sub-block based on the prediction block; and
encoding the coding block into the bitstream based on the residual block,
wherein the residual block is generated by subtracting the prediction block from the coding block.