Entropy coding combining huffman and golomb-rice coding

By combining Huffman and Golomb-Rice coding for sub-regions based on value thresholds, the method addresses inefficiencies in existing entropy coding, particularly for biomedical signals, enhancing encoding efficiency and reducing codebook size requirements.

WO2026096438A1PCT designated stage Publication Date: 2026-05-07DOLBY LABORATORIES LICENSING CORP
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
DOLBY LABORATORIES LICENSING CORP
Filing Date
2025-10-28
Publication Date
2026-05-07

AI Technical Summary

Technical Problem

Existing entropy coding methods, such as Huffman coding, become inefficient when dealing with large values that occur frequently, particularly in lossless coding applications like biomedical signal encoding, as they require large codebooks and are not optimal for handling frequent large values.

Method used

A method that combines Huffman and Golomb-Rice coding by dividing signals into sub-regions, using Huffman coding for sub-regions with smaller values and Golomb-Rice coding for larger values, with code selection information encoded using differential encoding to optimize bit usage.

Benefits of technology

This approach efficiently handles both small and large values, reducing the need for large codebooks and improving encoding efficiency in lossless coding applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2025052803_07052026_PF_FP_ABST
    Figure US2025052803_07052026_PF_FP_ABST
Patent Text Reader

Abstract

Entropy encoding, comprising dividing a signal into a set of sub-regions, determining a largest absolute sample value in each sub-region, for each sub-region having a largest absolute sample value lower than or equal to a threshold, selecting a Huffman codebook in a set of Huffman codebooks, for each sub-region having a largest absolute sample value greater than the threshold, selecting a Golomb-Rice code from a set of Golomb-Rice codes, generating code selection information including an indication of which Huffman codebook or Golomb-Rice code has been selected for each sub-region, encoding the code selection information into a code selection section of a bitstream, and encoding each sub-region into a signal section of the bitstream using the selected Huffman codebook or Golomb-Rice code.
Need to check novelty before this filing date? Find Prior Art

Description

ENTROPY CODING COMBINING HUFFMAN AND GOLOMB-RICE CODINGCROSS-REFERENCE TO RELATED APPLICATIONS

[0001] The present application claims priority from United States Provisional Patent No. 63 / 713,209, filed on October 29, 2024, and European application EP 24 209 609.7. filed on October 29, 2024, each of which is incorporated herein by reference in its entirety.TECHNICAL FIELD

[0002] The present invention relates generally to entropy coding, and specifically to a method for coding a signal divided into sub-regions.BACKGROUND

[0003] In many coding architectures, the encoding side involves transforming a signal into a transform domain, and then encoding the transform domain representation into a bitstream.

[0004] In the case of audio encoding, the transform domain representation is often divided into sub-bands. The transform domain representation may then be encoded into the bitstream using entropy coding such as Huffman encoding.

[0005] Huffman coding is based on dedicated “codebooks” including a set of codes representing a set of symbols. This type of coding is very efficient for “alphabets” with few symbols, but as the number of symbols increases, the codebooks become very large, making Huffman coding less appropriate.

[0006] In one specific example, Huffman coding with eleven different codebooks is used, and the eleventh codebook is a so called “escape code” configured to handle values larger than the available Huffman codebooks can handle. An appropriate codebook is selected for each subband of the transform domain representation, and the sub-band is encoded using this codebook. The codebook selection itself is also encoded into the bitstream using run-length encoding. The “escape code” solution is appropriate as long as the occurrence of large values is infrequent. However, in situations where large values arc relatively frequent, this solution is less appropriate. In particular, the above approach is inefficient for lossless coding applications.GENERAL DISCLOSURE

[0007] In some coding applications, such as encoding of biomedical signals, lossless coding is desired and sometimes necessary. For such applications, there is a need for an improved entropy encoding approach, more capable of handling frequent occurrence of large values.

[0008] According to a first aspect of the present invention, this and other objects are achieved by a method for entropy encoding a signal, comprising dividing the signal into a set of sub-regions, at least one sub-region including a plurality of samples, wherein the sub-regions are time segments of a time domain signal or frequency bands of a frequency domain signal, for each sub-region, determining a largest absolute sample value of the samples in the sub-region, for each sub-region having a largest absolute sample value lower than or equal to a threshold, selecting a Huffman codebook in a set of Huffman codebooks, each Huffman codebook in the set being associated with a unique numeric coding index, for each sub-region having a largest absolute sample value greater than the threshold, selecting a Golomb-Rice code from a set of Golomb-Rice codes, each Golomb-Rice code in the set being associated with a unique numeric coding index, generating code selection information including an indication of which Huffman codebook or Golomb-Rice code has been selected for each sub-region, encoding each sub-region into a signal section of a bitstream using the selected Huffman codebook or Golomb-Rice code, and encoding the code selection information into a bitstream using a lossless coding technique.

[0009] With this approach, the more optimal Huffman encoding is employed for subregions where it is most effective, i.e. for sub-regions with a LAV below or equal to the threshold. For other sub-regions, with larger LA Vs, Golomb-Rice encoding is employed. In both cases, a plurality of codes may be available, so that a selection needs to be made. The selection is then encoded in the bitstream together with the encoded sub-regions.

[0010] While the benefits of this aspect are primarily associated with sub-regions including a plurality of samples, it is possible that some sub-regions may include only one sample. However, there will always be at least one sub-region with a plurality of samples, and typically, a majority of the sub-regions will include a plurality of samples. In many applications, each sub-region will include a plurality of samples. This applies to all aspects.

[0011] In some embodiments, the code selection information includes the coding index associated with the Huffman codebook or Golomb-Rice code selected for a first sub-region, and for each subsequent sub-region, a difference between a coding index associated with the Huffman codebook or Golomb-Rice code selected for the subsequent sub-region and a coding index associated with the Huffman codebook or Golomb-Rice code selected for the immediately preceding sub-region. This process is referred to as differential encoding, and has proven to be a more effective way to transmit code selection information compared to the more conventional run-length encoding.

[0012] In one, relatively straightforward, approach, the code selection for each sub-region is completed first, and only then is the code selection information generated. In other words, for each sub-region, the code (Huffman or Golomb-Rice) with the lowest bit cost is selected.

[0013] In one such example, the selection of Huffman codebooks and Golomb-Rice codes involves, for each sub-region having a largest absolute sample-value smaller than or equal to the threshold, identifying a subset of Huffman codebooks from the set of Huffman codebooks capable of encoding the largest absolute sample value as a potential Huffman codebook, and selecting a Huffman codebook from the potential Huffman codebooks which requires a smallest number of bits to encode the sub-region, and for each sub-region having a largest absolute sample-value greater than the threshold, selecting a Golomb-Rice code from the set of Golomb- Rice codes which requires a smallest number of bits to encode the sub-region.

[0014] In another, more elaborate, approach, the code selection is made taking the generation of code selection information into account. In other words, a code with a higher bit cost may be selected for a sub-region if the additional cost is offset by a cost reduction for generating (and encoding) the code selection information.

[0015] In one such example, the selection of Huffman codebooks and Golomb-Rice codes involves, for each sub-region having a largest absolute sample- value smaller than or equal to the threshold, identifying a subset of Huffman codebooks from the set of Huffman codebooks capable of encoding the largest absolute sample value as potential codes, for each sub-region having a largest absolute sample-value greater than the threshold, identifying all Golomb-Rice codes in the set of Golomb-Rice codes as potential codes, and, for each sub-region, associating each potential code with a sub-region encoding cost based on a number of bits required to encode the sub-region using the potential code, associating each combination of potential codes which is capable of encoding all sub-regions with a code selection cost based on a number of bits required to generate and encode a code selection information associated with this combination of potential codes, and selecting one combination of potential codes by reducing (e.g. minimizing) a cost function based on the sub-region encoding costs and the code selection costs. In some embodiment, the cost function is reduced by applying a Viterbi algorithm to a trellis diagram populated with the sub-region encoding costs and the code selection costs.

[0016] Note that in the present disclosure, a Huffman codebook may be referred to as a “code”. In other words, each sub-region is encoded using a “code” which may be a Golomb-Rice code or a Huffman codebook.

[0017] A second aspect of the invention relates to a method for entropy decoding a bitstream, comprising receiving the bitstream to obtain a code selection section relating to code selection information and a signal section relating to a set of signal sub-regions, at least one signal sub-region including a plurality of samples, wherein the signal sub-regions are time segments of a time domain signal or frequency bands of a frequency domain signal, , entropy decoding the code selection section to obtain code selection information including an indicationof one of a Huffman codebook and a Golomb-Rice code associated with each of the signal sections, and entropy decoding each signal section using the Huffman codebook or Golomb-Rice code associated with the signal section, thereby obtaining a set of decoded signal sub-regions, together constituting the signal.

[0018] With this approach, a signal which has been encoded according to the first aspect of the present invention may be efficiently decoded. The decoder needs to have access to an extended set of codes, including Huffman codebooks as well as Golomb-Rice codes.

[0019] The code selection information is decoded using the code used in the encoder. For example, Huffman decoding may be applied.

[0020] In some embodiments, a first signal section is associated with a Huffman codebook or Golomb-Rice code indicated by a first value of the code selection information, and each subsequent signal section is associated with a Huffman codebook or Golomb-Rice code indicated by a combination of a subsequent value and an immediately preceding value of the code selection information. The extraction of code indexes in this way may be referred to as differential decoding.

[0021] A third aspect of the invention relates to an encoder for entropy encoding a signal, comprising processing circuitry configured to divide the signal into a set of sub-regions, at least one sub-region including a plurality of samples, wherein the sub-regions are time segments of a time domain signal or frequency bands of a frequency domain signal, for each sub-region, determine a largest absolute sample value of the samples in the sub-region, for each sub-region having a largest absolute sample value lower than or equal to a threshold, select a Huffman codebook in a set of Huffman codebooks, each Huffman codebook in the set being associated with a unique numeric coding index, for each sub-region having a largest absolute sample value greater than the threshold, select a Golomb-Rice code from a set of Golomb-Rice codes, each Golomb-Rice code in the set being associated with a unique numeric coding index, generate code selection information including an indication of which Huffman codebook or Golomb-Rice code has been selected for each sub-region, encode each sub-region into a signal section of a bitstream using the selected Huffman codebook or Golomb-Rice code, and encode the code selection information into a code selection section of the bitstream.

[0022] A fourth aspect of the invention relates to a decoder for entropy decoding a signal, comprising processing circuitry configured to receive a bitstream to obtain a code selection section and a signal section relating to a set of signal sub-regions, at least one signal sub-region including a plurality of samples, wherein the signal sub-regions are time segments of a time domain signal or frequency bands of a frequency domain signal, entropy decode the code selection section to obtain code selection information including an indication of one of aHuffman codebook and a Golomb-Rice code associated with each of the signal sections, and entropy decode each signal section using the Huffman codebook or Golomb-Rice code associated with the signal section, thereby obtaining a set of decoded signal sub-regions, together constituting the signal.

[0023] Further aspects of the present invention relate to computer program products and computer readable mediums having computer program code portions configured to execute the methods of the first two aspects when executed on a computer processor.BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Embodiments of the present invention will be described in more detail with reference to the appended drawings.

[0025] Figure 1 A-B are schematic block illustrations of an architecture for encoding and decoding a signal.

[0026] Figure 2 is a flow chart showing entropy encoding according to an embodiment of the present invention.

[0027] Figure 3 illustrates a trellis-based approach to code selection according to an embodiment of the present invention.

[0028] Figure 4 is a diagram showing naive code selection versus the trellis-based approach in figure 3.

[0029] Figure 5 is a flow chart showing entropy decoding according to an embodiment of the present invention.DETAILED DESCRIPTION

[0030] Embodiments of the present invention will be described in the following with reference to an example encoding and decoding architecture. It is noted that the invention is not limited to this particular architecture. On the contrary, entropy coding according to embodiments of the present invention may be useful for encoding and decoding any signal, and is particularly useful in any lossless coding architecture.

[0031] Systems and methods disclosed in the present application may be implemented as software, firmware, hardware or a combination thereof. In a hardware implementation, the division of tasks does not necessarily correspond to the division into physical units: to the contrary, one physical component may have multiple functionalities, and one task may be carried out by several physical components in cooperation.

[0032] The computer hardware may for example be a server computer, a client computer, a personal computer (PC), a tablet PC, a set-top box (STB), a personal digital assistant (PDA), acellular telephone, a smartphone, a web appliance, a network router, switch or bridge, or any machine capable of executing instructions (sequential or otherwise) that specify actions to be taken by that computer hardware. Further, the present disclosure shall relate to any collection of computer hardware that individually or jointly execute instructions to perform any one or more of the concepts discussed herein.

[0033] Certain or all components may be implemented by one or more processors that accept computer-readable (also called machine-readable) code containing a set of instructions that when executed by one or more of the processors carry out at least one of the methods described herein. Any processor capable of executing a set of instructions (sequential or otherwise) that specify actions to be taken are included. Thus, one example is a typical processing system (i.e. a computer hardware) that includes one or more processors. Each processor may include one or more of a CPU, a graphics processing unit, and a programmable DSP unit. The processing system further may include a memory subsystem including a hard drive, SSD, RAM and / or ROM. A bus subsystem may be included for communicating between the components. The software may reside in the memory subsystem and / or within the processor during execution thereof by the computer system.

[0034] The one or more processors may operate as a standalone device or may be connected, e.g., networked to other processor(s). Such a network may be built on various different network protocols, and may be the Internet, a Wide Area Network (WAN), a Local Area Network (LAN), or any combination thereof.

[0035] The software may be distributed on computer readable media, which may comprise computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to a person skilled in the art, the term computer storage media includes both volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, physical (non-transitory) storage media in various forms, such as EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, it is well known to the skilled person that communication media (transitory) typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.System overview

[0036] The encoding system 1 in figure 1 A is arranged to encode a signal x(n) and comprises transform unit 2 and a subsequent entropy encoding unit 3. The decoding system 4 in figure IB is arranged to decode a bitstream and comprises an entropy decoder 5 and an inverse transform unit 6.

[0037] The signal x(n) is a data signal comprising a sequence of samples representing data, for example audio data or biomedical measurement data. For example, the signal x is a time domain signal, e.g., a time domain audio signal or a time domain biomedical signal. A time domain audio signal comprises a plurality of audio samples, wherein each sample is separated in time from its neighboring samples. A time domain biomedical signal may comprise a sequence of samples indicating biomedical data that varies over time.

[0038] The encoding system may for example be implemented in a biomedical measurement device, configured to detect biomedical data. The decoding system 4 may be implemented in a biomedical monitoring device, configured to receive the biomedical data. A biomedical signal in the context of the present disclosure may be a signal that relates to physiological information, and the signal may be electrical, physical or biochemical. The biomedical signal may relate to biological systems and conditions, examples of which may include Electrocardiography (ECG) data, Electroencephalography (EEG) data, Electromyography (EMG) data, and Photoplethysmogram (PPG) data, or signals for blood sugar level, heart rate, body temperature, respiratory rate and oxygen saturation. Further, a biomedical signal may comprise one or more channels of time domain biomedical signal samples. In other examples, the biomedical signals may relate to muscle and / or skin measurements. Any other medical signal and / or physical response would also be understood to be comprised by this definition.

[0039] As another example, the samples of the signal x(n) are distributed along a spatial dimension with each sample indicating a property at a position in space. For example, the signal x(n) may represents an image with each sample representing a value (e.g. color, brightness, etc.) associated with an individual pixel of that image.

[0040] The transform unit 2 is configured to transform the signal x(n) into a transform domain representation y. If the encoding is lossless, the transform unit 2 may perform an integer invertible transform. For example, the integer discrete transform T may be a discrete Fourier transform (intDFT) or an integer discrete trigonometric transform (intDTT) such as an integer discrete cosine transform of type II (intDCT-II) or an integer discrete sine transform of type II (intDST-II) extracted as disclosed in U.S. Provisional Patent Application No. 63 / 713,197, titled “Methods and Systems for Integer Invertible Discrete Trigonometric Transforms”, filed by Applicants Dolby Laboratories Licensing Corporation and Dolby International AB on October29, 2024, naming Lars Villemoes and Mark S. Vinton as inventors, which is herewith incorporated by reference in its entirety.

[0041] The representation y is encoded with an entropy encoder 3 prior to being included in the bitstream B. The operation of the entropy encoder 3 will be discussed in more detail below.

[0042] On the decoder side, the entropy decoder 5 is configured to decode the bitstream to provide the transform representation y. Further, the inverse transform unit 6 is configured to perform an inverse transformation T1to recreate a version x’(n') of the original data signal x(n). If the transformation T is deterministic and integer invertible the recreated version x’(n) of the original signal x(rt) may be a perfect (lossless) recreation of the original signal x(n). That is x( i) = x'( ). However, it is also envisaged that in order to conserve data and / or reduce the bitrate various lossy transformations may be derived from the lossless transformation. For example, the transform domain samples y(n) output by the transform T may be quantized or approximated using parameters in the encoder. On the decoder side, the quantized and / or parameter approximated representation of the samples y(ji) may be dequantized or recreated from the parameters, wherein the quantization / dequantization process and parameter reconstruction are lossy processes.

[0043] The encoding and decoding systems 1, 4 of figures 1A-B may be implemented in a wide variety of devices, ranging from high-performance network servers (e.g. in the cloud) to more computationally constrained devices such as laptops, tablets, smartphones, smartwatches or any loT device or wireless sensor. There is therefore a need for implementing the transformation unit 2 and inverse transformation unit 6 in computationally efficient manners to allow the decoding and encoding units to reduce processing latency and / or reduce power consumption. Entropy coding

[0044] There are a few well-known techniques for entropy coding. Huffman coding is often used for entropy coding, and can be configured to provide near optimal performance for a known distribution, but requires storage of large tables of codes for a set of codebooks. The larger the values to be coded, the more storage space is required. Golomb- Rice codes, on the other hand, are capable of encoding large values without requiring large storage space, and are defined by a parameter M. An input value x is separated into a quotient q = |^| and a remainder r = x - q2M. The code is then generated by a sequence of q ones, followed by a separating zero, followed by the remainder r as an M-bit word. For example, the number 35 coded with parameter the code is 11,0,0011.

[0045] According to embodiments of the present invention, a set of Huffman codebooks, each associated with a unique numeric code index, is combined with a set of Golomb- Rice codes, also each associated with a unique numeric code index. One example of an “expanded” set of codes is shown in table 1. The set of codes includes a first entry with code index zero, representing “no code”. This code may be used for sub-regions where all samples arc zero. For a sub-region encoded with the “no code”, the decoder will simply fill the decoded sub-region with zeroes. The “no code” entry is followed by a set of Huffman codebooks and a set of Golomb- Rice codes. In this case, the set of Huffman codebooks includes ten codebooks, associated with indexes 1 through 10, while the set of Golomb-Rice codes includes 12 codes, associated with indexes 11-22. The ten Huffman codebooks (index 1-10) have varying LAV, ranging from 1 up to 12, and a dimension of two or four. Some include coding of sign (i.e., “signed” codebooks). Finally, the Huffman codebooks have varying codebook size, ranging from 81 to 169 entries. The twelve Golomb-Rice codes (index 11-22) have coding parameters M ranging from 2 to 13. It is noted that some Huffman codebooks are “signed” indicating that they are able to encode the sign (positive or negative) of an encoded value. The remaining Huffman codebooks, as well as all Golomb-Rice codes, are not “signed”, i.e. they are unable to encode the sign of the value. For unsigned Huffman codebooks, and for Golomb-Rice codes, the sign bit is removed and transmitted separately, possibly after appropriate encoding.Table 1: Codebook type, LAV, Codebook dimension, signed / unsigned codebook, and codebook size for each codebook index

[0046] The entropy encoding performed by entropy encoder 3 will now be discussed with reference to figure 2. It is noted that in the implementation in figures 1A-B, the original signal x is first transformed into a coding domain representation y before being entropy encoded. In other implementations, the transform domain representation is further processed before entropy encoding. For example, processing to provide prediction values and residual values may be performed. One example of such processing is disclosed in U.S. Provisional Patent Application No. 63 / 713,216, titled “Methods and Devices for Encoding and Decoding Signals”, filed by Applicant Dolby International AB on October 29, 2024, naming Harald Mundt as inventor, which is herewith incorporated by reference in its entirety. In yet other implementations, there is no transform, and it is an original signal that is entropy encoded. However, the entropy encoding may be substantially the same.

[0047] In a first step SI, the signal is divided into sub-regions, e.g., time segments of a time-domain signal, or sub-bands of a frequency domain signal. If the signal is an original signal, representing e.g. measured data, it will typically be a time-domain signal, divided into frames. Each sub-region may then be a segment of a time domain frame. If, on the other hand, an original signal has been transformed into a transform domain representation (as shown in figure 1A) then the signal will typically be in a frequency domain (or some more elaborate transform domain), including a frequency domain spectrum for each frame. Each sub-region may then be a sub-band of a spectrum. For example, the sub-regions may correspond to an existing division of the transform domain spectrum into sub-bands known as scale-factor bands.

[0048] As an example, a frame with 2048 time domain samples may be divided into 64 equally long segments (sub-regions) of 32 time domain samples each, while a spectrum including 2048 frequency domain samples may be divided into 64 equally broad sub-bands (subregions) of 32 frequency domain samples each. In such a case, each sub-region will include a plurality of samples.

[0049] Alternatively, a frame / spectrum may be divided into sub-regions of non-uniform number of samples. This may be the case for perceptually motivated coding, such as audio coding, where some frequency sub-bands of the transform domain representation (e.g., lower frequency bands) require finer resolution to more accurately code more perceptually relevant information. In this case it is possible that a specific sub-region (e.g. a specific scale factor band of a frequency spectrum) includes only one sample. However, a majority of the sub-regions will typically include a plurality of samples.

[0050] In the next step S2, a largest absolute value, LAV, is determined for each subregion, and each LAV is compared to a threshold representing the largest LAV which can be encoded by the Huffman codebooks. In the case of the codes listed in table 1, the threshold is 12, i.e. the LAV of the Huffman codebooks with index 9 and 10. For each sub-region having a LAV smaller than or equal to the threshold, the sub-region is encoded by a sub-set of Huffman codebooks in the set of Huffman codebooks capable of encoding the LAV. For example, in table 1, a value 7 will be encoded by Huffman codebooks having index 7-10. For each sub-region having a LAV greater than the threshold, the sub-region is encoded by all Golomb-Rice codes in the set of Golomb-Rice codes.

[0051] In step S3, one code (Huffman codebook or Golomb-Rice code) is selected for each sub-region. In a simple approach, the code with the smallest number of bits required to encode the sub-region without distortion is selected. More elaborate selection principles are possible, and one example will be discussed below.

[0052] A code selection information is formed in step S4 by a sequence of the numeric coding indexes associated with the selected code for each sub-region.

[0053] In step S5, the code selection information is encoded into the bitstream B using an appropriate lossless coding mechanism. The encoded code selection information is placed in a code selection section of the bitstream, in a similar way as the signal sections. The code selection section may be transmitted (and received) before the signal sections, to allow a decoder to determine how the signal sections should be decoded.

[0054] The code selection information may be encoded using run-length encoding followed by Huffman encoding.

[0055] In a specific embodiment, the code selection information is differentially encoded in step S5. In this case, the code selection information for the first (0th) sub-region, is transmitted as the code index, ho, associated with this sub-region. The code selection information for each subsequent sub-region is transmitted as the difference between the code index hnof that subregion and code index hn-i of the previous sub-region:Alin — hn " hn-1 (1) where / zKis the differentially coded code selection, hnis the index of the code selection for subregion n, and hn-i is the index of the code selection for sub-region n-1. The differentially coded code selection information for n sub-regions is thus ho Ahi Ahi ... Ahn-i. The differentially coded code selection information is then encoded using Huffman coding, for example using a single dimension Huffman codebook with 45 codes.

[0056] In step S6, each sub-region is encoded into the bitstream B using the selected code for that particular sub-region. The encoded sub-regions are placed in a signal section of thebitstream. In some implementations, the sub-regions have pre-defined length which is known by encoder and decoder. This predefined length may be frame-length dependent. However, in other implementations, the length of each sub-region is variable, and an indication of the length of each sub-region is encoded into the bitstream to enable the decoder to decode the signal section. Whether or not the sub-region lengths arc signaled in the bitstream may depend on whether or not the encoder / decoder are operating in lossy or lossless mode.

[0057] Finally, in step S7, the encoded bitstream is transmitted to a receiver where it is decoded to reconstruct the original signal.Cost-efficient code selection

[0058] Returning to the selection of codes in step S3, it was mentioned above that one approach to selecting one code among the subset of potential codes is to simply select the code which can encode the sub-region with the smallest number of bits without distorting any of the values in the sub-region. However, this would not provide an efficient encoding as it does not include the cost for transmitting the code selection information.

[0059] With reference to figure 3, a more elaborate approach for selecting the codebooks for all sub-regions can be derived using a trellis-based approach. For example, the Viterbi algorithm can be used as follows:

[0060] First, a trellis 11 with K by N nodes 12 is generated, where K is the number of possible codes (in this case 0-22, i.e., 23 codes) and N is the number of sub-regions (for example 64 32-sample segments of a 2048 sample frame). Each node 12 is then populated with the cost dfn( j of using code k for sub-region n, i.e., one cost for each one of the K codes in each of the N sub-regions. If the LAV of a Huffman codebook is less than the maximum absolute value in the sub-region, then the cost is infinite (i.e., the codebook may not be used).

[0061] The cost F(k — j) associated with traversing between node j of the n-1*1' sub-region to node / < t he nthsub-region node is the number of additional bits required to transmit the code selection information, for example the cost for differential Huffman encoding of a traverse from j to k.

[0062] For each node 12 in the trellis 11, all the possible paths to that node are evaluated and only the least expensive path is kept. Traversing the entire trellis provides the least expensive combination of codes for encoding all N sub-regions, also taking into account the cost associated with transmitting the code selection information for this combination of codes.

[0063] The least expensive cost to each node in the trellis is given by:where Ck nis the minimum cost to traverse to node k for the nthsub-region, 7fn( ) is the bitcost of using code k for the nthsub-region, the minimum cost to traverse to node j for the n — 1 sub-region, and F(k — j) is the bit-cost of transmitting code index k after code index j (the additional cost for differential Huffman encoding the traversal from code index j to code index k).

[0064] Figure 4 shows a comparison of the code selection based on a naive approach (solid line) that simply chooses the least expensive code for each sub-region versus the more cost effective selection of the codes for each sub-region (dashed line) using the trellis-based Viterbi approach outlined above. It is clear that the Viterbi approach results in fewer jumps between code indexes, indicating that an increase in sub-region encoding cost is offset by a saving in cost for differential encoding of the code selection information.Entropy decoding

[0065] Decoding of the encoded bitstream B will now be described, with reference to figure 5.

[0066] First, in step S 11 , the bitstream B is received and separated into a code selection section and a signal section. In some implementations, the length of each sub-region is predefined, and known to the decoder. In other implementations, the bitstream includes an indication of how each frame is divided into sub-regions. In either case, the decoder knows how many samples each decoded sub-region should include.

[0067] In step SI 2, the code selection section is entropy decoded using the coding mechanism used in the encoder, i.c., in this case Huffman decoding, to obtain the differentially coded code selection information. In step SI 3, the differentially coded code selection information is processed to generate a set of code indexes, one for each sub-region. The code index indicates one of a Huffman codebook and a Golomb-Rice code in a set of codes, e.g., the set in table 1.

[0068] In step S14, the signal section of the bitstream is decoded, one sub-region at a time, using the Huffman codebook or Golomb-Rice code indicated by the code index associated with this sub-region, to obtain a set of decoded signal sub-regions, together constituting the signal. The decoder applies the code (Huffman or Golomb-Rice) associated with a particular sub-region until all values of that sub-region have been decoded. The decoder then proceeds with the subsequent sub-region, using the code (Huffman or Golomb-Rice) associated with that subregion.

[0069] Finally, in step SI 5, the set of decoded signal sub-regions may be assembled to form the complete signal. It is noted that in an implementation as shown in figures 1 A-B, the entropy decoded signal is a transform of the original signal, and in that case the entropy decodingin figure 5 will need to be combined with an inverse transform. In that case, a plurality of decoded signal sub-regions will be assembled to form one frame of the transform domain representation y, before the inverse transform is applied.

[0070] It is also possible that there will be additional processing performed between the entropy decoding and the inverse transform. In other words, the signal provided to the inverse transform is not necessarily the entropy decoded signal, but may be a derived signal resulting from intermediate processing. One example of such processing is disclosed in U.S. Provisional Patent Application No. 63 / 713,216, titled “Methods and Devices for Encoding and Decoding Signals”, filed by Applicant Dolby International AB on October 29, 2024, naming Harald Mundt as inventor, which is herewith incorporated by reference in its entirety.Generalizations

[0071] Unless specifically stated otherwise, as apparent from the following discussions, it is appreciated that throughout the disclosure discussions utilizing terms such as “processing”, “computing”, “calculating”, “determining”, “analyzing” or the like, refer to the action and / or processes of a computer hardware or computing system, or similar electronic computing devices, that manipulate and / or transform data represented as physical, such as electronic, quantities into other data similarly represented as physical quantities.

[0072] It should be appreciated that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects he in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention. Furthermore, while some embodiments described herein include some, but not other features included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention, and form different embodiments, as would be understood by those skilled in the art. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0073] Furthermore, some of the embodiments are described herein as a method or combination of elements of a method that can be implemented by a processor of a computer system or by other means of carrying out the function. Thus, a processor with instructions for carrying out such a method or element of a method forms a means for carrying out the method orelement of a method. Note that when the method includes several elements, e.g., several steps, no ordering of such elements is implied, unless specifically stated. Furthermore, an element described herein of an apparatus embodiment is an example of a means for carrying out the function performed by the element for the purpose of carrying out the embodiments of the invention. In the description provided herein, numerous specific details arc set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In other instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

[0074] The person skilled in the art realizes that the present invention by no means is limited to the preferred embodiments described above. On the contrary, many modifications and variations are possible within the scope of the appended claims. For example, and as indicated above, the entropy encoding / decoding disclosed herein may be combined with (preceded by or succeeded by) appropriate signal transforms. Also, the division of the input signal in step SI may be more elaborate than a division into equal segments. For example, portions of the input signal with small amplitude variation may be included in a relatively larger sub-region.

[0075] The present invention will be further understood by the following list of enumerated exemplary embodiments (EEEs):EEE1. A method for entropy encoding a signal, comprising: dividing the signal into a set of sub-regions; for each sub-region, determining a largest absolute sample value in the sub-region; for each sub-region having a largest absolute sample value lower than or equal to a threshold, selecting a Huffman codebook in a set of Huffman codebooks, each Huffman codebook in the set being associated with a unique numeric coding index; for each sub-region having a largest absolute sample value greater than the threshold, selecting a Golomb-Rice code from a set of Golomb-Rice codes, each Golomb-Rice code in the set being associated with a unique numeric coding index; generating code selection information including an indication of which Huffman codebook or Golomb-Rice code has been selected for each sub-region; encoding the code selection information into a code selection section of a bitstream; and encoding each sub-region into a signal section of the bitstream using the selected Huffman codebook or Golomb- Rice code.EEE2. The method according to claim EEE1, wherein the code selection information includes: the coding index associated with the Huffman codebook or Golomb-Rice codeselected for a first sub-region, and for each subsequent sub-region, a difference between a coding index associated with the Huffman codebook or Golomb-Rice code selected for the subsequent sub-region and a coding index associated with the Huffman codebook or Golomb-Rice code selected for the immediately preceding sub-region.EEE3. The method according to claim EEE1 or EEE2, wherein the code selection information is encoded into the bitstream using Huffman encoding.EEE4. The method according to one of EEE 1-3, wherein the selection of Huffman codebooks and Golomb-Rice codes involves: for each sub-region having a largest absolute sample- value smaller than or equal to the threshold, identifying a subset of Huffman codebooks from the set of Huffman codebooks capable of encoding the largest absolute sample value as a potential Huffman codebook, and selecting a Huffman codebook from the potential Huffman codebooks which requires a smallest number of bits to encode the sub-region, and for each sub-region having a largest absolute sample-value greater than the threshold, selecting a Golomb-Rice code from the set of Golomb- Rice codes which requires a smallest number of bits to encode the sub-region.EEE5. The method according to one of EEEs 1-3, wherein the selection of Huffman codebook or Golomb-Rice code for each sub-region is performed taking the generation of code selection information into account.EEE6. The method according to EEE5, wherein the selection of Huffman codebooks and Golomb-Rice codes involves: for each sub-region having a largest absolute sample-value smaller than or equal to the threshold, identifying a subset of Huffman codebooks from the set of Huffman codebooks capable of encoding the largest absolute sample value as potential codes; and for each sub-region having a largest absolute sample- value greater than the threshold, identifying all Golob-Rice codes in the set of Golomb-Rice codes as potential codes; for each sub-region, associating each potential code with a sub-region encoding cost based on a number of bits required to encode the sub-region using the potential code; associating each combination of potential codes which is capable of encoding all sub-regions with a code selection cost based on a number of bits required to generate and encode code selection information associated with this combination of potential codes; and selecting one combination of potential codes by minimizing a cost function based on the sub-region encoding costs and the code selection costs.EEE7. The method according to any one of the preceding EEEs, further comprising transforming the signal using a lossless transform before the dividing step.EEE8. The method according to EEE7, wherein the lossless transform is an integer invertible transform.EEE9. The method according to any one of the preceding EEEs, wherein the sub-regions are time segments of a time domain signal.EEE10. The method according to any one of EEEs 1 - 8, wherein the sub-regions arc frequency bands of a frequency domain signal.EEE11. A method for entropy decoding a bitstream, comprising: receiving the bitstream to obtain a code selection section relating to code selection information and a signal section relating to a set of signal sub-regions; entropy decoding the code selection section to obtain code selection information including an indication of one of a Huffman codebook and a Golomb-Rice code associated with each signal sub-region; and entropy decoding each signal sub-region using the Huffman codebook or Golomb- Rice code associated with the signal sub-region, thereby obtaining a set of decoded signal subregions, together constituting the signal.EEE12. The method according to EEE11 , wherein the code selection information is decoded using Huffman decoding.EEE13. The method according to EEE 11 or 12, wherein a first signal sub-region is associated with a Huffman codebook or Golomb-Rice code indicated by a first value of the code selection information, and each subsequent signal sub-region is associated with a Huffman codebook or Golomb-Rice code indicated by a combination of a subsequent value of the code selection information and an immediately preceding value of the code selection information.EEE 14. The method according to any one of EEEs 11 - 13, further comprising transforming the decoded signal sub-regions using a lossless transform.EEE15. The method according to EEE 14, wherein the lossless transform is an integer invertible transform.EEE 16. The method according to any one of EEEs 11 - 15, wherein the decoded signal sub-regions are time segments of a time domain signal.EEE17. The method according to any one of EEEs 1 1 - 15, wherein the decoded signal subregions are frequency bands of a frequency domain signal.EEE18. The method according to any one of EEEs 11 - 17, wherein a length of each signal sub-region is predefined.EEE 19. The method according to any one of EEEs 11 - 17, wherein a length of each signal sub-region is indicated in the bitstream.EEE20. An encoder for entropy encoding a signal, comprising processing circuitry configured to: divide the signal into a set of sub-regions; for each sub-region, determine a largest absolute sample value in the sub-region; for each sub-region having a largest absolute sample value lower than or equal to a threshold, select a Huffman codebook in a set of Huffman codebooks, each Huffman codebook in the set being associated with a unique numeric coding index; for each sub-region having a largest absolute sample value greater than the threshold, select a Golomb-Rice code from a set of Golomb-Rice codes, each Golomb-Rice code in the set being associated with a unique numeric coding index; generate code selection information including an indication of which Huffman codebook or Golomb-Rice code has been selected for each sub-region; encode the code selection information into a code selection section of a bitstream; and encode each sub-region into a signal section of the bitstream using the selected Huffman codebook or Golomb-Rice code.EEE21. A decoder for entropy decoding a signal, comprising processing circuitry configured to: receive a bitstream to obtain a code selection section relating to code selection information and a signal section relating to a set of signal sub-regions; entropy decode the code selection section to obtain code selection information including an indication of one of a Huffman codebook and a Golomb-Rice code associated with each signal sub-regions; and entropy decode each signal sub-region using the Huffman codebook or Golomb- Rice code associated with the signal sub-region, thereby obtaining a set of decoded signal subregions, together constituting the signal.EEE22. A computer program product comprising computer program code portions configured to perform the method according to one of EEEs 1-10 when executed on a computer processor.EEE23. A computer program product comprising computer program code portions configured to perform the method according to one of EEEs 11-19 when executed on a computer processor.EEE24. A computer readable media storing computer program code portions configured to perform the method according to one of EEEs 1-10 when executed on a computer processor.EEE25. A computer readable media storing computer program code portions configured to perform the method according to one of EEEs 11-19 when executed on a computer processor.

Claims

CLAIMS1. A method for entropy encoding a signal, comprising: dividing the signal into a set of sub- regions, at least one sub-region including a plurality of samples; wherein the sub-regions are time segments of a time domain signal or frequency bands of a frequency domain signal; for each sub-region, determining a largest absolute sample value of the samples in the sub-region; for each sub-region having a largest absolute sample value lower than or equal to a threshold, selecting a Huffman codebook in a set of Huffman codebooks, each Huffman codebook in the set being associated with a unique numeric coding index; for each sub-region having a largest absolute sample value greater than the threshold, selecting a Golomb-Rice code from a set of Golomb-Rice codes, each Golomb-Rice code in the set being associated with a unique numeric coding index; generating code selection information including an indication of which Huffman codebook or Golomb-Rice code has been selected for each sub-region; encoding the code selection information into a code selection section of a bitstream; and encoding each sub-region into a signal section of the bitstream using the selected Huffman codebook or Golomb- Rice code.

2. The method according to claim 1, wherein the code selection information includes: the coding index associated with the Huffman codebook or Golomb-Rice code selected for a first sub-region, and for each subsequent sub-region, a difference between a coding index associated with the Huffman codebook or Golomb- Rice code selected for the subsequent sub-region and a coding index associated with the Huffman codebook or Golomb-Rice code selected for the immediately preceding sub-region.

3. The method according to claim 1 or 2, wherein the code selection information is encoded into the bitstream using Huffman encoding.

4. The method according to one of claims 1-3, wherein the selection of Huffman codebooks and Golomb-Rice codes involves: for each sub-region having a largest absolute sample- value smaller than or equal to thethreshold: identifying a subset of Huffman codebooks from the set of Huffman codebooks capable of encoding the largest absolute sample value as a potential Huffman codebook, and selecting a Huffman codebook from the potential Huffman codebooks which requires a smallest number of bits to encode the sub-region; and for each sub-region having a largest absolute sample-value greater than the threshold: selecting a Golomb-Rice code from the set of Golomb-Rice codes which requires a smallest number of bits to encode the sub-region.

5. The method according to one of claims 1-3, wherein the selection of Huffman codebook or Golomb-Rice code for each sub-region is perfomred taking the generation of code selection information into account.

6. The method according to claim 5, wherein the selection of Huffman codebooks and Golomb-Rice codes involves: for each sub-region having a largest absolute sample-value smaller than or equal to the threshold, identifying a subset of Huffman codebooks from the set of Huffman codebooks capable of encoding the largest absolute sample value as potential codes; and for each sub-region having a largest absolute sample-value greater than the threshold, identifying all Golob-Rice codes in the set of Golomb-Rice codes as potential codes; for each sub-region, associating each potential code with a sub-region encoding cost based on a number of bits required to encode the sub-region using the potential code; associating each combination of potential codes which is capable of encoding all subregions with a code selection cost based on a number of bits required to generate and encode code selection information associated with this combination of potential codes; and selecting one combination of potential codes by minimizing a cost function based on the sub-region encoding costs and the code selection costs.

7. The method according to any one of the preceding claims, further comprising transforming the signal using a lossless transform before the dividing step.

8. The method according to claim 7, wherein the lossless transform is an integer invertible transform.

9. A method for entropy decoding a bitstream, comprising: receiving the bitstream to obtain a code selection section relating to code selection information and a signal section relating to a set of signal sub-regions, at least one signal subregion including a plurality of samples; wherein the signal sub-regions arc time segments of a time domain signal or frequency bands of a frequency domain signal; entropy decoding the code selection section to obtain code selection information including an indication of one of a Huffman codebook and a Golomb-Rice code associated with each signal sub-region; and entropy decoding each signal sub-region using the Huffman codebook or Golomb-Rice code associated with the signal sub-region, thereby obtaining a set of decoded signal sub-regions, together constituting the signal.

10. The method according to claim 9, wherein the code selection information is decoded using Huffman decoding.

11. The method according to claim 9 or 10, wherein a first signal sub-region is associated with a Huffman codebook or Golomb-Rice code indicated by a first value of the code selection information, and each subsequent signal sub-region is associated with a Huffman codebook or Golomb- Rice code indicated by a combination of a subsequent value of the code selection information and an immediately preceding value of the code selection information.

12. The method according to any one of claims 9 - 11, further comprising transforming the decoded signal sub-regions using a lossless transform.

13. The method according to claim 12, wherein the lossless transform is an integer invertible transform.

14. The method according to any one of claims 9 - 13, wherein a length of each signal sub-region is predefined.

15. The method according to any one of claims 9 - 13, wherein a length of each signal sub-region is indicated in the bitstream.

16. An encoder for entropy encoding a signal, comprising processing circuitry configured to: divide the signal into a set of sub-regions, at least one sub-region including a plurality of samples; wherein the sub-regions are time segments of a time domain signal or frequency bands of a frequency domain signal; for each sub-region, determine a largest absolute sample value of the samples in the subregion; for each sub-region having a largest absolute sample value lower than or equal to a threshold, select a Huffman codebook in a set of Huffman codebooks, each Huffman codebook in the set being associated with a unique numeric coding index; for each sub-region having a largest absolute sample value greater than the threshold, select a Golomb-Rice code from a set of Golomb-Rice codes, each Golomb-Rice code in the set being associated with a unique numeric coding index; generate code selection information including an indication of which Huffman codebook or Golomb-Rice code has been selected for each sub-region; encode the code selection information into a code selection section of the bitstream; and encode each sub-region into a signal section of a bitstream using the selected Huffman codebook or Golomb-Rice code.

17. A decoder for entropy decoding a signal, comprising processing circuitry configured to: receive a bitstream to obtain a code selection section relating to code selection information and a signal section relating to a set of signal sub-regions, at least one signal subregion including a plurality of samples; wherein the signal sub-regions are time segments of a time domain signal or frequency bands of a frequency domain signal; entropy decode the code selection section to obtain code selection information including an indication of one of a Huffman codebook and a Golomb-Rice code associated with each signal sub-regions; and entropy decode each signal sub-region using the Huffman codebook or Golomb-Rice code associated with the signal sub-region, thereby obtaining a set of decoded signal sub-regions, together constituting the signal.

18. A computer program product comprising computer program code portions configured to perform the method according to one of claims 1-8 when executed on a computer processor.

19. A computer program product comprising computer program code portions configured to perform the method according to one of claims 9- 15 when executed on a computer processor.

20. A non-transitory, computer readable media storing computer program code portions configured to perform the method according to one of claims 1-8 when executed on a computer processor.

21. A non-transitory computer readable media storing computer program code portions configured to perform the method according to one of claims 9-15 when executed on a computer processor.

Citation Information

Patent Citations

  • Sand control screen assemblies and associated methods of manufacturing

    US62637131P0

  • Method of encoding of data stream, method of decoding of data stream, and devices for implementation of said methods

    US10127913B1

  • Audio encoding apparatus and method, and audio decoding apparatus and method

    US20170316786A1

  • US202463713216P