Method and apparatus for encoding/decoding images
A method and apparatus for encoding/decoding images according to the present invention may configure a prediction mode candidate group on a screen of a target block, determine a reference pixel for a prediction mode on the screen of the target block, perform at least one of filtering and interpolation on the reference pixel, and perform prediction on the screen of the target block on the basis of the prediction mode candidate group on the screen and the reference pixel.
1 . An intra prediction method performed by an image decoding apparatus, comprising:
decoding subblock division flag information;
determining whether to perform a subblock-based intra prediction for a target block based on the subblock division flag information;
determining a division direction of the target block to be a vertical direction or a horizontal direction in case the subblock-based intra prediction is performed for the target block;
dividing the target block based on a size and the division direction of the target block to obtain the subblocks of the target block; and
performing an intra prediction for each of the subblocks of the target block,
wherein, in case the target block is divided into a plurality of subblocks, a number of the subblocks obtained by dividing the target block is determined based on a size of the target block, and
wherein the number of the subblocks of the target block is determined as 4 in case the size of the target block is equal to or greater than a predetermined size.
2 . An intra prediction method performed by an image encoding apparatus, comprising:
determining whether to perform a subblock-based intra prediction for a target block;
determining a division direction of the target block to be a vertical direction or a horizontal direction in case the subblock-based intra prediction is performed for the target block;
dividing the target block based on a size and the division direction of the target block to obtain the subblocks of the target block;
performing an intra prediction for each of the subblocks of the target block; and
encoding subblock division flag information indicating whether to perform the subblock-based intra prediction for the target block,
wherein, in case the target block is divided into a plurality of subblocks, a number of the subblocks obtained by dividing the target block is determined based on a size of the target block, and
wherein the number of the subblocks of the target block is determined as 4 in case the size of the target block is equal to or greater than a predetermined size.
3 . A non-transitory computer readable recording medium storing a bitstream that is generated by an intra prediction method, the intra prediction method comprising:
determining whether to perform a subblock-based intra prediction for a target block;
determining a division direction of the target block to be a vertical direction or a horizontal direction in case the subblock-based intra prediction is performed for the target block;
dividing the target block based on a size and the division direction of the target block to obtain the subblocks of the target block;
performing an intra prediction for each of the subblocks of the target block; and
encoding subblock division flag information indicating whether to perform the subblock-based intra prediction for the target block,
wherein, in case the target block is divided into a plurality of subblocks, a number of the subblocks obtained by dividing the target block is determined based on a size of the target block, and
wherein the number of the subblocks of the target block is determined as 4 in case the size of the target block is equal to or greater than a predetermined size.