# US 11,445,217 B2 · Context coding for matrix-based intra prediction

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

- Number: US 11,445,217 B2
- Document ID: US11445217B2
- Status: Granted
- Kind: B2
- Application number: 17/479,338
- Filed: 2021-09-20
- Published: 2022-01-13
- Granted: 2022-09-13
- Earliest claimed: 2019-05-01
- Assignees: Beijing Bytedance Network Technology Co., Ltd.; Bytedance Inc.
- Applicants: Beijing Bytedance Network Technology Co., Ltd.; Bytedance Inc.
- Inventors: Zhipin Deng; Kai Zhang; Li Zhang; Hongbin Liu; Jizheng Xu
- Web page: https://patentgrep.com/patent/US11445217B2

## CPC

- 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

Devices, systems and methods for digital video coding, which includes matrix-based intra prediction methods for video coding, are described. In a representative aspect, a method for video processing includes encoding a current video block of a video using a matrix intra prediction (MIP) mode in which a prediction block of the current video block is determined by performing, on previously coded samples of the video, a boundary downsampling operation, followed by a matrix vector multiplication operation, and selectively followed by an upsampling operation; and adding, to a coded representation of the current video block, a syntax element indicative of applicability of the MIP mode to the current video block using arithmetic coding in which a context for the syntax element is derived based on a rule.

## Claims

### Claim 1

A method of processing video data, comprising:
determining, for a conversion between a current video block of a video and a bitstream of the video, whether a matrix intra prediction (MIP) mode is applied on the current video block based on a syntax element, wherein in the MIP mode, prediction samples of the current video block are determined by performing a matrix vector multiplication operation; and
performing the conversion based on the determining,
wherein at least one bin of the syntax element is context coded, and an increment value of the context is determined based on characteristics of a neighboring block of the current video block,
wherein the increment value of the context is determined further based on a size of the current video block,
wherein in response to a width-height ratio of the current video block being greater than 2, a context with a first predefined increment value is used for coding the at least one bin of the syntax element,
wherein in response to a width-height ratio of the current video block being smaller than or equal to 2, a context with a second increment value is used for coding the at least one bin of the syntax element, wherein the second increment value is not identical to the first predefined increment value.

### Claim 2 (depends on 1)

The method of claim 1, wherein the second increment value is selected from an increment value group based on the characteristics of the neighboring block.

### Claim 3 (depends on 2)

The method of claim 2, wherein the characteristics of the neighboring block include coding mode of the neighboring block and availability of the neighboring block.

### Claim 4 (depends on 3)

The method of claim 3, wherein a left neighboring video block of the current video block and a top neighboring video block of the current video block are used to select the second increment value.

### Claim 5 (depends on 4)

The method of claim 4, wherein the second increment value is derived based on a following equation:
ctxInc=(condL && availableL)+(condA && availableA),
wherein condL is a first MIP syntax element of the left neighboring video block of the current video block,
wherein condA is a second MIP syntax element of the top neighboring video block of the current video block,
wherein availableL and availableA indicate the availability of the left neighboring video block and the top neighboring video block, respectively, and
wherein && indicates a logical And operation.

### Claim 6 (depends on 1)

The method of claim 1, wherein a boundary down-sampling operation on reference samples of the current video block and an up-sampling operation are included in the MIP mode based on the size of the current video block.

### Claim 7 (depends on 6)

The method of claim 6, wherein in the boundary down-sampling operation, reduced boundary samples are directly generated from the reference samples and a downscaling factor without generating intermediate samples.

### Claim 8 (depends on 7)

The method of claim 7, wherein the downscaling factor is calculated based on a width or height of the current video block and a boundary size value.

### Claim 9 (depends on 1)

The method of claim 1, wherein the MIP mode includes multiple types, and a type index for the current video block is derived excluding referring to type indices of previous video blocks.

### Claim 10 (depends on 9)

The method of claim 9, wherein the type index for the current video block is explicitly included in the bitstream.

### Claim 11 (depends on 1)

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

### Claim 12 (depends on 1)

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

### Claim 13

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, for a conversion between a current video block of a video and a bitstream of the video, whether a matrix intra prediction (MIP) mode is applied on the current video block based on a syntax element, wherein in the MIP mode, prediction samples of the current video block are determined by performing a matrix vector multiplication operation; and
perform the conversion based on the determining,
wherein at least one bin of the syntax element is context coded, and an increment value of the context is determined based on characteristics of a neighboring block of the current video block,
wherein the increment value of the context is determined further based on a size of the current video block,
wherein in response to a width-height ratio of the current video block being greater than 2, a context with a first predefined increment value is used for coding the at least one bin of the syntax element,
wherein in response to a width-height ratio of the current video block being smaller than or equal to 2, a context with a second increment value is used for coding the at least one bin of the syntax element, wherein the second increment value is not identical to the first predefined increment value.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the second increment value is derived based on a following equation:
ctxInc=(condL && availableL)+(condA && availableA),
wherein condL is a first MIP syntax element of the left neighboring video block of the current video block,
wherein condA is a second MIP syntax element of the top neighboring video block of the current video block,
wherein availableL and availableA indicate the availability of the left neighboring video block and the top neighboring video block, respectively, and
wherein && indicates a logical And operation.

### Claim 15

A non-transitory computer-readable storage medium storing instructions that cause a processor to:
determine, for a conversion between a current video block of a video and a bitstream of the video, whether a matrix intra prediction (MIP) mode is applied on the current video block based on a syntax element, wherein in the MIP mode, prediction samples of the current video block are determined by performing a matrix vector multiplication operation; and
perform the conversion based on the determining,
wherein at least one bin of the syntax element is context coded, and an increment value of the context is determined based on characteristics of a neighboring block of the current video block,
wherein the increment value of the context is determined further based on a size of the current video block,
wherein in response to a width-height ratio of the current video block being greater than 2, a context with a first predefined increment value is used for coding the at least one bin of the syntax element,
wherein in response to a width-height ratio of the current video block being smaller than or equal to 2, a context with a second increment value is used for coding the at least one bin of the syntax element, wherein the second increment value is not identical to the first predefined increment value.

### Claim 16

A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises:
determining whether a matrix intra prediction (MIP) mode is applied on a current video block of the video based on a syntax element, wherein in the MIP mode, prediction samples of the current video block are determined by performing a matrix vector multiplication operation; and
generating the bitstream based on the determining,
wherein at least one bin of the syntax element is context coded, and an increment value index of the context is determined based on characteristics of a neighboring block of the current video block,
wherein the increment value of the context is determined further based on a size of the current video block,
wherein in response to a width-height ratio of the current video block being greater than 2, a context with a first predefined increment value is used for coding the at least one bin of the syntax element,
wherein in response to a width-height ratio of the current video block being smaller than or equal to 2, a context with a second increment value is used for coding the at least one bin of the syntax element, wherein the second increment value is not identical to the first predefined increment value.

### Claim 17 (depends on 13)

The apparatus of claim 13, wherein a boundary down-sampling operation on reference samples of the current video block and an up-sampling operation are included in the MIP mode based on the size of the current video block.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein in the boundary down-sampling operation, reduced boundary samples are directly generated from the reference samples and a downscaling factor without generating intermediate samples.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the downscaling factor is calculated based on a width or height of the current video block and a boundary size value.

### Claim 20 (depends on 13)

The apparatus of claim 13, wherein the MIP mode includes multiple types, and a type index for the current video block is derived excluding referring to type indices of previous video blocks.
