IP Library › Granted Patent US 12,425,633
Granted Patent B2
US 12,425,633 · App. 18/485,330 · Granted Sep 23, 2025

Motion vector obtaining method and apparatus

Inventors: Huanbang Chen (Shenzhen, CN); Yin Zhao (Hangzhou, CN); Haitao Yang (Shenzhen, CN); Jianle Chen (San Diego, CA)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04N19/513H04N19/176H04N19/189H04N19/567
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,425,633
App. No.
18/485,330
Granted
Sep 23, 2025
Kind
B2
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 (235)

1. A motion vector obtaining method for use in image encoding or image decoding implemented by a coding device, comprising:

determining a target offset motion vector of a to-be-processed block in a current picture and identifier information of a target picture, wherein the to-be-processed block comprises at least one to-be-processed sub-block;

determining, based on a location of the to-be-processed sub-block and the target offset motion vector, an initial location of a collocated sub-block that is of the to-be-processed sub-block and that is in the target picture;

determining the initial location as a target location when the initial location is inside a preset area of the target picture;

determining a location that is in the preset area and that is closest to the initial location as a target location when the initial location is outside the preset area; and

obtaining a motion vector of the to-be-processed sub-block based on a motion vector corresponding to the target location,

wherein

the preset area is represented by a horizontal coordinate value range and a vertical coordinate value range,

wherein 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, and

wherein the target location is determined according to 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

;

and

wherein one or more of HorMin, HorMax, VerMin or VerMax of the preset area is determined based on a location and a size of a coding tree unit (CTU) in which the to-be-processed block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU.

2. The method according to claim 1 , wherein the determining, based on the location of the to-be-processed sub-block and the target offset motion vector, the initial location of the collocated sub-block that is of the to-be-processed sub-block and that is in the target picture comprises:

offsetting location coordinates of the to-be-processed sub-block according to the following formulas, to obtain location coordinates of the initial location of the collocated sub-block that is of the to-be-processed sub-block and that is in the target picture:

{

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 a top-left vertex of the to-be-processed block, i represents the i th sub-block in the to-be-processed block in a horizontal direction, j represents the j th sub-block in the to-be-processed block in a vertical direction, (x off , y off ) 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 to-be-processed sub-block, and (x (i,j) , y (i,j) ) represents the location coordinates of the (i, j) th collocated sub-block.

3. The method according to claim 1 , wherein the extension range of the temporal motion vector field of the current CTU comprises: an extension range of the temporal motion vector field of the current CTU in a horizontal direction and an extension range of the temporal motion vector field of the current CTU in a vertical direction.

4. The method according to claim 1 , wherein information about the extension range of the temporal motion vector field of the current CTU is carried in at least one of a sequence parameter set SPS, a picture parameter set PPS, or a header field.

5. The method according to claim 1 , wherein a value of the extension range of the temporal motion vector field of the CTU is a predetermined value.

6. The method according to claim 1 , wherein the preset area is obtained through calculation according to following formulas:

HorMin=Max(CTUX−Range L, 0);

HorMax=Min(CTUX+CTUW+Range R −1,Pic W −1);

VerMin=Max(CTUY−Range U, 0); and

VerMax=Min(CTUY+CTUH+Range B −1,Pic H −1), wherein

HorMin and HorMax are respectively a minimum value and a maximum value of the preset area in the horizontal direction, VerMin and VerMax are respectively a minimum value and a maximum value of the preset area in the vertical direction, CTUX and CTUY represent location coordinates of the CTU in which the to-be-processed block is included, CTUW and CTUH represent a width and a height of the CTU in which the to-be-processed block is included, RangeU, RangeB, RangeL, and RangeR respectively represent extension 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 to-be-processed block is included, and PicW and PicH are respectively a width and a height of the target picture.

7. The method according to claim 6 , wherein RangeU, RangeB, RangeL, or RangeR is a predetermined value.

8. The method according to claim 1 , wherein the determining the target offset motion vector of a to-be-processed block comprises:

determining a motion vector of a spatially neighboring block of the to-be-processed block as the target offset motion vector.

9. The method according to claim 1 , wherein the target location indicates a target location of the collocated sub-block of the to-be-processed sub-block.

10. The method according to claim 1 , wherein the target offset vector is a temporal vector.

11. A coding apparatus, comprising:

at least one processor; and

one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to cause the coding apparatus to:

determine a target offset motion vector of a to-be-processed block in a current picture and identifier information of a target picture, wherein the to-be-processed block comprises at least one to-be-processed sub-block;

determine, based on a location of the to-be-processed sub-block and the target offset motion vector, an initial location of a collocated sub-block that is of the to-be-processed sub-block and that is in the target picture;

determine the initial location as a target location when the initial location is inside a preset area of the target picture;

determine a location that is in the preset area and that is closest to the initial location as a target location when the initial location is outside the preset area; and

obtain a motion vector of the to-be-processed sub-block based on a motion vector corresponding to the target location,

wherein

the preset area 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, and

wherein the target location is determined according to 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

;

and

wherein one or more of HorMin, HorMax, VerMin or VerMax of the preset area is determined based on a location and a size of a coding tree unit (CTU) in which the to-be-processed block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU.

12. The apparatus according to claim 11 , wherein the at least one processor further executes the instructions to:

offsetting location coordinates of the to-be-processed sub-block according to the following formulas, to obtain location coordinates of the initial location of the collocated sub-block that is of the to-be-processed sub-block and that is in the target picture:

{

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 a top-left vertex of the to-be-processed block, i represents the i th sub-block in the to-be-processed block in a horizontal direction, j represents the j th sub-block in the to-be-processed block in a vertical direction, (x off , y off ) 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 to-be-processed sub-block, and (x (i,j) , y (i,j) ) represents the location coordinates of the (i, j) th collocated sub-block.

13. The apparatus according to claim 11 , wherein the extension range of the temporal motion vector field of the current CTU comprises: an extension range of the temporal motion vector field of the current CTU in a horizontal direction and an extension range of the temporal motion vector field of the current CTU in a vertical direction.

14. The apparatus according to claim 11 , wherein information about the extension range of the temporal motion vector field of the current CTU is carried in at least one of a sequence parameter set SPS, a picture parameter set PPS, or a header field.

15. The apparatus according to claim 11 , wherein a value of the extension range of the temporal motion vector field of the CTU is a predetermined value.

16. The apparatus according to claim 11 , wherein the preset area is obtained through calculation according to following formulas:

HorMin=Max(CTUX−Range L, 0);

HorMax=Min(CTUX+CTUW+Range R −1,Pic W −1);

VerMin=Max(CTUY−Range U, 0); and

VerMax=Min(CTUY+CTUH+Range B −1,Pic H −1), wherein

HorMin and HorMax are respectively a minimum value and a maximum value of the preset area in the horizontal direction, VerMin and VerMax are respectively a minimum value and a maximum value of the preset area in the vertical direction, CTUX and CTUY represent location coordinates of the CTU in which the to-be-processed block is included, CTUW and CTUH represent a width and a height of the CTU in which the to-be-processed block is included, RangeU, RangeB, RangeL, and RangeR respectively represent extension 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 to-be-processed block is included, and PicW and PicH are respectively a width and a height of the target picture.

17. The apparatus according to claim 16 , wherein RangeU, RangeB, RangeL, or RangeR is a predetermined value.

18. A non-transitory computer-readable medium storing computer instructions that, when executed by one or more processors, cause the one or more processors to perform operations of obtaining a motion vector in image encoding or image decoding, the operations comprising:

determining a target offset motion vector of a to-be-processed block in a current picture and identifier information of a target picture, wherein the to-be-processed block comprises at least one to-be-processed sub-block;

determining, based on a location of the to-be-processed sub-block and the target offset motion vector, an initial location of a collocated sub-block that is of the to-be-processed sub-block and that is in the target picture;

determining the initial location as a target location when the initial location is inside a preset area of the target picture;

determining a location that is in the preset area and that is closest to the initial location as a target location when the initial location is outside the preset area; and

obtaining a motion vector of the to-be-processed sub-block based on a motion vector corresponding to the target location,

wherein

the preset area 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, and

wherein the target location is determined according to 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

and

wherein one or more of HorMin, HorMax, VerMin or VerMax of the preset area is determined based on a location and a size of a coding tree unit (CTU) in which the to-be-processed block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU.

Priority Claims (1)
CN 201810564560.8 · Jun 4, 2018 · national
Continuity (4)
Continuation 17898044 · Aug 29, 2022
Continuation 17111376 · Dec 3, 2020
Continuation PCTCN2019090031 · Jun 4, 2019
Related Publication 20240121421A1 · Apr 11, 2024
References Cited (29)
US 11184636B2 · Aono et al. · 2021 [cited by applicant]
US 20150146780A1 · Miyoshi et al. · 2015 [cited by applicant]
US 20150264351A1 · Miyoshi · 2015 [cited by applicant]
US 20160021386A1 · Fishwick · 2016 [cited by applicant]
US 20160337661A1 · Pang et al. · 2016 [cited by applicant]
US 20170332099A1 · Lee et al. · 2017 [cited by applicant]
US 20180359483A1 · Chen et al. · 2018 [cited by applicant]
US 20200177911A1 · Aono et al. · 2020 [cited by applicant]
US 20210051340A1 · Xiu · 2021 [cited by examiner]
US 20210067798A1 · Chujoh · 2021 [cited by examiner]
US 20210176485A1 · Chuang et al. · 2021 [cited by applicant]
US 20210195227A1 · Lee et al. · 2021 [cited by applicant]
CN 101291433A · 2008 [cited by applicant]
CN 103716629A · 2014 [cited by applicant]
CN 104918057A · 2015 [cited by applicant]
CN 105532001A · 2016 [cited by applicant]
CN 105939475A · 2016 [cited by applicant]
CN 106537915A · 2017 [cited by applicant]
CN 107027032A · 2017 [cited by applicant]
CN 108076347A · 2018 [cited by applicant]
EP 2672708A2 · 2013 [cited by applicant]
EP 3739885A1 · 2020 [cited by applicant]
JP 7177181B2 · 2022 [cited by applicant]
WO 2016123081A1 · 2016 [cited by applicant]
WO 2019192491A1 · 2019 [cited by applicant]
Xiaoyu Xiu (InterDigital Communications, Inc) et al, CE4-related: Mismatch between text specification and reference software on clipping the positions of collocated blocks for alternative te mporal motion vector predict… [cited by applicant]
Fangdong Chen et al., “Research on Background Modeling Based High Efficiency Video Coding Method”,May 6, 2017,total:136pages. [cited by applicant]
Recommendation ITU-T H.265,“High efficiency video coding”, Apr. 29, 2015, total 634 pages. [cited by applicant]
Jianle Chen et al., “Algorithm Description of Joint Exploration Test Model 1”,oint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11,1nd Meeting: Geneva, CH, 19 Oct. 21, 2015,JVET-A1001, to… [cited by applicant]