Overlapped decoder side motion refinement
Methods and apparatus for encoding or decoding a first structure within a picture in a video sequence are provided. The method comprises, for a second structure within the first structure, determining an initial motion vector, MV, and MV candidates. The method comprises, for each of the MV candidates, using the MV candidate to derive first and second reference blocks, and a size of the first and second reference blocks may not be equal to a size of the second structure. The method comprises deriving a cost value based on samples from the first and second reference blocks. The method comprises using the cost values from the MV candidates to derive a best MV candidate and using the best MV candidate to derive prediction samples for the second structure.
1 . A method for encoding or decoding a block within a picture in a video sequence, the method comprising:
for a subblock of the block, determining an initial motion vector (MV) and MV candidates;
for each of the MV candidates:
using the MV candidate to derive a first reference block and a second reference block, wherein a size of the first and second reference blocks is not equal to a size of the subblock of the block, and the first reference block for the subblock of the block touches but does not overlap a first reference block for another subblock of the block; and
deriving a cost value based on samples from the first and second reference blocks;
using the cost values from the MV candidates to derive a best MV candidate;
using the best MV candidate to derive prediction samples for the subblock of the block; and
splitting the block into n subblocks, wherein n is greater than or equal to 1, and an accumulated number of samples of the n subblocks is equal to the number of samples of the block.
2 . The method of claim 1 , wherein a height of the first and second reference blocks is greater than a height of the subblock of the block, and/or a width of the first and second reference blocks is greater than a width of the subblock of the block.
3 . The method of claim 1 , wherein the second reference block for the subblock of the block touches but does not overlap a second reference block for the other subblock of the block.
4 . The method of claim 1 , wherein:
using the MV candidate to derive the first and second reference blocks comprises, for each of the first and second reference blocks, deriving first and second groups of reference samples based on the MV candidate;
the first group of reference samples is a block of reference samples having a width and a height equal to a width and a height, respectively, of the subblock of the block; and
the second group of reference samples includes the reference samples of the reference block that are not in the first group of reference samples.
5 . The method of claim 4 , wherein deriving the first and second groups of reference samples based on the MV candidate comprises using a first interpolation filter to derive the first group of reference samples and using a second interpolation filter to derive the second group of reference samples, and the first interpolation filter is longer than the second interpolation filter.
6 . The method of claim 4 , wherein the cost value is derived as a sum of difference values between reference samples of the first and second reference blocks, and the difference values include (a) difference values between a subset of the first group of reference samples of the first reference block and a subset of the first group of reference samples of the second reference block and/or (b) difference values between a subset of the second group of reference samples of the first reference block and a subset of the second group of reference samples of the second reference block.
7 . The method of claim 4 , wherein:
the reference block includes P samples between a top boundary of the first group of reference samples and a top boundary of the reference block, Q samples between a bottom boundary of the first group of reference samples and a bottom boundary of the reference block, X samples between a left boundary of the first group of reference samples and a left boundary of the reference block, and Y samples between a right boundary of the first group of reference samples and a right boundary of the reference block;
P, Q, X, and Y are numbers;
at least one of P, Q, X, and Y is a non-zero number; and
P, Q, X, and Y are greater than or equal to a threshold T that depends on a maximum MV difference in x or y component between the initial MV and the MV candidates.
8 . The method of claim 7 , wherein the threshold T is greater than the maximum MV difference.
9 . The method of claim 7 , wherein the threshold T is equal to two times the maximum MV difference.
10 . The method of claim 7 , wherein the threshold T is equal to the maximum MV difference.
11 . The method of claim 7 , wherein one or more of P, Q, X, and Y corresponds to a side of the subblock of the block that is at a boundary of the block and is larger than another of P, Q, X, and Y that does not correspond to a side of the subblock of the block that is at a boundary of the block.
12 . A non-transitory computer readable storage medium containing a computer program comprising instructions that, when executed by an apparatus, cause the apparatus to perform the method of claim 1 .
13 . An apparatus comprising processing circuitry and a storage unit, wherein the apparatus is configured to encode or decode a block within a picture in a video sequence, and the apparatus is configured to, in encoding or decoding the block:
for a subblock of the block, determine an initial motion vector (MV) and MV candidates;
for each of the MV candidates:
use the MV candidate to derive a first reference block and a second reference block, wherein a size of the first and second reference blocks is not equal to a size of the subblock of the block, and the first reference block for the subblock of the block touches but does not overlap a first reference block for another subblock of the block; and
derive a cost value based on samples from the first and second reference blocks;
use the cost values from the MV candidates to derive a best MV candidate;
use the best MV candidate to derive prediction samples for the subblock of the block; and
split the block into n subblocks, wherein n is greater than or equal to 1, and an accumulated number of samples of the n subblocks is equal to the number of samples of the block.
14 . A method for encoding or decoding a block within a picture in a video sequence, the method comprising:
for a subblock of the block, determining an initial motion vector (MV) and MV candidates;
for each of the MV candidates:
using the MV candidate to derive a first reference block and a second reference block, wherein:
a size of the first and second reference blocks is not equal to a size of the subblock of the block;
using the MV candidate to derive the first and second reference blocks comprises, for each of the first and second reference blocks, deriving first and second groups of reference samples based on the MV candidate;
the first group of reference samples is a block of reference samples having a width and a height equal to a width and a height, respectively, of the subblock of the block; and
the second group of reference samples includes the reference samples of the reference block that are not in the first group of reference samples; and
deriving a cost value based on samples from the first and second reference blocks, wherein the cost value is derived as a sum of difference values between reference samples of the first and second reference blocks, difference values between reference samples of the first group of reference samples of the first reference block and reference samples of the first group of reference samples of the second reference block are weighted with a first weighting factor, difference values between reference samples of the second group of reference samples of the first reference block and reference samples of the second group of reference samples of the second reference block are weighted with a second weighting factor, and the second weighting factor is larger than the first weighting factor;
using the cost values from the MV candidates to derive a best MV candidate;
using the best MV candidate to derive prediction samples for the subblock of the block; and
splitting the block into n subblocks, wherein n is greater than or equal to 1, and an accumulated number of samples of the n subblocks is equal to the number of samples of the block.
15 . The method of claim 14 , wherein the first reference block for the subblock of the block touches but does not overlap a first reference block for another subblock of the block.
16 . The method of claim 14 , wherein the first reference block for the subblock of the block overlaps a first reference block of another subblock of the block.
17 . The method of claim 16 , wherein the second reference block for the subblock of the block overlaps a second reference block of the other subblock of the block.
18 . An apparatus comprising processing circuitry and a storage unit, wherein the apparatus is configured to perform the method of claim 14 .
19 . A non-transitory computer readable storage medium containing a computer program comprising instructions that, when executed by an apparatus, cause the apparatus to perform the method of claim 14 .