# Patent

## Title
Hybrid audio encoder and hybrid audio decoder which perform coding or decoding while switching between different codecs

## Abstract

A new hybrid audio decoder and a new hybrid audio encoder having block switching for speech signals and audio signals are provided. Currently, very low bitrate audio coding methods for speech and audio signals are proposed. These audio coding methods cause very long delays. Generally, in coding an audio signal, an algorithm delay tends to be long to achieve higher frequency resolution. In coding a speech signal, the delay needs to be reduced because the speech signal is used for telecommunication. To balance fine coding quality for speech and audio input signals with very low bitrate, a combination of a low delay filter bank like AAC-ELD and a CELP coding method is provided.

## Background
TECHNICAL FIELD
The present invention relates to a hybrid audio encoder and a hybrid audio decoder which perform coding or decoding while switching between different codecs.
BACKGROUND ART
Speech codec is designed specially according to the characteristics of a speech signal [NPL 1]. The speech codec has the advantage of efficiently coding a speech signal. For example, the sound quality is high when a speech signal is coded in low bitrate, and the delay is low. However, the sound quality in coding an audio signal that is wideband compared to the speech signal is not as good as in the case of using some transform codecs such as the AAC scheme. On the other hand, the transform codec represented by the AAC scheme is suitable for coding an audio signal, but it requires higher bitrate to code a speech signal in order to achieve the same sound quality as the speech codec. The hybrid codec can code a speech signal and an audio signal with high sound quality at low bitrate. The hybrid codec combines the merits of the two different codecs in order to achieve coding with high sound quality at low bitrate.
A low delay hybrid codec is desired for real-time communication applications such as a teleconference system. One low delay hybrid codec combines the AAC-LD (low-delay AAC) coding technology with the speech coding technology. The AAC-LD provides a mode with an algorithm delay not exceeding 20 ms. The AAC-LD is derived from the normal AAC coding technology. In order to reduce the algorithm delay, the AAC-LD has some modifications on AAC. Firstly, the frame size of the AAC-LD is reduced to 1024 or 960 time domain samples, and thus the output spectral values of the MDCT filter bank are reduced to 512 and 480 spectral values, respectively. Secondly, in order to reduce the algorithm delay, look-ahead is disabled, and as a result, block switching is not used. Thirdly, a low-overlap window is used to replace the Kaiser-Bessel window used in the window function processing in the normal delay AAC. The low-overlap window is used for efficiently coding transient signals in the AAC-LD. Fourthly, the bit reservoir is minimized or not used at all. Fifthly, the temporal noise shaping and long-term prediction functions are adapted according to the low delay frame size.
Generally, the speech codec is based on linear prediction coding (algebraic code-excited linear prediction (ACELP)) [NPL 1]. For the ACELP coding, a linear prediction analysis is applied on a speech signal, and an algebraic codebook is used to code an excitation signal calculated by the linear prediction analysis. To further improve the sound quality of the ACELP coding, recent speech codec additionally uses the transform coded excitation coding (TCX coding). For the TCX coding, after linear prediction analysis, transform coding is applied on the excitation signal. The Fourier transformed weighted signal is quantized using algebraic vector quantization. Different frame sizes are available for speech codec, for example, 1024 time domain samples, 512 time domain samples, and 256 time domain samples. The coding mode is selected using the closed-loop analysis-by-synthesis method.
A low delay hybrid codec has three different coding modes, namely, the AAC-LD coding mode, the ACELP mode and the TCX mode. Since each mode codes a signal in a different domain and has a different frame size, the hybrid codec needs to have block switching methods for transition frames in which the coding mode switches. An example of the transition frame is illustrated in FIG. 2. For example, a pervious frame is coded in the AAC-ELD mode and a current frame is to be coded in the ACELP mode, the current frame is defined as a transition frame. In the prior art, to switch between different coding modes, the aliasing portion of the previous windowed frame is processed differently compared to the current portion of the current block in the transition frame (PTL 1: International Patent Application Publication WO2010/003532 by Fraunhofer Gesellschaft).
To facilitate the explanation of the present invention in the following sections, the transform and the inverse transform of the AAC-ELD is provided in this background section.
The transform processes of the AAC-ELD mode in the encoder are described as follows:
The number of processed AAC-ELD frames is 4. A frame i-1 is concatenated with three previous frames to form an extended frame with a length of 4N. Here, N is the size of the input frame. That is to say, to code a current picture to be coded, the AAC-ELD mode requires not only a sample of the current frame but also samples of the three frames previous to the current frame.
Firstly, window is applied on the extended frame in the AAC-ELD mode. FIG. 3 illustrates the encoder window shape in the AAC-ELD mode of the encoder. The window in the encoder is defined as wenc. For the convenience of illustration, the encoder window is divided into eight parts, denoted as [w1, w2, w3, w4, w5, w6, w7, w8]. The length of the encoder window is 4N. The encoder window in the AAC-ELD mode is designed to match the low delay filter banks used in the AAC-ELD mode. For the convenience of explanation, one frame is divided into two parts as shown in FIG. 3. For example, the frame i-1 is divided into two vectors [ai-1, bi-1]. Here, ai-1 has N/2 samples, and bi-1 has N/2 samples. Therefore, the encoder window is applied on the vectors denoted as [ai-4, bi-4, ai-3, bi-3, ai-2, bi-2, ai-1, bi-1], to obtain the windowed signal [ai-4w1, bi-4w2, ai-3w3, bi-3w4, ai-2w5, bi-2w6, ai-1w7, bi-1w8].
Next, the low delay filter banks are used to transform the windowed signals. The low delay filter banks are defined as following:




  
    
      
        
          x
          k
        
        =
        
          
            -
            2
          
          ⁢
          
            
              ∑
              
                n
                =
                
                  
                    -
                    2
                  
                  ⁢
                  N
                
              
              
                
                  2
                  ⁢
                  N
                
                -
                1
              
            
            ⁢
            
              
                x
                n
              
              ⁢
              
                cos
                ⁡
                
                  [
                  
                    
                      π
                      N
                    
                    ⁢
                    
                      (
                      
                        n
                        +
                        
                          1
                          2
                        
                        -
                        
                          N
                          2
                        
                      
                      )
                    
                    ⁢
                    
                      (
                      
                        k
                        +
                        
                          1
                          2
                        
                      
                      )
                    
                  
                  ]
                
              
            
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          1
        
        ]
      
    
  




where xn=[ai-4w1, bi-4w2, ai-3w3, bi-3w4, ai-2w5, bi-2w6, ai-1w7, bi-1w8].
According to the above low delay filter banks, the length of the output coefficients is N while the processing frame length is 4N.
The low delay filter bank can be expressed in terms of DCT-IV. The DCT-IV definition is shown as follows:




  
    
      
        
          x
          k
        
        =
        
          
            DCT
            -
            
              IV
              ⁡
              
                (
                
                  x
                  n
                
                )
              
            
          
          =
          
            
              ∑
              
                n
                =
                0
              
              
                N
                -
                1
              
            
            ⁢
            
              
                x
                n
              
              ⁢
              
                cos
                ⁡
                
                  [
                  
                    
                      π
                      N
                    
                    ⁢
                    
                      (
                      
                        n
                        +
                        
                          1
                          2
                        
                      
                      )
                    
                    ⁢
                    
                      (
                      
                        k
                        +
                        
                          1
                          2
                        
                      
                      )
                    
                  
                  ]
                
              
            
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          2
        
        ]
      
    
  




According to the following identities:




  
    
      
        
          cos
          ⁡
          
            [
            
              
                π
                N
              
              ⁢
              
                (
                
                  
                    -
                    n
                  
                  -
                  1
                  +
                  
                    1
                    2
                  
                
                )
              
              ⁢
              
                (
                
                  k
                  +
                  
                    1
                    2
                  
                
                )
              
            
            ]
          
        
        =
        
          cos
          ⁡
          
            [
            
              
                π
                N
              
              ⁢
              
                (
                
                  n
                  +
                  
                    1
                    2
                  
                
                )
              
              ⁢
              
                (
                
                  k
                  +
                  
                    1
                    2
                  
                
                )
              
            
            ]
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          3
        
        ]
      
    
  
  
    
      
        
          cos
          ⁡
          
            [
            
              
                π
                N
              
              ⁢
              
                (
                
                  
                    2
                    ⁢
                    N
                  
                  -
                  n
                  -
                  1
                  +
                  
                    1
                    2
                  
                
                )
              
              ⁢
              
                (
                
                  k
                  +
                  
                    1
                    2
                  
                
                )
              
            
            ]
          
        
        =
        
          -
          
            cos
            ⁡
            
              [
              
                
                  π
                  N
                
                ⁢
                
                  (
                  
                    n
                    +
                    
                      1
                      2
                    
                  
                  )
                
                ⁢
                
                  (
                  
                    k
                    +
                    
                      1
                      2
                    
                  
                  )
                
              
              ]
            
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          4
        
        ]
      
    
  




the signal of the frame i-1 transformed by the low delay filter banks can be expressed in term of DCT-IV as follows:

[DCT-IV(−(ai-4w1)R−bi-4w2+(ai-2w5)R+bi-2w6),

DCT-IV(−ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R)],

where (ai-4w1)R, (ai-2w5)R, (bi-3w4)R, (bi-1w8)R denote the reverse order of vectors ai-4w1, ai-2w5, bi-3w4, bi-1w8 respectively.
The inverse transform processes in the AAC-ELD mode of the decoder are described below.
The following describes the case where the decoder decodes the frame i-1 in the AAC-ELD mode. FIG. 7 illustrates the inverse transform processes in the AAC-ELD mode. The inverse low delay filter banks of the AAC-ELD mode in the decoder are shown below.




  
    
      
        
          
            y
            n
          
          =
          
            
              -
              
                1
                N
              
            
            ⁢
            
              
                ∑
                
                  k
                  =
                  0
                
                
                  N
                  -
                  1
                
              
              ⁢
              
                
                  x
                  k
                
                ⁢
                
                  cos
                  ⁡
                  
                    [
                    
                      
                        π
                        N
                      
                      ⁢
                      
                        (
                        
                          n
                          +
                          
                            1
                            2
                          
                          -
                          
                            N
                            2
                          
                        
                        )
                      
                      ⁢
                      
                        (
                        
                          k
                          +
                          
                            1
                            2
                          
                        
                        )
                      
                    
                    ]
                  
                
              
            
          
        
        ,
        
          

        
        ⁢
        
          0
          ≤
          n
          <
          
            4
            ⁢
            N
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          5
        
        ]
      
    
  




The length of the inverse transform signals of the low delay filter banks is 4N. As explained in Embodiment 1, the inverse transform signals for the frame i-1 are as follows:

yi-1=

[−ai-4w1−(bi-4w2)R+ai-2w5+(bi-2w6)R,

−(ai-4w1)R−bi-4w2+(ai-2w5)R+bi-2w6,

−ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R,

(ai-3w3)R−bi-3w4−(ai-1w7)R+bi-1w8,

ai-4w1+(bi-4w2)R−ai-2w5−(bi-2w6)R,

(ai-4w1)R+bi-4w2−(ai-2w5)R−bi-2w6,

ai-3w3−(bi-3w4)R−ai-1w7+(bi-1w8)R,

−(ai-3w3)R+bi-3w4+(ai-1w7)R−bi-1w8]  [Math. 6]

After applying inverse low delay filter banks, window is applied on yi-1 to obtain

 yi-1.  [Math. 7]

FIG. 6 illustrates the decoder window shape in the AAC-ELD mode. The length of the window in the AAC-ELD mode is 4N. It is the reverse order of the encoder window in the AAC-ELD mode. The window in the decoder is denoted as wdec. For the convenience of illustration, the decoder window is divided into eight parts [wR,8, wR,7, wR,6, wR,5, wR,4, wR,3, wR,2, wR,1] as shown in FIG. 6.

The windowed inverse transform signals

 yi-1  [Math. 8]

are as follows:

 yi-1=

[(−ai-4w1−(bi-4w2)R+ai-2w5+(bi-2w6)R)wR,8,

(−(ai-4w1)R−bi-4w2+(ai-2w5)R+bi-2w6)wR,7,

(−ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R)wR,6,

((ai-3w3)R−bi-3w4−(ai-1w7)R+bi-1w8)wR,5,

(ai-4w1+(bi-4w2)R−ai-2w5−(bi-2w6)R)wR,4,

((ai-4w1)R−bi-4w2−(ai-2w5)R−bi-2w6)wR,3,

(ai-3w3−(bi-3w4)R−ai-1w7+(bi-1w8)R)wR,2,

(−(ai-3w3)R+bi-3w4+(ai-1w7)R−bi-1w8)wR,1]  [Math. 9]

For the next frame i coded in the AAC-ELD mode, the windowed inverse transform signals

 yi  [Math. 10]

are as follows:

 yi=

[(−ai-3w1−(bi-3w2)R+ai-1w5+(bi-1w6)R)wR,8,

(−(ai-3w1)R−bi-3w2+(ai-1w5)R+bi-1w6)wR,7,

(−ai-2w3+(bi-2w4)R+aiw7−(biw8)R)R)wR,6,

((ai-2w3)R−bi-2w4−(aiw7)R+biw8)wR,5,

ai-3w1+(bi-3w2)R−ai-1w5−(bi-1w6)R)wR,4,

((ai-3w1)R+bi-3w2−(ai-1w5)R−bi-1w6)wR,3,

(ai-2w3−(bi-2w4)R−aiw7+(biw8)R)wR,2,

(−(ai-2w3)R+bi-2w4+(aiw7)R−biw8)wR,1]  [Math. 11]

In order to reconstruct the signal [ai-1, bi-1] of the frame i, the overlapping and adding process requires three previous frames. FIG. 7 illustrates the overlapping and adding process in the AAC-ELD mode. The length of the reconstructed signals outi is N.
The overlapping and adding processes can be expressed as the following equation:

outi,n= yi,n+ yi-1,n+N+ yi-2,n+2N+ yi-3,n+3N,0≦n<N  [Math. 12]

The aliasing cancellation mechanism of the AAC-ELD is illustrated in FIG. 22. The windowed inverse transform signal of the frame i, the frame i-1, the frame i-2, and the frame i-3 are shown in FIG. 22. For the purpose of visualization, the graphs show an example of a special case where

ai=1,bi=1∀i.  [Math. 13]

(−ai-3w1−(bi-3w2)R+ai-1w5+(bi-1w6)R)wR,8+

(−ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R)wR,6+

(ai-5w1+(bi-5w2)R−ai-3w5−(bi-3w6)R)wR,4+

(ai-5w3−(bi-5w4)R−ai-3w7+(bi-3w8)R)wR,2=

ai-5(w3wR,2+w1wR,4)+ai-3(−w7wR,2−w5wR,4−w3wR,6−w1wR,8)+ai-1(w7wR,6+w5wR,8)  [Math. 14]

The window is designed to possess the following properties:

(w3wR,2+w1wR,4)R≈0

(−w7wR,2−w5wR,4−w3wR,6−w1wR,8)R≈0

(w7wR,6+w5wR,8)R≈1  [Math. 15]

A signal ai-1 is reconstructed after the overlapping and adding.
The same analysis method is used to reconstruct a signal bi-1.

(−(ai-3w1)R−bi-3w2+(ai-1w5)R+bi-1w6)wR,7+

((ai-3w3)R−bi-3w4−(ai-1w7)R+bi-1w8)wR,5+

((ai-5w1)R+bi-5w2−(ai-3w5)R−bi-3w6)wR,3+

(−(ai-5w3)R+bi-5w4+(ai-3w7)R−bi-3w8)wR,1=

bi-5(w2wR,3+w4wR,1)+bi-3(−w2wR,7−w4wR,5−w6wR,3−w8wR,1)+bi-1(w6wR,7+w8wR,5)  [Math. 16]

(w3wR,2+w1wR,4)R≈0

(−w7wR,2−w5wR,4−w3wR,6−w1wR,8)R≈0

(w7wR,6+w5wR,8)R≈1  [Math. 17]

A signal bi-1 is reconstructed after the overlapping and adding.
CITATION LIST
Patent Literature


    [PTL 1] Fuchs, Guillaume “Apparatus and method for encoding/decoding and audio signal using an aliasing switch scheme”, International Patent Application Publication WO2010/003532


Non Patent Literature


    [NPL 1] Milan Jelinek, “Wideband Speech Coding Advances in VMR-WB Standard”, IEEE Transactions on Audio, Speech and Language Processing, Vol. 15, No. 4, May 2007 


Technical Problem 
The sound quality of the low delay hybrid codec which uses the AAC-LD is relatively narrowband and is thus not satisfactory although it has low delay compared to when the normal delay AAC is used.
To improve the sound quality (in particular, to increase the bandwidth of the sound) of the hybrid codec, the AAC-LD mode can be replaced by the AAC-ELD coding mode. The AAC-ELD further reduces the delay of the hybrid codec which employs the AAC-LD.
However, there are problems with building a hybrid codec using the AAC-ELD. With the AAC-ELD, a frequency conversion is performed using a sample overlapping with a previous frame, whereas with the ACELP mode and the TCX mode, the coding can be completed with a sample of the current frame only. Thus, when switching between different coding modes, e.g., between the AAC-ELD mode and the ACELP or TCX mode, aliasing is introduced in the transition frames where the mode is switched. The aliasing results in unnatural sound. With the block switching algorithms in the prior art, the aliasing cannot be cancelled because the coding structure of the low delay hybrid codec which employs the AAC-ELD is different from other hybrid codecs in the prior art. In the prior art, the block switching algorithms are designed to switch between the AAC-LD mode and the ACELP or TCX mode. Without any modification, these algorithms are not applicable to the block switching between the AAC-ELD mode and the ACELP or TCX mode.
That is to say, in order to seamlessly combine the AAC-ELD coding technology with the ACELP and TCX coding technologies in a low delay hybrid codec to reduce deterioration in the sound quality attributable to the aliasing, new block switching algorithms are needed to handle the transition frame where the coding mode is switched.
The other problem of the low delay hybrid codec is the low sound quality, because it lacks a good scheme for coding the transient signal. The AAC-ELD uses only one type of window shape which adapts to the low delay filter bank. The window shape in the AAC-ELD is long. The long window shape of the AAC-ELD causes a poor coding quality for the transient signal. A better transient signal coding method for the AAC-ELD is necessary to improve the sound quality of the low delay hybrid codec.
SUMMARY OF INVENTION
Solution to Problem
An object of the present invention is to solve the deterioration in the sound quality caused when different coding modes are switched in the low delay hybrid codec.
The present invention provides optimal block switching algorithms in an encoder and a decoder for a hybrid speech and audio codec in order to switch coding modes seamlessly to reduce the deterioration in the sound quality caused at the time of switching. The switching schemes according to an aspect of the present invention are different from the prior art which processed the aliasing portion of the windowed block differently compared to the subsequent portion of the transition block. That is to say, the non-aliasing portions of the previous frames are processed and used to cancel the aliasing in the current switching frame. No different coding technology is used for different portions of the frames.
The block switching algorithms are used to handle the transition frames where:

    
    
        the AAC-ELD mode is switched to the ACELP mode;
        the ACELP mode is switched to the AAC-ELD mode;
        the AAC-ELD mode is switched to the TCX mode; or
        the TCX mode is switched to the AAC-ELD mode.
    
    


Furthermore, the bitrate of block switching from the ACELP mode to the AAC-ELD mode for the low delay hybrid codec may be reduced. Instead of using the low delay filter banks, the normal MDCT filter bank similar to the low delay filter banks is used for the purpose of reducing the bitrate required for the switching from the ACELP mode to the AAC-ELD mode.
Moreover, the sound quality may be improved by designing a block switching scheme for handing the transient signal in the low delay hybrid codec. Short windowing may be used for encoding the transient signal because of the abrupt energy change in the transient signal. This allows seamless connection from the short window to the long window in the AAC-ELD mode.



BRIEF DESCRIPTION OF DRAWINGS
FIG. 1 is a block diagram illustrating a framework of a low delay hybrid encoder having three encoding modes.
FIG. 2 is a diagram illustrating a transition frame where a normal frame is switched to another normal frame.
FIG. 3 is a diagram illustrating windowing by an encoder in the AAC-ELD mode.
FIG. 4 is a diagram illustrating a frame border when the AAC-ELD mode is switched to the ACELP mode in an encoder.
FIG. 5 is a block diagram illustrating a low delay hybrid decoder having three decoding modes.
FIG. 6 is a diagram illustrating windowing by a decoder in the AAC-ELD mode.
FIG. 7 is a diagram illustrating decoding processes in the AAC-ELD mode.
FIG. 8 is a diagram illustrating decoding processes for switching from the AAC-ELD mode to the ACELP mode.
FIG. 9 is a diagram illustrating a process for switching from the ACELP mode to the AAC-ELD mode in a decoder.
FIG. 10 is a diagram illustrating a process for switching from the ACELP mode to the AAC-ELD mode in an encoder.
FIG. 11 is a diagram illustrating Example 1 of decoding processes for switching from the ACELP mode to the AAC-ELD mode.
FIG. 12 is a diagram illustrating Example 2 of decoding processes for switching from the ACELP mode to the AAC-ELD mode.
FIG. 13 is a diagram illustrating a process for switching from the AAC-ELD mode to the TCX mode in an encoder.
FIG. 14 is a diagram illustrating a process for switching from the AAC-ELD mode to the TCX mode in a decoder.
FIG. 15 is a diagram illustrating a process for switching from the TCX mode to the AAC-ELD mode in an encoder.
FIG. 16 is a diagram illustrating a decoding process for switching from the TCX mode to the AAC-ELD mode.
FIG. 17 is a diagram illustrating details of a decoding process for switching from the TCX mode to the AAC-ELD mode.
FIG. 18 is a diagram illustrating a process on a transient signal in an encoder.
FIG. 19 is a diagram illustrating a decoding process on a transient signal.
FIG. 20 is a block diagram illustrating a framework of a low delay hybrid encoder having two encoding modes.
FIG. 21 is a block diagram illustrating a framework of a low delay hybrid decoder having two decoding modes.
FIG. 22 is a diagram illustrating an aliasing canceling process in the AACC-ELD mode.
FIG. 23 is a diagram illustrating a process for switching from the AAC-ELD mode to the ACELP mode in a decoder.
FIG. 24 is a diagram illustrating a smoothing process at a sub-frame border.



DESCRIPTION OF EMBODIMENTS
The following embodiments illustrate the principles of various inventive steps. Variations of the specific examples described herein will be apparent to those skilled in the art.
Embodiment 1
In Embodiment 1, a hybrid speech and audio encoder having block switching algorithms is invented to code a transition frame that is a frame where the AAC-ELD mode is being switched to the ACELP mode.
In order to cancel previous frame's aliasing introduced by the AAC-ELD mode in the decoder, the frame size of the ACELP is extended. The aliasing which occurs when the AAC-ELD mode is switched to the ACELP mode is attributable to the fact that while the AAC-ELD mode requires a sample of the previous frame to code a current frame to be coded, the ACELP only uses a sample of the current frame, i.e., one frame, to code the current frame. In contrast, the second half of the previous frame preceding the current frame is concatenated with the current frame to form an extended frame, which is longer than a normal input frame size. The extended frame is coded in the ACELP mode by the encoder.
FIG. 20 is a block diagram illustrating a framework of a hybrid encoder which combines the AAC-ELD coding technology with the ACELP coding technology. In FIG. 20, an incoming signal is sent to a high frequency encoder 2001. The coded high frequency parameters are sent to a bit multiplexer block 2006. The incoming signal is also sent to a signal classification block 2003. The signal classification decides which coding mode is selected for a time domain signal in low frequency band. A mode indicator from the signal classification block 2003 is sent to the bit multiplexer block 2006. The mode indicator is also used for controlling a block switching algorithm 2002. The current time domain signal in low frequency band to be coded is sent to a corresponding encoder 2004, 2005 according to the mode indicator. The bit multiplexer block 2006 generates a bitstream.
The incoming signal is coded on a frame-by-frame basis. The input frame size is defined as N in the present embodiment.
In FIG. 20, the block switching algorithms 2002 are used to handle the transition frames where the coding mode is switched. FIG. 4 illustrates the block switching algorithm for switching from the AAC-ELD mode to the ACELP mode in Embodiment 1.
The block switching algorithm concatenates the second half of the previous frame i-1 to form an extended frame having a processing frame length of




  
    
      
        
          (
          
            N
            +
            
              
                1
                2
              
              ⁢
              N
            
          
          )
        
        .
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          18
        
        ]
      
    
  




This processed frame is sent to the ACELP mode for coding.
Advantageous Effects
The encoder having the block switching algorithm according to the present embodiment facilitates the aliasing cancellation in the decoder when the coding mode is switched from the AAC-ELD mode to the ACELP mode, and realizes a seamless combination of the AAC-ELD coding technology and the ACELP coding technology in the low delay hybrid speech and audio codec having two coding modes of the audio coding mode and the speech coding mode.
Embodiment 2
In Embodiment 2, a hybrid speech and audio encoder having block switching algorithms is invented to code the transition frame where the AAC-ELD mode is switched to the ACELP mode.
As in Embodiment 1, the principle of Embodiment 2 is to extend the frame length of the ACELP frame. The encoder framework is different from Embodiment 1. There are three coding modes in the encoder according to Embodiment 2. They are the AAC-ELD mode, the ACELP mode, and the TCX mode.
FIG. 1 illustrates a framework which combines the AAC-ELD that is an audio codec with the ACELP coding technology and the TCX coding technology that are speed codecs. In FIG. 1, an incoming signal is sent to a high frequency encoder 101. The coded high frequency parameters are sent to a bit multiplexer block 107. The incoming signal is also sent to a signal classification block 103. The signal classification decides which coding mode is selected. A mode indicator from the signal classification block is sent to the bit multiplexer block 107. The mode indicator is also used for controlling a block switching algorithm 102. The current time domain signal in low frequency band to be coded is sent to a corresponding encoder 104, 105, 106 according to the mode indicator. The bit multiplexer block 107 generates a bitstream.
Advantageous Effects
The encoder having the block switching algorithm according to the present embodiment facilitates the aliasing cancellation in the decoder when the coding mode is switched from the AAC-ELD mode to the ACELP mode, and realizes a seamless combination of the AAC-ELD coding technology and the ACELP coding technology in the low delay hybrid speech and audio codec having three coding modes.
Embodiment 3
In Embodiment 3, a hybrid speech and audio decoder having block switching algorithms is invented to decode the transition frame where the AAC-ELD mode is switched to the ACELP mode.
In present embodiment, the current frame is denoted as frame i. In order to cancel the aliasing of a frame i-1 introduced by the AAC-ELD coding mode, the block switching algorithms generate the inverse aliasing components using the non-aliasing portion of an ACELP synthesized signal of the frame i and a reconstructed signal of a frame i-2.
FIG. 21 illustrates a hybrid speech and audio decoder which combines the AAC-ELD coding technology with the ACELP decoding technologies. In FIG. 21, an input bitstream is de-multiplexed in 2101. A mode indicator is sent to control the selecting of the decoding mode and the block switching algorithm 2104. High frequency parameters are sent to a high frequency decoder 2105 to reconstruct a high frequency signal. The low frequency coefficients are sent to the corresponding decoder 2102 or 2103 according the mode indicator. The inverse transform signals and the synthesized signals are sent to the block switching algorithm. The block switching algorithm 2104 reconstructs the time domain signal of the low frequency band according to different switching situations. The high frequency decoder 2105 reconstructs the signals base on the high frequency parameters and the time domain signal of the low frequency band.
In Embodiment 3, a block switching method for switching from the AAC-ELD mode to the ACELP mode in the decoder is invented. FIG. 23 illustrates the transition from the AAC-ELD mode to the ACELP mode. The frame i-1 is inverse transformed in the AAC-ELD mode as a normal frame. The frame i is synthesized in the ACELP mode as a normal frame. The non-aliasing portion denoted as a sub-frame 2301 and the decoded signal of the frame i-2 denoted as a sub-frame 2304 and a sub-frame 2305 are processed and used to cancel the aliasing in the aliasing portion denoted as a sub-frame 2302.
FIG. 8 illustrates one example of the block switching.
For the frame i, the ACELP synthesized signal is denoted as




  
    
      
        
          y
          
            i
            ,
            n
          
          acelp
        
        ,
        
          0
          ≤
          n
          <
          
            
              3
              2
            
            ⁢
            
              N
              .
            
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          19
        
        ]
      
    
  




According to the encoding processes illustrated in Embodiment 1, the length of the ACELP synthesized signal is

 3/2N,   [Math. 20]

A part of the non-aliasing portion, denoted as the sub-frame 2301 in FIG. 23, is extracted for aliasing cancellation:




  
    
      
        
          
            b
            
              i
              -
              1
            
          
          =
          
            y
            
              i
              ,
              n
            
            acelp
          
        
        ,
        
          0
          ≤
          n
          <
          
            
              1
              2
            
            ⁢
            N
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          21
        
        ]
      
    
  




The AAC-ELD inverse transform signals of the previous frame i-1 are denoted as yi-1 with a length of 4N. One aliasing portion denoted as the sub-frame 2302 in FIG. 23 is extracted and expressed as follows according to the AAC-ELD inverse transform explained in the background section:

−ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R  [Math. 22]

The non-aliasing portion 2301 (bi-1), the aliasing portion 2302 (−ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R) of the frame i-1, and the sub-frames 2304 and 2305 that are the reconstructed signal of the frame i-2 [ai-3, bi-3] are used for reconstructing the signal of the transition frame.
The window w8 is applied to the non-aliasing portion bi-1, as shown in FIG. 8, to obtain bi-1w8.
After windowing, folding is applied to obtain the reverse order of bi-1w8, denoted as (bi-1w8)R.
The window w3 is applied to the non-aliasing portion ai-3 to obtain ai-3w3, as shown in FIG. 8.
The window w4 is applied to the non-aliasing portion bi-3 to obtain bi-3w4, as shown in FIG. 8. The reverse order of bi-3w4 is obtained as shown in 901, and is denoted as (bi-3w4)R.
To cancel the aliasing, components −ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R, (bi-1w8)R, ai-3w3, and (bi-3w4)R are added as shown in FIG. 8.
Inverse windowing is applied to ai-1w7 to obtain ai-1:

ai-1=ai-1w7/7

Therefore, the outputs of the frame i are signals [ai-1, bi-1] reconstructed by concatenation of the sub-frame 2301 and the sub-frame 801.
Advantageous Effects
As explained above, the decoder according to the present embodiment having the block switching algorithm can cancel the aliasing introduced in the transition frame where the AAC-ELD mode is switched to the ACELP mode, by performing signal processing using the non-aliasing portion of the previous frame. This enables a seamless combination of the AAC-ELD coding technology and the ACELP coding technology in the low delay hybrid decoder having two decoding modes.
Embodiment 4
In Embodiment 4, a hybrid speech and audio decoder having block switching algorithms is invented to decode the transition frame where the AAC-ELD mode is switched to the ACELP mode.
The principle of Embodiment 4 is the same as Embodiment 3. The decoder framework is different from Embodiment 3. There are three decoding modes in the decoder of Embodiment 4. They are the AAC-ELD decoding mode, the ACELP decoding mode, and the TCX decoding mode.
FIG. 5 illustrates the hybrid speech and audio decoder which combines the AAC-ELD coding technology with the ACELP and TCX coding technologies. In FIG. 5, the input bitstream is de-multiplexed in 501. A mode indicator is sent to control the selecting one from decoders 502, 503, and 504 and is sent to a block switching algorithm 505. The high frequency parameters are sent to a high frequency decoder 506 to reconstruct a high frequency signal. The low frequency coefficients are sent to the corresponding decoding mode according the mode indicator. The inverse transform signals and synthesized signals are sent to the block switching algorithm 505. The block switching algorithm 505 reconstructs the time domain signal of the low frequency band according to different switching situations. The high frequency decoder 506 reconstructs the signals base on the high frequency parameters and the time domain signal of the low frequency band.
Advantageous Effects
The decoder having the block switching algorithm according to the present embodiment solves the aliasing cancellation problem at the transition frame where AAC-ELD mode is switched to the ACELP mode, and realizes a seamless combination of the AAC-ELD coding technology and the ACELP coding technology in the low delay hybrid codec having three decoding modes.
Embodiment 5
In Embodiment 5, a hybrid speech and audio encoder having block switching algorithm is invented to code the transition frame where the ACELP mode is switched to the AAC-ELD mode.
When the coding mode is switched from the ACELP mode to the AAC-ELD mode, the decoding process switches back to the normal AAC-ELD overlapping and adding process. In prior art, this transition frame is coded by normal AAC-ELD low delay filter banks. In contrast to the prior art, the encoder of the present embodiment uses MDCT filter banks. An advantageous effect of the method of the present embodiment is that it reduces the computation complexity of the coding operation compared to the AAC-ELD coding. By using the method of the present embodiment, the transform coefficients being sent to the decoder are reduced to half compared to the normal AAC-ELD mode. Thus, the bitrate is saved.
The encoder framework is the same as Embodiment 1. The block switching method in the present embodiment is different from Embodiment 1. The present embodiment is to code the transition frame where the ACELP mode is switched to the AAC-ELD mode.
FIG. 10 illustrates the coding method for the transition frame according to the present embodiment. The current frame i [ai, bi] is extended to the length of 2N by zero padding, denoted as [ai, bi, 0, 0]. Windowing is applied to this vector to obtain a vector [aiw7, biw8, 0, 0].
After windowing, MDCT filter banks are used to transform the windowed vector:




  
    
      
        
          
            
              y
              _
            
            k
            MDCT
          
          =
          
            
              ∑
              
                n
                =
                0
              
              
                
                  2
                  ⁢
                  N
                
                -
                1
              
            
            ⁢
            
              
                
                  X
                  _
                
                n
                MDCT
              
              ⁢
              
                cos
                ⁡
                
                  [
                  
                    
                      π
                      N
                    
                    ⁢
                    
                      (
                      
                        n
                        +
                        
                          1
                          2
                        
                        +
                        
                          N
                          2
                        
                      
                      )
                    
                    ⁢
                    
                      (
                      
                        k
                        +
                        
                          1
                          2
                        
                      
                      )
                    
                  
                  ]
                
              
            
          
        
        ,
        
          

        
        ⁢
        
          0
          ≤
          k
          <
          
            N
            .
          
        
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          23
        
        ]
      
    
  




The MDCT transform coefficients can be expressed in terms of DCT-IV as follows:

[0,DCT-IV(aiw7−(biw8)R)]

As a result, the coefficients of the portion N/2 are all zero, and thus only the DCT-IV (aiw7−(biw8)R) having the length of N/2 needs to be sent to the decoder. The length of the AAC-ELD coefficients is N. Therefore, by using the method according to the present embodiment, the bitrate is saved by half.
Advantageous Effects
The encoder according to the present embodiment having the block switching algorithm helps prepare the aliasing components of the frame i in order to perform aliasing cancellation with following frames coded in the AAC-ELD mode, when the coding mode is switched from the ACELP mode to the AAC-ELD mode. It reduces the computation complexity of the coding operation and reduces the bitrate compared to when using the AAC-ELD mode on the transition frame directly.
Embodiment 6
In Embodiment 6, a hybrid speech and audio encoder having a block switching algorithm is invented to code the transition frame where the ACELP mode is switched to the AAC-ELD mode.
The principle of Embodiment 6 is the same as Embodiment 5, but the encoder framework is different from Embodiment 5.
There are three coding modes in the encoder of Embodiment 6, namely the AAC-ELD mode, the ACELP mode, and the TCX mode. The encoder frame work of Embodiment 6 is the same as Embodiment 2.
Embodiment 7
In Embodiment 7, a hybrid speech and audio decoder with block switching algorithms is invented to decode the transition frame where the ACELP mode is switched to the AAC-ELD mode.
In the present embodiment, block switching in the decoder from the ACELP mode to the AAC-ELD mode is performed according to the encoder in Embodiment 5. When the coding mode is switched from the ACELP mode to the AAC-ELD mode, the following frames are switched back to the AAC-ELD overlapping and adding mode. Aliasing of the AAC-ELD are produced by using the aliasing portions of the inverse MDCT transform signal of the frame i, the non-aliasing portion of the ACELP synthesized signal of the frame i-1, and the reconstructed signal of the frame i-2 and the frame i-3. FIG. 9 illustrates the transition from the ACELP mode to the AAC-ELD mode in the decoder.
The decoder framework is the same as Embodiment 3. The block switching method in the present embodiment is different from Embodiment 3. FIGS. 9, 11, and 12 illustrate one example of the decoding processes.
According to Embodiment 5, the received low band coefficients are MDCT transform coefficients DCT-IV (aiw7−(biw8)R) in this transition frame i. Therefore, the corresponding inverse filter banks are IMDCT in Embodiment 7. The aliasing outputs of the IMDCT are denoted as [aiw7−(biw8)R, −(aiw7)R+biw8] having a length of N, shown as a sub-frame 901 and a sub-frame 902 in FIG. 9.
The non-aliasing portions of ACELP synthesized signals from the previous frame i-1 are denoted as [ai-1, bi-1] having a length of N, shown as a sub-frame 903 and a sub-frame 904 in FIG. 9.
The outputs of the previous two frames are denoted as [ai-2, bi-2] and [ai-3, bi-3], shown as sub-frames 905, 906, 907, and 908, respectively in FIG. 9.
The aliasing portions of the inverse AAC-ELD are produced by using the sub-frames mentioned above. The purpose is to prepare the aliasing components for overlapping and adding with the following frames coded in the AAC-ELD mode, so that the coding mode can switch back to the normal AAC-ELD mode.
One of the methods to generate the aliasing components introduced by inverse low delay filter banks is described in the following section. FIGS. 11 and 12 illustrate the detail processes of how to produce the aliasing elements of the AAC-ELD.
In FIG. 11, the decoded signal ai-3 of a frame i-3 is windowed to obtain ai-3w1. Folding is applied to obtain the reverse order (ai-3w1)R.
The second half of the decoded signal bi-3 of the frame i-3 is windowed to obtain bi-3w2.
The first part of the non-aliasing portion of the ACELP synthesized signal ai-1 of the frame i-1 is windowed to obtain ai-1w5. Folding is applied to obtain the reverse order (ai-1w5)R.
The second part of the non-aliasing portion of the ACELP synthesized signal is denoted as bi-1. Windowed is applied to bi-1 to obtain bi-1w6.
By adding up the vectors (ai-3w1)R, bi-3w2, (ai-1w5)R, and bi-1w6, the aliasing components of inversed low delay filter banks coefficients yi are reconstructed as follows:

A=−(ai-3w1)R−bi-3w2+(ai-1w5)R+bi-1w6 

AR=−ai-3w1−(bi-3w2)R+ai-1w5+(bi-1w6)R 

−AR=ai-3w1+(bi-3w2)R−ai-1w5−(bi-1w6)R 

−A=(ai-3w1)R+bi-3w2−(ai-1w5)R−bi-1w6  [Math. 24]

By using the same analytical method, the rest of the components of the inversed transform coefficients yi is reconstructed. FIG. 12 illustrates the detail of the processes of producing the aliasing portions of the AAC-ELD.

B=−ai-2w3+(bi-2w4)R+aiw7−(biw8)R 

−BR=(ai-2w3)R−bi-2w4−(aiw7)R+biw8 

−B=ai-2w3−(bi-2w4)R−aiw7+(biw8)R 

BR=−(ai-2w3)R+bi-2w4+(aiw7)R−biw8  [Math. 25]

The aliasing portions of the AAC-ELD frame i are obtained, as shown in FIG. 12.

yi=[AR,A,B,−BR,−AR,−A,−B,BR]  [Math. 26]

Decoder window [wR,8, wR,7, wR,6, wR,5, wR,4, wR,3, wR,2, wR,1] is applied to obtain the windowed aliasing portions:

 yi  [Math. 27]

 yi=

[(−ai-3w1−(bi-3w2)R+ai-1w5+(bi-1w6)R)wR,8,

(−(ai-3w1)R−bi-3w2+(ai-1w5)R+bi-1w6)wR,7,

(−ai-2w3+(bi-2w4)R+aiw7−(biw8)R)wR,6,

((ai-2w3)R−bi-2w4−(aiw7)R+biw8)wR,5,

(ai-3w1+(bi-3w2)R−ai-1w5−(bi-1w6)R)wR,4,

((ai-3w1)R−bi-3w2−(ai-1w5)R−bi-1w6)wR,3,

(ai-2w3−(bi-2w4)R−aiw7+(biw8)R)wR,2,

(−(ai-2w3)R+bi-2w4+(aiw7)R−biw8)wR,1 ][Math. 28]

With the re-generated aliasing portions of the AAC-ELD, the aliasing cancellation with following AAC-ELD frames can be continued.
Advantageous Effects
The decoder according to the present embodiment having the block switching algorithm generates the aliasing components of the AAC-ELD mode using the MDCT coefficients, to facilitate the aliasing cancellation with the following frames coded in the AAC-ELD mode. According to an aspect of the present invention, it is possible to realize a seamless transition from the ACELP mode to the AAC-ELD mode in the low delay hybrid speech and audio codec having two coding modes.
Embodiment 8 
In Embodiment 8, a hybrid speech and audio decoder having block switching algorithms is invented to decode the transition frame where the ACELP mode is switched to the AAC-ELD mode.
The principle of Embodiment 8 is the same as Embodiment 7. The decoder framework is different from Embodiment 7.
There are three decoding modes in Embodiment 8, namely the AAC-ELD mode, the ACELP mode, and the TCX mode. The frame work of Embodiment 8 is the same as Embodiment 4.
Advantageous Effects
The decoder according to the present embodiment having the block switching algorithm generates the aliasing of the AAC-ELD mode to facilitate the aliasing cancellation with the following frames coded in the AAC-ELD mode. According to an aspect of the present invention, it is possible to realize a seamless transition from the ACELP mode to the AAC-ELD mode in the low delay hybrid speech and audio codec having three coding modes.
Embodiment 9
In Embodiment 9, a speech and audio encoder having a block switching algorithm is invented to code the transition frame where the AAC-ELD mode is switched to the TCX mode.
In order to cancel previous frame's aliasing introduced by the AAC-ELD mode in the decoder, the TCX frame size is extended. In the present embodiment, the block switching algorithms concatenate the current frame with the previous frame to form an extended frame, whose length is longer than the normal frame size. This extended frame is coded in the TCX mode in the encoder.
The encoder frame work is the same as Embodiment 2. The block switching method in the present embodiment is different from Embodiment 2. The present embodiment is to code the transition frame where the AAC-ELD mode is switched to the TCX mode.
FIG. 13 illustrates the coding process. The previous frame is coded in the AAC-ELD mode. In order to cancel the aliasing of the previous frame i-1 introduced by the AAC-ELD mode, the current frame i is concatenated with the previous frame i-1 to form a long frame. The processing frame size is 2N, where N is the frame size. The extended frame is coded in the TCX mode as shown in FIG. 13.
The window size of the TCX mode is N. The overlapping length of the TCX mode is

1⁄2N,   8 Math. 29]

Therefore, the extended frame contains three TCX windows as shown in FIG. 13.

Advantageous Effects
The encoder according to the present embodiment having the block switching algorithm facilitates the aliasing cancellation in the decoder when the coding mode is switched from the AAC-ELD mode to the TCX mode, and realizes a seamless combination of the AAC-ELD coding technology and the TCX coding technology in the low delay hybrid speech and audio codec having three coding modes.
Embodiment 10
In Embodiment 10, a hybrid speech and audio decoder having a block switching algorithm is invented to decode the transition frame where the AAC-ELD mode is switched to the TCX mode.
In present embodiment, the current frame is denoted as the frame i. In order to cancel the aliasing of the frame i-1 introduced by the AAC-ELD mode, the block switching algorithm generates the inverse aliasing components using the TCX synthesized signal of the frame i and the reconstructed signal of the frame i-2.
The decoder framework is the same as Embodiment 4. The block switching method in the present embodiment is different from Embodiment 4. FIG. 14 illustrates the block switching process.
According to Embodiment 9, the current transition frame is coded in the TCX mode using a processing frame size of 2N, where N is the frame size. According to the encoder in Embodiment 9, the TCX synthesis is used to synthesize in the decoder. The TCX synthesized signals are [ai-1+aliasing, bi-1, ai, bi+aliasing] with a length of 2N. The non-aliasing portion bi-1, shown as a sub-frame 1401 in FIG. 14, is used for generation the aliasing component of a sub-frame 1402.
The AAC-ELD synthesized signals of the previous frame i-1 is denoted as yi-1, and has a length of 4N. According to the AAC-ELD inverse transform described in the background section, the yi-1 is shown as follows:

yi-1=

[−ai-4w1−(bi-4w2)R+ai-2w5+(bi-2w6)R,

−(ai-4w1)R−bi-4w2+(ai-2w5)R+bi-2w6,

−ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R,    

(ai-3w3)R−bi-3w4−(ai-1w7)R+bi-1w8,

ai-4w1+(bi-4w2)R−ai-2w5−(bi-2w6)R,

(ai-4w1)R+bi-4w2−(ai-2w5)R−bi-2w6,

ai-3w3−(bi-3w4)R−ai-1w7+(bi-1w8)R,

−(ai-3w3)R+bi-3w4+(ai-1w7)R−bi-1w8]  [Math. 30]

The AAC-ELD aliasing component −ai-3w3+(bi-3w4)R+ai-1w7−(bi-1w8)R, shown as the sub-frame 1402, is cancelled by using the TCX synthesized signal bi-1 of the sub-frame 1401, and the reconstructed signal outi-2=[ai-3, bi-3] of the frame i-2, shown as sub-frame 1403 and 1040. The transition frame is reconstructed.
The details of the aliasing cancellation processes in FIG. 14 are the same as the description of FIG. 8. The sub-frame 2301 in FIG. 23 is replaced by the non-aliasing portion bi-1 of the sub-frame 1401. The sub-frame 2302 that is the aliasing portion is replaced by 1402 in FIG. 14. The non-aliasing portion, denoted as sub-frames 2304 and 2305 are replaced by outi-2=[ai-3, bi-3], denoted as sub-frames 1403 and 1404 in FIG. 14. The reconstructed signal of the transition frame i is [ai-1, bi-1].
Advantageous Effects
The decoder according to the present embodiment having the block switching algorithm cancels the aliasing of the frame i-1 introduced by the AAC-ELD mode. This enables a seamless transition from the AAC-ELD mode to the TCX mode in the low delay hybrid speech and audio codec.
Embodiment 11
In Embodiment 11, a hybrid speech and audio encoder having a block switching algorithm is invented to code the transition frame where the TCX mode is switched to the AAC-ELD mode.
The current transition frame is denoted as the frame i and it is coded in the AAC-ELD mode. The previous frame is coded in the TCX mode. In order to cancel the aliasing of the frame i introduced by the AAC-ELD low delay filter banks, the block switching algorithm codes the current frame together with three previous frames in the AAC-ELD mode.
The encoder framework is the same as Embodiment 2. The block switching method in the present embodiment is different from Embodiment 2.
FIG. 15 illustrates the coding process for the transition frame where the TCX mode is switched to the AAC-ELD mode in the encoder. According to Embodiment 9, the length of overlapping, in the TCX mode, is

1⁄2N   [Math. 31]

where N is the frame size. For a frame coded in the normal TCX mode, two TCX windows are applied as shown in FIG. 15.

For the current transition frame, the AAC-ELD mode is directly applied as shown in FIG. 15.
Advantageous Effects 
The encoder in Embodiment 11 facilitates the aliasing cancelling performed in the decoder when the TCX mode is switched to the AAC-ELD mode. The block switching algorithm in the present embodiment realizes the seamless combination of the AAC-ELD coding technology and the TCX coding technology in the low delay hybrid speech and audio codec.
Embodiment 12
In Embodiment 12, a hybrid speech and audio decoder having a block switching algorithm is invented to decode the transition frame where the TCX mode is switched to the AAC-ELD mode.
The block switching algorithm in the present embodiment generates the aliasing of the AAC-ELD using the TCX synthesized signals and the reconstructed signal of the frame i-2, and cancels the aliasing of the AAC-ELD for the block switching purpose.
FIG. 16 illustrates the corresponding decoding processes for the transition frame where the TCX mode is switched to the AAC-ELD mode. According to the encoder described in Embodiment 11, the previous frame is coded in the TCX mode. After the TCX synthesis, the TCX synthesized signals are [bi-2+aliasing, ai-1, bi-1+aliasing], and have a length of

 3/2N,   [Math. 32]

ai-1 is shown as a sub-frame 1601 in FIG. 16.

For the current frame i, after the inverse low delay filter banks, the inverse transform signal is denoted as yi and has a length of 4N as shown below.

yi=

[−ai-3w1−(bi-3w2)R+ai-1w5+(bi-1w6)R,

−(ai-3w1)R−bi-3w2+(ai-1w5)R+bi-1w6,

−ai-2w3+(bi-2w4)R+aiw7−(biw8)R,

(ai-2w3)R−bi-2w4−(aiw7)R+biw8,

ai-3w1+(bi-3w2)R−ai-1w5−(bi-1w6)R,

(ai-3w1)R−bi-3w2−(ai-1w5)R+bi-1w6,

ai-2w3−(bi-2w4)R−aiw7+(biw8)R,

−(ai-2w3)R+bi-2w4+(aiw7)R−biw8]  [Math. 33]

The aliasing portion −(ai-3w1)R−bi-3w2+(ai-1w5)R+bi-1w6, shown as a sub-frame 1602, is cancelled by the TCX synthesized signal ai-1 and the reconstructed signal outi-2=[ai-3, bi-3] of the frame i-2 shown as sub-frames 1603 and 1604 to reconstruct the signal of the transition frame [ai-1, bi-1].
FIG. 17 illustrates one example of aliasing cancellation. The reconstructed signal ai-3 of the frame i-2 is windowed to obtain ai-3w1 as shown in FIG. 17. The reverse vector of ai-3w1 is denoted as (ai-3w1)R.
The second half of the outi-2 is windowed to obtain bi-3w2.
The TCX synthesized signal ai-1 is windowed to obtain ai-1w5. The reverse order of ai-1w5 is (ai-1w5)R.
By adding and inverse windowing the re-produced aliasing components bi-1w6, a sub-frame 1701 (bi-1) is reconstructed. To obtain the current transition frame, the sub-frame 1701 is concatenated with the sub-frame 1601 as shown in FIG. 17.
Due to the quantization error, the concatenation border is not smooth. An adapted border smoothing algorithm is invented to eliminate the artefacts. FIG. 24 is illustrates the sub-frame border smoothing processes.
The sub-frame 1701 (bi-1) is windowed by the TCX window shape. Folding and unfolding processes are applied to generate the MDCT-TCX aliasing components. The outcome is overlapped with the aliasing portions of the sub-frame 1605, which are originally from the MDCT-TCX inverse transform, to obtain a sub-frame 2401. The border between the sub-frames 1601 and 2401 is smoothed by the overlapping and adding processes. The transient signal [ai-1, bi-1] is reconstructed.
Advantageous Effects
The decoder according to the present embodiment having the block switching algorithm cancels the aliasing of the frame i introduced by the AAC-ELD mode. This enables a seamless transition from the TCX mode to the AAC-ELD mode.
Embodiment 13
In Embodiment 13, a coding method for coding the transient signal in the low delay hybrid speech and audio codec is invented.
In the AAC-ELD codec, only the long window shape is used. It reduces the coding performance of the transient signal in which the energy has an abrupt change. To handle the transient signal, the short window is preferable. A transient signal coding algorithm is invented in the present embodiment. The current frame i having a transient signal is concatenated with the previous frame to form an extended frame having a longer frame size. Multiple short windows and an MDCT filter bank are used to code this processed frame.
The encoder framework is the same as Embodiments 1 and 2. FIG. 18 illustrates the coding processed in the encoder. The previous frame i-1 is coded together with three previous frames in the AAC-ELD mode. The frame i is concatenated with the previous frame as shown in FIG. 18. The length of the long extended transient frame is




  
    
      
        
          (
          
            N
            +
            
              
                1
                2
              
              ⁢
              N
            
            +
            
              
                1
                4
              
              ⁢
              N
            
          
          )
        
        .
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          34
        
        ]
      
    
  




Six short windows having a length of

1⁄2N   [Math. 35]

are applied on the extended frame. The shape of the short window can be any symmetric window used by the MDCT filter banks. The MDCT filer banks are applied to short windowed signals.

Advantageous Effect
The encoder according to the present embodiment provides the transient signal handling algorithm to improve the sound quality of the low delay hybrid codec which uses the AAC-ELD coding technology.
Embodiment 14
In Embodiment 14, a hybrid speech and audio decoder for decoding the transient signal is invented.
The transient frame i is coded by the short window MDCT as explained in Embodiment 13. In order to cancel the aliasing of the frame i-1, which is introduced by the AAC-ELD mode, the transient decoding method in the present embodiment uses the inverse MDCT transform signal of the frame i and the reconstructed signal of the frame i-3 to generate the inverse aliasing of the AAC-ELD mode.
The decoding processes of the transient frame are illustrated in FIG. 19. According to the coding processes described in Embodiment 13, after the IMDCT and overlapping and adding are performed, a signal 1902 is [ai-1+aliasing, bi-1, ai, bi+aliasing] with a length of




  
    
      
        
          (
          
            N
            +
            
              
                1
                2
              
              ⁢
              N
            
            +
            
              
                1
                4
              
              ⁢
              N
            
          
          )
        
        .
      
    
    
      
        [
        
          Math
          .
          
            
          
          ⁢
          36
        
        ]
      
    
  




The non-aliasing portion bi-1 from MDCT, shown as 1902 in FIG. 19, the AAC-ELD inverse transform signal yi-1 1904 of the frame i-1 and the reconstructed signal outi-2=[ai-3, bi-3] 1905 of the frame i-3 are sent to a block 1901 in FIG. 19 for reconstructing the signal [ai-1, bi-1]. Therefore, the output of the frame i is [ai-1, bi-1].
The processes of the block 1901 in FIG. 19 are the same as FIG. 8. The sub-frame 2301 in FIG. 23 is replaced by the non-aliasing portion 1902. The sub-frame 2302 that is the aliasing portion is replaced by 1904 in FIG. 19. The non-aliasing portion denoted as the sub-frames 2304 and 2305 are replaced by outi-2=[ai-3, bi-3] denoted as 1905 in FIG. 19.
Advantageous Effects
The invented decoder provides a transient signal handling method to improve the coding performance of the transient signal. As a result, the sound quality of the low delay hybrid codec which employs the AAC-ELD coding technology is improved.
INDUSTRIAL APPLICABILITY
The present invention relates, in general, to hybrid audio coding systems, and is more particularly related to hybrid coding systems which support audio coding and speech coding in low bitrate. The hybrid coding system combines the transform coding and the time domain coding. It can be used in broadcasting systems, mobile TVs, mobile phones communication, and teleconferences.

## Claims

1. A hybrid audio decoder configured to decode a coded stream while switching between a speech coding mode in which linear prediction coefficients are used and an audio coding mode in which a low delay orthogonal transform is used, the hybrid audio decoder comprising:
a processor; and
storage coupled to the processor,
wherein the processor is configured to perform:
low delay decoding for decoding a coded signal in the audio coding mode using an inverse modified discrete cosine transform filter bank;
generating of a synthesized signal based on the low delay decoding;
audio decoding for decoding, in the speech coding mode, a coded signal including the linear prediction coefficients;
generating of an audio synthesized signal based on the audio decoding;
decoding of a signal of a portion of a current frame to be decoded, using a signal of a previous frame preceding the current frame; and
combining of the decoded signal of the portion of the current frame and the audio synthesized signal of another portion of the current frame, to reconstruct a signal of the current frame, when the current frame is a frame to be decoded immediately before the audio coding mode is switched to the speech coding mode,
wherein, in the low delay decoding, an extended frame is windowed in a plurality of short windows each having a shorter length than a frame, and the inverse modified discrete cosine transform filter bank is applied to the extended frame, the extended frame being generated by combining the current frame and the previous frame.

2. The hybrid audio decoder according to claim 1,
wherein the signal of the portion of the current frame is decoded using: the audio synthesized signal of the other portion of the current frame; a plurality of inverse transform signals of the current frame from the inverse modified discrete cosine transform filter bank; and a reconstructed signal of the previous frame.

3. The hybrid audio decoder according to claim 2,
wherein the hybrid audio decoder is configured to decode the linear prediction coefficients and algebraic code-excited coefficients to generate an algebraic code-excited linear prediction synthesized signal as the audio synthesized signal, and
the signal of the portion of the current frame is decoded using: the algebraic code-excited linear prediction synthesized signal of the other portion of the current frame; the plurality of inverse transform signals of the current frame from the inverse modified discrete cosine transform filter bank; and the reconstructed signal of the previous frame, when the current frame is a frame to be decoded immediately before the audio coding mode is switched to the speech coding mode in which the algebraic code-excited coefficients and the linear prediction coefficients are used.

4. The hybrid audio decoder according to claim 2,
wherein the hybrid audio decoder is configured to decode the linear prediction coefficients to generate a transform coded excitation synthesized signal as the audio synthesized signal by an orthogonal transform, and
the signal of the portion of the current frame is decoded using: the transform coded excitation synthesized signal of the other portion of the current frame; the plurality of inverse transform signals of the current frame from the inverse modified discrete cosine transform filter bank; and the reconstructed signal of the previous frame, when the current frame is a frame to be decoded immediately before the audio coding mode is switched to the speech coding mode in which the transform coded excitation synthesized signal is generated by the orthogonal transform.

5. The hybrid audio decoder according to claim 1,
wherein the hybrid audio decoder is configured to decode the linear prediction coefficients and algebraic code-excited coefficients to generate an algebraic code-excited linear prediction synthesized signal as the audio synthesized signal, and
the signal of the current frame is reconstructed using at least two of: a plurality of inverse transform signals of the current frame from the inverse modified discrete cosine transform filter bank; an algebraic code-excited linear prediction synthesized signal of a first previous frame; and a reconstructed signal of a second previous frame, when the current frame is a frame to be decoded immediately after the speech coding mode in which the algebraic code-excited linear prediction coefficients are used is switched to the audio coding mode.

6. The hybrid audio decoder according to claim 1,
wherein the hybrid audio decoder is configured to decode the linear prediction coefficients to generate a transform coded excitation synthesized signal as the audio synthesized signal by an orthogonal transform, and
the signal of the current frame is reconstructed using: a plurality of inverse transform signals of a frame following the current frame from the inverse modified discrete cosine transform filter bank; the transform coded excitation synthesized signal of the portion of the current frame; and a reconstructed signal of the previous frame, when the current frame is a frame to be decoded immediately before the speech coding mode in which the transform coded excitation synthesized signal is generated by the orthogonal transform is switched to the audio coding mode.

7. A hybrid audio encoder configured to code an input signal while switching between a speech coding mode in which linear prediction coefficients are used and an audio coding mode in which a low delay orthogonal transform is used, the hybrid audio encoder comprising:
a processor; and
storage coupled to the processor,
wherein the processor is configured to perform:
signal classifying for classifying the input signal according to a characteristic of the input signal, and according to a result of the classifying, switching between the speech coding mode and the audio coding mode as a coding mode for coding the input signal;
low delay encoding for coding the input signal in the audio coding mode using a modified discrete cosine transform filter bank to generate a coded signal;
audio encoding for calculating linear prediction coefficients of the input signal in the speech coding mode to generate a coded signal including the linear prediction coefficients;
forming an extended frame by concatenating a current frame and a previous frame preceding the current frame, and coding an input signal of the extended frame, when the current frame is a frame to be coded immediately after the audio coding mode is switched to the speech coding mode; and
transmitting the coded signal including the linear prediction coefficients to a receiver.

8. The hybrid audio encoder according to claim 7,
wherein the hybrid audio encoder includes:
a transform coded excitation encoder configured to calculate an excitation residual using the calculated linear prediction coefficients, and calculate transform coded excitation coefficients using the excitation residual and the modified discrete cosine transform filter bank, to generate a coded signal including the transform coded excitation coefficients and the linear prediction coefficients; and
an algebraic code-excited linear prediction encoder configured to generate a coded signal including the linear prediction coefficients and algebraic code-excited coefficients.

9. The hybrid audio decoder according to claim 3,
wherein when the current frame is a frame to be decoded immediately before the audio coding mode is switched to the speech coding mode in which the algebraic code-excited coefficients and the linear prediction coefficients are used, the processor is configured to perform:
a. processing of the algebraic code-excited linear prediction synthesized signal of the other portion of the current frame by windowing and order arranging, to obtain a first signal;
b. processing of the reconstructed signal of the previous frame by windowing and order arranging, to obtain a second signal;
c. adding of the first signal and the second signal to the plurality of inverse transform signals of the current frame from the inverse modified discrete cosine transform filter bank, to obtain a third signal;
d. processing of the third signal by windowing and order arranging, to obtain a fourth signal as the signal of the portion of the current frame; and
e. concatenating of the fourth signal with the algebraic code-excited linear prediction synthesized signal of the other portion of the current frame to obtain a reconstructed signal as the signal of the current frame.

10. The hybrid audio decoder according to claim 5,
wherein when the current frame is a frame to be decoded immediately after the speech coding mode in which the algebraic code-excited linear prediction coefficients are used is switched to the audio coding mode, the processor is configured to perform:
a. processing of the reconstructed signal of the second previous frame which is three frames before the current frame by windowing and order arranging, to obtain a first signal;
b. processing of the algebraic code-excited linear prediction synthesized signal of the first previous frame which is one frame before the current frame by windowing and order arranging, to obtain a second signal;
c. adding of the first signal and the second signal to obtain a third signal; and
d. processing of the third signal by windowing and order arranging, to obtain a portion of an inverse low delay orthogonal transform signal of the current frame.

11. The hybrid audio decoder according to claim 5,
wherein when the current frame is a frame to be decoded immediately after the speech coding mode in which the algebraic code-excited linear prediction coefficients are used is switched to the audio coding mode, the processor is configured to perform:
a. processing of the reconstructed signal of the second previous frame which is two frames before the current frame by windowing and order arranging, to obtain a first signal;
b. adding of the first signal and the reconstructed signal of the second previous frame to the plurality of inverse transform signals of the current frame from the inverse modified discrete cosine transform filter bank, to obtain a third signal; and
c. processing of the third signal by windowing and order arranging, to obtain a portion of an inverse low delay transform signal of the current frame.

12. The hybrid audio decoder according to claim 4,
wherein when the current frame is a frame to be decoded immediately before the audio coding mode is switched to the speech coding mode in which the transform coded excitation synthesized signal is generated by the orthogonal transform, the processor is configured to perform:
a. processing of the transform coded excitation synthesized signal of the other portion of the current frame by windowing and order arranging, to obtain a first signal;
b. processing of the reconstructed signal of the previous frame by windowing and order arranging, to obtain a second signal;
c. adding of the first signal and the second signal to the plurality of inverse transform signals of the current frame from the inverse modified discrete cosine transform filter bank, to obtain a third signal;
d. processing of the third signal by windowing and order arranging, to obtain a fourth signal as the signal of the portion of the current frame; and
e. concatenating of the fourth signal with the transform coded excitation synthesized signal of the current frame to obtain a reconstructed signal as the signal of the current frame.

13. The hybrid audio decoder according to claim 6,
wherein when the current frame is a frame to be decoded immediately before the speech coding mode in which the transform coded excitation synthesized signal is generated by the orthogonal transform is switched to the audio coding mode, the processor is configured to perform:
a. processing of the transform coded excitation synthesized signal of the portion of the current frame by windowing and order arranging, to obtain a first signal;
b. processing of the reconstructed signal of the previous frame by windowing and order arranging, to obtain a second signal;
c. adding of the first signal and the second signal to the plurality of inverse transform signals of the frame following the current frame from the inverse modified discrete cosine transform filter bank, to obtain a third signal;
d. processing of the third signal by windowing and order arranging, to obtain a fourth signal as a signal of the other portion of the current frame; and
e. concatenating of the fourth signal with the transform coded excitation synthesized signal of the portion of the current frame to obtain a reconstructed signal as the signal of the current frame.

14. The hybrid audio decoder according to claim 1,
wherein the processor is configured to perform:
a. processing of a reconstructed signal of a plurality of current frames to be decoded from the inverse modified discrete cosine transform filter bank by windowing and order arranging, to obtain a first signal;
b. processing of the reconstructed signal of the previous frame by windowing and order arranging, to obtain a second signal;
c. adding of the first signal and the second signal to inverse transform signals of a plurality of previous frames from the inverse modified discrete cosine transform filter bank, to obtain a third signal;
d. processing of the third signal by windowing and order arranging, to obtain a fourth signal; and
e. concatenating of the fourth signal with the reconstructed signal of the current frames from the inverse modified discrete cosine transform filter bank, to obtain a reconstructed signal.