Patent Abstract:
Coding of an audio signal represented by a respective set of sampled signal values for each of a plurality of sequential segments is disclosed. The sampled signal values are analysed ( 40 ) to determine one or more sinusoidal components for each of the plurality of sequential segments. The sinusoidal components are linked ( 42 ) across a plurality of sequential segments to provide sinusoidal tracks. For each sinusoidal track, a phase comprising a generally monotonically changing value is determined and an encoded audio stream including sinusoidal codes (r) representing said phase is generated ( 46 ).

Full Description:
FIELD OF THE INVENTION  
       [0001]     The present invention relates to coding and decoding audio signals.  
       BACKGROUND OF THE INVENTION  
       [0002]     Referring now to  FIG. 1 , a parametric coding scheme in particular a sinusoidal coder is described in PCT Patent Application No. WO01/69593. In this coder, an input audio signal x(t) is split into several (overlapping) segments or frames, typically of length 20 ms. Each segment is decomposed into transient, sinusoidal and noise components. (It is also possible to derive other components of the input audio signal such as harmonic complexes although these are not relevant for the purposes of the present invention.)  
         [0003]     In the sinusoidal analyser  130 , the signal x 2  for each segment is modelled using a number of sinusoids represented by amplitude, frequency and phase parameters. This information is usually extracted for an analysis interval by performing a Fourier Transform (FT) which provides a spectral representation of the interval including: frequencies; amplitudes for each frequency; and phases for each frequency where each phase is in the range {−π,π}. Once the sinusoidal information for a segment is estimated, a tracking algorithm is initiated. This algorithm uses a cost function to link sinusoids with each other on a segment-to-segment basis to obtain so-called tracks. The tracking algorithm thus results in sinusoidal codes C S  comprising sinusoidal tracks that start at a specific time instance, evolve for a certain amount of time over a plurality of time segments and then stop.  
         [0004]     In such sinusoidal coding, frequency information is usually transmitted for the tracks formed in the encoder. This can be done cheaply, since tracks are defined as having a slowly varying frequency and, therefore, frequency can be transmitted efficiently by time-differential encoding. (In general, amplitude can also be encoded differentially over time.)  
         [0005]     In contrast to frequency, phase transmission is viewed as expensive. In principle, if the frequency is (nearly) constant, phase as a function of the track segment index should adhere to a (nearly) linear behaviour. However, when it is transmitted, phase is limited to the range {−π,π} as provided by the Fourier Transform. Because of this modulo 2π representation of phase, the structural inter-frame relation of the phase is lost and, at first sight appears to be a white stochastic variable.  
         [0006]     However, since the phase is the integral of the frequency, the phase need, in principle, not be transmitted. This is called phase continuation and reduces the bit rate significantly.  
         [0007]     In phase continuation, only the frequency is transmitted and the phase is recovered at the decoder from the frequency data by exploiting the integral relation between phase and frequency. It is known, however, that the phase can only be approximately recovered using phase continuation. If frequency errors occur, due to measurement errors in the frequency or due to quantisation noise, the phase, being reconstructed using the integral relation, will typically show an error having the character of a drift. This is because frequency errors have an approximately white noise character. Integration amplifies low-frequency errors and, consequently, the recovered phase will tend to drift away from the actually measured phase. This leads to audible artifacts.  
         [0008]     This is illustrated in  FIG. 2 ( a ) where ψ and Ω are the real frequency and phase for a track. In both the encoder and decoder frequency and phase have an integral relationship represented by I. The quantisation process in the encoder is modelled as an additive white noise n. In the decoder, the recovered phase {circumflex over (ψ)} thus includes two components: the real phase ψ and a noise component ε 2 , where both the spectrum of the recovered phase and the power spectral density function of the noise ε 2  have a pronounced low-frequency character.  
         [0009]     Thus, it can be seen that in phase continuation, since the recovered phase is the integral of a low-frequency signal, the recovered phase is a low-frequency signal itself. However, the noise introduced in the reconstruction process is also dominant in this low-frequency range. It is therefore difficult to separate these sources with a view to filtering the noise n introduced during encoding.  
         [0010]     The present invention attempts to mitigate this problem.  
       DISCLOSURE OF THE INVENTION  
       [0011]     According to the present invention there is provided a method according to claim  1 .  
         [0012]     According to the invention the prior art sinusoidal coding technique is reversed i.e. phase rather than frequency is transmitted. In the decoder, the frequency can be approximately recovered from the quantised phase information using finite differences as an approximation for differentiation. The noise component of the recovered frequency has a pronounced high-frequency behaviour under the assumption that the noise introduced by the phase quantisation is nearly spectrally flat. This is illustrated in  FIG. 2 ( b ), where within the encoder and the decoder, frequency is represented as the differential (D) of phase. Again, noise n is introduced in the encoder and so in the decoder, the recovered frequency {circumflex over (Ω)} includes two components: the real frequency Ω and a noise component ε 4 , where the frequency is nearly a DC signal and the noise is mainly in high-frequency range. However, since the underlying frequency has a low-frequency behaviour and the added noise a high-frequency behaviour, the noise component ε 4  of the recovered frequency can be reduced by low-pass filtering. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0013]      FIG. 1  shows an audio coder in which an embodiment of the invention is implemented;  
         [0014]     FIGS.  2 ( a ) and  2 ( b ) illustrate the relationship between phase and frequency in prior art systems and in audio systems according to the present invention respectively;  
         [0015]     FIGS.  3 ( a ) and  3 ( b ) show a preferred embodiment of a sinusoidal coder component of the audio coder of  FIG. 1 ;  
         [0016]      FIG. 4  shows an audio player in which an embodiment of the invention is implemented; and  
         [0017]     FIGS.  5 ( a ) and  5 ( b ) show a preferred embodiment of a sinusoidal synthesizer component of the audio player of  FIG. 4 ; and  
         [0018]      FIG. 6  shows a system comprising an audio coder and an audio player according to the invention. 
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT  
       [0019]     Preferred embodiments of the invention will now be described with reference to the accompanying drawings wherein like components have been accorded like reference numerals and, unless otherwise stated perform a like function. In a preferred embodiment of the present invention, the encoder  1  is a sinusoidal coder of the type described in PCT Patent Application No. WO 01/69593,  FIG. 1 . The operation of this prior art coder and its corresponding decoder has been well described and description is only provided here where relevant to the present invention.  
         [0020]     In both the prior art and the preferred embodiment, the audio coder  1  samples an input audio signal at a certain sampling frequency resulting in a digital representation x(t) of the audio signal. The coder  1  then separates the sampled input signal into three components: transient signal components, sustained deterministic components, and sustained stochastic components. The audio coder  1  comprises a transient coder  11 , a sinusoidal coder  13  and a noise coder  14 .  
         [0021]     The transient coder  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 . This detector  110  estimates if there is a transient signal component and its position. This information is fed to the transient analyzer  111 . If the position of a transient signal component is determined, the transient analyzer  111  tries to extract (the main part of) the transient signal component. It matches a shape function to a signal segment preferably starting at an estimated start position, and determines content underneath the shape function, by employing for example a (small) number of sinusoidal components. This information is contained in the transient code C T  and more detailed information on generating the transient code C T  is provided in PCT Patent Application No. WO 01/69593.  
         [0022]     The transient code C T  is furnished to the transient synthesizer  112 . The synthesized transient signal component is subtracted from the input signal x(t) in subtractor  16 , resulting in a signal x 1 . A gain control mechanism GC ( 12 ) is used to produce x 2  from x 1 .  
         [0023]     The signal x 2  is furnished to the sinusoidal coder  13  where it is analyzed in a sinusoidal analyzer (SA)  130 , which determines the (deterministic) sinusoidal components. It will therefore be seen that while the presence of the transient analyser is desirable, it is not necessary and the invention can be implemented without such an analyser. Alternatively, as mentioned above, the invention can also be implemented with for example an harmonic complex analyser.  
         [0024]     In brief, the sinusoidal coder encodes the input signal x 2  as tracks of sinusoidal components linked from one frame segment to the next. Referring now to  FIG. 3 ( a ), in the same manner as in the prior art, in the preferred embodiment, each segment of the input signal x 2  is transformed into the frequency domain in a Fourier Transform (FT) unit  40 . For each segment, the FT unit provides measured amplitudes A, phases φ and frequencies ω. As mentioned previously, the range of phases provided by the Fourier Transform is restricted to −π≦φ&lt;π. A tracking algorithm (TA) unit  42  takes the information for each segment and by employing a suitable cost function, links sinusoids from one segment to the next, so producing a sequence of measured phases φ(k) and frequencies ω(k) for each track.  
         [0025]     In contrast to the prior art, according to the present invention the sinusoidal codes C S  ultimately produced by the analyzer  130  include phase information, and frequency is reconstructed from this information in the decoder.  
         [0026]     As mentioned above, however, the measured phase is restricted to a modulo 2π representation. Therefore, in the preferred embodiment, the analyzer comprises a phase unwrapper (PU)  44  where the modulo 2π phase representation is unwrapped to expose the structural inter-frame phase behaviour for a track ψ. As the frequency in sinusoidal tracks is nearly constant, it will be seen that the unwrapped phase ψ will typically be a linearly increasing (or decreasing) function and this makes cheap transmission of phase possible. The unwrapped phase ψ is provided as input to a phase encoder (PE)  46  which provides as output representation levels r suitable for being transmitted.  
         [0027]     Referring now to the operation of the phase unwrapper  44 , as mentioned above, actual phase ψ and actual frequency Ω for a track are related by:  
               ψ   ⁡     (   t   )       =         ∫     T   0     t     ⁢       Ω   ⁡     (   τ   )       ⁢     ⅆ   τ         +     ψ   ⁡     (     T   0     )                 Equation   ⁢           ⁢   1             
 
 with T 0  a reference time instant. 
 
         [0028]     A sinusoidal track in frames k=K, K+1 . . . K+L−1 has measured frequencies ω(k) (expressed in radians per second) and measured phases φ(k) (expressed in radians). The distance between the centre of the frames is given by U (update rate expressed in seconds). The measured frequencies are supposed to be samples of the assumed underlying continuous-time frequency track Ω with ω(k)=Ω(kU) and, similarly, the measured phases are samples of the associated continuous-time phase track ψ with φ(k)=ψ(kU) mod (2π). For sinusoidal coding it is assumed that Ω is a nearly constant function.  
         [0029]     Assuming that the frequencies are nearly constant within a segment Equation 1 can be approximated as follows:  
                     ψ   ⁡     (   kU   )       =       ⁢         ∫       (     k   -   1     )     ⁢   U     kU     ⁢       Ω   ⁡     (   t   )       ⁢     ⅆ   t         +     ψ   ⁡     (       (     k   -   1     )     ⁢   U     )                     ≈       ⁢         {       ω   ⁡     (   k   )       +     ω   ⁡     (     k   -   1     )         }     ⁢     U   /   2       +       ψ   ⁡     (       (     k   -   1     )     ⁢   U     )       .                     Equation   ⁢           ⁢   2             
 
         [0030]     It will therefore be seen that knowing the phase and frequency for a given segment and the frequency of the next segment, it is possible to estimate an unwrapped phase value for the next segment, and so on for each segment in a track.  
         [0031]     In the preferred embodiment, the phase unwrapper determines an unwrap factor m(k) at instant k: 
 
ψ( kU )=φ( k )+ m ( k )2π  Equation 3 
 
         [0032]     The unwrap factor m(k) tells the phase unwrapper  44  the number of cycles which has to be added to obtain the unwrapped phase.  
         [0033]     Combining equations 2 and 3, the phase unwrapper determines an incremental unwrap factor e as follows: 
 
2 πe ( k )= 2π{m ( k )− m ( k −1)}={ω( k )+ω( k −1)} U/ 2−{φ( k )−φ( k −1)}
 
 where e should be an integer. However, due to measurement and model errors, the incremental unwrap factor will not be an integer exactly, so: 
 
 e ( k )=round([{ω( k )+ω( k −1)} U/ 2−{φ( k )−φ( k −1)}]/(2π)) 
 
 assuming that the model and measurement errors are small. 
 
         [0034]     Having the incremental unwrap factor e, the m(k) from equation (3) is calculated as the cumulative sum where, without loss of generality, the phase unwrapper starts in the first frame K with m(K)=0, and from m(k) and φ(k), the (unwrapped) phase ψ(kU) is determined.  
         [0035]     In practice, the sampled data ψ(kU) and Ω(kU) are distorted by measurement errors: 
 
φ( k )=ψ( kU )+ε 1 ( k ), 
 
ψ( k )=Ω( kU )+ε 2 ( k ), 
 
 where ε 1  and ε 2  are the phase and frequency errors, respectively. In order to prevent the determination of the unwrap factor becoming ambiguous, the measurement data needs to be determined with sufficient accuracy. Thus, in the preferred embodiment, tracking is restricted so that: 
 
δ( k )= e ( k )−[{ω( k )+ω( k −1)} U/ 2−{φ( k )−φ( k −1)}]/(2π)&lt;δ 0  
 
 where δ is the error in the rounding operation. The error δ is mainly determined by the errors in ω due to the multiplication with U. Assume that ω is determined from the maxima of the absolute value of the Fourier Transform from a sampled version of the input signal with sampling frequency F s  and that the resolution of the Fourier Transform is 2π/L a  with L a  the analysis size. In order to be within the considered bound, we have:  
           L   a     U     =     δ   0         
 
         [0036]     That means that the analysis size should be few times larger than the update size in order for unwrapping to be accurate, e.g., setting δ 0 =¼, the analysis size should be four times the update size (neglecting the errors ε 1  in the phase measurement).  
         [0037]     The second precaution which can be taken to avoid decision errors in the round operation is to defining tracks appropriately. In the tracking unit  42 , sinusoidal tracks are typically defined by considering amplitude and frequency differences. Additionally, it is also possible to account for phase information in the linking criterion. For instance, we can define the phase prediction error ε as the difference between the measured value and the predicted value {tilde over (φ)} according to 
 
ε={φ( k )−{tilde over (φ)}( k )}mod2π
 
 where the predicted value can be taken as 
 
{tilde over (φ)}( k )=φ( k −1)+{ω( k )−ω( k −1)} U/ 2 
 
 Thus, preferably the tracking unit  42  forbids tracks where ε is larger than a certain value (e.g. ε&gt;π/2), resulting in an unambiguous definition of e(k). 
 
         [0038]     Additionally, the encoder may calculate the phases and frequencies such as will be available in the decoder. If the phases or frequencies which will become available in the decoder differ too much from the phases and/or frequencies such as are present in the encoder, it may be decided to interrupt a track, i.e. to signal the end of a track and start a new one using the current frequency and phase and their linked sinusoidal data.  
         [0039]     The sampled unwrapped phase ψ(kU) produced by the phase unwrapper (PU)  44  is provided as input to phase encoder (PE)  46  to produce the set of representation levels r. Techniques for efficient transmission of a generally monotonically changing characteristic such as the unwrapped phase are known. In the preferred embodiment,  FIG. 3 ( b ), Adaptive Differential Pulse Code Modulation (ADPCM) is employed. Here, a predictor (PF)  48  is used to estimate the phase of the next track segment and encode the difference only in a quantizer (Q)  50 . Since ψ is expected to be a nearly linear function and for reasons of simplicity, the predictor  48  is chosen as a second-order filter of the form: 
 
 y ( k +1)+2 x ( k )− x ( k −1) 
 
 where x is the input and y is the output. It will be seen, however, that it is also possible to take other functional relations (including higher-order relations) and to include adaptive (backward or forward) adaptation of the filter coefficients. In the preferred embodiment, a backward adaptive control mechanism (QC)  52  is used for simplicity to control the quantiser  50 . Forward adaptive control is also possible as well but would require extra bit rate overhead. 
 
         [0040]     As will be seen, initialization of the encoder (and decoder) for a track starts with knowledge of the start phase φ( 0 ) and frequency ω( 0 ). These are quantized and transmitted by a separate mechanism. Additionally, the initial quantization step used in the quantization controller  52  of the encoder and the corresponding controller  62  in the decoder,  FIG. 5 ( b ), is either transmitted or set to a certain value in both encoder and decoder. Finally, the end of a track can either be signalled in a separate side stream or as a unique symbol in the bit stream of the phases.  
         [0041]     From the sinusoidal code C S  generated with the sinusoidal coder, the sinusoidal signal component is reconstructed by a sinusoidal synthesizer (SS)  131  in the same manner as will be described for the sinusoidal synthesizer (SS)  32  of the decoder. This signal is subtracted in subtractor  17  from the input x 2  to the sinusoidal coder  13 , resulting in a remaining signal x 3 . The residual signal x 3  produced by the sinusoidal coder  13  is passed to the noise analyzer  14  of the preferred embodiment which produces a noise code C N  representative of this noise, as described in, for example, PCT patent application No. PCT/EP00/04599.  
         [0042]     Finally, in a multiplexer  15 , 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.  
         [0043]      FIG. 4  shows an audio player  3  suitable for decoding an audio stream AS′, e.g. generated by an encoder  1  of  FIG. 1 , obtained from a data bus, antenna system, storage medium etc. The audio stream AS′ is de-multiplexed in a de-multiplexer  30  to obtain the codes C T , C S  and C N . These codes are furnished to a transient synthesizer  31 , a sinusoidal synthesizer  32  and a noise synthesizer  33  respectively. From the transient code C T , the transient signal components are calculated in the transient synthesizer  31 . In case the transient code indicates a shape function, the shape is calculated based on the received parameters. Further, the shape content is calculated based on the frequencies and amplitudes of the sinusoidal components. If the transient code C T  indicates a step, then no transient is calculated. The total transient signal y T  is a sum of all transients.  
         [0044]     The sinusoidal code C S  including the information encoded by the analyser  130  is used by the sinusoidal synthesizer  32  to generate signal y S . Referring now to FIGS.  5 ( a ) and ( b ), the sinusoidal synthesizer  32  comprises a phase decoder (PD)  56  compatible with the phase encoder  46 . Here, a dequantiser ()Q)  60  in conjunction with a second-order prediction filter (PF)  64  produces (an estimate of) the unwrapped phase {circumflex over (ψ)} from: the representation levels r; initial information {circumflex over (ψ)}( 0 ), {circumflex over (ω)}( 0 ) provided to the prediction filter (PF)  64  and the initial quantization step for the quantization controller (QC)  62 .  
         [0045]     As illustrated in  FIG. 2 ( b ), the frequency can be recovered from the unwrapped phase {circumflex over (ψ)} by differentiation. Assuming that the phase error at the decoder is approximately white and since differentiation amplifies the high frequencies, the differentiation can be combined with a low-pass filter to reduce the noise and, thus, to obtain an accurate estimate of the frequency at the decoder.  
         [0046]     In the preferred embodiment, a filtering unit (FR)  58  approximates the differentiation which is necessary to obtain the frequency {circumflex over (ω)} from the unwrapped phase by procedures as forward, backward or central differences. This enables the decoder to produce as output the phases {circumflex over (ψ)} and frequencies {circumflex over (ω)} usable in a conventional manner to synthesize the sinusoidal component of the encoded signal.  
         [0047]     At the same time, as the sinusoidal components of the signal are being synthesized, the noise code C N  is fed to a noise synthesizer NS  33 , which is mainly a filter, having a frequency response approximating the spectrum of the noise. The NS  33  generates reconstructed noise y N  by filtering a white noise signal with the noise code C N . The total signal y(t) comprises the sum of the transient signal y T  and the product of any amplitude decompression (g) and the sum of the sinusoidal signal y S  and the noise signal y N . The audio player comprises two adders  36  and  37  to sum respective signals. The total signal is furnished to an output unit  35 , which is e.g. a speaker.  
         [0048]      FIG. 6  shows an audio system according to the invention comprising an audio coder  1  as shown in  FIG. 1  and an audio player  3  as shown in  FIG. 4 . Such a system offers playing and recording features. The audio stream AS is furnished from the audio coder to the audio player over a communication channel  2 , which may be a wireless connection, a data  20  bus or a storage medium. In case the communication channel  2  is a storage medium, the storage medium may be fixed in the system or may also be a removable disc, memory stick etc. The communication channel  2  may be part of the audio system, but will however often be outside the audio system.

Technology Classification (CPC): 6