# US 12,120,325 B2 · 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 12,120,325 B2
- Document ID: US12120325B2
- Status: Granted
- Kind: B2
- Application number: 18/098,997
- Filed: 2023-01-19
- Published: 2023-05-18
- Granted: 2024-10-15
- Earliest claimed: 2018-12-13
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Xiang Ma; Jianle Chen; Haitao Yang
- Web page: https://patentgrep.com/patent/US12120325B2

## CPC

- H04N 19/196: being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters (processing of motion vectors H04N19/513)
- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- 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/149: by estimating the code amount by means of a model, e.g. mathematical model or statistical model
- 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/186: the unit being a colour or a chrominance component
- H04N 19/593: involving spatial prediction techniques
- H04N 19/11: among a plurality of spatial predictive coding modes
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

This application provides a chroma block prediction method and apparatus. The method includes: obtaining a maximum luma value and a minimum luma value based on luma samples corresponding to neighboring samples of a target chroma block, and calculating a first difference between the maximum luma value and the minimum luma value; if the first difference is not equal to 0, processing the first difference based on a quantity of significant bits of the first difference and a first preset bit depth to obtain a second difference; and determining, based on a first chroma value, a second chroma value, and the second difference, an intra prediction model parameter corresponding to the target chroma block, and determining prediction information of the target chroma block based on the intra prediction model parameter and luma reconstruction information corresponding to the target chroma block.

## Claims

### Claim 1

A chroma block prediction method, comprising:
obtaining a maximum luma value and a minimum luma value based on luma samples corresponding to neighboring samples of a target chroma block;
if a first difference between the maximum luma value and the minimum luma value is not equal to 0, shifting the first difference based on a quantity of significant bits of the first difference to obtain a second difference, wherein the quantity of significant bits of the first difference is obtained by log 2 of the first difference;
determining, based on a first chroma value, a second chroma value, and the second difference, an intra prediction model parameter corresponding to the target chroma block, wherein the first chroma value and the second chroma value are determined based on the neighboring samples of the target chroma block; and
determining prediction information of the target chroma block based on the intra prediction model parameter and luma reconstruction information corresponding to the target chroma block.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the quantity of significant bits of the first difference is obtained by Floor(Log 2(Abs(A)), wherein A represents the first difference.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the shifting the first difference based on a quantity of significant bits of the first difference to obtain a second difference comprises:
shifting the first difference to the right based on the quantity of significant bits of the first difference to obtain the second difference.

### Claim 4 (depends on 1)

The method according to claim 1, wherein shifting the first difference based on the quantity of significant bits of the first difference and a first preset bit depth to obtain the second difference.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the first preset bit depth is 1 bit, 3 bits, 4 bits, or 6 bits.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the shifting the first difference based on the quantity of significant bits of the first difference and a first preset bit depth to obtain the second difference comprises:
determining a third difference between the quantity of significant bits of the first difference and the first preset bit depth; and
shifting the first difference to the right by bits of the third difference to obtain the second difference, wherein the third difference is greater than 0.

### Claim 7 (depends on 4)

The method according to claim 4, wherein the second difference normDiff=((diff<<4)>>x) & 15, wherein x represents the quantity of significant bits of the first difference, diff represents the first difference, and 4 represents the first preset bit depth.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the luma reconstruction information corresponding to the target chroma block comprises downsampling information of a luma reconstruction block corresponding to the target chroma block.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the first chroma value corresponds to the maximum luma value, and the second chroma value corresponds to the minimum luma value.

### Claim 10

A chroma block prediction apparatus, comprising:
a non-transitory computer-readable storage medium storing instructions; and
one or more processors in communication with the non-transitory computer-readable storage medium and upon execution of the instructions, causes the apparatus to:
obtain a maximum luma value and a minimum luma value based on luma samples corresponding to neighboring samples of a target chroma block; and
if a first difference between the maximum luma value and the minimum luma value is not equal to 0, shifting the first difference based on a quantity of significant bits of the first difference to obtain a second difference, wherein the quantity of significant bits of the first difference is obtained by log 2 of the first difference;
determine, based on a first chroma value, a second chroma value, and the second difference, an intra prediction model parameter corresponding to the target chroma block, wherein the first chroma value and the second chroma value are determined based on the neighboring samples of the target chroma block; and
determine prediction information of the target chroma block based on the intra prediction model parameter and luma reconstruction information corresponding to the target chroma block.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the quantity of significant bits of the first difference is obtained by Floor(Log 2(Abs(A)), wherein A represents the first difference.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the shifting the first difference based on a quantity of significant bits of the first difference to obtain a second difference comprises:
shifting the first difference to the right based on the quantity of significant bits of the first difference to obtain the second difference.

### Claim 13 (depends on 10)

The apparatus according to claim 10, wherein shifting the first difference based on the quantity of significant bits of the first difference and a first preset bit depth to obtain the second difference.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the first preset bit depth is 1 bit, 3 bits, 4 bits, or 6 bits.

### Claim 15 (depends on 13)

The apparatus according to claim 13, wherein the shifting the first difference based on the quantity of significant bits of the first difference and a first preset bit depth to obtain the second difference comprises:
determining a third difference between the quantity of significant bits of the first difference and the first preset bit depth; and
shifting the first difference to the right by bits of the third difference to obtain the second difference, wherein the third difference is greater than 0.

### Claim 16 (depends on 13)

The apparatus according to claim 13, wherein the second difference normDiff=((diff<<4)>>x) & 15, wherein x represents the quantity of significant bits of the first difference, diff represents the first difference, and 4 represents the first preset bit depth.

### Claim 17 (depends on 10)

The apparatus according to claim 10, wherein the first chroma value corresponds to the maximum luma value, and the second chroma value corresponds to the minimum luma value.

### Claim 18

A non-transitory computer-readable storage medium for storing bit string of a video, comprising:
a bit string stored in the non-transitory computer-readable storage medium, the bit string comprising an encoded sequence of frames of a video, wherein the encoded sequence of frames is encoded into the bit string based on a plurality of operations comprising:
obtaining a maximum luma value and a minimum luma value based on luma samples corresponding to neighboring samples of a target chroma block;
if a first difference between the maximum luma value and the minimum luma value is not equal to 0, shifting the first difference based on a quantity of significant bits of the first difference to obtain a second difference, wherein the quantity of significant bits of the first difference is obtained by log 2 of the first difference;
determining, based on a first chroma value, a second chroma value, and the second difference, an intra prediction model parameter corresponding to the target chroma block, wherein the first chroma value and the second chroma value are determined based on the neighboring samples of the target chroma block; and
determining prediction information of the target chroma block based on the intra prediction model parameter and luma reconstruction information corresponding to the target chroma block.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the quantity of significant bits of the first difference is obtained by Floor(Log 2(Abs(A)), wherein A represents the first difference.

### Claim 20 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein shifting the first difference to the right based on the quantity of significant bits of the first difference to obtain the second difference.
