# US 2022/0295064 A1 · Quantizer for lossless & near-lossless compression

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

- Number: US 2022/0295064 A1
- Document ID: US20220295064A1
- Status: Published application
- Kind: A1
- Application number: 17/828,728
- Filed: 2022-05-31
- Published: 2022-09-15
- Earliest claimed: 2020-07-20
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Madhu Peringassery KRISHNAN; Xin ZHAO; Shan LIU
- Web page: https://patentgrep.com/patent/US20220295064A1

## CPC

- H04N 19/124: Quantisation
- 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/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/85: using pre-processing or post-processing specially adapted for video compression
- H04N 19/51: Motion estimation or motion compensation
- H04N 19/61: in combination with predictive coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A system includes code including first obtaining code to obtain a first syntax element that indicates a first quantization index value for an AC coefficient of an image; second obtaining code to obtain at least one second syntax element that indicates an offset value; third obtaining code to obtain a second quantization index value for another coefficient of the image; fourth obtaining code to obtain a quantization step size that corresponds to the second quantization index value that is obtained; and determining code to determine whether a mode in which the image is to be coded is a lossy mode or a lossless mode based on determining whether the first quantization index value is equal to a quantization index value associated with lossless coding, and based on determining whether the offset value is less than or equal to the quantization index value associated with the lossless coding.

## Claims

### Claim 1

A system comprising:
at least one memory configured to store computer program code; and
at least one processor configured to access the computer program code and operate as instructed by the computer program code, the computer program code comprising:
first obtaining code configured to cause the at least one processor to obtain a first syntax element that indicates a first quantization index value for an AC coefficient of an image;
second obtaining code configured to cause the at least one processor to obtain at least one second syntax element that indicates an offset value;
third obtaining code configured to cause the at least one processor to obtain a second quantization index value for another coefficient of the image;
fourth obtaining code configured to cause the at least one processor to obtain a quantization step size that corresponds to the second quantization index value that is obtained;
determining code configured to cause the at least one processor to determine whether a mode in which the image is to be coded is a lossy mode or a lossless mode based on determining whether the first quantization index value is equal to a quantization index value associated with lossless coding, and based on determining whether the offset value is less than or equal to the quantization index value associated with the lossless coding; and
coding code configured to cause the at least one processor to code the image in the lossy mode or the lossless mode based on the determining of the determining code, and by using the quantization step size that is obtained.

### Claim 2 (depends on 1)

The system of claim 1, wherein
the third obtaining code is configured to cause the at least one processor to obtain the second quantization index value for the another coefficient of the image by combining the first quantization index value of the first syntax element and the offset value of the at least one second syntax element to obtain a combined value, and modifying, in a case where the combined value is less than a predetermined minimum value, the combined value to be the predetermined minimum value as the second quantization index value.

### Claim 3 (depends on 1)

The system of claim 1, wherein
the quantization index value associated with the lossless coding is 0.

### Claim 4 (depends on 1)

The system of claim 1, wherein
the quantization index value associated with the lossless coding is a positive integer value greater than 0.

### Claim 5 (depends on 2)

The system of claim 2, further comprising:
setting code that is configured to cause the at least one processor to set the predetermined minimum value to a value different from the quantization index value associated with the lossless coding, based on determining that the first quantization index value is not equal to the quantization index value associated with the lossless coding, or based on determining that the offset value is greater than the quantization index value associated with the lossless coding.

### Claim 6 (depends on 5)

The system of claim 5, wherein
the quantization index value associated with the lossless coding is 0.

### Claim 7 (depends on 5)

The system of claim 5, wherein
the quantization index value associated with the lossless coding is a value different from 0.

### Claim 8 (depends on 1)

The system of claim 1, wherein
the fourth obtaining code is configured to cause the at least one processor to obtain the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes, and
the computer program code further comprises setting code configured to cause the at least one processor to set, in the at least one lookup table, a quantization step size associated with the quantization index value associated with the lossless coding.

### Claim 9 (depends on 8)

The system of claim 8, wherein
the setting code is configured to cause the at least one processor to perform an operation of multiplying 2x by 4, wherein x is a predetermined value, and to set, in the at least one lookup table, the quantization step size associated with the quantization index value associated with the lossless coding to a result of the operation.

### Claim 10 (depends on 1)

The system of claim 1, wherein
the fourth obtaining code is configured to cause the at least one processor to obtain the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes, and
the computer program code further comprises setting code configured to cause the at least one processor to set, in the at least one lookup table, a quantization step size associated with one of the plurality of quantization index values associated with lossy coding.

### Claim 11 (depends on 10)

The system of claim 10, wherein
the setting code is configured to cause the at least one processor to perform an operation of multiplying 2x by 8, wherein x is a predetermined value, and to set, in the at least one lookup table, the quantization step size associated with one of the plurality of quantization index values associated with the lossy coding to a result of the operation.

### Claim 12

A method performed by at least one computer processor, comprising:
obtaining a first syntax element that indicates a first quantization index value for an AC coefficient of an image;
obtaining at least one second syntax element that indicates an offset value;
obtaining a second quantization index value for another coefficient of the image;
obtaining a quantization step size that corresponds to the second quantization index value that is obtained;
determining whether a mode in which the image is to be decoded is a lossy mode or a lossless mode based on determining whether the first quantization index value is equal to a quantization index value associated with lossless coding, and based on determining whether the offset value is less than or equal to the quantization index value associated with the lossless coding; and
coding the image in the lossy mode or the lossless mode based on the determining, and by using the quantization step size that is obtained.

### Claim 13 (depends on 12)

The method of claim 12, wherein
the obtaining the second quantization index value comprises obtaining the second quantization index value for the another coefficient of the image by combining the first quantization index value of the first syntax element and the offset value of the at least one second syntax element to obtain a combined value, and modifying, based on the combined value being less than a predetermined minimum value, the combined value to be the predetermined minimum value as the second quantization index value.

### Claim 14 (depends on 12)

The method of claim 12, wherein
the quantization index value associated with the lossless coding is a positive integer value greater than 0.

### Claim 15 (depends on 13)

The method of claim 13, further comprises:
setting the predetermined minimum value to a value different from the quantization index value associated with the lossless coding, based on determining that the first quantization index value is not equal to the quantization index value associated with the lossless coding, or based on determining that the offset value is greater than the quantization index value associated with the lossless coding.

### Claim 16 (depends on 13)

The method of claim 13, wherein
the quantization index value associated with the lossless coding is a value different from 0.

### Claim 17 (depends on 12)

The method of claim 12, wherein
the obtaining the quantization step size comprises obtaining the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes, and
the method further comprises setting, in the at least one lookup table, a quantization step size associated with the quantization index value associated with the lossless coding.

### Claim 18 (depends on 12)

The method of claim 12, wherein
the obtaining the quantization step size comprises obtaining the quantization step size that corresponds to the second quantization index value by using at least one lookup table that indicates a correspondence between a plurality of quantization index values and a plurality of quantization step sizes, and
the method further comprises setting, in the at least one lookup table, a quantization step size associated with one of the plurality of quantization index values associated with lossy coding.

### Claim 19 (depends on 18)

The method of claim 18, wherein
the setting comprises performing an operation of multiplying 2x by 8, wherein x is a predetermined value, and setting, in the at least one lookup table, the quantization step size associated with the one of the plurality of quantization index values associated with the lossy coding to a result of the operation.

### Claim 20

A non-transitory computer-readable medium storing computer instructions that are configured to, when executed by at least one processor, cause the at least one processor to:
obtain a first syntax element that indicates a first quantization index value for an AC coefficient of an image;
obtain at least one second syntax element that indicates an offset value;
obtain a second quantization index value for another coefficient of the image;
obtain a quantization step size that corresponds to the second quantization index value that is obtained;
determine whether a mode in which the image is to be coded is a lossy mode or a lossless mode based on determining whether the first quantization index value is equal to a quantization index value associated with lossless coding, and based on determining whether the offset value is less than or equal to the quantization index value associated with the lossless coding; and
code the image in the lossy mode or the lossless mode based on the determining, and by using the quantization step size that is obtained.
