# US 2021/0344931 A1 · Method and apparatus of mode- and size-dependent block-level restrictions for position dependent prediction combination

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

- Number: US 2021/0344931 A1
- Document ID: US20210344931A1
- Status: Published application
- Kind: A1
- Application number: 17/360,224
- Filed: 2021-06-28
- Published: 2021-11-04
- Earliest claimed: 2018-12-31
- 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/US20210344931A1

## 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/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/167: Position within a video image, e.g. region of interest [ROI]
- 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: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An intra prediction method is described. The method can include determining a prediction value for a sample of a current block from one or more reference samples outside the current block by using an intra predication mode. The method can also include deriving a weighted prediction value, when one or more predefined conditions are not satisfied, wherein the one or more predefined conditions relate to at least one of a width and/or a height of the current block and the intra prediction mode. Furthermore, the method can include coding the current block using the weighted prediction value, when the one or more predefined conditions are not satisfied.

## Claims

### Claim 1

An intra prediction method, comprising:
determining a prediction value for a sample of a current block from one or more reference samples outside the current block using an intra predication mode;
when one or more predefined conditions are not satisfied,
deriving a weighted prediction value, and
coding the current block using the weighted prediction value,
wherein the one or more predefined conditions relate to at least one of a width and/or a height of the current block and the intra prediction mode.

### Claim 2 (depends on 1)

The method of claim 1, wherein the current block is comprised in a current frame of a video sequence or a still image.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
when the one or more predefined conditions are satisfied, coding the current block using the prediction value.

### Claim 4 (depends on 1)

The method of claim 1, wherein the weighted prediction value is derived based on:
a) the prediction value at a position (x, y) of the sample in the current block, where x is a horizontal coordinate of the sample and y is a vertical coordinate of the sample,
b) the width and/or the height of the current block,
c) a value of a top reference sample of the current block located adjacent to the current block in a row atop of the current block at an x-th column of the current block and a value of a left reference sample of the current block located adjacent to the current block in a column on a left-hand side of the current block at a y-th row of the current block, and
d) the intra prediction mode.

### Claim 5 (depends on 4)

The method of claim 4, wherein the weighted prediction value is derived according to a formula that comprises:
{circumflex over (P)}(x,y)=Clip1Cmp((wL×R−1,y+wT×Rx,−1−wTL×R−1,−1+(64−wl−wT+wTL)×P(x,y)+32))>>6) wherein
{circumflex over (P)}(x, y) is the weighted prediction value of the sample;
P(x, y) is the prediction value of the sample;
Rx,−1, R−1,y respectively represent values of the top and the left reference samples of the current block;
R−1,−1 represents the value of a reference sample of the current block located adjacent to the current block at a top-left corner of the current block;
wL, wT and wTL represent weights;
wherein function Clip1Cmp is set equal to a clipping function Clip1Y, when the current block is a luma block, and is set equal to a clipping function Clip1C, when the current block is a chroma block, wherein
Clip
⁢
⁢
1
⁢
⁢
Y
⁡
(
x
)
=
Clip
⁢
⁢
3
⁢
(
0
,
(
1
⁢
⁢
<<
⁢
BitDepth
Y
⁢
pth
Y
)
-
1
,
x
)
Clip
⁢
⁢
1
⁢
⁢
C
⁡
(
x
)
=
Clip
⁢
⁢
3
⁢
(
0
,
(
1
⁢
⁢
<<
⁢
BitD
⁢
epth
C
)
-
1
,
x
)
Clip
⁢
⁢
3
⁢
(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
otherwise
and where BitDepthY is a bit depth of luma samples and BitDepthC is a bit depth of chroma samples.

### Claim 6 (depends on 5)

The method of claim 5, wherein the weights are derived by:
wL=V>>((x<<1)>>nScaleX);
wT=V>>((y<<1)>>nScaleY);
where V, nScaleX, nScaleY are predetermined values;
and
wTL=−(wL>>4)−(wT>>4), when the intra prediction mode is a DC mode,
wTL=0, when the intra prediction mode is a planar mode,
wTL=wT, when the intra prediction mode is a horizontal mode, and
wTL=wL, when the intra prediction mode is a vertical mode.

### Claim 7 (depends on 6)

The method of claim 6, wherein V is 16 or 32.

### Claim 8 (depends on 6)

The method of claim 6, wherein:
NScaleX=NScaleY=(log2(w)+log2(h)+2)>>2,
where w and h are a width and a height in units of samples, respectively, of the current block.

### Claim 9 (depends on 1)

The method of claim 1, wherein the one or more predefined conditions comprise at least one of the following conditions:
a) a sum of the width and the height of the current block is smaller than a first threshold and/or the sum of the width and the height of the current block is larger than a second threshold;
b) the sum of the width and the height of the current block is smaller than a first threshold or the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode or one of a plurality of skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))),
wherein VDIA_IDX is an index of the diagonal modes, numModes is a predefined integer and predMode is an index of the intra prediction mode;
c) the sum of the width and the height of the current block is smaller than a first threshold; the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode or one of the skew non-diagonal modes satisfying: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes)));
d) the sum of the width and the height of the current block is smaller than a first threshold; the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode; and
e) the sum of the width and the height of the current block is smaller than a first threshold; the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is one of the skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))).

### Claim 10 (depends on 1)

The method of claim 1, wherein the current block is a chroma block, and wherein the one or more predefined conditions comprise at least one of the following conditions:
a) a sum of the width and the height of the current block is smaller than a first threshold or the sum of the width and the height of the current block is larger than a second threshold;
b) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a cross-component linear modeling mode;
c) the sum of the width and the height of the current block is smaller than a first threshold and the intra prediction mode is a cross-component linear modeling mode; and the sum of the width and the height of the current block is larger than a second threshold;
d) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a planar mode;
e) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is one of a plurality of skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode (2+numModes)));
f) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a cross-component linear modeling mode or a planar mode;
g) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a cross-component linear modeling mode or one of the skew non-diagonal modes satisfying: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode (2+numModes)));
h) the sum of the width and the height of the current block is smaller than a first threshold or the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a cross-component linear modeling mode, a planar mode, or one of the skew non-diagonal modes: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode (2+numModes))); and
i) the sum of the width and the height of the current block is smaller than a first threshold; the intra prediction mode is a cross-component linear modeling mode, a planar mode, or one of the skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode (2+numModes))); the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode or one of the skew non-diagonal modes satisfying: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))).

### Claim 11

A decoder apparatus, comprising:
one or more processors; and
a non-transitory computer-readable storage medium coupled with the one or more processors and storing programming for execution by the one or more processors, wherein the programming, when executed by the one or more processors, configures the apparatus to perform operations comprising:
determining a prediction value for a sample of a current block from one or more reference samples outside the current block using an intra predication mode;
when one or more predefined conditions are not satisfied,
coding the current block using the weighted prediction value
wherein the one or more predefined conditions relate to at least one of a width and/or a height of the current block and the intra prediction mode.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the current block is comprised in a current frame of a video sequence or a still image.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein the programming, when executed by the one or more processors, further configures the apparatus to perform operations comprising:
when the one or more predefined conditions are satisfied, coding the current block using the prediction value.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein the weighted prediction value is derived based on:
a) the prediction value at a position (x, y) of the sample in the current block, where x is a horizontal coordinate of the sample and y is a vertical coordinate of the sample,
b) the width and/or the height of the current block,
c) a value of a top reference sample of the current block located adjacent to the current block in a row atop of the current block at an x-th column of the current block and a value of a left reference sample of the current block located adjacent to the current block in a column on a left-hand side of the current block at a y-th row of the current block, and
d) the intra prediction mode.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the weighted prediction value is derived according to a formula that comprises:
{circumflex over (P)}(x,y)=Clip1Cmp((wL×R−1,y+wT×Rx,−1−wTL×R−1,−1+(64−wl−wT+wTL)×P(x,y)+32))>>6) wherein
{circumflex over (P)}(x, y) is the weighted prediction value of the sample;
P(x, y) is the prediction value of the sample;
Rx,−1, R−1,y respectively represent values of the top and the left reference samples of the current block;
R−1,−1 represents the value of a reference sample of the current block located adjacent to the current block at a top-left corner of the current block;
wL, wT and wTL represent weights;
wherein function Clip1Cmp is set equal to a clipping function Clip1Y, when the current block is a luma block, and is set equal to a clipping function Clip1C, when the current block is a chroma block, wherein
Clip
⁢
⁢
1
⁢
⁢
Y
⁡
(
x
)
=
Clip
⁢
⁢
3
⁢
(
0
,
(
1
⁢
⁢
<<
⁢
BitD
⁢
epth
Y
)
-
1
,
x
)
Clip
⁢
⁢
1
⁢
⁢
C
⁡
(
x
)
=
Clip
⁢
⁢
3
⁢
(
0
,
(
1
⁢
⁢
<<
⁢
BitD
⁢
epth
C
)
-
1
,
x
)
Clip
⁢
⁢
3
⁢
(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
otherwise
and where BitDepthY is a bit depth of luma samples and BitDepthC is a bit depth of chroma samples.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the weights are derived by:
wL=V>>((x<<1)>>nScaleX);
wT=V>>((y<<1)>>nScaleY);
where V, nScaleX, nScaleY are predetermined values;
and
wTL=−(wL>>4)−(wT>>4), when the intra prediction mode is a DC mode, wTL=0, when the intra prediction mode is a planar mode,
wTL=wT, when the intra prediction mode is a horizontal mode, and
wTL=wL, when the intra prediction mode is a vertical mode.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein V is 16 or 32.

### Claim 18 (depends on 16)

The apparatus of claim 16, wherein:
NScaleX=NScaleY=(log2(w)+log2(h)+2)>>2,
where w and h are a width and a height in units of samples, respectively, of the current block.

### Claim 19 (depends on 11)

The apparatus of claim 11, wherein the one or more predefined conditions comprise at least one of the following conditions:
a) a sum of the width and the height of the current block is smaller than a first threshold and/or the sum of the width and the height of the current block is larger than a second threshold;
b) the sum of the width and the height of the current block is smaller than a first threshold or the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode or one of a plurality of skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))),
wherein VDIA_IDX is an index of the diagonal modes, numModes is a predefined integer and predMode is an index of the intra prediction mode;
c) the sum of the width and the height of the current block is smaller than a first threshold; the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode or one of the skew non-diagonal modes satisfying: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes)));
d) the sum of the width and the height of the current block is smaller than a first threshold; the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode; and
e) the sum of the width and the height of the current block is smaller than a first threshold; the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is one of the skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))).

### Claim 20 (depends on 11)

The apparatus of claim 11, wherein the current block is a chroma block, and wherein the one or more predefined conditions comprise at least one of the following conditions:
a) a sum of the width and the height of the current block is smaller than a first threshold or the sum of the width and the height of the current block is larger than a second threshold;
b) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a cross-component linear modeling mode;
c) the sum of the width and the height of the current block is smaller than a first threshold and the intra prediction mode is a cross-component linear modeling mode; and the sum of the width and the height of the current block is larger than a second threshold;
d) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a planar mode;
e) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is one of a plurality of skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes)));
f) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a cross-component linear modeling mode or a planar mode;
g) the sum of the width and the height of the current block is smaller than a first threshold; and the intra prediction mode is a cross-component linear modeling mode or one of the skew non-diagonal modes satisfying: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes)));
h) the sum of the width and the height of the current block is smaller than a first threshold or the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a cross-component linear modeling mode, a planar mode, or one of the skew non-diagonal modes: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))); and
i) the sum of the width and the height of the current block is smaller than a first threshold; the intra prediction mode is a cross-component linear modeling mode, a planar mode, or one of the skew non-diagonal modes satisfying ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))); the sum of the width and the height of the current block is larger than a second threshold; and the intra prediction mode is a planar mode or one of the skew non-diagonal modes satisfying: ((predMode>=VDIA_IDX−numModes && predMode !=VDIA_IDX)∥(predMode !=2 && predMode<=(2+numModes))).
