# US 2020/0404311 A1 · Method and apparatus for residual sign prediction in transform domain

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

- Number: US 2020/0404311 A1
- Document ID: US20200404311A1
- Status: Published application
- Kind: A1
- Application number: 17/013,272
- Filed: 2020-09-04
- Published: 2020-12-24
- Earliest claimed: 2018-03-07
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Alexey Konstantinovich FILIPPOV; Alexander Alexandrovich KARABUTOV; Vasily Alexeevich RUFITSKIY
- Web page: https://patentgrep.com/patent/US20200404311A1

## CPC

- H04N 19/48: using compressed domain processing techniques other than decoding, e.g. modification of transform coefficients, variable length coding [VLC] data or run-length data (motion estimation in a transform domain H04N19/547; processing of decoded motion vectors H04N19/513)
- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/174: the region being a slice, e.g. a line of blocks or a group of blocks
- 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/463: by compressing encoding parameters before transmission
- H04N 19/593: involving spatial prediction techniques
- H04N 19/61: in combination with predictive coding
- H04N 19/91: Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
- H04N 19/645: by grouping of coefficients into blocks after the transform
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The present disclosure provides embodiments for coding and decoding signs of transformation coefficients which is applicable, for instance, in image and/or video coding and decoding. In particular, a plurality of the signs are predicted and only a prediction error signal is embedded in the bitstream. The prediction error signal may have a distribution which can be efficiently coded with CABAC or another variable length (entropy) coding. In order to perform the prediction of the signs efficiently, the signs of a plurality of coefficients of a transformed image block are predicted based on a cost function including transformed difference between adjacent pixels neighboring the transformed image block and prediction of the adjacent pixels calculated based on a prediction signal of the image block.

## Claims

### Claim 1

An apparatus for decoding an image block comprising processing circuitry, wherein the processing circuitry is configured for:
predicting signs of a plurality of coefficients of a transformed image block based on a cost function, wherein the cost function includes a transformed difference between adjacent pixels neighboring the transformed image block and a prediction of the adjacent pixels calculated based on a prediction signal of the image block; and
reconstructing the signs of the plurality of coefficients according to the predicted signs.

### Claim 2 (depends on 1)

The apparatus for decoding the image block according to claim 1, wherein the processing circuitry is further configured for:
parsing, from a coded stream, a sign prediction error; and
before the reconstructing the signs of the plurality of coefficients, adding the sign prediction error to the predicted signs.

### Claim 3 (depends on 1)

The apparatus for decoding the image block according to claim 1, wherein the transformed difference between the adjacent pixels neighboring the transformed image block comprises a sum of squared transformed differences between the adjacent pixels neighboring the transformed image block.

### Claim 4 (depends on 3)

The apparatus for decoding the image block according to claim 3, wherein the predicting the signs of the plurality of coefficients of the transformed image block comprises:
calculating the transformed difference between the adjacent pixels neighboring the transformed image block;
calculating the prediction of the adjacent pixels calculated based on the prediction signal of the image block;
calculating the cost function, wherein the transformed image block is reconstructed according to each hypothesis of signs out of a set of hypotheses; and
selecting as the predicted signs the hypothesis of the signs that minimizes a cost given by the cost function.

### Claim 5 (depends on 4)

The apparatus for decoding the image block according to claim 4, wherein the transformed image block is reconstructed by adding the hypothesis of the signs to coefficients parsed from a coded stream.

### Claim 6 (depends on 1)

The apparatus for decoding the image block according to claim 1, wherein the cost function (F) is given by:
F
=
∑
n
=
0
N
-
1

(
t
n
-
q
n
)
2
+
∑
m
=
0
M
-
1

(
v
m
-
o
m
)
2
.
with tn=Trans1D(Tn), qn=Trans1D(Qn), vn=Trans1D(Vn), and on=Trans1D(On), wherein Trans1D(.) is a one-dimensional orthogonal transform and Tn=[2Xn,−1−Xn,−2−Pn,0], Vm=[2Z−1,m−Z−2,m−P0,m], Qn=Rn,0 and Om=R0,m, wherein P is prediction signal, and X and Y are neighboring pixels, and N and M being height and width of the block in which the signs are predicted, respectively.

### Claim 7 (depends on 1)

The apparatus for decoding the image block according to claim 1, wherein the adjacent pixels are located at a horizontal and a vertical boundary of the image block.

### Claim 8 (depends on 2)

The apparatus for decoding the image block according to claim 2, wherein the processing circuitry is further configured for:
decoding the sign prediction error using Context-Adaptive Binary Arithmetic Coding (CABAC).

### Claim 9

An apparatus for encoding an image block comprising processing circuitry, wherein the processing circuitry is configured for:
predicting signs of a plurality of coefficients of a transformed image block based on a cost function, wherein the cost function comprises a transformed difference between adjacent pixels neighboring the transformed image block and a prediction of the adjacent pixels calculated based on a prediction signal of the image block; and
encoding the signs of the plurality of coefficients according to the predicted signs.

### Claim 10 (depends on 9)

The apparatus for encoding the image block according to claim 9, wherein the processing circuitry is specifically configured for encoding the signs of the plurality of coefficients by:
determining a sign prediction error as a difference between the signs of the plurality of coefficients and the predicted signs of the plurality of coefficients; and
inserting the sign prediction error into a coded stream including the coded image block.

### Claim 11 (depends on 9)

The apparatus for encoding the image block according to claim 9, wherein the transformed difference between the adjacent pixels neighboring the transformed image block is a sum of squared transformed differences between the adjacent pixels neighboring the transformed image block.

### Claim 12 (depends on 11)

The apparatus for decoding the image block according to claim 11, wherein the predicting the signs of the plurality of coefficients of the transformed image block comprises:
calculating the transformed difference between the adjacent pixels neighboring the transformed image block;
calculating the prediction of the adjacent pixels calculated based on the prediction signal of the image block;
calculating the cost function, wherein the transformed image block is reconstructed according to each hypothesis of signs out of a set of hypotheses; and
select as the predicted signs that hypothesis of the signs which minimize the cost given by the cost function.

### Claim 13 (depends on 9)

The apparatus for encoding the image block according to claim 9, wherein the cost function (F) is given by:
F
=
∑
n
=
0
N
-
1

(
t
n
-
q
n
)
2
+
∑
m
=
0
M
-
1

(
v
m
-
o
m
)
2
.
with tn=Trans1D(Tn), qn=Trans1D(Qn), vn=Trans1D(Vn), and on=Trans1D(On), wherein Trans1D(.) is a one-dimensional orthogonal transform and Tn=[2Xn,−1−Xn,−2−Pn,0], Vm=[2Z−1,m−Z−2,m−P0,m], Qn=Rn,0 and Om=R0,m, wherein P is prediction signal, and X and Y are neighboring pixels, and N and M being height and width of the block in which the signs are predicted, respectively.

### Claim 14 (depends on 9)

The apparatus for encoding the image block according to claim 9, wherein the adjacent pixels are located at a horizontal and a vertical boundary of the image block.

### Claim 15 (depends on 10)

The apparatus for encoding the image block according to claim 10, wherein the processing circuitry is further configured for encoding the sign prediction error using Context-Adaptive Binary Arithmetic Coding (CABAC).

### Claim 16

A method for decoding an image block, the method comprising:
predicting signs of a plurality of coefficients of a transformed image block based on a cost function, wherein the cost function comprises a transformed difference between adjacent pixels neighboring the transformed image block and a prediction of the adjacent pixels calculated based on a prediction signal of the image block; and
reconstructing the signs of the plurality of coefficients according to the predicted signs.

### Claim 17 (depends on 16)

A non-transitory computer readable medium storing a program including instructions that, when executed on a processor, configure the processor to perform the method of claim 16.

### Claim 18

A method for encoding an image, the method comprising:
predicting signs of a plurality of coefficients of a transformed image block based on a cost function, wherein the cost function comprises a transformed difference between adjacent pixels neighboring the transformed image block and a prediction of the adjacent pixels calculated based on a prediction signal of the image block; and
encoding the signs of the plurality of coefficients according to the predicted signs.

### Claim 19 (depends on 18)

A non-transitory computer readable medium storing a program including instructions that, when executed on a processor, configure the processor to perform the method claim 18.
