# US 2024/0205456 A1 · Image coding method 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 2024/0205456 A1
- Document ID: US20240205456A1
- Status: Published application
- Kind: A1
- Application number: 18/286,706
- Filed: 2022-04-12
- Published: 2024-06-20
- Earliest claimed: 2021-04-12
- Assignees: LG Electronics Inc.
- Applicants: LG Electronics Inc.
- Inventors: Moonmo KOO; Seunghwan KIM; Jaehyun LIM
- Web page: https://patentgrep.com/patent/US20240205456A1

## CPC

- H04N 19/61: in combination with predictive coding
- H04N 19/122: Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
- H04N 19/129: Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
- 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/176: the region being a block, e.g. a macroblock
- H04N 19/18: the unit being a set of transform coefficients
- H04N 19/60: using transform coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An image decoding method according to this document comprises a step of deriving, for transform coefficients, modified transform coefficients on the basis of inverse secondary transform, wherein: the step of deriving the modified transform coefficients may comprise a step of deriving a transform kernel to be applied to the inverse secondary transform; on the basis of both the horizontal and vertical lengths of a target block being greater than or equal to 8 and the horizontal or vertical length being 8, the transform kernel may be set to a 64×32 matrix; and on the basis of both the horizontal and vertical lengths of the target block being 8, a 64×16 matrix sampled from the 64×32 matrix may be applied to the inverse secondary transform of the target block.

## Claims

### Claim 1

A method for image decoding, the method performed by a decoding apparatus and comprising:
deriving transform coefficients for a target block based on residual information obtained from a bitstream;
deriving modified transform coefficients based on an inverse second-order transform for the transform coefficients;
deriving residual samples for the target block based on an inverse first-order transform of the modified transform coefficients
wherein the deriving the modified transform coefficients includes deriving a transform kernel to be applied to the inverse second-order transform,
wherein, based on that a horizontal length and a vertical length of the target block are both greater than or equal to 8, and the horizontal length or the vertical length is 8, the transform kernel is set to a 64×32 matrix, and
wherein, based on that both the horizontal length and the vertical length of the target block are 8, a 64×16 matrix sampled from the 64×32 matrix is applied to the inverse second-order transform of the target block.

### Claim 2 (depends on 1)

The method of claim 1, wherein, based on that both the horizontal length and the vertical length of the target block are greater than or equal to 4 and the horizontal length or the vertical length is 4, the transform kernel is set to a 16×16 matrix, and
wherein, based on that both the horizontal length and the vertical length of the target block are greater than or equal to 16, the transform kernel is set to a 96×32 matrix.

### Claim 3 (depends on 1)

The method of claim 1, wherein the deriving the modified transform coefficients comprises:
deriving an input array by sorting the transform coefficients according to a forward diagonal scanning order;
deriving a larger number of modified transform coefficients than the transform coefficients through a matrix operation of the input array and a transform kernel; and
arranging the modified transform coefficients in an output area,
wherein the output area is composed of a plurality of 4×4 sub-blocks that can be arranged according to scanning order from a DC position of the target block.

### Claim 4 (depends on 3)

The method of claim 3, wherein, after the modified transform coefficients are derived, the target block includes the output area, a primary transform coefficient area where the transform coefficients exist, and a zero out area where a transform coefficient value is 0.

### Claim 5 (depends on 4)

The method of claim 4, wherein the primary transform coefficient area includes 4×4 sub-blocks in a diagonal direction adjacent to the output area.

### Claim 6 (depends on 5)

The method of claim 5, wherein, based on that both the horizontal length and vertical length of the target block are greater than or equal to 4 and the horizontal length or the vertical length is 4, the primary transform coefficient area is a right 4×4 subblock or a lower 4×4 subblock of the output area.

### Claim 7

A method for image encoding, the method performed by an encoding apparatus and comprising:
deriving residual samples for a target block based on prediction samples for the target block;
deriving transform coefficients for the target block based on a first-order transform for the residual samples;
deriving modified transform coefficients based on a second-order transform for the transform coefficients;
encoding image information including residual information derived based on the modified transform coefficients.
wherein the deriving the modified transform coefficient includes deriving a transform kernel to be applied to the second-order transform,
wherein, based on that a horizontal length and a vertical length of the target block are both greater than or equal to 8, and the horizontal length or the vertical length is 8, the transform kernel is set to a 32×64 matrix, and
wherein, based on that both the horizontal length and the vertical length of the target block are 8, a 16×64 matrix sampled from the 32×64 matrix is applied to the second-order transform of the target block.

### Claim 8 (depends on 7)

The method of claim 7, wherein, based on that both the horizontal length and the vertical length of the target block are greater than or equal to 4 and the horizontal length or the vertical length is 4, the transform kernel is set to a 16×16 matrix, and
wherein, based on that both the horizontal length and the vertical length of the target block are greater than or equal to 16, the transform kernel is set to a 32×96 matrix.

### Claim 9 (depends on 7)

The method of claim 7, wherein the deriving the modified transform coefficients comprises:
deriving an input array by aligning transform coefficients arranged in an upper left input area of the target block;
deriving a smaller number of the modified transform coefficients than the transform coefficients through a matrix operation of the input array and the transform kernel,
wherein the input area is composed of a plurality of 4×4 sub-blocks that can be arranged in scanning order from a DC position of the target block.

### Claim 10 (depends on 9)

The method of claim 9, wherein the target block includes the input area, a primary transform coefficient area where the transform coefficients exist, and a zero out region where a transform coefficient value is 0.

### Claim 11 (depends on 10)

The method of claim 10, wherein the primary transform coefficient area includes 4×4 sub-blocks in a diagonal direction bordering the input area.

### Claim 12 (depends on 11)

The method of claim 11, wherein, based on that both the horizontal length and the vertical length of the target block are greater than or equal to 4 and the horizontal length or vertical length is 4, the primary transform coefficient area is a right 4×4 subblock or a lower 4×4 subblock of the input area.

### Claim 13

A computer-readable digital storage medium, wherein a bitstream generated according to a predetermined method is stored in the computer-readable digital storage medium, the method comprising:
deriving residual samples for a target block based on prediction samples for the target block;
deriving transform coefficients for the target block based on a first-order transform for the residual samples;
deriving modified transform coefficients based on a second-order transform for the transform coefficients;
encoding image information including residual information derived based on the modified transform coefficients to generate the bitstream,
wherein the deriving the modified transform coefficient includes deriving a transform kernel to be applied to the second-order transform,
wherein, based on that a horizontal length and a vertical length of the target block are both greater than or equal to 8, and the horizontal length or the vertical length is 8, the transform kernel is set to a 32×64 matrix, and
wherein, based on that both the horizontal length and the vertical length of the target block are 8, a 16×64 matrix sampled from the 32×64 matrix is applied to the second-order transform of the target block.
