The present invention contains subject matter related to Japanese Patent Application JP 2005-221524 filed in the Japanese Patent Office on Jul. 29, 2005, the entire contents of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to an audio-data encoding apparatus, an audio-data encoding method, an audio-data decoding apparatus, and an audio-data decoding method, each of which achieves scalability with respect to lossy compression and lossless compression.
2. Description of the Related Art
An audio-data encoding apparatuses has been proposed, which performs lossy compression on an input audio signal to generate a core stream, performs lossless compression on a residual signal to generate an enhanced stream, and combines these streams to achieve scalability with respect to the lossy compression and the lossless compression (see Patent Document 1: U.S. Patent Appln. Publication No. 2003/0171919). An audio-data decoding apparatus can decode a core stream to generate a lossy decoded audio signal, and can decode the core stream and an enhanced stream, and adds these decoded streams to generate a lossless decoded audio signal.
In the audio-data encoding apparatus 100, the lossy-core encoder unit 101 performs lossy compression on an input audio signal that is a pulse-code modulation (PCM) signal to generate a core stream. The lossy-core decoder unit 102 decodes the core stream, to generate a lossy decoded audio signal. The delay-correcting unit 103 delays the input audio signal by the time the input audio signal has been delayed in the lossy-core encoder unit 101 and lossy-core decoder unit 102. The subtracter 104 subtracts the lossy decoded audio signal from the input audio signal delayed by the delay-correcting unit 103, thus generating a residual signal. The lossless-enhance encoder unit 105 performs lossless compression on the residual signal to generate an enhanced stream. The stream-combining unit 106 combines the core stream and the enhanced stream to generate a scalable lossless stream.
In the audio-data decoding apparatus 110, the stream-dividing unit 111 divides the input scalable lossless stream into a core stream and an enhanced stream. The lossy-core decoder unit 112 decodes the core stream, generating a decoded audio signal that is a lossy PCM signal. Meanwhile, the lossless-enhance decoder unit 113 decodes the enhanced stream to generate a residual signal. The adder 114 adds the residual signal to the lossy audio signal on the same time axis to generate a decoded audio signal that is a lossless PCM signal. This decoded audio signal is output from the audio-data decoding apparatus 110.
In the lossy-core encoder unit 101, the band division filter 121 divides an input audio signal into a plurality of frequency bands. The sine-wave-signal extracting unit 122 extracts sine-wave signals from the time signals of the frequency-bands and supplies parameters for constituting the sine-wave signals to the multiplexer unit 125. The time-frequency transform unit 123 performs modified discrete cosine transform (MDCT) on the time signals of the respective frequency bands, from which sine waves have been extracted. The unit 123 therefore converts these time signals to spectral signals of the respective frequency bands. The bit allocation unit 124 allocates bits to the spectral signals to generate quantized spectral signals. The multiplexer unit 125 combines the parameters for constituting the sine-wave signals and the quantized spectral signals to generate a core stream.
In the lossy-core decoder unit 102, the demultiplexer unit 131 receives the core stream and divides the stream into parameters for constituting the sine-wave signals and quantized spectral signals. The sine-wave-signal reconstructing unit 132 reconstructs sine-wave signals from the parameters for constituting the sine-wave signals. The spectral-signal reconstructing unit 133 decodes the quantized spectral signals to generate spectral signals of frequency bands. The frequency-time transform unit 134 performs inverse MDCT (IMDCT) on the spectral signals, converting these signals to time signals of the frequency bands. The gain control unit 135 adjusts the gain of each time signal. The sine-wave-signal adding unit 136 adds a sine-wave signal to the time signal that has been adjusted in gain. The band-synthesizing filter 137 performs band synthesis on the time signals of frequency bands to generate a decoded lossy audio signal.
Sound-quality standards have been formulated for the signals decoded by most decoders that decode lossy streams. In other words, most decoders of this type have to be designed to satisfy the sound-quality standards.
Hitherto, a core stream has been decoded to generate and decode an enhanced stream, even at the time of generating and decoding a scalable lossless stream that is generally lossless-compressed but contains a lossy-compressed data part. To decode the enhanced stream, lossy-core decoders (e.g., lossy-core decoder units 102 and 112 shown in
The present invention has been made in view of the foregoing. It is desirable to provide a method and apparatus for encoding audio data and a method and apparatus for decoding audio data, which can generate and decode, respectively, scalable lossless streams and which can shorten the time necessary to generate and decode lossless streams.
According to an embodiment of the present invention, there is provided an audio-data encoding apparatus (method) which includes: a core-stream encoding means for (step of) dividing an input audio signal into a plurality of frequency bands, performing time-frequency transform on the signals of the frequency bands to generate spectral signals, and performing lossy compression on the spectral signals to generate a core stream; a core-stream decoding means for (step of) decoding only the spectral signals of a specified frequency band in the core stream to generate a decoded signal; a subtracting means for (step of) subtracting the decoded signal from the input audio signal to generate a residual signal; an enhanced-stream encoding means for (step of) performing lossless compression on the residual signal to generate an enhanced stream; and a stream-combining means for (step of) combining the core stream and the enhanced stream to generate a scalable lossless stream.
According to an embodiment of the present invention, there is also provided an audio-data decoding apparatus (method) which includes: a stream-dividing means for (step of) dividing a scalable lossless stream into a core stream and an enhanced stream, the scalable lossless stream having been generated by combining the core stream and the enhanced stream, the core stream having been obtained by dividing an input audio signal into a plurality of frequency bands, performing time-frequency transform on the signals of the frequency bands to generate spectral signals, and performing lossy compression on the spectral signals, the enhanced stream having been obtained by performing lossless compression on a residual signal generated by subtracting the decoded signal from the input audio signal; a first core-stream decoding means for (step of) decoding spectral signals of all frequency bands to generate a lossy decoded audio signal; a second core-stream decoding means for (step of) decoding only the spectral signals of a specified frequency band in the core stream to generate a decoded signal; an enhanced-stream decoding means for (step of) decoding the enhanced stream to generate the residual signal; and an adding means for (step of) adding the residual signal to the decoded signal to generate a lossless decoded audio signal.
According to an embodiment of the present invention, there is also provided an audio-data decoding apparatus (method) which includes: a stream-dividing means for (step of) dividing a scalable lossless stream into a core stream and an enhanced stream, the scalable lossless stream having been generated by combining the core stream and the enhanced stream, the core stream having been obtained by dividing an input audio signal into a plurality of frequency bands, performing time-frequency transform on the signals of the frequency bands to generate spectral signals, and performing lossy compression on the spectral signals, the enhanced stream having been obtained by performing lossless compression on a residual signal generated by subtracting the decoded signal from the input audio signal; a core-stream decoding means for (step of) switching either for decoding spectral signals of all frequency bands to generate a lossy decoded audio signal, or decoding only the spectral signals of a specified frequency band to generate a decoded signal; an enhanced-stream decoding means for (step of) decoding the enhanced stream to generate the residual signal; and an adding means for (step of) adding the residual signal to the decoded signal to generate a lossless decoded audio signal.
In the method and apparatus for encoding audio data and the method and apparatus for decoding audio data, each according to the present invention, only the spectral signals of a specified frequency band are decoded in order to generate and decode an enhanced stream. Hence, the time necessary for generating and decoding the enhanced stream can be shortened.
Embodiments of the present invention will be described, with reference to the accompanying drawings.
In the audio-data encoding apparatus 10, the lossy-core encoder unit 11, which has such a structure as shown in
The simplified lossy-core decoder unit 12 receives the core stream from the lossy-core encoder unit 11 and decodes it to generate a lossy decoded audio signal, which is supplied to the subtracter 14. The simplified lossy-core decoder unit 12 performs a process that is simpler than the process of the lossy-core decoder unit shown in
The subtracter 14 subtracts the lossy decoded audio signal from the input audio signal that the delay-correcting unit 13 has delayed by the delay time in the simplified lossy-core decoder unit 12. Thus, the subtracter 14 generates a residual signal, which is supplied to the rounding-off unit 15.
The rounding-off unit 15 rounds off the residual signal to a signal having the same number of bits as the input audio signal and the decoded signal. The rounded residual signal is supplied to the lossless-enhance encoder unit 16. More precisely, if the input audio signal and the decoded signal are n-bit signals, the residual signal, i.e., the result of the subtraction, is n+1 bit signal. Nonetheless, the rounding-off unit 15 changes the residual signal to an n-bit signal. The process the rounding-off unit 15 performs will be described later.
The lossless-enhance encoder unit 16 performs lossless compression on the residual signal to generate an enhanced stream. The enhanced stream is supplied to the stream-combining unit 17. As shown in
The stream-combining unit 17 combines the core stream and the enhanced stream to generate a scalable lossless stream. The scalable lossless stream is output from the audio-data encoding apparatus 10 to an external apparatus.
In the audio-data encoding apparatus 10, an audio signal is processed in process unit of 1024 samples or 2048 samples. In whichever process unit the audio signal is processed depends on the process unit in which the lossy-core encoder unit 11 processes data. That is, if the lossy-core encoder unit 11 processes data in process unit of 1024 samples, the audio-data encoding apparatus 10 processes data in process unit of 1024 samples, too. If the lossy-core encoder unit 11 processes data in process unit of 2048 samples, the audio-data encoding apparatus 10 processes data in process unit of 2048 samples, too.
In the audio-data decoding apparatus 30, the stream-dividing unit 31 receives a scalable lossless stream and divides it into a core stream and an enhanced stream. The core stream is supplied to the ordinary lossy-core decoder unit 32 or the simplified lossy-core decoder unit 33. At the same time, the enhanced stream is supplied to the lossless-enhance decoder unit 35. Which lossy-core decoder unit, the unit 32 or the unit 33, receives the core stream depends on how the switch 34 has been operated. To be more specific, the core stream is supplied to the ordinary lossy-core decoder unit 32 in order to generate a lossy decoded audio signal or to the simplified lossy-core decoder unit 33 in order to generate a lossless decoded audio signal.
The ordinary lossy-core decoder unit 32 has such a configuration as illustrated in
The simplified lossy-core decoder unit 33 receives a core stream from the stream-dividing unit 31 and decodes it to generate a decoded signal. The decoded signal is supplied to the adder 36. The simplified lossy-core decoder unit 33 performs a simpler process than the lossy-core decoder unit shown in
The lossless-enhance decoder unit 35 receives an enhanced stream from the stream-dividing unit 31 and decodes it to generate a residual signal. The residual signal is supplied to the adder 36. As shown in
The adder 36 adds the residual signal to the decoded signal on the same time axis to generate a decoded audio signal that is a lossless PCM signal. The lossless PCM signal is supplied to the rounding-off unit 37.
The rounding-off unit 37 rounds off the lossless decoded audio signal to a signal having the same number of bits of the residual signal and the decoded signal. The round-off unit 37 therefore generates a lossy decoded audio signal, which is output to an external apparatus. If the residual signal and the decoded signal are n-bit signals, the lossless decoded audio signal, i.e., the output of the adder 36, will be n+1 bit signal. The rounding-off unit 37 rounds off this lossless decoded audio signal to n bit signal. The process of rounding off the lossless decoded audio signal by the round-off unit 37 will be described later.
The processes performed in the rounding-off units 15 and 37 will be explained.
If the input audio signal and the decoded signal are n-bit signals, the residual signal, i.e., the result of subtraction, will be n+1 bit signal. The rounding-off unit 15 converts this residual signal to an n-bit signal. The residual signal can thereby undergo entropy encoding efficiently. The audio-data decoding apparatus 30 can therefore be easily implemented in fixed-point LSIs in which data is processed in units of n bits or less bits.
The method of rounding off the signal to an n-bit signal in the rounding-off unit 15 is, for example as follows:
Z=R−2M(R≦M)
Z=R+2M(R<−M)
where R is the residual signal (i.e., signed n+1 bit integer), Z is the rounded residual signal (i.e., signed n-bit integer), and M=2n-1.
The residual signal may be expressed as a two's complement. Then, Z can be found merely by acquiring the lower n bits of R as a signed integer.
The rounding-off unit 37 performs a process of rounding off a n+1 bit lossless decoded audio signal, in the same way as described above.
The case where n=16 bits and M=32768 will be explained as an example.
If the audio-data encoding apparatus 10 receives an input audio signal X and outputs a decoded signal Y and that X=32000 and Y=−6000, the residual signal R generated by the subtracter 14 is R=X−Y=38000 (binary notation: 1001 0100 0111 0000). The rounding-off unit 15 extracts the lower 16 bits of R and converts them to a signed integer. Thus, the residual signal is easily rounded off to a rounded residual signal Z; Z=−27536 (binary notation: 1001 0100 0111 0000).
In the audio-data decoding apparatus 30, the lossless decoded audio signal generated by the adder 36 is the sum of the residual signal Z and the decoded signal Y, i.e., Z+Y=−33536 (binary notation: 10111 1101 0000 0000). The rounding-off unit 37 extracts the lower 16 bits of the sum, thus restoring an audio signal X, i.e., X=32000 (binary notation: 0111 1101 0000 0000), which is identical to the input audio signal.
In the simplified lossy-core decoder unit 12, the demultiplexer unit 41 receives a core stream and divides the stream into parameters for constituting sine-wave signals and quantized spectral signals. The demultiplexer unit 41 supplies only the quantized spectral signals to the spectral-signal reconstructing unit 42.
The spectral-signal reconstructing unit 42 receives the quantized spectral signals from the demultiplexer unit 41 and decodes them to generate spectral signals of frequency bands. The spectral signals are supplied to the frequency-time transform unit 43.
The frequency-time transform unit 43 performs IMDCT on only the spectral signals of a specified band, for example, a lower frequency bands, supplied from the spectral-signal reconstructing unit 42. The unit 43 converts these spectral signals to time signals. The frequency-time transform unit 43 supplies the time signals of the specified band to the gain control unit 44.
The gain control unit 44 adjusts the gain of each time signal of the specified band, supplied from the frequency-time converting unit 43. The time signals adjusted the gain are supplied to the band-synthesizing filter 45.
The band-synthesizing filter 45 performs band synthesis on the time signals of the specified band supplied from the gain control unit 44, generating decoded signal.
In the simplified lossy-core decoder units 12 and 33 according to this embodiment, only the spectral signals of the specified frequency band are decoded as described above. They do not reconstruct sine-wave signals. If the results of the data-processing have fractional values that are less than the resolution of a data-holding register (not shown), no rounding-off processes are performed. Thus, the process in the simplified lossy-core decoder units 12 and 33 is lighter than in the lossy-core decoder units used in the past.
The audio-data encoding apparatus 10 and the audio-data decoding apparatus 30, which have the simplified lossy-core decoder units 12 and 33, respectively, can encode and decode enhanced streams in a shorter time than in the apparatuses used in the past.
The simplified lossy-core decoder units 12 and 33 according to the first embodiment perform simple processes. Hence, it is not generate a lossy decoded audio signal satisfying the prescribed sound-quality standards. It is therefore necessary for the audio-data decoding apparatus 30 to have the ordinary lossy-core decoder unit 32, in addition to the simplified lossy-core decoder unit 33, in order to generate lossy decoded audio signals. Having two types of lossy-core decoders, the audio-data decoding apparatus 30 has larger data-storage capacity. This inevitably increases the manufacturing cost of the audio-data decoding apparatus 30.
To solve this problem, an ordinary lossy-core decoder unit and a simplified lossy-core decoder unit are integrated in an audio-data decoding apparatus according to the second embodiment of this invention.
In the audio-data decoding apparatus 50, the operating-mode control unit 51 supplies an operating-mode signal to the integrated lossy-core decoder unit 52. The operating-mode signal represents a mode of outputting a lossy decoded audio signal or a lossless decoded audio signal to an external apparatus.
In accordance with the operating-mode signal supplied from the operating-mode control unit 51, the integrated lossy-core decoder unit 52 performs an ordinary process to generate a lossy decoded audio signal (as the ordinary lossy-core decoder unit 32 shown in
In the integral lossy-core decoder unit 52, the switch control unit 61 receives an operating-mode signal from the operating-mode control unit 51. In accordance with the operating-mode signal, the unit 52 supplies switching signals to the sine-wave-signal reconstructing unit 62, spectral-signal reconstructing unit 63 and switch 64, switching the operation of the sine-wave-signal reconstructing unit 62 and that of the spectral-signal reconstructing unit 63, and turn on or off the switch 64.
The sine-wave-signal reconstructing unit 62 has its operating mode switched in accordance with a switching signal supplied from the switch control unit 61. More precisely, the sine-wave-signal reconstructing unit 62 reconstructs a sine-wave signal to generate a lossless decoded audio signal and the sine-wave-signal reconstruction unit 62 is not using the parameters for constituting sine-wave signals to a lossy decoded audio signal.
The spectral-signal reconstructing unit 63 receives quantized spectral signals from the demultiplexer unit 41 and decodes it to generate spectral signals of frequency bands. To generate spectral signals, the spectral-signal reconstructing unit 63 switches from an inverse quantization table to another, in accordance with a switching signal supplied from the switch control unit 61. The process the spectral-signal reconstructing unit 63 performs will be described later in detail.
The switch 64 is turned on or off by a switching signal supplied from the switch control unit 61. More specifically, the switch 64 is turned off so that a lossy decoded audio signal is generated, and is turned on so that a lossless decoded audio signal is generated. Hence, in order to generate a lossy decoded audio signal, only spectral signals of a specified band, e.g., a lower frequency band, are supplied to the next-stage component. In order to generate a lossless decoded audio signal, spectral signals of all frequency bands are supplied to the next-stage component.
When the sine-wave-signal adding unit 65 receives a sine-wave signal from the sine-wave-signal reconstructing unit 62, it adds the sine-wave signal to the time signal of each frequency band.
The signal-reconstructing unit 71 performs inverse quantization on spectral signals, by using either a 32-bit coefficient table supplied from the table storage unit 72 or a 24-bit coefficient table supplied from the data-shifting unit 74. Which coefficient table, the table supplied from the table storage unit 72 or the table supplied from the data-shifting unit 74, is supplied to the unit 71 is determined by the operation of the switch 73. To be more specific, the 32-bit coefficient table stored in the table storage unit 72 is supplied to the data-shifting unit 74 in order to generate a lossy decoded audio signal or to the signal-reconstructing unit 71 in order to generate a lossless decoded audio signal. In the data-shifting unit 74 the coefficient data of the 32-bit coefficient table are sifted to the right by 8 bits to generate a 24-bit coefficient table. The 24-bit coefficient table is supplied to the signal-reconstructing unit 71. Thus, the coefficient tables are commonly possessed in the spectral-signal reconstructing unit 63. This saves the storage area of the memory used.
In the spectral-signal reconstructing unit 63, not only the coefficient tables, but also source codes are commonly possessed, on the basis of the basic idea of fixed-point operation.
As indicated above, an ordinary lossy-core decoder unit and a simplified lossy-core decoder unit are integrated in the integral lossy-core decoder unit 52. Therefore, the audio-data decoding apparatus 50 does not have to have two types of lossy-core decoder units. Hence, some storage area can be saved in the audio-data decoding apparatus 50. In practice, the storage area can be reduced to about half the area that is otherwise necessary (to about 55%) by integrating the ordinary and simplified lossy-core decoder units.
The present invention is not limited to the embodiments described above. Various changes and modifications can, of course, be made without departing from the scope and spirit of the invention.
For example, the invention is not limited to such hardware configurations as the embodiments described above. Any process can be performed by making a central processing unit (CPU) execute computer programs. In this case, the computer programs can be provided in the form of a recorded medium or acquired through a transmission network such as the Internet.
It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and alterations may occur depending on design requirements and other factors insofar as they are within the scope of the appended claims or the equivalents thereof.
Number | Date | Country | Kind |
---|---|---|---|
2005-221524 | Jul 2005 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
5794179 | Yamabe | Aug 1998 | A |
6675148 | Hardwick | Jan 2004 | B2 |
7464027 | Schuller et al. | Dec 2008 | B2 |
20030171919 | Kim et al. | Sep 2003 | A1 |
20040230425 | Yu et al. | Nov 2004 | A1 |
20070063877 | Shmunk et al. | Mar 2007 | A1 |
Number | Date | Country | |
---|---|---|---|
20070043575 A1 | Feb 2007 | US |