# US 12,120,310 B2 · Motion vector prediction method and related apparatus

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

- Number: US 12,120,310 B2
- Document ID: US12120310B2
- Status: Granted
- Kind: B2
- Application number: 18/318,730
- Filed: 2023-05-17
- Published: 2023-11-16
- Granted: 2024-10-15
- Earliest claimed: 2018-07-02
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Huanbang Chen; Haitao Yang; Jianle Chen; Jiali Fu
- Web page: https://patentgrep.com/patent/US12120310B2

## CPC

- H04N 19/139: Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
- H04N 19/537: Motion estimation other than block-based
- H04N 19/119: Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/52: by predictive encoding
- H04N 19/61: in combination with predictive coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A motion vector prediction method includes parsing a bitstream to obtain an index value of a candidate motion vector list and constructing the candidate motion vector list that includes. candidate motion vectors of K control points of a current block. The candidate motion vectors of K control points are obtained based on a 2N-parameter affine transform model used for a neighboring block of the current block, where N and K are integers greater than or equal to 2 and less than or equal to 4 with N not being equal to K. The method further includes determining, in the candidate motion vector list, target candidate motion vectors of the K control points based on the index value and obtaining a predicted motion vector of each subblock of the current block based on the target candidate motion vectors of the K control points.

## Claims

### Claim 1

A video image encoding method implemented by an encoding device, comprising:
when an affine model of a current block is a 2×K-parameter affine transform model, and an affine transform model of a neighboring block of the current block is a 2×N-parameter affine transform model, obtaining, according to the 2×N-parameter affine transform model for the neighboring block, candidate motion vectors of K control points of the current block, wherein the 2×N-parameter affine transform model is obtained based on motion vectors of N control points of the neighboring block, Nis an integer equal to 2, K is an integer equal to 3, the neighboring block is an encoded image block spatially adjacent to the current block, and the current block comprises a plurality of subblocks;
constructing a control point motion vector candidate list, wherein the control point motion vector candidate list comprises the candidate motion vectors of K control points of the current block;
determining, in the control point motion vector candidate list, target candidate motion vectors of the K control points based on a rate-distortion cost; and
encoding a syntax element related to the current block into a bitstream, wherein the syntax element comprises an index value indicating a location of the target candidate motion vectors of the K control points in the control point motion vector candidate list.

### Claim 2 (depends on 1)

The method according to claim 1, wherein candidate motion vectors of three control points of the current block are obtained based on a 4-parameter affine transform model for the neighboring block of the current block, wherein the N control points of the neighboring block are a top-left control point and a top-right control point of the neighboring block, but the K control points of the current block are a top-left control point, a bottom-left control point and a top-right control point of the current block.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the candidate motion vectors of the three control points of the current block comprise: a motion vector at a top-left sample location of the current block, a motion vector at a top-right sample location of the current block, and a motion vector at a bottom-left sample location of the current block.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the candidate motion vectors of the three control points of the current block are calculated according to the following formulas:
{
vx
0
=
vx
4
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
x
0
-
x
4
)
-
(
vx
5
-
vx
4
)
y
5
-
y
4
×
(
y
0
-
y
4
)
vy
0
=
vx
4
+
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
x
0
-
x
4
)
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
y
0
-
y
4
)
{
vx
1
=
vx
4
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
x
1
-
x
4
)
-
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
y
1
-
y
4
)
vy
1
=
vx
4
+
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
x
1
-
x
4
)
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
y
1
-
y
4
)
{
vx
2
=
vx
4
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
x
2
-
x
4
)
-
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
y
2
-
y
4
)
vy
2
=
vx
4
+
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
x
2
-
x
4
)
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
y
2
-
y
4
)
wherein vx0 is a horizontal component of the motion vector corresponding to the top-left sample location of the current block, and vy0 is a vertical component of the motion vector corresponding to the top-left sample location of the current block; vx1 is a horizontal component of the motion vector corresponding to the top-right sample location of the current block, and vy1 is a vertical component of the motion vector corresponding to the top-right sample location of the current block; vx2 is a horizontal component of the motion vector corresponding to the bottom-left sample location of the current block, and vy2 is a vertical component of the motion vector corresponding to the bottom-left sample location of the current block; vx4 is a horizontal component of a motion vector corresponding to a top-left sample location of the neighboring block, and vy4 is a vertical component of the motion vector corresponding to the top-left sample location of the neighboring block; vx5 is a horizontal component of a motion vector corresponding to a top-right sample location of the neighboring block, and vy5 is a vertical component of the motion vector corresponding to the top-right sample location of the neighboring block; x0 is a horizontal coordinate of the top-left sample location of the current block, and y0 is a vertical coordinate of the top-left sample location of the current block; x1 is a horizontal coordinate of the top-right sample location of the current block, and y1 is a vertical coordinate of the top-right sample location of the current block; x2 is a horizontal coordinate of the bottom-left sample location of the current block, and y2 is a vertical coordinate of the bottom-left sample location of the current block; x4 is a horizontal coordinate of the top-left sample location of the neighboring block, and y4 is a vertical coordinate of the top-left sample location of the neighboring block; and x5 is a horizontal coordinate of the top-right sample location of the neighboring block.

### Claim 5

An encoding device, comprising:
one or more processors; and
a computer-readable storage medium coupled to the one or more processors and storing programming instructions for execution by the one or more processors to cause the encoding device to:
when an affine model of a current block is a 2×K-parameter affine transform model, and an affine transform model of a neighboring block of the current block is a 2×N-parameter affine transform model, obtain, according to the 2×N-parameter affine transform model for the neighboring block, candidate motion vectors of K control points of the current block, wherein the 2×N-parameter affine transform model is obtained based on motion vectors of N control points of the neighboring block, Nis an integer equal to 2, K is an integer equal to 3, the neighboring block is an encoded image block spatially adjacent to the current block, and the current block comprises a plurality of subblocks;
construct a control point motion vector candidate list,
wherein the control point motion vector candidate list comprises the candidate motion vectors of K control points of the current block;
determine, in the control point motion vector candidate list, target candidate motion vectors of the K control points based on a rate-distortion cost; and
encode a syntax element related to the current block into a bitstream, wherein the syntax element comprises an index value indicating a location of the target candidate motion vectors of the K control points in the control point motion vector candidate list.

### Claim 6 (depends on 5)

The encoding device according to claim 5, wherein candidate motion vectors of three control points of the current block are obtained based on a 4-parameter affine transform model for the neighboring block of the current block, wherein the N control points of the neighboring block are a top-left control point and a top-right control point of the neighboring block, but the K control points of the current block are a top-left control point, a bottom-left control point and a top-right control point of the current block.

### Claim 7 (depends on 6)

The encoding device according to claim 6, wherein the candidate motion vectors of the three control points of the current block comprise: a motion vector at a top-left sample location of the current block, a motion vector at a top-right sample location of the current block, and a motion vector at a bottom-left sample location of the current block.

### Claim 8 (depends on 7)

The encoding device according to claim 7, wherein the candidate motion vector predictor motion vectors of the three control points of the current block are calculated according to the following formulas:
{
vx
0
=
vx
4
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
x
0
-
x
4
)
-
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
y
0
-
y
4
)
vy
0
=
vx
4
+
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
x
0
-
x
4
)
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
y
0
-
y
4
)
{
vx
1
=
vx
4
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
x
1
-
x
4
)
-
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
y
1
-
y
4
)
vy
1
=
vx
4
+
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
x
1
-
x
4
)
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
y
1
-
y
4
)
{
vx
2
=
vx
4
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
x
2
-
x
4
)
-
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
y
2
-
y
4
)
vy
2
=
vx
4
+
(
vy
5
-
vy
4
)
x
5
-
x
4
×
(
x
2
-
x
4
)
+
(
vx
5
-
vx
4
)
x
5
-
x
4
×
(
y
2
-
y
4
)
wherein vx0 is a horizontal component of the motion vector corresponding to the top-left sample location of the current block, and vy0 is a vertical component of the motion vector corresponding to the top-left sample location of the current block; vx1 is a horizontal component of the motion vector corresponding to the top-right sample location of the current block, and vy1 is a vertical component of the motion vector corresponding to the top-right sample location of the current block; vx2 is a horizontal component of the motion vector corresponding to the bottom-left sample location of the current block, and vy2 is a vertical component of the motion vector corresponding to the bottom-left sample location of the current block; vx4 is a horizontal component of a motion vector corresponding to a top-left sample location of the neighboring block, and vy4 is a vertical component of the motion vector corresponding to the top-left sample location of the neighboring block; vx5 is a horizontal component of a motion vector corresponding to a top-right sample location of the neighboring block, and vy5 is a vertical component of the motion vector corresponding to the top-right sample location of the neighboring block; x0 is a horizontal coordinate of the top-left sample location of the current block, and y0 is a vertical coordinate of the top-left sample location of the current block; x1 is a horizontal coordinate of the top-right sample location of the current block, and y1 is a vertical coordinate of the top-right sample location of the current block; x2 is a horizontal coordinate of the bottom-left sample location of the current block, and y2 is a vertical coordinate of the bottom-left sample location of the current block; x4 is a horizontal coordinate of the top-left sample location of the neighboring block, and y4 is a vertical coordinate of the top-left sample location of the neighboring block; and x5 is a horizontal coordinate of the top-right sample location of the neighboring block.

### Claim 9

A non-transitory computer-readable medium storing computer instructions for encoding of a video image, that when executed by one or more processors, cause the one or more processors to perform operations comprising:
when an affine model of a current block is a 2×K-parameter affine transform model, and an affine transform model of a neighboring block of the current block is a 2×N-parameter affine transform model, obtaining, according to the 2×N-parameter affine transform model for the neighboring block, candidate motion vectors of K control points of the current block, wherein the 2×N-parameter affine transform model is obtained based on motion vectors of N control points of the neighboring block, Nis an integer equal to 2, K is an integer equal to 3, the neighboring block is an encoded image block spatially adjacent to the current block, and the current block comprises a plurality of subblocks;
constructing a control point motion vector candidate list, wherein the control point motion vector candidate list comprises the candidate motion vectors of K control points of the current block;
determining, in the control point motion vector candidate list, target candidate motion vectors of the K control points based on a rate-distortion cost; and
encoding a syntax element related to the current block into a bitstream, wherein the syntax element comprises an index value indicating a location of the target candidate motion vectors of the K control points in the control point motion vector candidate list.

### Claim 10 (depends on 9)

The non-transitory computer-readable medium according to claim 9, wherein candidate motion vectors of three control points of the current block are obtained based on a 4-parameter affine transform model for the neighboring block of the current block, wherein the N control points of the neighboring block are a top-left control point and a top-right control point of the neighboring block, but the K control points of the current block are a top-left control point, a bottom-left control point and a top-right control point of the current block.

### Claim 11 (depends on 10)

The non-transitory computer-readable medium according to claim 10, wherein the candidate motion vectors of the three control points of the current block comprise: a motion vector at a top-left sample location of the current block, a motion vector at a top-right sample location of the current block, and a motion vector at a bottom-left sample location of the current block.

### Claim 12

A non-transitory computer-readable medium comprising a bitstream generated by a video image encoding method, wherein the video image encoding method comprises:
when an affine model of a current block is a 2×K-parameter affine transform model, and an affine transform model of a neighboring block of the current block is a 2×N-parameter affine transform model, obtaining, according to the 2×N-parameter affine transform model for the neighboring block, candidate motion vectors of K control points of the current block, wherein the 2×N-parameter affine transform model is obtained based on motion vectors of N control points of the neighboring block, Nis an integer equal to 2, K is an integer equal to 3, the neighboring block is an encoded image block spatially adjacent to the current block, and the current block comprises a plurality of subblocks;
constructing a control point motion vector candidate list, wherein the control point motion vector candidate list comprises the candidate motion vectors of K control points of the current block;
determining, in the control point motion vector candidate list, target candidate motion vectors of the K control points based on a rate-distortion cost; and
encoding a syntax element related to the current block into a bitstream, wherein the syntax element comprises an index value indicating a location of the target candidate motion vectors of the K control points in the control point motion vector candidate list.

### Claim 13 (depends on 12)

The non-transitory computer-readable medium according to claim 12, wherein candidate motion vectors of three control points of the current block are obtained based on a 4-parameter affine transform model for the neighboring block of the current block, wherein the N control points of the neighboring block are a top-left control point and a top-right control point of the neighboring block, but the K control points of the current block are a top-left control point, a bottom-left control point and a top-right control point of the current block.
