Patent Publication Number: US-2007112573-A1

Title: Sinusoid selection in audio encoding

Description:
The invention relates to coding of an audio signal, in which sinusoids relevant for reproducing the audio signal are selected and of which parameters are encoded.  
      In a sinusoidal audio encoder, at least part of an audio signal is represented by a plurality of sinusoids, which sinusoids are usually described by their frequencies, their amplitudes and optionally their phases. In the encoding process, an audio signal is segmented in time segments, which segments are analyzed for their frequency contents. Typically, the segment size that is used in an audio encoder is within a range of 5 and 60 ms. For each segment a number of sinusoids are selected of which the parameters are subsequently coded. In order to minimize the bit rate for a given audio quality, only relevant sinusoids need to be selected and encoded, i.e. only those sinusoids needed to reproduce the encoded audio signal in an acceptable perceptual quality.  
      R. McAulay and T. Quartieri, “Speech analysis/synthesis based on sinusoidal representation.”,  IEEE Transactions on Acoustics, Speech and Signal Processing,  1986, 43:744-754, disclose a method to select sinusoids called peak-picking. The peak-picking method comprises a selection of those frequencies that have a peak in the amplitude spectrum. Another method for selecting sinusoids is an iterative process called matching pursuit as disclosed by the article from R. Heusdens and S. van de Par, “Rate-distortion optimal sinusoidal modeling of audio and speech using psychoacoustical matching pursuits”,  Proc. IEEE Int. Conf Acoust. Speech and signal Proc.,  Orlando (USA), 2002. Every iteration, the frequency having the highest peak in the amplitude spectrum is selected and is subsequently subtracted from the signal. The residual signal is used in the next iteration. The process is typically stopped when a fixed number of sinusoids are selected.  
      A problem arising from the peak-picking method is that it is not known beforehand how many sinusoids are estimated since all peaks are selected. Especially when the amplitude spectrum is noisy, too many sinusoids are selected. In contrast to peak-picking, the number of selected sinusoids in matching pursuit is fixed. As a consequence, in order to guarantee that all relevant sinusoids will be selected, this fixed number should be set high. Again too many sinusoids will be selected. The selection of too many sinusoids results in a high bit rate, since all of these sinusoids have to be encoded. Another disadvantage is the extra expenses in processing time. Perceptual modeling for example is a process used in many audio encoders in order to encode only that part of an audio signal that can be heard by a human ear. This modeling can be an expensive process and as a result, a large number of sinusoids that have to be analyzed is undesired.  
      An object of the invention is to provide audio encoding that is advantageous in terms of bit-rate for a given audio quality. To this end, the invention provides a method of encoding, an audio encoder and an audio system as defined in the independent claims. Advantageous embodiments are defined in the dependent claims.  
      A first aspect of the invention provides a method of encoding an audio signal by representing at least part of said audio signal by a plurality of sinusoids, the method comprising the steps of performing an analysis on a first segment of the audio signal, selecting candidate sinusoids based on said analysis, defining for at least one of the candidate sinusoids a local frequency band around said candidate sinusoid&#39;s frequency, combining amplitudes of frequency components within said local frequency band from which at least one of the candidate sinusoids within said local frequency band is excluded and selecting said candidate sinusoid as a selected sinusoid in dependence on the combination of amplitudes. Said analysis for selecting candidate sinusoids will usually be a frequency analysis. Such a frequency analysis is for example used in conventional sinusoid selection techniques such as peak-picking or matching pursuit. For the selection procedure applied on said candidate sinusoids, an analysis is performed on a second segment of the audio signal. Usually, the second segment will be equal to the first segment used in the selection of candidate sinusoids, but this is not necessarily the case. By combining amplitudes of frequency components within said local frequency band from which at least one of the candidate sinusoids within said local frequency band is excluded, a measure is obtained for background frequency components within said candidate sinusoid&#39;s local frequency band. By using this measure, a better selection is made. Only selected sinusoids are encoded. As a result, the selection procedure will result in a smaller number of sinusoids to be encoded for a given audio quality, which is advantageous in terms of bit-rate for a given audio quality.  
      According to a further aspect of the invention, a bandwidth of said local frequency band around said candidate sinusoid&#39;s frequency is defined in dependence on said candidate sinusoid&#39;s frequency. Because of said dependence on said candidate sinusoid&#39;s frequency, the selection procedure can be tuned suitably for different frequencies.  
      According to a still further aspect of the invention, said dependence on said candidate sinusoid&#39;s frequency is based on a human&#39;s perception of audio. An example of such a dependence is defined by a Bark bandwidth. A Bark is a unit of perceptual frequency, which is known in the art. Other examples are the Mel scale and the ERB scale, which are also known in the art. By taking the human&#39;s perception of audio into account, a better decision is made to select a candidate sinusoid as a selected sinusoid.  
      In an embodiment of the invention, said candidate sinusoid is selected as a selected sinusoid when its amplitude is significant with regard to said combination of amplitudes, which significance is evaluated by thresholding a difference between said candidate sinusoid&#39;s amplitude and a weighted mean amplitude of frequency components within said candidate sinusoid&#39;s local frequency band from which at least one of the candidate sinusoids within said local frequency band is excluded. By thresholding said difference, a suitable method is obtained for determining the peakiness of a candidate sinusoid.  
      In a further embodiment of the invention, said significance of said candidate sinusoid&#39;s amplitude is evaluated by thresholding a ratio of a difference between said candidate sinusoid&#39;s amplitude and a weighted mean amplitude of frequency components within said candidate sinusoid&#39;s local frequency band from which at least one of the candidate sinusoids within said local frequency band is excluded, and a weighted deviation of the amplitudes of frequency components within said local frequency band from which at least one of the candidate sinusoids within said local frequency band is excluded. For said deviation, a definition of the standard deviation can be used for example. By thresholding said ratio, another suitable method is obtained for determining the peakiness of a candidate sinusoid.  
      In a still further embodiment of the invention, a further selection procedure is applied on the selected sinusoids. This further selection procedure comprises the steps of determining for at least one of the selected sinusoids a phase consistency defined by an extent to which a phase of said selected sinusoid at a certain moment in time can be predicted from a phase of said selected sinusoid determined at another moment in time, and selecting said selected sinusoid as a further selected sinusoid when its phase consistency is above a predetermined threshold. The phase of said selected sinusoid at a certain moment in time can be predicted from the phase of said selected sinusoid determined at another moment in time, as its frequency and the time difference between the time of prediction and the time of determination are known. The invention is based on the insight that when sinusoids are synthesized in a decoder in order to reproduce an encoded audio signal, the sinusoid&#39;s phases will be consistent. By selecting those sinusoids for encoding of which the phases are consistent, a better selection is made. The further selection is based on a sinusoid&#39;s phase, which is independent of its amplitude. Consequently, the further selection can lead to a farther reduction of the number of further selected sinusoids in comparison to the number of selected sinusoids selected by the previous selection procedure. Only further selected sinusoids will have to be encoded. As a result, the further selection procedure will result in a smaller number of sinusoids to be encoded for a given audio quality, which is advantageous in terms of bit-rate for a given audio quality. Because of the independence between the selection procedure based on amplitudes and the further selection procedure based on phase consistency, it is also possible to perform both selection procedures in parallel. Both selection procedures then make a selection out of the candidate sinusoids, after which the results can be combined.  
      In an even further embodiment of the invention, said selected sinusoid&#39;s phase consistency is determined by segmenting a third segment of the audio signal into at least a first and a second part, determining the actual phases of said selected sinusoid in at least the first and the second part, using the actual phase in the first part to serve as the input for predicting the actual phase in the second part, and determining said selected sinusoid&#39;s phase consistency based on a prediction error between the actual phase and the predicted phase in the second part. Usually, the third segment will be equal to the second segment used in the previous selection procedure, but this is not necessarily the case. An advantage of this embodiment is that said selected sinusoid&#39;s actual phase can be easily determined by performing a frequency analysis like an FFT procedure, for which analysis a part of the audio signal is needed as an input.  
      The aforementioned and other aspects of the invention will be apparent from and elucidated with reference to the embodiments described hereinafter. 
    
    
      In the drawings:  
       FIG. 1  shows an embodiment of an audio encoder according to the invention;  
       FIG. 2  shows a block diagram representing a selection procedure applied on candidate sinusoids according to the invention;  
       FIG. 3  shows an example of segmenting an audio segment in smaller parts for determining a selected sinusoid&#39;s phase consistency;  
       FIG. 4  shows an embodiment of an audio system according to the invention. 
    
    
      The drawings only show those elements that are necessary to understand the invention.  
       FIG. 1  shows an embodiment of an audio encoder  1  according to the invention, comprising an input unit  10  for obtaining an input audio signal x(t). The audio encoder  1  separates the input signal into three components: transient signal components, sinusoidal signal components and noise signal components. The audio encoder  1  comprises a transient encoder  11 , a sinusoidal encoder  12  and a noise analyzer  13 .  
      The transient encoder  11  comprises a transient detector (TD)  110 , a transient analyzer (TA)  111  and a transient synthesizer (TS)  112 . First, the signal x(t) enters the transient detector  110 , the transient analyzer  111  and a subtractor  15 . The transient detector  110  estimates if there is a transient signal component and at which position. This information is fed to the transient analyzer  111 . This information may also be used in a sinusoidal analyzer (SA)  120  or a noise analyzer (NA)  13  to obtain advantageous signal-induced segmentation. The transient analyzer  111  tries to extract (the main part of) the transient signal component. This is for example done by matching a shape function to a signal segment and determining the content underneath the shape function, e.g. a (small) number of sinusoids. This information is contained in a transient code C T . The transient code C T  is furnished to the transient synthesizer  112  and a multiplexer  14 . The synthesized transient signal component is subtracted from the input signal x(t) in subtractor  15 , resulting in a signal x 1  which is furnished to the sinusoidal analyzer  120  and a further subtractor  16 . The sinusoidal analyzer  120  determines the sinusoidal signal components. This information is contained in a sinusoidal code C S  which is furnished to a sinusoidal synthesizer (SS)  121  and the multiplexer  14 . From the sinusoidal code C S , the sinusoidal signal components are reconstructed by the sinusoidal synthesizer  121 . This signal is subtracted in subtractor  16  from the input signal x 1 . The remaining signal x 2  is devoid of (large) transient signal components and (main) sinusoidal signal components and is therefore assumed to mainly consist of noise. Consequently, the signal x 2  is furnished to the noise analyzer  13  where it is analyzed for its spectral and temporal envelope. This information is contained in a noise code C N . In the multiplexer  14 , an audio stream AS is constituted which includes the codes C T , C S  and C N . The audio stream AS is furnished to e.g. a data bus, an antenna system, a storage medium etc.  
      In the following, the selection of sinusoids in the sinusoidal analyzer  120  according to an embodiment of the invention will be discussed. It is also possible to use the sinusoid selection procedure in the transient analyzer  111 , though this is rarely done in practice as only a small number of sinusoids are analyzed there. Before the actual selection of sinusoids is performed, first a number of candidate sinusoids are selected. An analysis is performed on a first segment of the audio signal, from which analysis candidate sinusoids are selected. This selection can for example be performed by conventional techniques like peak-picking or matching pursuit, which uses a frequency analysis on the first segment. The result will be a number of candidate sinusoids suitable for a more specific sinusoid selection procedure.  FIG. 2  shows a block diagram representing a selection process applied on candidate sinusoids according to the invention. The frequencies of these candidate sinusoids are stored in F q =(f 1 ,f 2 , . . . , f R ) with R the number of candidate sinusoids and the frequencies f i  defined in Herz (Hz). A second segment can be windowed suitable for a frequency analysis, which results in a windowed segment x w . The second segment will usually be equal to the first segment used in the selection of candidate sinusoids, but also a different second segment can be used. First, a preprocessing stage (PP) is performed. In (I), for each frequency f i  from F q , the candidate sinusoids are synthesized and subtracted from the windowed segment x w . In (II), the resulting segment x ws  is zero-padded to length P and analyzed for its frequency components by for example an FFT procedure. The resulting amplitude spectrum is denoted by |X S |. Secondly, in (III), the segment x w  is zero-padded to length P and analyzed for its frequency components without subtracting frequencies resulting in amplitude spectrum |X|. After the preprocessing stage, a selection procedure is started for at least one of the selected sinusoids having a frequency f i  from F q  initialized by (IV). In (V) a local frequency band is determined around said frequency f i . For defining the local frequency band, different definitions can be used. In this case it is chosen to use a Bark bandwidth, e.g. defined by the critical bandwidth: 
 
 b ( f   i )=25+75·(1+1.4·10 −6   ·f   i   2 ) 0.69    (1) 
 
 From the critical bandwidth b(f i ) defined in Herz (Hz) the boundary frequencies f a  and f b  are determined by:  
                 f   a     =     max   ⁡     (         f   i     -       b   ⁡     (     f   i     )       2       ,   0     )         ⁢     
     ⁢       f   b     =     min   ⁡     (         f   i     +       b   ⁡     (     f   i     )       2       ,       F   s     2       )                 (   2   )             
 
 The spectrum is indexed with index i spect  running from 0 to (P−1) in relation to the frequency f spect  according to:  
                   i   spect     P     ·     F   s       =     f   spect             (   3   )             
 
 in which F s  is the sampling frequency (e.g. 44.1 kHz). Consequently, the indices i a  and i b  in the spectrum corresponding to the boundary frequencies f a  and f b  are determined by:  
                 i   a     =     round   ⁢           ⁢     (         f   a     ·   P       F   s       )         ⁢     
     ⁢       i   b     =     round   ⁢           ⁢     (         f   b     ·   P       F   s       )                 (   4   )             
 
 In which round(r) denotes to rounding of r to the closest integer. Now that the local frequency band is defined, a mean amplitude of the frequency band  m   i  of the candidate sinusoid is computed in (VI) from |X S | by:  
                 m   _     i     =         ∑     k   =     i   a         i   b       ⁢     (         A   s     ⁡     (   k   )       ·       W   1     ⁡     (   k   )         )           ∑     k   =     i   a         i   b       ⁢     (       W   1     ⁡     (   k   )       )                 (   5   )             
 
 in which A S (k) is the amplitude of the frequency component in the amplitude spectrum |X S | at index k and W l (k) is a weighting factor dependent on index k. The weighting factor can be constant for all k. However, the weighting factor can for example also be decreasing for an index k closer to one of the boundary frequency indices i a  or i b , in order to reduce boundary effects. The candidate sinusoid will be selected as a selected sinusoid in dependence on other amplitudes within its local frequency band. Therefore, a method to select the candidate sinusoid as a selected sinusoid is to use a criterion based on the weighted mean amplitude of the candidate sinusoid&#39;s frequency band  m   i  as calculated in (5) and the amplitude of the candidate sinusoid A i =A(i f     i   ) of which the index i f , in the amplitude spectrum can be determined by:  
               i     f   i       =     round   ⁢           ⁢     (         f   i     ·   P       F   s       )               (   6   )             
 
      In a further embodiment of the invention, the criterion used in the selection procedure also comprises a standard deviation σ i  of the candidate sinusoid&#39;s local frequency band, which is calculated in (VI) by:  
               σ   i     =           ∑     k   =     i   a         i   b       ⁢     (         (         A   s     ⁡     (   k   )       -       m   _     i       )     2     ·       W   2     ⁡     (   k   )         )           ∑     k   =     i   a         i   b       ⁢     (       W   2     ⁡     (   k   )       )                   (   7   )             
 
 In which W 2 (k) is a further weighting factor dependent on index k. The further weighting factor can be constant for all k. However, the further weighting factor can for example also be decreasing for an index k closer to one of the boundary frequency indices i a  or i b , in order to reduce boundary effects. W 2 (k) can be chosen equal to W 1 (k) used in (5) but this is not necessarily the case. From the amplitude of the candidate sinusoid A i , the mean amplitude  m   i  and the standard deviation σ i  of the candidate sinusoid&#39;s frequency band, a ratio r i  can be defined that is a measure for a peakiness of the candidate sinusoid:  
               r   i     =              A   i     -       m   _     i              σ   i               (   8   )             
 
 In the selection criterion (VIII) this ratio r i  is compared to a threshold T i . The threshold T i  can for example be a fixed threshold or a threshold dependent on certain parameters like the frequency of the candidate sinusoid f i , the index i f , of the frequency in the frequency spectrum and/or the number of samples P used for the frequency analysis. An example of a definition for the threshold T i  is: 
 
 T   i =(2 ·i   f     i   )/( P/ 2)·5+1   (9) 
 
      If the ratio r i  is above the threshold T i , the candidate sinusoid of frequency f i  is kept for encoding (S). Otherwise the candidate sinusoid is rejected (NS).  
      In a still further embodiment of the invention, a further selection of the selected sinusoids is performed. Therefore, the frequencies of the selected sinusoids based on the previous selection procedure are stored in F=(f 1 ,f 2 , . . . , f L ), with L the number of selected sinusoids and the frequencies f i  defined in Herz (Hz). On at least one of the selected sinusoids, the further selection procedure will be applied which is based on the phase consistency of the selected sinusoid. The selected sinusoid&#39;s phase consistency is defined by an extent to which a phase of said selected sinusoid at a certain moment in time can be predicted from a phase of said selected sinusoid determined at another moment in time. Next, said selected sinusoid is further selected as a further selected sinusoid when said phase consistency is above a predetermined threshold.  
      In an even further embodiment of the invention, the selected sinusoid&#39;s phase consistency is determined by first segmenting a third segment of the audio signal into smaller parts. This third segment will usually be equal to the second segment used in the previous selection procedure, but also a different third segment can be used. Two or more smaller parts have to be available for determining the selected sinusoid&#39;s phase consistency. The smaller parts can possibly overlap each other, but this is not necessarily the case. A third segment x s  can for example be segmented into three overlapping smaller parts as shown in  FIG. 3 . If N is the number of samples of the third segment x s  and N is an even number, the smaller parts are defined by: 
 
 x   s     1     [k]=x   s   [k] 
 
 x   s     2     [k]=x   s   [k+M/ 2]  (10) 
 
 x   s     3     [k]=x   s   [k+M] 
 
 in which M=N/2 and 1≦k≦M. The smaller parts x s     1   , x s     2    and x s     3    each have a length M. On each of these three smaller parts, the actual phases of the selected sinusoid having a frequency f i  from F are determined. For this purpose the smaller parts can be windowed suitable for a frequency analysis, after which the frequency analysis can be performed like an FFT procedure. An example of the positions for a phase determination is shown in  FIG. 3  by φ 1 , φ 2  and φ 3 . Next, the phases can be predicted, in this case from smaller part 1 to 2, from 2 to 3 and from 1 to 3. The differences between the actual and the predicted phases lead to the following prediction errors for the selected sinusoid: 
 
 E   1,2 =(φ 1 −(φ 2   −T/ 2·2 π·f   i ))mod(2π) 
 
 E   2,3 =(φ 3 −(φ 2   +T/ 2·2π·f i ))mod(2π)   (11) 
 
 E   1,3 =(φ 3 −(φ 1   +T· 2 π·f   i ))mod(2π) 
 
 in which the prediction errors are in modulo sense (mod(2π)), the phases φ 1 , φ 2  and φ 3  are given in radians, T is given in seconds and is defined by T=M/F s . Using a certain criterion based on these prediction errors E, the selected sinusoid can be further selected as a further selected sinusoid. A possible criterion might be a test if at least one of the following conditions is true: 
 
|E 1,2 |&lt;c 
 
E 2,3 |&lt;c   (12) 
 
| E   1,3 |&lt;2 ·c  
 
 in which c is typically dependent on the number of samples N of the third segment x s  and the number of samples M of the smaller parts x s     1   , x s     2    and x s     3   . An example of a definition for c is:  
             c   =         2   ·   π       3   ·   N       ·     M   2               (   13   )             
 
       FIG. 4  shows an embodiment of an audio system according to the invention comprising an audio encoder  1  as shown in  FIG. 1 . Such a system offers recording and/or transmitting features. An audio signal x(t) is obtained by an audio signal obtaining device  41  such as an audio player, a microphone or an audio input connector etc. The audio signal x(t) serves as the input for an audio encoder  1  as shown in  FIG. 1 . The output audio stream AS is furnished from the audio encoder  1  to a formatting unit  42 , which formats the audio stream AS suitably for a communication channel  43  which may be a wireless connection, a data bus or a storage medium. In case the communication channel  43  is a storage medium, the storage medium may be fixed in the system or may also be a removable disc, a memory stick etc. The communication channel  43  may be part of the audio system, but will however often be outside the audio system.  
      It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs between parenthesis shall not be construed as limiting the claim. The word ‘compromising’ does not exclude the presence of other elements or steps than those listed in a claim. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a device claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.  
      In summary, the invention provides a method of encoding an audio signal by representing at least part of said audio signal by a plurality of sinusoids, the method comprising the steps of performing an analysis on a first segment of said audio signal, selecting candidate sinusoids based on said analysis, defining for at least one of the candidate sinusoids a local frequency band around said candidate sinusoid&#39;s frequency, combining amplitudes of frequency components within said local frequency band from which at least one of the candidate sinusoids within said local frequency band is excluded, and selecting said candidate sinusoid as a selected sinusoid in case in dependence on the combination of amplitudes. The selection of sinusoids according to the invention will result in a smaller number of sinusoids to be encoded for a given audio quality, which is advantageous in terms of bit-rate for a given audio quality.