Method and apparatus for video signal processing determining reference sample lines for a prediction target sample
According to the present invention, there is provided a method of decoding an image, the method including: determining an intra prediction mode of a current block; determining a reference sample line for a prediction target sample included in the current block; and obtaining a prediction value of the prediction target sample on the basis of the intra prediction mode and the reference sample line.
1. A method of decoding an image, comprising:
determining an index of a reference sample line of a current block in the image based on reference line index information decoded from a bitstream, the reference line index information specifying one of a plurality of reference sample line candidates;
determining an intra prediction mode of the current block;
determining whether intra prediction for the current block is performed in units of sub-blocks;
dividing the current block into a plurality of sub-blocks when it is determined that the intra prediction is performed in units of sub-blocks; and
performing intra prediction for each of the plurality of sub-blocks based on the reference sample line and the intra prediction mode,
wherein, based on the index of the reference line, it is determined whether an MPM (Most Probable Mode) flag is decoded from the bitstream, the MPM flag being decoded from the bitstream in response to the index of the reference sample line being not greater than a pre-defined value,
wherein the plurality of reference sample line candidates comprises a neighboring reference sample line candidate, and two non-neighboring reference sample line candidates, and
wherein performing intra prediction in units of sub-blocks is allowed only when the neighboring reference sample line candidate is selected from the plurality of reference sample line candidates, but is not allowed when any one of two non-neighboring referenced sample line is selected from the plurality of referenced sample line candidates.
2. The method of claim 1 , wherein in response to the reference line index information being less than a pre-defined value, the intra prediction mode of the current block is determined by decoding the MPM flag from the bitstream.
3. The method of claim 1 , wherein the MPM candidate list is constrained not to include a non-directional mode, and
wherein the non-directional mode includes at least one of a DC mode or a Planar mode.
4. The method of claim 1 , wherein a prediction sample of the current block is obtained by interpolating a plurality of reference samples with an interpolation filter,
wherein a type of the interpolation filter is determined as one of a first type and a second type according to whether the current block is divided into the plurality of sub-blocks or not, and
wherein filter coefficients for the first type are different from those of the second type.
5. A method of encoding an image, comprising:
determining an index of a reference sample line of a current block in the image to encode reference line index information into a bitstream, the reference line index information specifying one of a plurality of reference sample line candidates;
determining whether intra prediction for the current block is performed in units of sub-blocks; and
encoding an intra prediction mode of the current block,
wherein in response to a determination of the intra prediction is performed in units of sub-blocks, the current block is divided into a plurality of sub-blocks,
wherein a prediction block for each the plurality of sub-blocks is obtained based on the reference sample line and the intra prediction mode,
wherein, based on the index of the reference sample line, it is determined whether an MPM (Most Probable Mode) flag for the current block is encoded into the bitstream, the MPM flag being encoded into the bitstream in response to the index of the reference sample line being not greater than a pre-defined value,
wherein the plurality of reference sample line candidates comprises a neighboring reference sample line candidate, and two non-neighboring reference sample line candidates, and
wherein performing intra prediction in units of sub-blocks is allowed only when the neighboring reference sample line candidate is selected from the plurality of reference sample line candidates, but is not allowed when any one of two non-neighboring reference sample line is selected from the plurality of reference sample line candidates.
6. A non-transitory computer readable medium for a bitstream generated by an image encoding method, the image encoding method comprising:
determining an index of a reference sample line of a current block in the image to encode reference line index information into a bitstream, the reference line index information specifying one of a plurality of reference sample line candidates;
determining whether intra prediction for the current block is performed in units of sub-blocks; and
encoding an intra prediction mode of the current block,
wherein in response to a determination of the intra prediction is performed in units of sub-blocks, the current block is divided into a plurality of sub-blocks,
wherein a prediction block for each of the plurality of sub-blocks is obtained based on the reference sample line and the intra prediction mode,
wherein, based on the index of the reference sample line, it is determined whether an MPM (Most Probable Mode) flag for the current block is encoded into the bitstream, the MPM flag being encoded into the bitstream in response to the index of the reference sample line being not greater than a pre-defined value,
wherein the plurality of reference sample line candidates comprises a neighboring reference sample line candidate, and two non-neighboring reference sample line candidates, and
wherein performing intra prediction in units of sub-block is allowed only when the neighboring reference sample line candidate is selected from the plurality of reference sample line candidates, but is not allowed when any one of two non-neighboring reference sample line is selected from the plurality of reference sample line candidates.