WO2000036753A1 - Multi-level run length coding for frequency-domain audio coding - Google Patents

Multi-level run length coding for frequency-domain audio coding Download PDF

Info

Publication number
WO2000036753A1
WO2000036753A1 PCT/US1999/029107 US9929107W WO0036753A1 WO 2000036753 A1 WO2000036753 A1 WO 2000036753A1 US 9929107 W US9929107 W US 9929107W WO 0036753 A1 WO0036753 A1 WO 0036753A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence
audio
entropy
code
input
Prior art date
Application number
PCT/US1999/029107
Other languages
French (fr)
Inventor
Wei-Ge Chen
Ming-Chieh Lee
Original Assignee
Microsoft Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Microsoft Corporation filed Critical Microsoft Corporation
Publication of WO2000036753A1 publication Critical patent/WO2000036753A1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/46Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind

Definitions

  • the present invention relates to setting one or more thresholds to divide an input signal into multiple regions, and applying entropy encoding to encode a variable length first region with a variable length entropy code, and applying a second coding method to a second region.
  • data is represented as a long sequence of symbols which is input to an encoder.
  • the input data is encoded by an encoder, transmitted over a communication channel (or simply stored), and decoded by a decoder.
  • the input is pre-processed, sampled, converted, compressed or otherwise manipulated into a form for transmission or storage. After transmission or storage, the decoder attempts to reconstruct the original input.
  • Audio coding techniques can be generally categorized into two classes, namely the time-domain techniques and frequency-domain ones.
  • Time-domain techniques e.g., ADPCM, LPC
  • the frequency-domain techniques transform the audio signals into the frequency domain where compression is performed.
  • Frequency-domain codecs can be further separated into either subband or transform coders, although the distinction between the two is not always clear. That is, sub-band coders typically use bandpass filters to divide an input signal into a small number (e.g., four) of sub-bands, whereas transform coders typically have many sub-bands (and therefore a correspondingly large number of transform coefficients). Processing an audio signal in the frequency domain is motivated by both classical signal processing theories and human perception psychoaoustics model.
  • Huffman encoding is a particular form of entropy encoding.
  • Entropy coding assigns code words to different input sequences, and stores all input sequences in a code book.
  • the complexity of entropy encoding depends on the number m of possible values an input sequence X may take. For small m, there are few possible input combinations, and therefore the code book for the messages can be very small (e.g., only a few bits are needed to unambiguously represent all possible input sequences).
  • the code alphabet is most likely a series of binary digits ⁇ 0, 1 ⁇ , and code word lengths are measured in bits. If it is known that input is composed of symbols having equal probability of occurring, an optimal encoding is to use equal length code words. But, it is not typical that an input stream has equal probability of receiving any particular message.
  • variable length input sequences are assigned variable length codes (or conversely, variable length sequences are assigned fixed length codes) .
  • the invention relates to a method for entropy coding information relating to frequency domain audio coefficients.
  • the invention relates to a form of multilevel encoding audio spectral frequency coefficients. Illustrated embodiments are particularly adapted to coding environments in which multiple encoding methods can be chosen based on statistical profiles for frequency coefficient ranges. Encoding methods can be optimized for portions of a frequency spectrum, such as portions having a predominate value.
  • the predominate value in certain frequency ranges are zero value frequency coefficients, and they are encoded with the multi-level run-length encoder (RLE) encoder.
  • the multi-level encoder statistically correlates sequences of zero values with one or more non-zero symbols and assigns variable length code words to arbitrarily long input sequences of such zero and non-zero values.
  • the RLE based entropy encoder uses a specialized code book generated with respect to the probability of receiving an input sequence of zero-valued spectral coefficients followed by a non-zero spectral coefficient. If code book size is an issue, the probabilities can be sorted and less probable input sequences excluded from the code book.
  • variable- to-variable entropy encoder where a variable length code word is assigned to arbitrarily long input sequences of quantization symbols.
  • FIG. 1 is a block diagram of a computer system that may be used to implement run-length coding for frequency domain audio coding.
  • FIG. 2 is a flow chart showing encoding and decoding audio data in a frequency domain audio coder.
  • FIG. 3 illustrates a frequency range divided according to statistical properties for audio data frequency coefficients.
  • FIG. 4 illustrates an that employs entropy coding mode switching.
  • FIG. 5 illustrates a threshold grid used in encoding audio sequences having repeating spectral coefficients.
  • FIG. 6 illustrates code book creation in accordance with a FIG. 5 threshold grid.
  • FIG. 7 is a flowchart for encoding (or decoding) audio data with the FIG. 6 code book.
  • FIG. 1 and the following discussion are intended to provide a brief, general description of a suitable computing environment in which the invention may be implemented. While the invention will be described in the general context of computer- executable instructions of a computer program that runs on a personal computer, those skilled in the art will recognize that the invention also may be implemented in combination with other program modules. Generally, program modules include routines, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like.
  • the illustrated embodiment of the invention also is practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. But, some embodiments of the invention can be practiced on stand alone computers. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
  • an exemplary system for implementing the invention includes a computer 20, including a processing unit 21 , a system memory 22, and a system bus 23 that couples various system components including the system memory to the processing unit 21 .
  • the processing unit may be any of various commercially available processors, including Intel x86, Pentium and compatible microprocessors from Intel and others, the Alpha processor by Digital, and the PowerPC from IBM and Motorola. Dual microprocessors and other multi-processor architectures also can be used as the processing unit 21 .
  • the system bus may be any of several types of bus structure including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of conventional bus architectures such as PCI, AGP, VESA, MicroChannel, ISA and EISA, to name a few.
  • the system memory includes read only memory (ROM) 24 and random access memory (RAM) 25.
  • ROM read only memory
  • RAM random access memory
  • BIOS basic input/output system
  • BIOS basic routines that help to transfer information between elements within the computer 20, such as during start-up, is stored in ROM 24.
  • the computer 20 further includes a hard disk drive 27, a magnetic disk drive 28, e.g., to read from or write to a removable disk 29, and an optical disk drive 30, e.g., for reading a CD-ROM disk 31 or to read from or write to other optical media.
  • the hard disk drive 27, magnetic disk drive 28, and optical disk drive 30 are connected to the system bus 23 by a hard disk drive interface 32, a magnetic disk drive interface 33, and an optical drive interface 34, respectively.
  • the drives and their associated computer- readable media provide nonvolatile storage of data, data structures, computer-executable instructions, etc. for the computer 20.
  • a number of program modules may be stored in the drives and RAM 25, including an operating system 35, one or more application programs (e.g., Internet browser software) 36, other program modules 37, and program data 38.
  • a user may enter commands and information into the computer 20 through a keyboard 40 and pointing device, such as a mouse 42.
  • Other input devices may include a microphone, joystick, game pad, satellite dish, scanner, or the like.
  • serial port interface 46 that is coupled to the system bus, but may be connected by other interfaces, such as a parallel port, game port or a universal serial bus (USB) .
  • a monitor 47 or other type of display device is also connected to the system bus 23 via an interface, such as a video adapter 48.
  • the computer 20 is expected to operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 49.
  • the remote computer 49 may be a web server, a router, a peer device or other common network node, and typically includes many or all of the elements described relative to the computer 20, although only a memory storage device 50 has been illustrated in FIG. 1 .
  • the computer 20 can contact the remote computer 49 over an Internet connection established through a Gateway 55 (e.g., a router, dedicated-line, or other network link), a modem 54 link, or by an intra-office local area network (LAN) 51 or wide area network (WAN) 52.
  • a Gateway 55 e.g., a router, dedicated-line, or other network link
  • modem 54 link e.g., a modem 54 link
  • LAN local area network
  • WAN wide area network
  • the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.
  • the present invention is described below with reference to acts and symbolic representations of operations that are performed by the computer 20, unless indicated otherwise. Such acts and operations are sometimes referred to as being computer-executed.
  • the acts and symbolically represented operations include the manipulation by the processing unit 21 of electrical signals representing data bits which causes a resulting transformation or reduction of the electrical signal representation, and the maintenance of data bits at memory locations in the memory system (including the system memory 22, hard drive 27, floppy disks 29, and CD-ROM 31 ) to thereby reconfigure or otherwise alter the computer system's operation, as well as other processing of signals.
  • the memory locations where data bits are maintained are physical locations that have particular electrical, magnetic, or optical properties corresponding to the data bits.
  • FIG. 2 shows a transmission model for transmitting audio data over a channel 210.
  • the source of the transmission may be a live broadcast, stored data, or information retrieved over wired / wireless communication link (e.g., a LAN or the Internet). It is presumed that the channel 210 is of limited bandwidth, and therefore compression of source data 200 is desirable before data can be reliably sent over the channel. Note that although this discussion focuses on transmission of audio data, the invention applies to transfer of other data, such as audio visual information having embedded audio data (e.g., multiplexed within an MPEG data stream) , or other data sources having compressible data patterns (e.g., coherent data) .
  • audio visual information having embedded audio data e.g., multiplexed within an MPEG data stream
  • compressible data patterns e.g., coherent data
  • source data 200 is input to a time / frequency transform encoder 202 such as a filter bank or discrete-cosine type transform.
  • Transform encoder 202 is designed so as to convert a continuous or sampled time-domain input, such as an audio data source, into multiple frequency bands of predetermined (although perhaps differing) bandwidth. These bands can ⁇ hen be analyzed with respect to a human auditory perception model 204 (for example, a psychoacoustic model) in order to determine components of the signal that may be safely reduced without audible impact. For example, it is well known that certain frequencies are inaudible when certain other sounds or frequencies are present in the input signal (simultaneous masking). Consequently, such inaudible signals can be safely removed from the input signal.
  • Use of human auditory models is well known, e.g., the MPEG 1 , 2 and 4 standards. (Note that such models may be combined into a quantization 206 operation.)
  • frequency coefficients within each range are quantized 206 to convert each coefficient (amplitude levels) to a value taken from a finite set of possible values, where each value has a size based on the bits allocated to representing the frequency range.
  • the quantizer may be a conventional uniform or non-uniform quantizer, such as a midriser or midtreader quantizer with (or without) memory.
  • the general quantization goal is identifying an optimum bit allocation for representing the input signal data, i.e., to distribute usage of available encoding bits to ensure encoding the (acoustically) significant portions of the source data.
  • Various quantization methods such as quantization step size prediction to meet a desired bit rate (assuming constant bit rate) can be used.
  • the entropy encoded output is transmitted over the communication channel 210 (or stored for later transmission).
  • the receiving end 216 then implements a reverse-encoding process, i.e., a series of steps to undo the encoding of the source data 200. That is, encoded data is received over the channel 210 as input to an entropy decoder 212 which performs a reverse code book look-up to convert the encoded output into an approximation of the original quantization output for the input symbol series 200.
  • This approximate data is then processed by a de-quantizer 214 and a time / frequency transform decoder 218 to reverse the original coding operations, resulting in a reconstructed data 220 that is similar to the original source data 200. It should be noted that the reconstructed data 220 only approximates the original source data 200 since applying steps 204-208 is a lossy process.
  • One possible implementation for this transmission model is a client application program wanting to process, display or play real-time data as it is retrieved over a network link from a server / serving application.
  • the client can use a streaming delivery system that provides adaptive bandwidth reservation.
  • One such streaming format is the Microsoft Advanced Streaming Format.
  • a streaming environment contrasts traditional networking programs by allowing data delivery to be optimized for particular retrieval needs, such as line speed constraints.
  • a distinguishing feature of streaming data is that data can be viewed progressively in real time as a client receives it. Note that it is intended that processed data can be stored for later retrieval by a client, and that such retrieval can be performed in a non-streaming format (e.g., by a small playback appliance).
  • the streaming format defines the structure of synchronized object data streams, and allows any object, e.g., audio and video data objects, scripts, ActiveX controls, and HTML documents, to be placed into a data stream.
  • An Application Programming Interface one such API is the Microsoft Audio Compression Manager
  • Transmission of streaming format data over the communication channel 210 requires that the source information be converted into a form suitable for the network. But, unlike traditional packets which contain routing information and data, streaming packets contain a prioritized mix of data from different objects within the stream, so that the bandwidth can be first allocated to higher priority objects.
  • the objects within the prioritized data stream are reconstructed for use by the receiver.
  • a particularly effective method for encoding the frequency coefficients source data 200 to ensure reliable transmission over the communication channel 210 is entropy encoding.
  • Entropy encoding is effective when symbols have non-uniform probability distribution.
  • Entropy coding methods that group many input symbols, such as the variable-to-variable and RLE coders discussed below, are good at capitalizing on data coherency.
  • Using different encoding methods for different frequency ranges allows for more-optimal encoding when the encoders are tailored to probability distributions for each such range.
  • FIG. 3 illustrates a time domain signal that has been converted to the frequency domain. Along the X axis is a range 300 of frequencies from zero 302 through a maximum frequency 304.
  • a partition 306 has been defined within the range 300, where the partition is determined according to statistical analysis of an expected input stream (e.g., statistical information obtained while training an entropy code book, or by adaptive analysis of the actual input), and this statistical model is applied against actual input 308 for encoding.
  • an expected input stream e.g., statistical information obtained while training an entropy code book, or by adaptive analysis of the actual input
  • One approach to setting a partition is, as discussed above, is placing a certain percentage of frequencies or critical bands below the boundary.
  • An alternate method is to collect basic statistics, such as the probability of zeros and non-zeros according to the probability distributions for each frequency.
  • a more optimal method is to adaptively locate a partition by performing an exhaustive search to determine an "optimal" boundary location. That is, an optimal solution is to try every frequency (or subset thereof) as a partition location, perform entropy coding, and track which boundary potential position yielded a minimum number of bits for encoding.
  • an encoder can apply different encoding schemes that have been optimized to encode the different frequency ranges.
  • Such prior methods are limited by the flexibility of their single entropy encoding algorithm, by the inability of an encoding table to account for different kinds of input data, and by the overhead associated with identifying when different tables should be used.
  • a method optimized for one type of data can not be efficiently applied to a different type of data. In the illustrated embodiment, the selected dividing criteria for the range
  • the probability C(F) (Y-axis) that a particular spectral event is a run of coefficients at or near a particular intensity (e.g., zero) .
  • the probability of receiving zero value data can be pre-computed with respect to exemplary input.
  • the input signal 308 has high probability of being zero after the indicated partition 306.
  • the position of the partition divider 306 is chosen so that a certain amount of the input beyond the divider, such as 80%, is at or near (and thus equated to) a predetermined value. (In illustrated embodiments, the predetermined value is zero.)
  • an input signal 308 is divided into two ranges, each range having data characteristics best-suited to compression by different encoding methods.
  • one range has primarily zero values, while the other has primarily non-zero values.
  • two encoders are used, each optimized for the type of data within its corresponding range. While the illustrated implementation partitions the frequency coefficients into two ranges, more than two ranges can be defined, each having its own optimized encoder, or different ranges can share similar characteristics and thus utilize the same encoder.
  • variable-to-variable encoder For encoding the mostly non-zero range 31 0, the variable-to-variable encoder incorporated herein above may be used.
  • an encoder optimized for such data is used.
  • a run length encoder RLE
  • FIG. 5 illustrates one RLE-based entropy encoder that can efficiently encode the mostly zero valued range 31 2.
  • FIG. 4 illustrates a transmission model for transmitting audio data over a channel (see FIG. 2), in which multiple entropy encoding / decoding methods are used to manipulate input data 200. It is known that the source audio data 200 will have values within some frequency range. As discussed above for FIG. 2, source data 200 may be converted 202 into the frequency domain, reduced according to perception models 204, and quantized 206. Since quantization may produce significant numbers of near zero output values, an entropy encoder 208 can be optimized to encode this quantization output.
  • the spectral coefficients for the quantized data tend to track the information content of typical audio data. Analysis of the quantization coefficients shows they are most likely non-zero at lower frequency ranges, and mostly zero coefficients at higher frequencies.
  • a mode selector 400 can determines which encoder to according to the frequency range being encoded.
  • Determining placement of the partition can be based on a statistical analysis identifying which of several known entropy encoders will achieve better coding efficiency for different sub-ranges.
  • analysis is performed in advance of encoding or decoding with respect to exemplary input. This allows for predetermination of partition locations, and corresponding encoders for each sub-range, so that no overhead needs to be introduced to flag changes in applicable coders.
  • statistical analysis may be performed on current data (in real time or off-line) .
  • a flag needs to be embedded into the encoded data stream to indicate changes in applicable coders.
  • Receipt by a decoder of the flag indicates the end of a sub-range, and the value of the flag indicat e s which decoder to use for successive data.
  • markers represent an improvement over prior-art encoding methods.
  • traditional see, e.g., MPEG 1 , 2, and 4
  • entropy encoding of audio data For example, compare illustrated embodiments with traditional (see, e.g., MPEG 1 , 2, and 4) entropy encoding of audio data.
  • a traditional system uses a single entropy encoder for all data, where different code books are associated with each of many critical bands in the input data's frequency range (usually 24 or more bands, depending on the sampling rate) . At each critical band transition, assuming 24 bands, a 2 bit (or longer) flag is required to indicate which of 24 code books are to be used to encode the band's data.
  • the mostly zero data past the partition is encoded with an RLE type encoder (see, e.g., FIG. 5), and the data before the partition is encoded with a variable-to-variable entropy-type entropy encoder.
  • different encoders may be selected according to whichever encoder is best able to compress an input.
  • encoding methods such as traditional Huffman encoding, vector Huffman variants, RLE encoding, etc.
  • encoding methods can be optimized and their code books trained for input having certain characteristics such as high spectral values, low spectral values, mixed or alternating spectral values, or some other desired / probable feature.
  • illustrated configurations match different encoding methods according to a best match between a statistical profile for an input and the statistical profile for data on which an encoder code book was trained.
  • FIG. 2 After determining which encoder 402-406 to use, processing continues as discussed with respect FIG. 2 for transmitting data to a receiver 216 for decoding. Note that an inverse mode selector is not shown. A decoder selector is necessary (e.g., as part of the FIG. 2 decoder 21 2) to properly select an appropriate decoder to reverse the work of the mode selector 400. However, as discussed above, range divider locations can be determined in advance, thus leaving their identification implied during decoding. Or, for dynamic adaptive encoding / decoding, embedded flags may be used to trigger decoder selection. Using flags is equivalent to using a mode selector, and the mode selector can be designed to operate for both pre-determined and adaptively located partitions. FIG.
  • FIG. 5 illustrates a threshold grid that can be used to modify creation of an entropy code book.
  • the upper left corner represents highest values, and the lower right corner represents lowest values.
  • encoding becomes more efficient when encoders can be tailored to process certain portions of the input data.
  • an entropy coder can be combined with RLE-type encoding to increase coding efficiency for data containing the repeated value.
  • quantization of the input data introduces zero or near-zero spectral coefficients for significant portions of the frequency ranges for the input data. Consequently, rather than applying the same entropy coder used for the mostly non-zero data (e.g., the encoder and code book of FIG. 5), instead a RLE-based entropy coder is used. To do so, a special entropy code book is constructed (see FIG. 6) . Although it is assumed that RLE compressible data is mostly runs of zero spectral coefficients, note that the disclosed methods are applicable to any repeating data values.
  • the left edge R, 502 of the grid 500 represents zero value runs R, in the input stream having length at or exceeding j, where j ranges from a length of a zero length run to an m-length run.
  • the value of m is a known maximum length zero-value run based on analysis of exemplary input, or from dynamic inspection of incoming data.
  • the top edge of the grid represents spectral coefficient values L having intensity at or exceeding i, where i ranges from a minimum intensity of zero, up to a maximum intensity n. As with determining the maximum value m, n is determined according to exemplary input or currently received input.
  • the grid pictorially presents computation of the probability of receiving a run of zero (or other predetermined) value coefficients R having length of at least j that is followed by a spectral intensity value of i in intensity.
  • the darker squares, e.g., 504, 506, correspond to event parings (R ⁇ ,L) having higher probability, and are collectively referenced as region 508.
  • the lighter squares, e.g., 510, 51 2, 514 represent pairings having low probability, such as long zero runs followed by high spectral coefficients, and are collectively referenced as region 516.
  • the graph shows that short zero-value runs followed by low spectral values are the most likely input sequences to be received, and that as run lengths get longer, or spectral values get higher, the probability of such combination is reduced.
  • FIG. 6 illustrates constructing an entropy code book in accordance with a
  • FIG. 5 spectral threshold grid.
  • Ln stands for any value that is greater than or equal to Ln (corresponding to the FIG. 5 top grid edge) .
  • threshold operates to exclude all input pairings in FIG. 5 grid region 516.
  • Entropy codes are then assigned 606 to remaining pairings in FIG. 5 region 508.
  • a decoding table can be implemented as a Huffman tree.
  • Another code book implementation includes Rice-Golomb structures, and their equivalents.
  • FIG. 7 shows one method for encoding data with RLE-based entropy encoder of FIGS. 5 and 6. It is assumed that encoding has proceeded as illustrated in FIG. 4, until mode selector 400 determines that RLE encoding is required . As illustrated, a series of spectral coefficients are received 650. This input is scanned 652 to identify an input sequence having zero value spectral samples followed by a non-zero spectral sample. This sequence is then looked up 654 in the code book of FIG. 6, and the corresponding code is output 656.
  • a special output symbol can be inserted into the output data stream to identify this data configuration, along with sufficient information to identify the received event (e.g., a code to identify the number of zero valued samples, followed by the non-zero sample).
  • a special ending signal is needed or a special event such as (N, 1 ) suffices because the decoder is aware the total number of samples and able to stop decoding when that limit is exceeded .
  • decoding operates as an inverse operation of encoding, where the encoded data 656 is looked up 654 in a corresponding FIG. 5 decoding code book, in order to recover the input sequence 652.

Abstract

The invention relates to entropy coding information relating to frequency domain audio coefficients, in particular, multi-level encoding of audio spectral frequency coefficients. Encoding is optimized for portions of a frequency spectrum, such as portions having a predominate value. In illustrated embodiments, the predominate value in certain frequency ranges is that of zero value frequency coefficients, and they are encoded with the multi-level run-length encoder (RLE) encoder. The multi-level encoder statistically correlates sequences of zero values with one or more non-zero symbols and assigns variable length code words to arbitrarily long input sequences of such zero and non-zero values. The RLE based entropy encoder uses a specialized codebook generated with respect to the probability of receiving an input sequence of zero-valued spectral coefficients followed by a non-zero spectral coefficient.

Description

Multi-level Run Length Coding for Frequency-domain Audio Coding
Field Of The Invention The present invention relates to setting one or more thresholds to divide an input signal into multiple regions, and applying entropy encoding to encode a variable length first region with a variable length entropy code, and applying a second coding method to a second region.
Background
In a typical audio coding environment, data is represented as a long sequence of symbols which is input to an encoder. The input data is encoded by an encoder, transmitted over a communication channel (or simply stored), and decoded by a decoder. During encoding, the input is pre-processed, sampled, converted, compressed or otherwise manipulated into a form for transmission or storage. After transmission or storage, the decoder attempts to reconstruct the original input.
Audio coding techniques can be generally categorized into two classes, namely the time-domain techniques and frequency-domain ones. Time-domain techniques, e.g., ADPCM, LPC, operate directly in the time domain while the frequency-domain techniques transform the audio signals into the frequency domain where compression is performed. Frequency-domain codecs (compressors/decompressors) can be further separated into either subband or transform coders, although the distinction between the two is not always clear. That is, sub-band coders typically use bandpass filters to divide an input signal into a small number (e.g., four) of sub-bands, whereas transform coders typically have many sub-bands (and therefore a correspondingly large number of transform coefficients). Processing an audio signal in the frequency domain is motivated by both classical signal processing theories and human perception psychoaoustics model.
Psychoacoustics take advantage of known properties of the listener in order to reduce information content. For example, the inner ear, specifically the basilar membrane, behaves like a spectral analyzer and transforms the audio signal into spectral data before further neural processing proceeds. Frequency-domain audio codecs often take advantage of auditory masking that is occurring in the human hearing system by modifying an original signal to eliminate information redundancies. Since human ears are incapable of perceiving these modifications, one can achieve efficient compression without distortion.
Masking analysis is usually conducted in conjunction with quantization so that quantization noise can be conveniently "masked." In modern audio coding techniques, the quantized spectral data are usually further compressed by applying entropy coding, e.g., Huffman coding. Compression is required because communication channels usually have limited available capacity or bandwidth. It is frequently necessary to reduce the information content of input data in order to allow it to be reliably transmitted, if at all, over the communication channel. Tremendous effort has been invested in developing lossless and lossy compression techniques for reducing the size of data to transmit or store. One popular lossless technique is Huffman encoding, which is a particular form of entropy encoding. Entropy coding assigns code words to different input sequences, and stores all input sequences in a code book. The complexity of entropy encoding depends on the number m of possible values an input sequence X may take. For small m, there are few possible input combinations, and therefore the code book for the messages can be very small (e.g., only a few bits are needed to unambiguously represent all possible input sequences). For digital applications, the code alphabet is most likely a series of binary digits {0, 1 }, and code word lengths are measured in bits. If it is known that input is composed of symbols having equal probability of occurring, an optimal encoding is to use equal length code words. But, it is not typical that an input stream has equal probability of receiving any particular message. In practice, certain messages are more likely than others, and entropy encoders take advantage of such data correlation to minimize the average length of code words among expected inputs. Traditionally, however, fixed length input sequences are assigned variable length codes (or conversely, variable length sequences are assigned fixed length codes) .
By their nature, however, most compression techniques for audiovisual data are lossy processes. The level of quality and fidelity delivered in sound and video files depends primarily on how much bandwidth is available and whether the compressor / de-compressor (codec) is optimized to prepare output for an available bandwidth. Summary The invention relates to a method for entropy coding information relating to frequency domain audio coefficients. In particular, the invention relates to a form of multilevel encoding audio spectral frequency coefficients. Illustrated embodiments are particularly adapted to coding environments in which multiple encoding methods can be chosen based on statistical profiles for frequency coefficient ranges. Encoding methods can be optimized for portions of a frequency spectrum, such as portions having a predominate value.
In illustrated embodiments, the predominate value in certain frequency ranges are zero value frequency coefficients, and they are encoded with the multi-level run-length encoder (RLE) encoder. The multi-level encoder statistically correlates sequences of zero values with one or more non-zero symbols and assigns variable length code words to arbitrarily long input sequences of such zero and non-zero values. The RLE based entropy encoder uses a specialized code book generated with respect to the probability of receiving an input sequence of zero-valued spectral coefficients followed by a non-zero spectral coefficient. If code book size is an issue, the probabilities can be sorted and less probable input sequences excluded from the code book.
Similarly, the range containing mostly non-zero values is encoded with a variable- to-variable entropy encoder, where a variable length code word is assigned to arbitrarily long input sequences of quantization symbols. An overall more efficient process is achieved by basing coding methods according to the properties of the input data. In practice, the number of partitions and frequency ranges will vary according to the type of data to be encoded and decoded.
Brief Description of the Drawings
FIG. 1 is a block diagram of a computer system that may be used to implement run-length coding for frequency domain audio coding.
FIG. 2 is a flow chart showing encoding and decoding audio data in a frequency domain audio coder. FIG. 3 illustrates a frequency range divided according to statistical properties for audio data frequency coefficients.
FIG. 4 illustrates an that employs entropy coding mode switching. FIG. 5 illustrates a threshold grid used in encoding audio sequences having repeating spectral coefficients.
FIG. 6 illustrates code book creation in accordance with a FIG. 5 threshold grid. FIG. 7 is a flowchart for encoding (or decoding) audio data with the FIG. 6 code book.
Detailed Description
Exemplary Operating Environment
FIG. 1 and the following discussion are intended to provide a brief, general description of a suitable computing environment in which the invention may be implemented. While the invention will be described in the general context of computer- executable instructions of a computer program that runs on a personal computer, those skilled in the art will recognize that the invention also may be implemented in combination with other program modules. Generally, program modules include routines, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like. The illustrated embodiment of the invention also is practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. But, some embodiments of the invention can be practiced on stand alone computers. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
With reference to FIG. 1 , an exemplary system for implementing the invention includes a computer 20, including a processing unit 21 , a system memory 22, and a system bus 23 that couples various system components including the system memory to the processing unit 21 . The processing unit may be any of various commercially available processors, including Intel x86, Pentium and compatible microprocessors from Intel and others, the Alpha processor by Digital, and the PowerPC from IBM and Motorola. Dual microprocessors and other multi-processor architectures also can be used as the processing unit 21 .
The system bus may be any of several types of bus structure including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of conventional bus architectures such as PCI, AGP, VESA, MicroChannel, ISA and EISA, to name a few. The system memory includes read only memory (ROM) 24 and random access memory (RAM) 25. A basic input/output system (BIOS), containing the basic routines that help to transfer information between elements within the computer 20, such as during start-up, is stored in ROM 24. The computer 20 further includes a hard disk drive 27, a magnetic disk drive 28, e.g., to read from or write to a removable disk 29, and an optical disk drive 30, e.g., for reading a CD-ROM disk 31 or to read from or write to other optical media. The hard disk drive 27, magnetic disk drive 28, and optical disk drive 30 are connected to the system bus 23 by a hard disk drive interface 32, a magnetic disk drive interface 33, and an optical drive interface 34, respectively. The drives and their associated computer- readable media provide nonvolatile storage of data, data structures, computer-executable instructions, etc. for the computer 20. Although the description of computer-readable media above refers to a hard disk, a removable magnetic disk and a CD, it should be appreciated by those skilled in the art that other types of media which are readable by a computer, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, and the like, may also be used in the exemplary operating environment.
A number of program modules may be stored in the drives and RAM 25, including an operating system 35, one or more application programs (e.g., Internet browser software) 36, other program modules 37, and program data 38. A user may enter commands and information into the computer 20 through a keyboard 40 and pointing device, such as a mouse 42. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 21 through a serial port interface 46 that is coupled to the system bus, but may be connected by other interfaces, such as a parallel port, game port or a universal serial bus (USB) . A monitor 47 or other type of display device is also connected to the system bus 23 via an interface, such as a video adapter 48. In addition to the monitor, personal computers typically include other peripheral output devices (not shown), such as speakers and printers. The computer 20 is expected to operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 49. The remote computer 49 may be a web server, a router, a peer device or other common network node, and typically includes many or all of the elements described relative to the computer 20, although only a memory storage device 50 has been illustrated in FIG. 1 . The computer 20 can contact the remote computer 49 over an Internet connection established through a Gateway 55 (e.g., a router, dedicated-line, or other network link), a modem 54 link, or by an intra-office local area network (LAN) 51 or wide area network (WAN) 52. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used. In accordance with the practices of persons skilled in the art of computer programming, the present invention is described below with reference to acts and symbolic representations of operations that are performed by the computer 20, unless indicated otherwise. Such acts and operations are sometimes referred to as being computer-executed. It will be appreciated that the acts and symbolically represented operations include the manipulation by the processing unit 21 of electrical signals representing data bits which causes a resulting transformation or reduction of the electrical signal representation, and the maintenance of data bits at memory locations in the memory system (including the system memory 22, hard drive 27, floppy disks 29, and CD-ROM 31 ) to thereby reconfigure or otherwise alter the computer system's operation, as well as other processing of signals. The memory locations where data bits are maintained are physical locations that have particular electrical, magnetic, or optical properties corresponding to the data bits.
FIG. 2 shows a transmission model for transmitting audio data over a channel 210. The source of the transmission may be a live broadcast, stored data, or information retrieved over wired / wireless communication link (e.g., a LAN or the Internet). It is presumed that the channel 210 is of limited bandwidth, and therefore compression of source data 200 is desirable before data can be reliably sent over the channel. Note that although this discussion focuses on transmission of audio data, the invention applies to transfer of other data, such as audio visual information having embedded audio data (e.g., multiplexed within an MPEG data stream) , or other data sources having compressible data patterns (e.g., coherent data) . As illustrated, source data 200 is input to a time / frequency transform encoder 202 such as a filter bank or discrete-cosine type transform. Transform encoder 202 is designed so as to convert a continuous or sampled time-domain input, such as an audio data source, into multiple frequency bands of predetermined (although perhaps differing) bandwidth. These bands can τhen be analyzed with respect to a human auditory perception model 204 (for example, a psychoacoustic model) in order to determine components of the signal that may be safely reduced without audible impact. For example, it is well known that certain frequencies are inaudible when certain other sounds or frequencies are present in the input signal (simultaneous masking). Consequently, such inaudible signals can be safely removed from the input signal. Use of human auditory models is well known, e.g., the MPEG 1 , 2 and 4 standards. (Note that such models may be combined into a quantization 206 operation.)
After performing the time/frequency transformation 202, frequency coefficients within each range are quantized 206 to convert each coefficient (amplitude levels) to a value taken from a finite set of possible values, where each value has a size based on the bits allocated to representing the frequency range. The quantizer may be a conventional uniform or non-uniform quantizer, such as a midriser or midtreader quantizer with (or without) memory. The general quantization goal is identifying an optimum bit allocation for representing the input signal data, i.e., to distribute usage of available encoding bits to ensure encoding the (acoustically) significant portions of the source data. Various quantization methods, such as quantization step size prediction to meet a desired bit rate (assuming constant bit rate) can be used. After the source 200 has been quantized, the resultant data is then entropy encoded 208.
The entropy encoded output is transmitted over the communication channel 210 (or stored for later transmission). The receiving end 216 then implements a reverse-encoding process, i.e., a series of steps to undo the encoding of the source data 200. That is, encoded data is received over the channel 210 as input to an entropy decoder 212 which performs a reverse code book look-up to convert the encoded output into an approximation of the original quantization output for the input symbol series 200. This approximate data is then processed by a de-quantizer 214 and a time / frequency transform decoder 218 to reverse the original coding operations, resulting in a reconstructed data 220 that is similar to the original source data 200. It should be noted that the reconstructed data 220 only approximates the original source data 200 since applying steps 204-208 is a lossy process.
One possible implementation for this transmission model is a client application program wanting to process, display or play real-time data as it is retrieved over a network link from a server / serving application. For example, the client can use a streaming delivery system that provides adaptive bandwidth reservation. (One such streaming format is the Microsoft Advanced Streaming Format.) A streaming environment contrasts traditional networking programs by allowing data delivery to be optimized for particular retrieval needs, such as line speed constraints. A distinguishing feature of streaming data is that data can be viewed progressively in real time as a client receives it. Note that it is intended that processed data can be stored for later retrieval by a client, and that such retrieval can be performed in a non-streaming format (e.g., by a small playback appliance).
The streaming format defines the structure of synchronized object data streams, and allows any object, e.g., audio and video data objects, scripts, ActiveX controls, and HTML documents, to be placed into a data stream. An Application Programming Interface (one such API is the Microsoft Audio Compression Manager) is provided to facilitate application support for the streaming format. Transmission of streaming format data over the communication channel 210 requires that the source information be converted into a form suitable for the network. But, unlike traditional packets which contain routing information and data, streaming packets contain a prioritized mix of data from different objects within the stream, so that the bandwidth can be first allocated to higher priority objects. On the receiving end 21 6, the objects within the prioritized data stream are reconstructed for use by the receiver. Because data is probably being used as it is received, streaming content is susceptible to transmission delays. If data does not arrive reliably, or if transmission speed falls below an acceptable minimum, the data might become unusable (e.g., playback of a video sequence may fail) . Consequently, bandwidth intensive data (such as audio feeds) needs significant compression to ensure its bandwidth requirements can be met by the communication channel 210. As the degree of lossy compression necessarily impacts the quality of the reproduced signal, a server should provide selectable encodings for different client network connection speeds (or use an adaptive feedback system to discern real-time throughput) . A particularly effective method for encoding the frequency coefficients source data 200 to ensure reliable transmission over the communication channel 210 is entropy encoding. As discussed below, one can capitalize on the data coherency by applying different encoding methods optimized for different parts of the input data. Entropy encoding is effective when symbols have non-uniform probability distribution. Entropy coding methods that group many input symbols, such as the variable-to-variable and RLE coders discussed below, are good at capitalizing on data coherency. Using different encoding methods for different frequency ranges allows for more-optimal encoding when the encoders are tailored to probability distributions for each such range. A particularly effective entropy encoding method for mostly non-zero data one that assigns variable length codes to variable length input (a variable-to-variable encoder), as disclosed in a contemporaneously filed application entitled "Entropy Code Mode Switching for Frequency-domain Audio Coding," bearing serial number XX/YYYY and attorney docket no. 3382-51031 ; this application is incorporated herein by reference. FIG. 3 illustrates a time domain signal that has been converted to the frequency domain. Along the X axis is a range 300 of frequencies from zero 302 through a maximum frequency 304. A partition 306 has been defined within the range 300, where the partition is determined according to statistical analysis of an expected input stream (e.g., statistical information obtained while training an entropy code book, or by adaptive analysis of the actual input), and this statistical model is applied against actual input 308 for encoding.
One approach to setting a partition is, as discussed above, is placing a certain percentage of frequencies or critical bands below the boundary.
An alternate method is to collect basic statistics, such as the probability of zeros and non-zeros according to the probability distributions for each frequency.
Inspection of each frequency's statistics shows a gradual change across frequencies, and a partition boundary can be selected so that distributions within each partition are similar. Note that the frequency partition is sensitive to the sampling rate of the input and the expected bit rate. The sampling rate and the bit rate determine the stochastic property of the quantized frequency coefficients, and this property is basically responsible for determining partition placement.
A more optimal method is to adaptively locate a partition by performing an exhaustive search to determine an "optimal" boundary location. That is, an optimal solution is to try every frequency (or subset thereof) as a partition location, perform entropy coding, and track which boundary potential position yielded a minimum number of bits for encoding. Although computationally more intensive, if computation costs are at issue, the compression benefits of an exhaustive search (or near exhaustive if frequency subsets are used) can outweigh costs when multiple partitions are used.
By separating out the frequency spectrum 300 into separate frequency sub-ranges 310, 31 2, an encoder can apply different encoding schemes that have been optimized to encode the different frequency ranges. This contrasts previous methods, such as entropy encoding schemes that substituted different entropy coding tables according to characteristics of data to be encoded. Such prior methods are limited by the flexibility of their single entropy encoding algorithm, by the inability of an encoding table to account for different kinds of input data, and by the overhead associated with identifying when different tables should be used. A method optimized for one type of data can not be efficiently applied to a different type of data. In the illustrated embodiment, the selected dividing criteria for the range
300 is the probability C(F) (Y-axis) that a particular spectral event is a run of coefficients at or near a particular intensity (e.g., zero) . As with code book generation, the probability of receiving zero value data can be pre-computed with respect to exemplary input. As illustrated, the input signal 308 has high probability of being zero after the indicated partition 306. The position of the partition divider 306 is chosen so that a certain amount of the input beyond the divider, such as 80%, is at or near (and thus equated to) a predetermined value. (In illustrated embodiments, the predetermined value is zero.)
It is assumed that, at a minimum, an input signal 308 is divided into two ranges, each range having data characteristics best-suited to compression by different encoding methods. In the illustrated embodiment, one range has primarily zero values, while the other has primarily non-zero values. Thus, two encoders are used, each optimized for the type of data within its corresponding range. While the illustrated implementation partitions the frequency coefficients into two ranges, more than two ranges can be defined, each having its own optimized encoder, or different ranges can share similar characteristics and thus utilize the same encoder.
For encoding the mostly non-zero range 31 0, the variable-to-variable encoder incorporated herein above may be used. For the mostly zero-value range 312, an encoder optimized for such data is used. In the illustrated embodiment, a run length encoder (RLE) is used as it is optimized for encoding data that has a predominate value (e.g., zero). FIG. 5 illustrates one RLE-based entropy encoder that can efficiently encode the mostly zero valued range 31 2.
FIG. 4 illustrates a transmission model for transmitting audio data over a channel (see FIG. 2), in which multiple entropy encoding / decoding methods are used to manipulate input data 200. It is known that the source audio data 200 will have values within some frequency range. As discussed above for FIG. 2, source data 200 may be converted 202 into the frequency domain, reduced according to perception models 204, and quantized 206. Since quantization may produce significant numbers of near zero output values, an entropy encoder 208 can be optimized to encode this quantization output.
After quantization, the spectral coefficients for the quantized data tend to track the information content of typical audio data. Analysis of the quantization coefficients shows they are most likely non-zero at lower frequency ranges, and mostly zero coefficients at higher frequencies.
Therefore, for frequency partitions located at certain frequency positions, a mode selector 400 can determines which encoder to according to the frequency range being encoded.
Determining placement of the partition can be based on a statistical analysis identifying which of several known entropy encoders will achieve better coding efficiency for different sub-ranges. In one configuration, analysis is performed in advance of encoding or decoding with respect to exemplary input. This allows for predetermination of partition locations, and corresponding encoders for each sub-range, so that no overhead needs to be introduced to flag changes in applicable coders. Alternatively, statistical analysis may be performed on current data (in real time or off-line) . In this configuration, although the encoders / decoders are known in advance, a flag needs to be embedded into the encoded data stream to indicate changes in applicable coders. As discussed above, different potential partition locations can be tried until a certain degree of coding efficiency is achieved for each sub-range. Receipt by a decoder of the flag indicates the end of a sub-range, and the value of the flag indicates which decoder to use for successive data.
Although inserting markers adds some overhead to the encoding / decoding process, such markers represent an improvement over prior-art encoding methods. For example, compare illustrated embodiments with traditional (see, e.g., MPEG 1 , 2, and 4) entropy encoding of audio data. A traditional system uses a single entropy encoder for all data, where different code books are associated with each of many critical bands in the input data's frequency range (usually 24 or more bands, depending on the sampling rate) . At each critical band transition, assuming 24 bands, a 2 bit (or longer) flag is required to indicate which of 24 code books are to be used to encode the band's data. (5 bits are required to track 24 states, but this flag can itself be encoded into effectively fewer bits.) This sharply contrasts the illustrated embodiments which either require no flag at all, or which uses flags, but is more efficient over prior methods unless the number of sub- ranges becomes comparable to the number of critical bands, and the number of encoding methods approaches the number of tables. That is, in every encoding using critical bands, there will be 24 sub-ranges requiring a 2-5 bit flag to indicate which encoding table to use. In contrast, illustrated embodiments may only have 2 or three sub-ranges, thus much less overhead. As shown, there are N pre-defined encoders 402-406, each optimized to encode a frequency range having data with some predominate characteristic. This does not mean that there are necessarily N distinct input ranges, as different frequency ranges may have similar statistical characteristics for its data, and hence use the same encoder. In the illustrated example, there are only two ranges (one partition), corresponding to low (mostly non-zero coefficients) and high (mostly zero coefficients) frequency ranges.
Hence, the mostly zero data past the partition is encoded with an RLE type encoder (see, e.g., FIG. 5), and the data before the partition is encoded with a variable-to-variable entropy-type entropy encoder.
In the general case, however, once statistical information is available for a particular input, different encoders may be selected according to whichever encoder is best able to compress an input. For example, encoding methods, such as traditional Huffman encoding, vector Huffman variants, RLE encoding, etc., can be optimized and their code books trained for input having certain characteristics such as high spectral values, low spectral values, mixed or alternating spectral values, or some other desired / probable feature. In contrast with prior use of a single encoder for all input, illustrated configurations match different encoding methods according to a best match between a statistical profile for an input and the statistical profile for data on which an encoder code book was trained. After determining which encoder 402-406 to use, processing continues as discussed with respect FIG. 2 for transmitting data to a receiver 216 for decoding. Note that an inverse mode selector is not shown. A decoder selector is necessary (e.g., as part of the FIG. 2 decoder 21 2) to properly select an appropriate decoder to reverse the work of the mode selector 400. However, as discussed above, range divider locations can be determined in advance, thus leaving their identification implied during decoding. Or, for dynamic adaptive encoding / decoding, embedded flags may be used to trigger decoder selection. Using flags is equivalent to using a mode selector, and the mode selector can be designed to operate for both pre-determined and adaptively located partitions. FIG. 5 illustrates a threshold grid that can be used to modify creation of an entropy code book. The upper left corner represents highest values, and the lower right corner represents lowest values. As discussed for FIGS. 3 and 4, encoding becomes more efficient when encoders can be tailored to process certain portions of the input data. In particular, when it is known that the encoding method will produce a significant number of repeating frequency coefficients, an entropy coder can be combined with RLE-type encoding to increase coding efficiency for data containing the repeated value.
In the illustrated embodiments, quantization of the input data introduces zero or near-zero spectral coefficients for significant portions of the frequency ranges for the input data. Consequently, rather than applying the same entropy coder used for the mostly non-zero data (e.g., the encoder and code book of FIG. 5), instead a RLE-based entropy coder is used. To do so, a special entropy code book is constructed (see FIG. 6) . Although it is assumed that RLE compressible data is mostly runs of zero spectral coefficients, note that the disclosed methods are applicable to any repeating data values. The left edge R, 502 of the grid 500 represents zero value runs R, in the input stream having length at or exceeding j, where j ranges from a length of a zero length run to an m-length run. The value of m is a known maximum length zero-value run based on analysis of exemplary input, or from dynamic inspection of incoming data. The top edge of the grid represents spectral coefficient values L having intensity at or exceeding i, where i ranges from a minimum intensity of zero, up to a maximum intensity n. As with determining the maximum value m, n is determined according to exemplary input or currently received input.
The grid pictorially presents computation of the probability of receiving a run of zero (or other predetermined) value coefficients R having length of at least j that is followed by a spectral intensity value of i in intensity. The darker squares, e.g., 504, 506, correspond to event parings (Rι,L) having higher probability, and are collectively referenced as region 508. The lighter squares, e.g., 510, 51 2, 514, represent pairings having low probability, such as long zero runs followed by high spectral coefficients, and are collectively referenced as region 516. The graph shows that short zero-value runs followed by low spectral values are the most likely input sequences to be received, and that as run lengths get longer, or spectral values get higher, the probability of such combination is reduced.
During entropy code book construction, the improbable pairings are excluded from the code book. Exclusion is made with respect to a selected probability threshold 51 8. Event pairings below the threshold are deemed insufficiently probable and are excluded from the code book. The result of the exclusion is to limit code book size, while also allowing very efficient encoding of probable input sequences having sequences of zero values. FIG. 6 illustrates constructing an entropy code book in accordance with a
FIG. 5 spectral threshold grid. As a more formal description of the contents of FIG. 5, let the absolute values of non-zero spectral samples form an integer set ϋ = {1 , 2, 3, ..., Lπ} where Ln stands for any value that is greater than or equal to Ln (corresponding to the FIG. 5 top grid edge) . Let the run length of zero spectral samples in an input stream form another set R, = {1 , 2, 3, ..., Rm} where Rm stands for any zero runs with length equal to or longer than Rm (corresponding to the FIG. 5 left grid edge) . Using this notation, we can represent an input of frequency coefficients with a string of input symbols defined as (R,, ϋ), which corresponds to Rι zero spectral samples followed by a non-zero spectral sample having intensity of at least . This method defines entropy codes with respect to the probability of receiving certain zero run lengths along with non-zero input contrasts prior art methods, and therefore performs an RLE-type of encoding as input sequences assigned codes include runs of repeating symbols (e.g., the zero value symbols) . To create a code book for the illustrated embodiment, a preliminary step is to collect the probability of occurrence 600 for each possible pairing. The computed probabilities can then be sorted 602, and a probability threshold 51 8 (FIG. 5) applied 604. Application of the threshold operates to exclude all input pairings in FIG. 5 grid region 516. Entropy codes are then assigned 606 to remaining pairings in FIG. 5 region 508. There are various techniques available for storing and manipulating the code book. For example, one structure is storing the two-dimensional grid in permanent storage, where data retrieval is performed by identifying two indices. Thus, one can retrieve table entries by specification of a run-length and a particular symbol value. A decoding table can be implemented as a Huffman tree. Another code book implementation includes Rice-Golomb structures, and their equivalents.
FIG. 7 shows one method for encoding data with RLE-based entropy encoder of FIGS. 5 and 6. It is assumed that encoding has proceeded as illustrated in FIG. 4, until mode selector 400 determines that RLE encoding is required . As illustrated, a series of spectral coefficients are received 650. This input is scanned 652 to identify an input sequence having zero value spectral samples followed by a non-zero spectral sample. This sequence is then looked up 654 in the code book of FIG. 6, and the corresponding code is output 656.
If the particular scanned sequence 652 is not found within the code book, then it is known to have originally belonged to the low probability region 51 6 of FIG. 5. A special output symbol can be inserted into the output data stream to identify this data configuration, along with sufficient information to identify the received event (e.g., a code to identify the number of zero valued samples, followed by the non-zero sample). In the case of an input spectrum ending with N zeros, either a special ending signal is needed or a special event such as (N, 1 ) suffices because the decoder is aware the total number of samples and able to stop decoding when that limit is exceeded .
Although not explicitly illustrated, decoding operates as an inverse operation of encoding, where the encoded data 656 is looked up 654 in a corresponding FIG. 5 decoding code book, in order to recover the input sequence 652. Having described and illustrated the principles of my invention with reference to an illustrated embodiment, it will be recognized that the illustrated embodiment can be modified in arrangement and detail without departing from such principles. Accordingly, we claim as the invention all such modifications as may come within the scope and spirit of the following claims and equivalents thereto.

Claims

What is claimed is:
1 . A method of performing RLE-type encoding of an incoming sequence of audio data frequency coefficients, the method comprising: receiving a sequence of audio data frequency coefficient symbols; looking up the audio sequence within a data structure containing input sequences of symbols, where each input sequence represents a run of a first symbol having length R, adjacent to a second symbol having a value L, and where the data structure has different entropy codes assigned to each of a plurality of input sequences with different R and L values; and outputting a corresponding data structure code for the sequence; wherein RLE-type encoding is effected by assigning entropy codes to audio input sequences including the run of the first audio symbol adjacent the second audio symbol.
2. A method according to claim 1 , in which the incoming sequence of audio data frequency coefficients is received from a source, wherein R represents a length value for a run of zero value audio frequency coefficient symbols, and L represents a nonzero audio frequency coefficient.
3 A computer readable medium having encoded thereon instructions for directing a computer to perform the steps of claim 1
4. A method of decoding a sequence of entropy encoded audio data frequency coefficients, comprising: receiving an entropy code representing a sequence of audio data frequency coefficient symbols; looking up the entropy code within a data structure containing input sequences of symbols, where each input sequence represents a run of a first symbol having length R, adjacent to a second symbol having a value L, and where the data structure has different entropy codes assigned to each of a plurality of input sequences with different R and L values; and outputting the sequence of audio data frequency coefficient symbols corresponding to the entropy code
5. A method according to claim 4 for decoding output from an entropy encoder, such output determined by the encoder looking up a sequence of audio data frequency coefficient symbols in a code book and outputting an entropy code, or when such sequence is missing from the code book, outputting an escape code adjacent such missing sequence, the method comprising: determining whether the entropy code is an escape code; and when the entropy code is an escape code, identifying the sequence missing from the code book, and outputting such sequence
6. A computer readable medium having encoded thereon instructions for directing a computer to perform the steps of claim 5.
7. A method of creating an entropy code book for encoding an incoming sequence of audio data frequency coefficient symbols with an RLE-type of entropy encoder, the method comprising: creating a data structure containing input sequences of audio data frequency coefficient symbols, where each audio input sequence represents a repeating run of a first frequency coefficient symbol having length R, adjacent to a second frequency coefficient symbol having a value L, where the data structure has a plurality of audio input sequences with different R and L values; determining a probability occurrence of each audio input sequence within the incoming sequence of audio data frequency coefficient symbols; and assigning an entropy code to each input sequence according to its probability; wherein RLE-type encoding is effected by assigning entropy codes to audio input sequences including the run of the first audio symbol adjacent the second audio symbol.
8. The method of claim 7, in which the incoming sequence of audio data frequency coefficient symbols is transmitted from a source, the method further comprising: setting a probability threshold; wherein each input sequence having probability of occurrence below the probability threshold is coded with an escape code.
9. A method according to claim 8 of encoding a sequence of audio data frequency coefficients with an RLE-type entropy encoder, comprising: receiving an input sequence of audio data frequency coefficient symbols; looking up the input sequence within the data structure; and outputting a corresponding code book code for the input sequence.
10. A method according to claim 9, wherein if the input sequence has no corresponding code in the data structure, then outputting an escape code along with escape symbols identifying the input sequence.
1 1 . A method according to claim 8 of decoding an encoded sequence of audio data frequency coefficient symbols with an RLE-type decoder, comprising: receiving an entropy code representing a sequence of audio data frequency coefficient symbols; looking up the entropy code in the data structure; and outputting the sequence of audio data frequency coefficient symbols corresponding to a data structure entry for the entropy code.
12. A method of decoding according to claim 1 1 , wherein if the entropy code is an escape code, outputting a sequence of audio data frequency coefficient symbols following the escape code.
13. A method according to claim 7, wherein R represents a length value for a run of zero value audio frequency coefficient symbols.
14. A method according to claim 1 3, wnerein L represents a non-zero value for an audio frequency coefficient.
1 5. A computer readable medium having encoded thereon instructions for directing a computer to perform the steps of claim 7.
16. A system for performing RLE-type encoding of a sequence of audio data frequency coefficients, the method comprising: means for receiving a sequence of audio data frequency coefficient symbols; means for looking up the audio sequence within a data structure containing input sequences of symbols, where each input sequence represents a run of zero value symbols having length R, adjacent to a second non-zero value symbol having a value L; means for assigning different entropy codes to each of a plurality of input sequences with different R and L values; and means for outputting a corresponding data structure code for the sequence.
17. A system according to claim 1 6, further comprising: a signal transformer for converting a time-domain input signal to a frequency-domain audio sequence, and a quantizer for quantizing the frequency-domain audio sequence into the sequence of audio data frequency coefficient symbols.
1 8. A method of decoding a sequence of entropy encoded audio data frequency coefficients, comprising: means for receiving an entropy code representing a sequence of audio data frequency coefficient symbols; means for looking up the entropy code within a data structure containing input sequences of symbols, where each input sequence represents a run of zero value symbols having length R, adjacent to a second non-zero value symbol having a value L, and where the data structure has different entropy codes assigned to each of a plurality of input sequences with different R and L values; and means for outputting the sequence of audio data frequency coefficient symbols corresponding to the entropy code.
19. A system according to claim 18, in which the sequence of entropy encoded audio data frequency coefficients includes entropy codes and escape codes followed by audio data frequency coefficient symbols adjacent such escape code, the method comprising: means for determining whether the received entropy code is an escape code; and means for identifying audio data frequency coefficient symbols adjacent such escape code; and means for outputting such adjacent symbols.
PCT/US1999/029107 1998-12-14 1999-12-07 Multi-level run length coding for frequency-domain audio coding WO2000036753A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US09/211,277 US6223162B1 (en) 1998-12-14 1998-12-14 Multi-level run length coding for frequency-domain audio coding
US09/211,277 1998-12-14

Publications (1)

Publication Number Publication Date
WO2000036753A1 true WO2000036753A1 (en) 2000-06-22

Family

ID=22786243

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1999/029107 WO2000036753A1 (en) 1998-12-14 1999-12-07 Multi-level run length coding for frequency-domain audio coding

Country Status (2)

Country Link
US (1) US6223162B1 (en)
WO (1) WO2000036753A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1734511A3 (en) * 2002-09-04 2007-06-20 Microsoft Corporation Entropy coding by adapting coding between level and run-length/level modes
US7299175B2 (en) * 2001-12-14 2007-11-20 Microsoft Corporation Normalizing to compensate for block size variation when computing control parameter values for quality and rate control for digital audio
EP1470550B1 (en) * 2002-01-30 2008-09-03 Matsushita Electric Industrial Co., Ltd. Audio encoding and decoding device and methods thereof
RU2487473C2 (en) * 2008-12-03 2013-07-10 Нокиа Корпорейшн Switching between discrete cosine transform coefficient coding modes
RU2654139C2 (en) * 2013-07-22 2018-05-16 Фраунхофер-Гезелльшафт Цур Фердерунг Дер Ангевандтен Форшунг Е.Ф. Frequency-domain audio coding supporting transform length switching
RU2709656C2 (en) * 2015-06-10 2019-12-19 Гурулоджик Микросистемс Ой Encoder, decoder and method using modal symbols

Families Citing this family (61)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6300888B1 (en) * 1998-12-14 2001-10-09 Microsoft Corporation Entrophy code mode switching for frequency-domain audio coding
US6377930B1 (en) * 1998-12-14 2002-04-23 Microsoft Corporation Variable to variable length entropy encoding
DE19907729C2 (en) * 1999-02-23 2001-02-22 Fraunhofer Ges Forschung Method and device for generating a data stream from code words of variable length and method and device for reading a data stream from code words of variable length
US6523124B1 (en) * 1999-04-23 2003-02-18 Palm, Inc. System and method for detection of an accessory device connection status
US6718507B1 (en) * 2000-09-12 2004-04-06 At&T Corp. System and method for representing compressed information
US20060271441A1 (en) * 2000-11-14 2006-11-30 Mueller Raymond J Method and apparatus for dynamic rule and/or offer generation
US7076108B2 (en) * 2001-12-11 2006-07-11 Gen Dow Huang Apparatus and method for image/video compression using discrete wavelet transform
US6934677B2 (en) * 2001-12-14 2005-08-23 Microsoft Corporation Quantization matrices based on critical band pattern information for digital audio wherein quantization bands differ from critical bands
US8401084B2 (en) * 2002-04-01 2013-03-19 Broadcom Corporation System and method for multi-row decoding of video with dependent rows
GB2388502A (en) * 2002-05-10 2003-11-12 Chris Dunn Compression of frequency domain audio signals
US7016547B1 (en) 2002-06-28 2006-03-21 Microsoft Corporation Adaptive entropy encoding/decoding for screen capture content
US7433824B2 (en) * 2002-09-04 2008-10-07 Microsoft Corporation Entropy coding by adapting coding between level and run-length/level modes
US8218624B2 (en) * 2003-07-18 2012-07-10 Microsoft Corporation Fractional quantization step sizes for high bit rates
US7738554B2 (en) 2003-07-18 2010-06-15 Microsoft Corporation DC coefficient signaling at small quantization step sizes
US7580584B2 (en) * 2003-07-18 2009-08-25 Microsoft Corporation Adaptive multiple quantization
US7343291B2 (en) * 2003-07-18 2008-03-11 Microsoft Corporation Multi-pass variable bitrate media encoding
US7602851B2 (en) * 2003-07-18 2009-10-13 Microsoft Corporation Intelligent differential quantization of video coding
US10554985B2 (en) 2003-07-18 2020-02-04 Microsoft Technology Licensing, Llc DC coefficient signaling at small quantization step sizes
US7383180B2 (en) * 2003-07-18 2008-06-03 Microsoft Corporation Constant bitrate media encoding techniques
US7688894B2 (en) * 2003-09-07 2010-03-30 Microsoft Corporation Scan patterns for interlaced video content
US7724827B2 (en) * 2003-09-07 2010-05-25 Microsoft Corporation Multi-layer run level encoding and decoding
US7782954B2 (en) * 2003-09-07 2010-08-24 Microsoft Corporation Scan patterns for progressive video content
KR100561869B1 (en) * 2004-03-10 2006-03-17 삼성전자주식회사 Lossless audio decoding/encoding method and apparatus
US7801383B2 (en) * 2004-05-15 2010-09-21 Microsoft Corporation Embedded scalar quantizers with arbitrary dead-zone ratios
US8422546B2 (en) * 2005-05-25 2013-04-16 Microsoft Corporation Adaptive video encoding using a perceptual model
US7684981B2 (en) * 2005-07-15 2010-03-23 Microsoft Corporation Prediction of spectral coefficients in waveform coding and decoding
US7599840B2 (en) * 2005-07-15 2009-10-06 Microsoft Corporation Selectively using multiple entropy models in adaptive coding and decoding
US7693709B2 (en) * 2005-07-15 2010-04-06 Microsoft Corporation Reordering coefficients for waveform coding or decoding
US7565018B2 (en) * 2005-08-12 2009-07-21 Microsoft Corporation Adaptive coding and decoding of wide-range coefficients
US8599925B2 (en) * 2005-08-12 2013-12-03 Microsoft Corporation Efficient coding and decoding of transform blocks
US7933337B2 (en) * 2005-08-12 2011-04-26 Microsoft Corporation Prediction of transform coefficients for image compression
US20070094579A1 (en) * 2005-10-07 2007-04-26 Miguel Cerrato Sanchez Method for handling audio packet loss in a windows® media decoder
US8503536B2 (en) * 2006-04-07 2013-08-06 Microsoft Corporation Quantization adjustments for DC shift artifacts
US7995649B2 (en) 2006-04-07 2011-08-09 Microsoft Corporation Quantization adjustment based on texture level
US8130828B2 (en) 2006-04-07 2012-03-06 Microsoft Corporation Adjusting quantization to preserve non-zero AC coefficients
US7974340B2 (en) * 2006-04-07 2011-07-05 Microsoft Corporation Adaptive B-picture quantization control
US8059721B2 (en) 2006-04-07 2011-11-15 Microsoft Corporation Estimating sample-domain distortion in the transform domain with rounding compensation
US8711925B2 (en) 2006-05-05 2014-04-29 Microsoft Corporation Flexible quantization
US8238424B2 (en) 2007-02-09 2012-08-07 Microsoft Corporation Complexity-based adaptive preprocessing for multiple-pass video compression
US8184710B2 (en) * 2007-02-21 2012-05-22 Microsoft Corporation Adaptive truncation of transform coefficient data in a transform-based digital media codec
US8498335B2 (en) * 2007-03-26 2013-07-30 Microsoft Corporation Adaptive deadzone size adjustment in quantization
US8243797B2 (en) * 2007-03-30 2012-08-14 Microsoft Corporation Regions of interest for quality adjustments
US8442337B2 (en) * 2007-04-18 2013-05-14 Microsoft Corporation Encoding adjustments for animation content
KR100889750B1 (en) * 2007-05-17 2009-03-24 한국전자통신연구원 Audio lossless coding/decoding apparatus and method
US8331438B2 (en) 2007-06-05 2012-12-11 Microsoft Corporation Adaptive selection of picture-level quantization parameters for predicted video pictures
US7774205B2 (en) * 2007-06-15 2010-08-10 Microsoft Corporation Coding of sparse digital media spectral data
US8189933B2 (en) * 2008-03-31 2012-05-29 Microsoft Corporation Classifying and controlling encoding quality for textured, dark smooth and smooth video content
US8179974B2 (en) 2008-05-02 2012-05-15 Microsoft Corporation Multi-level representation of reordered transform coefficients
US8325800B2 (en) 2008-05-07 2012-12-04 Microsoft Corporation Encoding streaming media as a high bit rate layer, a low bit rate layer, and one or more intermediate bit rate layers
US8379851B2 (en) 2008-05-12 2013-02-19 Microsoft Corporation Optimized client side rate control and indexed file layout for streaming media
US8370887B2 (en) 2008-05-30 2013-02-05 Microsoft Corporation Media streaming with enhanced seek operation
US8897359B2 (en) * 2008-06-03 2014-11-25 Microsoft Corporation Adaptive quantization for enhancement layer video coding
US8406307B2 (en) 2008-08-22 2013-03-26 Microsoft Corporation Entropy coding/decoding of hierarchically organized data
US8265140B2 (en) * 2008-09-30 2012-09-11 Microsoft Corporation Fine-grained client-side control of scalable media delivery
US7804428B2 (en) * 2008-11-10 2010-09-28 Apple Inc. System and method for compressing a stream of integer-valued data
US20120014433A1 (en) * 2010-07-15 2012-01-19 Qualcomm Incorporated Entropy coding of bins across bin groups using variable length codewords
EP2745211B8 (en) 2011-08-19 2019-07-17 General Harmonics International Inc. Multi-structural, multi-level information formalization and structuring method, and associated apparatus
US9823892B2 (en) * 2011-08-26 2017-11-21 Dts Llc Audio adjustment system
WO2014120368A1 (en) * 2013-01-30 2014-08-07 Intel Corporation Content adaptive entropy coding for next generation video
US10069519B1 (en) * 2018-01-23 2018-09-04 Mitsubishi Electric Research Laboratories, Inc. Partition based distribution matcher for probabilistic constellation shaping
EP3935581A4 (en) 2019-03-04 2022-11-30 Iocurrents, Inc. Data compression and communication using machine learning

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0612156A2 (en) * 1989-04-17 1994-08-24 Fraunhofer-Gesellschaft Zur Förderung Der Angewandten Forschung E.V. Digital coding method
US5825830A (en) * 1995-08-17 1998-10-20 Kopf; David A. Method and apparatus for the compression of audio, video or other data
US5831559A (en) * 1996-01-24 1998-11-03 Intel Corporation Encoding/decoding video signals using multiple run-val mapping tables

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61107818A (en) 1984-10-30 1986-05-26 Nec Corp Entropy coding system and its device
JPH0821863B2 (en) 1985-04-13 1996-03-04 キヤノン株式会社 Data processing method
JPS62247626A (en) 1986-04-19 1987-10-28 Fuji Photo Film Co Ltd Coding method
US4862167A (en) 1987-02-24 1989-08-29 Hayes Microcomputer Products, Inc. Adaptive data compression method and apparatus
US5227789A (en) 1991-09-30 1993-07-13 Eastman Kodak Company Modified huffman encode/decode system with simplified decoding for imaging systems
JP3134424B2 (en) 1991-10-31 2001-02-13 ソニー株式会社 Variable length encoding method and apparatus
US5400075A (en) 1993-01-13 1995-03-21 Thomson Consumer Electronics, Inc. Adaptive variable length encoder/decoder
JP3210996B2 (en) 1993-07-30 2001-09-25 三菱電機株式会社 High efficiency coding device and high efficiency decoding device
US5550541A (en) 1994-04-01 1996-08-27 Dolby Laboratories Licensing Corporation Compact source coding tables for encoder/decoder system
US5552832A (en) 1994-10-26 1996-09-03 Intel Corporation Run-length encoding sequence for video signals
US5884269A (en) 1995-04-17 1999-03-16 Merging Technologies Lossless compression/decompression of digital audio data
US5819215A (en) * 1995-10-13 1998-10-06 Dobson; Kurt Method and apparatus for wavelet based data compression having adaptive bit rate control for compression of digital audio or other sensory data
JP3267142B2 (en) 1996-02-23 2002-03-18 ケイディーディーアイ株式会社 Variable length code generator
DE19637522A1 (en) 1996-09-13 1998-03-19 Bosch Gmbh Robert Process for reducing data in video signals
US5959560A (en) 1997-02-07 1999-09-28 Said; Amir Data compression via alphabet partitioning and group partitioning
US5999949A (en) 1997-03-14 1999-12-07 Crandall; Gary E. Text file compression system utilizing word terminators
US5946043A (en) 1997-12-31 1999-08-31 Microsoft Corporation Video coding using adaptive coding of block parameters for coded/uncoded blocks
US6029126A (en) * 1998-06-30 2000-02-22 Microsoft Corporation Scalable audio coder and decoder

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0612156A2 (en) * 1989-04-17 1994-08-24 Fraunhofer-Gesellschaft Zur Förderung Der Angewandten Forschung E.V. Digital coding method
US5825830A (en) * 1995-08-17 1998-10-20 Kopf; David A. Method and apparatus for the compression of audio, video or other data
US5831559A (en) * 1996-01-24 1998-11-03 Intel Corporation Encoding/decoding video signals using multiple run-val mapping tables

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TEWFIK A H ET AL: "ENHANCED WAVELET BASED AUDIO CODER", PROCEEDINGS OF THE ASILOMAR CONFERENCE,US,NEW YORK, IEEE, 1993, pages 896 - 900, XP000438425 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7299175B2 (en) * 2001-12-14 2007-11-20 Microsoft Corporation Normalizing to compensate for block size variation when computing control parameter values for quality and rate control for digital audio
EP1470550B1 (en) * 2002-01-30 2008-09-03 Matsushita Electric Industrial Co., Ltd. Audio encoding and decoding device and methods thereof
EP1734511A3 (en) * 2002-09-04 2007-06-20 Microsoft Corporation Entropy coding by adapting coding between level and run-length/level modes
EP2006840A1 (en) * 2002-09-04 2008-12-24 Microsoft Corporation Entropy coding by adapting coding between level and run-length/level modes
RU2487473C2 (en) * 2008-12-03 2013-07-10 Нокиа Корпорейшн Switching between discrete cosine transform coefficient coding modes
RU2654139C2 (en) * 2013-07-22 2018-05-16 Фраунхофер-Гезелльшафт Цур Фердерунг Дер Ангевандтен Форшунг Е.Ф. Frequency-domain audio coding supporting transform length switching
US10242682B2 (en) 2013-07-22 2019-03-26 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Frequency-domain audio coding supporting transform length switching
US10984809B2 (en) 2013-07-22 2021-04-20 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Frequency-domain audio coding supporting transform length switching
US11862182B2 (en) 2013-07-22 2024-01-02 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Frequency-domain audio coding supporting transform length switching
RU2709656C2 (en) * 2015-06-10 2019-12-19 Гурулоджик Микросистемс Ой Encoder, decoder and method using modal symbols

Also Published As

Publication number Publication date
US6223162B1 (en) 2001-04-24

Similar Documents

Publication Publication Date Title
US6223162B1 (en) Multi-level run length coding for frequency-domain audio coding
EP1330038B1 (en) Frequency-domain audio decoding with entropy code mode switching
EP1142129B1 (en) Variable to variable length entropy encoding
EP2267698B1 (en) Entropy coding by adapting coding between level and run-length/level modes.
CN100367348C (en) Low bit-rate audio coding
US7433824B2 (en) Entropy coding by adapting coding between level and run-length/level modes
US6157326A (en) Method of and device for coding a digital information signal
EP1187338A2 (en) Method and apparatus for performing variable-size vector entropy coding
JP2013250563A (en) Entropy coding by adapting coding between level mode and run-length/level mode
JP3353868B2 (en) Audio signal conversion encoding method and decoding method
KR100723400B1 (en) Apparatus and method for encoding digital signal using plural look up table
JPH0934493A (en) Acoustic signal encoding device, decoding device, and acoustic signal processing device

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
122 Ep: pct application non-entry in european phase