# US 2020/0288121 A1 · Method and apparatus for video coding

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

- Number: US 2020/0288121 A1
- Document ID: US20200288121A1
- Status: Published application
- Kind: A1
- Application number: 16/812,000
- Filed: 2020-03-06
- Published: 2020-09-10
- Earliest claimed: 2019-03-09
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Xin ZHAO; Xiang LI; Shan LIU
- Web page: https://patentgrep.com/patent/US20200288121A1

## CPC

- H04N 19/105: Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
- 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/119: Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
- 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/136: Incoming video signal characteristics or properties
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Aspects of the disclosure provide methods and apparatuses for video encoding/decoding. In some examples, an apparatus for video decoding includes processing circuitry. The processing circuitry can decode coding information of a coefficient block from a coded video bitstream. The coding information can indicate a size of the coefficient block. The processing circuitry can determine, based on the size of the coefficient block, an order in which inverse horizontal and inverse vertical transforms of an inverse primary transform are to be performed on transform coefficients of the coefficient block to obtain residual data of a residual block. When the size of the coefficient block satisfies a condition, the inverse vertical transform is performed after the inverse horizontal transform is performed on the transform coefficients of the coefficient block. The processing circuitry can reconstruct a sample in the residual block based on the residual data.

## Claims

### Claim 1

A method for video decoding in a decoder, comprising:
decoding coding information of a coefficient block from a coded video bitstream, the coding information indicating a size of the coefficient block;
determining, based on the size of the coefficient block, an order in which inverse horizontal and inverse vertical transforms of an inverse primary transform are to be performed on transform coefficients of the coefficient block to obtain residual data of a residual block, wherein
when the size of the coefficient block satisfies a condition, the inverse vertical transform is performed after the inverse horizontal transform is performed on the transform coefficients of the coefficient block; and
reconstructing a sample in the residual block based on the residual data.

### Claim 2 (depends on 1)

The method of claim 1, wherein the condition is that the size of the coefficient block is 32×64.

### Claim 3 (depends on 1)

The method of claim 1, wherein the condition is that a height N of the coefficient block of M×N is larger than a width M of the coefficient block.

### Claim 4 (depends on 1)

The method of claim 1, wherein
the size of the coefficient block is M×N, M and N being positive integers;
first residual data in a m×n region in the residual block are to be calculated by the inverse primary transform and second residual data outside the m×n region in the residual block are not to be calculated by the inverse primary transform, m being less than or equal to M, and n being less than or equal to N; and
the condition is that a ratio m/M is larger than or equal to a ratio n/N.

### Claim 5

A method for video decoding in a decoder, comprising:
decoding coding information of a coefficient block from a coded video bitstream, the coding information indicating a size of the coefficient block;
determining, based on the size of the coefficient block, whether to reduce a number of calculations in one of inverse horizontal and inverse vertical transforms of an inverse primary transform, the inverse vertical transform transforming transform coefficients of the coefficient block to intermediate data of an intermediate block, and the inverse horizontal transform transforming the intermediate data to residual data in a residual block;
performing the inverse primary transform, wherein:
when the number of calculations in the inverse vertical transform is determined to be reduced, top 16 rows of the intermediate data in the intermediate block are calculated by the inverse vertical transform and the remaining intermediate data in the intermediate block are zero; and
when the number of calculations in the inverse horizontal transform is determined to be reduced, left 16 columns of the residual data in the residual block are calculated by the inverse horizontal transform and the remaining residual data in the residual block are zero; and
reconstructing a sample in the residual block based on the residual data.

### Claim 6 (depends on 5)

The method of claim 5, wherein
the size of the coefficient block is 32×64;
the one of the inverse horizontal and inverse vertical transforms is the inverse vertical transform;
the determining includes determining that the number of calculations in the inverse vertical transform is to be reduced when the size of the coefficient block is 32×64; and
the performing the inverse primary transform includes performing the inverse primary transform, the top 16 rows of the intermediate data in the intermediate block being calculated by the inverse vertical transform and the remaining intermediate data in the intermediate block being zero.

### Claim 7 (depends on 5)

The method of claim 5, wherein
the size of the coefficient block is 32×64;
the one of the inverse horizontal and inverse vertical transforms is the inverse horizontal transform;
the determining includes determining that the number of calculations in the inverse horizontal transform is to be reduced when the size of the coefficient block is 32×64; and
the performing the inverse primary transform includes performing the inverse primary transform, the left 16 columns of the residual data in the residual block being calculated by the inverse horizontal transform and the remaining residual data in the residual block being zero.

### Claim 8 (depends on 5)

The method of claim 5, wherein:
the size of the coefficient block is 32×32;
the one of the inverse horizontal and inverse vertical transforms is the inverse horizontal transform;
the determining includes determining that the number of calculations in the inverse horizontal transform is to be reduced when the size of the coefficient block is 32×32; and
the performing the inverse primary transform includes performing the inverse primary transform, the left 16 columns of the residual data in the residual block being calculated by the inverse horizontal transform, the remaining residual data in the residual block being zero, and the intermediate data in the intermediate block being calculated by the inverse vertical transform.

### Claim 9 (depends on 5)

The method of claim 5, wherein
the size of the coefficient block is 32×32;
the one of the inverse horizontal and inverse vertical transforms is the inverse vertical transform;
the determining includes determining that the number of calculations in the inverse vertical transform is to be reduced when the size of the coefficient block is 32×32; and
the performing the inverse primary transform includes performing the inverse primary transform, the top 16 rows of the intermediate data in the intermediate block being calculated by the inverse vertical transform, the remaining intermediate data in the intermediate block being zero, and the residual data in the residual block being calculated by the inverse horizontal transform.

### Claim 10

An apparatus for video decoding, comprising processing circuitry configured to:
decode coding information of a coefficient block from a coded video bitstream, the coding information indicating a size of the coefficient block;
determine, based on the size of the coefficient block, an order in which inverse horizontal and inverse vertical transforms of an inverse primary transform are to be performed on transform coefficients of the coefficient block to obtain residual data of a residual block, wherein
when the size of the coefficient block satisfies a condition, perform the inverse vertical transform after the inverse horizontal transform is performed on the transform coefficients of the coefficient block; and
reconstruct a sample in the residual block based on the residual data.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the condition is that the size of the coefficient block is 32×64.

### Claim 12 (depends on 10)

The apparatus of claim 10, wherein the condition is that a height N of the coefficient block of M×N is larger than a width M of the coefficient block.

### Claim 13 (depends on 10)

The apparatus of claim 10, wherein
the size of the coefficient block is M×N, M and N being positive integers;
first residual data in a m×n region in the residual block are to be calculated by the inverse primary transform and second residual data outside the m×n region in the residual block are not to be calculated by the inverse primary transform, m being less than or equal to M, and n being less than or equal to N; and
the condition is that a ratio m/M is larger than or equal to a ratio n/N.

### Claim 14

An apparatus for video decoding, comprising processing circuitry configured to:
decode coding information of a coefficient block from a coded video bitstream, the coding information indicating a size of the coefficient block;
determine, based on the size of the coefficient block, whether to reduce a number of calculations in one of inverse horizontal and inverse vertical transforms of an inverse primary transform, the inverse vertical transform transforming transform coefficients of the coefficient block to intermediate data of an intermediate block, and the inverse horizontal transform transforming the intermediate data to residual data in a residual block;
perform the inverse primary transform, wherein:
when the number of calculations in the inverse vertical transform is determined to be reduced, top 16 rows of the intermediate data in the intermediate block are calculated by the inverse vertical transform and the remaining intermediate data in the intermediate block are zero; and
when the number of calculations in the inverse horizontal transform is determined to be reduced, left 16 columns of the residual data in the residual block are calculated by the inverse horizontal transform and the remaining residual data in the residual block are zero; and
reconstruct a sample in the residual block based on the residual data.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein
the size of the coefficient block is 32×64;
the one of the inverse horizontal and inverse vertical transforms is the inverse vertical transform; and
the processing circuitry is further configured to:
determine that the number of calculations in the inverse vertical transform is to be reduced when the size of the coefficient block is 32×64; and
perform the inverse primary transform, wherein
the top 16 rows of the intermediate data in the intermediate block are calculated by the inverse vertical transform and the remaining intermediate data in the intermediate block are zero.

### Claim 16 (depends on 14)

The apparatus of claim 14, wherein
the size of the coefficient block is 32×64;
the one of the inverse horizontal and inverse vertical transforms is the inverse horizontal transform; and
the processing circuitry is further configured to:
determine that the number of calculations in the inverse horizontal transform is to be reduced when the size of the coefficient block is 32×64; and
perform the inverse primary transform, wherein
the left 16 columns of the residual data in the residual block are calculated by the inverse horizontal transform and the remaining residual data in the residual block are zero.

### Claim 17 (depends on 14)

The apparatus of claim 14, wherein:
the size of the coefficient block is 32×32;
the one of the inverse horizontal and inverse vertical transforms is the inverse horizontal transform; and
the processing circuitry is further configured to:
determine that the number of calculations in the inverse horizontal transform is to be reduced when the size of the coefficient block is 32×32; and
perform the inverse primary transform, wherein
the left 16 columns of the residual data in the residual block are calculated by the inverse horizontal transform, the remaining residual data in the residual block are zero, and the intermediate data in the intermediate block are calculated by the inverse vertical transform.

### Claim 18 (depends on 14)

The apparatus of claim 14, wherein
the size of the coefficient block is 32×32;
the one of the inverse horizontal and inverse vertical transforms is the inverse vertical transform; and
the processing circuitry is further configured to:
determine that the number of calculations in the inverse vertical transform is to be reduced when the size of the coefficient block is 32×32; and
perform the inverse primary transform, wherein
the top 16 rows of the intermediate data in the intermediate block are calculated by the inverse vertical transform, the remaining intermediate data in the intermediate block are zero, and the residual data in the residual block are calculated by the inverse horizontal transform.
