# US 12,120,315 B2 · Method and apparatus for intra prediction

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

- Number: US 12,120,315 B2
- Document ID: US12120315B2
- Status: Granted
- Kind: B2
- Application number: 18/171,458
- Filed: 2023-02-20
- Published: 2024-01-11
- Granted: 2024-10-15
- Earliest claimed: 2018-12-29
- 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/US12120315B2

## CPC

- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/593: involving spatial prediction techniques
- 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/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/136: Incoming video signal characteristics or properties
- H04N 19/147: according to rate distortion criteria (rate-distortion as a criterion for motion estimation H04N19/567)
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Apparatuses and methods for intra predicting a block are described. The method of intra predicting a current block can include obtaining a predicted sample value from one or more reference sample values by using an intra prediction mode, obtaining at least one additional reference sample value in accordance with the intra prediction mode, and obtaining a thresholded additional reference sample value based on the additional reference sample value. The method can also include calculating an additional value from the thresholded additional reference sample value, multiplying the predicted sample value by a sample weighting factor, resulting in a weighted predicted sample value, adding the additional value to the weighted predicted sample value, resulting in a non-normalized predicted sample value, and normalizing the non-normalized predicted sample value, resulting in a normalized predicted sample values. The accuracy for the intra prediction is thus increased.

## Claims

### Claim 1

A method of intra predicting a block of a picture, comprising:
obtaining an intra prediction mode of a current block;
performing position-dependent prediction combination (PDPC) based on top reference samples and left reference samples when the intra prediction mode is DC mode or planar mode, the top reference samples and the left reference samples do not include a top-left reference sample; and
performing position-dependent prediction combination (PDPC) based on left reference samples when the intra prediction mode is a horizontal intra prediction mode, or based on top reference samples when the intra prediction mode is a vertical intra prediction mode, the top reference samples or the left reference samples include a top-left reference sample.

### Claim 2 (depends on 1)

The method of claim 1, wherein when predModeIntra is equal to INTRA_PLANAR or INTRA_DC, the method further comprises applying:
wT[y]=32>>((y<<1)>>nScale);
wL[x]=32>>((x<<1)>>nScale);
wTL[x][y]=0; and
wherein predModeIntra indicates the intra prediction mode, {x,y} defines position of a predicted sample, wT is a weight associated with the top reference samples, wL is a weight associated with the left reference samples, wTL is a weight associated with the top-left reference sample, and nScale is a scaling parameter.

### Claim 3 (depends on 2)

The method of claim 2, wherein,
refL[x][y]=p[−1][y];
refT[x][y]=p[x][−1];
wherein refL[x][y] indicates the left reference samples; and
refT[x][y] indicates the top reference samples.

### Claim 4 (depends on 3)

The method of claim 3, wherein the performing position-dependent prediction combination (PDPC) comprises:
predSamples[x][y]=(refL[x][y]*wL[x]+refT[x][y]*wT[y]+(64−wL[x]−wT[y])*predSamples[x][y]+32)>>6;
wherein predSamples[x][y] indicates a predicted sample.

### Claim 5 (depends on 1)

The method of claim 1, wherein when predModeIntra is equal to INTRA_ANGULAR18 or INTRA_ANGULAR50, the method further comprises applying:
wT[y]=(predModeIntra==INTRA_ANGULAR18)?32>>((y<<1)>>nScale):0;
wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0;
wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)?wT[y]:wL[x];
wherein predModeIntra indicates the intra prediction mode, INTRA_ANGULAR18 indicates the horizontal intra prediction mode, INTRA_ANGULAR50 indicates the vertical intra prediction mode, {x,y} defines position of a predicted sample, wT is a weight associated with the top reference samples, wL is a weight associated with the left reference samples, wTL is a weight associated with the top-left reference sample, and nScale is a scaling parameter.

### Claim 6 (depends on 5)

The method of claim 5, wherein,
refL[x][y]=p[−1][y];
refT[x][y]=p[x][−1];
wherein refL[x][y] indicates the left reference samples; and
refT[x][y] indicates the top reference samples.

### Claim 7 (depends on 6)

The method of claim 6, wherein when predModeIntra is equal to INTRA_ANGULAR18, the performing position-dependent prediction combination (PDPC) comprises:
predSamples[x][y]=clip1Cmp(((refT[x][y]−p[1][−1])*wT[y]+64*predSamples[x][y]+32)>>6);
wherein p[−1][−1] is a value of the top-left reference sample, and
predSamples[x][y] indicates a predicted sample.

### Claim 8 (depends on 6)

The method of claim 6, wherein when predModeIntra is equal to INTRA_ANGULAR50, the performing position-dependent prediction combination (PDPC) comprises:
predSamples[x][y]=clip1Cmp(((refL[x][y]−p[1][1])*wL[y]+64*predSamples[x][y]+32)>>6);
wherein p[−1][−1] is a value of the top-left reference sample, and predSamples[x][y] indicates a predicted sample.

### Claim 9

A device for encoding a picture, wherein the device is an encoder, comprising:
one or more processors; and
a non-transitory computer-readable storage medium coupled to the processors and storing instructions for execution by the processors, wherein the instructions, when executed by the processors, configures the device to carry operations, comprising:
obtaining an intra prediction mode of a current block,
performing position-dependent prediction combination (PDPC) based on top reference samples and left reference samples when the intra prediction mode is DC mode or planar mode, the top reference samples and the left reference samples do not include a top-left reference sample, and
performing position-dependent prediction combination (PDPC) based on top-left reference samples when the intra prediction mode is a horizontal intra prediction mode, or based on left top reference samples when the intra prediction mode is a vertical intra prediction mode, the top reference samples or the left reference samples include a top-left reference sample.

### Claim 10 (depends on 9)

The device of claim 9, wherein when predModeIntra is equal to INTRA_PLANAR or INTRA_DC, the operations further comprise applying:
wT[y]=32>>((y<<1)>>nScale);
wL[x]=32>>((x<<1)>>nScale);
wTL[x][y]=0; and
wherein predModeIntra indicates the intra prediction mode, {x,y} defines position of a predicted sample, wT is a weight associated with the top reference samples, wL is a weight associated with the left reference samples, wTL is a weight associated with the top-left reference sample, and nScale is a scaling parameter.

### Claim 11 (depends on 10)

The device of claim 10, wherein,
refL[x][y]=p[−1][y];
refT[x][y]=p[x][−1];
wherein refL[x][y] indicates the left reference samples; and
refT[x][y] indicates the top reference samples.

### Claim 12 (depends on 11)

The device of claim 11, wherein the performing position-dependent prediction combination (PDPC) comprises:
predSamples[x][y]=(refL[x][y]*wL[x]+refT[x][y]*wT[y]+(64−wL[x]−wT[y])*predSamples[x][y]+32)>>6;
wherein predSamples[x][y] indicates a predicted sample.

### Claim 13 (depends on 9)

The device of claim 9, wherein when predModeIntra is equal to INTRA_ANGULAR18 or INTRA_ANGULAR50, the operations further comprise applying:
wT[y]=(predModeIntra==INTRA_ANGULAR18)?32>>((y<<1)>>nScale):0;
wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0;
wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)?wT[y]:wL[x];
wherein predModeIntra indicates the intra prediction mode, INTRA_ANGULAR18 indicates the horizontal intra prediction mode, INTRA_ANGULAR50 indicates the vertical intra prediction mode, {x,y} defines position of a predicted sample, wT is a weight associated with the top reference samples, wL is a weight associated with the left reference samples, wTL is a weight associated with the top-left reference sample, and nScale is a scaling parameter.

### Claim 14 (depends on 13)

The device of claim 13, wherein,
refL[x][y]=p[−1][y];
refT[x][y]=p[x][−1];
wherein refL[x][y] indicates the left reference samples; and
refT[x][y] indicates the top reference samples.

### Claim 15 (depends on 14)

The device of claim 14, wherein when predModeIntra is equal to INTRA_ANGULAR18, the performing position-dependent prediction combination (PDPC) comprises:
predSamples[x][y]=clip1Cmp(((refT[x][y]−p[−1][−1])*wT[y]+64*predSamples[x][y]+32)>6);
wherein p[−1][−1] is a value of the top-left reference sample, and predSamples[x][y] indicates a predicted sample.

### Claim 16 (depends on 15)

The device of claim 15, wherein when predModeIntra is equal to INTRA_ANGULAR50, the performing position-dependent prediction combination (PDPC) comprises:
predSamples[x][y]=clip1Cmp(((refL[x][y]−p[1][1])*wL[y]+64*predSamples[x][y]+32)>>6);
wherein p[−1][−1] is a value of the top-left reference sample, and predSamples[x][y] indicates a predicted sample.

### Claim 17

A non-transitory recording medium which includes one or more instructions, which when executed by one or more processors, cause the one or more processors to perform operations that generate a predictive-encoded bit stream, operations comprising:
obtaining an intra prediction mode of a current block;
performing position-dependent prediction combination (PDPC) based on top reference samples and left reference samples when the intra prediction mode is DC mode or planar mode, the top reference samples and the left reference samples do not include a top-left reference sample; and
performing position-dependent prediction combination (PDPC) based on left reference samples when the intra prediction mode is a horizontal intra prediction mode, or based on top reference samples when the intra prediction mode is a vertical intra prediction mode, the top reference samples or the left reference samples include a top-left reference sample.

### Claim 18 (depends on 17)

The non-transitory recording medium of claim 17, wherein when predModeIntra is equal to INTRA_PLANAR or INTRA_DC, the operations comprise applying:
wT[y]=32>>((y<<1)>>nScale);
wL[x]=32>>((x<<1)>>nScale);
wTL[x][y]=0; and
wherein predModeIntra indicates the intra prediction mode, {x,y} defines position of a predicted sample, wT is a weight associated with the top reference samples, wL is a weight associated with the left reference samples, wTL is a weight associated with the top-left reference sample, and nScale is a scaling parameter.

### Claim 19 (depends on 17)

The non-transitory recording medium of claim 17, wherein when predModeIntra is equal to INTRA_ANGULAR18 or INTRA_ANGULAR50, the operations comprise applying:
wT[y]=(predModeIntra==INTRA_ANGULAR18)?32>>((y<<1)>>nScale):0;
wL[x]=(predModeIntra==INTRA_ANGULAR50)?32>>((x<<1)>>nScale):0;
wTL[x][y]=(predModeIntra==INTRA_ANGULAR18)?wT[y]:wL[x]; and
wherein predModeIntra indicates the intra prediction mode, INTRA_ANGULAR18 indicates the horizontal intra prediction mode, INTRA_ANGULAR50 indicates the vertical intra prediction mode, {x,y} defines position of a predicted sample, wT is a weight associated with the top reference samples, wL is a weight associated with the left reference samples, wTL is a weight associated with the top-left reference sample, and nScale is a scaling parameter.

### Claim 20 (depends on 19)

The non-transitory recording medium of claim 19, wherein,
refL[x][y]=p[−1][y];
refT[x][y]=p[x][−1];
wherein refL[x][y] indicates the left reference samples; and
refT[x][y] indicates the top reference samples.
