# US 2023/0068825 A1 · Method and apparatus for further improved context design for prediction mode and coded block flag (cbf)

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

- Number: US 2023/0068825 A1
- Document ID: US20230068825A1
- Status: Published application
- Kind: A1
- Application number: 17/975,850
- Filed: 2022-10-28
- Published: 2023-03-02
- Earliest claimed: 2018-12-07
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Xin ZHAO; Xiang Li; Shan Liu
- Web page: https://patentgrep.com/patent/US20230068825A1

## CPC

- 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/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- 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/46: Embedding additional information in the video signal during the compression process (H04N19/517, H04N19/68, H04N19/70 take precedence)
- H04N 19/463: by compressing encoding parameters before transmission
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method of controlling intra-inter prediction for decoding or encoding of a video sequence, is performed by at least one processor. The method includes determining whether one or more neighboring blocks in a video sequence is coded by an intra prediction mode, coding a prediction mode flag of a current block by a first context based on determining that at least one of the neighboring blocks is coded by the intra prediction mode, and coding the prediction mode flag of the current block by a second context based on determining that none of the neighboring blocks are coded by at least the intra prediction mode.

## Claims

### Claim 1

A method for video coding, the method comprising:
determining whether at least one of a plurality of neighboring blocks in a video sequence is coded by a mode;
coding a flag of a current block by a first context based on determining that at least one of the plurality of neighboring blocks is coded by the mode and regardless of whether more than the at least one of the plurality of neighboring blocks are coded by the mode; and
coding the flag of the current block by a second context based on determining that none of the plurality of neighboring blocks are coded by at least the mode,
wherein the mode is one of an intra prediction mode, an inter prediction mode, and an intra-inter prediction mode.

### Claim 2 (depends on 1)

The method according to claim 1,
wherein coding the flag of the current block comprises coding by only the first context and the second context.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
determining whether at least one of the plurality of neighboring blocks is coded by the intra-inter prediction mode;
coding the flag of the current block by the first context based on determining that at least one of the plurality of neighboring blocks is coded by the intra-inter prediction mode; and
coding the flag of the current block by the second context based on determining that none of the plurality of neighboring blocks are coded by any of the intra prediction mode and the intra-inter prediction mode.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
coding a skip flag of the current block by a first skip context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the skip flag of the current block by a second skip context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising:
coding an affine flag of the current block by a first affine context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the affine flag of the current block by a second affine context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
coding a sub-block merge flag of the current block by a first sub-block merge context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the sub-block merge flag of the current block by a second sub-block merge context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising:
coding a coding unit (CU) split flag of the current block by a first CU split context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the CU split flag of the current block by a second CU split context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 8 (depends on 1)

The method according to claim 1, further comprising:
coding an adaptive motion vector resolution (AMVR) flag of the current block by a first AMVR context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the AMVR flag of the current block by a second AMVR context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
coding an intra-inter mode flag of the current block by a first intra-inter mode context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the intra-inter mode flag of the current block by a second intra-inter mode context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 10 (depends on 1)

The method according to claim 1, further comprising:
coding a triangle partitioning mode flag of the current block by a first triangle partitioning mode context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the triangle partitioning mode flag of the current block by a second triangle partitioning mode context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 11 (depends on 1)

The method according to claim 1, further comprising:
coding a coded block flag (CBF) of the current block by a first CBF context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
coding the CBF of the current block by a second CBF context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 12

An apparatus for video decoding or encoding, the apparatus comprising:
at least one memory configured to store computer program code; and
at least one processor configured to access the at least one memory and operate according to the computer program code, the computer program code comprising:
first determining code configured to cause the at least one processor to determine whether at least one of a plurality of neighboring blocks in a video sequence is coded by a mode;
first performing code configured to cause the at least one processor to entropy code a flag of a current block by a first context based on determining that at least one of the plurality of neighboring blocks is coded by the mode and regardless of whether more than the at least one of the plurality of neighboring blocks are coded by the mode; and
second performing code configured to cause the at least one processor to code the flag of the current block by a second context based on determining that none of the plurality of neighboring blocks are coded by at least the mode,
wherein the mode is one of an intra prediction mode, an inter prediction mode, and an intra-inter prediction mode.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein the first performing code is further configured to cause the processor to perform coding, of the flag of the current block, comprising coding by only the first context and the second context.

### Claim 14 (depends on 12)

The apparatus according to claim 12, wherein the computer program code further comprises:
second determining code configured to cause the at least one processor to determine whether at least one of the plurality of neighboring blocks is coded by the intra-inter prediction mode;
third performing code configured to cause the at least one processor to code the flag of the current block by the first context based on determining that at least one of the plurality of neighboring blocks is coded by the intra-inter prediction mode; and
fourth performing code configured to cause the at least one processor to code the flag of the current block by the second context based on determining that none of the plurality of neighboring blocks are coded by any of the intra prediction mode and the intra-inter prediction mode.

### Claim 15 (depends on 12)

The apparatus according to claim 12, wherein the computer program code further comprises:
third performing code configured to cause the at least one processor to code a skip flag of the current block by a first skip context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
fourth performing code configured to cause the at least one processor to code the skip flag of the current block by a second skip context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 16 (depends on 12)

The apparatus according to claim 12, further comprising:
third performing code configured to cause the at least one processor to code an affine flag of the current block by a first affine context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
fourth performing code configured to cause the at least one processor to code the affine flag of the current block by a second affine context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 17 (depends on 12)

The apparatus according to claim 12, further comprising:
third performing code configured to cause the at least one processor to code a sub-block merge flag of the current block by a first sub-block merge context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
fourth performing code configured to cause the at least one processor to code the sub-block merge flag of the current block by a second sub-block merge context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 18 (depends on 12)

The apparatus according to claim 12, further comprising:
third performing code configured to cause the at least one processor to code a coding unit (CU) split flag of the current block by a first CU split context based on determining that at least one of the plurality of neighboring blocks is coded by the mode; and
fourth performing code configured to cause the at least one processor to code the CU split flag of the current block by a second CU split context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 19 (depends on 12)

The apparatus according to claim 12, further comprising:
third performing code configured to cause the at least one processor to code an adaptive motion vector resolution (AMVR) flag of the current block by a first AMVR context based on determining that at least one of the plurality of neighboring blocks is coded by the intra prediction mode; and
fourth performing code configured to cause the at least one processor to code the AMVR flag of the current block by a second AMVR context based on determining that none of the plurality of neighboring blocks are coded by at least the mode.

### Claim 20

A non-transitory computer-readable storage medium storing instructions that cause at least one processor to:
determine whether at least one of a plurality of neighboring blocks in a video sequence is coded by an intra prediction mode which is different than a mode;
code a prediction mode flag of a current block by a first context based on determining that at least one of the plurality of neighboring blocks is coded by the mode and regardless of whether more than the at least one of the plurality of neighboring blocks are coded by the mode; and
code the prediction mode flag of the current block by a second context based on determining that none of the plurality of neighboring blocks are coded by at least the mode,
wherein the mode is one of an intra prediction mode, an inter prediction mode, and an intra-inter prediction mode.
