Method for encoding and decoding images, and device using same
According to the present invention, an inter-prediction method includes: receiving mode information on the inter-prediction of a current block; decoding the received mode information; and performing inter-prediction using the decoded mode information. According to the present invention, image compression efficiency may be improved.
1. A video encoding method performed by an encoding apparatus, comprising:
determining an inter prediction mode of a current block as a merge mode;
deriving merge candidates of the current block based on neighboring blocks of the current block;
selecting a merge candidate from the derived merge candidates;
determining a motion information of the current block as to be equal to a motion information of the selected merge candidate;
deriving a prediction sample of the current block based on the motion information of the current block;
generating residual information based on the prediction sample of the current block;
generating mode information of the current block, wherein the mode information includes merge flag information indicating the inter prediction mode for the current block is the merge mode; and
transmitting the mode information and the residual information,
wherein the neighboring blocks includes a left neighboring block, an upper neighboring block, an upper-right corner neighboring block, an upper-left corner neighboring block, a lower-left corner neighboring block of the current block, and a temporal neighboring block of the current block, and
wherein the temporal neighboring block is a block corresponding to the current block and located in a reference picture.
2. The method of claim 1 , wherein the mode information includes residual flag information indicating whether there is the residual information for the current block, and
wherein the residual flag information is transmitted prior to the merge flag information.
3. The method of claim 2 , wherein the merge candidates has the same configuration regardless whether there is the residual information for the current block.
4. The method of claim 2 , wherein the derived motion information is one of L0 motion information for forward prediction, L1 motion information for backward prediction, and Bi motion information for bi prediction.
5. The method of claim 2 , wherein the merge flag information is generated the prior to the residual flag information, and
wherein the residual flag information is generated only when the merge flag information indicates that the inter prediction mode for the current block is the merge mode.
6. The method of claim 1 , wherein the left neighboring block is a bottom-most block among left neighboring blocks adjacent to the left boundary of the current block, and the top neighboring block is a right-most block among upper neighboring blocks adjacent to the upper boundary of the current block.
7. The method of claim 1 , wherein the neighboring blocks further includes a temporal neighboring block which is a block corresponding to the current block and located in a reference picture.
8. A non-transitory computer-readable storage medium storing video information comprising: residual information generated by determining an inter prediction mode of a current block as a merge mode, by deriving merge candidates of the current block based on neighboring blocks of the current block, by selecting a merge candidate from the derived merge candidates, by determining a motion information of the current block as to be equal to a motion information of the selected merge candidate, by deriving a prediction sample of the current block based on the motion information of the current block, by generating the residual information based on the prediction sample of the current block; and mode information including merge flag information indicating the inter prediction mode for the current block is the merge mode, wherein the neighboring blocks includes a left neighboring block, an upper neighboring block, an upper-right corner neighboring block, an upper-left corner neighboring block, a lower-left corner neighboring block of the current block, and a temporal neighboring block of the current block, and wherein the temporal neighboring block is a block corresponding to the current block and located in a reference picture.