Apparatus for encoding and decoding sequence of integer values, method for encoding and decoding sequence of integer values, and computer program for implementing these methods

By encoding a sequence of integer values using variable length codes and exponential Golom codes, focusing on differences between adjacent values, the method improves coding efficiency and compression performance, addressing the inefficiencies of existing methods.

JP2025060972AActive Publication Date: 2025-04-10FRAUNHOFER GESELLSCHAFT ZUR FORDERUNG DER ANGEWANDTEN FORSCHUNG EV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024232630
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2020-06-23
Filing Date
2024-12-27
Publication Date
2025-04-10
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

Existing encoding methods for sequences of integer values require significant bitstream bandwidth due to code length, making them inefficient except when there are few different values between sequence elements.

Method used

The method involves encoding a strictly monotonically ordered sequence of integer values by first encoding a given integer value at a position, then encoding the differences between adjacent values, using variable length codes and exponential Golom codes to improve compression performance.

Benefits of technology

This approach reduces the bitstream bandwidth required for encoding, enhancing coding efficiency and compression performance, especially for sequences with values centered around certain integers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025060972000001_ABST
    Figure 2025060972000001_ABST
Patent Text Reader

Abstract

To provide a more efficient coding concept.SOLUTION: The present invention provides encoding schemes for encoding a sequence of integer values, specifically by first encoding the value at a given location and then successively calculating and encoding the differences between adjacent values. Respective decoding schemes are also provided. These encoding and decoding schemes provide a more efficient coding concept.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application relates to encoding a sequence of integer values, and in particular to encoding a sequence of integer values ​​by first encoding the value at a given location and then successively calculating and encoding the differences between adjacent values.

[0002] An embodiment in accordance with the present invention relates to an apparatus for encoding a sequence of integer values.

[0003] A further embodiment according to the invention relates to an apparatus for decoding a sequence of integer values.

[0004] A further embodiment according to the invention relates to a method for encoding a sequence of integer values.

[0005] A further embodiment according to the invention relates to a method for decoding a sequence of integer values.

[0006] A further embodiment according to the invention relates to a computer program for performing the method for encoding and decoding a sequence of integer values.

[0007] The present invention may be applied to any data compression application involving integer value signaling, such as, for example, compressing parameters of a neural network. [Background technology]

[0008] Currently, many devices and methods are known for encoding and decoding sequences of values.

[0009] However, known devices and methods require significant bitstream bandwidth due to the length of the code, and are not efficient except when there are only a small number of distinct values ​​occurring among the elements of the sequence.

[0010] In view of the above, it is desirable to develop coding concepts that improve compression performance and improve coding efficiency. Summary of the Invention [Problem to be solved by the invention]

[0011] It is therefore an object of the present invention to provide a more efficient coding concept. This object is achieved by the subject matter of the pending independent claims.

[0012] Further advantageous aspects are the subject matter of the dependent claims. [Means for solving the problem]

[0013] An embodiment according to the invention creates an apparatus for encoding a strictly monotonically ordered sequence of integer values, e.g. a codebook, into a data stream, e.g. a bit stream, configured to encode a predefined integer value, e.g. C[z], located at a predefined position (z) in the sequence of integer values ​​into the data stream, calculate for each position before the predefined position, e.g. z, in the sequence of integer values ​​a first difference between the integer value immediately following the respective position and the integer value at the respective position minus one, encode the first difference into the data stream, calculate for each position after the predefined position in the sequence of integer values ​​a second difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one, and encode the second difference into the data stream.

[0014] This embodiment is based on the observation that compression performance improves if one first encodes certain integer values ​​of a sequence placed at certain positions in the sequence, and then subsequently signals only the differences between adjacent values.

[0015] It should be noted that when coding a sequence of integer values ​​as taught herein, the sequence is divided into two parts, one preceding the predetermined position and the other following the predetermined position along the sequence. Many sequences to be coded, such as codebooks of quantization levels of parameters such as neural network parameters, are fairly small values ​​and show a distribution of values ​​centered around an integer value that can be used to form a predetermined integer value at a predetermined position, resulting in a high density of integer values ​​around the center and a large interval between consecutive integer values ​​that are further away from the center. This means that coding a predetermined integer value separately and then coding the difference (minus one) between pairs of immediately adjacent integer values ​​for other integer values ​​helps to eliminate the need to code one large integer value, compared to coding the first or last integer value of a sequence and then coding all other values ​​according to the difference to this first or last integer value. The corresponding savings may potentially overcompensate for the additional overhead of coding information about a predetermined position in a data stream.

[0016] Furthermore, in many applications, the index used to quantize a certain set of parameters, such as neural network parameters, has a distribution among the integer values ​​of the codebook to which the index points, and the codebook itself is centered at or near a predetermined location where the center of gravity of the integer values ​​of the sequence is located. This allows information about the predetermined location, when coded into the data stream, to be efficiently reused as an offset for coding the quantization index for all parameters that it points to in the sequence / codebook, i.e., the index minus the predetermined location (z) may be coded / decoded for each parameter instead of the rank location of the integer values ​​in the sequence or codebook directly. The reuse and corresponding difference / offset coding of the quantization index into the sequence / codebook makes the coding of parameters, such as neural network, NN, parameters, more efficient.

[0017] According to one embodiment, the device is configured to encode the number of integer values ​​of the sequence of integer values, e.g. the size of the codebook, e.g. L(C), or the length of the codebook, into a data stream, e.g. a bit stream. This allows the codebook size information to be reused. The encoded sequence of integer values ​​into the data stream can be used to determine a predefined position and a rank of the center of the codebook. According to one embodiment, the device is configured to encode the number of integer values ​​of the sequence of integer values ​​into the data stream by using a first variable length code, e.g. A1. The first variable length code may, for example, assign shorter code words to smaller integers. The first variable length code may, for example, be a code for unsigned integer values.

[0018] According to one embodiment, the device is configured to encode a number of integer values ​​of a sequence of integer values ​​into a data stream by using an Exponential-Golomb Code. A parameter of the Exponential-Golomb Code, for example k, may, for example, control the code length allocation to each different magnitude encoded value. Using the Exponential-Golomb Code provides a more efficient coding technique.

[0019] According to one embodiment, the device is configured to encode Exponential-Golomb code parameters for an Exponential-Golomb code into the data stream, thus improving coding efficiency.

[0020] According to one embodiment, the exponential-Golomb code parameter for the exponential-Golomb code has a value of 2. Using a predetermined exponential-Golomb code parameter for the first variable length code is more efficient since only one value is coded per sequence of integer values, e.g., codebook.

[0021] According to an embodiment, the apparatus is configured to binarize a number of integer values ​​of a sequence of integer values ​​into a first binary string of one or more first bins using a first binarization code and encode said number into a data stream by context-adaptive binary arithmetic coding the one or more first bins, whereby no loss in coding efficiency is caused due to lossless binary coding.

[0022] According to one embodiment, the device is configured to encode information indicative of a given position, for example z, into the data stream, which allows the information about the given position to be reused.

[0023] According to one embodiment, the method is configured to select a predetermined position among several positions in the sequence of integer values, and select a position among several positions that satisfies a predetermined criterion as the predetermined position, for example, when the integer values ​​of the sequence of integer values ​​are centered around zero, the predetermined position, for example z, preferably points to a small value, to realize an efficient coding technique.

[0024] According to one embodiment, the predetermined criterion is a minimum bit rate for encoding the sequence of integer values ​​into a data stream.

[0025] According to one embodiment, the apparatus is configured to calculate a third difference between the rank of the given position and a number of integer values ​​rounded to an integer, and to encode the third difference into the data stream. For example, the third difference is calculated as follows:

[0026]

number

[0027] The variable y is small, for example, when z points to a position near the middle of the sequence, thus providing an efficient coding technique.

[0028] According to one embodiment, the device is configured to encode the third difference into the data stream by using a second variable length code, for example A2, the second variable length code being, for example, a code for signed integer values.

[0029] According to one embodiment, the device is configured to encode the third difference into the data stream by using an Exponential-Golomb code. A parameter of the Exponential-Golomb code, for example k, may, for example, control the code length allocation to the encoded values ​​of different magnitudes. Using the Exponential-Golomb code provides a more efficient coding technique.

[0030] According to one embodiment, the device is configured to encode Exponential-Golomb code parameters for an Exponential-Golomb code into the data stream, thus improving coding efficiency.

[0031] According to one embodiment, the apparatus is configured to map the third difference onto the first unsigned integer according to a prescribed mapping rule and encode the third difference into the data stream by encoding the first unsigned integer using a third variable length code, for example A6.

[0032] According to one embodiment, the apparatus is configured to encode the unsigned integers into the data stream by using Exponential-Golomb codes, which provide a more efficient coding technique.

[0033] According to one embodiment, the device is configured to encode Exponential-Golomb code parameters for an Exponential-Golomb code into the data stream, thus improving coding efficiency.

[0034] According to one embodiment, the exponential-Golomb code parameter for the exponential-Golomb code has a value of 2. Using a predefined exponential-Golomb code parameter can be more efficient.

[0035] According to one embodiment, the mapping rules map signed integers to unsigned integers such that signed integers less than zero and greater than zero are each mapped onto separate unsigned integers among even and odd unsigned integers, zero is mapped onto zero, and for each unsigned integer, the magnitude of a first signed integer mapped onto the respective unsigned integer is greater than or equal to a second signed integer mapped onto the subsequent unsigned integer of the respective unsigned integer.

[0036] According to one embodiment, the mapping rule maps a signed integer Is to an unsigned integer Iu according to the following formula: If Is ≦ 0 → Iu = -Is * 2 If Is>0, Iu = Is * 2 - 1

[0037] According to one embodiment, the apparatus is configured to binarize the number into a second binary sequence of one or more second bins using a second binarization code and encode the third difference into the data stream by context-adaptive binary arithmetic coding the one or more second bins.

[0038] According to one embodiment, the device is configured to encode the predetermined integer value into the data stream by using a fourth variable length code, for example A3. The fourth variable length code may for example be a code for signed integer values.

[0039] According to one embodiment, the device is configured to encode a predetermined integer value into a data stream by using an Exponential-Golomb Code, whose parameters, e.g., k, may control the code length allocation to encoded values ​​of different magnitudes. The use of Exponential-Golomb Code provides a more efficient coding technique.

[0040] According to one embodiment, the device is configured to encode Exponential-Golomb code parameters for an Exponential-Golomb code into the data stream, thus improving coding efficiency.

[0041] According to one embodiment, the method is configured to encode the predetermined integer value into the data stream by mapping the predetermined integer value onto a second unsigned integer according to further defined mapping rules and encoding the second unsigned integer using a fifth variable length code, for example A7.

[0042] According to one embodiment, the apparatus is configured to encode the unsigned integers into the data stream by using Exponential-Golomb codes, which provide a more efficient coding technique.

[0043] According to one embodiment, the device is configured to encode Exponential-Golomb code parameters for an Exponential-Golomb code into the data stream, thus improving coding efficiency.

[0044] According to one embodiment, the exponential-Golomb code parameter for the exponential-Golomb code has a value of 7. Using certain exponential-Golomb code parameters can be more efficient.

[0045] According to one embodiment, the mapping rules map signed integers to unsigned integers such that signed integers less than zero and greater than zero are each mapped onto separate unsigned integers among even and odd unsigned integers, zero is mapped onto zero, and for each unsigned integer, the magnitude of a first signed integer mapped onto the respective unsigned integer is greater than or equal to a second signed integer mapped onto the subsequent unsigned integer of the respective unsigned integer.

[0046] According to one embodiment, the mapping rule maps a signed integer Is to an unsigned integer Iu according to the following formula: If Is ≦ 0 → Iu = -Is * 2 If Is>0, Iu = Is * 2 - 1

[0047] According to one embodiment, the apparatus is configured to encode the predetermined integer value into a data stream by binarizing the number into a third binary sequence of one or more third bins using a third binarization code and performing context-adaptive binary arithmetic coding on the one or more third bins, without any loss in coding efficiency due to lossless binarization coding.

[0048] According to one embodiment, the device is configured to encode the first difference into the data stream by using a sixth variable length code, for example A4, which may for example be a code for unsigned integer values.

[0049] According to one embodiment, the device is configured to encode the first difference into the data stream by using an Exponential-Golomb code, whose parameter, e.g., k, may control the code length allocation to the encoded values ​​of different magnitudes. The use of Exponential-Golomb codes provides a more efficient coding technique.

[0050] According to one embodiment, the device is configured to code the exponential-Golomb code parameters for the exponential-Golomb code into the data stream. This is particularly efficient when more than one sequence of integer values, for example more than one codebook, is coded into the data stream and only one exponential-Golomb code parameter is coded into the data stream for all sequences. For larger codebooks, it may be advantageous to signal the exponential-Golomb parameters for a sixth variable length code to optimize the code length to the distribution of the values ​​to be coded. Thus, coding efficiency is improved.

[0051] According to one embodiment, the Exponential-Golomb Code parameter is one of a number ranging from 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

[0052] According to one embodiment, the exponential-Golomb code parameter for the exponential-Golomb code has a value of 7. Using certain exponential-Golomb code parameters can be more efficient.

[0053] According to an embodiment, the apparatus is configured to encode the first difference into a data stream by binarizing the number into a fourth binary sequence of one or more fourth bins using a second binarization code and context-adaptive binary arithmetic coding the one or more fourth bins, without any loss in coding efficiency due to lossless binarization coding.

[0054] According to one embodiment, the device is configured to encode the second difference into the data stream by using a seventh variable length code, for example A5, which may for example be a code for unsigned integer values.

[0055] According to one embodiment, the device is configured to encode the second difference into the data stream by using an Exponential-Golomb code. A parameter of the Exponential-Golomb code, for example k, may control the code length allocation to the encoded values ​​of different magnitudes. Using the Exponential-Golomb code provides a more efficient coding technique.

[0056] According to one embodiment, the device is configured to code the exponential-Golomb code parameters for the exponential-Golomb code into the data stream. This is particularly efficient when more than one sequence of integer values, for example more than one codebook, is coded into the data stream and only one exponential-Golomb code parameter is coded into the data stream for all sequences. For larger codebooks, it may be advantageous to signal the exponential-Golomb parameters for a sixth variable length code to optimize the code length to the distribution of the values ​​to be coded. Thus, coding efficiency is improved.

[0057] According to one embodiment, the Exponential-Golomb Code parameter is one of a number ranging from 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

[0058] According to one embodiment, the exponential-Golomb code parameter for the exponential-Golomb code has a value of 7. Using certain exponential-Golomb code parameters can be more efficient.

[0059] According to one embodiment, the exponential-Golomb code parameters for the exponential-Golomb code for encoding the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for encoding the first difference.

[0060] According to one embodiment, the exponential-Golomb code parameters for the exponential-Golomb code for encoding the first difference and the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for encoding the predetermined integer value into the data stream.

[0061] According to an embodiment, the device is configured to binarize the number into a fifth binary sequence of one or more fifth bins using a second binarization code and encode the second difference into a data stream by context-adaptive binary arithmetic coding the one or more fifth bins, without any loss in coding efficiency due to lossless binarization coding.

[0062] According to one embodiment, the apparatus is configured to obtain the sequence of integer values ​​via a clustering algorithm.

[0063] According to one embodiment, the sequence of integer values ​​is a codebook associated with the parameters of the neural network. When information about the predetermined position is coded into the data stream, the coding of the neural network, NN, parameters becomes more efficient by reusing the information about the predetermined position as an offset for coding the quantization index for all parameters that point into the sequence / codebook, as well as the corresponding difference / offset coding of the quantization index into the sequence / codebook.

[0064] According to one embodiment, the parameters include one or more of the weights, biases, and batch norm parameters of the neural network.

[0065] According to one embodiment, an apparatus is configured to obtain a sequence of integer values ​​by quantizing a plurality of floating-point values ​​onto a set of quantization levels defined by the sequence of integer values ​​and a floating-point quantization parameter.

[0066] According to one embodiment, the apparatus is configured to encode, for each of a plurality of floating-point values, a quantization index into the data stream that points to an associated integer value in a sequence of integer values ​​associated with a quantization level to which the respective floating-point value is quantized in accordance with the floating-point quantization parameter.

[0067] According to one embodiment, the floating-point quantization parameters include a first signed integer quantization parameter and a second unsigned integer quantization parameter.

[0068] According to one embodiment, the apparatus is configured to encode a first signed integer quantization parameter into the data stream, and the second unsigned integer parameter is a fixed value or the apparatus is configured to inherit the second unsigned integer parameter from another sequence or set of sequences of integer values.

[0069] According to one embodiment, an apparatus is configured to encode a first signed integer quantization parameter and a second unsigned integer parameter into a data stream.

[0070] According to one embodiment, the device is configured to encode a quantization index into the data stream in the form of a rank difference between a first rank of a position of an associated integer value in a sequence of integer values ​​and a rank of a given position.

[0071] According to one embodiment, the apparatus is configured to encode the rank difference into the data stream by using an eighth variable length code.

[0072] According to one embodiment, the device is configured to encode the rank difference into the data stream by using an Exponential-Golomb Code, whose parameters, e.g., k, may control the code length allocation to the coded values ​​of different magnitudes. The use of Exponential-Golomb Code provides a more efficient coding technique.

[0073] According to one embodiment, the device is configured to binarize the number into a binary sequence of one or more bins using a binarization code, and encode the rank difference into a data stream by context-adaptive binary arithmetic coding the one or more bins, without any loss in coding efficiency due to lossless binarization coding.

[0074] According to one embodiment, the apparatus is configured to encode a floating-point quantization parameter into the data stream and to obtain quantization levels from a sequence of integer values ​​by applying the floating-point quantization parameter.

[0075] According to one embodiment, the floating-point quantization parameter defines the quantization step size between the quantization levels.

[0076] An embodiment according to the invention creates an apparatus for decoding a strictly monotonically ordered sequence of integer values, e.g. a codebook, from a data stream, e.g. a bit stream, configured to decode from the data stream a predefined integer value, e.g. C[z], located at a predefined position, e.g. z, of the sequence of integer values, decode from the data stream, for each position preceding the predefined position in the sequence of integer values, a first difference between the integer value immediately following the respective position and the integer value at the respective position minus one, and decode from the data stream, for each position preceding the predefined position in the sequence of integer values, a second difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one.

[0077] The device for decoding according to this embodiment and the embodiments described below is based on the same requirements as the device for encoding described above.

[0078] According to one embodiment, the apparatus is configured to decode from the data stream the number of integer values ​​of the sequence of integer values, eg the size of the codebook, eg L(C), or eg the length of the codebook.

[0079] According to one embodiment, the apparatus is configured to decode a number of integer values ​​of a sequence of integer values ​​from a data stream by using a first variable length code, for example A1.

[0080] According to one embodiment, an apparatus is configured to decode a number of integer values ​​of a sequence of integer values ​​from a data stream by using an Exponential-Golomb Code.

[0081] According to one embodiment, an apparatus is configured to decode Exponential-Golomb code parameters for an Exponential-Golomb code from a data stream.

[0082] According to one embodiment, the Exponential-Golomb code parameter for the Exponential-Golomb code has a value of 2. According to one embodiment, the apparatus is configured to multi-value a number of integer values ​​of a sequence of integer values ​​via a first binarization code obtained from a first binary sequence in one or more first bins, and decode said number from the data stream by context-adaptive binary arithmetic decoding of the one or more first bins from the data stream.

[0083] According to one embodiment, the device is configured to decode information indicative of a predetermined position from the data stream.

[0084] According to one embodiment, the apparatus is configured to calculate (206), for each position in the sequence of positions preceding the predetermined position, an integer value at the respective position by linearly combining the first difference, the integer value immediately preceding the respective position, and a 1, and to calculate (208), for each position in the sequence of positions disposed after the predetermined position, an integer value at the respective position by linearly combining the second difference, the integer value immediately preceding the respective position, and a 1.

[0085] According to one embodiment, the apparatus is configured to decode from the data stream a third difference between the rank of the predetermined position and the number of integer values ​​rounded to an integer, and calculate the predetermined position based on the third difference and the number of integer values.

[0086] According to one embodiment, the apparatus is configured to decode a third difference from the data stream via a second variable length code, for example A2.

[0087] According to one embodiment, the apparatus is configured to decode the third difference from the data stream via an Exponential-Golomb code.

[0088] According to one embodiment, an apparatus is configured to decode Exponential-Golomb code parameters for an Exponential-Golomb code from a data stream.

[0089] According to one embodiment, the apparatus is configured to decode the first unsigned integer using a third variable length code, for example A6, and derive the third difference by inverse mapping it from the first unsigned integer according to a predetermined inverse mapping rule.

[0090] According to one embodiment, an apparatus is configured to decode an unsigned integer from a data stream via an Exponential-Golomb code.

[0091] According to one embodiment, an apparatus is configured to decode Exponential-Golomb code parameters for an Exponential-Golomb code from a data stream.

[0092] According to one embodiment, the Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of two.

[0093] According to one embodiment, the inverse mapping rules map unsigned integers to signed integers such that even and odd unsigned integers are each mapped onto separate signed integers less than and greater than zero, zero is mapped onto zero, and for each signed integer, the magnitude of the first signed integer mapped onto the respective unsigned integer is greater than or equal to the second signed integer mapped onto the subsequent unsigned integer of the respective unsigned integer.

[0094] According to one embodiment, the inverse mapping rule maps an unsigned integer Iu to a signed integer Is according to the following formula:

[0095]

number

[0096] According to one embodiment, the apparatus is configured to decode a third difference from the data stream by multi-valuing the number from a second binary sequence of one or more second bins via a second binarization code and context-adaptive binary arithmetic decoding the one or more second bins.

[0097] According to one embodiment, the apparatus is configured to decode a predetermined integer value from a data stream via a fourth variable length code, for example A3.

[0098] According to one embodiment, an apparatus is configured to decode a predetermined integer value from a data stream via an Exponential-Golomb code.

[0099] According to one embodiment, the apparatus is configured to decode the predetermined integer value from the data stream by decoding the second unsigned integer via a fifth variable length code, for example A7, and retrieving the predetermined integer value by inverse mapping from the second unsigned integer according to further defined inverse mapping rules.

[0100] According to one embodiment, an apparatus is configured to decode an unsigned integer from a data stream via an Exponential-Golomb code.

[0101] According to one embodiment, an apparatus is configured to decode Exponential-Golomb code parameters for an Exponential-Golomb code from a data stream.

[0102] According to one embodiment, the Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

[0103] According to one embodiment, the inverse mapping rules map unsigned integers to signed integers such that even and odd unsigned integers are each mapped onto separate signed integers less than and greater than zero, zero is mapped onto zero, and for each signed integer, the magnitude of the first signed integer mapped onto the respective unsigned integer is greater than or equal to the second signed integer mapped onto the subsequent unsigned integer of the respective unsigned integer.

[0104] According to one embodiment, the inverse mapping rule maps an unsigned integer Iu to a signed integer Is according to the following formula:

[0105]

number

[0106] According to one embodiment, the apparatus is configured to decode a predetermined integer value from the data stream by multi-valuing said number from a third binary sequence in one or more third bins using a third binarization code and performing context-adaptive binary arithmetic decoding of the one or more third bins.

[0107] According to one embodiment, the apparatus is configured to encode the first difference into the data stream by using a sixth variable length code, for example A4.

[0108] According to one embodiment, the apparatus is configured to decode the first difference from the data stream via an Exponential-Golomb code.

[0109] According to one embodiment, the device is configured to decode Exponential-Golomb Code parameters for an Exponential-Golomb Code from a data stream, which is particularly efficient when more than one sequence of integer values, e.g., more than one codebook, is decoded from the data stream.

[0110] According to one embodiment, the Exponential-Golomb Code parameter is one of a number ranging from 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

[0111] According to one embodiment, the Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

[0112] According to one embodiment, the apparatus is configured to decode the first difference from the data stream by multi-valuing the number from a fourth binary sequence of one or more fourth bins using a second binarization code and context-adaptive binary arithmetic decoding the one or more fourth bins.

[0113] According to one embodiment, the apparatus is configured to decode the second difference from the data stream via a seventh variable length code, for example A5.

[0114] According to one embodiment, the apparatus is configured to decode the second difference from the data stream via an Exponential-Golomb code.

[0115] According to one embodiment, the device is configured to decode Exponential-Golomb Code parameters for an Exponential-Golomb Code from a data stream, which is particularly efficient when more than one sequence of integer values, e.g., more than one codebook, is decoded from the data stream.

[0116] According to one embodiment, the Exponential-Golomb Code parameter is one of a number ranging from 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

[0117] According to one embodiment, the Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

[0118] According to one embodiment, the exponential-Golomb code parameters for the exponential-Golomb code for decoding the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for decoding the first difference.

[0119] According to one embodiment, the exponential-Golomb code parameters for the exponential-Golomb code for decoding the first difference and the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for decoding the predetermined integer value from the data stream.

[0120] According to one embodiment, the apparatus is configured to decode a second difference from the data stream by multi-valuing the number from a fifth binary sequence of one or more fifth bins via a second binarization code and context-adaptive binary arithmetic decoding the one or more fifth bins.

[0121] According to one embodiment, the apparatus is configured to apply a declustering algorithm to the sequence of decoded integer values.

[0122] According to one embodiment, the sequence of integer values ​​is a codebook associated with the parameters of a neural network.

[0123] According to one embodiment, the parameters include one or more of the weights, biases, and batch norm parameters of the neural network.

[0124] According to one embodiment, the apparatus is configured to reconstruct a decoded sequence of integer values ​​into a plurality of floating-point values ​​from the sequence of integer values ​​and a set of quantization levels defined by a floating-point quantization parameter.

[0125] According to one embodiment, the apparatus is configured to decode, for each of a plurality of floating-point values, a quantization index from the data stream that points to an associated integer value in a sequence of integer values ​​associated with a quantization level to which the respective floating-point value was quantized in accordance with the floating-point quantization parameter.

[0126] According to one embodiment, the floating-point quantization parameter includes a first signed integer quantization parameter and a second unsigned integer parameter.

[0127] According to one embodiment, the apparatus is configured to encode a first signed integer quantization parameter into the data stream, and the second unsigned integer parameter is a fixed value or the apparatus is configured to inherit the second unsigned integer parameter from another sequence or set of sequences of integer values.

[0128] According to one embodiment, an apparatus is configured to encode a first signed integer quantization parameter and a second unsigned integer parameter into a data stream.

[0129] According to one embodiment, the apparatus is configured to decode a quantization index from a data stream based on a rank difference between a first rank of an associated integer value position in a sequence of integer values ​​and a rank of the predetermined position.

[0130] According to one embodiment, the apparatus is configured to decode a rank difference from the data stream via an eighth variable length code.

[0131] According to one embodiment, an apparatus is configured to decode a rank difference from a data stream via an Exponential-Golomb code.

[0132] According to one embodiment, the apparatus is configured to decode the rank difference from the data stream by multi-valuing the number from a binary sequence of one or more bins using a binarization code and context-adaptive binary arithmetic decoding the one or more bins.

[0133] According to one embodiment, the apparatus is configured to decode a floating-point quantization parameter from a data stream and to reconstruct a sequence of integer values ​​from the quantization levels by applying the floating-point quantization parameter.

[0134] According to one embodiment, the floating-point quantization parameter defines the quantization step size between the quantization levels.

[0135] One embodiment according to the invention creates a method for encoding a strictly monotonically ordered sequence of integer values ​​into a data stream, the method comprising the steps of: encoding a predetermined integer value, e.g. C[z], located at a predetermined position, e.g. z, of the sequence of integer values ​​into the data stream; calculating, for each position prior to the predetermined position in the sequence of integer values, a first difference between the integer value immediately following the respective position and the integer value at the respective position minus one; encoding the first difference into the data stream; calculating, for each position prior to the predetermined position in the sequence of integer values, a second difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one; and encoding the second difference into the data stream.

[0136] The method according to this embodiment is based on the same requirements as the device for encoding described above. Moreover, this disclosed embodiment may possibly be complemented by any other features, functions and details disclosed herein in relation to the device for encoding, either individually or in combination with those features, functions and details.

[0137] One embodiment according to the invention creates a method for decoding a strictly monotonically ordered sequence of integer values ​​from a data stream, the method comprising the steps of: decoding from the data stream a predetermined integer value, e.g. C[z], located at a predetermined position, e.g. z, of the sequence of integer values; decoding from the data stream, for each position preceding the predetermined position in the sequence of integer values, a first difference between the integer value immediately following the respective position and the integer value at the respective position minus one; and decoding from the data stream, for each position preceding the predetermined position in the sequence of integer values, a second difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one.

[0138] The method according to this embodiment is based on the same requirements as the device for decoding described above. Moreover, this disclosed embodiment may possibly be supplemented by any other features, functions and details disclosed herein in relation to the device for decoding, either individually or in combination with those features, functions and details.

[0139] An embodiment according to the invention creates a computer program having a program code for performing a method according to any of the above described embodiments, when the computer program is run on a computer.

[0140] The apparatus for encoding, the method for encoding, the apparatus for decoding, the method for decoding, and the computer programs for implementing these methods may in some cases be supplemented by any of the features, functions, and details disclosed in this specification (as a whole document) individually as well as by any combination of those features, functions, and details.

[0141] Preferred embodiments of the present application are described below with reference to the figures. [Brief description of the drawings]

[0142] [Figure 1] 1 is a flow chart of a method 100 for encoding according to one embodiment. [Diagram 2] 2 is a flow chart of a method 200 for decoding according to one embodiment. [Diagram 3] FIG. 2 is a schematic diagram of an encoding and decoding procedure according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0143] A method 100 for encoding a sequence of integer values ​​according to one embodiment is presented in FIG.

[0144] The method 100 comprises, in step 101, encoding a number of integer values ​​of a sequence of integer values ​​to be encoded, in step 102, calculating a difference between the rank of a predetermined position and a value obtained by rounding the number of integer values ​​to an integer, and encoding this difference into a data stream in step 103. The method 100 further comprises, in step 104, encoding a predetermined integer value C[z] located at a predetermined position z of the sequence of integer values.

[0145] The method 100 further comprises performing the following encoding steps for each position prior to a given position z in the sequence of integer values: calculating, in step 105, the difference between the integer value immediately following the respective position and the integer value at the respective position minus one, and encoding, in step 106, this difference into the data stream.

[0146] The method 100 further comprises performing the following encoding steps for each position located after the given position z in the sequence of integer values: calculating, in step 107, the difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one, and encoding, in step 108, this difference into the data stream.

[0147] However, it should be noted that method 100 may in some cases be supplemented by any of the features, functions, and details disclosed herein individually as well as by any combination of those features, functions, and details.

[0148] A method 200 for decoding a sequence of integer values ​​according to one embodiment is presented in FIG.

[0149] The method 200 includes, at step 201, decoding a number of integer values ​​of a sequence of decoded integer values ​​L(C) from a data stream.

[0150] The method 200 further includes, in step 202, decoding from the data stream a difference y between the rank of the predetermined position and a value obtained by rounding the number of integer values ​​to an integer, and, in step 203, calculating the predetermined position z based on the difference y and the number of integer values.

[0151] The method 200 includes, at step 204, decoding from the data stream a predetermined integer value, eg, C[z], located at a calculated predetermined position z of the sequence of integer values.

[0152] The method 200 further includes performing the following decoding steps for each position prior to the given position in the sequence of integer values: in step 205, decoding from the data stream a difference d1 between the integer value immediately following the respective position and the integer value at the respective position minus 1; and in step 206, calculating the integer value at the respective position by linearly combining the first difference, the integer value immediately following the respective position, and 1.

[0153] The method 200 further includes performing the following decoding steps for each position located after the predetermined position in the sequence of integer values: in step 207, decoding from the data stream a difference d2 between the integer value at the respective position and the integer value immediately preceding the respective position minus 1; and in step 208, calculating the integer value at the respective position by linearly combining the second difference, the integer value immediately preceding the respective position, and 1.

[0154] However, it should be noted that method 200 may in some cases be supplemented by any of the features, functions, and details disclosed herein individually as well as by any combination of those features, functions, and details.

[0155] In the following, several embodiments are described regarding how to code a sequence 10 of integer values ​​12 into a data stream 14. The sequence 10 of integer values ​​may be a codebook of quantization levels for typical network parameters. In the sequence 10, the integer values ​​12 may be strictly monotonically ordered, i.e., the integer values ​​12 may be ordered in ascending order 16 or descending order 18, and no integer value appears more than once in the sequence 10.

[0156] The integer values ​​12 are coded into the data stream 14 as follows: A predefined integer value 12 located at a predefined position, indicated by hatching in Fig. 3 and denoted z in the following embodiments, is coded into the data stream 14, for example by using a variable length code, referred to as A3 in the following embodiments. Thus, for a predefined integer value, a codeword 20 is included in the data stream 14. The position z may be known by default or may be coded into the data stream 14 by using another variable length code A2, as will be outlined in the following embodiments, and thereby encoded into a codeword 22. Similarly, the size of the sequence 10, i.e. the number of integer values ​​12 in the sequence 10, may be known by default or may be coded into the data stream 14, for example by using another variable length code, referred to as A1 in the following embodiments, and thereby encoded into a codeword 24, as will be outlined in the following embodiments.

[0157] Furthermore, the remaining integer values ​​12, except for the predetermined integer value 12, are coded into the data stream 14. These latter integer values ​​12 are coded into the data stream 14 by their differences. For example, the integer values ​​12 located upstream of the predetermined position are coded into the data stream 14 by the differences of each of these succeeding integer values ​​12 on the one hand and the difference of the integer value immediately preceding the respective integer value on the other hand. The differences may be subtracted by one and coded into the data stream 14 by using another variable length code A5, thereby being coded into one codeword 26 for each of the integer values ​​12 succeeding the predetermined integer value 12. Similarly, each integer value preceding the predetermined integer value is coded into the data stream 14 in the form of a difference between the respective integer value and the integer value immediately following the respective integer value. The differences are subtracted by one so that the integer values ​​are strictly monotonically ordered in the sequence 10 and each difference is coded into the data stream 14 using another variable length code A4, thereby being coded into a codeword 28 for each of these integer values ​​preceding the predetermined integer value in the sequence 10, as will be explained in more detail below.

[0158] There are various possibilities as to how to calculate the difference used when the integer values ​​12 upstream and downstream of the given integer value are calculated. As will be explained in the following embodiment, the minuend of the difference 30 on the basis of which the integer value 12 preceding the given integer value is coded may be located after the subtrahend of the difference 30, and the same may apply to the difference 32 used when the integer value 12 after the given position is coded in the data stream 14, i.e. the non-subtrahend may be located after the subtrahend. However, this is only an example, and the order of the subtrahend and the non-subtrahend may be switched for both the difference 30 and the difference 32, or only on one side of the given position.

[0159] As shown in Figure 3, the codewords resulting from the encoding procedure outlined may be coded in the data stream 14 in the following order: first the size of the sequence 10 is coded, then the set of positions of the predefined integer value, then the predefined integer value, then the integer value 12 before the predefined position, and possibly then the codeword 26 for the integer value 12 after the predefined position. However, this is only one possibility and the codewords 28 and 26 could for example be coded in the data stream interleaved with respect to each other.

[0160] As shown in Figure 3, the decoder reverses the coding procedure outlined with respect to Figure 3, the details of which are described in other embodiments.

[0161] In the following, an embodiment is described for coding a sequence of integer values ​​into a data stream, e.g., a bitstream, e.g., a bitstream containing encoded neural network data, e.g., an NNR bitstream. The structure of the encoded sequence of integer values ​​is shown in Table 1 in the form of a pseudocode encoding.

[0162] [Table 1]

[0163] As can be seen in Table 1, the sequence of integer values ​​to be coded is contained in a vector integerCodebook, in which the integer values ​​are strictly monotonically ordered. For coding, the encoder codes a predefined integer value codebook_zero_value located at a predefined position cbZeroOffset in the sequence of integer values ​​into the data stream. First, the positions before the predefined position cbZeroOffset in the sequence of integer values ​​are coded in a first for-loop. In detail, for each such position j, a first difference is calculated between the integer value immediately following the respective position and the integer value integerCodebook[j] at the respective position minus 1, which is now stored in previousValue as the for-loop traverses these positions towards the start position of the sequence of integer values, and the first difference is coded into the data stream, i.e. codebook_delta_left = previousValue - integerCodebook[j] - 1. Then, first, the positions located after the predefined position in the sequence of integer values ​​are coded in a second for-loop. For each such position in the sequence of integer values, a second difference is calculated between the integer value integerCodebook[j] at the respective position and the integer value immediately preceding the respective position minus 1, here stored in previousValue as the for loop traverses these positions towards the end position of the sequence of integer values ​​and initialized by a predetermined integer value codebook_zero_value immediately before the second for loop, and the second difference is coded into the data stream, i.e., codebook_delta_right = integerCodebook[j] - previousValue - 1. As mentioned above, the order between the coding of the differences can be switched or possibly interleaved.When decoding a sequence of integer values, a predefined integer value codebook_zero_value located at a predefined position cbZeroOffset in the sequence of integer values ​​is decoded from the data stream, then for each position prior to the predefined position in the sequence of integer values, a first difference between the integer value immediately following the respective position and the integer value at the respective position minus one is decoded from the data stream, i.e., codebook_delta_left = previousValue - integerCodebook[j] - 1, and for each position prior to the predefined position in the sequence of integer values, a second difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one is decoded from the data stream, i.e., codebook_delta_right = integerCodebook[j] - previousValue - 1.

[0164] More specifically, the number of integer values ​​in the sequence of integer values ​​is also coded into the data stream, i.e., codebook_size. This is done using a variable length code, i.e., a quadratic Exp-Golomb code.

[0165] Information about a given position codebook_centre_offset of the coded sequence of integer values ​​may also be coded in the data stream. This coding is done according to a difference to the centre position of the sequence: cbZeroOffset-(codebook_size>>1)=codebook_centre_offset is coded, i.e. the difference between the rank of the given position cbZeroOffset and the number of integer values ​​rounded to an integer, here the rounded value, i.e. codebook_size>>1. This is done using a variable length code, i.e. a quadratic Exp-Golomb code.

[0166] A given integer value, codebook_zero_value, is coded using an Exp-Golomb code of order 7.

[0167] The first and second differences are coded using a k-th order Exp-Golomb code, where k is coded in the data stream as codebook_egk, where k is coded as a 4-bit unsigned integer.

[0168] The sequence of encoded integer values, e.g., codebook (integer_codebook), is defined by the variables cbZeroOffset and integerCodebook, i.e., a predetermined position in the sequence of integer values, e.g., z, and a predetermined integer value, e.g., C(z), placed at a predetermined position.

[0169] The parameters that define a sequence, e.g., a codebook, include an Exponential-Golomb code parameter, e.g., an Exp-Golomb code parameter, e.g., k, (codebook_egk), and the number of integer values ​​in a sequence of integer values, e.g., the number of elements in a codebook, (codebook_size), that are used in creating a sequence of determined integer values ​​decoded from a data stream, e.g., a bitstream.

[0170] The predetermined position (cbZeroOffset) is a variable (codebook_centre_offset) calculated using the difference (codebook_centre_offset) between the rank of the predetermined position and the number of integer values ​​rounded to an integer, and the difference is encoded into the bitstream. The variable codebook_centre_offset is defined in one embodiment as a third difference, e.g., y. The variable codebook_centre_offset specifies an offset for accessing an element in a codebook, e.g., a codebook, relative to a sequence, e.g., the center of a sequence. The difference (codebook_centre_offset) is used in creating a sequence of determined integer values ​​decoded from a data stream, e.g., a bitstream.

[0171] The parameter codebook_zero_value, which defines an encoded sequence, e.g., a codebook, specifies a predefined integer value (integerCodebook) located at a predefined position (cbZeroOffset), e.g., the value of the codebook at position CbZeroOffset. This parameter is used in creating a decoded sequence of integer values, e.g., the variable Codebook (an array representing the codebook).

[0172] In producing a decoded sequence, a first differential (codebook_delta_left) and a second differential (codebook_delta_right) are decoded from a data stream, eg, a bitstream.

[0173] The first difference (codebook_delta_left) specifies, for each position before the given position (cbZeroOffset) in the sequence of integer values, the difference between the integer value immediately following the position and the integer value at the position minus 1, e.g., the difference between the codebook value and its right neighbor minus 1 for the value to the left of the center position. The first difference (codebook_delta_left) is used in creating a sequence of decoded integer values, e.g., the variable Codebook (an array representing a codebook) as shown in Table 1. For each position before the given position (cbZeroOffset) in the sequence of integer values, the integer value at the position is calculated by linearly combining the first difference (codebook_delta_left), the integer value immediately following the position (previousValue = integerCodebook[j+1]), and 1, such that: integerCodebook[j] = previousValue - codebook_delta_left - 1

[0174] The second difference (codebook_delta_right) specifies, for each position located after the predetermined position (cbZeroOffset) in the sequence of integer values, the difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one, e.g., for values ​​to the right of the center position, the difference between the codebook value and its value to the left minus one. The second difference is used in creating a sequence of decoded integer values, e.g., the variable Codebook (an array representing the codebook) as shown in Table 1. For each position located after the predetermined position (cbZeroOffset) in the sequence of integer values, the integer value at the respective position is calculated by linearly combining the second difference (codebook_delta_right), the integer value immediately preceding the respective position (previousValue = integerCodebook[j-1]), and one, such that: integerCodebook[j] = previousValue + codebook_delta_right + 1

[0175] The exponential-Golomb code parameters (codebook_egk) are used to decode the syntax elements codebook_delta_left, which defines the first difference, and codebook_delta_right, which defines the second difference.

[0176] However, it should be noted that the coding of the sequence of integer values ​​described with reference to Table 1 may in some cases be supplemented by any of the features, functions and details disclosed herein individually or in any combination of those features, functions and details.

[0177] In conclusion, embodiments in accordance with the present invention improve compression performance and improve coding efficiency.

[0178] 4. Further Embodiments and Aspects Further aspects and embodiments according to the present invention are described below, which can be used individually or in combination with any other embodiment disclosed herein.

[0179] Furthermore, the embodiments disclosed in this section may in some cases be supplemented by any other features, functions, and details disclosed herein individually and in combination with those features, functions, and details.

[0180] An improved concept for signaling a codebook for data compression according to an embodiment of the present invention will now be further described.

[0181] This embodiment in accordance with the invention describes a technique for encoding and decoding codebooks that may achieve improvements in compression efficiency compared to the prior art, for example. Embodiments in accordance with the invention may be applied to any data compression application involving integer signaling, such as for example the compression of parameters of neural networks.

[0182] Consider a sequence W of integer values ​​that is to be coded efficiently by using a codebook. This can be particularly efficient when only a small number of difference values ​​occur between the elements of W. For example, a W with such properties can be the output of the well-known k-means algorithm followed by quantization of cluster centers, where the cluster centers contain a codebook C.

[0183] Let the codebook C be a sequence of ascending integer values ​​in which a particular integer value may occur at most once. Further, let z be an integer offset pointing to the zth element of the codebook, which can be understood as, for example, an offset to a codebook value equal to or close to zero.

[0184] To use a codebook, W is transformed into a sequence V of codebook indices such that element w_i of W is equal to the codebook element at position z+v_i, where v_i is the element of V at position i (the first position is i=0).

[0185] Working Example Let C=[-20, -5, 3, 17], z=2, and V=[-2, -2, 1, 0, -1]. Then W can be reconstructed from C, z, and V to get the sequence [-20, -20, 17, 3, -5].

[0186] In the following, embodiments according to the present invention will be described.

[0187] For example, we present an efficient technique for encoding and decoding a codebook represented as a strictly monotonically ordered sequence of integer values. The technique can be particularly efficient when the elements of the codebook, e.g., the integer values ​​of the sequence of integer values, are centered around zero and z, e.g., a given position, preferably points to a small value. However, the technique also works when these assumptions do not apply. The basic idea is to first signal the element at a position z, e.g., a given position, and then successively signal only the difference between adjacent values ​​as follows:

[0188] 1. Use a code A1, e.g., a first variable length code, on unsigned integer values ​​to encode the size of the codebook L(C), e.g., the number of integer values ​​in a sequence of integer values.

[0189] 2. Calculate the variable y=z-floor(L(C)2), e.g., the third difference between the rank of a given position and the number of integer values ​​rounded to an integer, and encode y, e.g., the third difference, using the code A2, e.g., the second variable length code, on the signed integer value. Note that y is smaller when z points to a position closer to the center of the codebook.

[0190] 3. Encode C[z], eg, a given integer value, using code A3, eg, a fourth variable length code, for signed integer values.

[0191] 4. For each position i=z-1, i=z-2, ... i=0, e.g., the position in the sequence of integer values ​​before the given position, do the following:

[0192] a. Calculate the difference d=C[i+1]-C[i]-1, e.g., calculate the first difference between C[i+1] and C[i] minus 1 (since adjacent values ​​in the codebook differ in magnitude by at least 1).

[0193] b. Encode d, eg, the first difference, using code A4, eg, a sixth variable length code, on unsigned integer values.

[0194] 5. For positions i=z+1, i=z+2, ... through i=L(C)-1, where L(C) is the length of the codebook, e.g., the position of the sequence of integer values ​​following a given position, do the following for each position:

[0195] a. Calculate the difference d=C[i]-C[i-1]-1, e.g., calculate a second difference between C[i] and C[i-1] minus 1 (since adjacent values ​​in the codebook differ in magnitude by at least 1).

[0196] b. Encode d, eg, the second difference, using code A5, eg, the seventh variable length code, on unsigned integer values.

[0197] The corresponding decoding method is given below:

[0198] 1. Decode a variable l, e.g., the number of integer values, using a code A1, e.g., a first variable length code, on unsigned integer values ​​and initialize an empty codebook, e.g., a sequence of integer values ​​having a number I of integer values ​​of length l, i.e., the length of the codebook L(C) is equal to l.

[0199] 2. Decode variable y, eg, the third difference, using code A2, eg, a second variable length code, on the signed integer value and set z, eg, a given position, to floor(L(C) / 2)+y.

[0200] 3. Decode the value of C[z], e.g., a predetermined integer value placed at a predetermined position, using a code A3, e.g., a fourth variable length code, on the signed integer value.

[0201] 4. For positions i=z-1, i=z-2, i=0, say each of the positions preceding a given position in a sequence of integer values, do the following:

[0202] a. Decode the value d, eg, the first difference, using code A4, eg, the sixth variable length code, on the unsigned integer value.

[0203] Set bC[i] to C[i+1]-d-1.

[0204] 5. For positions i=z+1, i=z+2, ... through i=L(C)-1, where L(C), e.g., the positions after a given position in the sequence of integer values, is the length of the codebook, do the following for each position:

[0205] a. Decode the value d, eg, the second difference, using code A5, eg, the seventh variable length code, on the unsigned integer value.

[0206] Set bC[i] to C[i-1]+d+1.

[0207] The codes A1-A5 can for example be fixed length codes or codes that assign shorter codewords to smaller integers. The advantage of the above encoding and decoding methods is that the values ​​coded by the codes A1-A5 are small and therefore the bitstream is short.

[0208] For example, the well-known exponential-Golomb code can be used for this purpose, where an associated exponential-Golomb parameter k controls the code length allocation to the coded values ​​of different magnitudes. In this case, the parameter k is either a predetermined value or is signaled in the bitstream. For larger codebooks, signaling an exponential-Golomb parameter for codes A4 and A5 may be worthwhile to optimize the code length for the distribution of values ​​to be coded. On the other hand, using a predetermined exponential-Golomb parameter k for codes A1, A2, and A3 may be more efficient since only one value is coded per codebook.

[0209] For example, a 4-bit value indicating an integer between 0 and 15, which is the Exponential-Golomb parameter k for the codes A4 and A5, can be written into the bitstream.

[0210] In another example, the well-known DeepCABAC scheme for encoding signed integers may be used for any of the codes A1 to A5. In some cases, for unsigned codes, the sign_flag of DeepCabac is not encoded. Instead, the sign_flag is assumed to always be 0 (indicating a positive value) in the encoder and decoder.

[0211] Exemplary Configurations In an exemplary configuration, an embodiment in accordance with the present invention is applied to the encoding of a codebook associated with parameters of a neural network.

[0212] At the encoder, the codebook is generated by a clustering algorithm such as k-means, where the values ​​in the codebook are quantized to integers using uniform reconstruction quantization with a step-size parameter (e.g., floating-point values).

[0213] The quantized codebook values ​​are then sorted in ascending order and potential duplicate values ​​are removed.

[0214] Then, by using the scheme of this embodiment according to the invention, the quantized codebook is encoded and the integer offset z is successfully selected.

[0215] The parameters (to be coded) are then converted into codebook indices and these codebook indices are coded using the well-known DeepCABAC scheme.

[0216] It should be noted that a good selection of the integer offset z may be, for example, a result of minimizing the sum of bits generated by encoding the codebook and the associated DeepCABAC encoded codebook index.

[0217] The step size may, for example, be a floating-point value derived from a first signed integer quantization parameter QP and a second unsigned integer parameter qp_density, where QP and / or qp_density are pre-defined values ​​or signaled in the bitstream.

[0218] The step size "stepSize" may be calculated, for example, by the following formula: mul=(1< <qp_density)+(QP&((1<<qp_density)-1)) shift=QP>>qp_density stepSize=mul*2 shift - qp_density

[0219] At the decoder, the codebook and codebook index are decoded from the bitstream. The decoded codebook index is first reconstructed into a quantized codebook element (using the codebook as a lookup table with integer offsets z), and then the quantized codebook element is reconstructed (e.g., into a floating-point value) using a step size to obtain the reconstructed neural network parameters.

[0220] The neural network parameters can be, for example, weights, biases, batch norm parameters, and so on.

[0221] Preferred Embodiments In a preferred embodiment, the codes A1 to A5 are variable length codes, which assign shorter code words to smaller integers.

[0222] In another preferred embodiment, code A2 or code A3 is a code that first maps a signed integer s to an unsigned integer u according to a mapping rule M, and then encodes the unsigned integer u using code A6 or A7, respectively.

[0223] In another preferred embodiment, the mapping rule M maps a signed integer s to an unsigned integer u according to the following mathematical formula: If s<=0: u=-s*2, Otherwise (s>0): u = s*2-1

[0224] The corresponding inverse mapping (used in the decoder) is given by: If u is even ((u&1)==0): s=-u / 2, else ((u&1) != 0): s = (u+1) / 2

[0225] In another preferred embodiment, the symbols A4 and A5 are the same.

[0226] In another preferred embodiment, code A1 or code A4 or code A5 or code A6 or code A7 is an Exponential-Golomb code of degree k.

[0227] Note that the exponential-Golomb code of degree k for encoding an unsigned integer u is given as follows: while u>=(1< <k) { writeBits(1, 0) u-=1< <k k+=1} writeBits(1, 1) writeBits(k, u)

[0228] The function writeBits(n,x) writes the n least significant bits of the unsigned integer x to the bitstream.

[0229] In another preferred embodiment, the parameter k of some or all of the relevant Exponential-Golomb codes is signaled in the bitstream.

[0230] In another preferred embodiment, one or more of the codes A1 to A7 use arithmetic coding.

[0231] In another preferred embodiment, the codes A1, A6, and A7 are exponential-Golomb codes of degrees 2, 2, and 7, respectively.

[0232] In another preferred embodiment according to the aforementioned preferred embodiment, the codes A4 and A5 are exponential-Golomb codes of the same degree k, where k is signaled in the bitstream as a 4-bit unsigned integer, allowing values ​​0<=k<16.

[0233] In another preferred embodiment, the codes A4 and A5 are exponential-Golomb codes of degree seven.

[0234] In conclusion, embodiments in accordance with the present invention improve the trade-off between compression performance and visual quality and low coding latency, improving coding efficiency, and some embodiments also achieve additional coding efficiency.

[0235] For example, the sections "Introduction", "Sample Adaptive Offset", "Classification for PSAO", "Decoder", "Encoder", and "Some Comments" each describe different embodiments and aspects of the present invention, and features, functions, and details from the "Sample Adaptive Offset" section may be incorporated into any of the other embodiments, as the case may be.

[0236] However, features, functions and details described in any other section may also be incorporated into embodiments in accordance with the present invention, if applicable.

[0237] Also, the embodiments described in the above sections can be used separately or can be complemented by features, functions and details in other sections.

[0238] It should also be noted that the individual aspects described herein can be used individually or in combination, and thus details can be added to each of the individual aspects while not being added to another of the aspects.

[0239] In particular, the embodiments are also set forth in the claims, which in some cases may be supplemented by any of the features, functions and details described herein individually as well as by any combination of those features, functions and details.

[0240] It should also be noted that this disclosure explicitly or implicitly describes features that can be used in a video encoder (an apparatus for providing an encoded representation of an input video signal) and a video decoder (an apparatus for providing a decoded representation of a video signal based on the encoded representation of the video signal). Thus, any of the features described herein can be used in the context of a video encoder as well as in the context of a video decoder.

[0241] Moreover, features and functions disclosed herein with respect to a method may also be used in an apparatus (configured to perform such functions). Moreover, any feature and function disclosed herein with respect to an apparatus may also be used in the corresponding method. In other words, the methods disclosed herein may be complemented by any of the features and functions described with respect to the apparatus.

[0242] Also, as described in the "Alternative Embodiments" section, any of the features and functions described herein can be implemented in hardware or software, or using a combination of hardware and software.

[0243] Alternative Embodiments Although some aspects have been described in the context of an apparatus, it is clear that these aspects also represent a description of a corresponding method, with blocks or devices corresponding to method steps or features of method steps. Similarly, aspects described in the context of a method step also represent a description of a corresponding block or item or feature of a corresponding apparatus. Some or all of the method steps may be performed by (or using) a hardware apparatus, such as, for example, a microprocessor, a programmable computer, or an electronic circuit. In some embodiments, one or more of the most important method steps may be performed by such an apparatus.

[0244] Depending on some implementation requirements, embodiments of the present invention can be implemented in hardware or in software. Implementation can be done using a digital storage medium, for example, a floppy disk, a DVD, a Blue-Ray, a CD, a ROM, a PROM, an EPROM, an EEPROM, or a FLASH memory, in which electronically readable control signals are stored, which cooperate (or can cooperate) with a programmable computer system to perform the respective method. Thus, the digital storage medium may be computer readable.

[0245] Some embodiments according to the invention comprise a data carrier having electronically readable control signals which can cooperate with a programmable computer system to perform one of the methods described herein.

[0246] Generally, embodiments of the present invention can be implemented as a computer program product including program code operable to perform one of the methods when the computer program product is executed on a computer. The program code may for example be stored on a machine readable carrier.

[0247] Other embodiments comprise the computer program for performing one of the methods described herein, the computer program being stored on a machine readable carrier.

[0248] In other words, an embodiment of the inventive method is, therefore, a computer program having a program code for performing one of the methods described herein, when the computer program runs on a computer.

[0249] A further embodiment of the inventive method is a data carrier (or a digital storage medium or a computer readable medium) having recorded thereon a computer program for performing one of the methods described herein. The data carrier, digital storage medium or recording medium is generally tangible and / or non-transitory.

[0250] A further embodiment of the inventive method is therefore a data stream or a sequence of signals representing the computer program for performing one of the methods described herein, the data stream or the sequence of signals for example being adapted to be transferred via a data communication connection, for example the Internet.

[0251] A further embodiment comprises a processing means, for example a computer, or a programmable logic device, configured to or adapted to perform one of the methods described herein.

[0252] A further embodiment comprises a computer having installed thereon the computer program for performing one of the methods described herein.

[0253] Further embodiments according to the invention comprise an apparatus or a system configured to transfer (e.g. electronically or optically) a computer program for performing one of the methods described herein to a receiver. The receiver may be, for example, a computer, a mobile device, a memory device, etc. The apparatus or system may, for example, comprise a file server for transferring the computer program to the receiver.

[0254] In some embodiments, a programmable logic device (e.g., a field programmable gate array) may be used to perform some or all of the functions of the methods described herein. In some embodiments, a field programmable gate array may cooperate with a microprocessor to perform one of the methods described herein. In general, the methods are preferably performed by any hardware apparatus.

[0255] The apparatus described herein may be implemented using a hardware apparatus, or a computer, or a combination of a hardware apparatus and a computer.

[0256] The apparatus described herein, or any components of the apparatus described herein, may be implemented at least in part in hardware and / or software.

[0257] The methods described herein may be performed using a hardware apparatus, or may be performed using a computer, or may be performed using a combination of a hardware apparatus and a computer.

[0258] Any of the methods described herein, or components of the apparatus described herein, may be at least partially implemented by hardware and / or software.

[0259] The embodiments described herein are merely illustrative of the principles of the present invention. It is to be understood that modifications and variations of the arrangements and details described herein will be apparent to those skilled in the art. It is therefore intended to be limited only by the scope of the appended claims, and not by the specific details presented through the description of the embodiments herein. [Explanation of symbols]

[0260] 10. Sequence 12 Integer Values 14 Data Stream 16 Ascending 18 descending 22, 24, 26, 28 codeword 30, 32 difference 100 ways 200 ways A1, A2, A3, A4, A5, A6, A7 variable length code C[z] given integer value d1, d2 difference z in place

Claims

1. 1. An apparatus for encoding a strictly monotonically ordered sequence of integer values ​​into a data stream, comprising: encoding (104) a predetermined integer value (C[z]) located at a predetermined position (z) of the sequence of integer values ​​into the data stream; For each position prior to the given position (z) in the sequence of integer values, calculating (105) a first difference between the integer value immediately following each of the locations and the integer value at each of the locations minus one; encoding (106) the first difference into the data stream; For each position located after the predetermined position in the sequence of integer values: calculating (107) a second difference between the integer value at each of the positions and the integer value immediately preceding each of the positions minus one; An apparatus configured to encode the second difference into the data stream.

2. The apparatus of claim 1 , configured to encode (101) a number of integer values ​​of the sequence of integer values ​​into the data stream.

3. 3. The apparatus of claim 2, configured to encode a number of integer values ​​of the sequence of integer values ​​into the data stream by using a first variable length code [A1].

4. 3. The apparatus of claim 2, configured to encode a number of integer values ​​of the sequence of integer values ​​into the data stream by using an Exponential-Golomb Code.

5. 5. The apparatus of claim 4, configured to encode Exponential-Golomb Code parameters for the Exponential-Golomb Code into the data stream.

6. The apparatus of claim 4 , wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of 2.

7. 7. The apparatus of claim 2, configured to binarize a number of integer values ​​of the sequence of integer values ​​into a first binary string of one or more first bins using a first binarization code and encode the number into the data stream by context-adaptive binary arithmetic coding the one or more first bins.

8. 8. Apparatus according to any one of claims 1 to 7, configured to encode information indicative of a predetermined position into the data stream.

9. 9. An apparatus according to claim 1 , configured to select a predetermined position among a number of positions in the sequence of integer values, and to select as the predetermined position a position among the number of positions that satisfies a predetermined criterion.

10. The apparatus of claim 9 , wherein the predetermined criterion is a minimum bit rate for encoding the sequence of integer values ​​into the data stream.

11. Calculating (102) a third difference between the rank of the predetermined position and the number of integer values ​​rounded to an integer; 11. The apparatus of claim 1, configured to encode (103) the third difference into the data stream.

12. 12. The apparatus of claim 11, configured to encode the third difference into the data stream by using a second variable length code [A2].

13. 12. The apparatus of claim 11, configured to encode the third difference into the data stream by using an Exponential-Golomb code.

14. 14. The apparatus of claim 13, configured to encode Exponential-Golomb code parameters for the Exponential-Golomb code into the data stream.

15. mapping the third difference onto a first unsigned integer according to a prescribed mapping rule; 12. The apparatus of claim 11, configured to encode the third difference into the data stream by encoding the first unsigned integer using a third variable length code [A6].

16. 16. The apparatus of claim 15, configured to encode the unsigned integer into the data stream by using an Exponential-Golomb code.

17. 17. The apparatus of claim 16, configured to encode Exponential-Golomb code parameters for the Exponential-Golomb code into the data stream.

18. 17. The apparatus of claim 16, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of 2.

19. 19. The apparatus of claim 15, wherein the mapping rule maps signed integers to unsigned integers such that signed integers less than zero and greater than zero are each mapped onto separate ones of even and odd unsigned integers, zero is mapped onto zero, and for each unsigned integer, a first signed integer mapped onto the respective unsigned integer is greater than or equal to a second signed integer mapped onto a succeeding unsigned integer of the respective unsigned integer.

20. The mapping rule is as follows: If Is ≦ 0 → Iu = -Is * 2, If Is>0, Iu = Is * 2 - 1 19. An apparatus as claimed in any one of claims 15 to 18, for mapping a signed integer Is to an unsigned integer Iu according to:

21. 21. The apparatus of claim 11, configured to binarize the number into a second binary sequence of one or more second bins using a second binarization code and encode the third difference into the data stream by context-adaptive binary arithmetic coding the one or more second bins.

22. 22. The apparatus of claim 1, configured to encode the predetermined integer value into the data stream by using a fourth variable length code [A3].

23. 23. An apparatus according to any one of claims 1 to 22, configured to encode the predetermined integer value into the data stream by using an Exponential-Golomb code.

24. 24. The apparatus of claim 23, configured to encode Exponential-Golomb code parameters for the Exponential-Golomb code into the data stream.

25. Mapping the predetermined integer value onto a second unsigned integer according to further prescribed mapping rules; 25. The apparatus of claim 1, configured to encode the predetermined integer value into the data stream by encoding the second unsigned integer using a fifth variable length code [A7].

26. 26. The apparatus of claim 25, configured to encode the unsigned integer into the data stream by using an Exponential-Golomb code.

27. 27. The apparatus of claim 26, configured to encode Exponential-Golomb code parameters for the Exponential-Golomb code into the data stream.

28. 27. The apparatus of claim 26, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

29. 29. The apparatus of claim 25, wherein the mapping rule maps signed integers to unsigned integers such that signed integers less than zero and greater than zero are each mapped onto separate ones of even and odd unsigned integers, zero is mapped onto zero, and for each unsigned integer, a first signed integer mapped onto the respective unsigned integer is greater than or equal to a second signed integer mapped onto a succeeding unsigned integer of the respective unsigned integer.

30. The mapping rule is as follows: If Is ≦ 0 → Iu = -Is * 2, If Is>0, Iu = Is * 2 - 1 29. An apparatus as claimed in any one of claims 25 to 28, for mapping a signed integer Is to an unsigned integer Iu according to:

31. 25. The apparatus of claim 1, configured to encode the predetermined integer value into the data stream by binarizing the number into a third binary sequence of one or more third bins using a third binarization code and performing context-adaptive binary arithmetic coding on the one or more third bins.

32. 32. The apparatus of claim 1, configured to encode the first difference into the data stream by using a sixth variable length code [A4].

33. 33. The apparatus of claim 1, configured to encode the first difference into the data stream by using an Exponential-Golomb code.

34. 34. The apparatus of claim 33, configured to encode Exponential-Golomb code parameters for the Exponential-Golomb code into the data stream.

35. 35. The apparatus of claim 34, wherein the Exponential-Golomb Code parameter is one of a value in a range of 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

36. 36. The apparatus of claim 33, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of 7.

37. 37. The apparatus of claim 1, configured to encode the first difference into the data stream by binarizing the number into a fourth binary sequence of one or more fourth bins using a second binarization code and performing context-adaptive binary arithmetic coding on the one or more fourth bins.

38. 38. The apparatus of claim 1, configured to encode the second difference into the data stream by using a seventh variable length code [A5].

39. 39. The apparatus of claim 1, configured to encode the second difference into the data stream by using an Exponential-Golomb code.

40. 40. The apparatus of claim 39, configured to encode Exponential-Golomb code parameters for the Exponential-Golomb code into the data stream.

41. 41. The apparatus of claim 40, wherein the Exponential-Golomb Code parameter is one of a value in a range of 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

42. 40. The apparatus of claim 39, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

43. 40. The apparatus of claim 39, wherein the exponential-Golomb code parameters for the exponential-Golomb code for encoding the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for encoding the first difference.

44. 44. The apparatus of claim 43, wherein the exponential-Golomb code parameters for the exponential-Golomb code for encoding the first difference and the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for encoding the predetermined integer value into the data stream.

45. 45. The apparatus of claim 1, configured to encode the second difference into the data stream by binarizing the number into a fifth binary sequence of one or more fifth bins using a second binarization code and performing context-adaptive binary arithmetic coding on the one or more fifth bins.

46. 46. ​​An apparatus according to any one of claims 1 to 45, configured to obtain the sequence of integer values ​​via a clustering algorithm.

47. 47. The apparatus of claim 1, wherein the sequence of integer values ​​is a codebook associated with parameters of a neural network.

48. 48. The apparatus of claim 47, wherein the parameters include one or more of weights, biases, and batch norm parameters of the neural network.

49. 49. The apparatus of claim 1, configured to obtain the sequence of integer values ​​by quantizing a plurality of floating-point values ​​onto a set of quantization levels defined by the sequence of integer values ​​and a floating-point quantization parameter.

50. 50. The apparatus of claim 49, configured to encode, for each of the plurality of floating-point values, a quantization index into the data stream that points to the associated integer value within the sequence of integer values ​​associated with a quantization level to which the respective floating-point value is quantized in accordance with the floating-point quantization parameter.

51. 51. The apparatus of claim 49 or 50, wherein the floating-point quantization parameters include a first signed integer quantization parameter and a second unsigned integer quantization parameter.

52. 52. The apparatus of claim 51, configured to encode the first signed integer quantization parameter into the data stream, and wherein the second unsigned integer parameter is a fixed value or the apparatus is configured to inherit the second unsigned integer parameter from another sequence of integer values ​​or a set of sequences of integer values.

53. 52. The apparatus of claim 51, configured to encode the first signed integer quantization parameter and the second unsigned integer parameter into the data stream.

54. 50. The apparatus of claim 49, configured to encode the quantization index into the data stream in the form of a rank difference between a first rank of the position of the associated integer value in the sequence of integer values ​​and a rank of the predetermined position.

55. 55. The apparatus of claim 54, configured to encode the rank difference into the data stream by using an eighth variable length code.

56. 55. The apparatus of claim 54, configured to encode the rank difference into the data stream by using an Exponential-Golomb code.

57. 57. The apparatus of any one of claims 54 to 56, configured to encode the rank difference into the data stream by binarizing the number into a binary sequence of one or more bins using a binarization code and performing context-adaptive binary arithmetic coding on the one or more bins.

58. 58. An apparatus according to any one of claims 1 to 57, configured to encode a floating-point quantization parameter into the data stream and to obtain quantization levels from the sequence of integer values ​​by applying the floating-point quantization parameter.

59. 60. The apparatus of claim 58, wherein the floating-point quantization parameter defines a quantization step size between the quantization levels.

60. 1. An apparatus for decoding a strictly monotonically ordered sequence of integer values ​​from a data stream, comprising: Decoding (204) a predetermined integer value (C[z]) located at a predetermined position (z) of the sequence of integer values ​​from the data stream; For each position prior to the given position in the sequence of integer values, Decoding (205) a first difference from the data stream between an integer value immediately following each of the positions and the integer value at each of the positions minus one; For each position located after the predetermined position in the sequence of integer values: and decoding (207) from the data stream a second difference between the integer value at the respective position and the integer value immediately preceding the respective position minus one.

61. 61. The apparatus of claim 60, configured to decode (201) a number of integer values ​​of the sequence of integer values ​​from the data stream.

62. 62. The apparatus of claim 61, configured to decode a number of integer values ​​of the sequence of integer values ​​from the data stream by using a first variable length code [A1].

63. 62. The apparatus of claim 61, configured to decode a number of integer values ​​of the sequence of integer values ​​from the data stream by using an Exponential-Golomb Code.

64. 64. The apparatus of claim 63, configured to decode Exponential-Golomb Code parameters for the Exponential-Golomb Code from the data stream.

65. 64. The apparatus of claim 63, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of 2.

66. 64. The apparatus of claim 61, configured to multi-value a number of integer values ​​in the sequence of integer values ​​via a first binarization code from a first binary string in one or more first bins, and decode the number from the data stream by context-adaptive binary arithmetic decoding of the one or more first bins from the data stream.

67. 61. The apparatus of claim 60 configured to decode information indicative of the predetermined position from the data stream.

68. For each position in the sequence of positions preceding the given position, calculating (206) the integer value at each of the locations by linearly combining the first difference, the integer value immediately following the each of the locations, and a 1; For each position in the sequence of positions located after the given position, 68. The apparatus of claim 60, configured to calculate (208) the integer value at the respective location by linearly combining the second difference, the integer value immediately preceding the respective location, and a 1.

69. Decoding (202) a third difference between the rank of the predetermined position from the data stream and the number of integer values ​​rounded to the nearest integer; 69. The apparatus of any one of claims 60 to 68, configured to calculate (203) the predetermined position based on the third difference and the number of integer values.

70. 70. The apparatus of claim 69, configured to decode the third difference from the data stream via a second variable length code [A2].

71. 70. The apparatus of claim 69, configured to decode the third difference from the data stream via an Exponential-Golomb Code.

72. 72. The apparatus of claim 71 configured to decode Exponential-Golomb code parameters for the Exponential-Golomb code from the data stream.

73. Decoding the first unsigned integer using a third variable length code [A6]; 70. The apparatus of claim 69, configured to decode the third difference from the data stream by retrieving the third difference by inverse mapping from the first unsigned integer according to a predetermined inverse mapping rule.

74. 74. The apparatus of claim 73, configured to decode the unsigned integer from the data stream by using an Exponential-Golomb code.

75. 75. The apparatus of claim 74, configured to decode Exponential-Golomb code parameters for the Exponential-Golomb code from the data stream.

76. 75. The apparatus of claim 74, wherein an exponential-Golomb code parameter for the exponential-Golomb code has a value of 2.

77. 74. The apparatus of claim 73, wherein the inverse mapping rule maps unsigned integers to signed integers such that even and odd unsigned integers are each mapped onto separate ones of signed integers less than and greater than zero, zero is mapped onto zero, and for each signed integer, a first signed integer mapped onto the respective unsigned integer is greater than or equal to a second signed integer mapped onto a succeeding unsigned integer of the respective unsigned integer.

78. In the reverse mapping rule, [0010] 78. The apparatus of claim 77, wherein an unsigned integer Iu is mapped to a signed integer Is according to:

79. 79. The apparatus of claim 69, configured to decode the third difference from the data stream by multi-valuing the number from a second binary sequence of one or more second bins via a second binarization code and context-adaptive binary arithmetic decoding the one or more second bins.

80. 80. The apparatus of any one of claims 60 to 79, configured to decode the predetermined integer value from the data stream via a fourth variable length code [A3].

81. 81. An apparatus according to any one of claims 60 to 80, configured to decode the predetermined integer value from the data stream via an Exponential-Golomb Code.

82. 82. The apparatus of claim 81 configured to decode Exponential-Golomb code parameters for the Exponential-Golomb code from the data stream.

83. Decoding the second unsigned integer via a fifth variable length code [A7]; 83. An apparatus according to any one of claims 60 to 82, configured to decode the predetermined integer value from the data stream by retrieving the predetermined integer value by inverse mapping from the second unsigned integer according to further defined inverse mapping rules.

84. 84. The apparatus of claim 83, configured to decode the unsigned integers from the data stream by using Exponential-Golomb codes.

85. 85. The apparatus of claim 84, configured to decode Exponential-Golomb code parameters for the Exponential-Golomb code from the data stream.

86. 85. The apparatus of claim 84, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

87. 87. The apparatus of claim 83, wherein the inverse mapping rule maps unsigned integers to signed integers such that even and odd unsigned integers are each mapped onto separate ones of signed integers less than and greater than zero, zero is mapped onto zero, and for each signed integer, a first signed integer mapped onto the respective unsigned integer is greater than or equal to a second signed integer mapped onto a succeeding unsigned integer of the respective unsigned integer.

88. In the reverse mapping rule, [0025] 87. An apparatus as claimed in any one of claims 83 to 86, wherein an unsigned integer Iu is mapped to a signed integer Is according to:

89. 82. The apparatus of claim 60, configured to decode the predetermined integer value from the data stream by multi-valuing the number from a third binary sequence in one or more third bins using a third binarization code and performing context-adaptive binary arithmetic decoding of the one or more third bins.

90. 90. The apparatus of any one of claims 60 to 89, configured to encode the first difference into the data stream by using a sixth variable length code [A4].

91. 91. The apparatus of any one of claims 60 to 90, configured to decode the first difference from the data stream via an Exponential-Golomb Code.

92. 92. The apparatus of claim 91 configured to decode Exponential-Golomb code parameters for the Exponential-Golomb code from the data stream.

93. 93. The apparatus of claim 92, wherein the Exponential-Golomb Code parameter is one of a value in a range of 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

94. 92. The apparatus of claim 91, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

95. 95. The apparatus of claim 60, configured to decode the first difference from the data stream by multi-valuing the number from a fourth binary sequence of one or more fourth bins using a second binarization code and performing context-adaptive binary arithmetic decoding of the one or more fourth bins.

96. 96. The apparatus of any one of claims 60 to 95, configured to decode the second difference from the data stream via a seventh variable length code [A5].

97. 97. The apparatus of any one of claims 60 to 96, configured to decode the second difference from the data stream via an Exponential-Golomb Code.

98. 98. The apparatus of claim 97, configured to decode Exponential-Golomb code parameters for the Exponential-Golomb code from the data stream.

99. 99. The apparatus of claim 98, wherein the Exponential-Golomb Code parameter is one of a value in a range of 0 to 15 and is encoded in the data stream as a 4-bit unsigned integer.

100. 98. The apparatus of claim 97, wherein an Exponential-Golomb Code parameter for the Exponential-Golomb Code has a value of seven.

101. 101. The apparatus of claim 98, wherein the exponential-Golomb code parameters for the exponential-Golomb code for decoding the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for decoding the first difference.

102. 102. The apparatus of claim 101, wherein the exponential-Golomb code parameters for the exponential-Golomb code for decoding the first difference and the second difference are the same as the exponential-Golomb code parameters for the exponential-Golomb code for decoding the predetermined integer value from the data stream.

103. 103. The apparatus of claim 60, configured to decode the second difference from the data stream by multi-valuing the number from a fifth binary sequence of one or more fifth bins via a second binarization code and performing context-adaptive binary arithmetic decoding of the one or more fifth bins.

104. 104. An apparatus according to any one of claims 60 to 103, configured to apply a declustering algorithm to the decoded sequence of integer values.

105. 105. The apparatus of any one of claims 60 to 104, wherein the sequence of integer values ​​is a codebook associated with parameters of a neural network.

106. 106. The apparatus of claim 105, wherein the parameters include one or more of weights, biases, and batch norm parameters of the neural network.

107. 107. The apparatus of claim 60, configured to reconstruct the decoded sequence of integer values ​​into a plurality of floating-point values ​​from the sequence of integer values ​​and a set of quantization levels defined by a floating-point quantization parameter.

108. 108. The apparatus of claim 107, configured to decode, for each of the plurality of floating-point values, a quantization index from the data stream that points to the associated integer value in the sequence of integer values ​​associated with a quantization level to which the respective floating-point value was quantized in accordance with the floating-point quantization parameter.

109. 109. The apparatus of claim 107, wherein the floating-point quantization parameters include a first signed integer quantization parameter and a second unsigned integer parameter.

110. 110. The apparatus of claim 109, configured to encode the first signed integer quantization parameter into the data stream, and wherein the second unsigned integer parameter is a fixed value or the apparatus is configured to inherit the second unsigned integer parameter from another sequence of integer values ​​or a set of sequences of integer values.

111. 110. The apparatus of claim 109, configured to encode the first signed integer quantization parameter and the second unsigned integer parameter into the data stream.

112. 109. The apparatus of claim 108, configured to decode the quantization index from the data stream based on a rank difference between a first rank of the position of the associated integer value in the sequence of integer values ​​and a rank of the predetermined position.

113. 109. The apparatus of claim 108, configured to decode the rank difference from the data stream via an eighth variable length code.

114. 109. The apparatus of claim 108, configured to decode the rank difference from the data stream via an Exponential-Golomb Code.

115. 114. The apparatus of claim 108, configured to decode the rank difference from the data stream by multi-valuing the number from a binary sequence of one or more bins using a binarization code and performing context-adaptive binary arithmetic decoding on the one or more bins.

116. 116. An apparatus according to any one of claims 60 to 115, configured to decode a floating-point quantization parameter from the data stream and to reconstruct the sequence of integer values ​​from quantization levels by applying the floating-point quantization parameter.

117. 117. The apparatus of claim 116, wherein the floating-point quantization parameter defines a quantization step size between the quantization levels.

118. 1. A method for encoding a strictly monotonically ordered sequence of integer values ​​into a data stream, comprising the steps of: encoding a predetermined integer value (C[z]) located at a predetermined position (z) of the sequence of integer values ​​into the data stream; For each position prior to the given position (z) in the sequence of integer values, calculating a first difference between the integer value immediately following each of said locations and the integer value at each of said locations minus one; encoding the first difference into the data stream; For each position located after the predetermined position in the sequence of integer values: calculating a second difference between the integer value at each of the positions and the integer value immediately preceding each of the positions minus one; and encoding the second difference into the data stream.

119. 1. A method for decoding a strictly monotonically ordered sequence of integer values ​​from a data stream, comprising: decoding a predetermined integer value (C[z]) located at a predetermined position (z) of the sequence of integer values ​​from the data stream; For each position prior to the given position in the sequence of integer values, decoding from the data stream a first difference between an integer value immediately following each of the locations and the integer value at each of the locations minus one; For each position located after the predetermined position in the sequence of integer values: and decoding from the data stream a second difference between the integer value at each of the positions and the integer value immediately preceding each of the positions minus one.

120. 120. A computer program having a program code for performing the method according to any one of claims 118 to 119, when the computer program runs on a computer.

Citation Information

Patent Citations

  • How to compress language model using golomb code

    JP2008547116A