This application claims the priority benefit of Taiwan application serial no. 94144420, filed on Dec. 15, 2005. All disclosure of the Taiwan application is incorporated herein by reference.
1. Field of Invention
The present invention relates to an apparatus and method for audio signal compression/decompression, and more particularly, to an apparatus and method for lossless audio signal compression/decompression through entropy coding.
2. Related Art
The transmission of high-quality audio-visual information becomes an inevitable trend with the development of broadband transmission environments, such as broadband networks and wireless communication. The capacity for transmitting audio-visual information is the major difference between the Third Generation Mobile Communication Systems (3G) and the current GSM. With the advance of communication technology, the transmission of high-quality and even lossless audio signal has become one possible trend. A lossless audio signal mainly offers a user a complete editing room and audio signals with different bit rates can be transmitted according to different applications. As to music and songs, the user usually prefers their higher quality. The lossless audio signal offers the user the complete editing room and is necessitated from the point of enjoying the music.
Furthermore, the International Standardization Organization ISO/IEC MPEC responsible for enacting the international audio-visual compression specification began discussing whether a new Audio Lossless Coding (ALS) needs to be enacted or not in the 59th meeting. During the meeting, the topic was discussed hotly, and sufficient evidence shows that a new specification is industrially required, and the technique has been developed to the extent capable of being normalized. At present, the enactment of the new specification proceeds to the final stage and the overall enactment of the specification is estimated to reach a conclusion by the end of 2005. At the same time, MPEG begins to enact the specification of Speech Lossless Coding. On the other hand, there are a number of non-internationally standardized lossless audio compression systems, such as, Monkey, free lossless audio coder/decoder (FLAC), and Microsoft window medium audio (WMA). Most lossless audio compression systems include two parts: a time-domain prediction and entropy coding of prediction errors. The time-domain prediction includes two ways: one is a forward prediction and the other is a backward prediction. So-called forward prediction means that the predicted value of the current data is derived from the previous data value through a prediction filter, which has the most significant difference with the backward prediction in that the coefficient of the forward prediction filter is selected in advance, such that this coefficient must be stored in compression data. Thus, a decoding terminal is able to completely and correctly decode the previously coded data. On the other hand, as for the backward prediction, the coefficient of the prediction filter is timely updated through an adaptive algorithm during the predicting period, such that it is unnecessary to generate redundant information to be stored in the coded data. The data is ensured to be recovered only if the decoding terminal employs the same prediction filter, capable of performing a coefficient updated algorithm, as the coding terminal.
Herein, so-called entropy coding is a wide term and mainly directed to carry out further compression through a coding method exploiting a prediction error with the characteristic of a smaller value. The typical methods include a variable-length coding (VLC), a Huffman coding, an arithmetic coding, and so on.
The digitalization of an audio is stored in a way of sampling the successive analog signals with a fixed-data resolution. However, the size of the original audio signal data is relatively large if no process is carried out. Since the time-domain correlation between adjacent sampling values is quite high, an appropriately predicted coding is carried out to these data by utilizing such a correlation in order to reduce the data size. Some compression techniques cause data loss, which are called lossy compression techniques, meaning that the data recovered by the decoding terminal is different from the original data. But such a difference cannot be distinguished by human ears, and one advantage is that the data size is greatly reduced. However, a lossless audio compression, in contrast to the lossy compression, is capable of recovering the audio signal data to be the same as that before compression.
Several conventional methods for the lossless audio compression are listed below. U.S. Pat. No. 6,675,148 also discloses a lossless audio compression system, wherein an input audio signal is divided into audio frames; then, the data of the audio frames is predicted, and also the coefficient of the predictor is quantified and stored as a part of the data; and finally, the predictive coded audio frames can be further divided into much smaller sub-blocks for entropy coding.
Alternatively, U.S. Pat. No. 5,884,269 discloses a lossless compression/decompression apparatus for the digital audio.
With reference to
However, the aforementioned conventional arts, either Huffman table coding or arithmetic coding, requires a large amount of computations, and thus is not suitable for a real-time compression. Therefore, it is necessary to provide an entropy coding method with a small amount of computations, suitable for various time-domain predictions and an apparatus thereof.
One main object of the present invention is to provide an audio entropy coding apparatus suitable for various time-domain predictions with high efficiency, high compression ratio, and fewer computations, and a method thereof. The apparatus comprises a buffer, a time-axis predictor, and a bit-allocation entropy coder/decoder. The time-axis predictor is capable of subtracting the current input signal value from its predicted value, thereby generating a prediction error signal corresponding to the compressed input signal. Then, the prediction error signal is input into the bit-allocation entropy coder in accordance with a code guideline of the present invention to be coded. Further, each block data packet structure after the entropy coding in the present invention comprises a 32-bit header and the real data following the header, but the data is substantially the discrepancy between the original prediction error of the data and the minimum value of each of the blocks. Through the foregoing method, the conventional complicated calculation is reduced, i.e., high efficiency entropy coded audio can be obtained. The time-axis predictor comprises a recursive least square (RLS) and a least mean square (LMS) predictor.
One further object of the present invention is to provide a coding guideline of an audio entropy coding apparatus and a method suitable for various time-domain predictions. The coding guideline is used to analyze the prediction error signal and to divide it into different blocks according to the required data precision. In fact, the division of the blocks is jointly decided by four essential conditions. When any one of the following four conditions is satisfied, the coder generates a new coding block according to the coding guideline, and writes the block header and the data. The four conditions are that (a) the data precision for coding the error signal is higher than that for the previous error signal, and the required additional capacity offered by the whole block is greater than 32-bits in size due to the coding of the signal; (b) 50 items of data already exist in the current block, and the number of bits required for coding the current data point is greater than the data size precision required by each of the subsequent fifty points; (c) the discrepancy between the current predicted error value and the predicted error value of the previous time point is greater than a predetermined value, and the required additional capacity offered by the whole block is greater than 32-bits in size due to the coding of the signal; or (d) 4096 points already exist in the current block.
In order to the make the aforementioned and other objects, features and advantages of the present invention comprehensible, a preferred embodiment accompanied with figures is described in detail below.
It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the invention as claimed.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
With reference to
An audio entropy coding method suitable for various time-domain predictions in the present invention comprises the following steps. Firstly, an uncompressed original audio signal is input into a buffer to be divided into one-dimensional data with fixed lengths, being referred as audio frames. Then, each of the audio frames passes through a time-domain RLS-LMS predictor, and since the RLS predictor is placed on the first part of the whole predictor due to its much higher convergence rate, (i.e., the speed of being converged to nearly zero of the prediction error), the uncompressed audio signal first passes through the RLS predictor, and then the generated predicted error is sent to the LMS predictor to further undergo predicting coding, thereby generating a predicted error value. Finally, the predicted error value is input into a bit-allocation entropy coder/decoder, and is analyzed and coded into the coding audio data in different blocks according to the coding guideline of the present invention and required data precision.
Since the overall predicting coding is adaptively predicted and calculated by the predictor, the coefficient of the predictor need not to be transferred to the decoder, thereby saving some data space. When decoding, the original data can be recovered unchangeably as long as the decoder also utilizes the same filter algorithm as that of the encoder.
Generally, if the predictor is capable of properly carrying out predicting coding to the audio signal, the predicted error value will be far smaller than the original signal value in order to achieve the purpose of data compression. In typical lossless audio compression, besides the predicting coder, an entropy compression coder is subsequently employed to further compress the data by utilizing (exploiting) its characteristic that the predicted error value is smaller than the original audio value. The present invention provides an entropy coding method across audio frames as shown in
With reference to
The aforementioned division and coding of the blocks is jointly decided by four essential conditions. When any one of the following four conditions is satisfied, the coder generates a new coding block and writes the block header and the data. The four conditions are that (a) the data precision for coding the predicted error signal is higher than that for the previous predicted error signal, and the required additional data offered by the whole block is greater than 32-bits in size due to the coding of the signal; (b) 50 items of data already exist in the current block, and the number of bits required for coding the current data point is greater than the data size precision required by each of the subsequent fifty points; (c) the discrepancy between the current predicted error value and the previous predicted error value is greater than a predetermined value, and the required additional data offered by the whole block is greater than 32-bits in size due to the coding of the signal; or (d) 4096 points already exist in the current block.
With reference to Table 1, it compares the percentages of the calculation reduction when three different kinds of songs are compressed through four different audio compression formats: that of the present invention, FLAC, Wavpack, and WMA under substantially the same compression rate, such as, 1.508 and 1.405.
Table 1 obviously shows that, as compared to the other three different kinds of audio compression formats, the audio compression of the present invention needs far fewer calculations.
With reference to
In view of the above, as compared to the conventional arts, an audio entropy coding apparatus and a method thereof provided by the present invention have the following advantages:
1. Since the computations of audio coding/decoding required by the present invention is significantly reduced, the present invention is suitable for a real time compression, and the time needed for audio coding/decoding is further reduced.
2. Since the audio entropy coding apparatus suitable for various time-domain predictions provided in the present invention requires the Huffman table dictionary and the compact Huffman weight table as in the conventional arts, the audio compression/decompression coding apparatus of the present invention is simpler than the conventional arts. Therefore, the manufacturing cost is significantly reduced.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
94144420 | Dec 2005 | TW | national |