Method and apparatus for processing video signal
The present invention is related to processing a video signal. A method for decoding a video according to the present invention may comprise checking a merge coding unit which is generated by merging a plurality of coding units neighboring each other based on an encoded syntax element, and decoding the checked merge coding unit, wherein a same motion vector is shared in the merge coding unit.
1. A method of decoding a video, the method comprising:
performing inter-prediction for a current coding block based on motion information thereof,
determining, based on a first flag of 1-bit, whether to divide the current coding block into two partitions or not;
when it is determined to divide the current coding block, determining, based on a second flag of 1-bit, whether to divide the current coding block symmetrically or asymmetrically; and
determining, based on a third flag of 1-bit, whether to divide the current coding block in a horizontal direction or a vertical direction,
wherein when it is determined to divide the current coding block asymmetrically, the current coding block is partitioned into a first partition that has a ¾ size of the current coding block and a second partition that has a ¼ size of the current coding block, and
wherein locations of the first partition and the second partition in the current coding block are determined based on a fourth flag of 1-bit.
2. The method of claim 1 , wherein when it is determined to divide the current coding block in the horizontal direction, based on the fourth flag, it is determined whether the first partition is located at an upper side or a bottom side of the current coding block, and
wherein when it is determined to divide the current coding block in the vertical direction, based on the fourth flag, it is determined whether the first partition is located at a left side or a right side of the current coding block.
3. The method of claim 1 , wherein when it is determined to divide the current coding block into the two partitions, decoding a transform skip flag specifying whether an inverse-transform is skipped or not is omitted.
4. The method of claim 3 , wherein when decoding the transform skip flag is omitted, skipping the inverse-transform for the first partition or the second partition is not allowed.
5. A method of encoding a video, the method comprising:
performing inter-prediction for a current coding block based on motion information thereof,
encoding a first flag of 1-bit specifying whether the current coding block is divided into two partitions or not;
when the current coding block is divided into two partitions, encoding a second flag of 1-bit specifying whether the current coding block is divided symmetrically or asymmetrically; and
encoding a third flag of 1-bit specifying whether the current coding block is divided in a horizontal direction or a vertical direction,
wherein when the current coding block is divided asymmetrically, the current coding block is partitioned into a first partition that has a ¾ size of the current coding block and a second partition that has a ¼ size of the current coding block, and
wherein a fourth flag of 1-bit which is used to determine locations of the first partition and the second partition in the current coding block is further encoded.
6. The method of claim 5 , wherein when the current coding block is divided in the horizontal direction, the fourth flag is used to determine whether the first partition is located at an upper side or a bottom side of the current coding block, and
wherein when the current coding block is divided in the vertical direction, the fourth flag is used to determine whether the first partition is located at a left side or a right side of the current coding block.
7. The method of claim 5 , wherein when the current coding block is divided into the two partitions, encoding a transform skip flag specifying whether a transform is skipped or not is omitted.
8. The method of claim 7 , wherein when encoding the transform skip flag is omitted, skipping the transform for the first partition or the second partition is not allowed.
9. 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 being encoded by an encoding method which comprising:
performing inter-prediction for a current coding block based on motion information thereof,
encoding a first flag of 1-bit specifying whether the current coding block is divided into two partitions or not;
when the current coding block is divided into two partitions, encoding a second flag of 1-bit specifying whether the current coding block is divided symmetrically or asymmetrically; and
encoding a third flag of 1-bit specifying whether the current coding block is divided in a horizontal direction or a vertical direction,
wherein when the current coding block is divided asymmetrically, the current coding block is partitioned into a first partition that has a ¾ size of the current coding block and a second partition that has a ¼ size of the current coding block, and
wherein a fourth flag of 1-bit which is used to determine locations of the first partition and the second partition in the current coding block is further encoded.