# US 12,120,311 B2 · Encoder and associated signal processing method

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

- Number: US 12,120,311 B2
- Document ID: US12120311B2
- Status: Granted
- Kind: B2
- Application number: 18/107,022
- Filed: 2023-02-08
- Published: 2024-08-08
- Granted: 2024-10-15
- Earliest claimed: 2023-02-08
- Assignees: Realtek Semiconductor Corp.
- Applicants: Realtek Semiconductor Corp.
- Inventors: Weimin Zeng; Chi-Wang Chai; Wei Li; Wujun Chen; Wei Pu
- Web page: https://patentgrep.com/patent/US12120311B2

## CPC

- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/124: Quantisation
- H04N 19/172: the region being a picture, frame or field
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/1883: {the unit relating to sub-band structure, e.g. hierarchical level, directional tree, e.g. low-high [LH], high-low [HL], high-high [HH]}
- H04N 19/96: Tree coding, e.g. quad-tree coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The present invention provides an encoder including a quantization circuit, an encoding circuit, an energy parameter calculation circuit and a quantization parameter determination circuit. The quantization circuit is configured to perform quantization operations on a plurality of CTUs in image data in sequence to generate quantized data respectively corresponding to the plurality of CTUs. The encoding circuit is configured to perform encoding operations on the quantized data of the plurality of CTUs in sequence to generate encoded data. The energy parameter calculation circuit is configured to receive the image data, and calculate a plurality of energy parameters respectively corresponding to the plurality of CTUs in the image data. The quantization parameter determination circuit is configured to determine a plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters, for the quantization circuit to perform the quantization operations.

## Claims

### Claim 1

An encoder, comprising:
a quantization circuit, configured to perform quantization operations on a plurality of coding tree units (CTUs) in image data in sequence to generate quantized data respectively corresponding to the plurality of CTUs;
an encoding circuit, configured to perform encoding operations on the quantized data of the plurality of CTUs in sequence to generate encoded data;
an energy parameter calculation circuit, configured to receive the image data, and calculate a plurality of energy parameters respectively corresponding to the plurality of CTUs in the image data; and
a quantization parameter determination circuit, configured to determine a plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters, for the quantization circuit to perform the quantization operations on the plurality of CTUs in sequence.

### Claim 2 (depends on 1)

The encoder of claim 1, wherein for each CTU, the energy parameter calculation circuit calculates a variation of a plurality of pixel values in the CTU to generate the energy parameter of the CTU.

### Claim 3 (depends on 2)

The encoder of claim 2, wherein if the image data belongs to an intra-frame (I-frame), the energy parameter calculation circuit generates the energy parameter of the CTU according to the variation of the plurality of pixel values in the CTU; and if the image data belongs to a predicted frame (P-frame), the energy parameter calculation circuit further calculates a sum of absolute difference (SAD) between the plurality of pixel values of the CTU and corresponding pixel values in a reference frame, and calculates the energy parameter of the CTU according to the variance and the SAD.

### Claim 4 (depends on 1)

The encoder of claim 1, wherein the plurality of CTUs form a row of CTU sets, each CTU set comprises N*M CTUs, and N and M are positive integers greater than or equal to two; and for each CTU, the quantization parameter determination circuit determines to adopt a row-level quantization parameter determination method, a CTU-level quantization parameter determination method or a CTU set-level quantization parameter determination method to calculate the quantization parameter of the CTU according to a position of the CTU in the row of CTU sets.

### Claim 5 (depends on 4)

The encoder of claim 4, wherein if the CTU is located in the first column of the row of CTU sets, the quantization parameter determination circuit uses the row-level quantization parameter determination method to calculate the quantization parameter of the CTU.

### Claim 6 (depends on 5)

The encoder of claim 5, wherein the quantization parameter determination circuit calculates the quantization parameter of the CTU according to a target number of bits of the row of CTU sets after encoding and an average value of the energy parameters of the plurality of CTUs of the row of CTU sets.

### Claim 7 (depends on 4)

The encoder of claim 4, wherein if the CTU is located in the first row of all CTU sets except the first CTU set in the row of CTU sets, the quantization parameter determination circuit uses the CTU set-level quantization parameter determination method to calculate the quantization parameter of the CTU.

### Claim 8 (depends on 7)

The encoder of claim 7, wherein the CTU is located in a second CTU set, and the second CTU set is located after a first CTU set; and the quantization parameter determination circuit determines the quantization parameter of the CTU according to an actual number of bits of the first CTU set after encoding and an estimated number of bits of the first CTU set before encoding.

### Claim 9 (depends on 8)

The encoder of claim 8, wherein if the CTU is not located in the first column of any CTU set, the quantization parameter determination circuit uses the CTU-level quantization parameter determination method to calculate the quantization parameter of the CTU.

### Claim 10 (depends on 9)

The encoder of claim 9, wherein the CTU is a second CTU, and the second CTU is located after a first CTU; and the quantization parameter determination circuit determines the quantization parameter of the CTU according to an actual number of bits of the first CTU after encoding and an estimated number of bits of the first CTU before encoding.

### Claim 11

A signal processing method of an encoder, comprising:
receiving image data, and calculating a plurality of energy parameters respectively corresponding to a plurality of CTUs in the image data;
determining a plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters;
using the plurality of quantization parameters to sequentially perform quantization operations on the plurality of CTUs to generate quantized data respectively corresponding to the plurality of CTUs; and
performing encoding operations on the quantized data of the plurality of CTUs in sequence to generate encoded data.

### Claim 12 (depends on 11)

The signal processing method of claim 11, wherein the step of calculating the plurality of energy parameters respectively corresponding to the plurality of CTUs in the image data comprises:
for each CTU, calculating a variation of a plurality of pixel values in the CTU to generate the energy parameter of the CTU.

### Claim 13 (depends on 12)

The signal processing method of claim 12, wherein the step of calculating the plurality of energy parameters respectively corresponding to the plurality of CTUs in the image data comprises:
if the image data belongs to an intra-frame (I-frame), generating the energy parameter of the CTU according to the variation of the plurality of pixel values in the CTU; and
if the image data belongs to a predicted frame (P-frame), calculating a sum of absolute difference (SAD) between the plurality of pixel values of the CTU and corresponding pixel values in a reference frame, and calculating the energy parameter of the CTU according to the variance and the SAD.

### Claim 14 (depends on 11)

The signal processing method of claim 11, wherein the plurality of CTUs form a row of CTU sets, each CTU set comprises N*M CTUs, and N and M are positive integers greater than or equal to two; and the step of determining the plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters comprises:
for each CTU, determining to adopt a row-level quantization parameter determination method, a CTU-level quantization parameter determination method or a CTU set-level quantization parameter determination method to calculate the quantization parameter of the CTU according to a position of the CTU in the row of CTU sets.

### Claim 15 (depends on 14)

The signal processing method of claim 14, wherein the step of determining the plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters comprises:
if the CTU is located in the first column of the row of CTU sets, using the row-level quantization parameter determination method to calculate the quantization parameter of the CTU.

### Claim 16 (depends on 15)

The signal processing method of claim 15, wherein the step of determining the plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters comprises:
calculating the quantization parameter of the CTU according to a target number of bits of the row of CTU sets after encoding and an average value of the energy parameters of the plurality of CTUs of the row of CTU sets.

### Claim 17 (depends on 14)

The signal processing method of claim 14, wherein the step of determining the plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters comprises:
if the CTU is located in the first row of all CTU sets except the first CTU set in the row of CTU sets, using the CTU set-level quantization parameter determination method to calculate the quantization parameter of the CTU.

### Claim 18 (depends on 17)

The signal processing method of claim 17, wherein the CTU is located in a second CTU set, and the second CTU set is located after a first CTU set; and the step of determining the plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters comprises:
determining the quantization parameter of the CTU according to an actual number of bits of the first CTU set after encoding and an estimated number of bits of the first CTU set before encoding.

### Claim 19 (depends on 18)

The signal processing method of claim 18, wherein the step of determining the plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters comprises:
if the CTU is not located in the first column of any CTU set, using the CTU-level quantization parameter determination method to calculate the quantization parameter of the CTU.

### Claim 20 (depends on 19)

The signal processing method of claim 19, wherein the CTU is a second CTU, and the second CTU is located after a first CTU; and the step of determining the plurality of quantization parameters of the plurality of CTUs according to at least a portion of the plurality of energy parameters comprises:
determining the quantization parameter of the CTU according to an actual number of bits of the first CTU after encoding and an estimated number of bits of the first CTU before encoding.
