# US 2025/0220201 A1 · Chroma block prediction 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 2025/0220201 A1
- Document ID: US20250220201A1
- Status: Published application
- Kind: A1
- Application number: 19/025,809
- Filed: 2025-01-16
- Published: 2025-07-03
- Earliest claimed: 2019-01-03
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Xiang MA; Fan MU; Yin ZHAO; Haitao YANG
- Web page: https://patentgrep.com/patent/US20250220201A1

## CPC

- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- 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/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/593: involving spatial prediction techniques
- H04N 19/61: in combination with predictive coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

This application provides a chroma block prediction method and apparatus. The method includes: obtaining chroma values of chroma samples; obtaining, luma values of luma samples corresponding to the chroma samples; obtaining, from the luma values, a first luma set and a second luma set; grouping the chroma values into a first chroma set and a second chroma set; determining a scaling coefficient in a linear model based on an average value of luma values in the first luma set, an average value of luma values in the second luma set, an average value of chroma values in the first chroma set, and an average value of chroma values in the second chroma set; determining, based on the scaling coefficient, an offset factor in the linear model; and determining prediction information of the chroma block based on the scaling coefficient and the offset factor.

## Claims

### Claim 1

A chroma block prediction method implemented by a decoder, wherein the method comprises:
obtaining a bitstream;
parsing the bitstream to obtain indication information, wherein the indication information is used to indicate an intra prediction mode corresponding to a chroma block, wherein the intra prediction mode is a linear mode above (LMA) mode;
determining preset locations based on the intra prediction mode;
obtaining four chroma values of chroma samples at the preset locations;
obtaining, based on neighboring samples of a luma block corresponding to the chroma block, four luma values of luma samples corresponding to the four chroma values;
classifying the four luma values into two smaller luma values and two larger luma values by sorting the four luma values;
grouping the two smaller luma values into a first luma set, and grouping the two larger luma values into a second luma set;
grouping chroma values of chroma samples corresponding to luma samples associated with luma values in the first luma set into a first chroma set, and grouping chroma values of chroma samples corresponding to luma samples associated with luma values in the second luma set into a second chroma set;
determining a scaling coefficient in a linear model corresponding to the chroma block based on an average value of the luma values in the first luma set, an average value of the luma values in the second luma set, an average value of the chroma values in the first chroma set, and an average value of the chroma values in the second chroma set;
determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block; and
determining a prediction block of the chroma block based on the scaling coefficient, the offset factor, and luma reconstruction information corresponding to the chroma block, wherein the luma reconstruction information comprises downsampling information of a luma reconstructed block corresponding to the chroma block;
obtaining a reconstructed residual block based on the bitstream; and
adding the reconstructed residual block to the prediction block to obtain a reconstructed block of the chroma block.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the obtaining the four chroma values of the chroma samples comprises:
obtaining the chroma values of the chroma samples at preset locations from neighboring samples of the chroma block based on a preset correspondence between an intra prediction mode and a preset location and the intra prediction mode corresponding to the chroma block.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the classifying the four luma values into two smaller luma values and two larger luma values by sorting the four luma values comprises:
sorting the four luma values of the luma samples corresponding to the chroma samples at preset locations in ascending order, to obtain a first luma value queue, a first half part in the first luma value queue comprises the two smaller luma values of the first luma value queue, and a second half part in the first luma value queue comprises the two larger luma values of the first luma value queue; or
sorting the four luma values of the luma samples corresponding to the chroma samples at the preset locations in descending order, to obtain a second luma value queue, a first half part in the second luma value queue comprises the two larger luma values of the second luma value queue, and a second half part in the second luma value queue comprises the two smaller luma values of the second luma value queue.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block comprises:
determining, based on the scaling coefficient, the average value of the chroma values in the first chroma set, and the average value of the luma values in the first luma set, the offset factor in the linear model corresponding to the chroma block.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the determining, based on the scaling coefficient, the average value of the chroma values in the first chroma set, and the average value of the luma values in the first luma set, the offset factor in the linear model corresponding to the chroma block comprises:
β=CLmean−α*LLmean, wherein a is the scaling coefficient, β is the offset factor in the linear model corresponding to the chroma block, CLmean is the average value of the chroma values in the first chroma set, and LLmean is the average value of the luma values in the first luma set.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block comprises:
determining, based on the scaling coefficient, an average value of the chroma values of the chroma samples at preset locations, and the average value of the luma values of the luma samples corresponding to the chroma samples, the offset factor in the linear model corresponding to the chroma block.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the determining, based on the scaling coefficient, an average value of the chroma values of the chroma samples at the preset locations, and the average value of the luma values of the luma samples corresponding to the chroma samples, the offset factor in the linear model corresponding to the chroma block comprises:
β=Cmean−α*Lmean, wherein α is the scaling coefficient, β is the offset factor in the linear model corresponding to the chroma block, Cmean is the average value of the chroma values of the chroma samples at the preset locations, and Lmean is the average value of the luma values of the luma samples corresponding to the chroma samples at the preset locations.

### Claim 8

A chroma block prediction apparatus, comprising:
one or more processors; and
a computer-readable storage medium coupled to the one or more processors and storing instructions for execution by the one or more processors, wherein the instructions, when executed by the one or more processors, cause the apparatus to perform operations comprising:
obtaining a bitstream;
parsing the bitstream to obtain indication information, wherein the indication information is used to indicate an intra prediction mode corresponding to a chroma block, wherein the intra prediction mode is a linear mode above (LMA) mode;
determining preset locations based on the intra prediction mode;
obtaining four chroma values of chroma samples at the preset locations;
obtaining, based on neighboring samples of a luma block corresponding to the chroma block, four luma values of luma samples corresponding to the four chroma values;
classifying the four luma values into two smaller luma values and two larger luma values by sorting the four luma values;
grouping the two smaller luma values into a first luma set, and grouping the two larger luma values into a second luma set;
grouping chroma values of chroma samples corresponding to luma samples associated with luma values in the first luma set into a first chroma set, and grouping chroma values of chroma samples corresponding to luma samples associated with luma values in the second luma set into a second chroma set;
determining a scaling coefficient in a linear model corresponding to the chroma block based on an average value of the luma values in the first luma set, an average value of the luma values in the second luma set, an average value of the chroma values in the first chroma set, and an average value of the chroma values in the second chroma set;
determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block; and
determining a prediction block of the chroma block based on the scaling coefficient, the offset factor, and luma reconstruction information corresponding to the chroma block, wherein the luma reconstruction information comprises downsampling information of a luma reconstructed block corresponding to the chroma block;
obtaining a reconstructed residual block based on the bitstream; and
adding the reconstructed residual block to the prediction block to obtain a reconstructed block of the chroma block.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein the one or more processors are further configured to:
obtain the chroma values of the chroma samples at preset locations from the neighboring samples of the chroma block based on a preset correspondence between an intra prediction mode and a preset location and the intra prediction mode corresponding to the chroma block.

### Claim 10 (depends on 8)

The apparatus according to claim 8, wherein the one or more processors are configured to:
sort the four luma values of the luma samples corresponding to the chroma samples at the preset locations in ascending order, to obtain a first luma value queue, a first half part in the first luma value queue comprises the two smaller luma values of the first luma value queue, and a second half part in the first luma value queue comprises the two larger luma values of the first luma value queue; or
sort the four luma values of the luma samples corresponding to the chroma samples at the preset locations in descending order, to obtain a second luma value queue, a first half part in the second luma value queue comprises the two larger luma values of the second luma value queue, and a second half part in the second luma value queue comprises the two smaller luma values of the second luma value queue.

### Claim 11 (depends on 8)

The apparatus according to claim 8, wherein the one or more processors are configured to:
determine, based on the scaling coefficient, the average value of the chroma values in the first chroma set, and the average value of the luma values in the first luma set, the offset factor in the linear model corresponding to the chroma block.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the offset factor in the linear model corresponding to the chroma block is represented by: β=CLmean−α*LLmean, wherein a is the scaling coefficient, β is the offset factor in the linear model corresponding to the chroma block, CLmean is the average value of the chroma values in the first chroma set, and LLmean is the average value of the luma values in the first luma set.

### Claim 13

A non-transitory computer-readable storage medium storing a bitstream that, when decoded by a coding device, is used by the coding device to generate a video, the bitstream comprising information for use in decoding the video, wherein the information for use in decoding the video comprises:
encoded video data for a chroma block and indication information indicating an intra prediction mode corresponding to the chroma block, wherein when the indication information indicating the intra prediction mode is a linear mode above (LMA) mode, the coding device is configured to perform operations of:
determining preset locations based on the intra prediction mode;
obtaining four chroma values of chroma samples at the preset locations;
obtaining, based on neighboring samples of a luma block corresponding to the chroma block, four luma values of luma samples corresponding to the four chroma values;
classifying the four luma values into two smaller luma values and two larger luma values by sorting the four luma values;
grouping the two smaller luma values into a first luma set, and grouping the two larger luma values into a second luma set;
grouping chroma values of chroma samples corresponding to luma samples associated with luma values in the first luma set into a first chroma set, and grouping chroma values of chroma samples corresponding to luma samples associated with luma values in the second luma set into a second chroma set;
determining a scaling coefficient in a linear model corresponding to the chroma block based on an average value of the luma values in the first luma set, an average value of the luma values in the second luma set, an average value of the chroma values in the first chroma set, and an average value of the chroma values in the second chroma set;
determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block; and
determining a prediction block of the chroma block based on the scaling coefficient, the offset factor, and luma reconstruction information corresponding to the chroma block, wherein the luma reconstruction information comprises downsampling information of a luma reconstructed block corresponding to the chroma block;
obtaining a reconstructed residual block based on the bitstream; and
adding the reconstructed residual block to the prediction block to obtain a reconstructed block of the chroma block.

### Claim 14 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the obtaining the four chroma values of the chroma samples comprises:
obtaining the chroma values of the chroma samples at preset locations from neighboring samples of the chroma block based on a preset correspondence between an intra prediction mode and a preset location and the intra prediction mode corresponding to the chroma block.

### Claim 15 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the classifying the four luma values into two smaller luma values and two larger luma values by sorting the four luma values comprises:
sorting the four luma values of the luma samples corresponding to the chroma samples at preset locations in ascending order, to obtain a first luma value queue, a first half part in the first luma value queue comprises the two smaller luma values of the first luma value queue, and a second half part in the first luma value queue comprises the two larger luma values of the first luma value queue; or
sorting the four luma values of the luma samples corresponding to the chroma samples at the preset locations in descending order, to obtain a second luma value queue, a first half part in the second luma value queue comprises the two larger luma values of the second luma value queue, and a second half part in the second luma value queue comprises the two smaller luma values of the second luma value queue.

### Claim 16 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block comprises:
determining, based on the scaling coefficient, the average value of the chroma values in the first chroma set, and the average value of the luma values in the first luma set, the offset factor in the linear model corresponding to the chroma block.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium according to claim 16, wherein the determining, based on the scaling coefficient, the average value of the chroma values in the first chroma set, and the average value of the luma values in the first luma set, the offset factor in the linear model corresponding to the chroma block comprises:
β=CLmean−α*LLmean, wherein α is the scaling coefficient, β is the offset factor in the linear model corresponding to the chroma block, CLmean is the average value of the chroma values in the first chroma set, and LLmean is the average value of the luma values in the first luma set.

### Claim 18 (depends on 13)

The non-transitory computer-readable storage medium according to claim 13, wherein the determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block comprises:
determining, based on the scaling coefficient, an average value of the chroma values of the chroma samples at preset locations, and the average value of the luma values of the luma samples corresponding to the chroma samples, the offset factor in the linear model corresponding to the chroma block.
