Method and apparatus for processing video signal
A method for decoding a video according to the present invention may comprise: determining an intra prediction mode of a current block, deriving reference samples from neighboring samples of the current block, obtaining a first prediction sample for the current block, based on the intra prediction mode and the reference samples, determining an offset for the first prediction sample, and obtaining a second prediction sample by applying the offset to the first prediction sample.
1. A method of decoding an image with a decoding apparatus, comprising:
determining, with the decoding apparatus, a candidate list of a current block in the image, the candidate list including a plurality of candidates, the plurality of candidates being determined based on an intra prediction mode of a neighboring block adjacent to the current block;
deriving, with the decoding apparatus, an intra prediction mode of the current block based on the candidate list and index information, the index information specifying one of the plurality of candidates in the candidate list;
deriving, with the decoding apparatus, an extended intra prediction mode based on the intra prediction mode of the current block; and
performing, with the decoding apparatus, intra-prediction on the current block based on the extended intra prediction mode,
wherein the intra prediction mode of the current block corresponds to one of pre-defined intra prediction modes while the extended intra prediction mode does not belong to the pre-defined intra prediction modes,
wherein the extended intra prediction mode has a different angle from directional prediction modes of the pre-defined intra prediction modes, and
wherein whether to derive the extended intra prediction mode is adaptively determined based on a shape of the current block.
2. The method of claim 1 , wherein in response to a case where the shape of the current block is one of square and non-square, the extended intra prediction mode is derived from the intra prediction mode of the current block and the intra-prediction is performed based on reference samples according to the extended intra prediction mode, and
wherein in response to a case where the shape of the current block is the other of square and non-square, the intra-prediction is performed based on reference samples according to the intra prediction mode of the current block without deriving the extended intra prediction mode from the intra prediction mode of the current block.
3. The method of claim 2 , wherein the plurality of candidates includes an intra prediction mode having a value obtained by adding or subtracting a constant value to the intra prediction mode of the neighboring block, and
wherein the constant value is greater than or equal to 2.
4. The method of claim 3 , wherein a maximum number of the candidates included in the candidate list is equal to 3, 4, 5, or 6.
5. A method of encoding an image with an encoding apparatus, comprising:
determining, with the encoding apparatus, a candidate list of a current block in the image, the candidate list including a plurality of candidates, the plurality of candidates being determined based on an intra prediction mode of a neighboring block adjacent to the current block;
determining, with the encoding apparatus, an intra prediction mode of the current block based on the candidate list, index information being encoded to specify the intra prediction mode of the current block among the plurality of candidates in the candidate list;
deriving, with the encoding apparatus, an extended intra prediction mode based on the intra prediction mode of the current block; and
obtaining, with the encoding apparatus, a residual block of the current block based on an original block of the current block and a prediction block of the current block, the prediction block being obtained based on the extended intra prediction mode; and
generating, with the encoding apparatus, a bitstream by encoding the residual block,
wherein the intra prediction mode of the current block corresponds to one of pre-defined intra prediction modes while the extended intra prediction mode does not belong to the pre-defined intra prediction modes,
wherein the extended intra prediction mode has a different angle from directional prediction modes of the pre-defined intra prediction modes, and
wherein whether to derive the extended intra prediction mode is adaptively determined based on a shape of the current block.
6. A non-transitory computer-readable medium for storing data associated with a video signal, comprising:
a data stream stored in the non-transitory computer-readable medium, the data stream comprising index information specifying one of a plurality of candidates included in a candidate list,
wherein the index information is used to determine an intra prediction mode of the current block,
wherein the plurality of candidates is determined based on an intra prediction mode of a neighboring block adjacent to the current block, and
wherein an extended intra prediction mode is derived based on the intra prediction mode of the current block and is used to perform intra-prediction on the current block,
wherein the intra prediction mode of the current block corresponds to one of pre-defined intra prediction modes while the extended intra prediction mode does not belong to the pre-defined intra prediction modes,
wherein the extended intra prediction mode has a different angle from directional prediction modes of the pre-defined intra prediction modes, and
wherein whether to derive the extended intra prediction mode is adaptively determined based on a shape of the current block.