Intra prediction method and device
An intra prediction method and apparatus are discussed. In an example, an image decoding method can include deriving an intra prediction mode of a current block, deriving neighboring reference samples of the current block, deriving filtered reference samples by performing filtering on the neighboring reference samples, and generating a predicted block based on the filtered reference samples. The neighboring reference samples can be derived based on a substitution process.
1 . An image decoding method performed by a decoding apparatus, the method comprising:
deriving an intra prediction mode of a current block;
deriving neighboring reference samples of the current block;
deriving filtered reference samples by performing filtering on the neighboring reference samples; and
generating a predicted block based on the filtered reference samples,
wherein the neighboring reference samples are derived based on a substitution process,
wherein an unavailable neighboring reference sample is substituted by using a firstly available neighboring reference sample according to a scan order from a position of the unavailable neighboring reference sample,
wherein the filtering is performed based on the intra prediction mode and a size of the current block,
wherein a distance variable is determined based on the intra prediction mode and a threshold value is determined based on the size of the current block,
wherein the filtering is performed based on the distance variable and the threshold value,
wherein for determining the threshold value based on the size of the current block,
wherein a first threshold value is set for a 4×4 block, a second threshold value is set for an 8×8 block, a third threshold value is set for a 16×16 block, a fourth threshold value is set for a 32×32 block, and a fifth threshold value is set for a 64×64 block,
wherein the second threshold value for the 8×8 block is smaller than the first threshold value for the 4×4 block, the third threshold value for the 16×16 block is smaller than the second threshold value for the 8×8 block, the fourth threshold value for the 32×32 block is smaller than the third threshold value for the 16×16 block, and the fifth threshold value for the 64×64 block is not smaller than the fourth threshold value for the 32×32 block,
wherein the second threshold value is greater than a half of the first threshold value, and the third threshold value is smaller than a half of the second threshold value.
2 . The method of claim 1 , wherein the distance variable is determined based on a first difference between a mode number of the intra prediction mode of the current block and a mode number of a vertical directional mode and a second difference between the mode number of the intra prediction mode of the current block and a mode number of a horizontal directional mode.
3 . The method of claim 2 , wherein the distance variable is set equal to a minimum value between an absolute value of the first difference and an absolute value of the second difference.
4 . An image encoding method performed by an encoding apparatus, the method comprising:
determining an intra prediction mode of a current block;
deriving neighboring reference samples of the current block;
deriving filtered reference samples by performing filtering on the neighboring reference samples; and
generating a predicted block based on the filtered reference samples,
wherein the neighboring reference samples are derived based on a substitution process,
wherein an unavailable neighboring reference sample is substituted by using a firstly available neighboring reference sample according to a scan order from a position of the unavailable neighboring reference sample,
wherein the filtering is performed based on the intra prediction mode and a size of the current block,
wherein a distance variable is determined based on the intra prediction mode and a threshold value is determined based on the size of the current block,
wherein the filtering is performed based on the distance variable and the threshold value,
wherein for determining the threshold value based on the size of the current block,
wherein a first threshold value is set for a 4×4 block, a second threshold value is set for an 8×8 block, a third threshold value is set for a 16×16 block, a fourth threshold value is set for a 32×32 block, and a fifth threshold value is set for a 64×64 block,
wherein the second threshold value for the 8×8 block is smaller than the first threshold value for the 4×4 block, the third threshold value for the 16×16 block is smaller than the second threshold value for the 8×8 block, the fourth threshold value for the 32×32 block is smaller than the third threshold value for the 16×16 block, and the fifth threshold value for the 64×64 block is not smaller than the fourth threshold value for the 32×32 block,
wherein the second threshold value is greater than a half of the first threshold value, and the third threshold value is smaller than a half of the second threshold value.
5 . The method of claim 4 , wherein the distance variable is determined based on a first difference between a mode number of the intra prediction mode of the current block and a mode number of a vertical directional mode and a second difference between the mode number of the intra prediction mode of the current block and a mode number of a horizontal directional mode.
6 . The method of claim 5 , wherein the distance variable is set equal to a minimum value between an absolute value of the first difference and an absolute value of the second difference.
7 . A transmission method for image data, the method comprising:
obtaining a bitstream generated based on an image encoding method, wherein the image encoding method comprises determining an intra prediction mode of a current block, deriving neighboring reference samples of the current block, deriving filtered reference samples by performing filtering on the neighboring reference samples, and generating a predicted block based on the filtered reference samples; and
transmitting the image data comprising the bitstream,
wherein the neighboring reference samples are derived based on a substitution process,
wherein an unavailable neighboring reference sample is substituted by using a firstly available neighboring reference sample according to a scan order from a position of the unavailable neighboring reference sample,
wherein the filtering is performed based on the intra prediction mode and a size of the current block,
wherein a distance variable is determined based on the intra prediction mode and a threshold value is determined based on the size of the current block,
wherein the filtering is performed based on the distance variable and the threshold value,
wherein for determining the threshold value based on the size of the current block,
wherein a first threshold value is set for a 4×4 block, a second threshold value is set for an 8×8 block, a third threshold value is set for a 16×16 block, a fourth threshold value is set for a 32×32 block, and a fifth threshold value is set for a 64×64 block,
wherein the second threshold value for the 8×8 block is smaller than the first threshold value for the 4×4 block, the third threshold value for the 16×16 block is smaller than the second threshold value for the 8×8 block, the fourth threshold value for the 32×32 block is smaller than the third threshold value for the 16×16 block, and the fifth threshold value for the 64×64 block is not smaller than the fourth threshold value for the 32×32 block,
wherein the second threshold value is greater than a half of the first threshold value, and the third threshold value is smaller than a half of the second threshold value.
8 . The method of claim 7 , wherein the distance variable is determined based on a first difference between a mode number of the intra prediction mode of the current block and a mode number of a vertical directional mode and a second difference between the mode number of the intra prediction mode of the current block and a mode number of a horizontal directional mode.
9 . The method of claim 8 , wherein the distance variable is set equal to a minimum value between an absolute value of the first difference and an absolute value of the second difference.