Method for encoding/decoding video signal, and apparatus therefor
A method for decoding a video, according to the present invention, may comprise the steps of: generating an intra block copy (IBC) merge candidate list for a current block; selecting any one of IBC merge candidates included in the IBC merge candidate list; deriving a block vector of the current block on the basis of the selected IBC merge candidate; and obtaining a prediction sample of the current block on the basis of the block vector.
1. A method of decoding a video, the method comprising:
decoding a current block according to an intra block copy (IBC) mode, wherein decoding the current block according to the IBC mode comprises:
constructing an IBC merge candidate list for the current block;
selecting one of the IBC merge candidates included in the IBC merge candidate list;
deriving a block vector of the current block based on the selected IBC merge candidate;
obtaining a prediction sample of the current block based on the block vector; and
determining whether to update an IBC motion information table based on the block vector of the current block, wherein when a size of the current block is smaller than a threshold size, the IBC motion information table is not updated based on the block vector of the current block,
wherein the IBC merge candidate list includes an IBC merge candidate derived based on the IBC motion information table,
wherein the IBC motion information table includes an IBC motion information candidate derived from a block to which an IBC mode is applied before the current block, and
wherein a maximum number of the IBC merge candidates that the IBC merge candidate list may include is determined based on information signaled via a sequence parameter set.
2. The method of claim 1 , wherein the block vector derived from the IBC merge candidate is used for a luma component of the current block, and
wherein a block vector for a chrominance component of the current block is derived by scaling the block vector for the luma component of the current block.
3. The method of claim 2 , wherein the scaling is performed based on a variable derived based on a color format between the luma component and the chrominance component.
4. The method of claim 1 ,
wherein, during the construction of the IBC merge candidate list, when a number of IBC merge candidates included in the IBC merge candidate list is less than a threshold number, a first IBC information candidate included in an IBC motion information table is added to the IBC merge candidate list as a new IBC merge candidate,
wherein the method further comprises determining whether to update the IBC motion information table based on the block vector of the current block, and
wherein when a second IBC information candidate identical to the block vector of the current block is already included in the IBC motion information table, the second IBC information candidate is removed from the IBC motion information table and the block vector of the current block is added to the IBC motion information table with a highest index.
5. The method of claim 1 , wherein when a size of the current block is greater than the threshold size, a first IBC information candidate is added to the IBC merge candidate list after adding an IBC merge candidate derived from an available a neighboring block adjacent to the current block, and
wherein when a size of the current block is not greater than the threshold size, the first IBC information candidate is added to the IBC merge candidate list without deriving the IBC merge candidate from the neighboring block adjacent to the current block.
6. A method of encoding a video, the method comprising:
encoding a current block according to an intra block copy (IBC) mode, wherein encoding the current block according to the IBC mode comprises:
constructing an IBC merge candidate list for the current block;
deriving a block vector of the current block;
obtaining a prediction sample of the current block based on the block vector;
encoding index information indicating one of the IBC merge candidates identical to the block vector of the current block; and
determining whether to update an IBC motion information table based on the block vector of the current block, wherein when a size of the current block is smaller than a threshold size, the IBC motion information table is not updated based on the block vector of the current block,
wherein the IBC merge candidate list includes an IBC merge candidate derived based on the IBC motion information table,
wherein the IBC motion information table includes an IBC motion information candidate derived from a block to which an IBC mode is applied before the current block, and
wherein a maximum number of the IBC merge candidates that the IBC merge candidate list may include is determined based on information signaled via a sequence parameter set.
7. The method of claim 6 ,
wherein, during the construction of the IBC merge candidate list, when a number of IBC merge candidates included in the IBC merge candidate list is less than a threshold number, a first IBC information candidate included in an IBC motion information table is added to the IBC merge candidate list as a new IBC merge candidate,
wherein the method further comprises determining whether to update the IBC motion information table based on the block vector of the current block, and
wherein when a second IBC information candidate identical to the block vector of the current block is already included in the IBC motion information table, the second IBC information candidate is removed from the IBC motion information table and the block vector of the current block is added to the IBC motion information table with a highest index.
8. The method of claim 6 , wherein when a size of the current block is greater than the threshold size, a first IBC information candidate is added to the IBC merge candidate list after adding an IBC merge candidate a neighboring block adjacent to the current block and
wherein when a size of the current block is not greater than the threshold size the first IBC information candidate is added to the IBC merge candidate list without deriving the IBC merge candidate from the neighboring block adjacent to the current block.