# Patent

## Title
Stereo decoding method and apparatus using group delay and group phase parameters

## Abstract

A stereo decoding method and apparatus are disclosed. The method includes: restoring a monophonic signal from a received code stream through decoding; restoring an interchannel level difference, a group delay, and a group phase from the received code stream through decoding; and processing the monophonic signal according to the interchannel level difference, group delay, and group phase to obtain a first channel signal and a second channel signal. According to the stereo decoding method and apparatus provided in embodiments of the present invention, the first and second channel signals are obtained according to the monophonic signal, ILD, group delay, and group phase by referring to not only the ILD but also the group delay and group phase, thereby yielding favorable stereo sound field effect for the obtained first and second channel signals.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a continuation of U.S. patent application Ser. No. 13/437,552, filed on Apr. 2, 2012, which is a continuation of International Application No. PCT/CN2010/079413, filed on Dec. 3, 2010, which claims priority to Chinese Patent Application No. 201010111432.1, filed on Feb. 12, 2010. The afore-mentioned patent applications are hereby incorporated by reference in their entireties.


FIELD OF THE INVENTION
The present invention relates to the field of communications technologies, and in particular, to a stereo decoding method and apparatus.
BACKGROUND OF THE INVENTION
At present, stereo encoding methods mainly include coding methods, such as strength stereo, BBC (Binaual Cure Coding) and PS (Parametric-Stereo coding). In communications scenarios of medium and high code rates, the common encoding method is to extract the interchannel (for example, left and right channels) level difference (InterChannel Level Difference, ILD) (also known as CLD) and interchannel phase difference (InterChannel Phase Difference, IPD). In certain cases, the interrelation parameters of two channels and phase difference parameters between down-mixed signals and one of the channels may also be extracted. The parameters served as side information are encoded and sent to a decoding end, so as to restore a stereo signal. However, in communication scenarios with low code rates, ILD and IPD cannot be transmitted simultaneously. The ILD is required to be transmitted with priority. The ILD is encoded and sent to the decoding end to restore the stereo signal.
According to the preceding stereo encoding method, the corresponding stereo decoding method is as follows: extracting a monophonic bit signal from a code stream, obtaining a monophonic signal after decoding, and obtaining a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal; in the scenarios of medium and high code rates, extracting an ILD and IPD from the code stream, and obtain a left channel frequency-domain signal and a right channel frequency-domain signal according to the monophonic frequency-domain signal and ILD and IPD; in the scenarios of low code rates, extracting an ILD from the code stream, and obtain a left channel frequency-domain signal and a right channel frequency-domain signal according to the monophonic frequency-domain signal and ILD; and obtaining a left channel signal and a right channel signal after performing frequency-time conversion for the left channel frequency-domain signal and right channel frequency-domain signal, respectively.
The stereo decoding method in the communication scenario with low code rates refers to only the ILD to achieve the sound field effect. That is, the signal obtained by using the decoding method includes only the energy value information between two channels of signals, thereby causing poor effects of the stereo sound field of the left channel signal and right channel signal.
SUMMARY OF THE INVENTION
Embodiments of the present invention provide a stereo decoding method and apparatus.
An embodiment of the present invention provides a stereo decoding method. The method includes:
restoring a monophonic signal from a received code stream through decoding;
restoring an interchannel level difference, a group delay, and a group phase from the received code stream through decoding; and
processing the monophonic signal according to the interchannel level difference, group delay, and group phase to obtain a first channel signal and a second channel signal.
An embodiment of the present invention provides a stereo decoding apparatus. The apparatus includes:
a signal decoding module, configured to restore a monophonic signal from a received code stream through decoding;
a parameter decoding module, configured to restore an interchannel level difference, a group delay, and a group phase from the received code stream through decoding; and
a signal acquiring module, configured to process the monophonic signal according to the interchannel level difference, group delay, and group phase to obtain a first channel signal and a second channel signal.



BRIEF DESCRIPTION OF THE DRAWINGS
To better illustrate the technical solutions according to the present invention or in the prior art, the accompanying drawings used for describing the embodiments of the present invention or the prior art are briefly described in the following. Apparently, the accompanying drawings in the following description are merely about some embodiments of the present invention, and those skilled in the art can derive other drawings based on the accompanying drawings without creative efforts.
FIG. 1 is a flowchart of a stereo decoding method provided in a first embodiment of the present invention;
FIGS. 2a and 2b are flowcharts of a stereo decoding method provided in a second embodiment of the present invention;
FIGS. 3a and 3b are flowcharts of a stereo decoding method provided in a third embodiment of the present invention;
FIGS. 4a and 4b are flowcharts of a stereo decoding method provided in a fourth embodiment of the present invention;
FIGS. 5a and 5b are flowcharts of a stereo decoding method provided in a fifth embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a stereo decoding apparatus provided in a sixth embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a stereo decoding apparatus provided in a seventh embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a stereo decoding apparatus provided in an eighth embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a stereo decoding apparatus provided in a ninth embodiment of the present invention; and
FIG. 10 is a schematic structural diagram of a stereo decoding apparatus provided in a tenth embodiment of the present invention.



DETAILED DESCRIPTION OF THE EMBODIMENTS
The technical solutions according to the embodiments of the present invention are described clearly and completely with reference to accompanying drawings of the embodiments of the present invention. Evidently, the embodiments to be described below are merely some rather than all embodiments of the present invention. All other embodiments derived by those skilled in the art from the embodiments of the present invention without making any creative effort shall fall within the protection scope of the present invention.
FIG. 1 is a flowchart of a stereo decoding method provided in a first embodiment of the present invention. As shown in FIG. 1, the embodiment includes the following steps:
Step 100: Restore a monophonic signal from a received code stream through decoding.
Step 101: Restore an ILD, a group delay (group delay), and a group phase (group phase) from the received code stream through decoding.
The group delay indicates global sphere information of time delay of an envelope between two channels of signals, and the group phase indicates global information about waveform similarity of two channels of signals after time alignment.
Step 102: Process the monophonic signal according to the ILD, group delay, and group phase to obtain a first channel signal and a second channel signal.
The stereo decoding method provided in the embodiment is applicable to a communication scenario with a low code rate. The received code stream includes an encoded monophonic signal, and at least includes an encoded ILD, group delay, and group phase. The group delay and group phase occupy a few bandwidth resources and two global phases and similarity information are used to enhance sound field effect, thereby improving the sound field effect in the low code rate. According to the stereo decoding method provided in the embodiment, a first channel signal and a second channel signal are obtained according to the monophonic signal, ILD, group delay, and group phase, so that the obtained signal contains energy value information between two channels of signals by referring to the ILD, and the obtained signal contains global time delay information and global waveform similarity information between two channels of signals by referring to the group delay and the group phase, thereby yielding favorable stereo sound field effect for the obtained first channel signal and second channel signal.
The embodiment of the present invention may be applicable to a communication scenario with a low code rate. Specifically, on the basis of the first embodiment, step 102 may include: obtaining a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal; obtaining an IPD estimate value according to the group delay and group phase; processing the monophonic frequency-domain signal according to the ILD and the IPD estimate value to obtain a first channel frequency-domain signal and second channel frequency-domain signal; obtaining a first channel signal and second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and second channel frequency-domain signal, respectively. The following further describes the technical solution through second and third embodiments.
FIG. 2 is a flowchart of a stereo decoding method provided in a second embodiment of the present invention. In the embodiment, a first channel is a left channel, and a second channel is a right channel. As shown in FIG. 2, the embodiment includes the following steps:
Step 200: Restore a monophonic signal from a received code stream through decoding.
Specifically, a monophonic bit signal is extracted from the code stream, and is decoded by a monophonic signal (Mono) decoder to restore the monophonic signal. The monophonic signal is also called a down-mixed signal.
Step 201: Restore an ILD, a group delay, and a group phase from the received code stream through decoding.
The group delay is expressed as and dg′ the group phase is expressed as θg′. A sine signal sin(wt) becomes a sin(wt−Q) signal after the group phase. In sin(wt−Q)=sin (w(t−Q/w)), Q/w indicates the group phase (group phase). The group delay (group delay) is called an envelope delay. During signal transmission, the group delay indicates the speed at which a total phase shift changes with an angular frequency, that is, the slope of a phase-frequency characteristic curve. For an ordinary transmission system, a transmission function can be written as follows: H (jw)=A(w)−B(w), where A (w) indicates amplitude-frequency characteristic, and B (w) indicates phase-frequency characteristic: a derivative for w. t (w)=dB(w)/dw indicates the group delay of the transmission system.
Step 202: Obtain a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal.
Time-frequency conversion is performed for the monophonic signal to obtain the monophonic frequency-domain signal. The monophonic frequency-domain signal is expressed as M′(k).
Step 203: Obtain an IPD estimate value according to the group delay and group phase.
The group delay dg′ and group phase θg′ are restored from the code stream through decoding. The IPD estimate value is obtained by using the formula (1.1):




  
    
      
        
          
            IPD
            ′
          
          ⁡
          
            (
            k
            )
          
        
        =
        
          
            
              
                -
                2
              
              ⁢
              π
              ⁢
              
                
              
              ⁢
              
                d
                g
                ′
              
              *
              k
            
            N
          
          +
          
            θ
            g
            ′
          
        
      
    
    
      
        (
        1.1
        )
      
    
  




The frequency-domain signal is divided into a plurality of frequency bands. It is assumed that the frequency-domain signal is divided into M frequency bands, k indicates a frequency point index, b indicates a frequency band index, and N indicates a length of time-frequency conversion, where k=0, . . . , N−1, b=0, . . . , M−1. In formula (1.1), IPD′(k) indicates the IPD estimate value of a frequency point whose index is k.
Step 204: Process energy of the monophonic frequency-domain signal according to the ILD to obtain energy of a left channel frequency-domain signal and energy of a right channel frequency-domain signal.
Specifically, the following formulas (1.2) and (1.3) are used to obtain the energy |X′1(k)| of the left channel frequency-domain signal and the energy |X′2(k)| of the right channel frequency-domain signal:




  
    
      
        
          
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            
              c
              ⁡
              
                (
                b
                )
              
            
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        1.2
        )
      
    
  
  
    
      
        
          
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            1
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        1.3
        )
      
    
  




c(b)=10ILD′(b)/10, ILD′(b) indicates the ILD of a frequency band whose index is b, and |M′(k)| indicates the energy of the monophonic frequency-domain signal.
Step 205: Processing a phase of the monophonic frequency-domain signal according to the ILD and the IPD estimate value to obtain a phase of the left channel frequency-domain signal and a phase of the right channel frequency-domain signal.
Specifically, the following formulas (1.4) and (1.5) are used to obtain the phase ∠X′1(k) of the left channel frequency-domain signal and the phase ∠X′2(k) of the right channel frequency-domain signal:




  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            
              1
              
                1
                +
                
                  c
                  ⁡
                  
                    (
                    b
                    )
                  
                
              
            
            ⁢
            I
            ⁢
            
              
            
            ⁢
            P
            ⁢
            
              
            
            ⁢
            
              
                D
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        1.4
        )
      
    
  
  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
              
                1
                +
                
                  c
                  ⁡
                  
                    (
                    b
                    )
                  
                
              
            
            ⁢
            I
            ⁢
            
              
            
            ⁢
            P
            ⁢
            
              
            
            ⁢
            
              
                D
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        1.5
        )
      
    
  




∠M′(k) indicates the phase of the monophonic frequency-domain signal.
In the step, the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal are calculated by replacing the IPD with IP D′(k) obtained by using the group delay dg′ and the group phase θg′.
Step 206: According to the energy of the left channel frequency-domain signal and the energy of the right channel frequency-domain signal, and the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal, obtain the left channel frequency-domain signal and the right channel frequency-domain signal.
Specifically, the following formulas (1.6) and (1.7) are used to obtain the left channel frequency-domain signal X1′(k) and the right channel frequency-domain signal X2′(k):

X1′(k)=|X1′(X1(k)|*ej∠X1′(k)  (1.6)

X2′(k)=|X2′(k)|*ej∠X2′(k)  (1.7)

Step 207: Obtain a left channel output signal and a right channel output signal after performing frequency-time conversion for the left channel frequency-domain signal and the right channel frequency-domain signal, respectively.
The stereo decoding method provided in the embodiment is applicable to a communication scenario with a low code rate. The received code stream includes an encoded monophonic signal, and at least includes an encoded ILD, group delay, and group phase. The group delay and the group phase occupy a few bandwidth resources without affecting the code rate. According to the stereo decoding method provided in the embodiment, the energy of the left channel signal and the energy of the right channel signal are obtained by processing the energy of the monophonic frequency-domain signal according to the ILD, the phase of the left channel signal and the phase of the right channel signal are obtained by processing the phase of the monophonic frequency-domain signal according to the ILD and the IPD estimate value that is obtained through the group delay and group phase, so that the obtained signal contains not only the energy value information between two channels of signals but also contains time delay information and waveform similarity information between two channels of signals, thereby yielding favorable stereo sound field effect for the obtained left channel signal and right channel signal.
FIG. 3 is a flowchart of a stereo decoding method provided in a third embodiment of the present invention. In the embodiment, a first channel is a left channel, and a second channel is a right channel. As shown in FIG. 3, this embodiment includes the following steps:
Step 300: Restore a monophonic signal from a received code stream through decoding.
Specifically, a monophonic bit signal is extracted from the code stream, and is decoded by a monophonic signal (Mono) decoder to restore the monophonic signal. The monophonic signal is also called a down-mixed signal.
Step 301: Restore an ILD, a group delay, and a group phase from the received code stream through decoding.
The group delay is expressed as dg′ and the group phase is expressed as θg′.
Step 302: Obtain a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal.
Time-frequency conversion is performed for the monophonic signal to obtain the monophonic frequency-domain signal. The monophonic frequency-domain signal is expressed as M′(k).
Step 303: Obtain an IPD estimate value according to the group delay and group phase.
The group delay dg′ and the group phase θg′ are restored from the code stream through decoding. The IPD estimate value is obtained by using the formula (2.1):




  
    
      
        
          I
          ⁢
          
            
          
          ⁢
          P
          ⁢
          
            
          
          ⁢
          
            
              D
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            
              
                -
                2
              
              ⁢
              
                
              
              ⁢
              π
              ⁢
              
                
              
              ⁢
              
                d
                g
                ′
              
              *
              k
            
            N
          
          +
          
            θ
            g
            ′
          
        
      
    
    
      
        (
        2.1
        )
      
    
  




The frequency-domain signal is divided into a plurality of frequency bands. It is assumed that the frequency-domain signal is divided into M frequency bands, k indicates a frequency point index, b indicates a frequency band index, and N indicates a length of time-frequency conversion, where k=0, . . . , N−1, b=0, . . . , M−1. In formula (2.1), IPD′(k) indicates the IPD estimate value of a frequency point whose index is k.
Step 304: Processing energy of the monophonic frequency-domain signal according to the ILD to obtain energy of a left channel frequency-domain signal and energy of a right channel frequency-domain signal.
Specifically, the following formulas (2.2) and (2.3) are used to obtain the energy |X′1(k)| of the left channel frequency-domain signal and the energy |X′2(k)| of the right channel frequency-domain signal:




  
    
      
        
          
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            
              c
              ⁡
              
                (
                b
                )
              
            
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        2.2
        )
      
    
  
  
    
      
        
          
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            1
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        2.3
        )
      
    
  




c(b)=10ILD′(b)/10, ILD′(b) indicates the ILD of a frequency band whose index is b, and |M′(k)| indicates the energy of the monophonic frequency-domain signal.
Step 305: When the group delay is 0, process a phase of the monophonic frequency-domain signal according to the IPD estimate value to obtain a phase of the left channel frequency-domain signal and a phase of the right channel frequency-domain signal; when the group delay is not 0, process a phase of the monophonic frequency-domain signal according to the ILD and the IPD estimate value to obtain a phase of the left channel frequency-domain signal and a phase of the right channel frequency-domain signal.
Specifically, when dg′=0, the following formulas (2.4) and (2.5) are used to obtain the phase ∠X′1(k) of the left channel frequency-domain signal and the phase ∠X′2(k) of the right channel frequency-domain signal:

∠X′1(k)=∠M′(k)  (2.4)

∠X′2(k)=∠M′(k)−IPD′(k)  (2.5)

∠M′(k) indicates the phase of the monophonic frequency-domain signal.
When dg′=0, the phase of the left channel maintains the phase of the monophonic frequency-domain signal, while the phase of the right channel is a difference between the phase of the monophonic frequency-domain signal and IPD′(k) that is obtained through the group delay dg′ and the group phase θg′.
When dg′ the following formulas (2.6) and (2.7) are used to obtain the phase ∠X′1(k) of the left channel frequency-domain signal and the phase ∠X′2(k) of the right channel frequency-domain signal:




  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            
              1
              
                1
                +
                
                  c
                  (
                  
                    
                  
                  ⁢
                  b
                  )
                
              
            
            ⁢
            I
            ⁢
            
              
            
            ⁢
            P
            ⁢
            
              
            
            ⁢
            
              
                D
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        2.6
        )
      
    
  
  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          -
          
            
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
              
                1
                +
                
                  c
                  ⁡
                  
                    (
                    b
                    )
                  
                
              
            
            ⁢
            I
            ⁢
            
              
            
            ⁢
            P
            ⁢
            
              
            
            ⁢
            
              
                D
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        2.7
        )
      
    
  




When dg≈0, the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal are calculated by replacing the IPD with IPD′(k) that is obtained through the group delay dg′ and the group phase θg′.
Step 306: According to the energy of the left channel frequency-domain signal and the energy of the right channel frequency-domain signal, and the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal, obtain the left channel frequency-domain signal and the right channel frequency-domain signal.
Specifically, the following formulas (2.8) and (2.9) are used to obtain the left channel frequency-domain signal X1′(k) and the right channel frequency-domain signal X2′(k):

X1′(k)=|X1′(k)*ej∠X1′(k)  (2.8)

X2′(k)=′′X2′(k)|*ej∠X2′(k)  (2.9)

Step 307: Obtain a left channel output signal and a right channel output signal after performing frequency-time conversion for the left channel frequency-domain signal and the right channel frequency-domain signal, respectively.
The stereo decoding method provided in the embodiment is applicable to a communication scenario with a low code rate. The received code stream includes an encoded monophonic signal, and at least includes an encoded ILD, group delay, and group phase. The group delay and the group phase occupy a few bandwidth resources without affecting the code rate. According to the stereo decoding method provided in the embodiment, the energy of the left channel signal and the energy of the right channel signal are obtained by processing the energy of the monophonic frequency-domain signal according to the ILD; when the group delay is 0, the phase of the left channel signal and the phase of the right channel signal are obtained by processing the phase of the monophonic frequency-domain signal according to the IPD estimate value obtained through the group delay and the group phase; when the group delay is not 0, the phase of the left channel signal and the phase of the right channel signal are obtained by processing the phase of the monophonic frequency-domain signal according to the ILD and the IPD estimate value that is obtained through the group delay and the group phase; so that the obtained signal contains not only energy value information between two channels of signals but also contains time delay information and waveform similarity information between two channels of signals, thereby yielding favorable stereo sound field effect for the obtained left channel signal and right channel signal.
The embodiment of the present invention may be applicable to communication scenarios with medium and high code rates. Specifically, on the basis of the first embodiment, step 101 further includes restoring a differential value of an IPD from the received code stream through decoding, and step 102 may be specifically: processing the monophonic signal according to the ILD, the differential value of the IPD, the group delay, and the group phase to obtain a first channel signal and a second channel signal.
Specifically, step 103 may include: obtaining a monophonic frequency-domain signal after performing time-frequency conversion on the monophonic signal; obtaining an IPD estimate value according to the group delay and the group phase; obtaining an IPD according to the IPD estimate value and the differential value of the IPD; processing the monophonic frequency-domain signal according to the ILD and the IPD to obtain a first channel frequency-domain signal and a second channel frequency-domain signal; obtaining a first channel signal and a second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and the second channel frequency-domain signal, respectively. The following further describes the technical solution through fourth and fifth embodiments.
FIG. 4 is a flowchart of a stereo decoding method provided in a fourth embodiment of the present invention. In the embodiment, a first channel is a left channel, and a second channel is a right channel. As shown in FIG. 4, this embodiment includes the following steps:
Step 400: Restore a monophonic signal from a received code stream through decoding.
Specifically, a monophonic bit signal is extracted from the code stream, and is decoded by a monophonic signal (Mono) decoder to restore the monophonic signal. The monophonic signal is also called a down-mixed signal.
Step 401: Restore an ILD, a differential value of an IPD, a group delay, and a group phase from the received code stream through decoding.
The group delay is expressed as dg′ and the group phase is expressed as θg′.
Step 402: Obtain a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal.
Time-frequency conversion is performed for the monophonic signal to obtain the monophonic frequency-domain signal. The monophonic frequency-domain signal is expressed as M′(k).
Step 403: Obtain an IPD estimate value according to the group delay and group phase.
The group delay dg′ and the group phase θg′ are restored from the code stream through decoding. The IPD estimate value is obtained by using the formula (3.1):




  
    
      
        
          
            I
            ⁢
            
              
            
            ⁢
            P
            ⁢
            
              
            
            ⁢
            
              
                D
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          _
        
        =
        
          
            
              
                -
                2
              
              ⁢
              
                
              
              ⁢
              π
              ⁢
              
                
              
              ⁢
              
                d
                g
                ′
              
              *
              k
            
            N
          
          +
          
            θ
            g
            ′
          
        
      
    
    
      
        (
        3.1
        )
      
    
  




The frequency-domain signal is divided into a plurality of frequency bands. It is assumed that the frequency-domain signal is divided into M frequency bands, k indicates a frequency point index, b indicates a frequency band index, and N indicates a length of time-frequency conversion, where k=0, . . . , N−1, b=0, . . . , M−1. In formula (3.1), IPD′(k) indicates the IPD estimate value of a frequency point whose index is k.
Step 404: Obtain an IPD according to the differential value of the IPD and the IPD estimate value.
The differential value IPDdiff′(k) of the IPD is restored from the code stream through decoding. The IPD, expressed by IPD′(k), is obtained by adding IPDdiff′(k) and the IPD estimate value IPD′(k), as shown in the formula (3.2):

IPD′(k)=IPDdiff′(k)+IPD′(k)  (3.2)

Step 405: Process energy of the monophonic frequency-domain signal according to the ILD to obtain energy of a left channel frequency-domain signal and energy of a right channel frequency-domain signal.
Specifically, the following formulas (3.3) and (3.4) are used to obtain the energy |X′1(k)| of the left channel frequency-domain signal and the energy |X′2(k)| of the right channel frequency-domain signal:




  
    
      
        
          
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            
              c
              ⁡
              
                (
                b
                )
              
            
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        3.3
        )
      
    
  
  
    
      
        
          
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            1
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        3.4
        )
      
    
  




c(b)=10ILD′(b)/10, ILD′(b) indicates the ILD of a frequency band whose index is b, and |M′(k)| indicates the energy of the monophonic frequency-domain signal.
Step 406: Process a phase of the monophonic frequency-domain signal according to the ILD and the IPD to obtain a phase of the left channel frequency-domain signal and a phase of the right channel frequency-domain signal.
Specifically, the following formulas (3.5) and (3.6) are used to obtain the phase ∠X′1(k) of the left channel frequency-domain signal and the phase ∠X′2(k) of the right channel frequency-domain signal:




  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            
              1
              
                1
                +
                
                  c
                  (
                  
                    
                  
                  ⁢
                  b
                  )
                
              
            
            ⁢
            I
            ⁢
            
              
            
            ⁢
            P
            ⁢
            
              
            
            ⁢
            
              
                D
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        3.5
        )
      
    
  
  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          -
          
            
              1
              
                1
                +
                
                  c
                  (
                  
                    
                  
                  ⁢
                  b
                  )
                
              
            
            ⁢
            I
            ⁢
            
              
            
            ⁢
            P
            ⁢
            
              
            
            ⁢
            
              
                D
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        3.6
        )
      
    
  




∠M′(k) indicates the phase of the monophonic frequency-domain signal.
In the step, the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal are calculated out by using the IPD that is obtained through the differential value of the IPD and the IPD estimate value.
Step 407: According to the energy of the left channel frequency-domain signal and the energy of the right channel frequency-domain signal, and the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal, obtain the left channel frequency-domain signal and the right channel frequency-domain signal.
Specifically, the following formulas (3.7) and (3.8) are used to obtain the left channel frequency-domain signal X1′(k) and the right channel frequency-domain signal X2′(k):

X1′(k)=|X1′(k)*ej∠X1′(k)  (3.7)

X2′(k)=|X2(k)|*ej∠X2′(k)  (3.8)

Step 408: Obtain a left channel output signal and a right channel output signal after performing frequency-time conversion for the left channel frequency-domain signal and the right channel frequency-domain signal, respectively.
The stereo decoding method provided in the embodiment is applicable to communication scenarios with medium and high code rates. The received code stream includes an encoded monophonic signal, and includes an encoded ILD, an encoded differential value of the IPD, an encoded group delay, and an encoded group phase. The group delay and group phase occupy a few bandwidth resources without affecting the code rates. According to the stereo decoding method provided in the embodiment, the energy of the left channel signal and the energy of the right channel signal are obtained by processing the energy of the monophonic frequency-domain signal according to the ILD; the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal are calculated out by using the IPD, where the IPD is obtained from the differential value of the IPD and the IPD estimate value that is obtained through the group delay and group phase; so that the obtained signal contains not only energy value information between two channels of signals but also contains time delay information and waveform similarity information between two channels of signals, thereby yielding favorable stereo sound field effect for the obtained left channel signal and right channel signal.
FIG. 5 is a flowchart of a stereo decoding method provided in a fifth embodiment of the present invention. In the embodiment, a first channel is a left channel, and a second channel is a right channel. As shown in FIG. 5, the embodiment includes the following steps:
Step 500: Restore a monophonic signal from a received code stream through decoding.
Specifically, a monophonic bit signal is extracted from the code stream, and is decoded by a monophonic signal (Mono) decoder to restore the monophonic signal. The monophonic signal is also called a down-mixed signal.
Step 501: Restore an ILD, a differential value of an IPD, a group delay, and a group phase from the received code stream through decoding.
The group delay is expressed as dg′ and the group phase is expressed as θg′.
Step 502: Obtain a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal.
Time-frequency conversion is performed for the monophonic signal to obtain the monophonic frequency-domain signal. The monophonic frequency-domain signal is expressed as M′(k).
Step 503: Obtain an IPD estimate value according to the group delay and group phase.
The group delay dg′ and the group phase θg′ are restored from the code stream through decoding. The IPD estimate value is obtained by using the formula (4.1):




  
    
      
        
          
            
              IPD
              ′
            
            ⁡
            
              (
              k
              )
            
          
          _
        
        =
        
          
            
              
                -
                2
              
              ⁢
              π
              ⁢
              
                
              
              ⁢
              
                d
                g
                ′
              
              *
              k
            
            N
          
          +
          
            θ
            g
            ′
          
        
      
    
    
      
        (
        4.1
        )
      
    
  




The frequency-domain signal is divided into a plurality of frequency bands. It is assumed that the frequency-domain signal is divided into M frequency bands, k indicates a frequency point index, b indicates a frequency band index, and N indicates a length of time-frequency conversion, where k=0, . . . , N−1, b=0, . . . , M−1. In formula (4.1), IPD′(k) indicates the IPD estimate value of a frequency point whose index is k.
Step 504: Obtain an IPD according to the differential value of the IPD and the IPD estimate value.
The differential value IPDdiff′(k) of the IPD is restored from the code stream through decoding. The IPD, expressed by IPDdiff′(k), is obtained by adding IPD′(k) and the IPD estimate value IPD′(k), as shown in the formula (4.2):

IPD′(k)=IPDdiff′(k)+IPD′(k)  (4.2)

Step 505: Process energy of the monophonic frequency-domain signal according to the ILD to obtain energy of a left channel frequency-domain signal and energy of a right channel frequency-domain signal.
Specifically, the following formulas (4.3) and (4.4) are used to obtain the energy |X′1(k)| of the left channel frequency-domain signal and the energy |X′2(k)| of the right channel frequency-domain signal:




  
    
      
        
          
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            
              c
              ⁡
              
                (
                b
                )
              
            
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        4.3
        )
      
    
  
  
    
      
        
          
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
          
        
        =
        
          
            
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
            
          
          *
          
            1
            
              1
              +
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
            
          
        
      
    
    
      
        (
        4.4
        )
      
    
  




c(b)=10ILD′(b)/10, ILD′(b) indicates the ILD of a frequency band whose index is b, and |M′(k)| indicates the energy of the monophonic frequency-domain signal.
Step 506: When the group delay is 0, process a phase of the monophonic frequency-domain signal according to the ILD, IPD, and group phase to obtain a phase of the left channel frequency-domain signal and a phase of the right channel frequency-domain signal; when the group delay is not 0, process a phase of the monophonic frequency-domain signal according to the ILD and IPD to obtain a phase of the left channel frequency-domain signal and a phase of the right channel frequency-domain signal.
Specifically, when dg′=0, the following formulas (4.5) and (4.6) are used to obtain the phase ∠X′1(k) of the left channel frequency-domain signal and the phase ∠X′2(k) of the right channel frequency-domain signal:




  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            
              1
              
                1
                +
                
                  c
                  ⁡
                  
                    (
                    b
                    )
                  
                
              
            
            ⁢
            
              (
              
                
                  
                    IPD
                    ′
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
                -
                
                  θ
                  g
                  ′
                
              
              )
            
          
        
      
    
    
      
        (
        4.5
        )
      
    
  
  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            
              1
              
                1
                +
                
                  c
                  ⁡
                  
                    (
                    b
                    )
                  
                
              
            
            ⁢
            
              (
              
                
                  
                    IPD
                    ′
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
                -
                
                  θ
                  g
                  ′
                
              
              )
            
          
          -
          
            
              IPD
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
      
    
    
      
        (
        4.6
        )
      
    
  




∠M′(k) indicates the phase of the monophonic frequency-domain signal. The value range of IPD′(k)−θ′g is (−π, π].
When the following formulas (4.7) and (4.8) are used to obtain the phase ∠Y′1(k) of the left channel frequency-domain signal and the phase ∠X′2(k) of the right channel frequency-domain signal:




  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              1
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          +
          
            
              1
              
                1
                +
                
                  c
                  ⁡
                  
                    (
                    b
                    )
                  
                
              
            
            ⁢
            
              
                IPD
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        4.7
        )
      
    
  
  
    
      
        
          ∠
          ⁢
          
            
          
          ⁢
          
            
              X
              2
              ′
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            ∠
            ⁢
            
              
            
            ⁢
            
              
                M
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
          -
          
            
              
                c
                ⁡
                
                  (
                  b
                  )
                
              
              
                1
                +
                
                  c
                  ⁡
                  
                    (
                    b
                    )
                  
                
              
            
            ⁢
            
              
                IPD
                ′
              
              ⁡
              
                (
                k
                )
              
            
          
        
      
    
    
      
        (
        4.8
        )
      
    
  




When dg′≈0, the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal are calculated out by using the IPD that is obtained through the differential value of the IPD and the IPD estimate value.
Step 507: According to the energy of the left channel frequency-domain signal and the energy of the right channel frequency-domain signal, and the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal, obtain the left channel frequency-domain signal and the right channel frequency-domain signal.
Specifically, the following formulas (4.9) and (4.10) are used to obtain the left channel frequency-domain signal X1′(k) and the right channel frequency-domain signal X2′(k):

X1′(k)=|X1′(k)*ej∠X1′(k)  (4.9)

X2′(k)=′′X2′(k)|*ej∠X2′(k)  (4.10)

Step 508: Obtain a left channel output signal and a right channel output signal after performing frequency-time conversion for the left channel frequency-domain signal and the right channel frequency-domain signal, respectively.
The stereo decoding method provided in the embodiment is applicable to communication scenarios with medium and high code rates. The received code stream includes an encoded monophonic signal, and includes an encoded ILD, an encoded differential value of the IPD, an encoded group delay, and an encoded group phase. The group delay and the group phase occupy a few bandwidth resources without affecting the code rates. According to the stereo decoding method provided in the embodiment, the energy of the left channel signal and the energy of the right channel signal are obtained by processing the energy of the monophonic frequency-domain signal according to the ILD; when the group delay is 0, the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal are calculated out according to the ILD, IPD, and group phase; when the group delay is not 0, the phase of the left channel frequency-domain signal and the phase of the right channel frequency-domain signal are calculated out according to the ILD and IPD, where the IPD is obtained according to the differential value of the IPD and the IPD estimate value that is obtained through the group delay and group phase; so that the obtained signal contains not only energy value information between two channels of signals but also contains time delay information and waveform similarity information between two channels of signals, thereby yielding favorable stereo sound field effect for the obtained left channel signal and right channel signal.
FIG. 6 is a schematic structural diagram of a stereo decoding apparatus provided in a sixth embodiment of the present invention. As shown in FIG. 6, the embodiment specifically includes: a signal decoding module 11, a parameter decoding module 12, and a signal acquiring module 13, where
the signal decoding module 11 is configured to restore a monophonic signal from a received code stream through decoding;
the parameter decoding module 12 is configured to restore an ILD, a group delay, and a group phase from the received code stream through decoding; and
the signal acquiring module 13 is configured to process the monophonic signal according to the ILD, group delay, and group phase to obtain a first channel signal and a second channel signal.
Specifically, the signal decoding module 11 extracts a monophonic bit signal from the code stream, and restores the monophonic signal by decoding the monophonic bit signal; the parameter decoding module 12 restores the ILD, group delay, and group phase from the code stream through decoding; the signal acquiring module 13 processes the monophonic signal according to the ILD, group delay, and group phase to obtain the first channel signal and second channel signal.
The stereo decoding apparatus provided in the embodiment is applicable to a communication scenario with a low code rate. The received code stream includes an encoded monophonic signal, and includes an encoded ILD, an encoded group delay, and an encoded group phase. The group delay and group phase occupy a few bandwidth resources without affecting the code rate. According to the stereo decoding apparatus provided in the embodiment, the first channel signal and second channel signal are obtained according to the monophonic signal, ILD, group delay, and group phase, so that the obtained signal contains energy value information between two channels of signals by referring to the ILD, and the obtained signal contains time delay information and waveform similarity information between two channels of signals by referring to the group delay and group phase, thereby yielding favorable stereo sound field effect for the obtained first channel signal and second channel signal.
FIG. 7 is a schematic structural diagram of a stereo decoding apparatus provided in a seventh embodiment of the present invention. As shown in FIG. 7, on the basis of the sixth embodiment, in this embodiment, the signal acquiring module 13 further includes: a first processing sub module 14, a first phase difference acquiring sub module 15, a first frequency-domain signal acquiring sub module 16, and a first signal acquiring sub module 17, where:
the first processing sub module 14 is configured to obtain a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal;
the first phase difference acquiring sub module 15 is configured to obtain an IPD estimate value according to the group delay and group phase;
the first frequency-domain signal acquiring sub module 16 is configured to process the monophonic frequency-domain signal according to the ILD and the IPD estimate value to obtain a first channel frequency-domain signal and second channel frequency-domain signal; and
the first signal acquiring sub module 17 is configured to obtain the first channel signal and the second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and the second channel frequency-domain signal, respectively.
Specifically, the first processing sub module 14 obtains the monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal; the first phase difference acquiring sub module 15 may estimate the IPD estimate value according to the formula (1.1); the first frequency-domain signal acquiring sub module 16 processes the monophonic frequency-domain signal according to the ILD and the IPD estimate value to obtain the first channel frequency-domain signal and second channel frequency-domain signal; the first signal acquiring sub module 17 obtains the first channel signal and the second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and the second channel frequency-domain signal, respectively.
Further, the first frequency-domain signal acquiring sub module 16 may include a first energy acquiring unit 18 and a first phase acquiring unit 19, where:
the first energy acquiring unit 18 is configured to process energy of the monophonic frequency-domain signal according to the ILD to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal; and
the first phase acquiring unit 19 is configured to process a phase of the monophonic frequency-domain signal according to the ILD and the IPD estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.
Specifically, the first energy acquiring unit 18 may use the preceding formulas (1.2) and (1.3) to obtain the energy |X′1(k)| of the first channel frequency-domain signal and the energy |X′2(k)| of the second channel frequency-domain signal; the first phase acquiring unit 19 may use the preceding formulas (1.4) and (1.5) to obtain the phase ∠X′1(k) of the first channel frequency-domain signal and the phase ∠X′2(k) of the second channel frequency-domain signal.
FIG. 8 is a schematic structural diagram of a stereo decoding apparatus provided in an eighth embodiment of the present invention. As shown in FIG. 8, the difference between the embodiment and the seventh embodiment is that the first frequency-domain signal acquiring sub module includes a second energy acquiring unit 20 and a second phase acquiring unit 21.
The second energy acquiring unit 20 is configured to process energy of the monophonic frequency-domain signal according to the ILD to obtain energy of a first channel frequency-domain signal and energy of a second channel frequency-domain signal.
The second phase acquiring unit 21 is configured to: when the group delay is 0, process a phase of the monophonic frequency-domain signal according to the IPD estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal; when the group delay is not 0, process a phase of the monophonic frequency-domain signal according to the ILD and the IPD estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.
Specifically, the second energy acquiring unit 20 may use the preceding formulas (2.2) and (2.3) to obtain the energy |X′1(k)| of the first channel frequency-domain signal and the energy |X′2(k)| of the second channel frequency-domain signal; the second phase acquiring unit 21 may use the preceding formulas (2.4) and (2.5) or the preceding formulas (2.6) and (2.7) to obtain the phase ∠X′1(k) of the first channel frequency-domain signal and the phase ∠X′2 (k) of the second channel frequency-domain signal.
The stereo decoding apparatus shown in FIG. 7 or FIG. 8 is applicable to a communication scenario with a low code rate. The received code stream includes an encoded monophonic signal, and includes an encoded ILD, an encoded group delay, and an encoded group phase. The group delay and group phase occupy a few bandwidth resources without affecting the code rate. According to the stereo decoding apparatus shown in FIG. 7 or FIG. 8, the first channel signal and the second channel signal are obtained according to the monophonic signal, ILD, group delay, and group phase, so that the obtained signal contains energy value information between two channels of signals by referring to the ILD, and the obtained signal contains time delay information and waveform similarity information between two channels of signals by referring to the group delay and group phase, thereby yielding favorable stereo sound field effect for the obtained first channel signal and second channel signal.
FIG. 9 is a schematic structural diagram of a stereo decoding apparatus provided in a ninth embodiment of the present invention. As shown in FIG. 9, on the basis of the sixth embodiment, the parameter decoding module is further configured to restore a differential value of an IPD from the received code stream through decoding; the signal acquiring module 13 is specifically configured to process the monophonic signal according to the ILD, differential value of the IPD, group delay, and group phase to obtain a first channel signal and second channel signal.
Further, the signal acquiring module 13 may include:
a second processing sub module 22, configured to obtain a monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal;
a second phase difference acquiring sub module 23, configured to obtain an IPD estimate value according to the group delay and group phase;
a third phase difference acquiring sub module 24, configured to obtain an IPD according to the IPD estimate value and the differential value of the IPD;
a second frequency-domain signal acquiring sub module 25, configured to process the monophonic frequency-domain signal according to the ILD and IPD to obtain a first channel frequency-domain signal and second channel frequency-domain signal; and
a second signal acquiring sub module 26, configured to obtain a first channel signal and second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and second channel frequency-domain signal, respectively.
Specifically, the second processing sub module 22 obtains the monophonic frequency-domain signal after performing time-frequency conversion for the monophonic signal; the second phase difference acquiring sub module 23 may estimate the IPD estimate value according to the formula (3.1); the third phase difference acquiring sub module 24 may obtain the IPD by adding the differential value IPDdiff′(k) of the IPD and the IPD estimate value IPD′(k); the second frequency-domain signal acquiring sub module 25 process the monophonic frequency-domain signal according to the ILD and the IPD to obtain the first channel frequency-domain signal and second channel frequency-domain signal; the second signal acquiring sub module 26 obtains the first channel signal and the second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and the second channel frequency-domain signal, respectively.
Further, the second frequency-domain signal acquiring sub module 25 may include a third energy acquiring unit 27 and a third phase acquiring unit 28, where:
the third energy acquiring unit 27 is configured to process energy of the monophonic frequency-domain signal according to the ILD to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal; and
the third phase acquiring unit 28 is configured to process a phase of the monophonic frequency-domain signal according to the ILD and IPD to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.
Specifically, the third energy acquiring unit 27 may use the preceding formulas (3.3) and (3.4) to obtain the energy |X′1(k)| of the first channel frequency-domain signal and the energy |X′2(k)| of the second channel frequency-domain signal; the third phase acquiring unit 28 may use the preceding formulas (3.5) and (3.6) to obtain the phase ∠X′1(k) of the left channel frequency-domain signal and the phase ∠X′2(k) of the right channel frequency-domain signal.
FIG. 10 is a schematic structural diagram of a stereo decoding apparatus provided in a tenth embodiment of the present invention. As shown in FIG. 10, the difference between the embodiment and the ninth embodiment is that the second frequency-domain signal acquiring sub module 25 includes a fourth energy acquiring unit 29 and a fourth phase acquiring unit 30, where:
the fourth energy acquiring unit 29 is configured to process energy of the monophonic frequency-domain signal according to the ILD to obtain energy of a first channel frequency-domain signal and energy of a second channel frequency-domain signal; and
the fourth phase acquiring unit 30 is configured to: when the group delay is 0, process a phase of the monophonic frequency-domain signal according to the ILD, IPD, and group phase to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal; when the group delay is not 0, process a phase of the monophonic frequency-domain signal according to the ILD and IPD to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.
Specifically, the fourth energy acquiring unit 29 may use the preceding formulas (4.3) and (4.4) to obtain the energy |X′1(k)| of the first channel frequency-domain signal and the energy |X′2(k)| of the second channel frequency-domain signal; the fourth phase acquiring unit 30 may use the preceding formulas (4.5) and (4.6) or the preceding formulas (4.7) and (4.8) to obtain the phase ∠X′1(k) of the first channel frequency-domain signal and the phase ∠X′2(k) of the second channel frequency-domain signal.
The stereo decoding apparatus shown in FIG. 9 or FIG. 10 is applicable to communication scenarios with medium and high code rates. The received code stream includes an encoded monophonic signal, and includes an encoded ILD, an encoded differential value of the IPD, an encoded group delay, and an encoded group phase. The group delay and group phase occupy a few bandwidth resources without affecting the code rates. According to the stereo decoding apparatus shown in FIG. 9 or FIG. 10, a left channel signal and a right channel signal are obtained according to the monophonic signal, ILD, differential value of the IPD, group delay, and group phase, so that the obtained signal contains energy value information between two channels of signals by referring to the ILD, and the obtained signal contains time delay information and waveform similarity information between two channels of signals by referring to the group delay and group phase, thereby yielding favorable stereo sound field effect for the obtained left channel signal and right channel signal.
Those killed in the art can understand that all or part of the processes in the preceding method according to the embodiments may be implemented by using a computer program instructing relevant hardware. The program can be stored in a storage medium that can be read by a computer. When the program runs, the processes of each method embodiment in the above description may be included. The storage medium may be magnetic disk, compact disk, Read-Only Memory (ROM), or Random Access Memory (RAM).
Only several embodiments of the present invention are described above. Those skilled in the art can make various modifications and variations to the present invention on the basis of the disclosed content of the application above without departing from the spirit and scope of the present invention. Those skilled in the art can understand that the preceding embodiments or the features of different embodiments can combine to form new embodiments without conflicts.

## Claims

1. A stereo decoding method, implemented by a stereo decoding device, comprising:
decoding and restoring a monophonic signal from a received code stream;
decoding and restoring an interchannel level difference, a group delay, and a group phase from the received code stream; and
performing time-frequency conversion for the monophonic signal to obtain a monophonic frequency-domain signal;
obtaining an interchannel phase difference estimate value according to the group delay and the group phase;
processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain a first channel frequency-domain signal and a second channel frequency-domain signal; and
obtaining the first channel signal and the second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and the second channel frequency-domain signal, respectively.

2. The stereo decoding method according to claim 1, wherein the interchannel phase difference estimate value is obtained according to the group delay and the group phase by the following equation:




  
    
      
        IPD
        ′
      
      ⁡
      
        (
        k
        )
      
    
    =
    
      
        
          
            -
            2
          
          ⁢
          π
          ⁢
          
            
          
          ⁢
          
            d
            g
            ′
          
          *
          k
        
        N
      
      +
      
        θ
        g
        ′
      
    
  
  ;



wherein k indicates a frequency point index, dg′ indicates the group delay, θg′ indicates the group phase, N indicates a length of the time-frequency conversion.

3. The stereo decoding method according to claim 1, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal; and
processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.

4. The stereo decoding method according to claim 3, wherein the energy of the first channel frequency-domain signal is obtained by




  
    
      
      
        
          X
          1
          ′
        
        ⁡
        
          (
          k
          )
        
      
      
    
    =
    
      
        
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
        
      
      *
      
        
          c
          ⁡
          
            (
            b
            )
          
        
        
          1
          +
          
            c
            ⁡
            
              (
              b
              )
            
          
        
      
    
  
  ;




and
the energy of the second channel frequency-domain signal is obtained by





  
    
      
      
        
          X
          2
          ′
        
        ⁡
        
          (
          k
          )
        
      
      
    
    =
    
      
        
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
        
      
      *
      
        1
        
          1
          +
          
            c
            ⁡
            
              (
              b
              )
            
          
        
      
    
  
  ;



wherein |X′1(k)| is the energy of the first channel frequency-domain signal, |X′2(k)| is the energy of the second channel frequency-domain signal, c(b)=10ILD′(b)/10, ILD′(b) indicates the interchannel level difference of a frequency band whose index is b, and |M′(k)| indicates the energy of the monophonic frequency-domain signal.

5. The stereo decoding method according to claim 3, wherein the phase of the first channel frequency-domain signal is obtained by




  
    
      ∠
      ⁢
      
        
      
      ⁢
      
        
          X
          1
          ′
        
        ⁡
        
          (
          k
          )
        
      
    
    =
    
      
        ∠
        ⁢
        
          
        
        ⁢
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        
          1
          
            1
            +
            
              c
              ⁡
              
                (
                b
                )
              
            
          
        
        ⁢
        
          
            IPD
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
    
  
  ;




and
the phase of the second channel frequency-domain signal is obtained by





  
    
      ∠
      ⁢
      
        
      
      ⁢
      
        
          X
          2
          ′
        
        ⁡
        
          (
          k
          )
        
      
    
    =
    
      
        ∠
        ⁢
        
          
        
        ⁢
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        
          
            c
            ⁡
            
              (
              b
              )
            
          
          
            1
            +
            
              c
              ⁡
              
                (
                b
                )
              
            
          
        
        ⁢
        
          
            IPD
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
    
  
  ;



wherein ∠X′1(k) is the phase of the first channel frequency-domain signal, the ∠X′2(k) is the phase of the second channel frequency-domain signal, c(b)=10ILD′(b)/10, ILD′(b) indicates the interchannel level difference of a frequency band whose index is b, |M′(k)| indicates the energy of the monophonic frequency-domain signal, and IPD′(k) indicates the interchannel phase difference estimate value of a frequency point whose index is k.

6. The stereo decoding method according to claim 1, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal;
when the group delay is 0, processing a phase of the monophonic frequency-domain signal according to the interchannel phase difference estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal; and
when the group delay is not 0, processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and interchannel phase difference estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.

7. The stereo decoding method according to claim 1, further comprising:
restoring a differential value of an interchannel phase difference from the received code stream through decoding; and
wherein processing the monophonic signal according to the interchannel level difference, the group delay, and the group phase to obtain the first channel signal and the second channel signal comprises processing the monophonic signal according to the interchannel level difference, the differential value of the interchannel phase difference, the group delay, and the group phase to obtain the first channel signal and the second channel signal.

8. The stereo decoding method according to claim 7, wherein processing the monophonic signal according to the interchannel level difference, the differential value of the interchannel phase difference, the group delay, and the group phase to obtain the first channel signal and the second channel signal comprises:
obtaining an interchannel phase difference estimate value according to the group delay and group phase;
processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain the first channel frequency-domain signal and the second channel frequency-domain signal.

9. The stereo decoding method according to claim 8, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal; and
processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.

10. The stereo decoding method according to claim 8, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal;
when the group delay is 0, processing a phase of the monophonic frequency-domain signal according to the interchannel level difference, the interchannel phase difference, and the group delay to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal; and
when the group delay is not 0, processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.

11. A stereo decoding apparatus, comprising: a non-transitory computer readable medium storing a computer program such that when the computer program is executed by a hardware processor, the computer program instructs the hardware processor to perform operations of:
restoring a monophonic signal from a received code stream through decoding;
restoring an interchannel level difference, a group delay, and a group phase from the received code stream through decoding; and
performing time-frequency conversion for the monophonic signal to obtain a monophonic frequency-domain signal;
obtaining an interchannel phase difference estimate value according to the group delay and the group phase;
processing the monophonic frequency-domain signal according to the interchannel level difference and interchannel phase difference estimate value to obtain a first channel frequency-domain signal and a second channel frequency-domain signal; and
obtaining the first channel signal and the second channel signal after performing frequency-time conversion for the first channel frequency-domain signal and the second channel frequency-domain signal, respectively.

12. The stereo decoding apparatus according to claim 11, wherein the interchannel phase difference estimate value is obtained according to the group delay and the group phase by the following equation:




  
    
      
        IPD
        ′
      
      ⁡
      
        (
        k
        )
      
    
    =
    
      
        
          
            -
            2
          
          ⁢
          π
          ⁢
          
            
          
          ⁢
          
            d
            g
            ′
          
          *
          k
        
        N
      
      =
      
        θ
        g
        ′
      
    
  
  ;



wherein k indicates a frequency point index, dg′ indicates the group delay, θg′ indicates the group phase, N indicates a length of the time-frequency conversion.

13. The stereo decoding apparatus according to claim 11, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal; and
processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.

14. The stereo decoding apparatus according to claim 13, wherein the energy of the first channel frequency-domain signal is obtained by




  
    
      
      
        
          X
          1
          ′
        
        ⁡
        
          (
          k
          )
        
      
      
    
    =
    
      
        
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
        
      
      *
      
        
          c
          ⁡
          
            (
            b
            )
          
        
        
          1
          +
          
            c
            ⁡
            
              (
              b
              )
            
          
        
      
    
  
  ;




and
the energy of the second channel frequency-domain signal is obtained by





  
    
      
      
        
          X
          2
          ′
        
        ⁡
        
          (
          k
          )
        
      
      
    
    =
    
      
        
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
        
      
      *
      
        1
        
          1
          +
          
            c
            ⁡
            
              (
              b
              )
            
          
        
      
    
  
  ;



wherein |X′1(k)| is the energy of the first channel frequency-domain signal, |X′2(k)| is the energy of the second channel frequency-domain signal, c(b)=10ILD′(b)/10, ILD′(b) indicates the interchannel level difference of a frequency band whose index is b, and |M′(k)| indicates the energy of the monophonic frequency-domain signal.

15. The stereo decoding apparatus according to claim 13, wherein the phase of the first channel frequency-domain signal is obtained by




  
    
      ∠
      ⁢
      
        
      
      ⁢
      
        
          X
          1
          ′
        
        ⁡
        
          (
          k
          )
        
      
    
    =
    
      
        ∠
        ⁢
        
          
        
        ⁢
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
      +
      
        
          1
          
            1
            +
            
              c
              ⁡
              
                (
                b
                )
              
            
          
        
        ⁢
        
          
            IPD
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
    
  
  ;




and
the phase of the second channel frequency-domain signal is obtained by





  
    
      ∠
      ⁢
      
        
      
      ⁢
      
        
          X
          2
          ′
        
        ⁡
        
          (
          k
          )
        
      
    
    =
    
      
        ∠
        ⁢
        
          
        
        ⁢
        
          
            M
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
      -
      
        
          
            c
            ⁡
            
              (
              b
              )
            
          
          
            1
            +
            
              c
              ⁡
              
                (
                b
                )
              
            
          
        
        ⁢
        
          
            IPD
            ′
          
          ⁡
          
            (
            k
            )
          
        
      
    
  
  ;



wherein ∠X′1(k) is the phase of the first channel frequency-domain signal, the ∠X′2(k) is the phase of the second channel frequency-domain signal, c(b)=10ILD′(b)/10, ILD′(b) indicates the interchannel level difference of a frequency band whose index is b, |M′(k)| indicates the energy of the monophonic frequency-domain signal, and IPD′(k) indicates the interchannel phase difference estimate value of a frequency point whose index is k.

16. The stereo decoding apparatus according to claim 11, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal;
when the group delay is 0, processing a phase of the monophonic frequency-domain signal according to the interchannel phase difference estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal; and
when the group delay is not 0, processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference estimate value to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.

17. The stereo decoding apparatus according to claim 11, the operations further comprises:
restoring a differential value of the interchannel phase difference from the received code stream through decoding; and
wherein processing the monophonic signal according to the interchannel level difference, the group delay, and the group phase to obtain the first channel signal and the second channel signal comprises processing the monophonic signal according to the interchannel level difference, the differential value of the interchannel phase difference, the group delay, and the group phase to obtain the first channel signal and the second channel signal.

18. The stereo decoding apparatus according to claim 17, wherein processing the monophonic signal according to the interchannel level difference, the differential value of the interchannel phase difference, the group delay, and the group phase to obtain the first channel signal and the second channel signal comprises:
obtaining an interchannel phase difference estimate value according to the group delay and group phase;
processing the monophonic frequency-domain signal according to the interchannel level difference and interchannel phase difference to obtain a first channel frequency-domain signal and a second channel frequency-domain signal.

19. The stereo decoding apparatus according to claim 18, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal; and
processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.

20. The stereo decoding apparatus according to claim 18, wherein processing the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain the first channel frequency-domain signal and the second channel frequency-domain signal comprises:
processing energy of the monophonic frequency-domain signal according to the interchannel level difference to obtain energy of the first channel frequency-domain signal and energy of the second channel frequency-domain signal;
when the group delay is 0, processing a phase of the monophonic frequency-domain signal according to the interchannel level difference, the interchannel phase difference, and the group delay to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal; and
when the group delay is not 0, processing a phase of the monophonic frequency-domain signal according to the interchannel level difference and the interchannel phase difference to obtain a phase of the first channel frequency-domain signal and a phase of the second channel frequency-domain signal.