# US 2025/0097474 A1 · Adaptive quantization for neural network weights for convolution neural network filters in video coding

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

- Number: US 2025/0097474 A1
- Document ID: US20250097474A1
- Status: Published application
- Kind: A1
- Application number: 18/883,696
- Filed: 2024-09-12
- Published: 2025-03-20
- Earliest claimed: 2023-09-14
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Yun Li; Dmytro Rusanovskyy; Marta Karczewicz
- Web page: https://patentgrep.com/patent/US20250097474A1

## CPC

- H04N 19/80: Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation (H04N19/635, H04N19/86 take precedence)
- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- 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/42: characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation (H04N19/635 takes precedence)
- H04N 19/463: by compressing encoding parameters before transmission
- H04N 19/82: involving filtering within a prediction loop
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A device for decoding video data is configured to determine first neural network (NN) weights for a layer of a convolutional neural network (CNN) filter; derive a quantization value for the layer of the CNN filter based on values of the first NN weights; convert the first NN weights to second NN weights based on the quantization value; and filter a block of the video data using the second NN weights.

## Claims

### Claim 1

A method of decoding video data, the method comprising:
determining first neural network (NN) weights for a layer of a convolutional neural network (CNN) filter;
deriving a quantization value for the layer of the CNN filter based on values of the first NN weights;
converting the first NN weights to second NN weights based on the quantization value;
filtering a block of the video data using the second NN weights to produce a filtered block of video data; and
outputting a picture of decoded video data that includes the filtered block.

### Claim 2 (depends on 1)

The method of claim 1, wherein deriving the quantization value for the layer of the CNN filter based on the values of the first NN weights comprises testing a candidate quantization value to determine a maximum difference between an original parameter value and a quantized-then-dequantized version of the original parameter value produced by the candidate quantization value.

### Claim 3 (depends on 1)

The method of claim 1, wherein deriving the quantization value for the layer of the CNN filter based on the values of the first NN weights comprises testing a candidate quantization value to determine an amount of clipping produced by the candidate quantization value.

### Claim 4 (depends on 1)

The method of claim 1, wherein deriving the quantization value for the layer of the CNN filter based on the values of the first NN weights comprises testing a candidate quantization value to determine a number of values that are clipped due to overflow and a magnitude of clipping errors produced by the candidate quantization value.

### Claim 5 (depends on 1)

The method of claim 1, wherein deriving the quantization value for the layer of the CNN filter based on the values of the first NN weights comprises testing a candidate quantization value to determine a percentage of parameters that overflow produced by the candidate quantization value.

### Claim 6 (depends on 1)

The method of claim 1, wherein deriving the quantization value for the layer of the CNN filter based on the values of the first NN weights comprises testing a candidate quantization value to determine a percentage of parameters that overflow as a result of the candidate quantization value.

### Claim 7 (depends on 1)

The method of claim 1, wherein
deriving the quantization value for the layer of the CNN filter based on the values of the first NN weights comprises testing a candidate quantization value to determine a quantization error produced by the candidate quantization value and a clipping error produced by the candidate quantization value,
the quantization error corresponds to a maximum difference between an original parameter value and a quantized-then-dequantized version of the original parameter value produced by the candidate quantization value,
the clipping error corresponds to one or more of an amount of clipping produced by the candidate quantization value or a percentage of parameters that overflow as a result of the candidate quantization value.

### Claim 8 (depends on 1)

The method of claim 1, wherein deriving the quantization value for the layer of the CNN filter based on the values of the first NN weights comprises testing a plurality of candidate quantization values to determine the quantization value.

### Claim 9 (depends on 1)

The method of claim 1, wherein the first NN weights comprise floating point precision values and the second NN weights comprise integer precision values.

### Claim 10 (depends on 1)

The method of claim 1, wherein the method of decoding is performed as part of a video encoding process.

### Claim 11

A device for decoding video data, the device comprising:
a memory configured to store video data;
one or more processors implemented in circuitry and configured to:
determine first neural network (NN) weights for a layer of a convolutional neural network (CNN) filter;
derive a quantization value for the layer of the CNN filter based on values of the first NN weights;
convert the first NN weights to second NN weights based on the quantization value;
filter a block of the video data using the second NN weights to produce a filtered block of video data; and
output a picture of decoded video data that includes the filtered block.

### Claim 12 (depends on 11)

The device of claim 11, wherein to derive the quantization value for the layer of the CNN filter based on the values of the first NN weights, the one or more processors are further configured to test a candidate quantization value to determine a maximum difference between an original parameter value and a quantized-then-dequantized version of the original parameter value produced by the candidate quantization value.

### Claim 13 (depends on 11)

The device of claim 11, wherein to derive the quantization value for the layer of the CNN filter based on the values of the first NN weights, the one or more processors are further configured to test a candidate quantization value to determine an amount of clipping produced by the candidate quantization value.

### Claim 14 (depends on 11)

The device of claim 11, wherein to derive the quantization value for the layer of the CNN filter based on the values of the first NN weights, the one or more processors are configured to test a candidate quantization value to determine a number of values that are clipped due to overflow and a magnitude of clipping errors produced by the candidate quantization value.

### Claim 15 (depends on 11)

The device of claim 11, wherein to derive the quantization value for the layer of the CNN filter based on the values of the first NN weights, the one or more processors are further configured to test a candidate quantization value to determine a percentage of parameters that overflow produced by the candidate quantization value.

### Claim 16 (depends on 11)

The device of claim 11, wherein to derive the quantization value for the layer of the CNN filter based on the values of the first NN weights, the one or more processors are further configured to test a candidate quantization value to determine a percentage of parameters that overflow as a result of the candidate quantization value.

### Claim 17 (depends on 11)

The device of claim 11, wherein
to derive the quantization value for the layer of the CNN filter based on the values of the first NN weights, the one or more processors are further configured to test a candidate quantization value to determine a quantization error produced by the candidate quantization value and a clipping error produced by the candidate quantization value,
the quantization error corresponds to a maximum difference between an original parameter value and a quantized-then-dequantized version of the original parameter value produced by the candidate quantization value, and
the clipping error corresponds to one or more of an amount of clipping produced by the candidate quantization value or a percentage of parameters that overflow as a result of the candidate quantization value.

### Claim 18 (depends on 11)

The device of claim 11, wherein to derive the quantization value for the layer of the CNN filter based on the values of the first NN weights, the one or more processors are further configured to test a plurality of candidate quantization values to determine the quantization value.

### Claim 19 (depends on 11)

The device of claim 11, wherein the first NN weights comprise floating point precision values and the second NN weights comprise integer precision values.

### Claim 20

A method of encoding video data, the method comprising:
determining first neural network (NN) weights for a layer of a convolutional neural network (CNN) filter;
deriving a quantization value for the layer of the CNN filter based on values of the first NN weights;
converting the first NN weights to second NN weights based on the quantization value;
filtering a first block of the video data using the second NN weights to produce a filtered block of the video data;
storing a picture of decoded video data that includes the filtered block; and
predicting a second block of the video data based on the stored picture.
