Patentable/Patents/US-12250396
US-12250396

Affine prediction method and related devices

PublishedMarch 11, 2025
Assigneenot available in USPTO data we have
Inventorsnot available in USPTO data we have
Technical Abstract

The present provides an affine prediction method and related devices. The method may include: dividing a current coding block into multiple sub-blocks, and determining an initial prediction value of all pixels in each of the sub-blocks; dividing each of the sub-blocks into multiple fraction blocks, wherein at least one of the fraction blocks comprises at least two integer pixels; determining a motion vector difference and a gradient of each of the fraction blocks; calculating a pixel compensation value of each of the fraction blocks based on the motion vector difference value and the gradient; taking the pixel compensation value of each of the fraction blocks as a pixel compensation value of all pixels in each of the fraction blocks; and calculating a final prediction value of each pixel in the current coding block by the initial prediction value of each pixel and the pixel compensation value.

Patent Claims
16 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. An affine prediction method, comprising: dividing a current coding block into multiple sub-blocks, and determining an initial prediction value of all pixels in each of the sub-blocks; dividing each of the sub-blocks into multiple fraction blocks, wherein at least one of the fraction blocks comprises at least two integer pixels; determining a motion vector difference and a gradient of each of the fraction blocks; calculating a pixel compensation value of each of the fraction blocks based on the motion vector difference value and the gradient; taking the pixel compensation value of each of the fraction blocks as a pixel compensation value of all pixels in each of the fraction blocks; and calculating a final prediction value of each pixel in the current coding block by the initial prediction value of each pixel and the pixel compensation value; setting an identifier in a coding result of the current coding block or a coding result of a slice to which the current coding block belongs, wherein different identifiers indicate different prediction modes, the identifiers are set to different values to represent the positions of the first center point and the second center point, the division method configured to divide the sub-block into multiple fraction block, and different combinations of gradient calculation methods; wherein the first center point is any pixel of all integer pixels and all fraction pixels in the sub-block to which the first center point belongs; or the first center point is any pixel of all integer pixels in the sub-block to which the first center point belongs; or the first center point is any pixel of all fraction pixels in the sub-block to which the first center point belongs; the second center point is any pixel of all integer pixels and all fraction pixels in the sub-block to which the second center point belongs; or the second center point is any pixel of all integer pixels in the sub-block to which the second center point belongs; or the second center point is any pixel of all fraction pixels in the sub-block to which the second center point belongs.

2

2. The method as claimed in claim 1, wherein the dividing each of the sub-blocks into the multiple fraction blocks, comprises: dividing each of the sub-blocks into the multiple fraction blocks by a same division method; the determining the motion vector difference and the gradient of each of the fraction blocks, comprises: calculating the motion vector difference of all of the fraction blocks in any sub-block, and taking the motion vector difference of each of the fraction blocks in the any sub-block as a motion vector difference of a corresponding block in other sub-blocks.

3

3. The method as claimed in claim 1, wherein all of the fraction blocks have a same width, and all of the fraction blocks have a same height; and the width and height of each of fraction blocks are integers.

4

4. The method as claimed in claim 1, wherein the determining the motion vector difference and the gradient of each of the fraction blocks, comprises: taking a pixel from all integer pixels and all fraction pixels of each of the fraction blocks as a representative pixel; or taking a pixel from all integer pixels of each of the fraction blocks as a representative pixel; or taking a pixel from all fraction pixels of each of the fraction blocks as a representative pixel.

5

5. The method as claimed in claim 4, wherein after the taking the pixel from all of the integer pixels and all of the fraction pixels of each of the fraction blocks as the representative pixel or the taking the pixel from all of the integer pixels of each of the fraction blocks as the representative pixel or the taking the pixel from all of the fraction pixels of each of the fraction blocks as the representative pixel, the determining the motion vector difference and the gradient of each of the fraction blocks, further comprises: calculating a motion vector difference and a gradient of the representative pixel, and taking the motion vector difference and the gradient of the representative pixel as a motion vector difference and the gradient of the fraction block to which the representative pixel belongs.

6

6. The method as claimed in claim 5, wherein the dividing the current coding block into the multiple sub-blocks, and the determining the initial prediction value of each of the sub-blocks, comprises: calculating a motion vector of each of the sub-blocks based on an offset of the first center point of each sub-block relative to an upper left point of the current coding block, and determining the initial prediction values of all pixels in the each of the sub-blocks according to the motion vector of each of the sub-blocks; the calculating the motion vector difference and the gradient of the representative pixel, comprises: calculating the motion vector difference of the representative pixel according to a horizontal offset value and a vertical offset value of the representative pixel relative to the second center point of the sub-block to which the representative pixel belongs; wherein positions of the first center point and the second center point in each of the sub-blocks are same.

7

7. The method as claimed in claim 6, wherein the offset of the first center point relative to the upper left point of the sub-block to which the first center point belongs is (2, 2) or (1.5, 1.5).

8

8. The method as claimed in claim 1, wherein the determining the motion vector difference and the gradient of each of the fraction blocks, comprises: calculating the gradient of each of the fraction blocks based on a gradient calculation method; wherein the gradient calculation method comprises a three-tap filter, a Robert gradient operator, a Sobel operator, and a Prewitt operator.

9

9. A codec, comprising a memory and a processor coupled to each other, wherein the memory stores a program file configured to realize an affine prediction method, which comprises: dividing a current coding block into multiple sub-blocks, and determining an initial prediction value of all pixels in each of the sub-blocks; dividing each of the sub-blocks into multiple fraction blocks, wherein at least one of the fraction blocks comprises at least two integer pixels; determining a motion vector difference and a gradient of each of the fraction blocks; calculating a pixel compensation value of each of the fraction blocks based on the motion vector difference value and the gradient; taking the pixel compensation value of each of the fraction blocks as a pixel compensation value of all pixels in each of the fraction blocks; and calculating a final prediction value of each pixel in the current coding block by the initial prediction value of each pixel and the pixel compensation value; setting an identifier in a coding result of the current coding block or a coding result of a slice to which the current coding block belongs, wherein different identifiers indicate different prediction modes, the identifiers are set to different values to represent the positions of the first center point and the second center point, the division method configured to divide the sub-block into multiple fraction block, and different combinations of gradient calculation methods; wherein the first center point is any pixel of all integer pixels and all fraction pixels in the sub-block to which the first center point belongs; or the first center point is any pixel of all integer pixels in the sub-block to which the first center point belongs; or the first center point is any pixel of all fraction pixels in the sub-block to which the first center point belongs; the second center point is any pixel of all integer pixels and all fraction pixels in the sub-block to which the second center point belongs; or the second center point is any pixel of all integer pixels in the sub-block to which the second center point belongs; or the second center point is any pixel of all fraction pixels in the sub-block to which the second center point belongs.

10

10. The codec as claimed in claim 9, wherein the dividing each of the sub-blocks into the multiple fraction blocks, comprises: dividing each of the sub-blocks into the multiple fraction blocks by a same division method; the determining the motion vector difference and the gradient of each of the fraction blocks, comprises: calculating the motion vector difference of all of the fraction blocks in any sub-block, and taking the motion vector difference of each of the fraction blocks in the any sub-block as a motion vector difference of a corresponding block in other sub-blocks.

11

11. The codec as claimed in claim 9, wherein all of the fraction blocks have a same width, and all of the fraction blocks have a same height; and the width and height of each of fraction blocks are integers.

12

12. The codec as claimed in claim 9, wherein the determining the motion vector difference and the gradient of each of the fraction blocks, comprises: taking a pixel from all integer pixels and all fraction pixels of each of the fraction blocks as a representative pixel; or taking a pixel from all integer pixels of each of the fraction blocks as a representative pixel; or taking a pixel from all fraction pixels of each of the fraction blocks as a representative pixel; calculating a motion vector difference and a gradient of the representative pixel, and taking the motion vector difference and the gradient of the representative pixel as a motion vector difference and the gradient of the fraction block to which the representative pixel belongs.

13

13. The codec as claimed in claim 12, wherein the dividing the current coding block into the multiple sub-blocks, and the determining the initial prediction value of each of the sub-blocks, comprises: calculating a motion vector of each of the sub-blocks based on an offset of the first center point of each sub-block relative to an upper left point of the current coding block, and determining the initial prediction values of all pixels in the each of the sub-blocks according to the motion vector of each of the sub-blocks; the calculating the motion vector difference and the gradient of the representative pixel, comprises: calculating the motion vector difference of the representative pixel according to a horizontal offset value and a vertical offset value of the representative pixel relative to the second center point of the sub-block to which the representative pixel belongs; wherein positions of the first center point and the second center point in each of the sub-blocks are same.

14

14. The codec as claimed in claim 13, wherein the offset of the first center point relative to the upper left point of the sub-block to which the first center point belongs is (2, 2) or (1.5, 1.5).

15

15. The codec as claimed in claim 9, wherein the determining the motion vector difference and the gradient of each of the fraction blocks, comprises: calculating the gradient of each of the fraction blocks based on a gradient calculation method; wherein the gradient calculation method comprises a three-tap filter, a Robert gradient operator, a Sobel operator, and a Prewitt operator.

16

16. A storage device, comprising a program file, and configured to realize an affine prediction method comprising: dividing a current coding block into multiple sub-blocks, and determining an initial prediction value of all pixels in each of the sub-blocks; dividing each of the sub-blocks into multiple fraction blocks, wherein at least one of the fraction blocks comprises at least two integer pixels; determining a motion vector difference and a gradient of each of the fraction blocks; calculating a pixel compensation value of each of the fraction blocks based on the motion vector difference value and the gradient; taking the pixel compensation value of each of the fraction blocks as a pixel compensation value of all pixels in each of the fraction blocks; and calculating a final prediction value of each pixel in the current coding block by the initial prediction value of each pixel and the pixel compensation value; setting an identifier in a coding result of the current coding block or a coding result of a slice to which the current coding block belongs, wherein different identifiers indicate different prediction modes, the identifiers are set to different values to represent the positions of the first center point and the second center point, the division method configured to divide the sub-block into multiple fraction block, and different combinations of gradient calculation methods; wherein the first center point is any pixel of all integer pixels and all fraction pixels in the sub-block to which the first center point belongs; or the first center point is any pixel of all integer pixels in the sub-block to which the first center point belongs; or the first center point is any pixel of all fraction pixels in the sub-block to which the first center point belongs; the second center point is any pixel of all integer pixels and all fraction pixels in the sub-block to which the second center point belongs; or the second center point is any pixel of all integer pixels in the sub-block to which the second center point belongs; or the second center point is any pixel of all fraction pixels in the sub-block to which the second center point belongs.

Classification Codes (CPC)

Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.

Patent Metadata

Filing Date

May 9, 2022

Publication Date

March 11, 2025

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “Affine prediction method and related devices” (US-12250396). https://patentable.app/patents/US-12250396

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.

Affine prediction method and related devices — Feiyang Zeng | Patentable