# US 11,122,292 B2 · Motion vector refinement of a motion vector pointing to a fractional sample position

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

- Number: US 11,122,292 B2
- Document ID: US11122292B2
- Status: Granted
- Kind: B2
- Application number: 16/843,707
- Filed: 2020-04-08
- Published: 2020-07-23
- Granted: 2021-09-14
- Earliest claimed: 2017-10-09
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Semih Esenlik; Zhijie Zhao; Han Gao; Anand Meher Kotra
- Web page: https://patentgrep.com/patent/US11122292B2

## CPC

- H04N 19/57: Motion estimation characterised by a search window with variable size or shape
- H04N 19/52: by predictive encoding
- H04N 19/533: Motion estimation using multistep search, e.g. two-dimensional [2D]-log search or one-at-a-time search [OTS]
- H04N 19/56: Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
- H04N 19/573: Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A motion vector determination employs template matching. At first, an initial motion vector is obtained. If the initial motion vector points to a position that is fractional, and thus, requires interpolation from the integer sample positions, the initial motion vector is rounded to a closest integer sample position. The rounded position is then used to define the search space for the template matching to define a refinement of the initial motion vector.

## Claims

### Claim 1

An apparatus, the apparatus comprising a processing circuitry configured to:
obtain an initial motion vector and a template for a prediction block;
based on a determination that the initial motion vector points to a fractional sample position in a reference picture, round the initial motion vector to a closest integer sample position of a plurality of integer sample positions to obtain a rounded position;
determining a search space in the reference picture based on the rounded position; and
refine the initial motion vector by template matching with the template in the search space,
wherein the search space is located on a position comprising the rounded position and at least one integer sample position of the plurality of integer sample positions.

### Claim 2 (depends on 1)

The apparatus according to claim 1, wherein the processing circuitry is further configured to:
calculate a template matching cost for the initial motion vector pointing to the fractional sample position;
compare the calculated template matching cost of the fractional sample position with a template matching cost of the refined initial motion vector; and
determine the motion vector for the prediction block based on the fractional sample position upon a state where the template matching cost of the refined initial motion vector is not lower than the calculated template matching cost of the fractional sample position.

### Claim 3 (depends on 1)

The apparatus according to claim 1, wherein the search space comprises sample positions spaced by integer sample step from each other.

### Claim 4 (depends on 1)

The apparatus according to claim 1, wherein the search space is formed by K rows and L columns of samples located in rows and columns in integer distance from each other, wherein the rounded position is one of the samples of the search space.

### Claim 5 (depends on 1)

The apparatus according to claim 1, wherein the rounded position is located substantially in a center of the search space.

### Claim 6 (depends on 1)

The apparatus according to claim 1, wherein the template matching with the template in the search space comprises the processing circuitry configured to:
determine an integer search space comprising sample positions spaced by integer sample step from each other;
perform the template matching with the template in the integer search space to obtain a best matching integer position;
based on the best matching integer position, determine a fractional search space with at least one sample spaced by less than integer sample step from a closest sample position of the sample positions of the integer search space; and
perform the template matching with the template in the fractional search space to obtain a best matching position.

### Claim 7 (depends on 1)

The apparatus according to claim 1, wherein the rounding is obtained as an integer sample position of the plurality of integer sample positions that is the closest to the fractional sample position to which the initial motion vector points.

### Claim 8 (depends on 7)

The apparatus according to claim 7, wherein, based on that there are more than one integer sample position that are equally close to the fractional sample position, the rounding is obtained as an integer sample position in a predefined direction, the predefined direction being left, right, top, or bottom.

### Claim 9 (depends on 7)

The apparatus according to claim 7, wherein, based on that there are more than one integer sample positions that are equally close to the fractional sample position, the search space is a unity of a search space located on the more than one integer sample positions that are equally close to the fractional sample position.

### Claim 10 (depends on 7)

The apparatus according to claim 7, wherein, based on that there are more than one integer sample positions that are equally close to the fractional sample position, the rounding is obtained as the integer sample position of one or more integer sample positions that are equally close integer sample positions which results in a shorter magnitude of the rounded position.

### Claim 11 (depends on 1)

The apparatus according to claim 1, wherein:
the search space is located on Hall the rounded position and comprises one or more fractional sample positions,
each of the fractional sample positions of the search space is obtained by interpolation filtering with a filter of a predefined tap-size assessing integer samples only within a window, and
the window is formed by integer samples accessible for the template matching in the search space.

### Claim 12 (depends on 1)

The apparatus according to claim 1, wherein:
the search space is located on a position of the initial motion vector, and
the template matching comprises:
accessing integer sample positions within a predetermined window, the predetermined window comprising the search space and further integer sample positions being accessible for the template matching,
replacing at least one of the integer sample positions located out of the window by a replacement value that is based on at least one sample within the window, and
using the values of the accessed integer sample positions as well as of the replacements to perform the template matching.

### Claim 13 (depends on 1)

A prediction block encoding apparatus for encoding a prediction block comprising:
the apparatus for determining a motion vector for the prediction block according to claim 1; and
an encoder configured to encode differences between the prediction block and a predictor obtained according to the motion vector, resulting in a bitstream.

### Claim 14 (depends on 1)

A decoding apparatus for decoding the prediction block from a bitstream comprising:
a decoder configured to decode bitstream differences between the prediction block and a predictor obtained according to a motion vector;
the apparatus for determining the motion vector for the prediction block according to claim 1;
a motion predictor configured to determine the predictor according to the motion vector; and
a reconstructor configured to reconstruct the prediction block based on the predictor and the decoded differences.

### Claim 15

A method for determining a motion vector for a prediction block, the method comprising:
obtaining an initial motion vector and a template for the prediction block;
based on a determination that the initial motion vector points to a fractional sample position in a reference picture, round the initial motion vector to a closest integer sample position of a plurality of integer sample positions to obtain a rounded position;
determining a search space in the reference picture based on the rounded position; and
refine the initial motion vector by template matching with the template in the search space,
wherein the search space is located on a position comprising the rounded position and at least one integer sample position of the plurality of integer sample positions.

### Claim 16 (depends on 15)

A method for encoding the prediction block, the method comprising:
determining a motion vector for the prediction block according to the method of claim 15; and
encoding differences between the prediction block and a predictor obtained according to the motion vector, resulting in a bitstream.

### Claim 17 (depends on 15)

A method for decoding the prediction block from a bitstream, the method comprising:
decoding bitstream differences between the prediction block and a predictor obtained according to a motion vector;
determining of the motion vector for the prediction block according to the method of claim 15;
determining the predictor according to the motion vector; and
reconstructing the prediction block based on the predictor and the decoded differences.

### Claim 18 (depends on 15)

A non-transitory computer readable medium storing instructions which when executed on a processor cause the processor to perform the method according to claim 15.
