Method for encoding/decoding video signal and device therefor
Abstract
A video decoding method, according to the present invention, comprises the steps of: deriving an L0 motion vector and an L1 motion vector of a current block; deriving an L0 prediction sample and an L1 prediction sample for a first position inside the current block on the basis of the L0 motion vector and the L1 motion vector; determining whether to apply a bidirectional optical flow to the current block; deriving a refined motion vector for a subblock which comprises the first position, when it is determined to apply the bidirectional optical flow; deriving a refined prediction sample for the first position on the basis of the refined motion vector; and obtaining a prediction sample for the first position by using the L0 prediction sample, the L1 prediction sample, and the refined prediction sample.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method of decoding a video, the method comprising:
deriving an L0 motion vector and an L1 motion vector of a current block; deriving an L0 prediction sample and an L1 prediction sample for a first position in the current block based on the L0 motion vector and the L1 motion vector; determining whether a bidirectional optical flow is applied to the current block or not; deriving a refine motion vector for a sub-block including the first position when it is determined to apply the bidirectional optical flow; deriving a refine prediction sample for the first position based on the refine motion vector; and obtaining a prediction sample for the first position by using the L0 prediction sample, the L1 prediction sample and the refine prediction sample.
2 . The method of claim 1 , wherein whether the bidirectional optical flow is applied to the current block or not is determined based on whether a combined prediction method is applied to the current block or not, the combined prediction method representing a prediction method that intra prediction and inter prediction are combined, and
wherein the BDOF encoding method is allowed when the combined prediction method is not applied to the current block.
3 . The method of claim 1 , wherein the refine prediction sample is derived based on a first difference between an L1 horizontal directional gradient and an L0 horizontal directional gradient and a second difference between an L1 vertical directional gradient and an L0 vertical directional gradient for the first position.
4 . The method of claim 1 , wherein whether the bidirectional optical flow is applied to the current block or not is determined based on at least one of a direction or an output order of an L0 reference picture and an L1 reference picture of the current block.
5 . The method of claim 1 , wherein whether the bidirectional optical flow is applied to the current block or not is determined based on whether at least one of a width or a height of the current block is equal to or greater than a threshold value.
6 . A method of encoding a video, the method comprising:
deriving an L0 motion vector and an L1 motion vector of a current block; deriving an L0 prediction sample and an L1 prediction sample for a first position in the current block based on the L0 motion vector and the L1 motion vector; determining whether a bidirectional optical flow is applied to the current block or not; deriving a refine motion vector for a sub-block including the first position when it is determined to apply the bidirectional optical flow; deriving a refine prediction sample for the first position based on the refine motion vector; and obtaining a prediction sample for the first position by using the L0 prediction sample, the L1 prediction sample and the refine prediction sample.
7 . The method of claim 6 , wherein whether the bidirectional optical flow is applied to the current block or not is determined based on whether a combined prediction method is applied to the current block or not, the combined prediction method representing a prediction method that intra prediction and inter prediction are combined; and
wherein the BDOF encoding method is allowed when the combined prediction method is not applied to the current block.
8 . The method of claim 6 , wherein the refine prediction sample is derived based on a first difference between an L1 horizontal directional gradient and an L0 horizontal directional gradient and a second difference between an L1 vertical directional gradient and an L0 vertical directional gradient for the first position.
9 . The method of claim 6 , wherein whether the bidirectional optical flow is applied to the current block or not is determined based on at least one of a direction or an output order of an L0 reference picture and an L1 reference picture of the current block.
10 . The method of claim 6 , wherein whether the bidirectional optical flow is applied to the current block or not is determined based on whether at least one of a width or a height of the current block is equal to or greater than a threshold value.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.