Image encoding/decoding method and device
An image prediction method according to the present invention may comprise: identifying a reference pixel region designated for obtaining correlation information; determining a reference pixel processing configuration on the basis of determination of the availability of the reference pixel region; and performing intra prediction according to the determined reference pixel processing. As described above, performing intra prediction on the basis of the availability of a reference pixel according to the present invention can improve encoding performance.
1. A method of decoding an image, comprising:
determining a prediction mode of a current chroma block as a mode that predicts the current chroma block from a luma block corresponding to the current chroma block;
obtaining a first prediction sample for the current chroma block based on the determination;
obtaining a second prediction sample for the current chroma block based on the determination;
obtaining a final prediction sample for the current chroma block based on the first prediction sample and the second prediction sample,
wherein the first prediction sample is predicted by using a non-directional (DC) mode, and
wherein the second prediction sample is obtained based on the luma block corresponding to the current chroma block.
2. The method of claim 1 , wherein the second prediction sample is obtained further based on correlation information between the current chroma block and the corresponding luma block.
3. The method of claim 2 , wherein the second prediction sample is obtained by applying the correlation information to a sample value of a luma component calculated based on sample values within the corresponding luma block.
4. The method of claim 2 , wherein the correlation information is obtained from a bitstream.
5. The method of claim 3 , wherein the sample value of the luma component is calculated based on subsampling and averaging for the sample values within the corresponding luma block.
6. A method of encoding an image, comprising:
determining a prediction mode of a current chroma block as a mode that predicts the current chroma block from a luma block corresponding to the current chroma block;
obtaining a first prediction sample for the current chroma block based on the determination;
obtaining a second prediction sample for the current chroma block based on the determination;
obtaining a final prediction sample for the current chroma block based on the first prediction sample and the second prediction sample,
wherein the first prediction sample is predicted by using a non-directional (DC) mode, and
wherein the second prediction sample is obtained based on the luma block corresponding to the current chroma block.
7. A method of transmitting a bitstream generated by an image encoding method, the image encoding method comprising:
determining a prediction mode of a current chroma block as a mode that predicts the current chroma block from a luma block corresponding to the current chroma block;
obtaining a first prediction sample for the current chroma block based on the determination;
obtaining a second prediction sample for the current chroma block based on the determination;
obtaining a final prediction sample for the current chroma block based on the first prediction sample and the second prediction sample,
wherein the first prediction sample is predicted by using a non-directional (DC) mode, and
wherein the second prediction sample is obtained based on the luma block corresponding to the current chroma block.
8. A non-transitory computer readable recording medium storing a bitstream generated by an image encoding method, the image encoding method comprising:
determining a prediction mode of a current chroma block as a mode that predicts the current chroma block from a luma block corresponding to the current chroma block;
obtaining a first prediction sample for the current chroma block based on the determination;
obtaining a second prediction sample for the current chroma block based on the determination;
obtaining a final prediction sample for the current chroma block based on the first prediction sample and the second prediction sample,
wherein the first prediction sample is predicted by using a non-directional (DC) mode, and
wherein the second prediction sample is obtained based on the luma block corresponding to the current chroma block.