# US 2021/0092364 A1 · Image prediction method and device

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

- Number: US 2021/0092364 A1
- Document ID: US20210092364A1
- Status: Published application
- Kind: A1
- Application number: 17/114,329
- Filed: 2020-12-07
- Published: 2021-03-25
- Earliest claimed: 2015-08-29
- Assignees: Huawei Technologies Co., Ltd.; University of Science and Technology of China
- Applicants: Huawei Technologies Co., Ltd.; University of Science and Technology of China
- Inventors: Zhuoyi LV; Li LI; Houqiang LI; Haitao YANG
- Web page: https://patentgrep.com/patent/US20210092364A1

## CPC

- H04N 19/105: Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
- H04N 19/139: Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
- 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/52: by predictive encoding
- H04N 19/527: Global motion vector estimation
- H04N 19/54: using feature points or meshes
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An image prediction method and device are disclosed. The method includes: obtaining a first reference unit of an image unit, where respective predicted images are obtained for the image unit and the first reference unit by using a same affine model; obtaining motion information of basic motion compensation units at two or more preset positions in the first reference unit; and obtaining motion information of a basic motion compensation unit of the image unit according to the motion information. In this way, motion information of the first reference unit using a same affine motion prediction model is reused, and a more accurate motion vector of a current image unit is obtained, improving prediction accuracy and maintaining encoding and decoding complexity, thereby improving encoding and decoding performance.

## Claims

### Claim 1

An image prediction device, for use in an image encoder and/or an image decoder, comprising:
a memory storing instructions; and
a processor coupled to the memory to execute the instructions so as to configure the processor to:
determine a candidate affine block, wherein the candidate affine block is an affine coded block that is spatially neighboring to a current image block;
determine candidate motion vectors (MVs) of at least two control points of the current image block according to MVs of at least two control points of the candidate affine block;
determine MV of a pixel point or a pixel matrix of the current image block according to the candidate MVs of the at least two control points of the current image block; and
obtain, based on the MV of the pixel point or the pixel matrix of the current image block, predicted values of the current image block.

### Claim 2 (depends on 1)

The device according to claim 1, wherein obtaining the predicted values of the current image block comprises:
obtaining predicted values of the pixel point or the pixel matrix of the current image block through motion compensation according to reference frame information of the current image block and the MV of the pixel point or the pixel matrix of the current image block; and
obtaining het predicted values of the current image block based on the predicted values of the pixel point or the pixel matrix of the current image block.

### Claim 3 (depends on 2)

The device according to claim 2, wherein the reference frame information of the current image block is same as reference frame information of the candidate affine block.

### Claim 4 (depends on 1)

The device according to claim 1, wherein the candidate MVs of the at least two control points of the current image block correspond to the candidate affine block or an index.

### Claim 5 (depends on 1)

The device according to claim 1, wherein determining the candidate MVs of the at least two control points of the current image block comprises:
determining the candidate MVs of three control points of the current image block according to MVs of three control points of the candidate affine block, wherein a 6-parameter affine model is used for the current image block; or
determining the candidate MVs of two control points of the current image block according to MVs of two control points of the candidate affine block, wherein a 4-parameter affine model is used for the current image block.

### Claim 6 (depends on 1)

The device according to claim 1, wherein determining the candidate MVs of the at least two control points of the current image block comprises:
determining the candidate MVs of at least two control points of the current image block according to MVs of at least two control points of the candidate affine block and one or more of a width or a height of the candidate affine block.

### Claim 7 (depends on 6)

The device according to claim 6, wherein said one or more of the width or the height of the candidate affine block are associated with position coordinates of the at least two control points of the candidate affine block.

### Claim 8 (depends on 1)

The device according to claim 1, wherein the candidate affine block is a rectangular block, and the control points of the candidate affine block comprise two or more of:
an upper left corner point of the candidate image block,
an upper right corner point of the candidate image block,
a lower left corner point of the candidate image block, or
a lower right corner point of the candidate affine block.

### Claim 9 (depends on 1)

The device according to claim 1, wherein the current image block is a rectangular block, and the control points of the current image block comprises two or more of:
an upper left corner point of the current image block,
an upper right corner point of the current image block,
a lower left corner point of the current image block, or
a lower right corner point of the current image block.

### Claim 10 (depends on 1)

The device according to claim 1, wherein determining the MV of the pixel point or the pixel matrix of the current image block comprises:
determining the MV of a pixel point of the current image block according to the candidate MVs of two control points of the current image block based on:
vx
=
vx
1
-
vx
0
x
1
-
x
0
×
x
-
vy
1
-
vy
0
x
1
-
x
0
×
y
+
vx
0
vy
=
vy
1
-
vy
0
x
1
-
x
0
×
x
+
vx
1
-
vx
0
x
1
-
x
0
×
y
+
vy
0
wherein x and y represent respectively horizontal and vertical coordinates of the pixel point in the current image block, vx and vy represent corresponding horizontal and vertical MVs of the pixel point in the image block, and x0 and x1 and y0 and y1 represent respectively horizontal and vertical coordinates of two control points in the current image block, and vx0 and vx1 and vy0 and vy1 are corresponding horizontal and vertical MVs of two control points in the current image block.

### Claim 11

An image prediction device, for use in an image decoder, comprising:
a memory storing instructions; and
a processor coupled to the memory to execute the instructions so as to configure the processor to:
determine, by an image decoder, a candidate affine block, wherein the candidate affine block is an affine coded block that is spatially neighboring to a current image block;
determine candidate motion vector predictors (MVPs) of at least two control points of the current image block according to motion vectors (MVs) of at least two control points of the candidate affine block;
obtain, from a bitstream, motion vector differences (MVDs) of the at least two control points of the current image block;
determine, based on the candidate MVPs of the at least two control points of the current image block and the MVDs of the at least two control points of the current image block, MVs of the at least two control points of the current image block;
determine a MV of a pixel point or a pixel matrix of the current image block according to the MVs of the at least two control points of the current image block; and
obtain, based on the MV of the pixel point or the pixel matrix of the current image block, predicted values of the current image block.

### Claim 12 (depends on 11)

The device according to claim 11, obtaining the predicted values of the current image block comprises:
obtaining predicted values of the pixel point or the pixel matrix of the current image block through motion compensation according to reference frame information of the current image block and the MV of the pixel point or the pixel matrix of the current image block; and
obtaining predicted values of the current image block based on the predicted values of the each pixel point or the pixel matrix of the current image block.

### Claim 13 (depends on 12)

The device according to claim 12, wherein the reference frame information of the current image block is parsed from the bitstream.

### Claim 14 (depends on 11)

The device according to claim 11, wherein the candidate MVPs of the at least two control points of the current image block corresponds to the candidate affine block or an index.

### Claim 15 (depends on 11)

The device according to claim 11, wherein determining the candidate MVPs of the at least two control points of the current image block comprises:
determining the candidate MVPs of at least two control points of the current image block according to MVs of three control points of the candidate affine block, wherein a 6-parameter affine model is used for the current image block; or
determining the candidate MVPs of at least two control points of the current image block according to MVs of two control points of the candidate affine block, wherein a 4-parameter affine model is used for the current image block.

### Claim 16 (depends on 11)

The device according to claim 11, wherein determining the candidate MVPs of the at least two control points of the current image block comprises:
determining the candidate MVPs of at least two control points of the current image block according to MVs of at least two control points of the candidate affine block and one or more of a width or a height of the candidate affine block.

### Claim 17 (depends on 16)

The device according to claim 16, wherein said one or more of the width or the height of the candidate affine block are associated with position coordinates of the at least two control points of the candidate affine block.

### Claim 18 (depends on 11)

The device according to claim 11, wherein the candidate affine block is a rectangular block, and the control points of the candidate affine block comprises two or more of:
an upper left corner point of the candidate affine block,
an upper right corner point of the candidate affine block,
a lower left corner point of the candidate affine block, or
a lower right corner point of the candidate affine block.

### Claim 19 (depends on 11)

The device according to claim 11, wherein the current image block is a rectangular block, and the control points of the current image block comprises two or more of:
an upper left corner point of the current image block,
an upper right corner point of the current image block,
a lower left corner point of the current image block, or
a lower right corner point of the current image block.

### Claim 20 (depends on 11)

The device according to claim 11, wherein determining the MV of the pixel point or the pixel matrix of the current image block comprises:
determining the MV of a pixel point of the current image block according to the MVs of two control points of the current image block based on:
vx
=
vx
1
-
vx
0
x
1
-
x
0
×
x
-
vy
1
-
vy
0
x
1
-
x
0
×
y
+
vx
0
vy
=
vy
1
-
vy
0
x
1
-
x
0
×
x
+
vx
1
-
vx
0
x
1
-
x
0
×
y
+
vy
0
wherein x and y represent respectively horizontal and vertical coordinates of the pixel point in the current image block, vx and vy represent corresponding horizontal and vertical MVs of the pixel point in the image block, and x0 and x1 and y0 and y1 represent respectively horizontal and vertical coordinates of two control points in the current image block, and vx0 and vx1 and vy0 and vy1 are corresponding horizontal and vertical MVs of two control points in the current image block.
