Patent Publication Number: US-5832443-A

Title: Method and apparatus for adaptive audio compression and decompression

Description:
BACKGROUND OF THE INVENTION 
     Field of the Invention 
     The invention relates to the field of data compression and decompression. More specifically, the invention relates to compression and decompression of audio data representing an audio signal, wherein the audio signal can be speech, music, etc. 
     Background Information 
     To allow typical computing systems to process (e.g., store, transmit, etc.) audio signals, various techniques have been developed to reduce (compress) the amount of data required to represent an audio signal. In typical audio compression systems, the following steps are generally performed: (1) a segment or frame of an audio signal is transformed into a frequency domain; (2) transform coefficients representing (at least a portion of) the frequency domain are quantized into discrete values; and (3) the quantized values are converted (or coded) into a binary format. The encoded/compressed data can be output, stored, transmitted, and/or decoded/decompressed. 
     To achieve relatively high compression/low bit rates (e.g., 8 to 16 kbps) for various types of audio signals (e.g., speech, music, etc.), some compression techniques (e.g., CELP, ADPCM, etc.) limit the number of components in a segment (or frame) of an audio signal which is to be compressed. Unfortunately, such techniques typically do not take into account relatively substantial components of an audio signal. Thus, such techniques result in a relatively poor quality synthesized (decompressed) audio signal due to loss of information. 
     One method of audio compression that allows relatively high quality compression/decompression involves transform coding (e.g., discrete cosine transform, Fourier transform, etc.). Transform coding typically involves transforming an input audio signal using a transform method, such as low order discrete cosine transform (DCT). Typically, each transform coefficient of a portion (or frame) of an audio signal is quantized and encoded using any number of well-known coding techniques. Transform compression techniques, such as DCT, generally provide a relatively high quality synthesized signal, since a relatively high number of spectral components of an input audio signal are taken into consideration. Unfortunately, transform audio compression techniques require a relatively large amount of computation, and also require relatively high bit rates (e.g., 32 kbps). 
     Thus, what is desired is a system that achieves relatively high quality compression and/or decompression of audio data using a relatively low bit rate (e.g., 8 . . . 16 kbps). 
     SUMMARY 
     A method and apparatus for compression and decompression of an audio signal is provided. According to one aspect of the invention, a set of binary vectors are generated for digitizing the audio signal with fixed rate adaptive quantization. According to another aspect of the invention, digitized audio data representing the audio signal is combinatorially encoded. According to yet another aspect of the invention, combinatorially encoded audio data is decoded. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention may best be understood by referring to the following description and accompanying drawings which illustrate embodiments of the invention. In the drawings: 
     FIG. 1 is a flow diagram illustrating a method for compression of audio data according to one embodiment of the invention; 
     FIG. 2 is a flow diagram illustrating a method for performing fixed rate adaptive quantization according to one embodiment of the invention; 
     FIG. 3 is an exemplary data flow diagram illustrating vector formation for fixed rate adaptive quantization according to one embodiment of the invention; 
     FIG. 4A is data flow diagrams illustrating part of the transformation of the exemplary rank vector of FIG. 3 into a set of binary rank vectors according to one embodiment of the invention; 
     FIG. 4B is data flow diagrams illustrating another part of the transformation of the exemplary rank vector of FIG. 3 into a set of binary rank vectors according to one embodiment of the invention; 
     FIG. 5 is a block diagram of an audio data compression system according to one embodiment of the invention; FIG. 6 is a block diagram of the fixed rate adaptive quantization unit from FIG. 5 according to one embodiment of the invention; FIG. 7 is a flow diagram illustrating a method for decompression of audio data according to one embodiment of the invention; and 
     FIG. 8 is a block diagram of an audio data decompression system according to one embodiment of the invention. 
    
    
     DETAILED DESCRIPTION 
     The invention provides a method and apparatus for compression of audio signals (audio is used heretofore to refer to music, speech, background noise, etc.). In particular, the invention achieves a relatively low compression bit rate of audio data while providing a relatively high quality synthesized (decompressed) audio signal. In the following description, numerous specific details are set forth to provide a thorough understanding of the invention. However, it is understood that the invention may be practiced without these details. In other instances, well-known circuits, structures, timing, and techniques have not been shown in detail in order not to obscure the invention. 
     In one embodiment of the invention, an input audio signal is filtered, and considered as a sequence of digitized samples at a predetermined sample rate. For example, one embodiment uses a sample rate in the range of 8 to 16 kbps. The sequence is partitioned into overlapping &#34;frames&#34; that correspond to portions of the input audio signal. The samples in each frame are transformed using a Fast Fourier Transform. The most substantial transform coefficients (those that exert the most influence on tone quality of an audio signal) are re-ordered and quantized using a fixed rate quantizer that adaptively scales quantization based on characteristics of the input audio signal. The resulting data from the fixed rate quantizer is converted into binary vectors each having a predetermined length and a predetermined number of ones. These binary vectors are then encoded using a combinatorial coding technique. The encoded audio data is further compressed into a bit stream which may be stored, transmitted, decoded, etc. 
     The invention further provides a method and apparatus for decompression of audio data. In one embodiment of the invention, compressed audio data is received in a bit stream. An audio signal is restored by performing inverse combinatorial coding and inverse Fast Fourier Transform (IFFT) coding on encoded audio data contained in the bit stream. Samples within overlapping frame regions are interpolated, thereby increasing the relative quality of the synthesized signal. In one embodiment, the synthesized signal is further filtered before it is output to be amplified, stored, etc. 
     COMPRESSION 
     Overview of Data Compression According to One Embodiment of the Invention 
     FIG. 1 is a flow diagram illustrating a method for compression of audio data according to one embodiment of the invention. Flow begins in step 110, and control passes to step 112. 
     In step 112, an input audio signal is received, filtered, and divided into frames. In one embodiment, the audio sequence is filtered using an anti-aliasing low pass filter, sampled at a frequency of approximately 8000 Hz or greater, and digitized into 8 or 16 binary bits. The input audio signal is processed by a filter emphasizing high spectrum frequencies. An exemplary filter utilized in one embodiment of the invention is described in further detail below. The filtered sequence is divided into overlapping frames (or segments) each containing N samples. While one embodiment is described wherein the input audio signal is filtered prior to data compression, alternative embodiments do not necessarily filter the input audio signal. Furthermore, alternative embodiments of the invention could perform sampling at any frequency and/or digitize samples into any length of binary bits. 
     From step 112, control passes to step 114. In step 114, the frames are transformed. In one embodiment, the frames are transformed two at a time using a discrete (Fast) Fourier Transform (FFT) technique described in further detail below. Although each transformed frame has N coefficients (each coefficient having a real component and an imaginary component), only N/2+1 coefficients need to be calculated (the second N/2 real components are the same as the first N/2 real components in reversed order, while the second N/2 imaginary components are the same as the first N/2 imaginary components in reversed order and taken with a minus sign). It should be appreciated that while one embodiment of the invention performs a (Fast) Fourier Transform, alternative embodiments may use any number of transform techniques. Yet other embodiments do not necessarily perform a transform technique. 
     Once a frame transformation is completed in step 114, steps 116-128 are performed on the transformed frame. Although steps 116-128 are performed separately on each transformed frame, embodiments can be implemented that perform steps 116-128 on multiple transformed frames in parallel. In step 116, the most substantial No spectral (transform) coefficients are selected from the N/2+1 coefficients representing the transformed frame. To select the most substantial N 0  spectral coefficients, the transform coefficients are sorted in accordance with a predetermined criteria. For example, in one embodiment, the N/2 +1 transform coefficients are sorted by decreasing absolute values. In an alternative embodiment, the sum of absolute values of the real and the imaginary parts of the transform coefficients are used to sort the coefficients. Thus, any number of techniques may be used to sort the transform coefficients. Furthermore, it should be appreciated that alternative embodiments of the invention do not necessarily sort the transform coefficients. While one embodiment of the invention determines the number N 0  adaptively depending on characteristics of the current frame of the input audio signal, alternative embodiments use a fixed value for N 0 . Using relatively large values of N 0  typically results in relatively &#34;rough&#34; quantization which may be more suitable for wideband frames, while using relatively smaller values of N 0  results in relatively precise quantization which may be more appropriate for narrowband frames. One embodiment uses a value for N 0  in the range of 30 . . . 70 for N=256. Using N 0  =30 typically yields a bit rate of approximately 8 kbps, while using N 0  =70 typically results in a bit rate of approximately 16 kbps. 
     While one embodiment of the invention selects only some of the transform coefficients, alternative embodiments can be implemented to sometimes or always select all of the transform coefficients. Furthermore, alternative embodiments do not necessarily select the most substantial transform coefficients (e.g., other criteria may be used to select from the transform coefficients). 
     From step 116, control passes to steps 118, 122 and 124. In step 118, a location vector is created identifying the locations of the selected transform coefficients relative to the frame. In one embodiment, the location vector is a binary vector having ones in positions corresponding to the selected coefficients and zeros in the positions corresponding to the unselected coefficients. As a result, the location vector has a predetermined length (N/2+1) and contains a predetermined number (N 0 ) of ones. In alternative embodiments, any number of techniques could be used to identify the selected/unselected coefficients. From step 118, control passes to step 120. In step 120, the location vector is encoded using combinatorial encoding, as will be described in greater detail below, and control passes to step 128. 
     In step 122, a sign vector is created identifying the signs of the selected transform coefficients. In one embodiment, the sign vector is a binary vector having ones in the relative locations of the positive coefficients and zeros in the relative locations of the negative coefficients. From step 122 control passes to step 128. 
     In step 124, a magnitude vector is created that comprises the absolute values of the selected transform coefficients. Using the magnitude vector, as well as a composition book and a quantization scale book, a rank vector and an indicator vector are also created in step 124. The rank vector and indicator vector provide a fixed rate quantization (of the absolute values of the magnitudes) of the transform coefficients. The rank vector is then converted into a set of binary rank vectors. Step 124 will be described in further detail with reference to FIGS. 2 and 3. From step 124, control passes to step 126 wherein the set of binary rank vectors and indicator vector are encoded using combinatorial encoding, and control passes to step 128. 
     In step 128, the sign vector and the combinatorially encoded location, rank, and indicator vectors are multiplexed into a bit stream to provide additional data compression, and control passes to step 130 wherein the bit stream is output. The output bit stream may be stored, transmitted, decoded, etc. 
     From step 130, control passes to step 132 where flow ends. 
     Pre-Filtering (Step 112) 
     In one embodiment, the cutoff frequency of the filter used in step 112 is approximately equal to half of the sampling frequency. For example, assuming that {s i  } and (y i  } are input and output sequences of the filter, respectively, for i=0,1,2, . . . , then 
     
         s(D)=s.sub.0 +s.sub.1 D+s.sub.2 D.sup.2 +. . . 
    
     
         y(D)=y.sub.0 +y.sub.1 D+y.sub.2 D.sup.2 +. . . , 
    
     are generating functions for input and output signals, respectively, where D is a formal variable. Also assuming that h(D) is a transfer function of the filter, then 
     
         y(D)=h(D)s(D). 
    
     For example, in one embodiment of the invention, a filter of the order L (L is assumed to be even) having a pulse response given by 
     
         h(D)=-(A/L)-(A/L)D-(A/L)D.sup.2 -. . .-(A/L)D.sup.L/2 +D.sup.L/2 +1 -(A/L)D.sup.L/2+2 -. . .-(A/L)D.sup.L 
    
     is used, where L=16 and A=1. In an alternative embodiment, A=1/2. 
     Since a limited number of transform coefficients are quantized and encoded, it s desirable to use the transform coefficients which contain the most significant portion(s) of the signal energy (i.e., the components of the audio signal which contribute most to audible quality). A preliminary filtration of the input sequence by a filter such as the one described above makes it possible to reduce compression bit rates since most of the energy of the filtered signal is concentrated in a relatively smaller number of values (e.g., transform coefficients) that will be encoded. In addition the above filter can be performed using integer arithmetic and does not require multiplication operations, and therefore, a lower cost implementation is possible. 
     While one type of filter has been described for filtering an input audio signal, alternative embodiments of the invention may use any number of types of filters and/or any number of values for the coefficients (e.g., A, L, etc.). Furthermore, alternative embodiments of the invention do not necessarily filter an input audio signal prior to encoding. 
     Fast Fourier Transform (Step 114) 
     As described above with respect to step 114, each frame in the filtered sequence contains N samples. Furthermore, successive frames overlap in M samples to prevent edge effects (Gibbs effect). Thus, each (current) frame that is processed comprises N-M &#34;new&#34; samples, since M samples overlap with a portion of the previous frame (unless the current frame is the first frame in the sequence of frames). In one embodiment, the values N=256 and M=8 are used. 
     The samples are transformed using a (Fast) Fourier Transform technique. The Fourier transform coefficients Y k  are calculated in step 114 using the equation ##EQU1## where j=√-1, and Y i  represents the samples of the signal in the current frame. 
     Using a Fast Fourier Transform (FFT) algorithm, some of the transform coefficients are expressed using predetermined values for other coefficients, since the input sequence {y i  } is a real sequence. The symmetrical identity, 
     
         Y.sub.k =Y*.sub.N-k k=0,1, . . . ,N-1 
    
     wherein Y* denotes the complex conjugate of Y, provides a relatively efficient method for determining values for the transform coefficients. Since the sequence repeats itself or the complex conjugate of itself, only half of the transform coefficients need to be calculated for k=0,1, . . . , N/2 because the other half of the transform coefficients can be determined using the above identity. 
     Furthermore, transform coefficients can be calculated for two successive frames simultaneously. For example, taking samples of a first frame to represent the real portion of the (filtered) input sequence and samples of a second frame to represent the imaginary portion of the input sequence, then 
     
         x.sub.i =Y.sub.i.sup.(1) +jy.sub.i.sup.(2), 
    
     where y i .sup.(1) and y i .sup.(2) are the samples of the first and second frames, respectively, for i=0, 1, . . . ,N-1 and where x i  represents the result of combining the samples for the two successive frames. 
     Finally, values of transform coefficients for the first and second frames are calculated as follows: 
     
         Y.sub.k.sup.(1) =(X.sub.k +X*.sub.N-k)/2 
    
     
         Y.sub.k.sup.(2) =(X.sub.k -X*.sub.N-k)/2j 
    
     where 
     
         k=0,1, . . . ,N/2, for even N 
    
     and 
     
         k=0,1,2, . . . ,(N-1)/2, for odd N 
    
     and X k  denotes a result of the transformation of X i . 
     The FFT approach described above saves a relatively substantial amount of computational complexity relative to systems using the discrete cosine transform (DCT) method. Furthermore, by utilizing FFT, the number of bits required to transmit an allocation of selected spectrum coefficients is reduced. Base on the symmetrical nature of the transformed coefficients, the main No spectral coefficients (i.e., those representing the most audibly significant components of the input audio signal) are selected among N/2+1 spectral coefficients instead of all N coefficients as required for DCT. Again, the savings in computation and data bandwidth resulting from the FFT approach is mostly due to the symmetry of the above described identities. However, it should be appreciated that alternative embodiments may use any number of transform techniques or may not use any transform technique prior to encoding. 
     Fixed Rate Adaptive Quantization 
     FIG. 2 is a flow diagram illustrating a method for performing fixed rate adaptive quantization according to one embodiment of the invention, while FIG. 3 is an exemplary data flow diagram illustrating vector formation for fixed rate adaptive quantization according to one embodiment of the invention. FIG. 2 is described with reference to FIG. 3 to aid in the understanding of the invention. It should be understood that the values and dimensions of the vectors shown in FIG. 3 are exemplary, and thus, are meant only to illustrate the principle(s) of fixed rate adaptive quantization according to one embodiment of the invention. 
     From step 116, control passes to step 210. In step 210, a magnitude vector m=(m 1 , . . . m 2  N 0 ) is created, which magnitude vector m comprises the absolute values of the real and imaginary components of the N 0  selected transform coefficients, and control passes to step 212. FIG. 3 illustrates an exemplary magnitude vector (m) 312. 
     In step 212, a composition vector c=(C 1 , . . . C q ) is selected from a set of composition vectors contained in a composition codebook. In one embodiment, the composition codebook contains three compositions, and within each composition ##EQU2## The selected composition vector c is used for creating a rank vector l(m,c)=(l 1 , . . . l 2N   0 ) representing groupings of the magnitudes in the magnitude vector m based on the relative values of the selected coefficients. For example, the c 1  largest magnitudes are selected for group 1, the c 2  largest remaining magnitudes are selected for group 2, etc. To provide an example, we now turn to FIG. 3. 
     FIG. 3 illustrates an exemplary composition vector 310 having three coordinates (c 1 , c 2 , C 3 ) and an exemplary rank vector having coordinates (l 1 , l 2 , l 3 , l 4 , l 5 , l 6 ). As shown in FIG. 3, c 1  is &#34;2&#34; and the two largest magnitudes in the magnitude vector 312 (the m 1  and m 5  coordinates) are grouped together as group 1 (illustrated by a circled 1 in FIG. 3). Accordingly, a &#34;1&#34; is placed in the corresponding l 1  and l 5  coordinates of the rank vector 314 to identify the corresponding m 1  and m 5  coordinates of the magnitude vector 312 are in the first group (i.e., the group comprising the two largest relative values of the coordinates in the magnitude vector 312). Similarly, the c 2  coordinate is &#34;1&#34; and the next (one) largest magnitude (m 2 ) of the remaining magnitudes (m 2 , m 3 , m 4 , m 6 ) in the magnitude vector 312 is placed in group 2 (illustrated by a circled 2 in FIG. 3). Thus, a &#34;2&#34; is placed in the rank vector 314 at the corresponding l 2  coordinate. In a similar manner, the c 3  coordinate of the composition vector 310 is &#34;3&#34; and the remaining three largest coordinates (m 3 , m 4 , m 6 ) are placed in group 3 (illustrated by a circled 3 in FIG. 3). Accordingly, a &#34;3&#34; is placed in the rank vector 314 at the l 3 , l 4 , and l 6  locations, which correspond to m 3 , m 4 , and m 6  (the third largest of the remaining values in the magnitude vector), respectively, of the magnitude vector 312. 
     In step 214, the magnitudes of the selected coefficients in each group, as determined by the composition vector c, are averaged to create an average vector a=(a 1 , . . . a q ). Again, referring to FIG. 3 an average vector 316 is shown. The average vector 316 is created by averaging values of the magnitude vector 312 according to the composition vector 310 (i.e., values in the magnitude vector 312 in the same rank group in the rank vector 314 are averaged). For example, since the first composition group (c 1 ) comprises the values of the coordinates m 1  and m 5  of the magnitude vector 312, the values of m 1  and m 5  --namely, 8.7 and 6.4, respectively--are averaged to obtain the first coordinate (7.6) of the average vector 316. The second and third (a 2 , a 3 ) coordinates of the average vector 316 are obtained in a similar manner. 
     From step 214, control passes to step 216. In step 216, a quantization scale s=(s 1 , . . . s Q ) is selected from a quantization scale codebook, and using values in the selected quantization scale s that approximate values in the average vector a, a quantized average vector a is formed, and control passes to step 218. Referring again to FIG. 3, the quantization scale 318 is used for mapping (quantizing) values in the average vector 316 . For example, the a 1  value 7.6 in the average vector 316 is quantized using the value 7.5 in the quantization scale 318. Similarly, the a 2  value 3.2 in the average vector 316 is quantized by using the values 3.4 in the quantized scale 318, etc. Thus, the quantized average vector a is (7.5, 3.4, 1.8). In one embodiment, the quantization scale codebook contains eight quantization scales that differ in scaling factors. 
     In step 218, quantization error E associated with the selected pair of the composition vector c and the quantization scale s is determined by the formula ##EQU3## for each pair (c, s). From step 218, control passes to step 220. 
     In step 220, if all of the compositions and quantization scales have been tested (for minimization of error), control passes to step 222. However, if all of the compositions and quantization scales have not been tested, control returns to step 212. 
     In step 222, the optimum composition vector and quantization scale pair (c, s) that minimizes quantization error is selected, and control passes to step 224. While the flow diagram in FIG. 2 illustrates that one composition vector/quantization scale pair is selected from sets containing multiple composition vectors and quantization scales, embodiments can be implemented in which the set of composition vectors and/or the set of quantization scales sometimes or always contain a single entry. If the set of composition vectors and/or the set of quantization scales currently contains a single entry, the flow diagram in FIG. 2 is altered accordingly. As an example, if both the set of composition vectors and the set of quantization scales contain a single entry, step 218, 220, and 222 need not be performed and flow passes directly from step 216 to step 224. 
     In step 224, the selected composition vector and quantization scale are used in creating a binary indicator vector f(m,c,s)=(f 1 , . . . f Q ). The indicator vector f identifies values in the optimum quantization scale used to quantize the average vector a. With reference to FIG. 3, an exemplary indicator vector 320 is shown. The indicator vector 320 is a binary vector that identifies values in the quantization scale 318 that are used for mapping (quantizing) values in the average vector 316. For example, a &#34;1&#34; is placed in coordinates of the indicator vector 320 that correspond to the coordinates of the values 1.0, 3.4, and 7.5, which are used to quantize the three values (corresponding to the coordinates a 1 , a 2 , a 3 ) of the average vector 316. Since the selected quantization scale s=(s 1 ,s 2 , . . . s Q ) has Q entries, the indicator vector f has Q entries. In addition, since the selected composition vector c=(c 1 ,c 2 , . . . c q ) has q groups, the indicator vector f contains q ones. Since the indicator vector f has a predetermined length and contains a predetermined number of ones for the selected composition vector and quantization scale pair (c,s), the indicator vector can be combinatorily encoded in step 126. From step 224, control passes to step 226. 
     In step 226, the rank vector for the selected composition is converted into a set of binary rank vectors and control passes to step 126. In one embodiment, the rank vector is converted into a set of binary rank vectors by creating a binary rank vector for each group (except the last group) indicating the magnitudes in that group. For example, the binary rank vector for group 1 is of the same dimension as the rank vector and has ones only in the relative positions of the magnitudes in group 1; the binary rank vector for group 2 has 2N 0  -c 1  entries (the dimension of the rank vector without the group 1 entries) and has ones only in the relative positions of the magnitudes in group 2; . . . the binary vector for group (q-1) has 2N 0- (c 1  +. . .+c q-2 ) entries and has ones only in the relative positions of the magnitudes in group (q-1). Group q is the remaining magnitudes and a binary rank vector is not required (however, alternatives embodiments could generate one). Each binary rank vector is of a predetermined length and contains a predetermined number of ones. For example, the first binary vector has length 2N 0  (one entry for each magnitude) and contains c 1  ones (the number of magnitudes in group 1); the second binary vector has length 2N 0  -c 1  (one entry for each magnitude minus the number of magnitudes in group 1) and contains c 2  ones (the number of magnitudes in group 2); etc. Since each binary rank vector has a predetermined length and a predetermined number of ones, the set of binary vectors can be combinatorially encoded in step 126. 
     FIGS. 4A and 4B are data flow diagrams illustrating the transformation of the exemplary rank vector of FIG. 3 into a set of binary rank vectors according to one embodiment of the invention. FIG. 4A includes the rank vector 314 and a first binary rank vector 412, which is the same dimension as the rank vector 314. The first binary rank vector 412 is formed by placing a &#34;1&#34; in coordinates (b 1  and b 5 ) corresponding to the coordinates in the rank vector 314 containing &#34;1s&#34; (l 1  and l 5 ). As shown, zeros are placed into the remaining coordinates (b 2 , b 3 , b 4 , b 6 ) of the first binary rank vector 412. 
     FIG. 4B is a data flow diagram further illustrating the transformation of the rank vector into a set of binary rank vectors according to one embodiment of the invention. FIG. 4B includes a &#34;remaining&#34; rank vector 420 that represents the rank vector 314 without the magnitudes in group 1. FIG. 4B further includes a second binary rank vector 422. The second binary rank vector 422 is formed in a similar manner as the first binary rank vector 412. However, since the first group (denoted by &#34;1&#39;s&#34;) in the original rank vector 314 have been used to create the first binary rank vector 412, &#34;1&#39;s&#34; are placed into coordinates in the second binary rank vector 422 that correspond to the &#34;2&#39;s&#34; (of which there is only one) in the &#34;remaining&#34; rank vector 420. Again, zeros are placed into the remaining coordinates in the second binary rank vector 422. 
     Since it is known that the remaining magnitudes are in group 3, a third binary rank vector is not required Thus, the first binary rank vector 412 (1, 0, 0, 0, 1) and the second binary rank vector 422 (1, 0, 0, 0) identify the (non-binary) rank vector 314. 
     It should be appreciated that while one embodiment has been described wherein a set of binary rank vectors are formed using positive logic, alternative embodiments may utilize negative logic to form the set of binary rank vectors. 
     To illustrate another example, assuming a magnitude vector of 
     m=(2.6, 1.2, 6.3, 3.3, 4.5, 3.0, 2.8, 0.4, 8.7, 2.4) 
     and a composition vector of 
     c=(2, 4, 2, 1, 1), 
     then, the resulting rank vector is 
     l=(3,4, 1, 2, 2, 2, 2, 5, 1, 3), 
     and the resulting average vector is 
     a=(7.5, 3.4, 2.5, 1.2, 0.4). 
     Using a quantization scale of 
     s=(0.1, 0.3, 0.9, 1.6, 2.0, 2.6, 3.2, 3.8, 4.5, 5.8, 7.6, 8.2), 
     the quantized average vector is 
     a=(7.6, 3.2, 2.6, 0.9, 0.3), 
     and the indicator vector is 
     f=(0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0). 
     In the example above, the c 1  (first) coordinate in the composition vector c is a &#34;2&#34;, which indicates that the two largest values in the magnitude vector m should be grouped together. Accordingly, a &#34;1&#34; is placed in the rank vector l in the coordinates (l 3  and l 9 ) corresponding to the coordinates (m 3  and m 9 ) of the values 6.3 and 8.7 (which are the first two largest values) in the magnitude vector m. Likewise, the c 2  (second) coordinate in the composition vector c is a &#34;4&#34;, which indicates that the next four largest values in the magnitude vector m should be grouped together as the &#34;second largest&#34; group. Thus, a &#34;2&#34; is placed in the rank vector l in the coordinates corresponding to the positions of the values 3.3, 4.5, 3.0, and 2.8 (the next four largest values) in the magnitude vector m. The same method is used for determining groupings of the other remaining values in m to form the rank vector l. 
     The average vector a contains the averages of the values in each of the groups in the rank vector l. For example, the average vector&#39;s first coordinate (7.5) is the average of 6.3 and 8.7, the two (largest) values in the magnitude vector which are identified by &#34;1&#34; in the rank vector. Likewise, the second average vector&#39;s coordinate (3.4) represents the average of 3.3, 4.5, 3.0, and 2.8, the second next largest four magnitudes in the magnitude vector which are identified as such with &#34;2&#39;s&#34; in the rank vector l. Other values in the average vector a are obtained in a similar manner. 
     The values in the average vector a are mapped into the quantization scale s to obtain a quantized average vector a. The indicator vector f is, in essence, a binary representation of the quantized average vector a since it indicates values in the quantization scale that are used to quantize the average vector a. 
     Combinatorial Encoding 
     In one embodiment of the invention, combinatorial encoding is performed to further compress the audio signal. Except for the sign vector, the method described with reference to FIGS. 1, 2, and 3 transforms the received audio data into a set of binary vectors (the location vector, the indicator vector f, and the set of binary rank vectors) each having a predetermined length and each containing a predetermined number of ones. Due to the predetermined nature of the resulting set of binary vectors, the resulting set of binary vectors can be combinatorially encoded. 
     The principle of combinatorial coding is described briefly below, and in further detail in V. F. Babkin &#34;Method for Universal Coding of Independent Messages of Nonexponential Complexity,&#34; Problemy Peredachi Informatsii (Problems of Information Transmission), 1971, vol. 7, N 4, pp. 13-21, (in Russian), and T. Cover, &#34;Enumerative Source Coding,&#34; Transactions on Information Theory, vol. IT-19, 1974, N1, pp. 73-77. 
     To illustrate the principle of combinatorial encoding as utilized in one embodiment of the invention, it is useful to consider a binary sequence of length N containing M ones and N-M zeros. Let L(N, M) be a list of all binary N-sequences with M ones written in a lexicographic order. Combinatorial encoding of a particular N-sequence x is performed by replacing x by the number of x in the list L(N, M). To illustrate, see Table 1 which shows that all possible binary sequences for N=6 and M=4 can be represented using 4 bits. As an example, the binary sequence 110101 corresponds to the number 10 in base 10, which in turn corresponds to 1010 in base 2. Thus, the sequence 110101 could be encoded using the binary codeword 1010. 
     
                       TABLE 1                                                     
______________________________________                                    
L(N,M)        x in base 2                                                 
                       x in base 10                                       
______________________________________                                    
001111        0000     0                                                  
010111        0001     1                                                  
011011        0010     2                                                  
011101        0011     3                                                  
011110        0100     4                                                  
100111        0101     5                                                  
101011        0110     6                                                  
101101        0111     7                                                  
101110        1000     8                                                  
110011        1001     9                                                  
110101        1010     10                                                 
110110        1011     11                                                 
111001        1100     12                                                 
111010        1101     13                                                 
111100        1110     14                                                 
Not Used      1111     15                                                 
______________________________________                                    
 
    
     The number of all binary sequences in L(N, M) denoted as |L(N, M)| can be formula ##EQU4## Thus, x can be compressed into a binary sequence (or codeword) of length ##EQU5## where .left brkt-bot.s.right brkt-bot. the smallest integer not less than z. 
     Using the Pascal identities, code words with computational complexity proportional to N 2  can be computed. In one software implemented embodiment of the invention, wherein all possible binomial coefficients are stored, the complexity is proportional to N. 
     Since the quantized averages (a 1 , . . . ,a q ) in the quantized average vector are uniquely defined by the binary indicator vector f(m,c,s) having length Q and exactly q non zero components, combinatorial coding of f(m,c,s) requires ##EQU6## bits. 
     The binary location vector representing the locations of the No selected transform coefficients in the domain of integers {1,2,. . . ,N/2+1} can be combinatorially encoded using ##EQU7## bits. 
     Combinatorial coding can also be used for encoding the quantized absolute values of the selected transform coefficients--namely, the binary rank vector(s). If L(m,c) represents a list of all rank vectors l(m,c), it is sufficient to find a number of l(m,c) in L(m,c) to encode a particular l(m,c). Any such vector l(m,c) is a 2N 0  -dimensional q-ary vector with a fixed composition c=(c 1 , . . . ,c q ). Since the number of such vectors is equal to the polynomial coefficient 
     
         (2N.sub.0)|/(c.sub.1 |c.sub.2 |. . . c.sub.q |) 
    
     the number of bits sufficient to encode l(m,c) is ##EQU8## 
     The first term in the right hand part corresponds to the number of bits required to represent the positions of &#34;1&#39;s&#34;, the second term provides the positions of &#34;2&#39;s&#34;, etc. Positions of 1&#39;s, 2&#39;s, (q-1)&#39;s can be described by binary vectors of length 2N 0 , 2N 0  -c 1 , 2N 0  -c 1  -c 2  -, . . . c q  -2 with c 1 , c 2 , . . . , C q  -1 nonzero components, respectively. 
     Exemplary Compression Systems 
     FIG. 5 is a block diagram of an audio data compression system according to one embodiment of the invention, while FIG. 6 is a block diagram of the fixed rate adaptive quantization (FRAQ) unit from FIG. 5 according to one embodiment of the invention. It is to be understood that any combination of hardwired circuitry and software instructions can be used to implement the invention, and that all or part of the invention may be embodied in a set of instructions stored on a machine readable medium (e.g., a memory, a magnetic storage medium, an optical storage medium, etc.) for execution by one or more processors. Therefore, the various blocks of FIGS. 5 and 6 represent hardwired circuitry and/or software units for performing the described operations. For example, all or part of the system shown in FIGS. 5 and 6 may be implemented on a dedicated integrated circuit (IC) board (or card) that may be used in conjunction with a computer system(s) and/or other devices. This IC board may contain one or more processors (dedicated or general purpose) for executing instructions and/or hardwired circuitry for implementing all or part of the system in FIGS. 5 and 6. In addition, all or part of the system in FIGS. 5 and 6 may be implemented by executing instructions on one or more main processors of the computer system. 
     The audio compression system 500 in FIG. 5 operates in a similar manner to the flow diagrams shown in FIGS. 1 and 2. The alternative embodiments described with reference to FIGS. 1 and 2 are equally applicable to the system 500. For example, if in an alternative embodiment, the input audio data is not filtered, then the filter 510 shown in FIG. 5 would not be present. The system 500 includes a filter 510 that receives the input audio signal. The filter 510 may be any number of types of filters. The filter 510 filters out relatively low spectrum frequencies, thereby emphasizing relatively higher spectrum frequencies, and outputs a filtered sequence of the input audio signal to a buffer 512. 
     The buffer 512 stores digitized samples of the filtered sequence. The buffer 512 is configured to store samples from a current frame of the input audio signal to be processed by the system 500, as well as samples from a portion of a previously processed frame overlapped by the current frame. 
     The buffer 512 provides the digitized samples of the filtered sequence to a transform unit 514. The transform unit 514 transforms the samples of the filtered sequence into a plurality of transform coefficients representing two successive frames. In one embodiment, the transform unit 514 performs a Fast Fourier Transform (FFT) technique to obtain the transform coefficients. The transform unit 514 separately outputs each frame&#39;s transform coefficients to a selector 516. 
     The selector 516 selects a set of the transform coefficients based on a predetermined criteria. The selector 516 also outputs the sign vector comprising the signs of the selected transform coefficients to a bit stream former 516, and outputs the location vector representing the locations of the selected transform coefficients to a location vector combinatorial encoder 524. The magnitude vector m comprising the absolute values of the selected transform coefficients is output by the selector 516 to a fixed rate adaptive quantization (FRAQ) unit 518. 
     The FRAQ unit 518 creates and outputs the set of binary rank vectors and the indicator vector f, as well as a set of indications identifying the quantization scale s and the composition vector c used to create the set of rank vectors and the indicator vector f. The set of indications identifying the quantization scale and the composition vector are output to the bit stream former 526. The set of rank vectors and the indicator vector are respectively output by the FRAQ unit 518 to a rank vector combinatorial encoder 520 and an indicator vector combinatorial encoder 522. The FRAQ unit 518 will be described in further detail below with reference to FIG. 6. 
     The combinatorial encoders 520, 522, and 524 combinatorially encode the set of rank vectors, the indicator vector, and the location vector, respectively, and provide combinatorially encoded data to the bit stream former 526. 
     The bit stream former 526 provides further data compression by multiplexing the set of indications identifying the quantization scale and the composition vector, the sign vector, and the combinatorially encoded binary rank, indicator, and location vectors into one bit stream that may be transmitted, stored, etc. 
     FIG. 6 is a block diagram of the fixed rate adaptive quantization (FRAQ) unit from FIG. 5 according to one embodiment of the invention. The FRAQ unit 518 comprises a composition book 620, a quantization scale book 622, a rank vector former 610, an average vector former 612, a quantized average vector former 614, an indicator vector former 616, and an error calculation unit 618. 
     The composition book 620 and the quantization scale book 622 comprise a set of predetermined compositions and a set of predetermined quantization scales, respectively. A composition vector c from the composition book 620 and a magnitude vector m comprising absolute values of a set of transform coefficients representing an audio signal are provided to the rank vector former 610. Using the composition vector and the magnitude vector, the rank vector former 610 creates and outputs the rank vector l to the average vector former 612. 
     The average vector former 612 uses the rank vector and the magnitude vector to form the average vector a. The average vector former provides the average vector to the quantized average vector former 614. 
     In addition to the average vector, the quantized average vector former 614 receives a quantization scale s from the quantization scale book 622. Using the quantization scale and the average vector, the quantized average vector former 614 creates a quantized average vector a. The quantized average vector is provided by the quantized average vector former 614 to the indicator vector former 616. 
     The indicator vector former 616 uses the quantized average vector and the quantization scale s to create and output the indicator vector f. 
     The error calculation unit 618 determines error associated with the set of composition vectors and quantization scales and determines the optimum pair of the composition vector and the quantization scale that minimizes quantization error. 
     While embodiment one is described wherein a composition book (containing a plurality of composition vectors) and a quantization book (containing a plurality of quantization scales) is described, alternative embodiments of the invention do not necessarily use more than one composition vector and/or one quantization scale. Furthermore, alternative embodiments of the invention do not necessarily include an error calculation unit for determining quantization error associated with a composition vector and/or a quantization scale. In addition, while FIG. 5 shows three combinatorial encoders, one or two combinatorial encoders can be used to perform all of the combinatorial encoding. 
     DECOMPRESSION 
     Overview of Audio Decompression According to One Embodiment of the Invention 
     FIG. 7 is a flow diagram illustrating a method for decompression of audio data according to one embodiment of the invention. It should be understood that the audio signal is decompressed based on the manner in which the audio signal was compressed. As a result, alternative embodiments previously described affect and are applicable to the decompression method described below. Flow begins in step 710, from which control passes to step 712. 
     In step 712, a bit stream comprising compressed audio data representing a current frame of an audio signal is received. In the described embodiment, the bit stream comprises a combinatorially encoded set of binary rank vector(s), a combinatorially encoded indicator vector(s), a combinatorially encoded location vector(s), and a sign vector(s). In addition, if multiple composition vectors and/or quantization scales are used, the bit stream contains data indicating which composition vector and quantization scale pair was used. From step 712, control passes to steps 714, 716, 718, and 720. 
     In step 714, the combinatorially encoded indicator vector and quantized average vector are restored using a combinatorial decoding technique, and control passes to step 722. Similarly, in steps 716 and 720, the combinatorially encoded set of binary rank vector(s) and the combinatorially encoded location vector(s) are combinatorially decoded, respectively, and control passes to step 722. In step 718, the sign vector is extracted from the bit stream, and control passes to step 722. 
     In step 722, the transform coefficients are reconstructed by using the restored locations, signs, and values of the transform coefficients. From step 722, control passes to step 724. 
     In step 724, the transform coefficients are subjected to an inverse transform operation, and control passes to step 726. In one embodiment, the transform coefficients represent (Fast) Fourier Transform (FFT) coefficients, and thus, an inverse (Fast) Fourier transform is performed using the formula ##EQU9## to synthesize the audio signal. In alternative embodiments, any number of inverse transform techniques may be used to synthesize the audio signal. 
     In step 726, interframe interpolation is performed (i.e., samples stored from a portion of a previously synthesized frame that are overlapped by the current frame are used to synthesize the overlapping portion of the current frame), and control passes to step 728. Interframe interpolation typically improves the quality of the synthesized audio signal by &#34;smoothing out&#34; the Gibbs effect on interframe bounds. In one embodiment, the current frame overlaps the previously synthesized frame in M samples, where y N-M .sup.(1), . . . y N-1 .sup.(1) denotes the M samples of the previously decoded frame, and y 0 .sup.(2), . . . , y M-1 .sup.(2) denotes the M samples of the current frame. In the described embodiment, a linear interpolation of overlapping segments of samples denoted by {y i .sup.(2) } is performed using the formula 
     
         y.sub.i.sup.(2) =y.sub.i.sup.(2) (i+1)/(M+1)+y.sub.N-M+i.sup.(1) (M-i)/(M+1) 
    
     for i=0,1, . . . , M-1. 
     From step 726, control passes to step 728. 
     In step 728, the synthesized audio signal is filtered, and control passes to step 730. In one embodiment, a filter described by 
     
         b(D)=(A/L)+(A/L)D+(A/L)D.sup.2 +. . .+(A/L)D.sup.L/2 +D.sup.L/2+ 1+(A/L)D.sup.L/2+2 +. . .+(A/L)D.sup.L 
    
     is used, where L=16 and A=1. In an alternative embodiment, A=1/2. In one embodiment, a filter which is an inverse of a pre-filter used in the compression of the audio signal is used. While several embodiments have been described wherein the synthesized (decompressed) audio signal is filtered prior to output, it should be appreciated that alternative embodiments of the invention do not necessarily use a filter or may use any number of various types of filters. 
     In step 730, the synthesized audio signal is output (e.g., for transmission, amplification, etc.), and control passes to step 732 where flow ends. 
     Exemplary Decompression Systems 
     FIG. 8 is a block diagram of an audio data decompression system according to one embodiment of the invention. It is to be understood that any combination of hardwired circuitry and software instructions can be used to implement the invention, and that all or part of the invention may be embodied in a set of instructions stored on a machine readable medium (e.g., a memory, a magnetic storage medium, an optical storage medium, etc.) for execution by one or more processors. Therefore, the various blocks of FIG. 8 represent hardwired circuitry and/or software units for performing the described operations. For example, all or part of the system shown in FIG. 8 may be implemented on a dedicated integrated circuit (IC) board (or card) that may be used in conjunction with a computer system(s) and/or other devices. This IC board may contain one or more processors (dedicated or general purpose) for executing instructions and/or hardwired circuitry for implementing all or part of the system in FIG. 8. In addition, all or part of the system in FIG. 8 may be implemented by executing instructions on one or more main processors of the computer system. 
     The decompression system 800 shown in FIG. 8 comprises a demultiplexer 810 that receives and demultiplexes an input bit stream generated by a compression technique similar to that previously described. The demultiplexer 810 provides the encoded indicator vector to an indicator vector decoder 812 that combinatorially decodes the indicator vector to restore the quantized average vector. The indicator vector decoder 812, in turn, provides the quantized average vector to a reconstruction unit 818. The demultiplexer 810 also provides the encoded set of binary rank vector(s) and the encoded location vector to a rank vector decoder 814 and a location vector decoder 816, respectively, wherein the set of binary rank vector(s) and the location vector are combinatorially decoded. The restored set of binary rank vectors are then converted into the non-binary rank vector. The restored non-binary rank vector and the restored location vector are provided by the rank vector decoder 814 and the location vector decoder 816, respectively, to the reconstruction unit 818. The sign vector is provided directly to the reconstruction unit 818 by the demultiplexer 810. 
     The reconstruction unit 818 places the quantized set of transform coefficients, along with the appropriate signs and (quantized average) magnitudes into positions indicated by the non-binary rank vector and the restored location vector. The restored set of transform coefficients are output by the reconstruction unit 818 to a mirror reflection unit 820. 
     The mirror reflection unit 820 determines a complex Fourier spectrum for the set of transform coefficients. In one embodiment, the first N/2+1 coefficients are used to determine the values of the second N/2-1 coefficients using symmetrical identities, such as the one(s) described above with reference to FIG. 1. The mirror reflection unit 820 provides the complex Fourier spectrums to an inverse transform unit 822. In the described embodiment, the inverse transform unit 822 performs a Inverse Fast Fourier Transform (IFFT) on two successive frames to synthesize the audio signal. 
     The synthesized audio signal provided by the inverse transform unit 822 is interframe interpolated by an interpolation unit 824 and filtered by a filter 826 prior to output. 
     Alternative Embodiments 
     While the invention has been described in terms of several embodiments, those skilled in the art will recognize that the invention is not limited to the embodiments described. The method and apparatus of the invention can be practiced with modification and alteration within the spirit and scope of the appended claims. The description is thus to be regarded as illustrative instead of limiting on the invention.