# US 2021/0092433 A1 · Motion vector obtaining method and apparatus

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

- Number: US 2021/0092433 A1
- Document ID: US20210092433A1
- Status: Published application
- Kind: A1
- Application number: 17/111,376
- Filed: 2020-12-03
- Published: 2021-03-25
- Earliest claimed: 2018-06-04
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Huanbang Chen; Yin Zhao; Haitao Yang; Jianle Chen
- Web page: https://patentgrep.com/patent/US20210092433A1

## 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/513: Processing of motion vectors
- H04N 19/139: Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/189: characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
- H04N 19/433: characterised by techniques for memory access
- H04N 19/567: Motion estimation based on rate distortion criteria
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

This application provides a motion vector obtaining method and apparatus. The method includes: determining a target offset vector of a block and identifier information of a target picture, wherein the block comprises at least one sub-block; determining a location of the sub-block; determining, as a target location coordinate value of a collocated sub-block, a location coordinate value obtained by performing a clipping operation on an initial location coordinate value in a range, wherein the initial location coordinate value is based on the location of the sub-block and the target offset vector; and obtaining a motion vector of the sub-block based on a motion vector corresponding to the target location coordinate value. Thus, a range of the target offset vector is limited, so that a quantity of memory read times can be reduced in a process of obtaining the motion vector of the collocated sub-block.

## Claims

### Claim 1

A motion vector obtaining method, comprising:
determining a target offset vector of a block and identifier information of a target picture, wherein the block comprises at least one sub-block;
determining a location of the sub-block;
determining, as a target location coordinate value of a collocated sub-block, a location coordinate value obtained by performing a clipping operation on an initial location coordinate value of the collocated sub-block in a range, wherein the initial location coordinate value is determined based on the location of the sub-block and the target offset vector, and the collocated sub-block is in the target picture and corresponds to the sub-block, wherein the target picture is indicated by the identifier information;
obtaining a motion vector of the sub-block based on a motion vector corresponding to the target location coordinate value; and
encoding or decoding the sub-block using the motion vector of the sub-block.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the range is represented by a horizontal coordinate value range and a vertical coordinate value range, the horizontal coordinate value range comprises a minimum horizontal coordinate value and a maximum horizontal coordinate value, and the vertical coordinate value range comprises a minimum vertical coordinate value and a maximum vertical coordinate value.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the determining, as a target location coordinate value, a location coordinate value obtained by performing a clipping operation on an initial location coordinate value of a collocated sub-block in a range, comprises:
determining the target location coordinate value according to the following formulas:
x(i,j)=Clip3(HorMin,HorMax,x(i,j)); and
y(i,j)=Clip3(VerMin,VerMax,y(i,j), wherein
HorMin is the minimum horizontal coordinate value, HorMax is the maximum horizontal coordinate value, VerMin is the minimum vertical coordinate value, VerMax is the maximum vertical coordinate value, a Clip3 function is a clipping function, and the Clip3 function is defined as follows:
Clip


3

(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
otherwise
.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the initial location coordinate value comprises at least one of a horizontal coordinate or a vertical coordinate of the collocated sub-block, the horizontal coordinate of the collocated sub-block is the sum of a horizontal coordinate of the location of the sub-block and a horizontal component (xoff) of the target offset motion vector, the vertical coordinate of the collocated sub-block is the sum of a vertical coordinate of the location of the sub-block and a vertical component (yoff) of the target offset motion vector.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the initial location coordinate value of the collocated sub-block is derived as follows:
{
x
(
i
,
j
)
=
x
+
M
×
i
+
M
2
+
x
off
y
(
i
,
j
)
=
y
+
N
×
j
+
N
2
+
y
off
,
wherein
(x, y) represents location coordinates of the block, i represents the ith sub-block in the block in a horizontal direction, j represents the jth sub-block in the block in a vertical direction, (xoff, yoff) represents values of components of the target offset motion vector in the horizontal direction and the vertical direction, M and N are respectively a width and a height of the sub-block, and (x(i,j), y(i,j)) represents the initial location coordinate value of the collocated sub-block that corresponds to the (i, j)th sub-block.

### Claim 6 (depends on 5)

The method according to claim 5, wherein (x, y) represents location coordinates of a top-left vertex of the block, and (x(i,j), y(i,j)) represents location coordinates of a center point or a top-left vertex of the collocated sub-block that corresponds to the (i, j)th sub-block.

### Claim 7 (depends on 1)

The method according to claim 1, wherein
(
x
+
M
×
i
+
M
2
,
y
+
N
×
j
+
N
2
)
represents location coordinates of the (i, j)th sub-block, and (x, y) represents location coordinates of the block, i represents the ith sub-block in the block in a horizontal direction, j represents the jth sub-block in the block in a vertical direction, M and N are respectively a width and a height of the sub-block.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the range is determined based on a location and a size of a coding tree unit CTU in which the block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the range is determined according to the following formulas:
HorMin=Max(CTUX−RangeL,0);
HorMax=Min(CTUX+CTUW+RangeR−1,PicW−1);
VerMin=Max(CTUY−RangeU,0); and
VerMax=Min(CTUY+CTUH+RangeB−1,PicH−1), wherein
HorMin and HorMax are respectively a minimum value and a maximum value of the range in the horizontal direction, VerMin and VerMax are respectively a minimum value and a maximum value of the range in the vertical direction, CTUX and CTUY represent location coordinates of the CTU in which the block is included, CTUW and CTUH represent a width and a height of the CTU in which the block is included, RangeU, RangeB, RangeL, and RangeR respectively represent extension range values that are in an up direction, a bottom direction, a left direction, and a right direction and that are of the temporal motion vector field of the CTU in which the block is included, and PicW and PicH are respectively a width and a height of the target picture.

### Claim 10 (depends on 8)

The method according to claim 8, wherein a value of the extension range of the temporal motion vector field of the CTU (RangeU, RangeB, RangeL, RangeR) is a predetermined value.

### Claim 11 (depends on 1)

The method according to claim 1, wherein the obtaining a motion vector of the sub-block based on a motion vector corresponding to the target location coordinate value comprises:
scaling the motion vector corresponding to the target location coordinate value based on a picture order count POC of a picture comprising the sub-block, a POC of a target reference picture of the picture comprising the sub-block, a POC of the target picture, and a POC of a target reference picture of the target picture, to obtain the motion vector of the sub-block.

### Claim 12 (depends on 11)

The method according to claim 11, wherein the motion vector of the sub-block is obtained according to the following formula:
MV
s
=
P


1
-
P


2
P


3
-
P


4
×
MV
,
wherein
P1 represents the POC of the picture including the sub-block, P2 represents the POC of the target reference picture of the picture including the sub-block, P3 represents the POC of the target picture, P4 represents the POC of the target reference picture of the target picture, MV represents the motion vector corresponding to the target location coordinate value, and MVs represents the motion vector of the sub-block.

### Claim 13 (depends on 1)

The method according to claim 1, wherein the determining the target offset vector of the block comprises:
determining a motion vector of a spatially neighboring block of the block as the target offset vector.

### Claim 14

An apparatus, comprising:
a memory containing instructions; and
a processor in communication with the memory and upon execution of the instructions, being configured for:
determining a target offset vector of a block and identifier information of a target picture, wherein the block comprises at least one sub-block;
determining a location of the sub-block;
determining, as a target location coordinate value of a collocated sub-block, a location coordinate value obtained by performing a clipping operation on an initial location coordinate value of the collocated sub-block in a range, wherein the initial location coordinate value is determined based on the location of the sub-block and the target offset vector, and the collocated sub-block is in the target picture and corresponds to the sub-block, wherein the target picture is indicated by the identifier information;
obtaining a motion vector of the sub-block based on a motion vector corresponding to the target location coordinate value; and
encoding or decoding the sub-block using the motion vector of the sub-block.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the range is represented by a horizontal coordinate value range and a vertical coordinate value range, the horizontal coordinate value range comprises a minimum horizontal coordinate value and a maximum horizontal coordinate value, and the vertical coordinate value range comprises a minimum vertical coordinate value and a maximum vertical coordinate value.

### Claim 16 (depends on 14)

The apparatus according to claim 14, wherein upon execution of the instructions, the processor is further configured for:
determining the target location coordinate value according to the following formulas:
x(i,j)=Clip3(HorMin,HorMax,x(i,j)); and
y(i,j)=Clip3(VerMin,VerMax,y(i,j), wherein
HorMin is the minimum horizontal coordinate value, HorMax is the maximum horizontal coordinate value, VerMin is the minimum vertical coordinate value, VerMax is the maximum vertical coordinate value, a Clip3 function is a clipping function, and the Clip3 function is defined as follows:
Clip


3

(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
otherwise
.

### Claim 17 (depends on 14)

The apparatus according to claim 14, wherein the initial location coordinate value comprises at least one of a horizontal coordinate or a vertical coordinate of the collocated sub-block;
a horizontal coordinate of the collocated sub-block is the sum of a horizontal coordinate of the location of the sub-block and a horizontal component (xoff) of the target offset motion vector; and/or
a vertical coordinate of the collocated sub-block is the sum of a vertical coordinate of the location of the sub-block and a vertical component (yoff) of the target offset motion vector.

### Claim 18 (depends on 14)

The apparatus according to claim 14, wherein the initial location coordinate value of the collocated sub-block is derived as follows:
{
x
(
i
,
j
)
=
x
+
M
×
i
+
M
2
+
x
off
y
(
i
,
j
)
=
y
+
N
×
j
+
N
2
+
y
off
,
wherein
(x, y) represents location coordinates of the block, i represents the ith sub-block in the block in a horizontal direction, j represents the jth sub-block in the block in a vertical direction, (xoff, yoff) represents values of components of the target offset motion vector in the horizontal direction and the vertical direction, M and N are respectively a width and a height of the sub-block, and (x(i,j), y(i,j)) represents the initial location coordinate value of the collocated sub-block that corresponds to the (i, j)th sub-block.

### Claim 19 (depends on 18)

The apparatus according to claim 18, wherein (x, y) represents location coordinates of a top-left vertex of the block, and (x(i,j), y(i,j)) represents location coordinates of a center point or a top-left vertex of the collocated sub-block that corresponds to the (i, j)th sub-block.

### Claim 20 (depends on 14)

The apparatus according to claim 14, wherein
(
x
+
M
×
i
+
M
2
,
y
+
N
×
j
+
N
2
)
represents location coordinates of the (i, j)th sub-block, and (x, y) represents location coordinates of the block, i represents the ith sub-block in the block in a horizontal direction, j represents the jth sub-block in the block in a vertical direction, M and N are respectively a width and a height of the sub-block.

### Claim 21 (depends on 14)

The apparatus according to claim 14, wherein the range is determined based on a location and a size of a coding tree unit CTU in which the block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU.

### Claim 22 (depends on 21)

The apparatus according to claim 21, wherein the range is determined according to the following formulas:
HorMin=Max(CTUX−RangeL,0);
HorMax=Min(CTUX+CTUW+RangeR−1,PicW−1);
VerMin=Max(CTUY−RangeU,0); and
VerMax=Min(CTUY+CTUH+RangeB−1,PicH−1), wherein
HorMin and HorMax are respectively a minimum value and a maximum value of the range in the horizontal direction, VerMin and VerMax are respectively a minimum value and a maximum value of the range in the vertical direction, CTUX and CTUY represent location coordinates of the CTU in which the block is included, CTUW and CTUH represent a width and a height of the CTU in which the block is included, RangeU, RangeB, RangeL, and RangeR respectively represent extension range values that are in an up direction, a bottom direction, a left direction, and a right direction and that are of the temporal motion vector field of the CTU in which the block is included, and PicW and PicH are respectively a width and a height of the target picture.

### Claim 23 (depends on 21)

The apparatus according to claim 21, wherein a value of the extension range of the temporal motion vector field of the CTU (RangeU, RangeB, RangeL, RangeR) is a predetermined value.

### Claim 24 (depends on 14)

The apparatus according to claim 14, wherein upon execution of the instructions, the processor is further configured for:
scaling the motion vector corresponding to the target location coordinate value based on a picture order count POC of a picture comprising the sub-block, a POC of a target reference picture of the picture comprising the sub-block, a POC of the target picture, and a POC of a target reference picture of the target picture, to obtain the motion vector of the sub-block.

### Claim 25 (depends on 24)

The apparatus according to claim 24, wherein the motion vector of the sub-block is obtained according to the following formula:
MV
s
=
P


1
-
P


2
P


3
-
P


4
×
MV
,
wherein
P1 represents the P of the picture including the sub-block, P2 represents the POC of the target reference picture of the picture including the sub-block, P3 represents the POC of the target picture, P4 represents the POC of the target reference picture of the target picture, MV represents the motion vector corresponding to the target location coordinate value, and MVs represents the motion vector of the sub-block.

### Claim 26 (depends on 14)

The apparatus according to claim 14, wherein upon execution of the instructions, the processor is further configured for:
determining a motion vector of a spatially neighboring block of the block as the target offset vector.

### Claim 27 (depends on 14)

The apparatus according to claim 14, wherein the apparatus is a decoding apparatus or an encoding apparatus.

### Claim 28

A non-transitory computer-readable medium, comprising program code, wherein the program code is used to perform the method comprising:
determining a target offset vector of a block and identifier information of a target picture, wherein the block comprises at least one sub-block;
determining a location of the sub-block;
determining, as a target location coordinate value of a collocated sub-block, a location coordinate value obtained by performing a clipping operation on an initial location coordinate value of the collocated sub-block in a range, wherein the initial location coordinate value is determined based on the location of the sub-block and the target offset vector, and the collocated sub-block is in the target picture and corresponds to the sub-block, wherein the target picture is indicated by the identifier information;
obtaining a motion vector of the sub-block based on a motion vector corresponding to the target location coordinate value; and
encoding or decoding the sub-block using the motion vector of the sub-block.
