# US 11,310,505 B2 · Method and apparatus for adaptive context modeling in video encoding and decoding

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

- Number: US 11,310,505 B2
- Document ID: US11310505B2
- Status: Granted
- Kind: B2
- Application number: 17/040,023
- Filed: 2019-04-08
- Published: 2021-01-21
- Granted: 2022-04-19
- Earliest claimed: 2018-04-27
- Assignees: InterDigital VC Holdings, Inc.
- Applicants: InterDigital VC Holdings, Inc.
- Inventors: Ya Chen; Fabrice Le Leannec; Tangi Poirier
- Web page: https://patentgrep.com/patent/US11310505B2

## CPC

- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- 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/18: the unit being a set of transform coefficients
- H04N 19/463: by compressing encoding parameters before transmission
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A significance-coefficient flag indicates whether a given quantized transform coefficient is equal to zero or not. To encode the significant-coefficient flags, context-based entropy coding can be used. To adapt to the characteristics of a video sequence, the context model is selected based on the statistics of the transform coefficients. In one embodiment, the non-zero probabilities of transform coefficients are compared to different thresholds to divide a transform block into several context regions, where all coefficients in a context region use the same set of context models. In another embodiment, the transform block is first divided into several context regions based on the positions of the transform coefficients, and the non-zero probabilities of transform coefficients are compared with a threshold to divide each context region into two sub-regions, where all coefficients in a sub-region share the same set of context models.

## Claims

### Claim 1

A method for video decoding, comprising:
obtaining a probability of a quantized transform coefficient, of a block of a picture, being zero or non-zero, based on statistics of transform coefficients of at least a previous picture, wherein said probability is obtained further responsive to a scaling factor that is based on a ratio of a quantization parameter of said at least a previous picture and a quantization parameter of said picture;
determining a context model for a syntax element associated with said quantized transform coefficient, responsive to said probability and a position of said quantized transform coefficient;
entropy decoding said syntax element based on said context model; and
decoding said quantized transform coefficient responsive to said decoded syntax element.

### Claim 2 (depends on 1)

The method of claim 1, wherein said context model is determined responsive to a comparison of (1) a sum of x-coordinate and y-coordinate of said quantized transform coefficient in said block and (2) at least a threshold value.

### Claim 3 (depends on 2)

The method of claim 2, wherein said block is divided into a plurality of context regions based on positions of transform coefficients of said block, wherein a context region of said plurality of context regions is divided into two or more sub-regions based on probabilities of transform coefficients in said region, and wherein each sub-region shares a same set of context model indices.

### Claim 4 (depends on 1)

The method of claim 1, wherein said probability is obtained based on statistics of blocks, at a same size as said block, in said at least a previous picture.

### Claim 5 (depends on 1)

The method of claim 1, wherein said probability is collected by at least one of (1) a size of said block, (2) a coding mode of said block; and (3) a prediction mode of said block.

### Claim 6

A method for video encoding, comprising:
accessing a quantized transform coefficient of a block of a picture in a video;
obtaining a probability of said quantized transform coefficient being zero or non-zero, based on statistics of transform coefficients of at least a previous picture, wherein said probability is obtained further responsive to a scaling factor that is based on a ratio of a quantization parameter of said at least a previous picture and a quantization parameter of said picture;
determining a context model for a syntax element associated with said quantized transform coefficient, responsive to said probability and a position of said quantized transform coefficient; and
entropy encoding said syntax element based on said context model.

### Claim 7 (depends on 6)

The method of claim 6, wherein said context model is determined responsive to a comparison of (1) a sum of x-coordinate and y-coordinate of said quantized transform coefficient in said block and (2) at least a threshold value.

### Claim 8 (depends on 7)

The method of claim 7, wherein said block is divided into a plurality of context regions based on positions of transform coefficients of said block, wherein a context region of said plurality of context regions is divided into two or more sub-regions based on probabilities of transform coefficients in said region, and wherein each sub-region shares a same set of context model indices.

### Claim 9

An apparatus for decoding video data, comprising at least a memory and one or more processors, wherein said one or more processors are configured to:
obtain a probability of a quantized transform coefficient, of a block of a picture, being zero or non-zero, based on statistics of transform coefficients of at least a previous picture, wherein said probability is obtained further responsive to a scaling factor that is based on a ratio of a quantization parameter of said at least a previous picture and a quantization parameter of said picture;
determine a context model for a syntax element associated with said quantized transform coefficient, responsive to said probability and a position of said quantized transform coefficient;
entropy decode said syntax element based on said context model; and
decode said quantized transform coefficient responsive to said decoded syntax element.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein said context model is determined responsive to a comparison of (1) a sum of x-coordinate and y-coordinate of said quantized transform coefficient in said block and (2) at least a threshold value.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein said block is divided into a plurality of context regions based on positions of transform coefficients of said block, wherein a context region of said plurality of context regions is divided into two or more sub-regions based on probabilities of transform coefficients in said region, and wherein each sub-region shares a same set of context model indices.

### Claim 12 (depends on 9)

The apparatus of claim 9, wherein said probability is obtained based on statistics of blocks, at a same size as said block, in said at least a previous picture.

### Claim 13 (depends on 9)

The apparatus of claim 9, wherein said probability is collected by at least one of (1) a size of said block, (2) a coding mode of said block; and (3) a prediction mode of said block.

### Claim 14

An apparatus for encoding video data, comprising at least a memory and one or more processors, wherein said one or more processors are configured to:
access a quantized transform coefficient of a block of a picture in a video;
obtain a probability of said quantized transform coefficient being zero or non-zero, based on statistics of transform coefficients of at least a previous picture, wherein said probability is obtained further responsive to a scaling factor that is based on a ratio of a quantization parameter of said at least a previous picture and a quantization parameter of said picture;
determine a context model for a syntax element associated with said quantized transform coefficient, responsive to said probability and a position of said transform coefficient; and
entropy encode said syntax element based on said context model.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein said context model is determined responsive to a comparison of (1) a sum of x-coordinate and y-coordinate of said quantized transform coefficient in said block and (2) at least a threshold value.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein said block is divided into a plurality of context regions based on positions of transform coefficients of said block, wherein a context region of said plurality of context regions is divided into two or more sub-regions based on probabilities of transform coefficients in said region, and wherein each sub-region shares a same set of context model indices.

### Claim 17 (depends on 6)

The method of claim 6, wherein said probability is obtained based on statistics of blocks, at a same size as said block, in said at least a previous picture.

### Claim 18 (depends on 6)

The method of claim 6, wherein said probability is collected by at least one of (1) a size of said block, (2) a coding mode of said block; and (3) a prediction mode of said block.

### Claim 19 (depends on 14)

The apparatus of claim 14, wherein said probability is obtained based on statistics of blocks, at a same size as said block, in said at least a previous picture.

### Claim 20 (depends on 14)

The apparatus of claim 14, wherein said probability is collected by at least one of (1) a size of said block, (2) a coding mode of said block; and (3) a prediction mode of said block.
