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 a prediction unit, comprising:
determining an intra prediction mode candidate group of a target block;
determining an intra prediction mode for the target block based on the intra prediction mode candidate group;
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
determining a reference pixel for an intra prediction mode of the target block;
performing at least one of a filtering or an interpolation on the reference pixel; and
performing an intra prediction for each of the subblocks of the target block based on the intra prediction mode candidate group and the reference pixel,
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 image decoding method performed by an image decoder to decode a bitstream by using the intra prediction method of claim 1 .
3. An image encoding method performed by an image encoder to encode an image to generate a bitstream by using the intra prediction method of claim 1 .
4. An image transmitting method to transmit a bitstream that is generated by an image encoder using the intra prediction method of claim 1 .