# US 12,003,766 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 12,003,766 B2
- Document ID: US12003766B2
- Status: Granted
- Kind: B2
- Application number: 17/942,552
- Filed: 2022-09-12
- Published: 2023-02-09
- Granted: 2024-06-04
- 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/US12003766B2

## 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 increasement value of the context is determined based on characteristics of a neighboring block of the current video block,
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 a size of the current video block, and
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 2 (depends on 1)

The method of claim 1, wherein the increasement value of the context is determined further based on the size of the current video block.

### Claim 3 (depends on 2)

The method of claim 2, wherein in response to a width-height ratio of the current video block being greater than 2, a context with a first predefined increasement value is used for coding the at least one bin of the syntax element.

### Claim 4 (depends on 3)

The method of claim 3, wherein in response to the width-height ratio of the current video block being smaller than or equal to 2, a context with a second increasement value is used for coding the at least one bin of the syntax element, wherein the second increasement value is not identical to the first predefined increasement value.

### Claim 5 (depends on 4)

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

### Claim 6 (depends on 5)

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

### Claim 7 (depends on 6)

The method of claim 6, 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 increasement value.

### Claim 8 (depends on 7)

The method of claim 7, wherein the second increasement 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 9 (depends on 1)

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

### Claim 10 (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 11 (depends on 10)

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

### Claim 12 (depends on 1)

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

### Claim 13 (depends on 1)

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

### Claim 14

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 increasement value of the context is determined based on characteristics of a neighboring block of the current video block,
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 a size of the current video block, and
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 15 (depends on 14)

The apparatus of claim 14, wherein the increasement value of the context is determined further based on the size of the current video block, and
wherein in response to a width-height ratio of the current video block being greater than 2, a context with a first predefined increasement value is used for coding the at least one bin of the syntax element, and in response to the width-height ratio of the current video block being smaller than or equal to 2, a context with a second increasement value is used for coding the at least one bin of the syntax element, wherein the second increasement value is not identical to the first predefined increasement value.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the second increasement value is derived based on a following equation:
ctxInc=(condL && availableL)+(condA && availableA),
wherein condL is a first MIP syntax element of a left neighboring video block of the current video block,
wherein condA is a second MIP syntax element of a 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 17

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 increasement value of the context is determined based on characteristics of a neighboring block of the current video block,
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 a size of the current video block, and
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 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, wherein the increasement value of the context is determined further based on the size of the current video block, and
wherein in response to a width-height ratio of the current video block being greater than 2, a context with a first predefined increasement value is used for coding the at least one bin of the syntax element, and in response to the width-height ratio of the current video block being smaller than or equal to 2, a context with a second increasement value is used for coding the at least one bin of the syntax element, wherein the second increasement value is not identical to the first predefined increasement value.

### Claim 19

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 increasement value of the context is determined based on characteristics of a neighboring block of the current video block,
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 a size of the current video block, and
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.
