# US 2020/0404323 A1 · Memory access window and padding for motion vector refinement and motion compensation

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

- Number: US 2020/0404323 A1
- Document ID: US20200404323A1
- Status: Published application
- Kind: A1
- Application number: 16/999,031
- Filed: 2020-08-20
- Published: 2020-12-24
- Earliest claimed: 2018-06-28
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Semih ESENLIK; Ivan KRASNOV; Zhijie ZHAO; Jianle CHEN
- Web page: https://patentgrep.com/patent/US20200404323A1

## CPC

- H04N 19/563: Motion estimation with padding, i.e. with filling of non-object values in an arbitrarily shaped picture block or region for estimation purposes
- H04N 19/103: Selection of coding mode or of prediction mode
- H04N 19/172: the region being a picture, frame or field
- H04N 19/176: the region being a block, e.g. a macroblock
- 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/523: with sub-pixel accuracy
- H04N 19/55: Motion estimation with spatial constraints, e.g. at image or region borders
- H04N 19/56: Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
- H04N 19/57: Motion estimation characterised by a search window with variable size or shape
- H04N 19/577: Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
- H04N 19/80: Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation (H04N19/635, H04N19/86 take precedence)
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The present disclosure relates to motion vector determination using template or bilateral matching and predictor generation based on the motion vector. The template or bilateral matching and/or the predictor generation use interpolation filtering. The interpolation filtering operation accesses integer sample positions within a window, and further uses padded sample values for integer sample positions outside the window, which are based on at least one sample within said window, and uses the accessed integer sample position values as well as the padded sample values to perform the template or bilateral matching and/or predictor generation.

## Claims

### Claim 1

An encoding apparatus for determining a predictor for encoding a block of a video image, the encoding apparatus comprising:
a non-transitory memory storing instructions; and
a processor configured to execute the instructions to:
obtain an initial motion vector for the block;
obtain a refined motion vector for the block based on the initial motion vector; and
determine a predictor for the block according to the refined motion vector
using interpolation filtering with an interpolation filter, wherein for the interpolation filtering at least one sample value of an integer sample position located inside a window and a padded sample value for an integer sample position located outside the window is used, and wherein the padded sample value is based on at least one sample value of a sample located inside the window.

### Claim 2

A decoding apparatus for determining a predictor for decoding a block of a video image, the decoding apparatus comprising
a non-transitory memory storing instructions; and
a processor configured to execute the instructions to:
obtain an initial motion vector for the block;
obtain a refined motion vector for the prediction block based on the initial motion vector; and
determine a predictor for the block according to the refined motion vector using interpolation filtering with an interpolation filter, wherein for the interpolation filtering at least one sample value of an integer sample position located inside a window and a padded sample value for an integer sample position located outside the window is used, and wherein the padded sample value is based on at least one sample value of a sample located inside the window.

### Claim 3

An encoding method for determining a predictor for encoding a block of a video image, the encoding method comprising:
obtaining an initial motion vector for the block;
obtaining a refined motion vector for the block based on the initial motion vector; and
determining a predictor for the block according to the refined motion vector using interpolation filtering with an interpolation filter, wherein for the interpolation filtering at least one sample value of an integer sample position located inside a window and a padded sample value for an integer sample position located outside the window is used, and wherein the padded sample value is based on at least one sample value of a sample located inside the window.

### Claim 4

A decoding method for determining a predictor for decoding a block of a video image, the decoding method comprising:
obtaining an initial motion vector for the block;
obtaining a refined motion vector for the prediction block based on the initial motion vector; and
determining a predictor for the block according to the refined motion vector using interpolation filtering with an interpolation filter, wherein for the interpolation filtering at least one sample value of an integer sample position located inside a window and a padded sample value for an integer sample position located outside the window is used, and wherein the padded sample value is based on at least one sample value of a sample located inside the window.

### Claim 5 (depends on 4)

The decoding method according to claim 4, further comprising determining a refinement of the initial motion vector based on a search space of candidate motion vectors, wherein the refined motion vector is determined based on the initial motion vector and the refinement.

### Claim 6 (depends on 5)

The decoding method according to claim 5, wherein the search space is located on a position defined by the initial motion vector.

### Claim 7 (depends on 4)

The decoding method according to claim 4, further comprising obtaining a difference between the block and the predictor.

### Claim 8 (depends on 7)

The decoding method according to claim 7, further comprising reconstructing the block based on the predictor and the difference between the block and the predictor.

### Claim 9 (depends on 4)

The decoding method according to claim 4, wherein the padded sample value is determined by mirroring, with respect to an axis of the interpolation filter, a value of the corresponding integer sample position.

### Claim 10 (depends on 4)

The decoding method according to claim 4, wherein the interpolation filter is a one-dimensional filter or a separable two-dimensional filter.

### Claim 11 (depends on 4)

The decoding method according to claim 4, wherein the window is formed by all integer sample positions accessible for obtaining the predictor in a position specified by the initial motion vector.

### Claim 12 (depends on 4)

The decoding method according to claim 4, wherein the window is defined by its vertical and/or horizontal size with respect to at least one of:
a block with a size of the block located on the initial motion vector position,
the initial motion vector position, or
the vertical and horizontal length of the interpolation filter that is used for determining the predictor.

### Claim 13 (depends on 4)

The decoding method according to claim 4, wherein the padded sample value for the integer sample position outside of the window is determined to be equal to the sample value of the at least one used integer sample position located inside the window, wherein the sample value of the at least one used integer sample position located inside the window is closest to the integer sample position located outside the window.

### Claim 14 (depends on 4)

The decoding method according to claim 4, wherein the number of sample values to be padded depends on the difference between the initial motion vector and the refined motion vector.

### Claim 15 (depends on 5)

The decoding method according to claim 5, wherein determining the refinement of the initial motion vector comprises template matching with a template or bilateral matching, wherein the template or bilateral matching comprises:
accessing sample values at integer sample positions within a further window, the further window including said search space and further integer sample positions accessible for the template or bilateral matching,
padding at least one sample value at an integer sample position located out of the further window by a padded sample value which is based on at least one sample within said further window, and
using the accessed integer sample position values as well as the padded sample values to perform the template or bilateral matching.

### Claim 16 (depends on 15)

The decoding method according to claim 15, wherein
the search space includes at least one fractional sample position with a value obtained by interpolation filtering with a filter of a predefined tap-size;
and the interpolation filtering uses said accessed integer sample position values and the at least one padded sample value to obtain said at least one fractional sample position value.

### Claim 17 (depends on 16)

The decoding method according to claim 16, wherein the padded sample value used in the template or bilateral matching is determined by mirroring with respect to an axis of a filter the value of the corresponding integer sample position.

### Claim 18 (depends on 16)

The decoding method according to claim 16, wherein the padded sample value used in the template or bilateral matching is determined to be equal to the value on a closest of the accessed integer sample positions.

### Claim 19 (depends on 16)

The decoding method according to claim 16, wherein the further window is defined by its vertical and/or horizontal size with respect to at least one of:
the search space,
a block with a size of the block located on the initial motion vector position, or
the initial motion vector position.

### Claim 20 (depends on 16)

The decoding method according to claim 16, wherein the further window is the same as said window.

### Claim 21 (depends on 5)

The decoding method according to claim 5, wherein the refinement is determined by bilateral matching and obtaining at least two initial motion vectors pointing to positions in different reference pictures and forming a pair of initial motion vectors.

### Claim 22 (depends on 5)

The decoding method according to claim 5, wherein the refinement is determined by template matching and determining the motion vector further includes
obtaining a template for the block and
determining the refinement of the initial motion vector by template matching with the template in the search space.

### Claim 23 (depends on 5)

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