# US 11,451,774 B2 · Intra-prediction-based encoding and decoding method, apparatus and filter

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

- Number: US 11,451,774 B2
- Document ID: US11451774B2
- Status: Granted
- Kind: B2
- Application number: 16/610,290
- Filed: 2019-03-26
- Published: 2021-12-23
- Granted: 2022-09-20
- Earliest claimed: 2019-03-12
- Assignees: Peking University Shenzhen Graduate School
- Applicants: Peking University Shenzhen Graduate School
- Inventors: Ronggang Wang; Kui Fan; Guisen Xu; Wen Gao
- Web page: https://patentgrep.com/patent/US11451774B2

## CPC

- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- 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/182: the unit being a pixel
- 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 19/82: involving filtering within a prediction loop
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An embodiment of the present disclosure discloses an intra-prediction-based encoding and decoding method, apparatus and filter, and belongs to a video coding technical field. The method comprises: acquiring reconstructed pixels adjacent to a to-be-predicted prediction block; determining corresponding reconstructed pixels adjacent to the to-be-predicted prediction block among the reconstructed pixels as reference pixels for filtering, based on prediction modes of the to-be-predicted prediction block; based on the reference pixels, using a filter corresponding to prediction modes of the to-be-predicted prediction block to filter interim prediction values of the to-be-predicted prediction block, to obtain new pixel values of the to-be-predicted prediction block, wherein the interim prediction values are obtained based on other intra prediction methods; performing a CLIP operation on the new pixel values of the to-be-predicted prediction block, to obtain a first prediction value of the to-be-predicted prediction block. By the method provided in the specification, the accuracy of intra prediction may be improved, and coding efficiency may be improved.

## Claims

### Claim 1

An intra-prediction-based encoding method, comprising:
acquiring reconstructed pixels adjacent to a to-be-predicted prediction block;
determining corresponding reconstructed pixels adjacent to the to-be-predicted prediction block among the reconstructed pixels as reference pixels for filtering, based on prediction modes of the to-be-predicted prediction block; if a first type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block are used as reference pixels for filtering; if a second type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; if a third type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block and a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; the first type of prediction modes include modes 18-34, the filter degenerates into a two-tap filter, which is expressed as Formula (3): P(x,y)=(f(x)·T(−1,y)+(64−f(x))·T(x,y)+32)>>6 Formula (3); the second type of prediction modes includes modes 2-17, the filter degenerates into a two-tap filter, which is expressed as Formula (2): P(x,y)=(f(y)·T(x,−1)+(64−f(y))·T(x,y)+32)>>6 Formula (2); and the third type of prediction modes includes the DC mode and the planar mode, the filter is a three-tap filter, which is expressed as Formula (1): P(x,y)=(f(x)·T(−1,y)+f(y)·T(x,−1)+(64−f(x)−f(y))·T(x,y)+32)>>6 Formula (1); wherein P(x, y) is a new pixel value of the to-be-predicted prediction block; T(x, y) is an interim prediction value of the to-be-predicted prediction block; T(−1, y) is a reference pixel value to the left of the to-be-predicted prediction block; T(x, −1) is a reference pixel value above the to-be-predicted prediction block; x and y are coordinates in the predicted block to be predicted; x=0 denotes the first column of the to-be-predicted prediction block; y=0 denotes the first row of the to-be-predicted prediction block; M denotes the width of the to-be-predicted prediction block; N denotes the height of the to-be-predicted prediction block; f(x) denotes a filter coefficient of T(−1, y); f(y) denotes a filter coefficient of T(x, −1);
based on the reference pixels, using a filter corresponding to prediction modes of the to-be-predicted prediction block to filter interim prediction values of the to-be-predicted prediction block, to obtain new pixel values of the to-be-predicted prediction block, wherein the interim prediction values are obtained based on other intra prediction methods; the filter coefficients are expressed as Formulas (4) and (5):
f(x)=FS[M][x] Formula (4)
f(y)=FS[N][y] Formula (5)
wherein FS are filter coefficients;
performing a CLIP operation on the new pixel values of the to-be-predicted prediction block, to obtain a first prediction value of the to-be-predicted prediction block.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
comparing the first prediction value of the to-be-predicted prediction block with a second prediction value of the to-be-predicted prediction block obtained by the other intra prediction methods, so as to obtain a prediction value of the to-be-predicted prediction block, and to output a flag to the bitstream in which the to-be-predicted prediction block is located, and wherein the second prediction value has been operated by a CLIP operation, and the flag is used to mark whether the to-be-predicted prediction is to be filtered.

### Claim 3 (depends on 1)

The method of claim 1, the acquiring reconstructed pixels adjacent to a to-be-predicted prediction block, specifically comprises:
decoding the coded prediction blocks adjacent to the to-be-predicted prediction block, to obtain the reconstructed pixels adjacent to the to-be-predicted prediction block.

### Claim 4 (depends on 1)

The method of claim 1, the based on the reference pixels, using a filter corresponding to the prediction modes of the to-be-predicted prediction block, specifically comprises:
determining filter coefficients of the reference pixels according to the width and the height of the to-be-predicted prediction block;
using a filter corresponding to intra prediction modes of the to-be-predicted prediction block, based on the reference pixels and the filter coefficients.

### Claim 5 (depends on 1)

The method of claim 1, the using a filter corresponding to the prediction modes of the to-be-predicted prediction block to filter interim prediction values of the to-be-predicted prediction block, specifically comprises;
if the first type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a filter of Formula (3) is used to filter the interim prediction values of the to-be-predicted prediction block;
if the second type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a filter of Formula (2) is used to filter the interim prediction values of the to-be-predicted prediction block; if the third type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a filter of Formula (1) is used to filter the interim prediction values of the to-be-predicted prediction block.

### Claim 6 (depends on 1)

The method of claim 1, the CLIP operation is expressed as Formula (6):
CLIP
(
i
,
j
,
x
)
=
{
i
,
x
<
i
j
,
x
>
j
x
,
i
≤
x
≤
j
Formula
⁢
(
6
)
wherein i denotes a lower limit of a defined range, j denotes an upper limit of the defined range.

### Claim 7 (depends on 2)

The method of claim 2, the flag is a 1-bit flag.

### Claim 8

An intra-prediction-based encoding apparatus, comprising:
acquiring module, to acquire reconstructed pixels adjacent to a to-be-predicted prediction block;
prediction module, to determine corresponding reconstructed pixels adjacent to the to-be-predicted prediction block among the reconstructed pixels as reference pixels for filtering, based on prediction modes of the to-be-predicted prediction block; if a first type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block are used as reference pixels for filtering; if a second type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; if a third type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block and a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; the first type of prediction modes include modes 18-34, the filter degenerates into a two-tap filter, which is expressed as Formula (3): P(x,y)=(f(x)·T(−1,y)+(64−f(x))·T(x,y)+32)>>6 Formula (3); the second type of prediction modes includes modes 2-17, the filter degenerates into a two-tap filter, which is expressed as Formula (2): P(x,y)=f(y)·T(x,−1)+(64−f(y))·T(x,y)+32)>>6 Formula (2); and the third type of prediction modes includes the DC mode and the planar mode, the filter is a three-tap filter, which is expressed as Formula (1):
P(x,y)=f(x)·T(−1,y)+f(y)·T(x,−1)+(64−f(x)−f(y))·T(x,y)+32)>>6 Formula (1); wherein P(x, y) is a new pixel value of the to-be-predicted prediction block; T(x, y) is an interim prediction value of the to-be-predicted prediction block; T(−1, y) is a reference pixel value to the left of the to-be-predicted prediction block; T(x, −1) is a reference pixel value above the to-be-predicted prediction block; x and y are coordinates in the predicted block to be predicted; x=0 denotes the first column of the to-be-predicted prediction block; y=0 denotes the first row of the to-be-predicted prediction block; M denotes the width of the to-be-predicted prediction block; N denotes the height of the to-be-predicted prediction block; f(x) denotes a filter coefficient of T(−1, y); f(y) denotes a filter coefficient of T(x, −1);
based on the reference pixels, use a filter corresponding to the prediction modes of the to-be-predicted prediction block to filter interim prediction values of the to-be-predicted prediction block, to obtain new pixel values of the to-be-predicted prediction block, wherein the interim prediction values are obtained based on other intra prediction methods; the filter coefficients are expressed as Formulas (4) and (5):
f(x)=FS[M][x] Formula (4)
f(y)=FS[N][y] Formula (5)
wherein FS are filter coefficients;
perform a CLIP operation on the new pixel values of the to-be-predicted prediction block, to obtain a first prediction value of the to-be-predicted prediction block.

### Claim 9

An intra-prediction-based decoding method, comprising:
acquiring reconstructed pixels adjacent to a to-be-predicted prediction block;
determining corresponding reconstructed pixels adjacent to the to-be-predicted prediction block among the reconstructed pixels as reference pixels for filtering, based on prediction modes of the to-be-predicted prediction block; if a first type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block are used as reference pixels for filtering; if a second type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; if a third type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block and a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; the first type of prediction modes include modes 18-34, the filter degenerates into a two-tap filter, which is expressed as Formula (3): P(x,y)=(f(x)·T(−1,y)+(64−f(x))·T(x,y)+32)>>6 Formula (3); the second type of prediction modes includes modes 2-17, the filter degenerates into a two-tap filter, which is expressed as Formula (2): P(x,y)=(f(y)·T(x,−1)+(64−f(y))·T(x,y)+32)>>6 Formula (2); and the third type of prediction modes includes the DC mode and the planar mode, the filter is a three-tap filter, which is expressed as Formula (1): P(x,y)=(f(x)·T(−1,y)+f(y)·T(x,−1)+(64−f(x)−f(y))·T(x,y)+32)>>6 Formula (1); wherein P(x, y) is a new pixel value of the to-be-predicted prediction block; T(x, y) is an interim prediction value of the to-be-predicted prediction block; T(−1, y) is a reference pixel value to the left of the to-be-predicted prediction block; T(x, −1) is a reference pixel value above the to-be-predicted prediction block; x and y are coordinates in the predicted block to be predicted; x=0 denotes the first column of the to-be-predicted prediction block; y=0 denotes the first row of the to-be-predicted prediction block; M denotes the width of the to-be-predicted prediction block; N denotes the height of the to-be-predicted prediction block; f(x) denotes a filter coefficient of T(−1, y); f(y) denotes a filter coefficient of T(x, −1);
based on the reference pixels, using a filter corresponding to the prediction modes of the to-be-predicted prediction block to filter interim prediction values of the to-be-predicted prediction block, to obtain new pixel values of the to-be-predicted prediction block; the filter coefficients are expressed as Formulas (4) and (5):
f(x)=FS[M][x] Formula (4)
f(y)=FS[N][y] Formula (5)
wherein FS are filter coefficients;
performing a CLIP operation on the new pixel values of the to-be-predicted prediction block to obtain a reconstructed coding block.

### Claim 10 (depends on 9)

The method of claim 9, wherein the intra-prediction-based decoding method further comprises: reading a flag in the bitstream in which the to-be-predicted prediction block is located, to determine whether the decoder sider needs to perform filtering.

### Claim 11

An intra-prediction-based decoding apparatus, comprising:
acquiring module, to acquire reconstructed pixels adjacent to a to-be-predicted prediction block;
prediction module, to determine corresponding reconstructed pixels adjacent to the to-be-predicted prediction block among the reconstructed pixels as reference pixels for filtering, based on prediction modes of the to-be-predicted prediction block; if a first type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block are used as reference pixels for filtering; if a second type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; if a third type of prediction modes are used for intra prediction to predict the to-be-predicted prediction block, a column of reconstructed pixels to the left of the to-be-predicted prediction block and a row of reconstructed pixels above the to-be-predicted prediction block are used as reference pixels for filtering; the first type of prediction modes include modes 18-34, the filter degenerates into a two-tap filter, which is expressed as Formula (3): P(x,y)=f(x)·T(−1,y)+(64−f(x))·T(x,y)+32)>>6 Formula (3); the second type of prediction modes includes modes 2-17, the filter degenerates into a two-tap filter, which is expressed as Formula (2): P(x,y)=f(y)·T(x,−1)+(64−f(y))·T(x,y)+32)>>6 Formula (2); and the third type of prediction modes includes the DC mode and the planar mode, the filter is a three-tap filter, which is expressed as Formula (1): P(x,y)=f(x)·T(−1,y)+f(y)·T(x,−1)+(64−f(x)−f(y))·T(x,y)+32)>>6 Formula (1); wherein P(x, y) is a new pixel value of the to-be-predicted prediction block; T(x, y) is an interim prediction value of the to-be-predicted prediction block; T(−1, y) is a reference pixel value to the left of the to-be-predicted prediction block; T(x, −1) is a reference pixel value above the to-be-predicted prediction block; x and y are coordinates in the predicted block to be predicted; x=0 denotes the first column of the to-be-predicted prediction block; y=0 denotes the first row of the to-be-predicted prediction block; M denotes the width of the to-be-predicted prediction block; N denotes the height of the to-be-predicted prediction block; f(x) denotes a filter coefficient of T(−1, y); f(y) denotes a filter coefficient of T(x, −1);
based on the reference pixels, use a filter corresponding to the prediction modes of the to-be-predicted prediction block to filter interim prediction values of the to-be-predicted prediction block, to obtain new pixel values of the to-be-predicted prediction block; the filter coefficients are expressed as Formulas (4) and (5):
f(x)=FS[M][x] Formula(4)
f(y)=FS[N][y] Formula(5)
wherein FS are filter coefficients;
perform a CLIP operation on the new pixel values of the to-be-predicted prediction block to obtain a reconstructed coding block.

### Claim 12 (depends on 11)

A filter, used for filtering in intra-prediction-based decoding apparatus according to claim 11.
