Image encoding/decoding method and apparatus for performing reference sample filtering on basis of intra prediction mode, and method for transmitting bitstream
Provided are an image encoding/decoding method and apparatus. An image decoding method performed by an image decoding apparatus may comprise determining an intra prediction mode of a current block, performing planar intra prediction based on the intra prediction mode being a planar prediction mode and obtaining a reconstructed sample of the current block based on a prediction sample obtained based on the planar intra prediction. The performing the planar intra prediction may comprise applying filtering to an intra prediction reference sample of the current block.
1 . An image decoding method performed by an image decoding apparatus, the image decoding method comprising:
determining an intra prediction mode of a current block;
performing planar intra prediction based on the intra prediction mode being a planar prediction mode; and
obtaining a reconstructed sample of the current block based on a prediction sample obtained based on the planar intra prediction,
wherein the performing the planar intra prediction comprises applying filtering to an intra prediction reference sample of the current block,
wherein the filtering is applied to the intra prediction reference sample of the current block only based on the intra prediction mode of the current block being the planar prediction mode.
2 . The image decoding method of claim 1 , wherein the filtering is performed by adaptively selecting one from a plurality of filters including a first filter or a second filter.
3 . The image decoding method of claim 2 , wherein the selected one filter is selected based on the number of intra prediction reference samples.
4 . The image decoding method of claim 3 , wherein the number of intra prediction reference samples is determined based on a size of the current block.
5 . The image decoding method of claim 4 , wherein the number of intra prediction reference samples is determined based on comparison between the size of the current block and a certain value.
6 . The image decoding method of claim 2 , wherein the first filter is a 3-tap filter and the second filter is a 5-tap filter.
7 . The image decoding method of claim 6 , wherein the 3-tap filter is [1, 2, 1].
8 . The image decoding method of claim 6 , wherein the 5-tap filter is [1, 4, 6, 4, 1].
9 . The image decoding method of claim 1 , wherein the applying of the filtering is determined based on at least one of whether to apply decoder side intra mode derivation (DIMD) or whether to apply combined inter intra prediction (CIIP).
10 . The image decoding method of claim 1 , wherein the filtering is applied regardless of a size of the current block.
11 . The image decoding method of claim 1 , wherein the filtering is applied regardless of a color component of the current block.
12 . The image decoding method of claim 1 , wherein the filtering is performed based on a [1, 2, 1] filter, and is performed based on at least one of a size of the current block, a color component of the current block or whether to apply intra subpartition (ISP).
13 . An image encoding method performed by an image encoding apparatus, the image encoding method comprising:
determining an intra prediction mode of a current block;
performing planar intra prediction based on the intra prediction mode being a planar prediction mode; and
obtaining a reconstructed sample of the current block based on a prediction sample obtained from the planar intra prediction,
wherein the performing the planar intra prediction comprises applying filtering to an intra prediction reference sample of the current block,
wherein the filtering is applied to the intra prediction reference sample of the current block only based on the intra prediction mode of the current block being the planar prediction mode.
14 . A method of transmitting a bitstream generated by an image encoding method, the image encoding method comprising:
determining an intra prediction mode of a current block;
performing planar intra prediction based on the intra prediction mode being a planar prediction mode; and
obtaining a reconstructed sample of the current block based on a prediction sample obtained from the planar intra prediction,
wherein the performing the planar intra prediction comprises applying filtering to an intra prediction reference sample of the current block,
wherein the filtering is applied to the intra prediction reference sample of the current block only based on the intra prediction mode of the current block being the planar prediction mode.