# US 2025/0168378 A1 · Methods and apparatus of residual and coefficient coding

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

- Number: US 2025/0168378 A1
- Document ID: US20250168378A1
- Status: Published application
- Kind: A1
- Application number: 19/029,594
- Filed: 2025-01-17
- Published: 2025-05-22
- Earliest claimed: 2019-09-24
- Assignees: Beijing Dajia Internet Information Technology Co., Ltd.
- Applicants: Beijing Dajia Internet Information Technology Co., Ltd.
- Inventors: Yi-Wen Chen; Xiaoyu Xiu; Tsung-Chuan Ma; Hong-Jheng Jhu; Xianglin Wang; Bing Yu
- Web page: https://patentgrep.com/patent/US20250168378A1

## CPC

- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- 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/176: the region being a block, e.g. a macroblock
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N 19/91: Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An electronic apparatus performs a method of decoding video data. The method comprises: receiving, from bitstream, video data corresponding to a transform-skip mode coded block; decoding, from the video data, a first codeword, a second codeword and a first group of codewords for a pixel within the transform-skip mode coded block; deriving an initial level value from the first group of codewords; converting the first codeword into a remainder of the pixel in accordance with a predefined mapping relationship that is generated using a constant Rice parameter; converting the second codeword into a sign value of the remainder; and deriving a quantified residual of the pixel from the remainder, the sign value and the initial level value.

## Claims

### Claim 1

A method of encoding video data, comprising:
determining a quantized residual of a pixel;
determining a remainder of the pixel, a sign for the remainder, and an initial level value based on the quantized residual;
converting the remainder of the pixel into a first codeword for a pixel within a transform-skip mode coded block in accordance with a predefined mapping relationship that is generated using a Rice parameter, the Rice parameter is set to 1 according to the transform-skip mode;
determining a second codeword for a pixel within the transform-skip mode coded block in accordance with the sign for the remainder;
determining a first group of codewords for a pixel within the transform-skip mode coded block in accordance with the initial level value;
encoding the first codeword, the second codeword and the first group of codewords into video data corresponding to the transform-skip mode coded block; and
inserting the video data corresponding to the transform-skip mode coded block into a bitstream.

### Claim 2 (depends on 1)

The method of claim 1, wherein the predefined mapping relationship is generated by performing operations comprising:
calculating a constant binarization parameter using the Rice parameter; and
determining a prefix value of a codeword and an optional suffix value of the corresponding codeword for one candidate remainder value using the constant binarization parameter.

### Claim 3 (depends on 2)

The method of claim 2, wherein the prefix value of the codeword is determined using a truncated Rice binarization process.

### Claim 4 (depends on 1)

The method of claim 1, wherein the initial level value is used for deriving the quantized residual of the pixel in accordance with a position of the pixel within the transform-skip mode coded block.

### Claim 5 (depends on 1)

The method of claim 1, wherein the first codeword corresponds to a syntax element abs_remainder, the second codeword corresponds to a syntax element sign_coefficient_flag.

### Claim 6

An electronic apparatus comprising:
one or more processing units;
memory coupled to the one or more processing units; and
a plurality of programs stored in the memory that, when executed by the one or more processing units, cause the electronic apparatus to perform a method of encoding video data comprising:
determining a quantized residual of a pixel;
determining a remainder of the pixel, a sign for the remainder and an initial level value based on the quantized residual;
converting the remainder of the pixel into a first codeword for a pixel within a transform-skip mode coded block in accordance with a predefined mapping relationship that is generated using a Rice parameter, the Rice parameter is set to 1 according to the transform-skip mode;
determining a second codeword for a pixel within the transform-skip mode coded block in accordance with the sign for the remainder;
determining a first group of codewords for a pixel within the transform-skip mode coded block in accordance with the initial level value;
encoding the first codeword, the second codeword and first group of codewords into video data corresponding to the transform-skip mode coded block; and
inserting the video data corresponding to the transform-skip mode coded block into a bitstream.

### Claim 7 (depends on 6)

The electronic apparatus of claim 6, wherein the predefined mapping relationship is generated by:
calculating a constant binarization parameter using the Rice parameter; and
determining a prefix value of a codeword and an optional suffix value of the corresponding codeword for one candidate remainder value using the constant binarization parameter.

### Claim 8 (depends on 7)

The electronic apparatus of claim 7, wherein the prefix value of the codeword is determined using a truncated Rice binarization process.

### Claim 9 (depends on 6)

The electronic apparatus of claim 6, wherein the initial level value is used for deriving the quantized residual of the pixel in accordance with a position of the pixel within the transform-skip mode coded block.

### Claim 10 (depends on 6)

The electronic apparatus of claim 6, wherein the first codeword corresponds to a syntax element abs_remainder, the second codeword corresponds to a syntax element sign_coefficient_flag.

### Claim 11 (depends on 1)

A method of storing a bitstream, comprising generating a bitstream by performing the method of encoding video data according to claim 1; and
storing the bitstream on a non-transitory computer readable storage medium.

### Claim 12 (depends on 1)

A non-transitory computer readable storage medium storing a bitstream generated by performing the method of encoding video data according to claim 1.

### Claim 13

A method of decoding video data, comprising:
receiving, from bitstream, video data corresponding to a transform-skip mode coded block, wherein the bitstream includes video data corresponding to a plurality of coding units;
determining, from the video data, a first codeword, a second codeword and a first group of codewords for a pixel within the transform-skip mode coded block;
deriving an initial level value from the first group of codewords;
converting the first codeword into a remainder of the pixel in accordance with a predefined mapping relationship that is generated using a constant Rice parameter for the transform-skip mode coded block, wherein the constant Rice parameter is fixed to a value of 1 according to the transform-skip mode coded block;
determining a sign for the remainder according to the second codeword;
deriving a quantized residual of the pixel from the remainder, the sign and the initial level value; and
obtaining a reconstructed sample of the pixel based on the quantized residual.

### Claim 14 (depends on 13)

The method of claim 13, wherein the predefined mapping relationship is generated by performing operations comprising:
calculating a constant binarization parameter using the constant Rice parameter; and
determining a prefix value of a codeword and an optional suffix value of the corresponding codeword for one candidate remainder value using the constant binarization parameter.

### Claim 15 (depends on 14)

The method of claim 14, wherein the prefix value of the codeword is determined using a truncated Rice binarization process.

### Claim 16 (depends on 13)

The method of claim 13, wherein the initial level value is configured for deriving the quantized residual of the pixel in accordance with a position of the pixel within the transform-skip mode coded block.

### Claim 17 (depends on 13)

The method of claim 13, wherein the first codeword corresponds to a syntax element abs_remainder, the second codeword corresponds to a syntax element sign_coefficient_flag.

### Claim 18 (depends on 13)

An electronic apparatus comprising:
one or more processing units;
memory coupled to the one or more processing units; and
a plurality of programs stored in the memory that, when executed by the one or more processing units, cause the electronic apparatus to perform the method of decoding video data according to claim 13.

### Claim 19 (depends on 18)

The electronic apparatus of claim 18, wherein the predefined mapping relationship is generated by performing operations comprising:
calculating a constant binarization parameter using the constant Rice parameter; and
determining a prefix value of a codeword and an optional suffix value of the corresponding codeword for one candidate remainder value using the constant binarization parameter.

### Claim 20 (depends on 19)

The electronic apparatus of claim 19, wherein the prefix value of the codeword is determined using a truncated Rice binarization process.
