# US 2021/0344959 A1 · Image coding method based on secondary transform, 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 2021/0344959 A1
- Document ID: US20210344959A1
- Status: Published application
- Kind: A1
- Application number: 17/329,749
- Filed: 2021-05-25
- Published: 2021-11-04
- Earliest claimed: 2018-12-18
- Assignees: LG Electronics Inc.
- Applicants: LG Electronics Inc.
- Inventors: Moonmo KOO; Seunghwan KIM; Jaehyun LIM
- Web page: https://patentgrep.com/patent/US20210344959A1

## CPC

- 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/61: in combination with predictive coding
- H04N 19/11: among a plurality of spatial predictive coding modes
- H04N 19/124: Quantisation
- 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/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/167: Position within a video image, e.g. region of interest [ROI]
- 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/593: involving spatial prediction techniques
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An image decoding method according to the present document comprises the steps of: deriving transform coefficients through inverse quantization on the basis of quantized transform coefficients for a target block; deriving modified transform coefficients on the basis of an inverse reduced secondary transform (RST) for the transform coefficients; and generating, on the basis of an inverse primary transform for the modified transform coefficients, a restoration picture based on residual samples for the target block, wherein the modified transform coefficients derived according to the inverse RST are two-dimensionally arranged according to the order of a row priority direction or a column priority direction according to an intra prediction mode to be applied to the target block.

## Claims

### Claim 1

An image decoding method performed by a decoding apparatus, the method comprising:
deriving transform coefficients through dequantization based on quantized transform coefficients for a target block;
deriving modified transform coefficients based on an inverse reduced secondary transform (RST) using a preset transform kernel matrix for the transform coefficients;
deriving residual samples for the target block based on an inverse primary transform for the modified transform coefficients; and
generating a reconstructed picture based on the residual samples for the target block,
wherein the inverse RST is an inverse transform of a transform that derives a smaller number of transform coefficients than transform coefficients for a predetermined top-left area of the target block based on the transform coefficients for the top-left area,
wherein the modified transform coefficients in a two-dimensional array are derived, by applying the inverse RST, from the transform coefficients in a one-dimensional (1D) array according to one of a row-first direction or a column-first direction according to an intra prediction mode applied to the target block.

### Claim 2 (depends on 1)

The image decoding method of claim 1, wherein, when the intra prediction mode is a horizontal mode in a left direction with respect to a top-left diagonal direction, the modified transform coefficients are two-dimensionally arranged according to the row-first direction.

### Claim 3 (depends on 2)

The image decoding method of claim 2, wherein, when an intra prediction mode applicable to the target block is one of 65 directional modes, an intra prediction mode in the top-left diagonal direction is mode 34, and the intra prediction mode applied to the target block comprises mode 2 to mode 34, the modified transform coefficients are two-dimensionally arranged according to the row-first direction.

### Claim 4 (depends on 1)

The image decoding method of claim 1, wherein, when the intra prediction mode is a vertical mode in a right direction with respect to a top-left diagonal direction, the modified transform coefficients are two-dimensionally arranged according to the column-first direction.

### Claim 5 (depends on 3)

The image decoding method of claim 3, wherein, when an intra prediction mode applicable to the target block is one of 65 directional modes, an intra prediction mode in the top-left diagonal direction is mode 34, and the intra prediction mode applied to the target block comprises mode 35 to mode 66, the modified transform coefficients are two-dimensionally arranged according to the column-first direction.

### Claim 6 (depends on 1)

The image decoding method of claim 1, wherein, when the intra prediction mode applied to the target block is a planar mode or a DC mode, the modified transform coefficients are two-dimensionally arranged according to the row-first direction.

### Claim 7 (depends on 1)

The image decoding method of claim 1, wherein the inverse RST is performed based on a transform set determined based on a mapping relationship according to the intra prediction mode applied to the target block and a transform kernel matrix selected from among a plurality of transform kernel matrices comprised in each of the transform set, and is performed based on a transform index indicating whether the inverse RST is applied and one of the transform kernel matrices comprised in the transform set.

### Claim 8

An image encoding method performed by an image encoding apparatus, the method comprising:
deriving prediction samples based on an intra prediction mode applied to a target block;
deriving residual samples for the target block based on the prediction samples;
deriving transform coefficients for the target block based on a primary transform for the residual samples;
deriving modified transform coefficients based on a reduced secondary transform (RST) for the transform coefficients; and
deriving quantized transform coefficients by performing quantization based on the modified transform coefficients,
wherein the RST is a transform that derives a smaller number of transform coefficients than transform coefficients for a predetermined top-left area of the target block based on the transform coefficients for the top-left area,
wherein the deriving of the modified transform coefficients one-dimensionally comprises arranging the transform coefficients according to one of a row-first direction or a column-first direction according to the intra prediction mode applied to the target block and applying the RST to the transform coefficients.

### Claim 9 (depends on 8)

The image encoding method of claim 8, wherein, when the intra prediction mode is a horizontal mode in a left direction with respect to a top-left diagonal direction, the transform coefficients are one-dimensionally arranged according to the row-first direction.

### Claim 10 (depends on 9)

The image encoding method of claim 9, wherein, when an intra prediction mode applicable to the target block is one of 65 directional modes, an intra prediction mode in the top-left diagonal direction is mode 34, and the intra prediction mode applied to the target block comprises mode 2 to mode 34, the transform coefficients are one-dimensionally arranged according to the row-first direction.

### Claim 11 (depends on 8)

The image encoding method of claim 8, wherein, when the intra prediction mode is a vertical mode in a right direction with respect to a top-left diagonal direction, the transform coefficients are one-dimensionally arranged according to the column-first direction.

### Claim 12 (depends on 11)

The image encoding method of claim 11, wherein, when an intra prediction mode applicable to the target block is one of 65 directional modes, an intra prediction mode in the top-left diagonal direction is mode 34, and the intra prediction mode applied to the target block comprises mode 35 to mode 66, the transform coefficients are one-dimensionally arranged according to the column-first direction.

### Claim 13 (depends on 8)

The image encoding method of claim 8, wherein, when the intra prediction mode applied to the target block is a planar mode or a DC mode, the 8 transform coefficients are one-dimensionally arranged according to the row-first direction.

### Claim 14

A non-transitory computer readable storage medium storing encoded information causing a decoding apparatus to perform an image decoding method, the method comprising:
deriving transform coefficients through dequantization based on quantized transform coefficients for a target block;
deriving modified transform coefficients based on an inverse reduced secondary transform (RST) using a preset transform kernel matrix for the transform coefficients;
deriving residual samples for the target block based on an inverse primary transform for the modified transform coefficients; and
generating a reconstructed picture based on the residual samples for the target block,
wherein the inverse RST is an inverse transform of a transform that derives a smaller number of transform coefficients than transform coefficients for a predetermined top-left area of the target block based on the transform coefficients for the top-left area,
wherein the modified transform coefficients in a two-dimensional array are derived, by applying the inverse RST, from the transform coefficients in a one-dimensional (1D) array according to one of a row-first direction or a column-first direction according to an intra prediction mode applied to the target block.
