# US 12,771,829 B2 · Intra prediction method and device, decoder, and encoder

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

- Number: US 12,771,829 B2
- Document ID: US12771829B2
- Status: Granted
- Kind: B2
- Application number: 18/205,109
- Filed: 2023-06-02
- Published: 2023-10-05
- Granted: 2026-10-20
- Earliest claimed: 2020-12-03
- Assignees: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Applicants: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Inventors: Fan Wang
- Web page: https://patentgrep.com/patent/US12771829B2

## CPC

- H04N 19/11: among a plurality of spatial predictive coding modes
- 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/176: the region being a block, e.g. a macroblock
- H04N 19/593: involving spatial prediction techniques
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An intra-frame prediction method and device, a decoder, and an encoder. The method comprises: performing intra prediction on a block to be processed by using two or more different intra prediction modes, to obtain two or more prediction blocks corresponding to the different intra prediction modes; and obtaining a target prediction block of the block to be processed based on weight matrices and the obtained two or more prediction blocks.

## Claims

### Claim 1

An intra prediction method, applicable to a decoder, and comprising:
performing intra prediction on a block to be processed by using two or more different intra prediction modes, to obtain two or more prediction blocks corresponding to the different intra prediction modes; and
obtaining a target prediction block of the block to be processed based on weight matrices and the obtained two or more prediction blocks;
wherein the intra prediction modes comprise a first intra prediction mode and a second intra prediction mode different from the first intra prediction mode, the prediction blocks comprise a first prediction block corresponding to the first intra prediction mode and a second prediction block corresponding to the second intra prediction mode, and the weight matrices comprise a first weight matrix and a second weight matrix; wherein the first intra prediction mode comprise one or more of: a direct current (DC) mode, a planar mode, a plane mode, a bilinear mode, and an angular prediction mode, the second intra prediction mode comprises one of: improving a sub-pixel interpolation of a reference pixel, or filtering a prediction pixel; and
obtaining the target prediction block of the block to be processed based on the weight matrices and the obtained two or more prediction blocks comprises:
calculating a first product of the first prediction block and the first weight matrix and calculating a second product of the second prediction block and the second weight matrix;
calculating a sum of the first product, the second product and a preset value of 4; and
right shifting the calculated sum by a preset number of bits to obtain the target prediction block;
wherein the second weight matrix is a difference between a maximum weight and the first weight matrix.

### Claim 2 (depends on 1)

The intra prediction method according to claim 1, wherein before obtaining the two or more prediction blocks corresponding to the different intra prediction modes, the method further comprises:
parsing a bitstream to obtain the two or more different intra prediction modes, the block to be processed, and the weight matrices.

### Claim 3 (depends on 1)

The intra prediction method according to claim 1, wherein the maximum weight is 8, and the preset number of bits is 3.

### Claim 4 (depends on 1)

The intra prediction method according to claim 1, wherein at least one of all possible weight matrices comprises at least two different weights.

### Claim 5 (depends on 4)

The intra prediction method according to claim 4, wherein one of all the possible weight matrices comprises a plurality of types of weights, wherein a maximum weight and a minimum weight of the weights respectively indicate that prediction values of corresponding points are derived exclusively from a value of the corresponding point in the first prediction block and a value of the corresponding point in the second prediction block; and a weight other than the maximum weight and the minimum weight indicates that a prediction value of a corresponding point is derived from a weighted average of values of the corresponding point in the first prediction block and the second prediction block.

### Claim 6 (depends on 1)

The intra prediction method according to claim 1, wherein a width and a height of the block to be processed or the target prediction block comprise:
the width is greater than or equal to a first threshold TH1 and the height is greater than or equal to a second threshold TH2; or
the width is less than or equal to a fourth threshold TH4 and the height is less than or equal to a fifth threshold TH5;
wherein the first threshold TH1 is equal to the second threshold TH2, and the first threshold TH1 is 8.

### Claim 7 (depends on 1)

The intra prediction method according to claim 1, further comprising:
storing intra prediction mode information used in the intra prediction method;
wherein storing the intra prediction modes used in the intra prediction method comprises:
storing different intra prediction modes in at least two minimum units.

### Claim 8 (depends on 1)

The intra prediction method according to claim 1, wherein one of the two intra prediction modes first intra prediction mode and the second intra prediction mode is determined based on information about the other intra prediction mode;
wherein the first intra prediction mode and the second intra prediction mode use a most probable mode (MPM).

### Claim 9 (depends on 1)

The intra prediction method according to claim 1, wherein before obtaining the two or more prediction blocks corresponding to the different intra prediction modes, the method further comprises:
parsing a bitstream to obtain a flag, wherein the flag is a coding unit (CU) level flag for indicating whether to proceed with obtaining the two or more prediction blocks corresponding to the different intra prediction modes.

### Claim 10

A decoder, comprising a processor, configured to:
decode a received bitstream, to obtain two or more different intra prediction modes, a block to be processed, and weight matrices;
perform intra prediction on the block to be processed by using the two or more different intra prediction modes, to obtain two or more prediction blocks corresponding to the different intra prediction modes; and
obtain a target prediction block of the block to be processed based on the weight matrices and the obtained two or more prediction blocks;
wherein the intra prediction modes comprise a first intra prediction mode and a second intra prediction mode different from the first intra prediction mode, the prediction blocks comprise a first prediction block corresponding to the first intra prediction mode and a second prediction block corresponding to the second intra prediction mode, and the weight matrices comprise a first weight matrix and a second weight matrix; wherein the first intra prediction mode comprise one or more of: a direct current (DC) mode, a planar mode, a plane mode, a bilinear mode, and an angular prediction mode, the second intra prediction mode comprises one of: improving a sub-pixel interpolation of a reference pixel, or filtering a prediction pixel; and the processor is further configured to:
calculate a first product of the first prediction block and the first weight matrix and calculate a second product of the second prediction block and the second weight matrix;
calculate a sum of the first product, the second product and a preset value of 4; and
right shift the calculated sum by a preset number of bits to obtain the target prediction block;
wherein the second weight matrix is a difference between a maximum weight and the first weight matrix.

### Claim 11 (depends on 10)

The decoder according to claim 10, wherein the processor is further configured to: parse a bitstream to obtain a flag, wherein the flag is a coding unit (CU) level flag for indicating whether to proceed with obtaining the two or more prediction blocks corresponding to the different intra prediction modes.

### Claim 12

An intra prediction method, applicable to an encoder and comprising:
performing intra prediction on a block to be processed by using two or more different intra prediction modes, to obtain two or more prediction blocks corresponding to the different intra prediction mode; and
obtaining a target prediction block of the block to be processed based on weight matrices and the obtained two or more prediction blocks;
wherein the intra prediction modes comprise a first intra prediction mode and a second intra prediction mode different from the first intra prediction mode, the prediction blocks comprise a first prediction block corresponding to the first intra prediction mode and a second prediction block corresponding to the second intra prediction mode, and the weight matrices comprise a first weight matrix and a second weight matrix; wherein the first intra prediction mode comprise one or more of: a direct current (DC) mode, a planar mode, a plane mode, a bilinear mode, and an angular prediction mode, the second intra prediction mode comprises one of: improving a sub-pixel interpolation of a reference pixel, or filtering a prediction pixel; and
obtaining the target prediction block of the block to be processed based on the weight matrices and the obtained two or more prediction blocks comprises:
calculating a first product of the first prediction block and the first weight matrix and calculating a second product of the second prediction block and the second weight matrix;
calculating a sum of the first product, the second product and a preset value of 4; and
right shifting the calculated sum by a preset number of bits to obtain the target prediction block;
wherein the second weight matrix is a difference between a maximum weight and the first weight matrix.

### Claim 13 (depends on 12)

The intra prediction method according to claim 12, wherein before obtaining the two or more prediction blocks corresponding to the different intra prediction modes, the method further comprises:
setting a flag, wherein the flag is a coding unit (CU) level flag for indicating a decoder whether to proceed with obtaining the two or more prediction blocks corresponding to the different intra prediction modes.
