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, the method comprising:
determining an intra prediction mode for a target block;
determining whether to perform a subblock-based intra prediction for the target block;
determining whether the target block is divided in a vertical direction or a horizontal direction in case the subblock-based intra prediction is performed for the target block;
identifying each of subblocks obtained by dividing the target block; and
performing an intra prediction for each of the subblocks of the target block based on the intra prediction mode determined 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 2 in case the size of the target block is smaller than a predetermined size.
2. An intra prediction method performed by an image encoding apparatus, comprising:
determining an intra prediction mode for a target block;
determining whether to perform a subblock-based intra prediction for the target block;
determining whether the target block is divided in a vertical direction or a horizontal direction in case the subblock-based intra prediction is performed for the target block;
identifying each of subblocks obtained by dividing the target block; and
performing an intra prediction for each of the subblocks of the target block based on the intra prediction mode determined 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 2 in case the size et the target block is smaller 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 an intra prediction mode for a target block;
determining whether to perform a subblock-based intra prediction for the target block;
determining whether the target block is divided in a vertical direction or a horizontal direction in case the subblock-based intra prediction is performed for the target block;
identifying each of subblocks obtained by dividing the target block; and
performing an intra prediction for each of the subblocks of the target block based on the intra prediction mode determined 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 2 in case the size of the target block is smaller than a predetermined size.