# US 2025/0159180 A1 · Image decoding method using context-coded sign flag in image coding system and apparatus therefor

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

- Number: US 2025/0159180 A1
- Document ID: US20250159180A1
- Status: Published application
- Kind: A1
- Application number: 19/021,641
- Filed: 2025-01-15
- Published: 2025-05-15
- Earliest claimed: 2019-03-04
- Assignees: LG Electronics Inc.
- Applicants: LG Electronics Inc.
- Inventors: Sunmi YOO; Jin HEO; Jungah CHOI; Seunghwan KIM
- Web page: https://patentgrep.com/patent/US20250159180A1

## 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/91: Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
- 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/196: being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters (processing of motion vectors H04N19/513)
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An image decoding method performed by a decoding device according to the present document comprises the steps of: deriving a context model for a sign flag of a current residual coefficient of a current block; and decoding the sign flag on the basis of the context model, wherein the context model for the sign flag is derived on the basis of a sign flag of a residual coefficient decoded before the current residual coefficient in the current block.

## Claims

### Claim 1

A decoding apparatus for image decoding, the decoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
receive residual information for a current block;
derive a context index increment for a sign flag representing a sign of a current residual coefficient of the current block;
derive a context index for the sign flag based on the context index increment;
decoding the sign flag based on a context model for the sign flag indicated by the context index;
derive the current residual coefficient based on the sign flag;
derive a residual sample based on the current residual coefficient; and
generate a reconstructed picture based on the residual sample,
wherein the context index increment for the sign flag is derived based on a sign flag of a residual coefficient decoded prior to the current residual coefficient in the current block, and
wherein the residual information includes information on an absolute value of a transform coefficient level at a scanning position.

### Claim 2 (depends on 1)

The image decoding apparatus of claim 1,
wherein when a value of the sign flag of the residual coefficient decoded prior to the current residual coefficient is 0, a value of the context index increment is derived as 0, and
wherein when the value of the sign flag of the residual coefficient decoded prior to the current residual coefficient is 1, the value of the context index increment is derived as 1.

### Claim 3 (depends on 1)

The image decoding apparatus of claim 1, wherein a value of the context index increment for the sign flag is derived as one of a plurality of values based on sign flags of a plurality of residual coefficients decoded prior to the current residual coefficient in the current block.

### Claim 4 (depends on 1)

The image decoding apparatus of claim 1,
wherein when a current sub-block in the current block is not a sub-block decoded in the first order and the current residual coefficient is a residual coefficient decoded first in the current sub-block, the residual coefficient decoded prior to the current residual coefficient is derived as a residual coefficient decoded last in a sub-block decoded prior to the current sub-block.

### Claim 5 (depends on 1)

The image decoding apparatus of claim 1,
wherein the residual coefficient decoded prior to the current residual coefficient is a residual coefficient adjacent to the current residual coefficient.

### Claim 6 (depends on 1)

The image decoding apparatus of claim 1, further comprising determining whether the sign flag is decoded based on the context model, based on whether transform of the current block is applied.

### Claim 7 (depends on 6)

The image decoding apparatus of claim 6,
wherein when the transform is applied to the current block, the sign flag is bypass-decoded,
wherein when the transform is not applied to the current block, the sign flag is decoded based on the context model.

### Claim 8

An encoding apparatus for image encoding, the encoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
derive a residual sample of a current block;
derive a current residual coefficient of the current block based on the residual sample;
derive a context index increment for a sign flag representing a sign of the current residual coefficient;
derive a context index for the sign flag based on the context index increment;
encode the sign flag based on a context model for the sign flag indicated by the context index; and
generate a bitstream including the sign flag and residual information,
wherein the context index increment for the sign flag is derived based on a sign flag of a residual coefficient encoded prior to the current residual coefficient in the current block, and
wherein the residual information includes information on an absolute value of a transform coefficient level at a scanning position.

### Claim 9 (depends on 8)

The image encoding apparatus of claim 8,
wherein when a value of the sign flag of the residual coefficient encoded prior to the current residual coefficient is 0, a value of the context index increment is derived as 0, and
wherein when the value of the sign flag of the residual coefficient encoded prior to the current residual coefficient is 1, the value of the context index increment is derived as 1.

### Claim 10 (depends on 9)

The image encoding apparatus of claim 9, wherein a value of the context index increment for the sign flag is derived as one of a plurality of values based on sign flags of a plurality of residual coefficients encoded prior to the current residual coefficient in the current block.

### Claim 11 (depends on 8)

The image encoding apparatus of claim 8,
wherein when a current sub-block in the current block is not a sub-block encoded in the first order and the current residual coefficient is a residual coefficient encoded first in the current sub-block, the residual coefficient encoded prior to the current residual coefficient is derived as a residual coefficient encoded last in a sub-block encoded prior to the current sub-block.

### Claim 12 (depends on 8)

The image encoding apparatus of claim 8, further comprising determining whether the sign flag is encoded based on the context model, based on whether transform of the current block is applied.

### Claim 13

An apparatus for transmitting data for an image, the apparatus comprising:
at least one processor configured to obtain a bitstream; and
a transmitter configured to transmit the bitstream,
wherein the bitstream is generated by:
deriving a residual sample of a current block;
deriving a current residual coefficient of the current block based on the residual sample;
deriving a context index increment for a sign flag representing a sign of the current residual coefficient;
deriving a context index for the sign flag based on the context index increment;
encoding the sign flag based on a context model for the sign flag indicated by the context index; and
generating the bitstream including the sign flag and residual information,
wherein the context index increment for the sign flag is derived based on a sign flag of a residual coefficient encoded prior to the current residual coefficient in the current block, and
wherein the residual information includes information on an absolute value of a transform coefficient level at a scanning position.
