This application claims the priority of Korean Patent Application No. 2003-84731, filed on Nov. 26, 2003, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to MPEG audio bitstream encoding/decoding, and more particularly, to a method of and an apparatus for encoding/decoding an MPEG-4 bit sliced arithmetic coding (BSAC) audio bitstream having ancillary information.
2. Description of the Related Art
An analog waveform is a continuous-time signal. Therefore, analog-to-digital (A/D) conversion is necessary to represent the analog waveform as a discrete-time signal. Two processes are necessary for the A/D conversion. One is a sampling process for converting a temporally continuous-time signal into a discrete-time signal, and the other is an amplitude quantization process for limiting the number of possible amplitudes using a finite value. That is, the amplitude quantization process converts an input amplitude x(n) at a time n to y(n), which is an element of a finite set of possible amplitudes.
In an audio signal storing/restoring method, according to recent development of digital signal processing technologies, a technology of sampling and quantizing a typical analog signal, converting the sampled and quantized signal to pulse code modulation (PCM) data, which is a digital signal, storing the PCM data in a recording/storing medium such as a compact disc (CD) or a digital audio tape (DAT), and listening to the PCM data by reproducing the stored data according to a user demand has been developed. By applying the storing/restoring method using a digital method, better sound quality may be obtained and deterioration due to a stored duration may be prevented as compared with tape recording using an analog method such as a long-play record (LP). However, since a size of digital data is great, problems occur when storing or transmitting is performed.
To solve the storage and transmission problems, efforts to reduce data amount using a differential pulse code modulation (DPCM) method or an adaptive differential pulse code modulation (ADPCM) method, which compresses a digital voice signal, are being made. However, efficiency in the DPCM or ADPCM method is largely different according to the kinds of signals. Recently, in Moving Picture Expert Group (MPEG)/audio technologies for which standardization works have been achieved by International Standard Organization (ISO) or AC-2/AC-3 technologies developed by DOLBY CO. LTD., a method of reducing data amount by using a psychoacoustic model has been used. The method of reducing the data amount has largely contributed to efficiently reducing data amount regardless of signal characteristics.
In a conventional audio compression technology such as MPEG-1/audio, MPEG-2/audio, or AC-2/AC-3, signals in the time domain are bound in blocks having a predetermined size and converted to signals in the frequency domain. The converted signals are scalar quantized using a psychoacoustic model. The quantizing technology is simple but not optimum even if an input sample is statistically independent. Furthermore, if the input sample is statistically dependent, the quantizing technology is inefficient. Due to this problem, encoding is performed by including lossless encoding, such as entropy encoding, or a certain kind of adaptive quantization. Therefore, a more complicated process than storing simple PCM data is performed, and a bitstream is composed of quantized PCM data and ancillary information for signal compression.
The MPEG/audio standard or AC-2/AC-3 method provides sound quality equivalent to the sound quality of a CD with a 64 Kbps-384 Kbps rate, which is a ⅙ to ⅛ of a conventional digital encoding rate. With high sound quality, the MPEG/audio standard will play an important role for an audio signal storing and transmitting system such as digital audio broadcasting (DAB), an internet phone, audio on demand (AOD), or a multimedia system.
In conventional methods, since a fixed bitrate is provided in an encoder and a quantizing and encoding process is performed by finding an optimal status for the provided bitrate, when a fixed bitrate is used for encoding, the methods provide a good scheme. However, for multimedia purposes, there is a need for conventional low bitrate encoding and encoders/decoders having various functions. One of these is an audio encoder/decoder capable of controlling a bitrate. The bitrate controllable audio encoder can make a low bitrate bitstream using a bitstream encoded with a high bitrate and restore the bitstream using only a partial bitstream. Accordingly, when a network is overloaded, when a performance of a decoder is not good, or when a bitrate is lowered by a user's demand, the bitrate controllable audio encoder should restore an audio signal with a reasonable performance using a partial bitstream even though the performance is deteriorated by the lowered bitrate.
A syntax allowing ancillary information to be stored, such as data_stream_element( ) and fill_element( ), is in the MPEG-2/4 AAC (ISO/IEC 13818-7, ISO/IEC 14496-3). Also, “ancillary data” is defined in the MPEG-1 layer-III (mp3). Accordingly, audio ancillary information may be stored by embedding the ancillary information in the middle of frame information. ID3v1 is a representative example in this respect.
However, a syntax allowing ancillary information to be provided is not defined in a currently standardized MPEG-4 bit sliced arithmetic coding (BSAC) audio format.
The present invention provides a method of and an apparatus for encoding/decoding an MPEG-4 bit sliced arithmetic coding (BSAC) audio bitstream having ancillary data, which provides a distinctive service by improving meta data or sound quality of audio contents by embedding ancillary information in a currently standardized MPEG-4 BSAC audio format.
The present invention also provides a method of discriminating whether ancillary information is embedded in audio data encoded with an MPEG-4 BSAC audio format.
According to an aspect of the present invention, there is provided a method of encoding an MPEG-4 BSAC audio bitstream having ancillary information, the method comprising: converting a time domain audio signal to a frequency domain audio signal and quantizing the audio signal using a psychoacoustic model; counting a number of bits of bitrate controlled audio data; obtaining a number of available bits per layer using a number of bits to be used and a number of layers to be used; modifying the number of available bits per layer by obtaining a size of the ancillary information; encoding actual audio data in units of layers; and embedding the ancillary information in the encoded bitstream.
The ancillary information may be information related to sound quality improvement. The ancillary information may also be information related to music tunes.
According to another aspect of the present invention, there is provided an apparatus for encoding an MPEG-4 BSAC audio bitstream having ancillary information, the apparatus comprising: a quantization processor converting a time domain audio signal in to a frequency domain audio signal and quantizing the audio signal using a psychoacoustic model; an available bit calculator obtaining a number of available bits per layer using a number of bits and a number of layers of audio data; an available bit modifier modifying the number of available bits per layer calculated by the available bit calculator by obtaining a size of the ancillary information; and a bit packing unit encoding actual audio data according to the number of available bits per layer modified by the available bit modifier and embedding the ancillary information in the encoded bitstream.
The available bit calculator may comprise: a bit counter counting a number of bits of bitrate controlled audio data; and a by-layer available bit calculator obtaining the number of available bits per layer using the number of bits counted by the bit counter and a predetermined number of layers.
According to another aspect of the present invention, there is provided a method of decoding an MPEG-4 BSAC audio bitstream having ancillary information, the method comprising: decoding a header of an audio bitstream; calculating a layer structure of the audio bitstream by obtaining a size of a frame from header information; obtaining a size of data up to a top layer and the size of the frame from the layer structure and determining a difference between the size of data up to the top layer and the size of the frame as the size of ancillary information; extracting the ancillary information from the audio bitstream according to the size of the ancillary information; and decoding the audio bitstream up to the top layer according to the calculated layer structure.
According to another aspect of the present invention, there is provided a method of decoding an MPEG-4 BSAC audio bitstream having ancillary information, the method comprising: decoding a header of a bitstream; calculating a layer structure of the bitstream by obtaining a size of a frame from the header information; decoding audio data corresponding to a size of audio data up to a top layer from the layer structure of the bitstream; and extracting the remaining bitstream as ancillary information and decoding the ancillary information.
The extracted ancillary information may be information related to sound quality improvement. The extracted ancillary information may also be meta data of audio for an audio data user.
According to another aspect of the present invention, there is provided a method of discriminating whether ancillary information is embedded in audio data encoded with an MPEG-4 BSAC audio data, the method comprising: decoding a header of a bitstream; calculating a layer structure of the bitstream by obtaining a size of a frame from header information; and obtaining a size of data up to a top layer and the size of the frame from the layer structure and discriminating whether the ancillary information exists using a difference between the size of the data up to the top layer and the size of the frame.
According to another aspect of the present invention, there is provided an apparatus for decoding an MPEG-4 BSAC audio bitstream having ancillary information, the apparatus comprising: a bit unpacking unit decoding a header of an audio bitstream; a layer structure calculator calculating a layer structure of the audio bitstream by obtaining the size of a frame from the header information; an ancillary information calculator obtaining a size of data up to a top layer and a size of a frame from the layer structure and determining a difference between the size of the data up to the top layer and the size of the frame as the size of ancillary information; an ancillary information extractor extracting the ancillary information from the audio bitstream according to the size of the ancillary information; and an audio decoder decoding the audio bitstream up to the top layer according to the calculated layer structure.
According to another aspect of the present invention, there is provided a computer readable medium having recorded thereon a computer readable program for performing the methods described above.
Additional aspects and/or advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
These and/or other aspects and advantages of the invention will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
Reference will now be made in detail to the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below to explain the present invention by referring to the figures.
The time/frequency converter 100 converts input time domain audio signals to frequency domain signals. In the time domain, differences of signal characteristics that are recognizable are not so great. However, in the frequency domain, since a difference between a signal that is recognizable and a signal that is not recognizable in each frequency band according to a psychoacoustic model is so great that quantized bits may be differently allocated according to the frequency band, compression efficiency may be improved.
The psychoacoustic modeling unit 110 binds the input audio signals converted to frequency components by the time/frequency converter 100 in units of predetermined subband signals and calculates a masking threshold value of each subband using masking effects generated due to correlations between the subband signals.
The quantization/bitrate controller 120 quantizes the subband signals in predetermined encoding subbands so that a magnitude of quantization noise of each subband becomes smaller than the masking threshold value. That is, scalar quantization is used for frequency signals of subbands so that the level of the quantization noise of each subband is smaller than the masking threshold value in order to suppress the quantization noise. The quantization is performed so that noise-to-mask ratio (NMR) values of all subbands become equal to or less than 0 dB using the NMR, which is a ratio of noise generated in each subband to the masking threshold value calculated by the psychoacoustic modeling unit 110. The fact that the NMR value is less than 0 dB indicates that the masking threshold value is greater than the quantization noise, that is, the quantization noise is not audible.
The bit packing unit 130 encodes quantized data corresponding to a base layer having the lowest bitrate, and if the encoding of the base layer is finished, the bit packing unit 130 encodes quantized data corresponding to one step higher layer, and likewise, by performing the encoding for all layers, the bit packing unit 130 builds a bitstream. In the encoding of the quantized data in each layer performed by the bit packing unit 130, the quantized data is divided into units of bits by expressing the quantized data of each layer with binary data composed of a predetermined same number of bits, and the encoding is performed from the top bit sequence composed of most significant bits from the divided bits to the base bit sequence in order.
The quantization processor 200 converts a time domain audio signal to a frequency domain audio signal, quantizes the frequency domain audio signal using a psychoacoustic model. The quantization processor 200 further comprises a time/frequency converter 20, a psychoacoustic modeling unit 22, and a quantization/bitrate controller 24. The time/frequency converter 20, the psychoacoustic modeling unit 22, and the quantization/bitrate controller 24 correspond to the time/frequency converter 100, the psychoacoustic modeling unit 110, and the quantization/bitrate controller 120 described with respect to
The available bit calculator 220 obtains a number of available bits per layer using a number of bits and a number of layers of the quantized audio data and further comprises a bit counter 26 and a by-layer available bit calculator 28. The bit counter 26 counts a number of bits of bitrate controlled audio data. The by-layer available bit calculator 28 obtains the number of available bits per layer using the number of bits of the audio data counted by the bit counter 26 and a predetermined number of layers.
The available bit modifier 240 modifies the number of available bits per layer calculated by the available bit calculator 220 by obtaining a size of the ancillary information to be embedded.
The bit packing unit 260 encodes actual audio data in units of layers according to the number of available bits per layer modified by the available bit modifier 240 and embeds ancillary information in the bitstream encoded without violating an MPEG-4 BSAC syntax.
Referring to
After the layer structure and the number of available bits per layer are calculated, according to the layer structure, data of from the base layer to the top layer is encoded in operation 330, and the encoded bitstream is stored as a file in operation 340.
Referring to
Therefore, a specific operation of the apparatus for encoding an MPEG-4 BSAC audio bitstream having ancillary information according to an embodiment of the present invention will now be described.
The number of bits of bitrate controlled audio data is counted by the bit counter 26 of the available bit calculator 220 in operation 410, and the number of available bits per layer is obtained by the by-layer available bit calculator 28 using the number of bits and layers to be used in operation 420. The number of available bits per layer is modified by the available bit modifier 240 by obtaining the size of the ancillary information to be embedded in operation 430. Likewise, data from a base layer to a top layer is encoded by the bit packing unit 260 according to the calculated layer structure in operation 440, and ancillary information is embedded in the last portion of the encoded bitstream in operation 450. The encoded bit stream is encoded as a file in operation 460.
The ancillary information may be information related to music tunes, for example, titles of songs, words of songs, names of composers, or names of singers, or meta data for a user such as ID3v1. Also, the ancillary information may be audio post-processing information to improve sound quality and information related to multi-channel data.
The bit unpacking unit 500 decodes quantized data in the order in which layers were generated in the bitstream having a layer structure. That is, the bit unpacking unit 500 analyzes the importance of bits included in the bitstream and decodes the bits of the bitstream in the order from a top layer to a base layer and in the order from the most significant bits to the least significant bits in each layer. The inverse quantizer 510 restores the decoded quantization data into a signal having an original size. The inverse converter 520 allows a user to reproduce an audio signal by converting the frequency domain audio signal to the time domain audio signal.
The bit unpacking unit 600 decodes a header of an audio bitstream. The layer structure calculator 630 calculates a layer structure of the audio bitstream by obtaining a size of a frame from the header information. The ancillary information calculator 640 obtains the size of data up to a top layer and the size of a frame from the layer structure and determines a difference between the size of the data up to the top layer and the size of the frame as the size of ancillary information. The ancillary information extractor 650 extracts the ancillary information from the audio bitstream, i.e., a number of bits corresponding to the size of the ancillary information. The audio decoder 610 decodes the audio bitstream up to the top layer according to the calculated layer structure and comprises an inverse quantizer 60 and an inverse converter 65. The inverse quantizer 60 and the inverse converter 65 have the same functions as the inverse quantizer 510 and the inverse converter 520 of
Bitstream decoding is performed in an inverse order of bitstream encoding. First, header information of a bitstream is decoded in operation 700. A layer structure of audio data required for decoding is calculated by obtaining a size of a frame from header information in operation 710.
The fact that the layer structure is calculated considering the size of the frame indicates that 100 bits each are allocated to every layer when information that the size of the frame is 1000 bits and the number of layers is 10 is received. The size of a bitstream up to a top layer and the size of a frame are obtained from the layer structure, and a difference between the size of the bitstream up to the top layer and the size of the frame is determined as the size of ancillary information in operation 740. Also, it may be judged whether ancillary information of an MPEG-4 audio is embedded after operations 700, 710, and 740 are performed. That is, if the size of a frame is larger than the size of data up to a top layer, it may be determined that the ancillary information is embedded, and if the size of a frame is not larger than the size of the data up to the top layer, it may be determined that the ancillary information is not embedded.
When obtaining the size of the ancillary information by calculating the difference between the size of the data up to the top layer and the size of the frame in operation 740, the size of the ancillary information is 50 bits when the number of bits up to the top layer is 1000, that is, 100 bits each for every layer, and the size of the received frame length information is 1050 bits. Therefore, the last 50 bits are extracted as the ancillary information.
That is, the size of the ancillary information from the audio bitstream corresponds to the size of the ancillary information in operation 750.
On the other hand, the audio data up to the top layer is decoded according to the calculated layer structure in operation 720. The decoding of the audio signal starts from the decoding of information of a base layer. After the decoding of audio data of the size allocated to the base layer is finished, a quantization value of audio data of one step higher layer is decoded. Likewise, audio data of all layers and the ancillary information may be decoded. The data quantized by the decoding process may be restored by passing through the inverse quantizer 60 and the inverse converter 65 of
Referring to
The MPEG-4 BSAC may perform fine grain scalability (FGS) using the layer structure. Information of the layer structure is defined by a BSAC syntax, and actual layer data is calculated by extracting the information in operation 700 and using the information in operation 710. A pseudo code for calculating the number of available bits per layer is as follows. The pseudo code is evenly applied to the encoder/decoder. Variable names used for the pseudo code are shown in Clause 4.5.2.6.2 of the ISO/IEC 14496-3 standard paper.
As shown above, layer_bit_offset corresponding to the number of bits usable per layer is obtained, and audio data in layers is decoded according to layer_bit_offset.
The present invention is useable as follows. First, when audio data is compressed at a rate of 48 Kbps using an MPEG-4 BSAC audio encoder, the present invention may be used in a case of encoding the audio data so that the audio data covers only frequency subbands of 0-7 KHz, generating a bitstream using spectral band replication (SBR) for information of 7-16 KHz, embedding the SBR bitstream as ancillary information, and storing a bitstream embedding the SBR bitstream as a file. In this case, 0-16 KHz sound data may be decoded in a decoder that recognizes the SBR ancillary information, and good quality may be provided in a low bitrate. However, since it is impossible to extract the SBR ancillary information in a conventional MPEG-4 BSAC decoder, a sound having a 0-7 KHz band may be heard, and the SBR data is regarded as dummy data.
Second, when audio data having a rate of 128 Kbps is compressed using an MPEG-4 BSAC audio encoder, words of songs may be embedded using the present invention. That is, the words of songs may be output without additional temporal information by arranging the words and the temporal information of the audio data and encoding the words information corresponding to each time as ancillary information in an audio bitstream. In a conventional MPEG-4 BSAC decoder, the words information cannot be received, and only a sound may be decoded.
The present invention may also be embodied as computer readable codes on a computer readable recording medium. The computer readable recording medium may be any data storage device that stores data which may be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices.
As described above, in a method and apparatus for encoding/decoding an MPEG-4 BSAC audio bitstream embedding ancillary information according to embodiments of the present invention, in a case of providing a service using BSAC by embedding ancillary information, a distinctive service may be provided by providing additional data capable of improving meta data or sound quality of audio contents.
Also, since the method and apparatus allow insertion of ancillary information, which is not possible using the MPEG-4 BSAC syntax, when audio data is reproduced, information of media may be additionally provided to a user by embedding audio meta data.
Also, high sound quality at a low bitrate may be provided by embedding ancillary information for audio post-processing.
Also, since the method and apparatus allow a conventional decoder to be used even though ancillary information is embedded, the conventional decoder may be compatibly used. Furthermore, by providing ancillary information, competitiveness of decoders capable of handling the ancillary information as compared with conventional decoders is improved.
Although a few embodiments of the present invention have been shown and described, it would be appreciated by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
10-2003-0084731 | Nov 2003 | KR | national |
Number | Name | Date | Kind |
---|---|---|---|
4896362 | Veldhuis et al. | Jan 1990 | A |
4949299 | Pickett | Aug 1990 | A |
5434913 | Tung et al. | Jul 1995 | A |
5455684 | Fujinami et al. | Oct 1995 | A |
5533052 | Bhaskar | Jul 1996 | A |
5583962 | Davis et al. | Dec 1996 | A |
5623577 | Fielder | Apr 1997 | A |
5633981 | Davis | May 1997 | A |
5649029 | Galbi | Jul 1997 | A |
5657423 | Benbassat et al. | Aug 1997 | A |
5675703 | Sato | Oct 1997 | A |
5694332 | Maturi | Dec 1997 | A |
5694522 | Hiratsuka et al. | Dec 1997 | A |
5732391 | Fiocca | Mar 1998 | A |
5761636 | Bolton et al. | Jun 1998 | A |
5764698 | Sudharsanan et al. | Jun 1998 | A |
5794181 | Benbassat et al. | Aug 1998 | A |
5838791 | Torii et al. | Nov 1998 | A |
5845239 | Laczko et al. | Dec 1998 | A |
5848391 | Bosi et al. | Dec 1998 | A |
5886965 | Tozaki et al. | Mar 1999 | A |
5893066 | Hong | Apr 1999 | A |
5945239 | Taniguchi | Aug 1999 | A |
5969764 | Sun et al. | Oct 1999 | A |
5978762 | Smyth et al. | Nov 1999 | A |
5986200 | Curtin | Nov 1999 | A |
6041295 | Hinderks | Mar 2000 | A |
6061655 | Xue et al. | May 2000 | A |
6061820 | Nakakita et al. | May 2000 | A |
6098044 | Huang | Aug 2000 | A |
6119091 | Huang et al. | Sep 2000 | A |
6122618 | Park | Sep 2000 | A |
6125398 | Mirashrafi et al. | Sep 2000 | A |
6138051 | Dieterich | Oct 2000 | A |
6208276 | Snyder | Mar 2001 | B1 |
6339760 | Koda et al. | Jan 2002 | B1 |
6349284 | Park et al. | Feb 2002 | B1 |
6865188 | Stirling et al. | Mar 2005 | B1 |
6879652 | Srinivasan | Apr 2005 | B1 |
6950794 | Subramaniam et al. | Sep 2005 | B1 |
7050980 | Wang et al. | May 2006 | B2 |
7146312 | Demetrescu et al. | Dec 2006 | B1 |
7334176 | Schroder | Feb 2008 | B2 |
7343287 | Geiger et al. | Mar 2008 | B2 |
7395346 | Pinder et al. | Jul 2008 | B2 |
20010005173 | Snyder | Jun 2001 | A1 |
20020165720 | Johnson et al. | Nov 2002 | A1 |
20020188841 | Jones et al. | Dec 2002 | A1 |
20040181817 | Larner | Sep 2004 | A1 |
20050091051 | Moriya et al. | Apr 2005 | A1 |
Number | Date | Country |
---|---|---|
1218339 | Jun 1999 | CN |
2 773 653 | Jul 1999 | FR |
2 354 857 | Apr 2001 | GB |
07-253796 | Oct 1995 | JP |
10-233692 | Sep 1998 | JP |
11-317672 | Nov 1999 | JP |
11-339396 | Dec 1999 | JP |
2000-175155 | Jun 2000 | JP |
2001-242899 | Sep 2001 | JP |
2002-100994 | Apr 2002 | JP |
2002-300504 | Oct 2002 | JP |
2002-341900 | Nov 2002 | JP |
Number | Date | Country | |
---|---|---|---|
20050129109 A1 | Jun 2005 | US |