# US 2014/0358978 A1 · Vector quantization with non-uniform distributions

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

- Number: US 2014/0358978 A1
- Document ID: US20140358978A1
- Status: Published application
- Kind: A1
- Application number: 14/295,212
- Filed: 2014-06-03
- Published: 2014-12-04
- Earliest claimed: 2013-06-03
- Assignees: Mozilla Corporation
- Inventors: Jean-Marc VALIN; Timothy B. TERRIBERRY
- Web page: https://patentgrep.com/patent/US20140358978A1

## CPC

- H03M 7/3082: {Vector coding (for television signals, see H04N19/94)}
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

Systems and methods are described for encoding quantized vector parameters in a bitstream are described. An exemplary method may include receiving a vector of integers used in a data compression codebook, the sum of the integers equaling a pulse sum. An initial expected magnitude may be determined for a first integer, the initial expected magnitude being based on the pulse sum, a distribution parameter, and a value corresponding to a number of integers in the vector. The actual magnitude of the first integer may be encoded based on the initial expected magnitude of the first integer. The pulse sum may be adjusted using the encoded actual magnitude. Also, the value corresponding to the number of integers in the vector may be reduced by one. Expected magnitudes for each of the remaining integers of the vector may then be calculated recursively.

## Claims

### Claim 1

A method for encoding integers for transmission via a bitstream, the method comprising:
receiving, by a processor, a vector of integers used in a data compression codebook, the sum of the integers equaling a pulse sum;
determining, by the processor, an initial expected magnitude for a first integer of the vector of integers, the initial expected magnitude being based on the pulse sum, a distribution parameter, and a value corresponding to a number of integers in the vector of integers;
encoding, by the processor, an actual magnitude of the first integer based on the initial expected magnitude;
adjusting, by the processor, the pulse sum using the encoded actual magnitude;
reducing, by the processor, the value corresponding to the number of integers in the vector by one; and
calculating, by the processor, expected magnitudes for each of the remaining integers in the vector recursively based on the distribution parameter, the adjusted pulse sum and the reduced value corresponding to the number of integers in the vector.

### Claim 2 (depends on 1)

The method of claim 1 wherein the vector of integers is non-uniform, whereby the magnitudes of the integers are not identically distributed.

### Claim 3 (depends on 1)

The method of claim 1 wherein the calculating, by the processor, expected magnitudes for each of the remaining integers in the vector recursively is performed until the adjusted pulse sum equals zero or when the reduced value corresponding to the number of integers in the vector equals one.

### Claim 4 (depends on 1)

The method of claim 1 wherein the distribution parameter represents how unevenly distributed the integers in the vector are, and wherein the distribution parameter has a constant value greater than one.

### Claim 5 (depends on 1)

The method of claim 1, further comprising adapting the distribution parameter for each of the remaining integers in the vector, the adapting comprising modifying the distribution parameter based on an adaptation rate value.

### Claim 6 (depends on 1)

The method of claim 1, further comprising determining a probability distribution based on a decay factor and the expected magnitudes of each of the integers in the vector.

### Claim 7 (depends on 1)

The method of claim 1, where the initial expected magnitude is equal to the adaptation parameter multiplied by the pulse sum divided by the number of integers in the vector.

### Claim 8

A method for encoding integers for transmission via a bitstream, the method comprising:
receiving, by a processor, a vector of integers used in a data compression codebook, the sum of the number of pulses represented by the integers equaling a pulse sum, the integers being arranged in an order and the vector of integers including a plurality of non-zero integers, each non-zero integer having a corresponding position in the order of the vector of integers;
determining, by a processor, an initial expected position of a first non-zero integer, the initial expected position being based on a distribution parameter, the pulse sum, and a value corresponding to a number of integers in the vector of integers;
encoding, by the processor, an actual position of the first non-zero integer based on the initial expected position of the first non-zero integer;
reducing, by the processor, the pulse sum by one;
adjusting, by the processor, the value corresponding to the number of integers in the vector based on the encoded actual position; and
determining, by the processor, a subsequent expected position for a subsequent non-zero integer in the vector of integers recursively based on the distribution parameter, the reduced pulse sum and the adjusted value corresponding to the number of integers in the vector, the recursive determining continuing until the corresponding position for each of the plurality of non-zero integers in the vector has been determined.

### Claim 9 (depends on 8)

The method of claim 8 wherein the vector of integers is non-uniform, whereby the non-zero integers are not evenly distributed in the order of the vector.

### Claim 10 (depends on 8)

The method of claim 8 wherein the distribution parameter corresponds to how unevenly distributed the non-zero integers are in the order of the vector of integers, and wherein the distribution parameter has a constant value less than one.

### Claim 11 (depends on 8)

The method of claim 8, further comprising: receiving additional vectors of integers; and
adapting the distribution parameter for each of the additional vectors, the adapting the distribution parameter comprising modifying the distribution parameter based on an adaptation rate value.

### Claim 12 (depends on 8)

The method of claim 8 wherein the adjusting, by the processor, the value corresponding to the number of integers in the vector based on the initial expected position comprises subtracting the initial expected position from the number of number of integers in the vector.

### Claim 13 (depends on 8)

The method of claim 8 wherein when multiple pulses are present at a specific position, the corresponding position for each pulse that follows the first pulse is given a zero value.

### Claim 14 (depends on 8)

The method of claim 8 wherein after the corresponding position of a non-zero integer is determined, the probability of adding an additional pulse at the corresponding position is divided by two.

### Claim 15 (depends on 8)

The method of claim 8, wherein the recursive determining is ended when the adjusted value corresponding to the number of integers in the vector equals one.

### Claim 16

A method for encoding integers of a vector for transmission via a bitstream, the method comprising:
receiving, by a processor, a vector of integers used in a data compression codebook, the sum of a number of pulses represented by the integers equaling a pulse sum, the integers being arranged in an order and the vector of integers including a plurality of non-zero integer vectors, each non-zero integer vector having a corresponding position in the order of the set of integer vectors;
when the pulse sum is greater than a pulse threshold:
determining, by the processor, an initial expected magnitude for a first integer of the vector of integers, the initial expected magnitude being based on the pulse sum, a first distribution parameter, and a value corresponding to the number of integers in the vector of integers;
adjusting, by the processor, the pulse sum using the initial expected magnitude;
reducing, by the processor, the value corresponding to the number of integers in the vector of integers by one; and
calculating, by the processor, expected magnitudes for each of the remaining integers in the vector recursively based on the first distribution parameter, the adjusted pulse sum and the reduced value corresponding to the number of integers in the vector ; and
when the pulse sum is less than the pulse threshold:
determining, by the processor, an initial expected position of a first non-zero integer in the order of integers, the initial expected position being based on a second distribution parameter, the pulse sum, and the value corresponding to the number of integers in the vector;
reducing, by the processor, the pulse sum by one;
adjusting, by the processor, the value corresponding to the number of integers in the vector based on the initial expected position; and
determining, by the processor, a subsequent expected position for a subsequent non-zero integer in the vector recursively based on the second distribution parameter, the reduced pulse sum and the adjusted value corresponding to the number of integers in the vector, the recursive determining continuing until the corresponding position for each of the plurality of non-zero integers in the vector has been determined.

### Claim 17 (depends on 16)

The method of claim 16, further comprising, when the pulse sum is greater than the pulse threshold:
comparing the adjusted pulse sum to the pulse threshold; and
when the adjusted pulse sum is less than the pulse threshold:
determining, by the processor, an initial expected position of a first non-zero integer vector, the initial expected position being based on a second distribution parameter, the adjusted pulse sum, and the reduced value corresponding to a number of integers in the vector;
reducing, by the processor, the adjusted pulse sum by one;
adjusting, by the processor, the reduced value corresponding to the number of integers in the vector based on the initial expected position; and
determining, by the processor, a subsequent expected position for a subsequent non-zero integer in the vector recursively based on the second distribution parameter, the reduced adjusted pulse sum and the adjusted reduced value corresponding to the number of integers in the vector, the recursive determining continuing until the corresponding position for each of the plurality of non-zero integers in the vector has been determined.

### Claim 18 (depends on 17)

The method of claim 17 wherein the pulse threshold is equal to the value corresponding to the number of integers in the vector.

### Claim 19 (depends on 16)

The method of claim 16, wherein the recursive determining is ended when the adjusted value corresponding to the number of integers in the vector equals one.

### Claim 20 (depends on 16)

The method of claim 16 where if the pulse sum is greater than or equal to 15, an exponentially-decaying distribution of integers in the vector is assumed.
