Video encoding and decoding method for adaptively determining chroma intra directional prediction mode
A video encoding method and a video decoding method are provided for adaptively determining a chroma intra-directional prediction mode. When a DM mode is applied for intra prediction of a chroma signal, the video encoding method and the video decoding method adaptively modify the directional mode of a luma block to conform to the characteristics of a chroma block by considering the position and size of the chroma block, the presence of reference samples, and the size of the luma block. The video encoding method and the video decoding method use the modified directional mode for intra prediction of the chroma signal.
1 . An intra prediction method performed by a video decoding apparatus, the method comprising:
decoding, from a bitstream, a chroma intra prediction mode indicator indicating that a prediction mode of a chroma block is a DM mode;
decoding a luma intra prediction mode from the bitstream, wherein the luma intra prediction mode represents an intra prediction mode of a luma block spatially corresponding to the chroma block; and
deriving a chroma intra prediction mode for the chroma block from the luma intra prediction mode, by modifying the luma intra prediction mode based on an aspect ratio of the luma block and an aspect ratio of the chroma block,
wherein, when the prediction mode of the chroma block is the DM mode, deriving the chroma intra prediction mode comprises:
determining a luma prediction direction based on the luma intra prediction mode, and the aspect ratio of the luma block; and
determining the chroma intra prediction mode based on the luma prediction direction, and the aspect ratio of the chroma block,
wherein, when at least one chroma reference sample in a chroma prediction direction indicated by the chroma intra prediction mode is unavailable, the chroma intra prediction mode is set to an intra prediction mode that is close to the chroma intra prediction mode and has a direction pointing to available chroma reference samples.
2 . The method of claim 1 , wherein the luma prediction direction is determined by adding a first predetermined value to the luma intra prediction mode when the horizontal length of the luma block is longer than the vertical length of the luma block, and the luma intra prediction mode is included in a first predetermined range.
3 . The method of claim 1 , wherein the luma prediction direction is determined by subtracting a second predetermined value from the luma intra prediction mode when the horizontal length of the luma block is shorter than the vertical length of the luma block, and the luma intra prediction mode is included in a second predetermined range.
4 . An intra prediction method performed by a video encoding apparatus, the method comprising:
determining that a prediction mode of a chroma block is a DM mode;
obtaining a luma intra prediction mode, wherein the luma intra prediction mode represents an intra prediction mode of a luma block spatially corresponding to the chroma block; and
deriving a chroma intra prediction mode, for the chroma block from the luma intra prediction mode, by modifying the luma intra prediction mode based on an aspect ratio of the luma block and an aspect ratio of the chroma block,
wherein deriving the chroma intra prediction mode comprises:
determining a luma prediction direction based on the luma intra prediction mode, and the aspect ratio of the luma block; and
determining the chroma intra prediction mode based on the luma prediction direction, and the aspect ratio of the chroma block,
wherein, when at least one chroma reference sample in a chroma prediction direction indicated by the chroma intra prediction mode is unavailable, the chroma intra prediction mode is set to an intra prediction mode that is close to the chroma intra prediction mode and has a direction pointing to available chroma reference samples.
5 . A method for providing a video decoding apparatus with video data, the method comprising:
encoding the video data into a bitstream; and
transmitting the bitstream to the video decoding apparatus,
wherein encoding the video data comprises:
determining that a prediction mode of a chroma block is a DM mode;
obtaining a luma intra prediction mode, wherein the luma intra prediction mode represents an intra prediction mode of a luma block spatially corresponding to the chroma block; and
generating a chroma intra prediction mode for the chroma block from a luma prediction mode, by modifying the luma intra prediction mode based on an aspect ratio of the luma block and an aspect ratio of the chroma block,
wherein deriving the chroma intra prediction mode comprises:
determining a luma prediction direction based on the luma intra prediction mode, and the aspect ratio of the luma block; and
determining the chroma intra prediction mode based on the luma prediction direction, and the aspect ratio of the chroma block,
wherein, when at least one chroma reference sample in a chroma prediction direction indicated by the chroma intra prediction mode is unavailable, the chroma intra prediction mode is set to an intra prediction mode that is close to the chroma intra prediction mode and has a direction pointing to available chroma reference samples.