# US 2021/0243462 A1 · Encoding Method and Apparatus

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

- Number: US 2021/0243462 A1
- Document ID: US20210243462A1
- Status: Published application
- Kind: A1
- Application number: 17/227,821
- Filed: 2021-04-12
- Published: 2021-08-05
- Earliest claimed: 2017-10-16
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yin Zhao; Haitao Yang; Jianle Chen
- Web page: https://patentgrep.com/patent/US20210243462A1

## CPC

- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 19/119: Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
- 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/122: Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
- H04N 19/124: Quantisation
- H04N 19/136: Incoming video signal characteristics or properties
- 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/176: the region being a block, e.g. a macroblock
- H04N 19/184: the unit being bits, e.g. of the compressed video stream
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/51: Motion estimation or motion compensation
- H04N 19/61: in combination with predictive coding
- H04N 19/625: using discrete cosine transform [DCT]
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A video decoding method, including: parsing a received bitstream to obtain prediction information of a coding unit (CU); obtaining a target transform mode of a residual transform unit (TU); parsing the received bitstream to obtain transform coefficients of the residual TU; applying an inverse quantization to the transform coefficients of the residual TU to obtain dequantized coefficients; applying, based on the target transform mode, an inverse transform to the dequantized coefficients to obtain a residual block of the residual TU; obtaining a prediction block of the CU based on the prediction information; obtaining a video block based on the residual block and the prediction block; and outputting a video sequence including a video frame that includes the video block.

## Claims

### Claim 1

A video processing method, comprising:
obtaining prediction information of a coding unit (CU);
obtaining, when the CU comprises only one residual transform unit (TU) and a size of the residual TU is less than a size of the CU, a TU partitioning mode of the CU and a residual position of the residual TU;
selecting, based on the TU partitioning mode and the residual position, a transform type of the residual TU from a transform type set;
applying, based on the transform type of the residual TU, an inverse transform to dequantized coefficients of the residual TU to obtain a residual block of the residual TU;
obtaining a prediction block of the CU based on the prediction information; and
obtaining a video block based on the residual block and the prediction block.

### Claim 2 (depends on 1)

The video processing method according to claim 1, wherein the transform type set includes two or more transform types.

### Claim 3 (depends on 2)

The video processing method according to claim 2, wherein the two or more transform types comprise:
transform type 1, wherein a horizontal transform is based on discrete sine transform (DST) type VII (DST-7) and a vertical transform is based on DST-7, denoted as DST-7/DST-7;
transform type 2, wherein a horizontal transform is based on DST-7 and a vertical transform is based on discrete cosine transform (DCT) type VIII (DCT-8), denoted as DST-7/DCT-8;
transform type 3, wherein a horizontal transform is based on DCT-8 and a vertical transform is based on DST-7, denoted as DCT-8/DST-7; and
transform type 4, wherein a horizontal transform is based on DCT-8 and a vertical transform is based on DCT-8, denoted as DCT-8/DCT-8.

### Claim 4 (depends on 1)

The video processing method according to claim 1, wherein:
the TU partitioning mode specifies that the CU is partitioned into 2 TUs arranged horizontally, wherein a size of a left TU is smaller than, greater than, or equal to a size of a right TU; or
the TU partitioning mode specifies that the CU is partitioned into 2 TUs arranged vertically, wherein a size of a top TU is smaller than, greater than, or equal to a size of a bottom TU.

### Claim 5 (depends on 4)

The video processing method according to claim 4, wherein:
the residual position is left or right when the CU is partitioned into 2 TUs arranged horizontally; or
the residual position is top or bottom when the CU is partitioned into 2 TUs arranged vertically.

### Claim 6 (depends on 5)

The video processing method according to claim 5, wherein the size of the CU is denoted by W×H, and wherein:
the transform type is DST-7/DCT-8 when the CU is partitioned into 2 TUs arranged vertically and the residual position is top;
the transform type is DST-7/DST-7 when the CU is partitioned into 2 TUs arranged vertically and the residual position is bottom;
the transform type is DCT-8/DST-7 when the CU is partitioned into 2 TUs arranged horizontally and the residual position is left; and
the transform type is DST-7/DST-7 when the CU is partitioned into 2 TUs arranged 7 horizontally and the residual position is right.

### Claim 7 (depends on 1)

The video processing method of claim 1, wherein the residual TU comprises a residual tor Cb, Cr, and Y components.

### Claim 8

A video data decoding device, comprising:
a non-transitory memory storage configured to store video data in a form of a bitstream; and
one or more processor coupled to the non-transitory memory storage and configured to:
obtain prediction information of a coding unit (CU);
obtain, when the CU comprises only one residual transform unit (TU) and a size of the residual TU is less than a size of the CU, a TU partitioning mode of the CU and a residual position of the residual TU;
select, based on the TU partitioning mode and the residual position, a transform type of the residual TU from a transform type set;
apply, based on the transform type of the residual TU, an inverse transform to dequantized coefficients of the residual TU to obtain a residual block of the residual TU;
obtain a prediction block of the CU based on the prediction information; and
obtain a video block based on the residual block and the prediction block.

### Claim 9 (depends on 8)

The video data decoding device according to claim 8, wherein the transform type set includes two or more transform types.

### Claim 10 (depends on 9)

The video data decoding device according to claim 9, wherein the two or more transform types comprise:
transform type 1, wherein a horizontal transform is based on discrete sine transform (DST) type VII (DST-7) and a vertical transform is based on DST-7, denoted as DST-7/DST-7;
transform type 2, wherein a horizontal transform is based on DST-7 and a vertical transform is based on discrete cosine transform (DCT) type VIII (DCT-8), denoted as DST-7/DCT-8;
transform type 3, wherein a horizontal transform is based on DCT-8 and a vertical transform is based on DST-7, denoted as DCT-8/DST-7; and
transform type 4, wherein a horizontal transform is based on DCT-8 and a vertical transform is based on DCT-8, denoted as DCT-8/DCT-8.

### Claim 11 (depends on 8)

The video data decoding device according to claim 8, wherein:
the TU partitioning mode specifies that the CU is partitioned into 2 TUs arranged horizontally, wherein a size of a left TU is smaller than, greater than, or equal to a size of a right TU; or
the TU partitioning mode specifies that the CU is partitioned into 2 TUs arranged vertically, wherein a size of a top TU is smaller than, greater than, or equal to a size of a bottom TU.

### Claim 12 (depends on 11)

The video data decoding device according to claim 11, wherein:
the residual position is left or right when the CU is partitioned into 2 TUs arranged horizontally; or
the residual position is top or bottom when the CU is partitioned into 2 TUs arranged vertically.

### Claim 13 (depends on 12)

The video data decoding device according to claim 12, wherein the size of the CU is denoted by W×H, and wherein:
the transform type is DST-7/DCT-8 when the CU is partitioned into 2 TUs arranged vertically and the residual position is top;
the transform type is DST-7/DST-7 when the CU is partitioned into 2 TUs arranged vertically and the residual position is bottom;
the transform type is DCT-8/DST-7 when the CU is partitioned into 2 TUs arranged horizontally and the residual position is left; and
the transform type is DST-7/DST-7 when the CU is partitioned into 2 TUs arranged horizontally and the residual position is right.

### Claim 14 (depends on 8)

The video data decoding device according to claim 8, wherein the residual TU comprises a residual for Cb, Cr, and Y components.

### Claim 15

A non-transitory computer readable storage medium storing computer program code, which when executed by a processor of a video data decoding device, causes the video data decoding device to:
obtain prediction information of a coding unit (CU);
obtain, when the CU comprises only one residual transform unit (TU) and a size of the residual TU is less than a size of the CU, a TU partitioning mode of the CU and a residual position of the residual TU;
select, based on the TU partitioning mode and the residual position, a transform type of the residual TU from a transform type set;
apply, based on the transform type of the residual TU, an inverse transform to dequantized coefficients of the residual TU to obtain a residual block of the residual TU;
obtain a prediction block of the CU based on the prediction information; and
obtain a video block based on the residual block and the prediction block.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium according to claim 15, wherein the transform type set includes two or more transform types.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium according to claim 16, wherein the two or more transform types comprise:
transform type 1, wherein a horizontal transform is based on discrete sine transform (DST) type VII (DST-7) and a vertical transform is based on DST-7, denoted as DST-7/DST-7;
transform type 2, wherein a horizontal transform is based on DST-7 and a vertical transform is based on discrete cosine transform (DST) type VIII (DCT-8), denoted as DST-7/DCT-8;
transform type 3, wherein a horizontal transform is based on DCT-8 and a vertical transform is based on DST-7, denoted as DCT-8/DST-7; and
transform type 4, wherein a horizontal transform is based on DCT-8 and a vertical transform is based on DCT-8, denoted as DCT-8/DCT-8.

### Claim 18 (depends on 15)

The non-transitory computer readable storage medium according to claim 15, wherein:
the TU partitioning mode specifies that the CU is partitioned into 2 TUs arranged horizontally, wherein a size of a left TU is smaller than, greater than, or equal to a size of a right TU; or
the TU partitioning mode specifies that the CU is partitioned into 2 TUs arranged vertically, wherein a size of a top TU is smaller than, greater than, or equal to a size of a bottom TU.

### Claim 19 (depends on 18)

The non-transitory computer readable storage medium according to claim 18, wherein:
the residual position is left or right when the CU is partitioned into 2 TUs arranged horizontally; or
the residual position is top or bottom when the CU is partitioned into 2 TUs arranged vertically.

### Claim 20 (depends on 19)

The non-transitory computer readable storage medium according to claim 19, wherein the size of the CU is denoted by W×H, and wherein:
the transform type is DST-7/DCT-8 when the CU is partitioned into 2 TUs arranged vertically and the residual position is top;
the transform type is DST-7/DST-7 when the CU is partitioned into 2 TUs arranged vertically and the residual position is bottom;
the transform type is DCT-8/DST-7 when the CU is partitioned into 2 TUs arranged horizontally and the residual position is left; and
the transform type is DST-7/DST-7 when the CU is partitioned into 2 TUs arranged horizontally and the residual position is right.
