Method and apparatus for processing video signal
A method for decoding a video according to the present invention may comprise: determining a first prediction mode for a first sub-block in a current block and a second intra prediction mode for a second sub-block, performing a first prediction for the first sub-block based on the first intra prediction mode, performing a second prediction for the second sub-block based on the second intra prediction mode, and obtaining a prediction sample of the current block according to a result of the first prediction and the second prediction.
1. A method of decoding an image signal with a decoding apparatus, comprising:
determining, with the decoding apparatus, based on an intra prediction mode of a current block, first reference samples from neighboring samples adjacent to the current block, the neighboring samples referring to samples reconstructed before the current block;
obtaining, with the decoding apparatus, a first prediction sample of the current block based on the first reference samples;
determining, with the decoding apparatus, a second reference sample from the neighboring samples; and
obtaining, with the decoding apparatus, a second prediction sample of the current block by applying predetermined weights to the first prediction sample and the second reference sample, the weights being determined based on a position of the first prediction sample,
wherein the first reference samples are determined from a first neighboring sample group and the second reference sample is determined from a second neighboring sample group,
wherein a boundary of the current block to which samples, which belong to the first neighboring sample group, are adjacent is different from a boundary of the current block to which samples, which belong to the second neighboring sample group, are adjacent, and
wherein the first prediction sample is obtained by interpolating the first reference samples while only one, representing the second reference sample, of the samples which belong to the second neighboring sample group is used for obtaining the second prediction sample.
2. The method of claim 1 , wherein the method further comprises:
determining, with the decoding apparatus, based on at least one of the intra prediction mode of the current block or a size of a transform block relating to the current block, whether to apply a smooth filter on the neighboring samples,
wherein, depending on the determination, the first prediction sample is obtained by interpolating filtered or un-filtered first reference samples,
wherein the smooth filter is applied to the neighboring samples only when the intra prediction mode of the current block is set equal to one of pre-defined intra prediction modes in the decoding apparatus, and
wherein at least one of an DC mode, a vertical mode, or a horizontal mode is excluded from the pre-defined intra prediction modes.
3. The method of claim 2 , wherein the smooth filter is applied to the neighboring samples only when a number of total samples belonging to the transform block is greater than a pre-defined threshold value in the decoding apparatus.
4. The method of claim 3 , wherein the pre-defined threshold value is 32.
5. The method of claim 1 , wherein the first reference samples are located toward a forward direction on an angular line according to the intra prediction mode of the current block, and
wherein the second reference sample is located toward an opposite direction on the angular line according to the intra prediction mode of the current block.
6. The method of claim 1 , wherein the predetermined weights are determined further based on at least one a size of the current block or the intra prediction mode of the current block.
7. The method of claim 1 , wherein whether it is allowed to obtain the second prediction sample from the first prediction sample is determined based on both a directionality of the intra prediction mode of the current block and a size of the current block.
8. The method of claim 1 , wherein when the first prediction sample is included in a first region in the current block, the second prediction sample, obtained by modifying the first prediction sample with the second reference sample, is output as a final prediction sample, and
wherein when the first prediction sample is included in a second region in the current block, the final prediction sample is derived to be the same as the first prediction sample.
9. A method of encoding an image signal with an encoding apparatus, comprising:
determining, with the encoding apparatus, based on an intra prediction mode of a current block, first reference samples from neighboring samples adjacent to the current block, the neighboring samples referring to samples reconstructed before the current block;
obtaining, with the encoding apparatus, a first prediction sample of the current block based on the first reference samples;
determining, with the encoding apparatus, a second reference sample from the neighboring samples; and
obtaining, with the encoding apparatus, a second prediction sample of the current block by applying predetermined weights to the first prediction sample and the second reference sample, the weights being determined based on a position of the first prediction sample,
wherein the first reference samples are determined from a first neighboring sample group and the second reference sample is determined from a second neighboring sample group,
wherein a boundary of the current block to which samples, which belong to the first neighboring sample group, are adjacent is different from a boundary of the current block to which samples, which belong to the second neighboring sample group, are adjacent, and
wherein the first prediction sample is obtained by interpolating the first reference samples while only one, representing the second reference sample, of the samples which belong to the second neighboring sample group is used for obtaining the second prediction sample.
10. A non-transitory computer-readable medium for storing a compressed image signal, comprising:
a data stream including the compressed image signal,
wherein the first reference samples adjacent to a current block are determined, based on an intra prediction mode of the current block,
wherein a first prediction sample of the current block is obtained based on the first reference samples,
wherein a second prediction sample of the current block is obtained by applying predetermined weights to the first prediction sample and a second reference sample, the weights being determined based on a position of the first prediction sample,
wherein the first reference samples are determined from a first neighboring sample group and the second reference sample is determined from a second neighboring sample group,
wherein a boundary of the current block to which samples, which belong to the first neighboring sample group, are adjacent is different from a boundary of the current block to which samples, which belong to the second neighboring sample group, are adjacent, and
wherein the first prediction sample is obtained by interpolating the first reference samples while only one, representing the second reference sample, of the samples which belong to the second neighboring sample group is used for obtaining the second prediction sample.