Method and apparatus for processing video signal
A method for decoding a video according to the present invention may comprise: deriving a plurality of reference sample lines for a current block, selecting at least one among the plurality of reference sample lines, determining whether to apply an intra filter to a reference sample included in the selected reference sample line, selectively applying the intra filter to the reference sample according to the determination, and performing intra prediction for the current block using the reference sample.
1. A method of decoding a video, the method comprising:
selecting a reference sample line of a current block among a plurality of reference sample lines; and
performing intra prediction for the current block based on the selected reference sample line and an intra prediction mode of the current block,
wherein a prediction sample of the current block is obtained by applying a filter to reference samples included in the selected reference sample line, and
wherein a type of the filter is determined based on a distance between the current block and the selected reference sample line.
2. The method of claim 1 , wherein when the selected reference sample line is adjacent to the current block, a first type filter is used for filtering the reference samples, and
wherein when the selected reference sample line is not adjacent to the current block, a second type filter is used for filtering the reference samples.
3. The method of claim 1 , wherein the first type filter and the second type filter have a same filter tap number but have different filter coefficients.
4. A method of encoding a video, the method comprising:
selecting a reference sample line of a current block among a plurality of reference sample lines; and
performing intra prediction for the current block based on the selected reference sample line and an intra prediction mode of the current block,
wherein a prediction sample of the current block is obtained by applying a filter to reference samples included in the selected reference sample line, and
wherein a type of the filter is determined based on a distance between the current block and the selected reference sample line.
5. A non-transitory computer-readable medium for storing compressed data associated with a video signal, the compressed data comprising:
index information for selecting a reference sample line of a current block among a plurality of reference sample lines,
wherein intra prediction for the current block is performed based on the reference sample line selected by the index information and an intra prediction mode of the current block,
wherein a prediction sample of the current block is obtained by applying a filter to reference samples included in the selected reference sample line, and
wherein a type of the filter is determined based on a distance between the current block and the selected reference sample line.