# US 2022/0286684 A1 · Encoder, a decoder and corresponding methods of filter modification on general intra prediction process

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

- Number: US 2022/0286684 A1
- Document ID: US20220286684A1
- Status: Published application
- Kind: A1
- Application number: 17/684,224
- Filed: 2022-03-01
- Published: 2022-09-08
- Earliest claimed: 2019-09-02
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Biao WANG; Semih ESENLIK; Anand Meher KOTRA; Han GAO; Elena Alexandrovna ALSHINA
- Web page: https://patentgrep.com/patent/US20220286684A1

## CPC

- 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/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/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/46: Embedding additional information in the video signal during the compression process (H04N19/517, H04N19/68, H04N19/70 take precedence)
- H04N 19/593: involving spatial prediction techniques
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The general intra prediction process is unnecessarily complicated with inclusion of the reference sample filtering. This application provides solutions for this problem. A method for intra prediction is provided. The method includes: during an intra predicted sample generation stage, obtaining a filtering indication, which indicates whether a filtered value or an unfiltered value of reference samples of the current coding block will be used. When the value of the filtering indication is true, a prediction sample is generated by using the filtered value of the reference samples based on the planar mode. When the value of the filtering indication is false, a prediction sample is generated by using the unfiltered value of the reference samples based on the planar mode. As a result, the reference sample filtering stage can be fully removed or can be combined with other stage.

## Claims

### Claim 1

A method for intra prediction, comprising:
during an intra predicted sample generation stage, obtaining a filtering indication indicating whether a filtered value or an unfiltered value of reference samples of a current coding block is to be used;
in response to determining that a value of the filtering indication is true, generating a prediction sample by using the filtered value of the reference samples based on a planar mode; or
in response to determining that the value of the filtering indication is false, generating a prediction sample by using the unfiltered value of the reference samples based on the planar mode.

### Claim 2 (depends on 1)

The method of claim 1, the method further comprises:
during the intra predicted sample generation stage, obtaining the filtered value of the reference samples by applying a filter to the reference samples.

### Claim 3 (depends on 2)

The method of claim 2, when the filter is [1 2 1],
predV[x][y]=((nH−1−y)*((p[x−1][−1]+2*p[x][−1]+p[x+1][−1]+2)>>2)+(y+1)*p[−1][nTbH])<<Log 2(nW),
predH[x][y]=((nW−1−x)*((p[−1][y−1]+2*p[−1][y]+p[−1][y+1]+2)>>2)+(x+1)*p[nTbW][−1])<<Log 2(nH),
wherein predV[x][y] is a vertical component of the prediction sample, predH[x][y] is a horizontal component of the prediction sample, and p[x][y](x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample.

### Claim 4 (depends on 2)

The method of claim 2, when the filter is [1 6 1],
predV[x][y]=((nH−1−y)*((p[x−1][−1]+(p[x][−1]*6)+p[x+1][−1]+4)>>3)+(y+1)*p[−1][nTbH])<Log 2(nW),
predH[x][y]=((nW−1−x)*((p[−1][y−1]+(p[−1][y]*6)+p[−1][y+1]+4)>>3)+(x+1)*p[nTbW][−1])<Log 2(nH),
wherein predV[x][y] is a vertical component of the prediction sample, predH[x][y] is a horizontal component of the prediction sample, and p[x][y](x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample.

### Claim 5 (depends on 1)

The method of claim 1, wherein the value of the filtering indication is true when one or more of the following conditions are true:
current block size is larger than N luma samples (N could be a number equals to power of 2 and larger than 2, i.e 4, 8, 16, 32, 64, 128, . . . );
current block is NOT applied with intra sub-partition (ISP); or
current block is a luma block.

### Claim 6 (depends on 1)

The method of claim 1, the method further comprises a position-dependent intra prediction (PDPC) stage, during the PDPC stage, reference samples (p[x][y], with x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) for the PDPC inputs are not filtered.

### Claim 7

A method for intra prediction, the method comprising
during a position-dependent intra prediction (PDPC), obtaining a filtering indication indicating whether a filtered value or an unfiltered value of reference samples of a current coding block is to be used;
in response to determining that a value of the filtering indication is true, generating an output sample by using the filtered value of the reference samples; or
in response to determining that value of the filtering indication is false, generating an output sample by using the unfiltered value of the reference samples.

### Claim 8 (depends on 7)

The method of claim 7, wherein the method further comprises:
during the PDPC stage, obtaining the filtered value of the reference samples by applying a filter to the reference samples.

### Claim 9 (depends on 8)

The method of claim 8, when the filter is [1 2 1],
refL[x][y]=(p[−1][y−1]+2*p[−1][y]+p[−1][y+1]+2)>>2,
refT[x][y]=(p[x−1][−1]+2*p[x][−1]+p[x+1][−1]+2)>>2,
wherein refL[x][y] is corresponding reference sample at a left column of the output sample, refT[x][y] is corresponding reference sample at a top row of the output sample, and p[x][y](x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample.

### Claim 10 (depends on 8)

The method of claim 8, when the filter is [1 6 1],
refL[x][y]=(p[x−1][−1]+(p[x][−1]*6)+p[x+1][−1]+4)>>3
refT[x][y]=(p[−1][y−1]+(p[−1][y]*6)+p[−1][y+1]+4)>>3,
wherein refL[x][y] is corresponding reference sample at a left column of the output sample, refT[x][y] is corresponding reference sample at a top row of the output sample, and p[x][y](x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample.

### Claim 11 (depends on 7)

The method of claim 7, wherein a filter flag is true when one or more of the following conditions are true:
current block size is larger than N luma samples (N could be a number equals to power of 2 and larger than 2, i.e 4, 8, 16, 32, 64, 128, . . . );
current block is NOT applied with intra sub-partition (ISP); or
current block is a luma block.

### Claim 12 (depends on 7)

The method of claim 7, wherein the method further comprises an intra predicted sample generation stage, during the intra predicted sample generation stage:
generating intra predicted sample according to a planar mode with unfiltered reference samples.

### Claim 13

A decoder, comprising:
one or more processors; and
a non-transitory computer-readable storage medium coupled to the one or more processors and storing programming instructions for execution by the one or more processors, wherein the programming instructions, when executed by the one or more processors, cause the decoder to perform operations comprising:
during a position-dependent intra prediction (PDPC) stage, obtaining a filtering indication indicating whether a filtered value or an unfiltered value of reference samples of a current coding block is to be used;
in response to determining that a value of the filtering indication is true, generating an output sample by using the filtered value of the reference samples; or
in response to determining that the value of the filtering indication is false, generating an output sample by using the unfiltered value of the reference samples.

### Claim 14 (depends on 13)

The decoder of claim 13, wherein n the programming instructions, when executed by the one or more processors, further cause the decoder to perform the operations comprising:
during the PDPC stage, obtaining the filtered value of the reference samples by applying a filter to the reference samples.

### Claim 15 (depends on 14)

The decoder of claim 14, when the filter is [1 2 1],
refL[x][y]=(p[−1][y−1]+2*p[−1][y]+p[−1][y+1]+2)>>2,
refT[x][y]=(p[x−1][−1]+2*p[x][−1]+p[x+1][−1]+2)>>2,
wherein refL[x][y] is corresponding reference sample at a left column of the output sample, refT[x][y] is corresponding reference sample at a top row of the output sample, and p[x][y](x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample.

### Claim 16 (depends on 14)

The decoder of claim 14, when the filter is [1 6 1],
refL[x][y]=(p[x−1][−1]+(p[x][−1]*6)+p[x+1][−1]+4)>>3,
refT[x][y]=(p[−1][y−1]+(p[−1][y]*6)+p[−1][y+1]+4)>>3,
wherein refL[x][y] is corresponding reference sample at a left column of the output sample, refT[x][y] is corresponding reference sample at a top row of the output sample, and p[x][y](x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample.

### Claim 17 (depends on 13)

The decoder of claim 13, wherein a filter flag is true when one or more of the following conditions are true:
current block size is larger than N luma samples (N could be a number equals to power of 2 and larger than 2, i.e 4, 8, 16, 32, 64, 128, . . . );
current block is NOT applied with intra sub-partition (ISP); or
current block is a luma block.

### Claim 18 (depends on 13)

The decoder of claim 13, wherein the programming instructions, when executed by the one or more processors, further cause the decoder to perform the operations comprising:
during an intra predicted sample generation stage, generating intra predicted sample according to a planar mode with unfiltered reference samples.
