# US 11,310,524 B2 · Method and apparatus for determining motion vector of affine code block

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

- Number: US 11,310,524 B2
- Document ID: US11310524B2
- Status: Granted
- Kind: B2
- Application number: 16/858,222
- Filed: 2020-04-24
- Published: 2020-08-06
- Granted: 2022-04-19
- Earliest claimed: 2017-10-27
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Huanbang Chen; Haitao Yang; Shan Gao; Jiantong Zhou; Shan Liu
- Web page: https://patentgrep.com/patent/US11310524B2

## CPC

- H04N 19/52: by predictive encoding
- H04N 19/54: using feature points or meshes
- H04N 19/43: Hardware specially adapted for motion estimation or compensation
- H04N 19/523: with sub-pixel accuracy
- H04N 19/61: in combination with predictive coding
- H04N 19/82: involving filtering within a prediction loop
- H04N 19/583: Motion compensation with overlapping blocks
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method includes obtaining a first motion vector of a motion compensation unit included in an affine code block. The method also includes determining a second motion vector based on the first motion vector, where a precision of the second motion vector matches a motion vector precision of a storage unit corresponding to the motion compensation unit. The method further includes determining a third motion vector based on the second motion vector, where there is a preset correspondence between the third motion vector and the second motion vector, and the third motion vector is used for subsequent encoding/decoding processing.

## Claims

### Claim 1

A method, comprising:
obtaining a first motion vector of a first motion compensation unit included in an affine code block, the first motion compensation unit being a first motion compensation unit of a plurality of motion compensation units corresponding to a storage unit;
determining a second motion vector based on the first motion vector, where a precision of the second motion vector matches a motion vector precision of the storage unit;
determining a third motion vector based on the second motion vector, where there is a preset correspondence between the third motion vector and the second motion vector, and the third motion vector is used for subsequent encoding/decoding processing; and
determining that a size of the storage unit is greater than that of the first motion compensation unit,
wherein
based on the determination that the size of the storage unit is greater than that of the first motion compensation unit, the preset correspondence facilitates determining a value of the third motion vector as being equal to an average value the second motion vector and a fourth motion vector of a second motion compensation unit of the plurality of motion compensation units corresponding to the storage unit, and
the fourth motion vector is a motion vector of a second motion compensation unit of the plurality of motion compensation units corresponding to the storage unit other than the first motion compensation unit.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the obtaining of the first motion vector comprises:
determining a motion vector of a control point of the affine code block, where the control point is a reference pixel used for predicting a motion vector of the affine code block; and
determining the first motion vector based on the motion vector of the control point, where a value of the first motion vector is equal to that of the motion vector of the control point, and the first motion compensation unit includes the control point, or the affine code block does not include the control point and the first motion compensation unit is a motion compensation unit closest to the control point among the plurality of motion compensation units corresponding to the storage unit.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the determining the second motion vector based on the first motion vector comprises:
when a motion vector precision of the first motion compensation unit is the same as that of the storage unit, determining that the value of the second motion vector is equal to that of the first motion vector; and
when the motion vector precision of the first motion compensation unit is different from that of the storage unit, determining the second motion vector based on the first motion vector, the motion vector precision of the first motion compensation unit, the motion vector precision of the storage unit, and a motion vector precision transformation formula.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the precision of the second motion vector matches the motion vector precision of the storage unit corresponding to the first motion compensation unit based on a determination that a length of a unit distance of a coordinate axis in a coordinate system corresponding to the second motion vector is equal to a length of a unit distance of a coordinate axis in a coordinate system corresponding to the storage unit.

### Claim 5 (depends on 1)

The method according to claim 1, wherein subsequent encoding/decoding processing for which the third motion vector is used comprises one or more of deducing motion information of a code block adjacent to the affine code block, loop filtering, or overlapped block motion compensation.

### Claim 6

An apparatus, comprising:
at least one processor; and
a memory having computer readable instructions stored thereon that, when executed by the at least one processor, causes the apparatus to:
obtain a first motion vector of a first motion compensation unit included in an affine code block, the first motion compensation unit being a first motion compensation unit of a plurality of motion compensation units corresponding to a storage unit;
determine a second motion vector based on the first motion vector, where a precision of the second motion vector matches a motion vector precision of the storage unit;
determine a third motion vector based on the second motion vector, where there is a preset correspondence between the third motion vector and the second motion vector, and the third motion vector is used for subsequent encoding/decoding processing; and
determine that a size of the storage unit is greater than that of the first motion compensation unit,
wherein
based on the determination that the size of the storage unit is greater than that of the first motion compensation unit, the preset correspondence facilitates determining a value of the third motion vector as being equal to an average value the second motion vector and a fourth motion vector of a second motion compensation unit of the plurality of motion compensation units corresponding to the storage unit, and
the fourth motion vector is a motion vector of a second motion compensation unit of the plurality of motion compensation units corresponding to the storage unit other than the first motion compensation unit.

### Claim 7 (depends on 6)

The apparatus according to claim 6, wherein the apparatus is caused to obtain the first motion vector by:
determining a motion vector of a control point of the affine code block, where the control point is a reference pixel used for predicting a motion vector of the affine code block; and
determining the first motion vector based on the motion vector of the control point, where a value of the first motion vector is equal to that of the motion vector of the control point, and the first motion compensation unit includes the control point, or the affine code block does not include the control point and the first motion compensation unit is a motion compensation unit closest to the control point among the plurality of motion compensation units corresponding to the storage unit.

### Claim 8 (depends on 7)

The apparatus according to claim 7, wherein
when a motion vector precision of the first motion compensation unit is the same as that of the storage unit, the value of the second motion vector is determined to be equal to that of the first motion vector, and
when the motion vector precision of the first motion compensation unit is different from that of the storage unit, the second motion vector is determined based on the first motion vector, the motion vector precision of the first motion compensation unit, the motion vector precision of the storage unit, and a motion vector precision transformation formula.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein the precision of the second motion vector matches the motion vector precision of the storage unit based on a determination that a length of a unit distance of a coordinate axis in a coordinate system corresponding to the second motion vector is equal to a length of a unit distance of a coordinate axis in a coordinate system corresponding to the storage unit.

### Claim 10 (depends on 6)

The apparatus according to claim 6, wherein
when a motion vector precision of the first motion compensation unit is the same as that of the storage unit, the value of the second motion vector is determined to be equal to that of the first motion vector, and
when the motion vector precision of the first motion compensation unit is different from that of the storage unit, the second motion vector is determined based on the first motion vector, the motion vector precision of the motion compensation unit, the motion vector precision of the storage unit, and a motion vector precision transformation formula.

### Claim 11 (depends on 6)

The apparatus according to claim 6, wherein the precision of the second motion vector matches the motion vector precision of the storage unit corresponding to the first motion compensation unit based on a determination that a length of a unit distance of a coordinate axis in a coordinate system corresponding to the second motion vector is equal to a length of a unit distance of a coordinate axis in a coordinate system corresponding to the storage unit.

### Claim 12 (depends on 6)

The apparatus according to claim 6, wherein the subsequent encoding/decoding for which the third motion vector is used comprises one or more of deducing motion information of a code block adjacent to the affine code block, loop filtering, or overlapped block motion compensation.
