# US 11,445,181 B2 · Method and apparatus for predicting most probable intra-modes

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

- Number: US 11,445,181 B2
- Document ID: US11445181B2
- Status: Granted
- Kind: B2
- Application number: 17/205,350
- Filed: 2021-03-18
- Published: 2021-08-12
- Granted: 2022-09-13
- Earliest claimed: 2018-09-19
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Alexey Konstantinovich Filippov; Vasily Alexeevich Rufitskiy; Jianle Chen
- Web page: https://patentgrep.com/patent/US11445181B2

## 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/11: among a plurality of spatial predictive coding modes
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/423: characterised by memory arrangements (H04N19/433 takes precedence)
- H04N 19/593: involving spatial prediction techniques
- H04N 19/463: by compressing encoding parameters before transmission
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method for constructing a Most Probable Mode (MPM) list includes classifying each intra prediction mode derived from a neighboring block either as a valid or invalid subject to the mode direction and the position of its source block. Valid and invalid modes are considered most and least probable modes, respectively.

## Claims

### Claim 1

A method for constructing a Most Probable Mode (MPM) list for intra prediction, comprising:
obtaining a first intra prediction mode of a first neighbor block adjacent to a current block;
determining a validity for the first intra prediction mode when the first intra prediction mode is different from a second intra prediction mode of a second neighbor block;
storing the first intra prediction mode into a corresponding validity buffer of a plurality of validity buffers in response to determining the validity; and
fetching intra prediction modes from the validity buffers to store the intra prediction modes into the MPM list, wherein the fetching starts from a most valid buffer until either the MPM list contains a maximum number of the intra prediction modes or the intra prediction modes that are stored in the validity buffers are fetched into the MPM list, and wherein determining the validity comprises:
setting the validity to a first value, wherein the first value indicates a valid non-directional prediction mode; and
setting the validity to a second value when the first neighbor block is located on a left side of the current block, the first intra prediction mode is greater than or equal to a third value, and less than a difference of a fourth value and a fifth value,
wherein the second value indicates a valid directional prediction mode, wherein the third value is an index of a horizontal prediction mode, wherein the fourth value is an index of a vertical prediction mode, and wherein the fifth value is a pre-configured threshold.

### Claim 2 (depends on 1)

The method of claim 1, wherein the validity depends on whether the first intra prediction mode is a directional mode, a side of the current block on which the first neighbor block is located, or a direction of the first intra prediction mode.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the validity further comprises
setting the validity to the second value when the first neighbor block is located above the current block, the first intra prediction mode is greater than a sum of the third value and the fifth value, and the first intra prediction mode is less than or equal to the fifth value.

### Claim 4 (depends on 3)

The method of claim 3, wherein the fifth value is equal to 4.

### Claim 5 (depends on 4)

The method of claim 4, wherein a validity for a first validity buffer of the validity buffers is the second value, wherein a validity for a second validity buffer of the validity buffers is the first value, and wherein the first value is less than the second value.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
setting the validity to the second value when the first neighbor block is a left neighbor block or a below left neighbor block; and
setting the validity to a sixth value when the first intra prediction mode is greater than −10 and less than the third value, or when the first intra prediction mode is equal to or greater than a difference of the fourth value and the fifth value, and equal to or less than a sum of the fourth value and the fifth value, wherein the sixth value indicates a strictly invalid directional prediction mode.

### Claim 7 (depends on 6)

The method of claim 6, wherein the sixth value is lower than the second value and the first value.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
setting the validity to the second value when the first neighbor block is an above neighbor block or above right neighbor block; and
setting the validity to a sixth value when the first intra prediction mode is greater than the fourth value and is less than 76, or when the first intra prediction mode is equal to or greater than a difference of the third value and the fifth value, and equal to or less than a sum of the third value and the fifth value, wherein the sixth value indicates a strictly invalid directional prediction mode.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
setting the validity to the value when the first neighbor block is an above-left neighbor block; and
setting the validity to a second sixth value when the first intra prediction mode is greater than the third value and less than the fourth value, or when the first intra prediction mode is equal to or greater than a difference of a seventh value and the fifth value, and equal to or less than a sum of 2 and the fifth value, wherein the sixth value indicates strictly invalid directional prediction mode, and wherein the seventh value is an index of a vertical diagonal mode.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
storing the first intra prediction mode into a first buffer having a same validity identification as the first intra prediction mode;
checking whether a second buffer and a third buffer store a number of intra prediction modes that is equal to or greater than a MPM list size, wherein the second buffer is for the valid directional intra prediction mode, and wherein the third buffer is for valid non-directional first intra prediction mode value; and
filling the MPM list when the second buffer and the third buffer store the number of intra prediction modes that is equal to or greater than the MPM list size.

### Claim 11 (depends on 3)

The method of claim 3, wherein a buffer does not populate the MPM list and the first intra prediction mode is not stored to any of the validity buffers when the buffer and the first intra prediction mode have the validity of a seventh value, wherein the seventh value indicates a strictly invalid directional intra prediction mode.

### Claim 12 (depends on 1)

The method of claim 1, wherein vacant positions within the MPM list are filled by default modes when a number of intra prediction modes stored in the validity buffers is less than a size of the MPM list.

### Claim 13

A method for decoding an image, comprising:
inferring, from an encoded bitstream, a mode indication;
obtaining a first intra prediction mode of a first neighbor block adjacent to a current block;
determining a validity for the first intra prediction mode when the first intra prediction mode is different from a second intra prediction mode of a second neighbor block;
storing the first intra prediction mode into a corresponding validity buffer of a plurality of validity buffers in response to determining the validity;
fetching intra prediction modes from the validity buffers to store the intra prediction modes into a Most Probable Mode (MPM) list, wherein the fetching starts from a most valid buffer until either the MPM list contains a maximum number of prediction modes or the intra prediction modes that are stored in the validity buffers are fetched into the MPM list; and
reconstructing the current block in the image, according to the mode indication, as a pointer to the MPM list, wherein determining the validity comprises:
setting the validity to a first value, wherein the first value indicates a valid non-directional prediction mode; and
setting the validity to a second value when the first neighbor block is located on a left side of the current block, the first intra prediction mode is greater than or equal to a third value, and less than a difference of a fourth value and a fifth value,
wherein the second value indicates a valid directional prediction mode, wherein the third value is an index of a horizontal prediction mode, wherein the fourth value is an index of a vertical prediction mode, and wherein the fifth value is a pre-configured threshold.

### Claim 14

A method for encoding an image, comprising:
obtaining a first intra prediction mode of a first neighbor block adjacent to a current block;
determining a validity for the first intra prediction mode when the first intra prediction mode is different from a second intra prediction mode of a second neighbor block;
storing the first intra prediction mode into a corresponding validity buffer of a plurality of validity buffers in response to determining the validity;
fetching intra prediction modes from the validity buffers to store the intra prediction modes into a Most Probable Mode (MPM) list, wherein the fetching starts from a most valid buffer until either the MPM list contains a maximum number of prediction modes or the intra prediction modes that are stored in the validity buffers are fetched into the MPM list;
determining a mode indication for the current block as a pointer into the MPM list; and
including the mode indication into an encoded bitstream, wherein determining the validity comprises:
setting the validity to a first value, wherein the first value indicates a valid non-directional prediction mode; and
setting the validity to a second value when the first neighbor block is located on a left side of the current block, the first intra prediction mode is greater than or equal to a third value, and less than a difference of a fourth value and a fifth value,
wherein the second value indicates a valid directional prediction mode, wherein the third value is an index of a horizontal prediction mode, wherein the fourth value is an index of a vertical prediction mode, and wherein the fifth value is a pre-configured threshold.

### Claim 15

An apparatus for constructing a Most Probable Mode (MPM) list for intra prediction, comprising:
a processor; and
a memory coupled to the processor and configured to store instructions that, when executed by the processor, cause the apparatus to be configured to:
obtain a first intra prediction mode of a first neighbor block adjacent to a current block;
determine a validity for the first intra prediction mode when the first intra prediction mode is different from a second intra prediction mode of a second neighbor block;
store the first intra prediction mode into a corresponding validity buffer of a plurality of validity buffers in response to determining the validity; and
fetch intra prediction modes from the validity buffers to store the intra prediction modes into the MPM list, wherein the fetching starts from a most valid buffer until either the MPM list contains a maximum number of prediction modes or the intra prediction modes that are stored in the validity buffers are fetched into the MPM list, and wherein in a manner to determine the validity, the instructions that, when executed by the processor, further cause the apparatus to be configured to:
set the validity to a first value, wherein the first value indicates a valid non-directional prediction mode; and
set the validity to a second value when the first neighbor block is located on a left side of the current block, the first intra prediction mode is greater than or equal to a third value, and less than a difference of a fourth value and a fifth value,
wherein the second value indicates a valid directional prediction mode, wherein the third value is an index of a horizontal prediction mode, wherein the fourth value is an index of a vertical prediction mode, and wherein the fifth value is a pre-configured threshold.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the validity depends on at least one of whether the first intra prediction mode is a directional mode, a side of the current block on which the first neighbor block is located, or a direction of the first intra prediction mode.

### Claim 17 (depends on 15)

The apparatus of claim 15, wherein the instructions that, when executed by the processor, further cause the apparatus to be configured to
set the validity to the second value when the first neighbor block is located above the current block, the first intra prediction mode is greater than a sum of the third value and the fifth value, and the first intra prediction mode is less than or equal to the fourth value.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein the fifth value is equal to 4.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein a validity for a first buffer of the validity buffers is the second value, wherein a validity for a second buffer of the validity buffers is the first value, and wherein the first value is less than the second value.

### Claim 20 (depends on 17)

The apparatus of claim 17, wherein the instructions that, when executed by the processor, further cause the apparatus to be configured to:
set the validity for the first neighbor block to the second value when the first neighbor block is a left neighbor block or a below left neighbor block; and
set the validity for the first neighbor block to a sixth value when the first intra prediction mode is greater than −10 and is less than the third value, or when the first intra prediction mode is equal to or greater than a difference of the fourth value and the fifth value and equal to or less than a sum of the fourth value plus the fifth value, wherein the sixth value indicates a strictly invalid directional intra prediction mode.
