# US 2026/0075193 A1 · Intra-Prediction on Non-dyadic Blocks

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

- Number: US 2026/0075193 A1
- Document ID: US20260075193A1
- Status: Published application
- Kind: A1
- Application number: 19/387,195
- Filed: 2025-11-12
- Published: 2026-03-12
- Earliest claimed: 2021-08-18
- Assignees: Beijing Bytedance Network Technology Co., Ltd.; Bytedance Inc.
- Applicants: Beijing Bytedance Network Technology Co., Ltd.; Bytedance Inc.
- Inventors: Kai Zhang; Li Zhang; Zhipin Deng; Na Zhang; Yang Wang
- Web page: https://patentgrep.com/patent/US20260075193A1

## CPC

- H04N 19/11: among a plurality of spatial predictive coding modes
- 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/593: involving spatial prediction techniques
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A mechanism for processing video data implemented by a video coding apparatus is disclosed. The mechanism determines to apply template-based intra mode derivation (TIMD) to a block based on whether the block is dyadic or non-dyadic, where TMID is associated with intra prediction. A conversion between a visual media data and a bitstream is performed by applying intra prediction to the block based on TIMD.

## Claims

### Claim 1

A method of processing video data, comprising:
determining to apply a template-based intra mode derivation (TIMD) to a video block of a video, wherein the video block is coded by an intra mode, a width of the video block is W, and a height of the video block is H;
calculating, for each intra prediction mode in a most probable mode (MPM), a cost between prediction samples and reconstruction samples within at least one template of the video block based on whether the video block is a dyadic block or a non-dyadic block, wherein a first intra prediction mode with a minimum cost is selected as the intra mode for coding the video block; and
performing a conversion between the video block of the video and a bitstream of the video based on the first intra prediction mode.

### Claim 2 (depends on 1)

The method of claim 1, wherein the at least one template includes an above template and a left template, and wherein a width (W′) of the above template is not equal to W of the video block and a height (H′) of the left template is not equal to H of the video block.

### Claim 3 (depends on 2)

The method of claim 2, wherein when W′ is smaller than W and W is non-dyadic, W′ of the above template is equal to 2└ log 2W┘,
wherein when W′ is larger than W and W is non-dyadic, W′ of the above template is equal to 2┌ log 2W┐,
wherein when H′ is smaller than H and H is non-dyadic, H′ of the left template is equal to 2└ log 2W┘, and
wherein when H′ is larger than H and H is non-dyadic, H′ of the left template is equal to 2┌ log 2W┐.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
a) a feature (D) of the at least one template used in the TIMD is determined based on a reduced width (W1) or a reduced height (H1) when the video block is the non-dyadic block, where W1 is smaller than W and H1 is smaller than H, and wherein the feature D is a direct current (DC) prediction value for the template:
b) the feature D of the at least one template used in the TIMD is determined based on spatially consecutive multiple samples within the at least one template when the video block is the non-dyadic block, wherein the spatially consecutive multiple samples in a selected above row start from a same x-coordinate being equal to or greater than xCurr, and the spatially consecutive multiple samples in a selected left column start from a same y-coordinate being equal to or greater than yCurr, where xCurr is a horizontal coordinate of a top left sample of the video block and yCurr is a vertical coordinate of a top left sample of the video block: or
c) the feature D of the at least one template used in the TIMD is determined based on spatially non-consecutive multiple samples within the at least one template when the video block is the non-dyadic block, wherein a total number of samples to be used in the TIMD is a dyadic number, at least two of the samples in a selected above row are not located next to each other, and at least two of the samples in a selected left column are not located next to each other.

### Claim 5 (depends on 1)

The method of claim 1, wherein when the video block is the non-dyadic block, a feature (D) of the at least one template used in the TIMD is determined by:
D
=
P
+
Q
+
offset
N
,
wherein
P
=
∑
k
=
0
W
′
-
1
S
⁡
(
k
+
xCurr
,
yCurr
-
RefLy
)
,
Q
=
∑
k
=
0
H
′
-
1
S
⁡
(
xCurr
-
RefLx
,
yCurr
+
k
)
,
and
N
=
W
′
+
H
′
where D is a DC prediction value, offset is an integer value, S indicates a sample value at a corresponding location, k is a sample index, xCurr is a horizontal coordinate of a top left sample of the video block, yCurr is a vertical coordinate of a top left sample of the video block, RefLy indicates a reference line row, RefLx indicates a reference line column, and
wherein H′ is a dyadic height smaller than H or W′ is a dyadic width smaller than W.

### Claim 6 (depends on 1)

The method of claim 1, wherein when the video block is the non-dyadic block, a feature (D) of at least one template used in the TIMD is determined based on a dyadic number of neighbor samples selected according to a step size function, and
wherein when W is a non-dyadic number, S(k×F+xCurr+xOff, yCurr−RefLy) is used to calculate D, or when H is a non-dyadic number, S(xCurr−RefLx, k×F+yCurr+yOff) is used to calculate D, where F is a step size and k is an index for samples to be used, xOff is an offset in an x direction, yOff is an offset in a y direction, xCurr is a horizontal coordinate of a top left sample of the video block, yCurr is a vertical coordinate of a top left sample of the video block, RefLy indicates a reference line row, RefLx indicates a reference line column.

### Claim 7 (depends on 1)

The method of claim 1, wherein the intra mode is adjusted depending on whether the video block is the non-dyadic block, wherein when the video block is the non-dyadic block, the bitstream includes a codeword indicating a wide angle intra prediction used to code the video block, and wherein the codeword indicates a signaled intra prediction (sigpredMode), which can be converted to a final wide angle intra prediction (finalpredMode).

### Claim 8 (depends on 7)

The method of claim 7, wherein finalpredMode is a function of sigpredMode, the width W of the video block, and the height H of the video block,
wherein finalPredMode=SigpredMode in condition A, wherein condition A is that W is equal to H,
wherein finalPredMode=SigpredMode+M in condition B, wherein M is an integer, and condition B is that W>H and sigpredMode is smaller than a threshold mode (ThresMode), and
wherein ThresMode is an angle equal to
arg
min
α
{
tana
≥
H
/
W
}
,
an angle equal to
arg
min
α
{
tana
≤
H
/
W
}
,
a function of a mode difference (modeDiff), a function of modeDiff and a number of intra prediction modes used in TIMD, a function of └ log 2W┘ and └ log 2H┘, a function of ┌ log 2W┐ and ┌ log 2H┐, or a combination thereof.

### Claim 9 (depends on 1)

The method of claim 1, wherein whether a padding process of unavailable samples neighboring the at least one template used in the TIMD depends on whether W and/or H is a dyadic number, wherein the at least one template used in the TIMD has the width of W and/or the height of H, wherein the unavailable samples neighboring the at least one template comprise samples left of the at least one template and samples above the at least one template,
wherein a length of the samples left of the at least one template that are required in an intra-prediction process for the at least one template is dependent on whether W and/or H is a dyadic number, and
wherein a length of the samples above the at least one template that are required in the intra-prediction process for the at least one template is dependent on whether W and/or H is a dyadic number.

### Claim 10 (depends on 1)

The method of claim 1, wherein when the video block is the non-dyadic block, the TIMD is applied for the video block, wherein the at least one template used in the TIMD has the width of W and the height of H, and
wherein when the intra mode is a cross-component prediction mode, a length of samples left of the at least one template that are required in a cross-component linear model (CCLM) is dependent on whether W and/or H is a dyadic number, and a length of samples above the at least one template that are required in the CCLM is dependent on whether W and/or H is a dyadic number.

### Claim 11 (depends on 1)

The method of claim 1, wherein when the video block is the non-dyadic block, the TIMD is applied for the video block, and the at least one template used in the TIMD has the width of W and the height of H, and
wherein when the intra mode is a planar intra-prediction mode, the planar intra-prediction mode is applied based on whether W and/or H is a dyadic number.

### Claim 12 (depends on 11)

The method of claim 11, wherein when both W and H are dyadic numbers, the planar intra-prediction mode is applied in a first way in which no division operation is used in the planar intra-prediction mode, and when at least one of W and H is a non-dyadic number, the planar intra-prediction mode is applied in a second way in which at least one division operation is used in the planar intra-prediction mode,
wherein in the second way, a prediction sample value predSamples[x][y] at position (x, y) is derived by:
a
)
⁢
predV
[
x
]
[
y
]
=
(
(
H
-
1
-
y
)
*
p
[
x
]
[
-
1
]
+
(
y
+
1
)
*
p
[
-
1
]
[
H
]
)
*
W
,
predH
[
x
]
[
y
]
=
(
(
W
-
1
-
x
)
*
p
[
-
1
]
[
y
]
+
(
x
+
1
)
*
p
[
W
]
[
-
1
]
)
*
H
,
and
predSamples
[
x
]
[
y
]
=
(
predV
[
x
]
[
y
]
+
predH
[
x
]
[
y
]
+
W
*
H
)
/
(
W
*
H
*
2
)
;
b
)
⁢
predV
[
x
]
[
y
]
=
(
(
H
-
1
-
y
)
*
p
[
x
]
[
-
1
]
+
(
y
+
1
)
*
p
[
-
1
]
[
H
]
+
H
/
2
)
/
H
,
predH
[
x
]
[
y
]
=
(
(
W
-
1
-
x
)
*
p
[
-
1
]
[
y
]
+
(
x
+
1
)
*
p
[
W
]
[
-
1
]
+
W
/
2
)
/
W
,
predSamples
[
x
]
[
y
]
=
(
predV
[
x
]
[
y
]
+
predH
[
x
]
[
y
]
+
1
)
≫
1
;
c
)
⁢
predV
[
x
]
[
y
]
=
(
(
H
-
1
-
y
)
*
p
[
x
]
[
-
1
]
+
(
y
+
1
)
*
p
[
-
1
]
[
H
]
+
H
/
2
)
/
H
,
predH
[
x
]
[
y
]
=
(
(
W
-
1
-
x
)
*
p
[
-
1
]
[
y
]
+
(
x
+
1
)
*
p
[
W
]
[
-
1
]
+
W
/
2
)
≫
log
⁢
2
⁢
(
W
)
,
predSamples
[
x
]
[
y
]
=
(
predV
[
x
]
[
y
]
+
predH
[
x
]
[
y
]
+
1
)
≫
1
;
or
d
)
⁢
predV
[
x
]
[
y
]
=
(
(
H
-
1
-
y
)
*
p
[
x
]
[
-
1
]
+
(
y
+
1
)
*
p
[
-
1
]
[
H
]
+
H
/
2
)
≫
log
⁢
2
⁢
(
H
)
,
predH
[
x
]
[
y
]
=
(
(
W
-
1
-
x
)
*
p
[
-
1
]
[
y
]
+
(
x
+
1
)
*
p
[
W
]
[
-
1
]
+
W
/
2
)
/
W
,
predSamples
[
x
]
[
y
]
=
(
predV
[
x
]
[
y
]
+
predH
[
x
]
[
y
]
+
1
)
≫
1
,
wherein H is a height of the template, W is a width of the template, (x, y) are sample coordinates, and p[ ][ ] indicates neighboring samples at a corresponding coordinate.

### Claim 13 (depends on 1)

The method of claim 1, wherein the conversion includes encoding the video block into the bitstream.

### Claim 14 (depends on 1)

The method of claim 1, wherein the conversion includes decoding the video block from the bitstream.

### Claim 15

An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:
determine to apply a template-based intra mode derivation (TIMD) to a video block of a video, wherein the video block is coded by an intra mode, a width of the video block is W, and a height of the video block is H;
calculate, for each intra prediction mode in a most probable mode (MPM), a cost between prediction samples and reconstruction samples within at least one template of the video block based on whether the video block is a dyadic block or a non-dyadic block, wherein a first intra prediction mode with a minimum cost is selected as the intra mode for coding the video block; and
perform a conversion between the video block of the video and a bitstream of the video based on the first intra prediction mode.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the at least one template includes an above template and a left template, wherein a width (W′) of the above template is not equal to W of the video block and a height (H′) of the left template is not equal to H of the video block.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein when W′ is smaller than W and W is non-dyadic, W′ of the above template is equal to 2└ log 2W┘,
wherein when W′ is larger than W and W is non-dyadic, W′ of the above template is equal to 2┌ log 2W┐,
wherein when H′ is smaller than H and H is non-dyadic, H′ of the left template is equal to 2└ log 2W┘, and
wherein when H′ is larger than H and His non-dyadic, H′ of the left template is equal to 2┌ log 2W┐.

### Claim 18 (depends on 15)

The apparatus of claim 15, wherein a feature (D) of the at least one template used in the TIMD is determined based on a reduced width (W1) or a reduced height (H1) when the video block is the non-dyadic block, where W1 is smaller than W and H1 is smaller than H, and wherein the feature D is a direct current (DC) prediction value for the template.

### Claim 19

A method for storing bitstream of a video, comprising:
determining to apply a template-based intra mode derivation (TIMD) to a video block of a video, wherein the video block is coded by an intra mode, a width of the video block is W, and a height of the video block is H;
calculating, for each intra prediction mode in a most probable mode (MPM), a cost between prediction samples and reconstruction samples within at least one template of the video block based on whether the video block is a dyadic block or a non-dyadic block, wherein a first intra prediction mode with a minimum cost is selected as the intra mode for coding the video block;
generating the bitstream of the video according to the first intra prediction mode; and
storing the bitstream in a non-transitory computer-readable recoding medium.

### Claim 20 (depends on 19)

The method of claim 19, wherein the at least one template includes an above template and a left template,
wherein a width (W′) of the above template is not equal to W of the video block and a height (H′) of the left template is not equal to H of the video block,
wherein when W′ is smaller than W and W is non-dyadic, W′ of the above template is equal to 2└ log 2W┘,
wherein when W′ is larger than W and W is non-dyadic, W′ of the above template is equal to 2┌ log 2W┐,
wherein when H′ is smaller than H and H is non-dyadic, H′ of the left template is equal to 2└ log 2W┘, and
wherein when H′ is larger than H and H is non-dyadic, H′ of the left template is equal to 2┌ log 2W┐.
