Perceptual coding of audio signals

Abstract: A method is disclosed for determining estimates of the perceived noise masking level of audio signals as a function of frequency. By developing a randomness metric related to the euclidian distance between (i) actual frequency components amplitude and phase) for each block of sampled values of the signal and (ii) predicted values for these components based on values in prior blocks, it is possible to form a tonality index which provides more detailed information useful in forming the noise masking function. Application of these techniques is illustrated in a coding and decoding context for audio recording or transmission.

Description: This invention relates to methods of processing an ordered time sequence of audio signals. Consumer, industrial, studio and laboratory products for storing, processing and communicating high quality audio signals are in great demand. For example, so-called compact disc (CD) digital recordings for music have largely replaced the long-popular phonograph records. More recently, digital audio tape (DAT) devices promise further enhancements and convenience in high quality audio applications. See, for example, Tan and Vermeulen, "Digital audio tape for data storage," IEEE Spectrum , October 1989, pp. 34-38. Recent interest in high-definition television (HDTV) has also spurred consideration of how high quality audio for such systems can be efficiently provided. While commercially available CD and DAT systems employ elaborate parity and error correction codes, no standard presently exists for efficiently coding source information for high quality audio signals with these devices. Tan and Vermeulen, supra, note that (unspecified) data compression, among other techniques, can be used to increase capacity and transfer rate for DAT devices by a factor of ten over time. It has long been known that the human auditory response can be masked by audio-frequency noise or by other-than-desired audio frequency sound signals. See, B. Scharf, "Critical Bands," Chap. 5 in J. V. Tobias, Foundations of Modern Auditory Theory , Academic Press, New York, 1970. These effects have been used to advantage in designing coders for audio signals. See, for example, M.R. Schroeder et al, "Optimizing Digital Speech Coders By Exploiting Masking Properties of the Human Ear," Journal of the Acoustical Society of America , Vol. 66, pp. 1647-1652, December, 1979. E.F. Schroeder and H.J. Platte, " 'MSC': Stereo Audio Coding with CD-Quality and 256 IT/SEC," IEEE Trans. on Consumer Electronics , Vol. CE-33, No.4, Nov. 1987, describes a perceptual encoding procedure with possible application to CDs. In J. D. Johnston, "Transform Coding of Audio Signals Using Perceptual Noise Criteria," IEEE Trans. on Selected Areas in Communications , February 1988, pp. 314-434, there are disclosed enhanced perceptual coding techniques for audio signals. In particular, the systems described in this paper use a human auditory model to derive a short-term spectral masking function that is implemented in a transform coder. Bitrates are reduced by extracting redundancy based on signal frequency analysis and the masking function. The techniques use a so-called "tonality" measure indicative of the shape of the spectrum over the so-called critical bands of the signal to be coded to better control the effects of quantizing noise. According to this invention there is provided a method as claimed in claim 1. The present invention improves on the tonality based perceptual coding techniques described in the cited Johnston paper. These improvements include the use of a frequency-line-by-frequency-line analysis, rather than analysis on a spectrum-wide basis, in calculating the tonality metric values. This line- by-line calculation is advantageously based on a history of consecutive frames of the input power spectrum, rather than on the current frame alone. The present invention then advantageously determines improved estimates of perceptual thresholds on a line-by-line basis, rather than on a critical-band-by-critical-band basis. In appropriate cases, the critical band masking threshold can be used. More particularly, the tonality estimate of the present invention advantageously uses a statistic of a plurality, typically two, of the previous time frames to predict the value of a given power spectrum frequency line in the current time frame. This process features the use of a Eculidian distance between the predicted line and the actual line in a present frame to estimate the tonality (or noisiness) of each spectral line. It proves convenient in these calculations to perform a normalization of the estimates using the predicted and actual values. These tonality estimates can then be combined, e.g., on a critical-band basis, to obtain an estimate of the actual tonality. This is done for each frequency to determine the noise-masking thresholds to be used in quantizing the frequency information to be finally coded for recording, transmission or other use. Available bits are allocated to quantize the values for each frequency based on the calculated threshold; fewer bits are needed where the threshold is high, while finer quantization (lower quantizing noise) is required where the threshold is low. A spreading operation known in the art, e.g., that described generally in the Schroeder, et al paper, supra, is employed in an alternative implementation of certain aspects of the improved masking threshold determination process of the present invention. Threshold information and spectral information characterizing the signal can then be sent to a transmission channel or recording medium from which it can be obtained for decoding and use. Other features and improvements of the present invention will appear from the following detailed illustrative description. Brief Description of the Drawing FIG. 1 is a block diagram of an overall system based on the present invention; FIG. 2 is a flow chart illustrating the masking threshold processing employed in an illustrative embodiment of a coder ; and FIGs. 3A-D show the effects of processing at various stages of coding in an illustrative embodiment . Detailed Description To simplify the present disclosure, reference is made to J. D. Johnston, "Transform Coding of Audio Signals Using Perceptual Noise Criteria," IEEE Journal on Selected Areas in Communications , Vol. 6, No. 2, February, 1988; and International Patent Application (PCT) WO 88/01811, filed March 10, 1988 by K. Brandenburg. The general context of the present inventive contribution will most immediately find application in the context of a transform coder of the type well-known in the art and described, e.g., in the above-cited Johnston and Schroeder, et al. papers. See also, for example, N.S. Jayant and P. Noll, Digital Coding of Waveforms - Principles and Applications to Speech and Video , especially, Chapter 12, "Transform Coding." The application WO 88/01811 describes the so-called OCF coder that may be used as one alternative to the transform coder. FIG. 1 discloses the overall organization of a system based on the present invention. In that figure, an analog signal on input 100 is applied to preprocessor 105 where it is sampled (typically at 32 kHz) and each sample is converted to a digital sequence (typically 16 bits) in standard fashion. Preprocessor 105 then groups these digital values in frames (or blocks or sets) of, e.g., 512 digital values, corresponding to, e.g., 16 msec of audio input. It also proves advantageous to overlap contiguous frames, typically to the extent of 50 percent That is, though each frame contains 512 ordered digital values, 256 of these values are repeated from the preceding 512-value frame. Thus each input digital value appears in two successive frames, first as part of the second half of the frame and then as part of the first half of the frame. These frames are then transformed in standard fashion using, e.g., the modified discrete cosine transform (MDCT) described in Princen, J., et al, "Sub-band Transform Coding Using Filter Bank Designs Based on Time Domain Aliasing Cancellation," IEEE ICASSP , 1987, pp. 2161-2164. The well-known short-term Fast Fourier Transform (FFT) in one of its several standard forms can be adapted for such use as will be clear to those skilled in the art. The set of 257 complex coefficients (zero-frequency, Nyquist frequency, and all intermediate frequencies) resulting from the MDCT represents the short-term frequency spectrum of the input signal. The complex coefficients are conveniently represented in polar coordinate or amplitude and phase components, indicated as "r" and "phi," respectively, in the sequel. While not shown explicitly in FIG. 1, the present invention can advantageously use known "pre-echo" and dynamic windowing techniques. While optional, the following discussion will indicate how such techniques can be incorporated in a system based on the present invention. Perceptual coder block 110 shown in FIG. 1 includes the perceptual masking estimation improvements of the present invention and will be described in detail below. Quantizer/Coder block 115 in Fig. 1 includes the above-mentioned transform or OCF coder. Also included are the bit allocation techniques and means for generating coded representations of the appropriate side information to be used on decoding. Block 120 in FIG. 1 represents the recording or transmission medium to which the coded outputs of quantizer/coder 115 are applied. Suitable formatting and modulation of the output signals from quantizer/coder 115 is included in the medium block 120. Such techniques are well known to the art and will be dictated by the particular medium, transmission or recording rates and other system parameters. Further, if the medium 120 includes noise or other corrupting influences, it may be necessary to include additional error- control devices or processes, as is well known in the art. Thus, for example, if the medium is an optical recording medium similar to the standard CD devices, then redundancy coding of the type common in that medium can be used with the present invention. If the medium is one used for transmission, e.g., a broadcast, telephone, or satellite medium, then other appropriate error control mechanisms will advantageously be applied. Any modulation, redundancy or other coding to accommodate (or combat the effects of) the medium will, of course, be reversed upon the delivery from the channel or other medium to the decoder. The originally coded information provided by quantizer/coder 115 will therefore be applied at a reproduction device. More particularly, these coded signals will be applied to decoder 130 shown in FIG. 1, and to perceptual decoder 140. As is known in the art generally, and described in the Johnston paper cited above, some of the information derived by perceptual coder 110 and delivered via quantizer/coder 115 and medium 120 to the perceptual decoder 140 is in the nature of "side information." Such side information is described more completely below and in the Johnston papers. Other information provided by quantizer/coder 115 via medium 120 relating to the spectral coefficients of the input information is illustratively provided directly to decoder 130. After processing the side information, perceptual decoder 140 provides decoder 130 with the additional information to allow it to recreate, with little or no perceptual distortion, the original spectral signals developed in pre- processor 105. These recreated signals are then applied to post- processor 150, where the inverse MDCT or equivalent operations and D/A functions are accomplished as is known in the art to recreate the original analog signal on output 160. The output on 160 is in such form as to be perceived by a listener as substantially identical to that supplied on input 100. Perceptual Threshold Values With the overall system organization described above as background, and with the structure of the cited Johnston paper as a baseline or reference, the improved process of calculating the threshold value estimates will be described. FIG. 2 is a flow chart representation of the processing accomplished in perceptual coder 110. Listing 1, attached, forms part of this application. This listing is an illustrative annotated FORTRAN program listing in relating to developing a noise masking threshold. A useful reference for understanding the FORTRAN processing as described herein is FX/FORTRAN Programmer's Handbook , Alliant Computer Systems Corp., July 1988. Likewise, general purpose computers like those from Alliant Computer Systems Corp. can be used to execute the program of Listing 1. Table 1 is a list of constants used in connection with the illustrative program of Listing 1. While a particular programming language, well known to the art, is used in Listing 1, those skilled in the art will recognize that other languages will be appropriate to particular applications of the present invention. Similarly, constants, sampling rates and other particular values will be understood to be for illustrative purposes only, and in no sense should be interpreted as a limitation of the scope of the present invention. FIG. 2 and Listing 1 will now be discussed in detail to give a fuller understanding of the present invention. Function 200 in FIG. 2 indicates the start of the processing performed in determining the improved estimates of the masking thresholds. Block 210 represents the initializing functions, using the absolute threshold values from Table 1, represented by block 220 in FIG. 2. These initializing or startup operations are depicted explicitly in Listing 1 by the subroutine strt(). In this illustrative subroutine, threshold generation tables ithr and bval are set up first. It should be noted that "i" is used, e.g., as the index for the critical bands, well-known in the art and described in the Johnston paper. "i" in the context of critical bands has values from 0 to 25. The index i may be used with different ranges for other processing in other occurrences appearing in Listing 1. In strt(), abslow is a constant assigned the indicated value to set the absolute threshold of hearing. rzotz is the desired sampling rate. rnorm is a normalization variable used in connection with the spreading function. openas is simply an operator used for opening an ascii file. db is a dummy variable used to calculate table entries. The actual threshold calculation begins with the subroutine thrgen. Its variables r and phi are, of course, the spectral coefficients provided by preprocessor 105 in FIG. 1. They are vectors having 257 values (zero frequency, the Nyquist frequency and all intermediate components). The next step in calculation of the perceptual threshold is the calculation of the tonality t(j) of the signal energy within each critical band j. This operation is indicated by block 230 in FIG. 2. The tonality metric is determined in accordance with the program of Listing 1 by forming dr(ω)=r t-1 (ω)-r t-2 (ω) and d(ω)= t-1 (ω)- t-2 (ω). dr and d are the differences between the radius (r(ω)) and phase ((ω)) of the previous calculation block and the one two previous. The calculation is done on a frequency line by frequency line (ω) basis. Note that if the blocks are shortened by the dynamic windowing technique that may be used, the frequency lines are duplicated accordingly, so that the number of frequency lines remains the same. Additionally, the difference is multiplied accordingly in such a dynamic windowing context, so that it represents the (estimated) difference over one differently sized block. From the dr and d values and the previous r and , the "expected" radius and phase for the current block are calculated: r (ω)=r t-1 (ω)+dr(ω) and  (ω)= t-1 (ω)+d(ω), where the ω and difference signals are again adjusted appropriately for the dynamic windowing, if present. From these values and the actual values for the current spectrum, a randomness metric (c(ω))is calculated: c(ω)= euclidian distance((r ω , ω ),( r ω ,  ω )) r t ω +abs r ω c values are used later to calculate the appropriate threshold in each critical band, through the calculation of t(j). Next, the critical band energy calculation is made, as indicated by block 240 in FIG. 2. The energy in each critical band is and the summed randomness metric, C(j) is The C(j) are then converted to the tonality index, t(j) in two steps tmp(j)=max(.05,min(.5,C(j))), then t(j)=.43*ln tmp(j)-.299 It is now possible to derive the unspread threshold values. From the power and the tonality values, the unspread threshold uthr(j) is calculated. First, the proper value for the masking SNR (snr db (j)), corresponding to frequency and tonality, is calculated in decibels: snr db (j)=max(max(24.5,15.5+j)*t(j)+5.5*(1.-t(j)),fmin(j)) where fmin is conveniently given in TABLE 2 as an energy ratio, rather than in db. Then the ratio of masked noise energy to signal energy is calculated: snr j =10 -snr db j 10 and the unspread threshold value is calculated: uthr(j)=P(j)*snr(j). The spread threshold (sthr) is calculated from the unspread threshold, the snr(j), and the critical band energies (P(j), according to sthr(j)=max(uthr(j), snr(j)*P(i)*mask(i-j)[i>j]) where mask(i-j) is conveniently a table-based function of the type known in the literature or as calculated in the subroutine at the end of Listing 1. To compensate for the level changes contributed by the spreading opcration, a normalization factor rnorm introduced in Listing 1. After spreading and normalization, the spread normalized threshold is compared to the absolute threshold, and the maximum substituted in the limited threshold, lthr(j). lthr(j)=max(thr(j),absthr(j)), where absthr(j) is tabulated in Table 1. Note that the absolute threshold is adjusted for actual block length. Finally, the threshold is advantageously examined, after adjustment wherever appropriate for block length factors, for narrow-band pre-echo problems. The final threshold, thr(j) is then calculated: thr(j)=min(lthr(j), 2*othr(j)) and othr is then updated: othr(j)=lthr(j). The threshold lthr(j) is conveniently transferred to a variable named lxmin(j) for use in the operations performed in quantizer/coder 115 in FIG. 1. A final step in the threshold calculation procedure calculates an entropy measure that is used to estimate the number of bits needed for the current signal block. The Johnston paper cited above describes this technique in detail. The following equation defines the perceptual entropy This completes the perceptual threshold processes. An output of the perceptual threshold processing described above and in Listing 1 is a set of threshold values that the quantizer/coder 115 FIG. 1 employs to efficiently encode the input signal information for transmission or storage as described above. Other information that proves useful in the quantizing in unit 115 and subsequent decoding is the spectral peak information for each frequency. The full-range of spectral coefficient information is, of course, available to unit 115 to permit its coding. The threshold and spectral peak information send to unit 115 is also used to produce side information to be sent along with the coded spectrum to permit subsequent decoding and use to produce a high quality reproduction (after post processing in post processor and D/A unit 150). The exact form of the side information will be dependent on the quantizer/coder 115 and decoder 130, but will typically include quantizer step size information. FIGs. 3A through 3D illustrate in approximate form the results of processing. In FIG. 3A, input power spectrum 51 is contrasted with the so-called bark spectrum 52 showing a constant value for the spectrum for each critical band. In reality, the teachings of the present invention include determinations of spectral components at individual frequencies, so the horizontal "steps" would be replaced, in general, with curved lines in a more faithful representation. The purpose of including FIGs. 3A through 3D (based on FIG. 4 of the Johnston paper cited above), however, is to show the relative changes in thresholds during the various stages of processing, rather than to provide details of the actual spectra. FIG. 3B shows the relationship of the spectrum after spreading as compared with the spectrum before spreading. FIG. 3C shows the results of adjustments to the spectrum based on the above-described phsycoacoustic thresholding factors. Finally, when normalization and absolute threshold values are taken into account, the final threshold values on the curve 55 appearing in FIG. 3D are arrived at. At the receiver or decoder side of medium block 120 shown in FIG. 1, decoder 130 receives the spectral information in quantized form and proceeds to reconstruct a perceptually accurate representation of the original spectrum based on the side information supplied from the recording or transmission medium. This side information is conveniently separated from the spectral information and processed by perceptual decoding unit 140 in FIG. 1. The exact manner in which the original spectrum is reconstructed depends on the functioning of the quantizer/coder 115. If, for example, the step size is explicitly communicated as side information, that information is decoded and supplied to decoder 130 for use in interpreting the spectral information signals. The information relating to the manner of allocating bits in the received bit stream to particular signal characteristics is also advantageously decoded and used in the interpretation of spectral information. Likewise, any information arriving at the decoder side of the medium 120 relating to dynamic windowing, pre-echo, scaling and other parameters is decoded and used for interpreting the coded spectral information. While the preceding description has referred to a particular programming language and type of processors, it will be recognized by those skilled in the art that other implementations will be desirable in particular cases. For example, in consumer products size requirements may dictate that high performance general purpose or special purpose microprocessors like those from AT&T, Intel Corp. or Motorola be used. For example, various of the AT&T DSP-32 digital signal processing chips have proved useful for performing processing of the type described above. In other particular cases, special purpose designs based on well-known chip design techniques will be preferably employed to perform the above described processing. The tonality metric determined in the illustrative embodiment above using differences between the values of r(ω) and (ω) from the present block and the corresponding values from the two previous blocks. In appropriate cases, it may prove advantageous to form such a difference using only one prior value in evaluating these variables, or using a plurality greater than two of such prior values, as the basis for forming the expected current values. Likewise, though values for certain of the variables described above are calculated for each spectral frequency line, it may prove to be an economical use of processing resources to calculate such values for less than all of such lines. Absolute Threshold File ("freqlist" for start-up routine) 1 56 3. 111 16. 166 16. 221 50. 2 27. 57 4. 112 17. 167 16. 222 50. 3 18. 58 4. 113 17. 168 16. 223 50. 4 16. 59 5. 114 17. 169 16. 224 50. 5 10. 60 5. 115 17. 170 16. 225 50. 6 9. 61 5. 116 18. 171 17. 226 50. 7 8. 62 6. 117 18. 172 17. 227 50. 8 8. 63 6. 118 18. 173 17. 228 50. 9 8. 64 6. 119 18. 174 17. 229 50. 10 8. 65 6. 120 18. 175 17. 230 50. 11 8. 66 7. 121 18. 176 17. 231 50. 12 7. 67 7. 122 18. 177 18. 232 50. 13 7. 68 7. 123 18. 178 18. 233 50. 14 7. 69 8. 124 17. 179 18. 234 60. 15 7. 70 9. 125 17. 180 18. 235 60. 16 7. 71 10. 126 16. 181 18. 236 60. 17 7. 72 10. 127 16. 182 19. 237 60. 18 7. 73 10. 128 16. 183 19. 238 60. 19 7. 74 10. 129 16. 184 19. 239 60. 20 7. 75 10. 130 15. 185 19. 240 60. 21 7. 76 10. 131 15. 186 19. 241 60. 22 7. 77 10. 132 15. 187 20. 242 60. 23 7. 78 10. 133 15. 188 21. 243 60. 24 7. 79 10. 134 14. 189 22. 244 60. 25 6. 80 10. 135 14. 190 23. 245 60. 26 5. 81 11. 136 13. 191 24. 246. 60. 27 5. 82 11. 137 12. 192 25. 247 60. 28 5. 83 11. 138 12. 193 26. 248 60. 29 5. 84 11. 139 12. 194 27. 249 60. 30 5. 85 11. 140 12. 195 28. 250 60. 31 4. 86 12. 141 12. 196 29. 251 60. 32 4. 87 12. 142 12. 197 30. 252 60. 33 4. 88 12. 143 12. 198 31. 253 60. 34 4. 89 12. 144 13. 199 32. 254 60. 35 4. 90 12. 145 13. 200 33. 255 60. 36 3 91 12. 146 14. 201 34. 256 60. 37 3. 92 13. 147 14. 202 35. 257 60. 38 3. 93 13. 148 14. 203 36. 39 3. 94 13. 149 14. 204 37. 40 2. 95 13. 150 14. 205 38. 41 2. 96 13. 151 14. 206 39. 42 1. 97 13. 152 14. 207 40. 43 1. 98 14. 153 14. 208 41. 44 1. 99 14. 154 14. 209 42. 45 1. 100 14. 155 14. 210 43. 46 0. 101 14. 156 15. 211 44. 47 0. 102 15. 157 15. 212 45. 48 0. 103 15. 158 15. 213 46. 49 0. 104 15. 159 15. 214 47. 50 0. 105 15. 160 15. 215 48. 51 0. 106 15. 161 15. 216 49. 52 2. 107 16. 162 15. 217 50. 53 2. 108 16. 163 15. 218 50. 54 2. 109 16. 164 15. 219 50. 55 3. 110 16. 165 15. 220 50. table of critical bands and fmin (used at 48 kHz sampling frequency) The upper band edge is set to 20 kHz (line 214 at block length 256, line 428 at block length 512). The following table is used at block length 512. The table for block length 256 can easily be calculated from the table for 512 block length. The tables for other sampling rates can also be calculated from this list. cb start width fmin 1 0 4 .007 2 4 4 .007 3 8 4 .007 4 12 4 .007 5 16 4 .007 6 20 4 .007 7 24 4 .007 8 28 4 .01 9 32 4 .01 10 36 4 .01 11 40 6 .01 12 46 6 .0144 13 52 8 .0225 14 60 8 .04 15 68 12 .0625 16 80 12 .09 17 92 16 .09 18 108 20 .09 19 128 26 .1225 20 154 30 .1225 21 184 38 .16 22 222 50 .2025 23 272 70 .25 24 342 86

Claims: A method of processing an ordered time sequence of audio signals partitioned into a set of ordered blocks, each said block having a discrete frequency spectrum comprising a first set of frequency coefficients, CHARACTERISED BY the method comprising, for each said block, the steps of: (a) determining for each of a plurality of said frequency coefficients in said first set a corresponding randomness metric, each of said randomness metrics being based on a difference between said corresponding frequency coefficient in said first set and a corresponding predicted frequency coefficient, said corresponding predicted frequency coefficient being based on at least one frequency coefficient in a second prior set of frequency coefficients; (b) for each of said randomness metrics, determining a corresponding tonality metric based on the corresponding randomness metric, each tonality metric reflecting a measure of the tonal content of the audio signal at a frequency corresponding to the frequency coefficient which corresponds to said randomness metric; and (c) generating a set of corresponding noise masking thresholds each based on a corresponding one of said tonality metrics. A method as claimed in claim 1 comprising quantizing each of said frequency coefficients in said first set based on a corresponding one of said noise masking thresholds. A method of manufacturing a storage medium, the method comprising (a) a method of processing an ordered time sequence of audio signals as claimed in claim 2, (b) applying a recording signal to said storage medium, said recording signal comprising signals representing said quantized frequency coefficients, and (c) recording said signal onto said storage medium. A method as claimed in claim 3 wherein said storage medium is a compact disc. A method as claimed in claim 3 wherein said storage medium is a digital audio tape. A method of transmitting audio signals, the method comprising (a) a method as claimed in claim 2; and (b) applying a transmission signal to a transmission medium, said transmission signal comprising signals representing said quantized frequency coefficients. A method as claimed in claim 6 wherein said transmission medium is a broadcast transmission medium. A method as claimed in claim 1, 3 or 6 wherein said processing comprises generating discrete frequency spectrum signals. A method as claimed in claim 8 wherein said generating of discrete frequency spectrum signals comprises generating discrete Fourier coefficient signals.

Inventors: BRANDENBURG KARLHEINZ, JOHNSTON JAMES DAVID, BRANDENBURG, KARLHEINZ, JOHNSTON, JAMES DAVID
Applicants: AT & T CORP, AT&T CORP.
Application year: 1990
Main classification: H04B1
IPC codes: H04B14, G10L19, H04B1, H03M7