# US 2021/0084328 A1 · Skipping refinement based on patch similarity in bilinear interpolation based decoder-side motion vector refinement

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0084328 A1
- Document ID: US20210084328A1
- Status: Published application
- Kind: A1
- Application number: 17/103,822
- Filed: 2020-11-24
- Published: 2021-03-18
- Earliest claimed: 2018-09-19
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Sriram SETHURAMAN; Jeeva Raj A
- Web page: https://patentgrep.com/patent/US20210084328A1

## CPC

- H04N 19/137: Motion inside a coding unit, e.g. average field, frame or block difference
- H04N 19/557: Motion estimation characterised by stopping computation or iteration based on certain criteria, e.g. error magnitude being too large or early exit
- G06T 3/4007: based on interpolation, e.g. bilinear interpolation (image demosaicing G06T3/4015; edge-driven or edge-based scaling G06T3/403)
- H04N 19/105: Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/513: Processing of motion vectors
- H04N 19/521: {for estimating the reliability of the determined motion vectors or motion vector field, e.g. for smoothing the motion vector field or for correcting motion vectors}
- H04N 19/53: Multi-resolution motion estimation; Hierarchical motion estimation
- H04N 19/573: Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
- H04N 19/523: with sub-pixel accuracy
- H04N 19/577: Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Methods and apparatuses of determining an alignment level between motion compensated reference patches for reducing motion vector refinement steps are provided. According to one method, obtaining, by a decoder, motion compensated interpolated samples based on sub-pixel accurate merge motion vectors from a bilinear motion compensated interpolation; computing, by the decoder, a sum of absolute differences (SAD) between two motion compensated reference patches using a subset of the motion compensated interpolated samples; determining, by the decoder, whether the SAD is less than a coding unit (CU) size-dependent threshold value; when the SAD is less than the CU size-dependent threshold value: skipping remaining decoder-side motion vector refinement (DMVR) process steps; and performing final motion compensation; and when the SAD is not less than the CU size-dependent threshold value: performing the remaining DMVR process steps; and performing the final motion compensation.

## Claims

### Claim 1

A method of motion compensation for a block of a frame in a video with a decoder-side motion vector refinement (DMVR) process comprising:
obtaining, by a decoder, motion compensated interpolated samples in two reference frames of the block based on sub-pixel accurate merge motion vectors of the block for the two reference frames via a bilinear motion compensated interpolation;
computing, by the decoder, a sum of absolute differences (SAD) between two motion compensated reference patches using a subset of the motion compensated interpolated samples;
determining, by the decoder, whether the SAD is less than a coding unit (CU) size-dependent threshold value, the CU threshold value depending on a size of the CU;
when the SAD is less than the CU size-dependent threshold value:
skipping remaining steps of the DMVR process for the block; and
performing final motion compensation using the sub-pixel accurate merge motion vectors of the block to obtain reconstructed samples for the block; and
when the SAD is not less than the CU size-dependent threshold value:
performing the remaining steps of the DMVR process to determine refined motion vectors for the block; and
performing the final motion compensation using the refined motion vectors to obtain the reconstructed samples for the block.

### Claim 2 (depends on 1)

The method of claim 1, wherein the subset of the motion compensated interpolated samples are generated based on unrounded merge motion vectors associated with the two motion compensated reference patches.

### Claim 3 (depends on 1)

The method of claim 1, wherein the bilinear motion compensated interpolation for generating the motion compensated interpolated samples in the two reference frames are performed in parallel.

### Claim 4 (depends on 1)

The method of claim 1, wherein the motion compensated interpolated samples are generated in an interleaved manner.

### Claim 5 (depends on 1)

The method of claim 1, wherein the subset of the motion compensated interpolated samples comprises a block of samples having a dimension equal to a dimension of a coding unit (CU).

### Claim 6 (depends on 5)

The method of claim 5, wherein the subset of the motion compensated interpolated samples comprises (CU_width−2)*(CU-height−2) samples, wherein CU_width is a width of the coding unit and CU-height is a height of the coding unit.

### Claim 7 (depends on 5)

The method of claim 5, wherein the subset of the motion compensated interpolated samples comprises (CU_width*CU_height−(CU_width−2)*(CU-height−2)) samples, wherein CU_width is a width of the coding unit and CU-height is a height of the coding unit.

### Claim 8 (depends on 1)

The method of claim 1, wherein the CU size-dependent threshold value is a function of a number of samples in the subset of motion compensated interpolated samples.

### Claim 9

A method of inter prediction for a current block of a frame in a video, comprising:
obtaining a first motion compensated reference patch and a second motion compensated reference patch based on initial motion vectors obtained through a merge mode of the current block;
computing a patch difference value between the first motion compensated reference patch and the second motion compensated reference patch;
obtaining a prediction value of the current block based on the initial motion vectors in the event that the patch difference value is less than a threshold, wherein the threshold is determined based on a size of the current block; and
in the event that the patch difference value is greater than or equal to the threshold, refining the initial motion vectors to generate refined motion vectors, and obtaining the perdition value of the current block based on the refined motion vectors.

### Claim 10 (depends on 9)

The method of claim 9, wherein the initial motion vectors are derived from motion vectors of a neighboring block of the current block.

### Claim 11 (depends on 9)

The method of claim 9, wherein the initial motion vectors comprises a first motion vector and a second motion vector, wherein the first motion compensated reference patch is obtained according to the first motion vector, and the second motion compensated reference patch is obtained according to the second motion vector.

### Claim 12 (depends on 9)

The method of claim 9, wherein the patch difference value is a sum of absolute differences (SAD) value or a mean-reduced SAD value.

### Claim 13 (depends on 9)

The method of claim 9, wherein computing the patch difference value between the first motion compensated reference patch and the second motion compensated reference patch comprises:
computing the patch difference value between a subset samples of the first motion compensated reference patch and a corresponding subset samples of the second motion compensated reference patch.

### Claim 14 (depends on 9)

The method of claim 9, further comprising, before performing the comparison based on the patch difference value and the threshold,
adjusting the threshold, after determining the threshold according to the size of the current block, based on bit depth of samples of the first motion compensated reference patch and the second motion compensated reference patch.

### Claim 15 (depends on 9)

The method of claim 9, further comprising: in the event that the patch difference value is less than the threshold, before obtaining the prediction value of the current block based on the initial motion vectors,
determining that a decoder-side motion vector refinement (DMVR) is skipped.

### Claim 16

An inter prediction apparatus, comprising:
a non-transitory memory having processor-executable instructions stored thereon; and
a processor, coupled to the memory, configured to execute the processor-executable instructions to perform operations comprising:
obtaining a first motion compensated reference patch and a second motion compensated reference patch based on initial motion vectors obtained through a merge mode of a current block of a frame in a video;
computing a patch difference value between the first motion compensated reference patch and the second motion compensated reference patch;
obtaining a prediction value of the current block based on the initial motion vectors in the event that the patch difference value is less than a threshold, wherein the threshold is determined based on a size of the current block; and
in the event that the patch difference value is greater than or equal to the threshold, refining the initial motion vectors to generate refined motion vectors, and obtaining the perdition value of the current block based on the refined motion vectors.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the initial motion vectors are derived from motion vectors of a neighboring block of the current block.

### Claim 18 (depends on 16)

The apparatus of claim 16, wherein the initial motion vectors comprises a first motion vector and a second motion vector, wherein the first motion compensated reference patch is obtained according to the first motion vector, and the second motion compensated reference patch is obtained according to the second motion vector.

### Claim 19 (depends on 16)

The apparatus of claim 16, wherein the patch difference value is a sum of absolute differences (SAD) value or a mean-reduced SAD value.

### Claim 20 (depends on 16)

The apparatus of claim 16, wherein computing the patch difference value between the first motion compensated reference patch and the second motion compensated reference patch comprises:
computing the patch difference value between a subset samples of the first motion compensated reference patch and a corresponding subset samples of the second motion compensated reference patch.
