# US 2022/0286688 A1 · Precision refinement for motion compensation with optical flow

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

- Number: US 2022/0286688 A1
- Document ID: US20220286688A1
- Status: Published application
- Kind: A1
- Application number: 17/619,192
- Filed: 2020-06-18
- Published: 2022-09-08
- Earliest claimed: 2019-06-21
- Assignees: Vid Scale, Inc.
- Applicants: Vid Scale, Inc.
- Inventors: Wei Chen; Yuwen He
- Web page: https://patentgrep.com/patent/US20220286688A1

## CPC

- H04N 19/137: Motion inside a coding unit, e.g. average field, frame or block difference
- 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/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/33: in the spatial domain
- H04N 19/523: with sub-pixel accuracy
- H04N 19/54: using feature points or meshes
- H04N 19/567: Motion estimation based on rate distortion criteria
- H04N 19/577: Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Systems and methods are described for refining motion compensated predictions in block-based video coding. In an example embodiment, motion-compensated prediction is used to generate predicted sample values in a current block of samples. A precision difference value and a motion vector refinement for the current block are signaled in the bitstream. For each sample in the current block, a spatial gradient is calculated at the sample, and a scalar product is calculated between the spatial gradient and the motion vector refinement. The scalar product is scaled (e.g. bit-shifted) by an amount indicated by the precision difference value to generate a sample difference value, and the sample difference value is added to the predicted sample value to generate a refined sample value.

## Claims

### Claim 1

A video coding method comprising:
obtaining an initial predicted sample value, based on motion-compensated prediction, for at least a first sample position in a current block of samples;
determining a motion vector refinement associated with at least the first sample position;
determining, at the first sample position, a spatial gradient of sample values;
determining a sample difference value based on a scalar product of the spatial gradient and the motion vector refinement; and
modifying the initial predicted sample value based on the sample difference value.

### Claim 2 (depends on 1)

The method of claim 1, performed by a decoder, wherein determining a motion vector refinement comprises decoding the motion vector refinement from a bitstream.

### Claim 3 (depends on 2)

The method of claim 2, further comprising decoding refinement precision information from the bitstream, wherein determining the sample difference value comprises scaling the scalar product by an amount indicated by the precision information.

### Claim 4 (depends on 3)

The method of claim 3, wherein scaling the scalar product comprises bit-shifting the scalar product by an amount indicated by the precision information.

### Claim 5 (depends on 3)

The method of claim 3, wherein the motion-compensated prediction is performed using at least one motion vector having an initial precision, and wherein the refinement precision information comprises a precision difference value representing a difference between the initial precision and the refinement precision.

### Claim 6 (depends on 3)

The method of claim 3, wherein scaling the scalar product comprises right-shifting the scalar product by a number of bits equal to the sum of the precision difference value and the initial precision.

### Claim 7 (depends on 1)

The method of claim 1, performed by an encoder, wherein determining a motion vector refinement comprises selecting the motion vector refinement to substantially minimize a prediction error with respect to an input video block, and wherein the method further comprises encoding the motion vector refinement in a bitstream.

### Claim 8 (depends on 2)

The method of claim 2, wherein the motion vector refinement is signaled in the bitstream as an index.

### Claim 9 (depends on 8)

The method of claim 8, wherein the index identifies one of a plurality of motion vector refinements from the group consisting of (0,1), (1,0), (0,1), and (−1,0).

### Claim 10 (depends on 8)

The method of claim 8, wherein the index identifies one of a plurality of motion vector refinements from the group consisting of (0,1), (1,0), (0,1), (−1,0), (−1,1), (1,1), (1,1), and (−1,1).

### Claim 11 (depends on 1)

The method of claim 1, wherein the motion vector refinement is associated with all sample positions in the current block.

### Claim 12

An apparatus comprising a processor configured to perform at least:
obtaining an initial predicted sample value, based on motion-compensated prediction, for at least a first sample position in a current block of samples;
determining a motion vector refinement associated with at least the first sample position;
determining, at the first sample position, a spatial gradient of sample values;
determining a sample difference value based on a scalar product of the spatial gradient and the motion vector refinement; and
modifying the initial predicted sample value based on the sample difference value.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the apparatus comprises a decoder, and wherein determining a motion vector refinement comprises decoding the motion vector refinement from a bitstream.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the processor is further configured to decode refinement precision information from the bitstream, and wherein determining the sample difference value comprises scaling the scalar product by an amount indicated by the precision information.

### Claim 15 (depends on 12)

The apparatus of claim 12, wherein the apparatus comprises an encoder, and wherein determining a motion vector refinement comprises selecting the motion vector refinement to substantially minimize an error between the refined sample value and a corresponding sample value of an input video block, and wherein the method further comprises encoding the motion vector refinement in a bitstream.

### Claim 16 (depends on 12)

The apparatus of claim 12, wherein the motion vector refinement is signaled in the bitstream as an index.

### Claim 17

A non-transitory computer-readable medium storing instructions for causing one or more processors to perform:
obtaining an initial predicted sample value, based on motion-compensated prediction, for at least a first sample position in a current block of samples;
determining a motion vector refinement associated with at least the first sample position;
determining, at the first sample position, a spatial gradient of sample values;
determining a sample difference value based on a scalar product of the spatial gradient and the motion vector refinement; and
modifying the initial predicted sample value based on the sample difference value.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein the motion vector refinement is signaled in the bitstream as an index.

### Claim 19 (depends on 17)

The non-transitory computer-readable medium of claim 17 wherein the motion vector refinement is associated with all sample positions in the current block.

### Claim 20 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein refinement precision information is coded in the bitstream, and wherein determining the sample difference value comprises scaling the scalar product by an amount indicated by the precision information.
