Data compression method and apparatus in which quantizing bits are allocated to a block in a present frame in response to the block in a past frame

Abstract: A method for compressing a digital input signal to provide a compressed output signal in which pre-echo, a common defect of data compressors, is avoided. The digital input signal is divided in time into frames, and into at least one block of data in each frame. The frames include a past frame preceding a present frame. Block floating is applied to the data in the block in each frame. Quantizing bits are adaptively allocated to the data in the block in the present frame in response to the block in the past frame. Finally, the resulting quantized data is added to the compressed output signal. In a first variation, a signal energy or an allowable noise level is determined for the block in each frame. A word length is determined for the block in each frame in response to the determined signal energy or allowable noise level of the block. The quantizing bits are allocated to the data in the block in the present frame in response to the word length for the block in the past frame. In a second variation, a signal energy in the block in each frame is determined, and quantizing bits are adaptively allocated to the data in the block in the present frame in response to an interpolation between the signal energy for the block in the present frame and for the block in the past frame.

Description: Field of the Invention The invention relates to an audio signal processing circuit for compressing a digital input signal to reduce the number of bits required to represent an analog information signal. Background of the Invention A variety of techniques exist for digitally encoding audio or speech signals using bit rates considerably lower than those required for pulse-code modulation (PCM). In sub-band coding (SBC), a filter bank divides the frequency band of the audio signal into a plurality of sub bands. In sub-band coding, the signal is not formed into frames along the time axis prior to coding. In transform coding, a frame of digital signals representing the audio signal on the time axis is converted by an orthogonal transform into a block of spectral coefficients representing the audio signal on the frequency axis. In a combination of sub-band coding and transform coding, digital signals representing the audio signal are divided into a plurality of frequency ranges by sub-band coding, and transform coding is independently applied to each of the frequency ranges. Known filters for dividing a frequency spectrum into a plurality of frequency ranges include the Quadrature Mirror Filter (QMF), as discussed in, for example, R.E. Crochiere, Digital Coding of Speech in Subbands , 55 BELL SYST. TECH. J., No. 8, (1976). The technique of dividing a frequency spectrum into equal-width frequency ranges is discussed in Joseph H. Rothweiler, Polyphase Quadrature Filters: A New Subband Coding Technique , ICASSP 83 BOSTON. Known techniques for orthogonal transform include the technique of dividing the digital input audio signal into frames of a predetermined time duration, and processing the resulting frames using a Fast Fourier Transform (FFT), discrete cosine transform (DCT) or modified DCT (MDCT) to convert the signals from the time axis to the frequency axis. Discussion of an MDCT may be found in J.P. Prineen and A.B. Bradley, Subband / Transform Coding Using Filter Bank Based on Time Domain Aliasing Cancellation , ICASSP 1987. In a technique of quantizing the spectral coefficients resulting from an orthogonal transform, it is known to use sub bands that take advantage of the psychoacoustic characteristics of the human auditory system. In this, spectral coefficients representing an audio signal on the frequency axis may be divided into a plurality of critical frequency bands. The width of the critical bands increases with increasing frequency. Normally, about 25 critical bands are used to cover the audio frequency spectrum of 0 Hz to 20 kHz. In such a quantizing system, bits are adaptively allocated among the various critical bands. For example, when applying adaptive bit allocation to the spectral coefficient data resulting from a Modified Discrete Cosine Transform (MDCT), the spectral coefficient data generated by the MDCT within each of the critical bands is quantized using an adaptively-allocated number of bits. Known adaptive bit allocation techniques include that described in IEEE TRANS. ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, Vol. ASSP-25, No. 4 (1977, August) in which bit allocation is carried out on the basis of the amplitude of the signal in each critical band. This technique produces a flat quantization noise spectrum and minimizes noise energy, but the noise level perceived by the listener is not optimum because the technique does not effectively exploit the psychoacoustic masking effect. In the bit allocation technique described in M.A. Krassner, The Critical Band Encoder: Digital Encoding of the Perceptual Requirements of the Auditory System , ICASSP 1980, the psychoacoustic masking mechanism is used to determine a fixed bit allocation that produces the necessary signal-to-noise ratio for each critical band. However, if the signal-to-noise ratio of such a system is measured using a strongly tonal signal, for example, a 1 kHz sine wave, non-optimum results are obtained because of the fixed allocation of bits among the critical bands. Block floating is a normalization process applied to a block of data comprising plural words, such as a block of plural spectral coefficients. Block floating is applied by multiplying each word in the block by a common value for the block to improve quantization efficiency. In a typical block floating process, the maximum absolute value of the words in the data block is found and is used as a block floating coefficient common to all the words in the data block. Using the maximum absolute value in the band as the block floating coefficient prevents data overflow because the absolute value of no other word in the data block can be greater than the maximum absolute value. A simplified form of block floating determines the block floating coefficient using a shift quantity, which provides block floating in 6 dB steps. A system for compressing an input audio signal using an audio signal processing method that includes block floating is likely to suffer from a phenomenon known as pre-ccho. Pre-ccho seriously impairs the sound quality obtained when the compressed digital signal is subsequently expanded, decoded, and reproduced. Pre-echo manifests itself when there is a transient in the audio input signal being coded, i.e., when the amplitude of the audio input signal increases rapidly. Pre-echo occurs when the transient in the audio input signal occurs part-way in the time frame subject to block floating, especially when the transient occurs towards the end of the frame. The coding system sets a quantization noise level that remains constant during each frame according to the maximum signal level in the frame. This quantization noise level is inappropriate for the part of the frame occurring before the transient, when the signal level is not high enough the mask the quantization noise level. As a result, quantization noise is audible before the transient occurs. Pre-echo is not heard in the latter part of the flame after the transient because of the psychoacoustic property of the human sense of heating called "masking." Masking is a psychoacoustic phenomenon in which a signal is rendered inaudible, or "masked," by other signals occurring simultaneously with, or slightly earlier than, or later than, the signal. Masking effects may be classed into time axis masking effects, that is, masking by signals occurring earlier or later than the masked signal, and concurrent masking effects, which is masking is by simultaneously-occurring signals having a frequency different from the frequency of the masked signal. Backward temporal masking, i.e., masking by a high level sound of noise occurring before the high-level sound, has a considerably shorter duration than forward temporal masking, i.e., masking by a high level sound of noise occurring after the high level sound has ceased. Masking enables a signal to render inaudible any noise within its time or frequency masking range. This means that a digital coding system that produces quantizing noise may have quantizing noise levels that are high compared with the noise level that is allowable in the absence of a signal provided that the quantizing noise lies within the masking range of the signal. Since relatively high levels of quantizing noise are allowable if masked by the signal, the number of bits required to represent the signal, or parts of the signal, may be significantly reduced. A critical band is a measure of the range of frequencies that can be masked by a signal. A critical band is the band of noise that can be masked by a pure signal that has the same intensity as the noise and has a frequency in the middle of the critical band. The width of successive critical bands increases with increasing frequency of the pure signal. The audio frequency range of 0 Hz to 20 kHz is normally divided into, e.g., 25 critical bands. Figure 7 shows a digital representation of an audio signal containing a transient in which the level of the audio signal rapidly increases. The digital signal is divided into frames that include a predetermined number of samples, i.e., the frames T1 through T4, and block floating is applied. If the digital signal subsequent to compression by block floating is expanded, decoded, and reproduced, the quantization noise level in the part of the frame T2 prior to the transient is too high to be masked by the signal level in that part of the frame T2, and pre-echo will be audible. Figure 9 shows a schematic arrangement of a conventional audio signal processing apparatus for compressing the digital signal representing an audio signal. The signal processing apparatus processes a digital input signal by a method in which the input digital signal is divided in time into frames of a predetermined number of samples, each frame of samples in the time domain is orthogonally transformed into a block of spectral coefficients in the frequency domain, block floating is applied to each block of spectral coefficients, each block of spectral coefficients is quantized by adaptive bit allocation, and the quantized signals are transmitted simultaneously with parameters relevant to block floating and adaptive bit allocation. The process by which pre-echo is caused will next be described in connection with the arrangement shown in Figure 9. In Figure 9, the frames of the digital audio input signal TS in the time domain are fed into the input terminal 101. Each frame of the input digital signal TS is transformed in plural spectral coefficients SP by the orthogonal transform circuit 111. The spectral coefficients SP are transmitted to the spectral coefficient quantization circuit 115. The spectral coefficient quantization circuit 115 normalizes the spectral coefficients SP by block floating, and then quantizes the normalized spectral coefficients SP with an adaptively allocated number of bits. Each block of spectral coefficients SP resulting from transforming one frame of the input signal is also supplied to the block floating coefficient calculating circuit 113, which calculates at least one block floating coefficient SF for each block, and provides the block floating coefficients SF to the spectral coefficient quantization circuit 115. The spectral coefficient quantization circuit then carries out block floating on each block using the block floating coefficient SF received from the block floating coefficient calculating circuit 113. The spectral coefficients may divided into bands, a block floating coefficient may be calculated for each band, and block floating may be applied to the spectral coefficients in each band. The spectral coefficients SP are also supplied to the bit allocation calculating circuit 114 which provides a word length WL that indicates the number of bits to be used by the spectral coefficient quantization circuit 115 for quantizing the spectral coefficients. The number of bits used for quantizing determines the quantizing noise level: increasing the number of bits reduces the quantizing noise level. The number of quantizing bits is calculated in response to an allowable noise level calculated from the energy level in each block of spectral coefficients SP, taking masking into consideration. Quantized spectral coefficients QSP produced by processing each block of spectral coefficients with block floating in response to the block floating coefficient SF, and by quantizing each block of spectral coefficients with a number of bits adaptively allocated in response to the word length WL, are fed from the spectral coefficient quantization circuit 115 to the bit stream converting circuit 116. The bit stream converting circuit converts the quantized spectral coefficients QSP, the block floating coefficient SF, and the word length WL, for each block into a bit stream. The output of the bit stream converting circuit is provided as an output bit stream to the output terminal 102. Figure 10 shows a practical arrangement of the bit allocation calculating circuit 114. Each block of spectral coefficients SP is supplied via the terminal 141 to the energy calculating circuit 145 which determines the energy distribution. This can involve determining the energy distribution among the critical bands. The output of the energy calculating circuit 145, the energy level EN, is supplied to the allowable noise level calculating circuit 146, which determines the allowable noise level AN for each block in response to the energy distribution found by the energy calculating circuit 145, and taking masking into account. The output of the allowable noise level calculating circuit 146, the allowable noise level AN, is supplied to the word length calculating circuit 147, which also receives the block floating coefficient SF from the block floating coefficient calculating circuit 113 via the terminal 143. The word length calculating circuit 147 determines the word length WL, indicating the number of allocated bits, from the value of the block floating coefficient for each respective block. Figure 11 shows the units to which block floating is applied. Each unit is represented by a rectangle. Block floating is applied to each unit produced by dividing along the frequency axis and the time axis. The division along the time axis represents the division of the input signal into frames. The division along the frequency axis represents a division of the spectral coefficients resulting from the orthogonal transform of one frame of the input signal into one or more bands, preferably into 25 critical bands. Thus, each rectangle shown in Figure 11 represents a block consisting of one band of the spectral coefficients resulting from transforming one frame of the input signal. For example, for each of the four successive frames of the input signal shown in Figure 11 (frames T1 through T4), the bit allocation calculating circuit 114 performs a set of processing operations to determine the number of bits to allocate for quantizing the spectral coefficients in the each of the blocks B1 through B4, each of the blocks B1 through B4 being a block in one band of the spectral coefficients resulting from transforming the frames T1 through T4, respectively, of the input signal. Figure 12 shows how the bit allocation calculating circuit 114 adaptively allocates bits to the blocks B1 through B4 in the four successive frames T1 through T4, respectively, of the audio signal shown in Figure 7. The bit allocation calculating circuit 114 finds the energy levels EN1 through EN4 in the blocks B1 through B4, respectively. From the respective energy levels, the bit allocation calculating circuit calculates the allowable noise levels AN1 through AN4, in response to the energy levels EN1 to EN4. The bit allocation calculating circuit 114 also calculates the word length WL and the value of the block floating coefficient SF for each for the blocks B1 through B4 from the respective allowable noise levels AN1 through AN4. Referring to Figures 7 and 12, since the signal level in the latter part of the frame T2 is considerably greater than the signal level in the former part, the energy level EN2 of the block B2, and the allowable noise level calculated in response to the energy level EN2, i.e., is the quantizing noise level masked by the energy level EN2, are determined in response to the energy level in the latter part of the frame. As a result, the number of bits allocated for quantizing the spectral coefficients SP in the block B2, i.e., the number of bits indicated by the word length WL2, is allocated such that the quantization noise level in the block B2 is below the allowable noise level AN2, determined in response to the high energy level EN2 in the latter part of the frame. The signal level is low in the former part of frame T2, as shown in Figure 7, so the allowable noise level AN21 in the former part of the frame T2, as shown in Figure 13, should be a relatively low value. On the other hand, the signal level in the latter part of the frame T2 is considerably greater than in the former part, shown in Figure 7, so the allowable noise level AN22 of the block B22 corresponding to the latter part of the frame T2 has a considerably higher value, as shown in Figure 13. Figure 13 also shows energy levels EN21 and EN22 in the blocks B21 and B22 corresponding to the former part and the latter part of the frame T2, for the input signal shown in Figure 7. Because of the differences in energy level and allowable noise level between the two parts of the frame T2, as shown in Figure 13, if the number of bits allocated for quantizing the block B2 is determined in the manner shown in Figure 12, the quantizing noise level is set at a level that exceeds the allowable noise level AN21. This level of quantizing noise is audible as pre-echo in the former part of the frame T2 shown in Figure 13 (in the block B21). It is known to select the duration of a frame to be as short as possible to reduce the possibility of pre-echo. This reduces the time during which pre-echo can occur, which renders pre-echo inaudible by taking advantage of backward masking. In backward masking, a low level sound or noise is masked by a later occurring loud sound. Backward temporal masking operates over a relatively short time span. If the low level sound or noise persists for more than a millisecond or so before the loud sound occurs, the high level sound will not mask the noise or low level sound, and the noise or low-level sound will be heard by the listener. Backward temporal masking is to be contrasted with forward temporal masking in which a high level sound masks a low level sound or noise that occurs after the high level sound has ceased. Forward temporal masking operates over a considerably longer time span than backward temporal masking. Reducing the duration in time of a frame, i.e., reducing the number of samples in a frame, to take advantage of backward temporal masking is undesirable because reducing the frame duration reduces the efficiency of the data compressor. The duration of a frame cannot be reduced far enough for backward masking to be relied upon while providing an acceptable compression efficiency. It is also known to vary the duration of a frame such that the duration is shortened only in those frames in which the signal level increases rapidly. Since block floating is performed on the block of spectral coefficients resulting from transforming into the frequency domain a frame of the input digital signal in the time domain, it is not possible to vary the frame duration over too wide a range because of the window shape applied when performing the transform. Moreover, reducing the length of the frame reduces the resolution in the frequency domain. Thus, pre-echo cannot be reduced beyond a certain limit by temporarily reducing the duration of the frame. It is also known to detect frames in which there is a rapid increase in signal level, and to allocate redundant bits to such frame in an attempt to reduce quantizing distortion. However, in such a method, it has proved difficult to decide correctly how many redundant bits should be allocated. A method for reducing the delay of the encoder in which all features of the precharacterizing part of claim 1 are disclosed, is described in EP-A-0059294. Objects and Summary of the Invention It is an object of the present invention to provide an audio signal processing method for compressing a digital audio signal that prevents impairment of sound quality resulting from pre-echo. This object is achieved by a signal processing apparatus, a signal processing method and a medium according to the enclosed independent claims. Advantageous features of the present invention are defined in the corresponding subclaims. In the audio signal processing apparatus and method of the present invention, bit allocation to the at least one block in the present frame is determined in response to the signal energy or the allowable noise level of the at least one block in a past frame preceding or immediately preceding the present frame. For this reason, bit allocation to the at least one block in a present frame that includes a transient is made in response to the lower signal energy or allowable noise level of the at least one block in the past frame preceding the present frame. As a result, more bits are allocated to the at least one block in the present frame, which reduces quantizing distortion. In addition, since the total number of bits allocated for quantizing the at least one block over a time period of several frames is made constant, bit surplus or deficit may be avoided. In addition, when the total number of bits allocated for quantizing the at least one block over a time period of several frames is made constant, block floating is performed on a variable length time frame. The total number of bits allocated is made constant if a shorter fame is selected, and signal impairment otherwise caused by a constant bit rate may be avoided. Brief Description of the Drawings Figure 1 shows how quantizing bits are adaptively allocated in the apparatus and according to the method of the present invention. Figure 2 is a waveform diagram showing a steady-state signal. Figure 3 shows how quantizing bits are adaptively allocated to steady-state signals in the apparatus and according to the method of the present invention. Figure 4 is a block circuit diagram showing a practical arrangement of an apparatus according to the present invention for carrying out the method according to the present invention. Figure 5 is a block circuit diagram showing a practical arrangement of a frame length decision circuit employed in the arrangement shown in Figure 4. Figure 6 is a block circuit diagram showing a practical arrangement of a bit allocation calculating circuit employed in the arrangement shown in Figure 4. Figure 7 is a waveform diagram showing a transient Figure 8 is a waveform diagram for explaining pre-echo. Figure 9 is a block circuit diagram showing a conventional data compressor arrangement. Figure 10 is a block circuit arrangement showing a practical arrangement of the bit allocation calculating circuit employed in the arrangement of Figure 9. Figure 11 is a diagrammatic view for explaining the units to which block floating is applied. Figure 12 is a diagram showing how quantizing bits are adaptively allocated in the conventional method. Figure 13 is a diagram for illustrating the problem inherent in the conventional signal processing method. Detailed Description of the Invention Referring to the drawings, certain preferred embodiments of the present invention will be described in detail. Referring to Figure 1, the present invention consists of an audio signal processing method in which a digital audio input signal TS, is divided in time into blocks, e.g., blocks B1 through B4, each block corresponding to a frame, e.g., frames T1 through T4, respectively, of the input signal. Block floating is applied to the data in each block. The data in each block is quantized with an adaptively-allocated number of bits. The resulting quantized data for each block is included in the compressed output signal together with the parameters relevant to block floating for the block, i.e., the block floating coefficient SF1 and the word length w1 for the block. In the coding method according to the invention, quantizing bits are allocated to a block in the present frame in response to the signal energy level EN or to the allowable noise level AN in the block in at least one past frame preceding or immediately preceding the present frame. In the signal processing method of the present invention, if the present frame is the frame T2, the number of bits allocated for quantizing the data the block B2 in the frame T2, (i.e., the number of bits indicated by the word length w10 (not shown) and w11) is determined in response to the energy levels EN0 (not shown) or EN1 or to the allowable noise levels AN0 or AN1 in the blocks B0 or B1 in the frames T0 or T1, preceding the frame T2. Preferably, in the data compressing method of the present invention, if the present frame is the frame T2, the number of bits allocated for quantizing the data in the block B2 in the frame T2, (i.e., the number of bits indicated by the word length w11) is determined in response to the energy level EN1 or the allowable noise level AN1 in the block B1 in the frame T1, immediately preceding the frame T2. Referring to Figure 1, in a second audio signal processing method according to the present invention, a frame (for example, the frame T2 in Figure 1) that includes a transient signal, in which the signal level increases rapidly, is detected. Bit allocation (i.e., the number of bits indicated by the word length w10 or w11) to data in the block B2 in the frame T2 is determined in response to the signal energies EN0 or EN1, or EN1, or the allowable noise levels AN0 or AN1, or AN1, in at least one of the blocks B0 or B1, in the frames T0 or T1, preceding the frame T2, or in the block B1 in the frame T1, immediately preceding the frame T2. In the data compressing method and apparatus according to the present invention, it is not the allowable noise levels AN1 through AN4 of the blocks B1 through B4, but the allowable noise level AN of the immediately preceding block, as shown in Figure 1, that is used to determine the word lengths WL1 through WL4 of the blocks B1 through B4, as shown in Figure 12. For example, in the block B1, the word length w11 is determined in response to the allowable noise level AN0 in the immediately preceding block B0. Similarly, in the blocks B2, B3, and B4, the word lengths w12, w13 and w14 respectively are set using the allowable noise level AN1 of the block B1, the allowable noise level AN2 of the block B2, and the allowable noise level AN3 of the block B3, respectively. In the manner just described, in the block B2 of Figure 1, in which the signal level rapidly increases, since the word length w12 is calculated using the value of the low allowable noise level AN1 of the block B1, a number of bits that is large enough to prevent pre-echo from being heard in the former part of the frame T2, where the signal level is low, is allocated for quantizing the data in the block B2. If, in the example of Figure 1, the energy level EN1 in the block B1, immediately preceding the block B2, is increased, the allowable noise level in the block B1 is also increased, so that the number of bits allocated for quantizing the data in the block B2 decreases. However, this decrease in the number of bits does not cause audible pre-echo because the quantization noise in the block B2 is inaudible due to forward masking by the increased-level signal in the frame T1. The later-occurring quantizing noise is masked by the earlier-occurring sound. In the present embodiment, although fewer bits are allocated to the blocks B3 and B4 that occur after the block B2, than with the conventional method described above, the resulting higher quantizing noise level in blocks B3 and B4 is not perceived by the listener as pre-echo because of forward masking by the higher-level signal in the preceding frame T2. It can be seen from above that the audio signal processing method of the present invention is effective for processing transient signals, that is signals in which the level rapidly increases. However, the audio signal processing method of the present invention is also effective for processing steady-state signals. When processing a steady-state audio signal SP, shown for example in Figure 2, the energy levels EN1 through EN4, the allowable noise levels AN0 through AN3, the block floating coefficients SF1 through SF4 and the word lengths w11 through w14 for blocks B1 through B4, respectively, are as shown in Figure 3. Figure 3 also shows, for comparison, word lengths WL1 through WL4 determined in response to the block floating coefficients SF1 through SF4 and the allowable noise levels AN1 through AN4 of blocks B1 through B4, respectively. It can be seen from Figure 3 that, for the steady-state input signal shown in Figure 2, the allowable noise levels AN1 through AN4 of blocks B1 through B4, have substantially the same values as the allowable noise levels AN0 through AN3 in the immediately preceding blocks B0 through B3. Therefore, the results obtained when the word lengths WL1 through WL4 are calculated for blocks B1 through B4 are practically the same as the word lengths w11 through w14 calculated using the allowable noise level in the immediately preceding blocks B0 through B3. Thus, it may be seen that the audio signal processing method of the present invention may be directly applied to steady-state signals. Since all types of input audio signals may be processed in the same way, the arrangement of a system for carrying out the audio signal processing method may be simplified. However, if it is desired to find the word lengths for the blocks B1 through B4 for steady-state signals, it is preferred to use the allowable noise levels AN1 through AN4 for blocks B1 through B4 because a higher sound quality may thereby be obtained. For this reason, it is also possible, and is sometimes preferable, to detect a frequency range having a rapidly increased signal level to apply the signal processing only according to the invention only to this frequency range. The input signal may be tested, from time-to-time, to determine whether it is a transient signal or a steady-state signal. When the input signal is determined to be a steady-state signal, a frame having a longer-than-normal (i.e. a frame having the duration of plural normal frames) can be selected. In this case, it is preferred to find the word length in response to the allowable noise level for the duration of the larger frame to achieve the highest sound quality. Although the word length w1 for the block in the present frame is preferably calculated using the allowable noise level for the block in the immediately preceding frame, the word length may also be calculated using an interpolated value between the allowable noise level for the block in the immediately preceding frame and the allowable noise level for the block in the present frame, i.e., the block for which the word length is being calculated. Alternatively, the word length for the block in the present frame may also be determined in response to an allowable noise level determined from an energy value of the block in the present frame calculated from the data in the block in the preceding frame. As a further alternative, the word length of the block in the present frame may also be determined in response to an allowable noise level determined from energy values for the block in the present frame obtained by interpolating the energy level of the block in the present frame and that of the block in the preceding frame. The method of the present invention may be applied to both fixed bit rate and variable bit rate systems. If the method is applied to a fixed bit rate system, since more bits may be allocated to a block in which the signal level rapidly increases, it is preferred to arrange a plurality of temporally consecutive blocks into a group and to carry out bit rate adjustment for the group of blocks. In the manner described above, the present invention provides an audio signal processing method in which bit allocation to one or more blocks in the present frame is determined in response to the energy level EN or the allowable noise level AN in the respective blocks in the past frames preceding or immediately preceding the present frame. Bit allocation to at least one block in a frame that includes a transient, in which the signal level rapidly increases, for example, block B2 in frame T2, is determined in response to the energy levels EN0 or EN1, or EN1, or the allowable noise levels AN0 or AN1, or AN1, in the blocks B0 or B1 in the past frames T0 preceding or T1 immediately preceding the frame T2. The present invention also provides for the total number of quantizing bits allocated to the blocks during a time period corresponding to the duration of several frames of the input audio signal to be made constant, or the total number of quantizing bits allocated during a time period corresponding to several frames of the input to be made constant by varying to length of the frame to which block floating is applied. Figure 4 shows a practical arrangement of the apparatus according to the invention for carrying out the audio data compressing method according to the invention. In this, the duration of a frame is selected depending on whether the input signal is transient or steady-state. The arrangement shown in Figure 4 transforms a frame of plural samples of a digital audio input signal TS in the time domain into plural spectral coefficients SP in the frequency domain. The digital audio input signal TS, which is divided in time into frames each consisting of a predetermined number of samples, is fed into the input terminal 1. The input signal TS is transformed into plural spectral coefficients SP by the transform circuit 11. The frame length decision circuit also receives the input signal TS and determines a variable frame length, i.e., the number of samples of the input signal in each frame. This also determines the timing between the blocks B1 through B4. Preferably, the variable frame length is obtained by dividing a basic frame by 1, 2, 4, etc. The frame length BL is supplied from the frame length decision circuit 12 to the transform circuit 11, the block floating coefficient calculation circuit 13, the bit allocation calculating circuit 14, the spectral coefficient quantization circuit 15, and the bit stream conversions circuit 16. The transform circuit 11 transforms the input signal TS in the time domain into spectral coefficients SP in the frequency domain. The transform is carried out on frames of the input signal having a frame length determined by the frame length BL. The spectral coefficients SP from the transform circuit 11 are fed into the spectral coefficient quantization circuit 115 for quantizing. The spectral coefficient quantization circuit 15 normalizes the spectral coefficients SP by block floating, and quantizes the normalized spectral coefficients SP with an adaptively allocated number of bits. Each block of spectral coefficients SP resulting from transforming one frame of the input signal is also supplied to the block floating coefficient calculating circuit 13, which calculates at least one block floating coefficient SF for each block of spectral coefficients, and provides the block floating coefficients to the spectral coefficient quantization circuit 15. The spectral coefficients may be divided into plural bands, preferably critical bands, and block floating applied to each band. The block floating coefficient calculating circuit 13 also receives frame length data BL from the frame length decision circuit 12 so that it can determine the block floating coefficient for the length of frame determined by the frame length decision circuit. The spectral coefficient quantization circuit 15 also receives frame length data from the frame length decision circuit 12 so that it can correctly apply block floating. The spectral coefficients SP are also supplied to the bit allocation calculating circuit 14, which provides a word length WL that indicates the number of bits to be used by the spectral coefficient quantizing circuit 15 for quantizing the spectral coefficients. The number of bits is calculated in response to the allowable noise level, which is determined by the energy level in block of spectral coefficients SP, taking masking into consideration. The bit allocation calculating circuit 14 also receives the frame length data BL required for it to determine the number of bits to be allocated for quantizing the spectral coefficients. The quantized spectral coefficients QSP produced by processing each block of spectral coefficients with block floating in response to the block floating coefficient SF, and by quantizing with the number of bits allocated in response to the word length w1, is fed from the spectral coefficient quantizing circuit 15 to the bit stream converting circuit 16. The bit stream converting circuit 16 converts the quantized spectral coefficients QSP, the block floating coefficient SF, and the word length w1 for each block into a bit stream. The output of the bit stream converting circuit is provided as an output bit stream to the output terminal 2. The resulting compressed digital output can then be transmitted or recorded on a suitable recording medium for later reproduction and decoding. Examples of suitable recording media are magneto-optical discs, optical discs, magnetic tapes, and semiconductor memories. Figure 5 shows a practical arrangement of the frame length decision circuit 12. The digital audio input signal TS is supplied via the input terminal 1 to the peak value calculating circuit 21, where a peak value PK1 through PK4 for each of the respective frames T1 through T4, respectively, of the input signal TS is found. The output of the peak value calculating circuit 21 is supplied to the peak value comparator circuit 22. The peak value comparator circuit decides, in response to the output of the peak value calculating circuit 21, whether the input signal TS is a steady-state signal or a transient signal. If the input signal is determined to be a steady-state signal, the peak value comparator circuit 22 provides a frame length BL indicating a long frame length, i.e., a frame having a long duration. Preferably, the frame length BL indicates that the basic frame is not to be divided. If the input signal is determined to be a transient signal, the peak value comparator circuit 22 provides a frame length BL indicating a short frame length, i.e., a frame having a short duration. Preferably, the frame length BL indicates that the basic frame is to be divided by two, four, or more. The frame length BL is fed to the output terminal 23. Figure 6 shows a practical arrangement of the bit allocation circuit 14. The spectral coefficients SP are supplied to the terminal 41. The frame length BL is supplied via the terminal 42 to the energy calculating circuit 45. The block floating coefficients SF are supplied via the terminal 43 to the word length calculating circuit 47. The energy calculating circuit 45 finds the energy distribution of the spectral coefficients SP resulting from transforming with a frame of the input signal having a frame length indicated by the frame length BL. An output of the energy calculating circuit 45 is fed into the allowable noise level calculating circuit 46. Since the frame length BL is also supplied to the allowable noise level calculating circuit 46, the circuit 46 finds the allowable noise level AN, taking masking into account, for the spectral coefficients SP resulting from transforming with a frame of the input signal having a frame length indicated by the frame length BL. The noise level is calculated in response to the energy distribution as found by the energy calculating circuit 45. The allowable noise level AN determined by the allowable noise level calculating circuit 46, is stored in the allowable noise level storage circuit 48. The allowable noise level is stored for one frame so that it can be used as the allowable noise level for the previous block when determining the word length, as described above. The output of the allowable noise quantity calculating circuit 14 for the block in the present frame, i.e., the allowable noise level AN for the block under consideration, and the allowable noise level AN of the block in the frame preceding the present frame, are transmitted to the word length calculating circuit 47. The word length calculating circuit 47 is also supplied via terminal 43 with the block floating coefficients SF from the block floating coefficient calculating circuit 13, and also with the frame length BL. The word length calculating circuit 47 finds, from the allowable noise level AN and from the block floating coefficients SF, for a block having a duration in time indicated by the flame length data BL, the word length w1 indicating the adaptively-allocated number of bits. Although a system for coding spectral coefficients in the frequency domain resulting from transforming a digital audio input signal in the time domain has been described in the above-described embodiments of the present invention, the present invention may also be applied to a system for applying block floating to a signal in the time domain, such as a sub-band coding system in which a time domain signal is coded after frequency division into sub-bands. With the above-described digital audio signal processing method of the present invention, adaptive bit allocation to one or more blocks in the present frame is made in response to signal energies or an allowable noise level in the block in at least one past frame preceding or immediately preceding the present frame. Alternatively, a frame including a transient signal is detected, and adaptive bit allocation to one or more blocks in the present frame is made in response to signal energies or an allowable noise level in the block in at least one past frame preceding or immediately preceding the present frame, so that the perception of pre-echo may be reduced, and the sound quality improved. Also, with the audio data compressing method of the present invention, adaptive bit allocation to one or more blocks in the present frame is made in response to signal energies or an allowed noise level in the blocks in at least one past frame preceding or immediately preceding the present frame, or adaptive bit allocation to one or more blocks of a frame including a transient is made in response to signal energies or an allowable noise level in the blocks in at least one frame preceding or immediately preceding the present frame. In addition, since the total number of bits allocated for quantizing the at least one block over a time period of several frames is made constant, bit surplus or deficit may be avoided. In addition, when the total number of bits allocated for quantizing the at least one block over a time period of several frames is made constant, block floating is performed on a variable length time frame. The total number of bits allocated is made constant if a shorter frame is selected, and signal impairment otherwise caused by a constant bit rate may be avoided.

Claims: A signal processing apparatus for compressing a digital input signal (TS) to provide a compressed output signal, the apparatus comprising: an input signal dividing means (12) for dividing the digital input signal (TS) in time into frames (T1..T4), the frames (T1..T4) including a past frame preceding a present frame, and into at least one block of data in each frame; a block floating means (13) for applying block floating to the data in the at least one block in each frame; a bit allocation means (14) for adaptively allocating quantizing bits to the data in the at least one block in the present frame to provide quantized data; and an output means (16) for adding the quantized data to the compressed output signal, characterized in that said input signal dividing means (12) additionally includes a means (21) for providing a control signal having first state when a frame includes a transient, and otherwise having a second state, and said bit allocation means (14) adaptively allocates quantizing bits to the data in the at least one block in the present frame in response to the at least one block in the past frame when the control signal is in the first state and the at least one block in the present frame when the control signal is in the second state. The signal processing apparatus of claim 1, wherein the apparatus additionally comprises: a means (45, 46) for determining one of a signal energy (EN) and allowable noise level (AN) for the at least one block in each frame, a means (47) for determining a word length (w1) for the at least one block in each frame in response to the determined one of a signal energy (EN) and an allowable noise level (AN); and said bit allocation means (14) adaptively allocates quantizing bits in response to the word length (w1) for the at least one block in the past frame. The signal processing apparatus of claim 1 or 2, wherein said block floating means (13) is additionally for providing a block floating coefficient, and said output means (16) is additionally for adding the block floating coefficient to the compressed output signal. The signal processing apparatus of anyone of claims 1 to 3, wherein the past frame is a frame adjacent to the present frame. The signal processing apparatus of anyone of claims 1 to 4, wherein said block floating means (13) is additionally for providing block floating coefficient (SF), and said output means (16) is additionally for adding the block floating coefficient (SF) to the compressed output signal. The signal processing apparatus of anyone of claims 1 to 5, wherein said input signal dividing means (12) includes a transform means for transforming each frame of the input signal (TS) into plural spectral coefficients, and for dividing the plural spectral coefficients into at least one block to provide the at least one block. The signal processing apparatus of claim 6, wherein said input signal dividing means (12) is additionally for dividing the spectral coefficients into plural blocks corresponding to a critical band, one of the plural blocks providing the at least one block. The signal processing apparatus of anyone of claims 1 to 7, wherein each frame has a duration in time, said output means (16) adds a quantity of quantized data to the compressed output signal for each frame, and said apparatus additionally includes a means for controlling the quantity of quantized data added to the compressed output signal to add a constant quantity of quantized data to the compressed output signal in a time period corresponding to the duration of plural frames. The signal processing apparatus of claim 8, wherein each frame has a frame length and said means for controlling the quantity of quantized data added to the compressed output signal includes a means for varying the frame length to control the quantity of quantized data added to the compressed output signal. A method for compressing a digital input signal to provide a compressed output signal, the method comprising the steps of: dividing (12) the digital input signal (TS) in time into frames (T1..T4), the frames (T1..T4) including a past frame preceding a present frame, and into at least one block of data in each frame; applying (13) block floating to the data in the at least one block in each frame; adaptively allocating (14) quantizing bits to the data in the at least one block in the present frame to provide quantized data; and adding (16) the quantized data to the compressed output signal, characterized in that said step of dividing (12) the digital input signal (TS) includes the step of providing (21) a control signal having first state when a frame includes a transient, and otherwise having a second state, and in said step of adaptively allocating (14) quantizing bits to the data in the at least one block in the present frame, quantizing bits are allocated in response to the at least one block in the past frame when the control signal is in the first state and the at least one block in the present frame when the control signal is in the second state. The method of claim 10, wherein the method additlonally comprises the steps of: determining (45, 46) one of a signal energy (EN) and an allowable noise level (AN) for the at least one block in each frame and determining (47) a word length (w1) for the at least one block in each frame in response to the determined one of a signal energy (EN) and an allowable noise level (AN); and in the step of adaptively allocating (14) quantizing bits to the data in the at least one block in the present frame, the quantitzing bits are allocated in response to the word length (w1) for the at least one block in the past frame. The method of claim 10 or 11, wherein said step of applying block floating (13) includes the step of providing a block floating coefficient, and said step of adding (16) the quantized data to the compressed output signal additionally comprises the step of adding the block floating coefficient (SF) the compressed output signal. The method of anyone of claims 10 to 12, wherein the past frame is a frame adjacent to the present frame. The method of anyone of claims 10 to 13, wherein said step applying block floating (13) includes the step of providing block floating coefficient (SF), and the step of adding the quantized data to the compressed output signal (16) comprises the step of adding the block floating coefficient (SF) to the compressed output signal. The method of anyone of claims 10 to 13, wherein the step of dividing (12) the digital input signal (TS) includes the steps of transforming each frame of the digital input signal (TS) into plural spectral coefficients, and dividing the plural spectral coefficients into at least one block to provide the at least one block. The method of claim 15, wherein the step of dividing (12) the digital input signal (TS) additionally includes the step of dividing the spectral coefficients into plural blocks, each block corresponding to a critical band, one of the plural blocks providing the at least one block. The method of anyone of claims 10 to 16, wherein each frame has a duration in time, in the step of adding (16) the quantized data to the compressed output signal, a quantity of quantized data is added to the compressed output signal for each frame, and the method additionally includes a step of controlling the quantity of quantized data added to the compressed output signal to add a constant quantity of quantized data to the compressed output signal in a time period corresponding to the duration of plural frames. The method of claim 17, wherein each frame has a frame length and said step of controlling the quantity of quantized data added to the compressed output signal comprises varying the frame length to control the quantity of quantized data added to the compressed output signal. A medium storing a compressed digital signal derived from a digital input signal (TS) by a data compression method comprising the steps of: dividing (12) the digital input signal (TS) in time into frames (T1..T4), the frames (T1..T4) including a past frame preceding a present frame, and into at least one block of data in each frame; applying (13) block floating to the data in the at least one block in each frame; adaptively allocating (14) quantizing bits to the data in the at least one block in the present frame to provide quantized data; and adding (16) the quantized data to the compressed output signal, characterized in that said step of dividing (12) the digital input signal (TS) includes the step of providing (21) a control signal having first state when a frame includes a transient, and otherwise having a second state, and in said step of adaptively allocating (14) quantizing bits to the data in the at least one block in the present frame, quantizing bits are allocated in response to the at least one block in the past frame when the control signal is in the first state and the at least one block in the present frame when the control signal is in the second state. The medium of claim 19, wherein, in the method, the method additionally comprises the steps of: determining (45, 46) one of a signal energy (EN) and an allowable noise level (AN) for the at least one block in each frame and determining (47) a word length (w1) for the at least one block in each frame in response to the determined one of a signal energy (EN) and an allowable noise level (AN); and in the step of adaptively allocating (14) quantizing bits to the data in the at least one block in the present frame, the quantitzing bits are allocated in response to the word length (w1) for the at least one block in the past frame. The medium of claim 19 or 20, wherein, in the method, the step of dividing (12) the digital input signal (TS) includes the steps of transforming each frame of the digital input signal (TS) into plural spectral coefficients, and dividing the plural spectral coefficients into at least one block to provide the at least one block. The medium of anyone of claims 19 to 21, wherein the medium is an optical disc. The medium of anyone of claims 19 to 21, wherein the medium includes a semiconductor memory. The medium of anyone of claims 19 to 21, wherein the medium includes a magnetic tape.

Inventors: TSUTSUI KYOYA, Tsutsui Kyoya, Kanagawa, c/o Sony Corporation
Applicants: SONY CORP, SONY CORPORATION
Application year: 1992
Main classification: H04B1
IPC codes: H04B14, H03M7, H04B1