Apparatus for encoding digital signals

Abstract: Apparatus for efficiently encoding a digital signal includes an arrangement (41, 42) for dividing the signal into a number of frequency band signals. The frequency band signals are segmented into blocks and the blocks are orthogonally transformed (43, 44, 45) to form coefficient data. The coefficient data is then quantized (58). A circuit (50) detects whether at least the lowest frequency one of the frequency band signals contains a transient. If so, a control circuit (57; 102; 100) controls processing of at least the lowest frequency band signal so as to reduce the perceptibility of noise in the processed signal. The control circuit may be operative, in the event of detection of a transient, to increase the number of bits used for quantizing at least the lowest frequency band signal, to reduce the block size of at least the lowest frequency band signal, and/or to reduce the level of at least the lowest frequency band signal.

Description: This invention relates to apparatus for encoding digital signals. A known digital signal encoding apparatus employs a bit allocation encoding technique, according to which an input digital signal, such as a speech or other audio signal, is divided into a plurality of channels on a time or frequency axis and the number of bits for each of the channels is adaptively allocated so as efficiently to encode the input digital signal. The apparatus may, for example, employ: subsidiary (sub) band coding (SBC), in which the audio or other signal is divided on a time axis into a plurality of frequency bands for encoding the signal; so-called adaptive transformation coding (ATC), in which the signal is divided into a plurality of frequency bands by quadrature-transforming the signal on a time axis into a signal on a frequency axis for adaptively encoding the signal in each band; or so-called adaptive bit allocation coding (APC-AB), which is a combination of sub band coding (SBC) and so-called adaptive predictive coding (APC) which divides a signal on a time axis into a plurality of bands, transforms each band signal into base bands (low frequency bands), and thereafter performs a plurality of orders of linear predictive analysis for predictively encoding the signal. A specific process used, for example, for band dividing in these various efficient encoding techniques may comprise the steps of dividing an input audio signal in a given unit time into blocks, transforming (quadrature or orthogonal transformation) a time axis into a frequency axis by performing a fast Fourier transform (FFT) for each block to obtain FFT coefficient data from each block, and dividing the coefficient data into a plurality of frequency bands. In this case, encoding is performed by quantizing (requantizing) the FFT coefficient data. Division of an audio signal into bands may be performed in such a manner as to take account of, for example, characteristics of the human sense of hearing. That is, an audio signal may be divided into a plurality of bands (for example, 25 bands) so that higher frequency bands, which are generally referred to as critical bands, have wider bandwidths. The human sense of hearing includes various sound masking effects, including a so-called temporal masking effect and a so-called simultaneous masking effect. The simultaneous masking effect results in a sound (or noise) of relatively low level that is generated simultaneously with a sound of relatively high level being masked by the sound of relatively high level so that the sound of relatively low level cannot be heard. The temporal masking effect occurs both after and before a sound of high level so as to provide so-called forward masking and backward masking effects, respectively. The forward masking effect lasts for a relatively long period of time (for example, about 100 milliseconds) after a high level sound transient, while the backward masking effect lasts for a short period of time (for example, about 5 milliseconds). The levels (amounts) of the forward and backward masking effects are about 20 dB and 30 dB, respectively. If an audio signal in a given unit time block is subjected to fast Fourier transformation when the signal is encoded, an inverse fast Fourier transformation (IFFT) is performed when the signal is decoded. Noise generated by the FFT and IFFT will generally appear over the entirety of the block in the signal obtained by the decoding and encoding. Accordingly, if a transient sound level change occurs in a block B which is subjected to an FFT or IFFT, or (for example) if a transient increase in a signal in the block B results from the arrival of a signal portion C having an abruptly increasing level, like a signal generated by a percussion instrument such as a castanet, into a "no sound" or "no signal" signal portion U of the block, as shown in Fig. 1 of the accompanying drawings, a noise component generated by the carrying out of the FFT or IFFT processing will occur in the no-signal portion U. That is, noise components resulting from the high level signal portion C will occur in the no-signal portion U, as shown in Fig. 2 of the accompanying drawings. Therefore, when the signal is reproduced, the noise produced in the inherently no-signal portion or area is readily perceptible. The noise generated after the high level signal portion C by FFT or IFFT processing of a block having such a transient change can be relatively less readily heard since it is masked by the relatively long duration forward masking FM, as shown in Fig. 3 of the accompanying drawings. The noise generated before the high level signal portion C is, however, more readily heard, since the backward masking BM effect lasts for a relatively short period of time. That is, the noise generated before the time when the backward masking becomes effective is more readily heard. As a countermeasure for the case in which suppression of noise by the above-mentioned backward masking BM cannot be expected, consideration could, for example, be given to the possibility of shortening the length of the unit time block to which the fast Fourier transform is applied to be about equal to the period of time (for example, 5 milliseconds) over which the backward masking BM is effective. That is, consideration could be given to increasing the time resolution of the efficient encoding (shortening the block length) to a period of time over which the backward masking BM effect caused by the high level signal portion C is effective. However, since shortening of the unit time block length which is Fourier transformed will decrease the number of samples in the block, the frequency resolution provided by the Fourier transform is conversely lowered. In general, the frequency analysis capability of the human sense of hearing is relatively low and relatively high at higher and lower frequencies, respectively. Accordingly, in practice, the unit item block length cannot be greatly shortened in view of the necessity of ensuring the required frequency resolution in the lower frequency band or range. That is, it is preferable to have a higher time resolution in the lower frequency band or range. In general, since the block is longer for a lower frequency band signal and is conversely shorter for a high frequency band signal, it is effective to increase the time resolution (to shorten the block length) at the higher frequency band. Funktechnische Mitteilungen, vol. 33, no. 4, August 1989, pages 149-154, "TRANSFORMATIONCODIERUNG FUER QUALITATIV HOCHWERTIGE AUDIOSIGNALE MIT SIGNALVOR- UND-NACHUERARBEITUNG IM ZEITBEREICH (Transformation coding of high-quality audio signals with temporal pre- and post- processing)", Thomas Vaupel, discloses apparatus for encoding a digital audio signal. The apparatus includes an MSC-coder in which the digital signal is segmented into blocks and subjected to Fourier transformation coding. In order to enhance the signal to noise ratio of the apparatus, a transition in a transformation block is detected and, in response thereto, the power of the signal is emphasised, prior to the transition, before the transformation coding is carried out. The emphasis factor is calculated from the mean signal powers prior to and after the transition. The power of the signal is then de-emphasised, after the coding operation, at the receiver. International (PCT) Patent Application Publication No. WO 88/04117, published 2 June 1988 (which corresponds to US Patent No US-A-4 972 484, published 20 November 1990), discloses apparatus for transmitting or storing a digitised audio signal in which a bank of quadrature mirror filters is used to divide the digital audio signal into a plurality of frequency band signals (sub-bands). According to the invention there is provided apparatus for encoding a digital signal, the apparatus comprising: frequency dividing means for dividing said digital signal into a plurality of frequency band signals; encoding means for encoding said plurality of frequency band signals, the encoding means comprising block segmentation means for segmenting each of said frequency band signals into blocks comprising plural samples of said digital signal, orthogonal transformation means for orthogonally transforming said blocks to form coefficient data, and quantization means for quantizing said coefficient data with a number of bits to form an encoded digital signal; transient detection means connected to receive at least the lowest frequency one of said frequency band signals, said transient detection means being operative to detect a transient in said signal received thereby and to produce an output indicative of a transient having been detected; and control means responsive to said output produced by the transient detection means indicating that a transient has been detected to control the encoding performed by said encoding means of at least said lowest frequency band signal in such a manner as to reduce the perceptibility of noise in the encoded digital signal. Embodiments of the invention disclosed below enable minimization, in a digital signal encoding apparatus, of the perceptibility of noise generated by transformation of a frequency band signal which has been divided from the digital signal and which contains a transient. Such minimization of the perceptibility of noise generated by the transformation may make use of the temporal masking effect. One of the embodiments of the invention disclosed below provides an apparatus for efficiently encoding digital data, in which: input digital data is divided into a plurality of bands (preferably so that a higher frequency band has a wider bandwidth); a block including a plurality of samples is formed for each of the divided bands; coefficient data is obtained by performing a quadrature (orthogonal) transformation of each block of the respective bands; and the coefficient data is quantized; the apparatus comprising a detection circuit for detecting a transient change of a data block (before the quadrature transformation) of at least the lowest frequency band, and means for determining the number of allocation bits for the quantization, the determining means being controlled based on an output of the detection circuit so that the number of bits allocated for the lower frequency band coefficient data is increased when there is a transient change. When the block is formed, the block length can be made longer (the time resolution made higher) in a higher frequency band and the number of samples in one block can be increased. The coefficient data of each band which is quantized can be coefficient data of each of the bands (for example, 25 bands) making up a so-called critical area or critical band area. If there is a transient change in a block of data in at least the lowest frequency band, the influence of noise upon the data in the block can be reduced by increasing the number of quantization allocation bits of the block in the lowest frequency band. This results in an apparatus for efficiently encoding digital data in which a higher time resolution can be obtained in a higher frequency band and a higher frequency resolution can be obtained in a lower frequency band, and in which the perceptibility of noise generated due to a high level signal in a block in a lower frequency band, in which the time resolution can be made higher, can be reduced. According to other embodiments disclosed below, a similar effect to that achieved by increased the number of bits used for quantization of a block of the lowest frequency band signal in which a transient is detected can be achieved by reducing the block size of the lowest frequency band signal. The invention will now be further described, by way of illustrative and non-limiting example, with reference to the accompanying drawings, in which like references designate like items throughout, and in which: Fig. 1 is a graph showing data in which a transient change occurs prior to fast Fourier transformation; Fig. 2 is a graph showing noise generation that occurs after fast Fourier transformation and inverse fast Fourier transformation of the data shown in Fig. 1; Fig. 3 is a graph used for explaining temporal masking; Fig. 4 is a schematic block diagram of an apparatus embodying the invention for efficiently encoding digital data: Fig. 5 is a chart showing a manner of effecting band division in the apparatus of Fig. 4; Fig. 6 is a view showing resolutions in frequency and time areas; Fig. 7 is a block diagram showing the structure of a decoder corresponding to the encoding apparatus embodying the invention; Fig. 8 is a block diagram showing the detailed structure of a quantization processor of the apparatus of Fig. 4; Fig. 9 is a graph showing a Bark spectrum; Fig. 10 is a graph showing a masking spectrum; Fig. 11 is a graph showing a synthesized minimum audible curve and the masking spectrum; Fig. 12 is a block diagram showing another way of carrying out bit allocation; and Fig. 13 is a schematic block diagram of another apparatus embodying the invention for efficiently encoding digital data, showing other techniques than bit allocation number variation for reducing the perceptibility of noise when a transient is detected in a block of a lowest frequency band signal prior to orthogonal transformation. Embodiments of the present invention will now be described with reference to the drawings. Fig. 4 shows an apparatus embodying the invention for efficiently encoding digital data, which is operative to encode input digital data, such as a speech or other audio signal in the form of a series of digital samples, by using (for example) the above-mentioned sub band coding (SBC) technique. That is, in the embodiment of the apparatus shown in Fig. 4, input digital data supplied via an input terminal 30 is divided in known manner into a plurality of frequency bands (frequency band signals) by so-called quadrature mirror filters (QMFs) 41 and 42. The division is carries out such that the bandwidth of the divided bands generally increases with frequency. Thus, in the present example, as explained in more detail below, the input signal is divided into three bands of which the highest has a bandwidth of 12 kHz and the other two have bandwidths of 6kHz each. A block comprising a plurality of samples is formed for each of the divided bands by a respective one of three fast Fourier transform (FFT) circuits 43, 44 and 45. A quadrature (orthogonal) transformation (in which a time axis is transformed into a frequency axis) is performed for each of blocks in the respective one the circuits 43, 44 and 45 by, for example, a fast Fourier transform, to obtain coefficient data (FFT coefficient data). That is, in a manner known in the art, each of the circuit 43, 44 and 45 acts both as block segmentation means for forming blocks of samples from the respective divided frequency band signal applied thereto, and as orthogonal transformation means for orthogonally transforming the blocks into coefficient data. The FFT coefficient data from the circuits 43, 44 and 45 are then quantized with an adaptive allocation bit number (as described below) by a quantization processor 58, and the resultant quantized data are outputted at an output terminal 31. When the blocks are formed in the circuits 43, 44 and 45, the time resolution is increased (by extending the length of the block) in a higher frequency band, while the frequency resolution is increased (by increasing the number of samples in one block) in a lower frequency range. In the present embodiment, the coefficient data of each band which is quantized is coefficient data of each of several bands (for example, 25 bands) constituting so-called critical bands (see below) making up a critical area of the spectrum of the human sense of hearing. The apparatus of Fig. 4 comprises a transient detection circuit 50, which detects a transient change of block data in at least the lowest divided frequency band before the quadrature transformation, and a bit allocation circuit 57 which determines the number of allocation bits for the quantization carried out in the quantization processor 58. The bit allocation circuit 57 is controlled in accordance with an output produced by the detection circuit 50. Specifically, when a transient change is detected by the circuit 50, the number of allocation bits used for quantization of the FFT coefficient data in the lowest frequency band, namely that coefficient data produced by the FFT circuit 45, is increased. That is, the detection circuit 50 in the present embodiment is operative to detect a block including a transient change, as described above with reference to Fig. 1, more particularly a rising-up portion (leading edge) at which the level of the signal increases. The apparatus of Fig. 4 reduces the perceptibility of noise generated (as described above with reference to Figs. 1 to 3) by the above-mentioned high level signal portions C by increasing the number of bits used in quantization of blocks in the lowest frequency band found to contain such signal portions. Referring now to Fig. 4 in more detail, the audio digital data supplied to the input terminal 30 have, for example, a bandwidth of 24 kHz, and have been sampled at a sampling frequency fs, for example 48 kHz. The digital data are divided by the QMFs 41 and 42 into the three above-mentioned frequency bands, namely a relatively wide highest frequency band (12 to 24 kHz) and relatively narrow intermediate (6 to 12 kHz) and lowest (0 to 6 kHz) frequency bands. The QMF 41 divides the 0 to 24 kHz digital data to provide 12 to 24 kHz and 0 to 12 kHz outputs which are supplied to the FFT circuit 43 and the QMF 42, respectively, the 12 to 24 kHz output constituting the above-mentioned highest frequency band. The 0 to 12 Khz output fed to the QMF 42 is further divided by the QMF 42 into 6 to 12 kHz and 0 to 6 kHz outputs, which are supplied to the FFT circuits 44 and 45, respectively, the 6 to 12 kHz and 0 to 6 kHz outputs constituting the above-mentioned intermediate and lowest frequency bands, respectively. Each of the FFT circuits 43, 44 and 45 forms successive blocks each comprising a plurality of samples of the data of the respective frequency band supplied thereto and applies a Fourier transform to each block to provide FFT coefficient data. The FFT circuit 43 form blocks each of 64 samples and generates FFT coefficient data for each block. As a result of this, the time resolution in the relevant frequency band (12 to 24 kHz) is as high as about 2.67 milliseconds (ms). The FFT circuit 44 forms blocks each comprising 64 samples in providing the FFT coefficient data. As a result of this, the time resolution at the 6 to 12 kHz band is about 5.3 milliseconds (ms). The FFT circuit 45 produces the FFT coefficient data by forming blocks each comprising 128 samples, whereby the time resolution at the 0 to 6 kHz band is about 10.67 milliseconds (ms). In the present embodiment, quantization is performed in the quantization processor 58 using a number of adaptive allocation bits which takes account of masking based on characteristics of the human sense of hearing. Accordingly, the outputs of the FFT circuits 43, 44 and 45 are caused to correspond to respective parts or bands of the above-mentioned critical area in a manner similar to the human sense of hearing. That is, the output of the FFT circuit 43 corresponds to two bands, such as bands B24 and B25 of 25 critical bands designated B1 to B25, respectively, in a higher frequency part or band of the critical area. The output of the FFT circuit 44 corresponds to three bands such as the bands B21 to B23. The output of the FFT circuit 45 corresponds to twenty bands such as the bands B1 to B20 making up a lower frequency part or band or the critical area. The manner in which band division is effected on the frequency axis in the above embodiment is shown in Fig. 5. The resolutions in the frequency and time areas or domains are as shown in Fig. 6. In Fig. 5, the number of coefficient data at the low frequency (0 to 6kHz) bands B1 to B20 is selected to be one for each of the bands B1 to B8, two for each of the bands B9 to B11, three for each of the bands B12 and B13, four for each of the bands B14 to B16, six for each of the bands B17 and B18, nine for the band B19 and eleven for the band B20, making a total of 64, namely 32 for the bands B1 to B16 and 32 for the bands B17 to B20. The number of coefficient data in the intermediate frequency (6 to 12 kHz) bands B21 to B23 is selected to be seven for the band B21, eleven for the band B22, and fourteen for the band B23, making a total of 32. The number of coefficient data is sixteen in each of the high frequency (12 kHz to 24 kHz) bands B24 and B25, making a total of 32. Fig. 6 shows one unit of processing such as may be used in the above-mentioned band dividing and fast Fourier transformation operations. The blocks are specified by two parameters m and n in a term b(m, n), where m denotes the band number and n denotes the time order. Fig. 6 shows that one block in each band of the 0 to 6kHz lowest frequency band has a time length (duration) of 10.67 ms (time resolution), one block in the 6 to 12 kHz intermediate frequency band has a time length (duration) of 5.3 ms, and one block in the 12 to 24 kHz highest frequency band has a time length (duration) of 2.67 msec. That is, as described above, both the resolutions on the frequency and time axes which are needed by the human sense of hearing are simultaneously satisfied in the present embodiment. The frequency resolution is high, since the number of samples for processing is high at the lower frequencies (0 to 6 kHz). The bandwidth becomes greater and the time resolution becomes higher at the higher frequencies (12 to 24 kHz). The time resolution also becomes higher at the intermediate frequencies (6 to 12 kHz). If a transient change (a high signal level portion C) as shown in Fig. 1 is detected in the data making up a block when fast Fourier transform processing of a block is performed by any of the FFT circuits 43, 44 and 45, the above-described noise shown in Fig. 2 is generated by the high level signal portion C in the portion U of the block having no signal. The period of time for which the backward masking effect caused by the high level signal portion C in the block lasts is, as mentioned above, about 5 ms. Accordingly, it is necessary to reduce the block length, that is the time resolution, to about 5 ms in order effectively to use the backward masking effect to mask the noise. Since the time resolutions at the high frequency (12 to 24 kHz) band and the intermediate frequency (6 to 12 kHz) band are (as mentioned above) 2.67 ms and 5.3 ms, respectively, in the encoding apparatus of the present embodiment, the time resolutions at the high and intermediate frequency bands are substantially satisfactory. No remedial action is needed. However, in the apparatus of the present embodiment, the time resolution at the low frequency band (0 to 6 kHz) is 10.67 ms, as mentioned above, in order to ensure the necessary frequency resolution at the low frequency band. The apparatus is designed to cope with noise due to a high level signal portion C appearing in a block in the low frequency band, even though the time resolution is 10.67 ms. To accomplish this end, when a block having a transient change is detected (by the circuit 50) before quadrature transformation in the low frequency band, the number of allocation bits for quantization (in the quantization processor 58) of the FFT coefficient data of the block in the low frequency band is decreased so that the perceptibility of the noise is reduced. The construction of the detection circuit 50, and how it operates to detect transients in the low frequency band, will now be explained in more detail. Referring again to Fig. 4, the 0 to 6 kHz output (divided frequency band), that is the low frequency output of the QMF 42, is also fed to a small block forming circuit 46 of the detecting circuit 50. The small block forming circuit 46 further divides one block (or, more precisely, those samples destined to be formed into a block), which comprises 128 samples in the case of the FFT circuit 45, into three (relatively) small blocks T 1 , T 2 and T 3 . The three small blocks are generated in the temporal order of T 1 , T 2 and T 3 . The small blocks T 1 , T 2 and T 3 are fed to energy calculating circuits 47, 48 and 49, respectively, which determine the energy values of the respective small blocks. The energy values of the small blocks determined by the energy calculating circuits 47 and 48 are fed to a divider 51 and the energy values determined by the energy calculating circuits 48 and 49 are fed to a divider 52. The energy value of the small block T 2 is divided by the energy value of the small block T 1 in the divider 51 to provide an output (T 2 /T 1 ). The energy value of the small block T 3 is divided by the energy value of the small block T 2 in the divider 52 to provide an output (T 3 /T 2 ). The outputs (T 2 /T 1 ) and (T 3 /T 2 ) from the dividers 51 and 52, respectively, are fed to comparators (comparison circuits) 53 and 54, respectively. Each of the comparators 53 and 54 compares the output supplied thereto from that one of the dividers 51 and 52 connected thereto with a reference input supplied to both the comparators 53 and 54 via a common terminal to determine whether or not the supplied output is M times the reference input. When a charge in even one unit small block exceeds M times the reference input, a predetermined signal is outputted from the comparator 53 and/or the comparator 54. That is, a predetermined signal indicating that one of the blocks each comprising 128 samples has a transient change therein is outputted. The outputs of the comparators 53 and 54 are fed to a latch circuit 55 via an OR (logical addition) gate 55. The latch circuit 56 accepts the output of the OR gate 55 in synchronization with clock signals on a terminal 32, supplied at a rate of one per block of 128 samples, and applies it to the bit allocation circuit 57. Only a block having a transient change from which no backward masking effect can be expected can be detected by performing the above series of processing operations involving dividing and comparison. For example, a block in which a backward masking effect due to the high level signal portion C is not complete, since the period of time from the leading edge of the block to the leading edge of the signal is longer than 5 ms, can be detected. The bit allocation circuit 57 increases the number of quantization allocation bits of the block in the 0 to 6 kHz band in response to a said predetermined signal accepted by the latch circuit 56 once per 128 sample block. For example, the number of the allocation bits applied to the block of each band in the low frequency band can be made larger by one bit than that applied to the blocks in the other frequency bands. Alternatively, the number of allocation bits applied to the block having a transient change can be made double that applied to the other blocks. Thus, in the present embodiment, if it is detected that a block in the low frequency band has a transient change, the perceptibility of the noise in that block is reduced by increasing the number of quantization bits applied to the block. Since detection of a block having a transient change is carried out in the low frequency band, malfunctioning is reduced as compared to a case in which detection is carried out, for example, in the full band. If the number of quantization allocation bits in the low frequency band is decreased, the number of allocation bits is decreased. The structure of a decoder corresponding to the encoding apparatus described with reference to Fig. 4 is shown in Fig. 7. In Fig. 7, data from the output terminal 31 of Fig. 4 are transmitted to an input terminal 61. The transmitted data are divided by a demultiplexer 62 into data in a high frequency band (the bands B24 and B25 making up the range of 12 to 24 kHz), an intermediate frequency band (the bands B21 to B23 making up the range of 6 to 12 kHz) and a low frequency band (the bands B1 to B20 making up the range of 0 to 6 kHz). The data in the high, intermediate and low frequency bands are transmitted to inverse fast Fourier transform (IFFT) circuits 63, 64 and 65, respectively, which apply inverse fast Fourier transform processing to the inputted data. Outputs of the IFFT circuits 64 and 65 are fed to a synthesizing filter 66 having characteristics inverse to those of the QMF 42, whereby the inputted data are synthesized with each other. Outputs of the synthesizing filter 66 and the IFFT circuit 63 are fed to a synthesizing filter 67 having characteristics inverse to those of the QMF 41, whereby the inputted signals are synthesized. An output of the synthesizing filter 67 is supplied to an output terminal 68 as a decoded output. The detailed structure of the circuit of the quantization processor 58 of Fig. 4 is shown in Fig. 8. The circuit of Fig. 8 comprises a sum total detection circuit 14 which receives FFT coefficient data from the FFT circuits 43, 44 and 45 of Fig. 4 after they have been processed by an amplitude and phase information generation circuit 12 and a band dividing circuit 13 (both described below). The sum total detection circuit 14 comprises noise level presetting means that presets an allowable noise level of each band unit based upon the energy (or a peak value, or an average value) of each band. The sum total detection circuit 14 is followed by a filter circuit 15. A quantization circuit 24 performs quantization of each band in accordance with the energy of each band (as detected by the sum total detection circuit 14) and the number of allocation bits depending upon the level difference of the noise level presetting means, and increases the number of the allocation bits for a block of the low frequency band in which a transient change is detected. The noise level presetting means presets a higher allowable noise level for the same energy of a band in which the frequency of the critical band is higher. The circuit as shown in Fig. 8 includes the detection circuit 50, shown and described above with reference to Fig. 4, which detects a transient change in a block of data of at least a lowest frequency band before quadrature transformation, and the bit allocation circuit 57 (also shown and described above with reference to Fig. 4) which determines the number of quantization allocation bits. The bit allocation circuit 57 is controlled in accordance with the output of the detection circuit 50, as described above, so as to increase the number of quantization allocation bits for the low frequency band FFT coefficient data when a transient change is detected. In the circuit of Fig. 8, an allowance function which presets an allowable noise level is generated by an allowance function generating circuit 29 which is controlled by an allowance function control circuit 28 for presetting the allowable noise level based on the allowance function, as will be described below. Thereafter, a quantization output from the quantization circuit 24 is outputted from an output terminal 2 of the circuit of Fig. 8. The circuit of Fig. 8 also performs bit rate adjustment (so-called "bit packing") for making the bit rate per unit block (frame) constant. That is, in Fig. 8, for example, FFT coefficient data comprising real and imaginary component values Re and Im may be obtained from each of the FFT circuits 43, 44 and 45. The FFT coefficient data are transmitted to the amplitude and phase information generating circuit 12, in which an amplitude value Am and a phase value are obtained from the real component value Re and the imaginary component value Im, and from which information representative of the amplitude value Am is outputted. In this regard, since the human sense of hearing is generally sensitive to the amplitude (power) in different frequency areas, but is insensitive to the phase, the amplitude and phase information generating circuit 12 outputs only the amplitude value Am for subsequent processing and only the present amplitude value Am is transmitted to the band dividing circuit 13. The band dividing circuit 13 divides the data representative of the amplitude value Am into the critical bandwidths. The amplitude value Am of each of the bands (for example, 25 bands) which have been divided into critical bands in the band dividing circuit 13 is transmitted to the sum total detection circuit 14, which determines (generates information representative of) the energy of each of the bands (spectrum level or intensity in each band) by calculating the sum total of the amplitude values Am (peak values or averaged values) of the amplitude value Am or the sum total of the energy. The output of the circuit 14, that is the spectrum of the sum total of each band, is generally referred to in the art as the Bark spectrum. The Bark spectrum SB of the bands is shown in Fig. 9. (For simplicity of illustration, only 12 (B 0 to B 12 ) of the bands of the critical area are illustrated in Fig. 9.) A function of a given weighting is convoluted (convolved) into the Bark spectrum SB to take account of an influence of the Bark spectrum SB on noise masking. (That masking is simultaneous masking, as opposed to the temporal masking discussed above.) To this end, the output of the sum total detecting circuit 14, that is each spectral intensity value of the Bark spectrum, are fed to the filter circuit 15, at which they are multiplied by given filter coefficients (a weighting function) to perform a convolution of the Bark spectrum. The sum total of the portions represented in Fig. 9 by dotted lines is computed by this convolution. If a level alpha which corresponds to the allowable noise level (which will be described hereinafter) when the masking effect of the Bark spectrum SB is calculated is low, the masking spectrum (masking curve) will be lowered. As a result of this, it will be necessary to increase the number of bits allocated for quantization by the quantization circuit 24. On the contrary, if the level alpha is high, the masking spectrum will be raised. As a result of this, the number of bits allocated on quantization could be decreased. The expression "the level alpha which corresponds to the allowable noise level" means a level at which the noise level of each band in the critical area is made allowable by inverse convolution (deconvolving) processing. The spectral intensity or strength (energy) of audio data and the like at a higher frequency band is generally low. Accordingly, in the circuit of Fig. 8, the level alpha is raised in the high frequency band, in which the energy is low, so that the number of allocation bits in the higher frequency band portion is decreased. For this reason, the noise level presetting means presets a higher level alpha for the same energy as the frequency becomes higher. That is, in the circuit of Fig. 8, the level alpha corresponding to the allowable noise level is calculated to control the level alpha so that it is increased for higher frequencies. The output of the filter circuit 15 is fed to a subtractor 16 which is operative to determine the level alpha in the convoluted (convolved) area. The subtractor 16 is supplied with the allowance function (a function representative of the masking level) for determining the level alpha. The level alpha is controlled by increasing or decreasing the allowance function, the allowance function being supplied from the allowance function generating circuit 29 which is controlled by the function control circuit 28 (which will be described hereinafter). This is, the level alpha corresponding to the allowable noise level can be determined by the equation alpha = S - (n - ai) where n and a are constants and a > 0, S is the intensity or strength of the Bark spectrum after convolution, (n - ai) is the allowance function, and i represents the number of the critical band starting from the lowest band. As mentioned above, it is advantageous to reduce the number of bits beginning with a higher frequency band having a lower energy for reducing the number of whole bits. In a specific implementation of the circuit, n = 38 and a = 1, which has been found to result in there being no deterioration of sound quality so that excellent encoding can be achieved. The level alpha, determined as described above, is fed to a divider 17, which inversely convolutes (deconvolves) the level alpha at the convoluted (convolved) area. Therefore, the masking spectrum, represented at MS in Fig. 10, is obtained from the level alpha by performing the inverse convolution. That is, the masking spectrum represents an allowable noise spectrum. Although complicated operations are in general required for performing inverse convolution, the inverse convolution is performed in the present embodiment by using a simplified divider 17. The masking spectrum is then transmitted to a subtractor 19 via a synthesizing circuit 18. The subtractor 19 is supplied with the output of the sum total detection circuit 14, that is the abovementioned Bark spectrum SB, via a delay circuit 21. Performing a subtracting operation between the masking spectrum MS and the Bark spectrum SB masks the Bark spectrum SB lower than respective levels of the masking spectrum MS. An output of the subtractor 19 is fed to the bit allocation circuit 57, which comprises read only memories (ROMs) 57a and 57b in which data representing the number of allocation bits for quantization of each of low, intermediate and high frequency bands are stored. Data representing the number of quantization allocation bits, depending upon the level difference between the energy level of each band of the critical area and the level preset by the noise level presetting means, are stored in the ROM 57b. Data representing the number of allocation bits in the lower frequency band exceeding that stored in the ROM 57b, and the number of allocation bits in the intermediate and higher frequency bands less than that stored in the ROM 57b, are stored in the ROM 57a. Outputs of the ROMs 57a and 57b are fed to a switching selection switch 57c of the bit allocation circuit 57, which is switched by the output of the latch 56 (Fig. 4) of the detection circuit 50. The switch 57c is switched to select the output of the ROM 57a when the output of the latch 56 indicates, for example by its being at logic level "1", detection of a block having a transient change. The switch 57c is switched to select the output of the ROM 57b when the output of the latch 56 indicates, for example by being at logic level "0", that a block having a transient change has not been detected. The output of that one of the ROMs 57a and 57b switched in the manner just described is supplied to the quantization circuit 24. The circuit 24 performs quantization of the amplitude value Am supplied from the circuit 12 via a delay circuit 23 in dependence upon the output data of one of the ROMs 57a and 57b. In other words, the quantization circuit 24 quantizes the component of each band of the critical area with a number of bits allocated in dependence upon the difference between the energy of that band of the critical area and the level of the noise level presetting means. More quantization bits are allocated to a block having a transient change for quantizing the component of each band. The delay circuit 21 is provided to delay the Bark spectrum SB from the sum total detection circuit 14 to take account of the delays of the circuits preceding the synthesizing circuit 18. The delay circuit 23 is provided to delay the amplitude value Am to take account of the delays of the circuits preceding the bit allocation circuit 57. The synthesizing circuit 18 synthesizes data supplied from a minimum audible curve generating circuit 22, representative of the so-called minimum audible curve (equiloudness curve) RC of the human sense of hearing (as shown in Fig. 11) and the masking spectrum MS. Accordingly, the allowable noise level can be suppressed to portions represented by hatched lines in Fig. 11 by synthesizing the minimum audible curve RC and the masking spectrum MS so that the number of allocation bits in portions represented by the hatched lines can be reduced on quantization. Fig. 11 also shows a signal spectrum SS. Data from the quantization circuit 24 is supplied to a buffer memory 25 and fed from there to a comparator (comparator circuit) 27 after the amount of data has been determined by a data amount calculation (operation) circuit 26. The comparator 27 compares the data amount with data representing a target value for the number of bits in one frame for bit rate adjustment, supplied from a terminal 3, and transmits a result of the comparison to the above-mentioned allowance function control circuit 28. The function control circuit 28 controls the allowance function generating circuit 29 to cause the circuit 29 to generate the allowance function for determining the level alpha and to generate a function for bit rate adjustment. Since the number of allocation bits in the higher frequency band is reduced for a block having no transient change, raising the allowable noise level as the frequency shifts to a higher band in which the energy is lower in the circuit of Fig. 8, the number of allocation bits for quantization can be reduced. Since the number of allocation bits in the lower frequency band is increased (the number of allocation bits in the higher and intermediate frequency bands is decreased), the noise due to the high level signal portion C in the block can be reduced. The specific circuit described above can be modified so that it will not perform the above-mentioned bit rate adjustment and/or synthesis of the minimum audible curve. That is, in an arrangement in which no bit rate adjustment is performed, the data amount calculation circuit 26, the comparator 27 and the function control circuit 28 would be unnecessary and the allowance function from the function generating circuit 29 would be fixed, for example, at a value of (38 - i). In an arrangement in which no minimum audible curve is synthesized, the minimum audible curve generating circuit 22 and the synthesizing circuit 18 would be unnecessary and the output from the subtractor 16 would be inversely convoluted (deconvolved) by the divider 17 and then transmitted directly to the subtractor 19. Although the circuit of Fig. 8 can switch between two allocation bits numbers for quantization by switching the outputs of the two ROMs 57a and 57b, switching of the number of allocation bits may instead be achieved by addressing one ROM only, as shown in Fig. 12. Fig. 12 represents part of another example corresponding to the bit allocation circuit 57 of Fig. 8 and the detection circuit 50 of Fig. 4. Data representative of a plurality of numbers of allocation bits for quantization are stored at respective addresses in a ROM 72. In Fig. 12, an output of a subtractor 19 corresponding to the subtractor 19 of Fig. 8 is supplied to an address generator 71 for generating address data for the ROM 72. The address generator 71 is also supplied with outputs of the dividers 51 and 52 of Fig. 4 via a synthesizing circuit 70. Thus, when a block having a transient change is detected, the address generator 71 generates and supplies to the ROM 72 address data indicating a memory area at which data representing a number of allocation bits depending upon the degree of the transient change is stored. When no block having a transient change is detected, the address data generated designates an area which stores, among allocation bit data stored in the ROM 72, data corresponding to the ROM 57b. Such address data is fed to the ROM 72 so that data representing the number of corresponding allocation bits is outputted to a terminal 73 for use in quantization. Bit allocation for quantization can be made finer by using an arrangement such as that of Fig. 12, so that more adaptive quantization becomes possible. In the embodiments described above, the number of allocation bits for quantization is controlled in accordance with the detection of a transient change before quadrature transformation of a block of at least a lowest frequency band so that the number of allocation bits used in the lowest frequency band is increased when a transient change is detected. Therefore, a higher time resolution can be obtained in a higher frequency band, and a higher frequency resolution can be obtained in a lower frequency band in which the time resolution cannot be made higher, and the perceptibility of noise due to a high level signal portion occurring in a block can be reduced by masking. The desired effect of reducing noise perceptibility when a transient is detected in a block of the lowest frequency band signal (0 to 6 kHz) before orthogonal transformation of the signal (in the FFT circuit 45) can be effected by other techniques than that described above, namely increasing the number of allocation bits used in quantizing the lowest frequency band. Other such techniques will now be described with reference to Fig. 13. Fig. 13 shows another encoding apparatus embodying the invention. The apparatus of Fig. 13 is the same as that of Fig. 4, except for the addition of a gain control circuit 100, a control signal generator 101 and a block size control circuit 102. The gain control circuit 100 is connected in the bus supplying the lowest frequency band signal from the QMF circuit 42 to the FFT circuit 45 so as to be capable of controlling the level of that signal as supplied to the FFT circuit 45. The operation of the gain control circuit 100 is controlled by the control signal generator 101, which has a pair of inputs connected to receive, respectively, the outputs (T 2 /T 1 ) and (T 3 /T 2 ) produced, respectively, by the dividers 51 and 52 of the detection circuit 50. The control signal generator 101, like the synthesizing circuit 70 of Fig. 12, synthesizes the outputs of the dividers 51 and 52. The block size control circuit 102 forms part of the block segmentation means of the FFT circuit 45 and is operative to control the size of the blocks into which the 0 to 6 kHz divided frequency band signal is segmented by the block segmentation means of the FFT circuit 45. The block size control circuit 102 is connected to receive the output logic level of the latch 56 of the detection circuit. The encoding apparatus of Fig. 13 can reduce noise perceptibility, in the event of the detection circuit 50 detecting a transient in a block of the 0 to 6 kHz divided frequency band signal outputted by the QMF 42, in any one or more of the following three ways: (A) Bit number variation In this case, the apparatus of Fig. 13 functions in the same way as the apparatus of Fig. 4, namely as described in detail above with reference to Figs. 1 to 12. (B) Block size reduction In this case, when a transient is detected, the size (number of samples) of the block into which the 0 to 6 kHz signal is segmented by the FFT circuit 45 is reduced relative to the size it adopts when no transient is detected. (C) Level (gain) control In this case, when a transient is detected, the level of the 0 to 6 kHz signal as applied to the FFT circuit 45 is reduced (by controlling its gain) relative to the level it adopts when no transient is detected. Ways of implementing the techniques outlined at (B) and (C) above will now be described with reference to Fig. 13. Taking first the case of technique (B), namely block size reduction, Fig. 13 shows the block size control circuit 102 being connected (for example) to receive the binary level signal outputted by the latch 56 of the detection circuit 50. When no transient is detected, the latch 56 outputs (as explained above) logic level "0". The block size control circuit 102 is responsive thereto to cause the FFT circuit 45 to segment the 0 to 6 kHz signal into its normal block size (128 samples). However, when a transient is detected, and the latch 56 outputs logic level "1", the block size control circuit 102 is responsive thereto to cause the FFT circuit 45 to segment the 0 to 6 kHz signal into a block of a smaller size than 128 samples. Thus, in the case of this particular example, the block size is switched in binary manner between one of two different values in accordance with the value of the binary output of the latch 56. It is, however, possible to control the block size in a finer or more continuous manner, that is to switch it between more than two values in accordance with the detected degree of transient change. This could be done, for example, by arranging for the block size control circuit 102 to receive, instead of the output of the latch 56, a control signal based upon the outputs of the dividers 51 and 52, for example in a similar manner to that described above with reference to Fig. 12 or in similar manner to that described below in which the gain can be controlled by employing the control signal generator 101. Considering now the case of technique (C), namely level (gain) control, Fig. 13 shows the gain control circuit 100 as being connected (for example) to receive a control signal from the control signal generator 101, which in turn receives the outputs produced by the dividers 51 and 52. When the outputs of the dividers 51 and 52 are such as to indicate that no transient is present, the control signal generator 101 is responsive thereto to apply a control signal of a predetermined value to the gain control circuit 100 so that the circuit 100 will apply a predetermined gain to the 0 to 6 kHz signal whereby its level is not influenced by the detection circuit 50. That is, for example, the level of the 0 to 6 kHz signal as applied to the FFT circuit 45 may be the same as it would be in the case of the apparatus of Fig. 4 (which does not incorporate the gain control circuit 100). However, when the outputs of the dividers 51 and 52 are such as to indicate that a transient is present, the control signal generator 101 is responsive thereto to vary the control signal that it applies to the gain control circuit 100 in such a manner as to reduce the gain of the circuit 100 whereby the level of the 0 to 6 kHz signal as applied to the FFT circuit 45 is reduced as compared to its level when no transient is detected. The amount by which the gain of the gain control circuit 100 (and therefore the level of the 0 to 6 kHz signal as applied to the FFT circuit 45) is reduced may, in this particular example, be varied continuously in accordance with the values of the outputs of the dividers 51 and 52, so as to achieve a relatively fine control of the gain as between multiple levels, depending upon the detected degree of transient change. (A technique similar to that described above with reference to Fig. 12 could be used.) If, however, binary control of the gain is considered sufficient, that is if it is considered sufficient for the gain to be varied between a normal value (no transient detected) and one reduced value only (transient detected), the construction shown in Fig. 13 could be modified by controlling the gain control circuit 100 from the binary output of the latch 56 rather than from the output of the control signal generator 101 (which in that event would not be needed). In overall summary of the various above-disclosed techniques of reducing noise perceptibility, in the event of detection by the detection circuit 50 of a transient in a block of the 0 to 6 kHz divided frequency band outputted by the QMF 42, the noise perceptibility can be reduced by: (a) increasing the bit allocation number (in binary or continuous manner); and/or (b) reducing the block size (in binary or continuous manner); and/or (c) reducing the level of the signal (in binary or continuous manner) before it is supplied to the FFT circuit 45. The apparatus described above with reference to Figs. 1 to 12 allows the use of technique (a) only. The apparatus described above with references to Fig. 13 permits the use of technique (a) and/or (b) and/or (c). It will be clear to those skilled in the art from the above description thereof how the circuitry shown in Fig. 13 could be simplified if it were desired to employ technique (b) only, technique (c) only, or techniques (b) and/or (c) only. The use of technique (c) only is not in accordance with the invention as set out in the following claims.

Claims: Apparatus for encoding a digital signal, the apparatus comprising: frequency dividing means (41, 42) for dividing said digital signal into a plurality of frequency band signals; encoding means (43, 44, 45, 58) for encoding said plurality of frequency band signals, the encoding means comprising block segmentation means (43, 44, 45) for segmenting each of said frequency band signals into blocks comprising plural samples of said digital signal, orthogonal transformation means (43, 44, 45) for orthogonally transforming said blocks to form coefficient data, and quantization means (58) for quantizing said coefficient data with a number of bits to form an encoded digital signal; transient detection means (50) connected to receive at least the lowest frequency one of said frequency band signals, said transient detection means being operative to detect a transient in said signal received thereby and to produce an output indicative of a transient having been detected; and control means (57; 102; 100) responsive to said output produced by the transient detection means (50) indicating that a transient has been detected to control the encoding performed by said encoding means (43, 44, 45, 58) of at least said lowest frequency band signal in such a manner as to reduce the perceptibility of noise in the encoded digital signal. Apparatus according to claim 1, wherein said control means comprises quantizing bit number control means (57) for controlling the number of bits used by the quantization means (58) for quantizing said coefficient data, the quantizing bit number control means (57) being operative to increase the number of bits used for quantizing at least said coefficient data formed from said lowest frequency band signal when said output produced by the transient detection means (50) indicates that a transient has been detected. Apparatus according to claim 2, wherein said control means (57) comprises: a first memory (57b) storing data, calculated by the quantization means (58) in accordance with a spectral examination of said coefficient data, representative of the number of bits to be used by said quantization means (58); a second memory (57a) storing data that differs from said data stored in said first memory (57b) by an amount appropriate to bring about said increase in the number of bits to be used for quantizing at least said coefficient data formed from said lowest frequency band signal when said output produced by the transient detection means (50) indicates that a transient has been detected; and a switch (57c) normally operative to connect said first memory (57b) to a quantization circuit (24) of the quantization means (58), said switch (57c) being responsive to said output produced by the transient detection means (50) indicating that a transient has been detected to connect said second memory (57a), instead of said first memory (57b), to the quantization circuit (24). Apparatus according to claim 2, wherein said control means comprises: a memory (72) storing different data, calculated by the quantization means (58) in accordance with a spectral examination of said coefficient data, representative of the number of bits to be used by the quantization means (58) for respective different degrees of transient change; and an address generator (71) capable of generating addresses for said different data, the address generator being connected to receive said output of the transient detection means (50) and being responsive thereto to generate addresses such as to cause the memory (72) to output, for use by a quantization circuit (24) of the quantization means (58), bit number data appropriate to a degree of transient change indicated by said output of the transient detection means. Apparatus according to any one of the preceding claims, wherein said control means comprises block size control means (102) which forms part of the block segmentation means (43, 44, 45) and is operative to control the size of the blocks (number of samples per block) into which at least said lowest frequency band signal is segmented, the block size control means (102) being operative to decrease the block size of at least said lowest frequency band signal when said output produced by the transient detection means (50) indicates that a transient has been detected. Apparatus according to any one of the preceding claims, wherein the transient detection means (50) comprises: block forming means (46) for segmenting a plurality of samples of said lowest frequency band signal, which plurality is destined to be formed into a said block by the block segmentation means (43, 44, 45), into a plural number of smaller blocks; energy calculating means (47, 48, 49) for calculating the amount of energy in each of said smaller blocks and producing output signals representative thereof; and processing means (51, 52; 51 to 56) operative to form said output of the transient detection means from said output signals of the energy calculating means (47, 48, 49). Apparatus according to claim 6, wherein said processing means comprises a plurality of dividers (51, 52) operative to divide respective pairs of said output signals of the energy calculating means (47, 48, 49) to produce divided outputs. Apparatus according to claim 7, including a synthesizing circuit (70; 101) for combining said divided outputs to form said output of the transient detection means (50). Apparatus according to claim 7, wherein said processing means further comprises: a plurality of comparators (53, 54) each connected to receive a respective one of said divided outputs and each operative to compare said divided output that it receives with a reference input and to generate a predetermined output if said divided output that it receives is equal to a predetermined multiple of said reference input; a logical addition gate (55) connected to receive said predetermined outputs of the comparators (53, 54); and a latch (56) connected to receive an output of said logical addition gate (55) and operative to produce a binary output which forms said output of the transient detection means (50). Apparatus according to any one of the preceding claims, wherein the frequency dividing means (41, 42) is so operative that the highest frequency one of said frequency band signals has a greater bandwidth than the others of said frequency band signals. Apparatus according to claim 10, wherein the frequency dividing means (41, 42) is operative to divide a said audio digital signal into three frequency band signals representing substantially 0 to 6 kHz, 6 to 12 kHz, and 12 to 24 kHz bands, respectively, of said audio digital signal. Apparatus according to any one of the preceding claims, wherein the frequency dividing means comprises a plurality of quadrature mirror filters (41, 42) connected in cascade and each operative to divide an input digital signal applied thereto into a pair of output digital signals each having the frequency information content of a respective half of the frequency range of the input digital signal. Apparatus according to any one of the preceding claims, wherein the block segmentation means and the orthogonal transformation means are both constituted by a plurality of orthogonal transformation circuits (43, 44, 45), there being a respective one of said orthogonal transformation circuits for each of said frequency band signals. Apparatus according to any one of the preceding claims, wherein the orthogonal transformation means (43, 44, 45) is operative to orthogonally transform said blocks by subjecting the blocks to fast Fourier transformations.

Inventors: AKAGIRI KENZO, AKAGIRI, KENZO, AKAGIRI, KENZO, C/O PATENTS DIVISION
Applicants: SONY CORP, SONY CORPORATION
Application year: 1991
Main classification: H04B1
IPC codes: H03M7, H04B1