Video signal encoding/decoding method and device therefor
A video decoding method according to the present invention may comprise: a step for determining whether to divide a current block into a plurality of sub-blocks; a step for determining an intra prediction mode for the current block; and a step for performing intra prediction for each sub-block on the basis of the intra prediction mode, when the current block is divided into the plurality of sub-blocks.
1. A method for decoding video data, the method comprising:
determining whether to partition a current block into a plurality of sub-blocks;
determining an intra-prediction mode for the current block; and
when the current block is partitioned into the plurality of sub-blocks, performing intra-prediction on each of the sub-blocks, based on the intra-prediction mode,
wherein whether to partition the current block into the plurality of sub-blocks is determined based on a flag,
wherein when a size of the current block is smaller than a threshold, parsing of the flag from a bitstream is omitted, and
wherein when the parsing of the flag is omitted, the flag is considered to indicate that the current block is not partitioned into the plurality of sub-blocks.
2. The method of claim 1 , wherein the method further comprises determining a reference sample line of the current block,
wherein when an index of a determined reference sample line is greater than a threshold, the parsing of the flag from the bitstream is omitted.
3. The method of claim 1 , wherein a number of the sub-blocks included in the current block is determined based on at least one of a size or a shape of the current block.
4. The method of claim 1 , wherein the method further comprises performing first inverse transform on the current block,
wherein the first inverse transform is performed based on one among at least one transform core candidate, and
wherein a number of transform core candidates varies depending on whether the current block has been partitioned into the plurality of sub-blocks.
5. The method of claim 4 , wherein the method further comprises performing second inverse transform on the current block, and
wherein when the second inverse transform is performed, the transform core is set to DCT2.
6. The method of claim 5 , wherein a transform coefficient of a region in the current block on which the second inverse transform is not performed is 0.
7. The method of claim 5 , wherein whether to perform the second inverse transform is determined based on a position of a last transform coefficient in the current block.
8. A method for encoding video data, the method comprising:
determining whether to partition a current block into a plurality of sub-blocks;
determining an intra-prediction mode for the current block; and
when the current block is partitioned into the plurality of sub-blocks, performing intra-prediction on each of the sub-blocks, based on the intra-prediction mode,
wherein whether to encode a flag indicating whether to partition the current block into the plurality of sub-blocks into a bitstream is determined based on whether a size of the current block is smaller than a threshold, and
wherein when the size of the current block is smaller than the threshold, the encoding of the flag is omitted and it is determined that the current block is not partitioned into the plurality of sub-blocks.
9. The method of claim 8 , wherein the method further comprises determining a reference sample line of the current block, and
wherein when an index of the determined reference sample line is greater than a threshold, the encoding of the flag is omitted.
10. The method of claim 8 , wherein a number of the sub-blocks included in the current block is determined based on at least one of a size or a shape of the current block.
11. The method of claim 8 , wherein the method further comprises performing first transform on the current block,
wherein the first transform is performed based on one among at least one transform core candidate, and
wherein a number of transform core candidates varies depending on whether the current block has been partitioned into the plurality of sub-blocks.
12. The method of claim 11 , wherein the method further comprises performing second transform on the current block, and
wherein when the second transform is performed, the transform core is set to DCT2.
13. The method of claim 12 , wherein a transform coefficient of a region in the current block in which the second transform is not performed is 0.
14. The method of claim 12 , wherein whether to perform the second transform is determined based on a position of a last transform coefficient in the current block.
15. A device for decoding video data, the device comprising an intra-prediction unit configured to:
determine whether to partition a current block into a plurality of sub-blocks;
determine an intra-prediction mode for the current block; and
when the current block is partitioned into the plurality of sub-blocks, perform intra-prediction on each of the sub-blocks, based on the intra-prediction mode,
wherein whether to partition the current block into the plurality of sub-blocks is determined based on a flag,
wherein when a size of the current block is smaller than a threshold, parsing of the flag from a bitstream is omitted, and
wherein when the parsing of the flag is omitted, the flag is considered to indicate that the current block is not partitioned into the plurality of sub-blocks.