# US 12,010,315 B2 · Method for decoding video for residual coding and device therefor

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

- Number: US 12,010,315 B2
- Document ID: US12010315B2
- Status: Granted
- Kind: B2
- Application number: 17/629,958
- Filed: 2020-08-26
- Published: 2022-08-18
- Granted: 2024-06-11
- Earliest claimed: 2019-08-31
- Assignees: LG Electronics Inc.
- Applicants: LG Electronics Inc.
- Inventors: Jungah Choi; Jin Heo; Sunmi Yoo; Jaehyun Lim; Jangwon Choi; Seunghwan Kim
- Web page: https://patentgrep.com/patent/US12010315B2

## CPC

- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/12: Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/157: Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- 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/182: the unit being a pixel
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N 19/91: Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method for decoding a video performed by a decoding device according to the present document is characterized by comprising: a step for acquiring video information including prediction mode information and residual information through a bitstream; a step for deriving a prediction mode of a current block on the basis of the prediction mode information; a step for deriving a prediction sample on the basis of the prediction mode; a step for deriving a current residual coefficient on the basis of residual syntax elements for the current residual coefficient in the current block; a step for deriving a residual sample on the basis of the current residual coefficient; and a step for deriving a reconstructed sample of the current block on the basis of the prediction sample and the residual sample.

## Claims

### Claim 1

An image decoding method performed by a decoding apparatus, the method comprising:
obtaining image information including prediction mode information and residual information through a bitstream;
deriving a prediction mode of a current block based on the prediction mode information;
deriving a prediction sample based on the prediction mode;
deriving a current residual coefficient based on residual syntax elements for the current residual coefficient in the current block;
deriving a residual sample based on the current residual coefficient; and
deriving a reconstructed sample of the current block based on the residual sample and the prediction sample,
wherein the residual information includes the residual syntax elements for the current residual coefficient,
wherein a number of context coded residual syntax elements for residual coefficients prior to the current residual coefficient among residual coefficients of the current block is equal to a maximum number of context coded bins of the current block,
wherein the residual syntax elements for the current residual coefficient include coefficient level information for the current residual coefficient and a sign flag of the current residual coefficient,
wherein an absolute level of the current residual coefficient is derived as a value indicated by the coefficient level information for the current residual coefficient, and a sign of the current residual coefficient is derived as a sign indicated by the sign flag,
wherein the current residual coefficient is derived without performing level mapping, wherein the residual coefficients prior to the current residual coefficient are derived by performing the level mapping, and
wherein the level mapping for a target residual coefficient comprises:
deriving a maximum value among an absolute level of a left residual coefficient of the target residual coefficient and an absolute level of a top residual coefficient of the target residual coefficient,
comparing an absolute level of the target residual coefficient with the maximum value, and
deriving a modified absolute level of the target residual coefficient based on the comparison.

### Claim 2 (depends on 1)

The image decoding method of claim 1, wherein the current block is a transform skip block.

### Claim 3 (depends on 2)

The image decoding method of claim 2, wherein the image information includes a transform skip flag representing whether transform is applied to the current block, and wherein a value of the transform skip flag for the current block is 1.

### Claim 4 (depends on 1)

The image decoding method of claim 1, wherein the maximum number of the context coded bins of the current block is derived based on a width and a height of the current block.

### Claim 5 (depends on 1)

The image decoding method of claim 1, wherein the context coded bins for the current block are all used as bins of the context coded residual syntax elements for the residual coefficients prior to the current residual coefficient.

### Claim 6 (depends on 1)

The image decoding method of claim 1, wherein the context-coded residual syntax elements include a significant coefficient flag representing whether a residual coefficient is a non-zero residual coefficient, a parity level flag for a parity of a coefficient level for the residual coefficient, a sign flag representing a sign for the residual coefficient, a first coefficient level flag for whether the coefficient level is greater than a first threshold and a second coefficient level flag for whether the coefficient level is greater than a second threshold.

### Claim 7

An image encoding method performed by an encoding apparatus, the method comprising:
deriving a prediction sample of a current block based on inter prediction or intra prediction;
deriving a residual sample of the current block based on the prediction sample;
deriving a current residual coefficient based on the residual sample; and
encoding image information including prediction mode information representing a prediction mode of the current block and residual syntax elements for the current residual coefficient,
wherein a number of context coded residual syntax elements for residual coefficients prior to the current residual coefficient among residual coefficients of the current block is equal to a maximum number of context coded bins of the current block,
wherein the residual syntax elements for the current residual coefficient include coefficient level information for the current residual coefficient and a sign flag of the current residual coefficient,
wherein the coefficient level information represents an absolute value of a coefficient level of the current residual coefficient, and the sign flag of the current residual coefficient represents a sign of the current residual coefficient,
wherein the current residual coefficient is encoded without performing level mapping,
wherein the residual coefficients prior to the current residual coefficient are encoded by performing the level mapping, and
wherein the level mapping for a target residual coefficient comprises:
deriving a maximum value among an absolute level of a left residual coefficient of the target residual coefficient and an absolute level of a top residual coefficient of the target residual coefficient,
comparing an absolute level of the target residual coefficient with the maximum value, and
deriving a modified absolute level of the target residual coefficient based on the comparison.

### Claim 8 (depends on 7)

The image encoding method of claim 7, wherein the current block is a transform skip block.

### Claim 9 (depends on 8)

The image encoding method of claim 8, wherein the image information includes a transform skip flag representing whether transform is applied to the current block, and
wherein a value of the transform skip flag for the current block is 1.

### Claim 10 (depends on 7)

The image encoding method of claim 7, wherein the maximum number of the context coded bins of the current block is derived based on a width and a height of the current block.

### Claim 11 (depends on 7)

The image encoding method of claim 7, wherein the context coded bins for the current block are all used as bins of the context coded residual syntax elements for the residual coefficients prior to the current residual coefficient.

### Claim 12 (depends on 7)

The image encoding method of claim 7, wherein the context-coded residual syntax elements include a significant coefficient flag representing whether a residual coefficient is a non-zero residual coefficient, a parity level flag for a parity of a coefficient level for the residual coefficient, a sign flag representing a sign for the residual coefficient, a first coefficient level flag for whether the coefficient level is greater than a first threshold and a second coefficient level flag for whether the coefficient level is greater than a second threshold.

### Claim 13

A non-transitory computer-readable storage medium storing a bitstream generated by a method, the method comprising:
deriving a prediction sample of a current block based on inter prediction or intra prediction;
deriving a residual sample of the current block based on the prediction sample;
deriving a current residual coefficient based on the residual sample;
encoding image information including prediction mode information representing a prediction mode of the current block and residual syntax elements for the current residual coefficient; and
generating the bitstream including the image information,
wherein a number of context coded residual syntax elements for residual coefficients prior to the current residual coefficient among residual coefficients of the current block is equal to a maximum number of context coded bins of the current block,
wherein the residual syntax elements for the current residual coefficient include coefficient level information for the current residual coefficient and a sign flag of the current residual coefficient,
wherein the coefficient level information represents an absolute value of a coefficient level of the current residual coefficient, and the sign flag of the current residual coefficient represents a sign of the current residual coefficient,
wherein the current residual coefficient is encoded without performing level mapping,
wherein the residual coefficients prior to the current residual coefficient are encoded by performing the level mapping, and
wherein the level mapping for a target residual coefficient comprises:
deriving a maximum value among an absolute level of a left residual coefficient of the target residual coefficient and an absolute level of a top residual coefficient of the target residual coefficient,
comparing an absolute level of the target residual coefficient with the maximum value, and
deriving a modified absolute level of the target residual coefficient based on the comparison.

### Claim 14

A transmission method of data for image, the method comprising:
obtaining a bitstream of image information including prediction mode information representing a prediction mode of a current block and residual syntax elements for a current residual coefficient in the current block; and
transmitting the data including the bitstream of the image information including the prediction mode information and the residual syntax elements,
wherein a prediction sample of the current block is derived based on inter prediction or intra prediction, and the prediction mode information is information whether the inter prediction or the intra prediction is applied to the current block as the prediction mode of the current block,
wherein the current residual coefficient is derived based on a residual sample of the current block and the residual sample is derived based on the prediction sample of the current block,
wherein a number of context coded residual syntax elements for residual coefficients prior to the current residual coefficient among residual coefficients of the current block is equal to a maximum number of context coded bins of the current block,
wherein the residual syntax elements for the current residual coefficient include coefficient level information for the current residual coefficient and a sign flag of the current residual coefficient,
wherein the coefficient level information represents an absolute value of a coefficient level of the current residual coefficient, and the sign flag of the current residual coefficient represents a sign of the current residual coefficient,
wherein the current residual coefficient is encoded without performing level mapping,
wherein the residual coefficients prior to the current residual coefficient are encoded by performing the level mapping, and
wherein the level mapping for a target residual coefficient comprises:
deriving a maximum value among an absolute level of a left residual coefficient of the target residual coefficient and an absolute level of a top residual coefficient of the target residual coefficient,
comparing an absolute level of the target residual coefficient with the maximum value, and
deriving a modified absolute level of the target residual coefficient based on the comparison.
