Abstract:
Disclosed is an encoding device that improves the quality of a decoded signal in a hierarchical coding (scalable coding) method, wherein a band to be quantized is selected for every level (layer). The encoding device ( 101 ) is equipped with a second layer encoding unit ( 205 ) that selects a first band to be quantized of a first input signal from among a plurality of sub-bands, and that generates second layer encoding information containing first band information of said band; a second layer decoding unit ( 206 ) that generates a first decoded signal using the second layer encoding information; an addition unit ( 207 ) that generates a second input signal using the first input signal and the first decoded signal; and a third layer encoding unit ( 208 ) that selects a second band to be quantized of the second input signal using the first decoded signal, and that generates third layer encoding information.

Description:
TECHNICAL FIELD 
       [0001]    The present invention relates to a coding apparatus, a decoding apparatus, and method thereof, which are used in a communication system that encodes and transmits a signal. 
       BACKGROUND ART 
       [0002]    When a speech/audio signal is transmitted in a packet communication system typified by Internet communication, a mobile communication system, or the like, compression/encoding technology is often used in order to increase speech/audio signal transmission efficiency. Also, recently, there is a growing need for technologies of simply encoding speech/audio signals at a low bit rate and encoding speech/audio signals of a wider band. 
         [0003]    Various technologies of integrating plural coding technologies in a hierarchical manner have been developed for the needs. For example, Non-Patent Literature 1 disclosed a technique of encoding a spectrum (MDCT (Modified Discrete Cosine Transform) coefficient) of a desired frequency band in the hierarchical manner using TwinVQ (Transform Domain Weighted Interleave Vector Quantization) in which a basic constituting unit is modularized. Simple scalable encoding having a high degree of freedom can be implemented by common use of the module plural times. In the technique, a sub-band that becomes a coding target of each hierarchy (layer) is basically a predetermined configuration. At the same time, there is also disclosed a configuration in which a position of the sub-band that becomes the coding target of each hierarchy (layer) is varied in a predetermined band according to a characteristic of an input signal. 
       CITATION LIST 
     Non-Patent Literature 
       [0000]    
       
         NPTL 1 
         Akio Kami et al., “Scalable Audio Coding Based on Hierarchical Transform Coding Modules”, Transaction of Institute of Electronics and Communication Engineers of Japan, A, Vol. J83-A, No. 3, pp. 241-252, March, 2000 
       
     
       SUMMARY OF INVENTION 
     Technical Problem 
       [0006]    However, in Non-Patent Literature 1, the position of the sub-band that becomes the quantization target is previously fixed in each hierarchy (layer), and a coding result (quantized band) in a lower hierarchy that is previously encoded is not utilized. Therefore, unfortunately a coding accuracy is not enhanced too much in consideration of the whole hierarchies. Additionally, a candidate of the position of the sub-band that becomes the quantization target in each hierarchy is restricted to not the whole band but a predetermined band, and the sub-band having large residual energy is not possibly selected as the quantization target in a certain hierarchy (layer). As a result, unfortunately the quality of the generated decoded speech becomes insufficient. 
         [0007]    The object of the present invention is to provide a coding apparatus, a decoding apparatus, and method thereof being able to improve the quality of the decoded signal in the hierarchical encoding (scalable encoding) scheme in which the band of the quantization target is selected in each hierarchy (layer). 
       Solution to Problem 
       [0008]    A coding apparatus of the present invention that includes at least two coding layers includes: a first layer coding section that inputs a first input signal of a frequency domain thereto, selects a first quantization target band of the first input signal from a plurality of sub-bands into which the frequency domain is divided, encodes the first input signal of the first quantization target band to generate first coded information including first band information on the first quantization target band, generates a first decoded signal using the first coded information, and generates a second input signal using the first input signal and the first decoded signal; and a second layer coding section that inputs the second input signal and the first decoded signal or the first coded information thereto, selects a second quantization target band of the second input signal from the plurality of sub-bands using the first decoded signal or the first coded information, encodes the second input signal of the second quantization target band, and generates second coded information including second band information on the second quantization target band. 
         [0009]    A decoding apparatus of the present invention that receives and decodes information generated by a coding apparatus including at least two coding layers includes: a receiving section that receives the information including first coded information and second coded information, the first coded information being obtained by encoding a first layer of the coding apparatus, the first coded information including first band information generated by selecting a first quantization target band of the first layer from a plurality of sub-bands into which a frequency domain is divided, the second coded information being obtained by encoding a second layer of the coding apparatus using a first layer decoded signal that is generated using the first coded information, the second coded information including second band information generated by selecting a second quantization target band of the second layer from the plurality of sub-bands; a first layer decoding section that inputs the first coded information obtained from the information thereto, and generates a first decoded signal with respect to the first quantization target band set based on the first band information included in the first coded information; and a second layer decoding section that inputs the second coded information obtained from the information, and generates a second decoded signal with respect to the second quantization target band set based on the second band information included in the second coded information. 
         [0010]    A coding method of the present invention for performing encoding in at least two coding layers includes: a first layer encoding step of inputting a first input signal of a frequency domain thereto, selecting a first quantization target band of the first input signal from a plurality of sub-bands into which the frequency domain is divided, encoding the first input signal of the first quantization target band to generate first coded information including first band information on the first quantization target band, generating a first decoded signal using the first coded information, and generating a second input signal using the first input signal and the first decoded signal; and a second layer encoding step of inputting the second input signal and the first decoded signal or the first coded information thereto, selecting a second quantization target band of the second input signal from the plurality of sub-bands using the first decoded signal or the first coded information, encoding the second input signal of the second quantization target band, and generating second coded information including second band information on the second quantization target band. 
         [0011]    A decoding method of the present invention for receiving and decoding information generated by a coding apparatus including at least two coding layers includes: a receiving step of receiving the information including first coded information and second coded information, the first coded information being obtained by encoding a first layer of the coding apparatus, the first coded information including first band information generated by selecting a first quantization target band of the first layer from a plurality of sub-bands into which a frequency domain is divided, the second coded information being obtained by encoding a second layer of the coding apparatus using a first layer decoded signal that is generated using the first coded information, the second coded information including second band information generated by selecting a second quantization target band of the second layer from the plurality of sub-bands; a first layer decoding step of inputting the first coded information obtained from the information thereto, and generating a first decoded signal with respect to the first quantization target band set based on the first band information included in the first coded information; and a second layer decoding step of inputting the second coded information obtained from the information, and generating a second decoded signal with respect to the second quantization target band set based on the second band information included in the second coded information. 
       Advantageous Effects of Invention 
       [0012]    According to the invention, in the hierarchy coding scheme (scalable encoding) in which the band of the quantization target is selected in each hierarchy (layer), the perceptually important band can be encoded in each layer by selecting the quantization target band of the current layer based on the coding result (quantized band) of the lower layer, and therefore the quality of the decoded signal can be improved. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0013]      FIG. 1  is a block diagram illustrating a configuration of a communication system including a coding apparatus and a decoding apparatus according to Embodiment 1 of the invention; 
           [0014]      FIG. 2  is a block diagram illustrating a main configuration of the coding apparatus in  FIG. 1 ; 
           [0015]      FIG. 3  is a block diagram illustrating a main configuration of a second layer coding section in  FIG. 2 ; 
           [0016]      FIG. 4  is a block diagram illustrating a main configuration of a band selecting section in  FIG. 3 ; 
           [0017]      FIG. 5  is a view illustrating a configuration of a region according to Embodiment 1; 
           [0018]      FIG. 6  is a block diagram illustrating a main configuration of a second layer decoding section in  FIG. 2 ; 
           [0019]      FIG. 7  is a block diagram illustrating a main configuration of a third layer coding section in  FIG. 2 ; 
           [0020]      FIG. 8  is a block diagram illustrating a configuration of a band selecting section in  FIG. 7 ; 
           [0021]      FIG. 9  is a block diagram illustrating a main configuration of the decoding apparatus in  FIG. 1 ; and 
           [0022]      FIG. 10  is a block diagram illustrating a main configuration of a band selecting section of a third layer coding section according to Embodiment 2 of the invention. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0023]    Referring to the drawings, one embodiment of the present invention will be described in detail. A speech coding apparatus and a speech decoding apparatus are described as examples of the coding apparatus and decoding apparatus of the invention. 
       Embodiment 1 
       [0024]      FIG. 1  is a block diagram illustrating a configuration of a communication system including a coding apparatus and a decoding apparatus according to Embodiment 1 of the invention. In  FIG. 1 , the communication system includes coding apparatus  101  and decoding apparatus  103 , and coding apparatus  101  and decoding apparatus  103  can conduct communication with each other through transmission line  102 . Herein, coding apparatus  101  and decoding apparatus  103  are usually mounted in a base station apparatus, a communication terminal apparatus, and the like for use. 
         [0025]    Coding apparatus  101  divides an input signal into respective N samples (N is a natural number), and performs encoding in each frame with the N samples as one frame. At this point, it is assumed that x(n) is the input signal that becomes a coding target. n (n=0, . . . , N−1) expresses an (n+1)th signal element in the input signal that is divided every N samples. Coding apparatus  101  transmits encoded input information (hereinafter referred to as “coded information”) to decoding apparatus  103  through transmission line  102 . 
         [0026]    Decoding apparatus  103  receives the coded information that is transmitted from coding apparatus  101  through transmission line  102 , and decodes the coded information to obtain an output signal. 
         [0027]      FIG. 2  is a block diagram illustrating a main configuration of coding apparatus  101  in  FIG. 1 . For example, it is assumed that coding apparatus  101  is a hierarchical coding apparatus including four encoding hierarchies (layers). Hereinafter, it is assumed that the four layers are referred to as a first layer, a second layer, a third layer, and a fourth layer in the ascending order of a bit rate. 
         [0028]    For example, first layer coding section  201  encodes the input signal by a CELP (Code Excited Linear Prediction) speech coding method to generate first layer coded information, and outputs the generated first layer coded information to first layer decoding section  202  and coded information integration section  212 . 
         [0029]    For example, first layer decoding section  202  decodes the first layer coded information, which is input from first layer coding section  201 , by the CELP speech decoding method to generate a first layer decoded signal, and outputs the generated first layer decoded signal to adder  203 . 
         [0030]    Adder  203  adds the first layer decoded signal to the input signal while inverting a polarity of the first layer decoded signal, thereby calculating a difference signal between the input signal and the first layer decoded signal. Then, adder  203  outputs the obtained difference signal as a first layer difference signal to orthogonal transform processing section  204 . 
         [0031]    Orthogonal transform processing section  204  includes buffer buf 1 ( n )(n=0, . . . , N−1) therein, and converts first layer difference signal x 1 ( n ) into a frequency domain parameter (frequency domain signal) by performing an MDCT (Modified Discrete Cosine Transform) to first layer difference signal x 1 ( n ) 
         [0032]    An orthogonal transform processing in orthogonal transform processing section  204 , namely, an orthogonal transform processing calculating procedure and data output to an internal buffer will be described below. 
         [0033]    Orthogonal transform processing section  204  initializes buffer buf 1 ( n ) to an initial value “0” by the following equation (1). 
         [0000]      [1] 
         [0000]        buf 1( n )=0 ( n= 0 , . . . ,N− 1)  (Equation 1)
 
         [0034]    Then orthogonal transform processing section  204  performs the Modified Discrete Cosine Transform (MDCT) to the first layer difference signal x 1 ( n ) according to the following equation (2), and obtains an MDCT coefficient (hereinafter referred to as a “first layer difference spectrum”) X 1 ( k ) of the first layer difference signal x 1 ( n ). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   2 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       X 
                        
                       
                           
                       
                        
                       1 
                        
                       
                         ( 
                         k 
                         ) 
                       
                     
                     = 
                     
                       
                         2 
                         N 
                       
                        
                       
                         
                           ∑ 
                           
                             n 
                             = 
                             0 
                           
                           
                             
                               2 
                                
                               N 
                             
                             - 
                             1 
                           
                         
                          
                         
                           x 
                            
                           
                               
                           
                            
                           
                             1 
                             ′ 
                           
                            
                           
                             ( 
                             n 
                             ) 
                           
                            
                           
                             cos 
                              
                             
                               [ 
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         2 
                                          
                                         n 
                                       
                                       + 
                                       1 
                                       + 
                                       N 
                                     
                                     ) 
                                   
                                    
                                   
                                     ( 
                                     
                                       
                                         2 
                                          
                                         k 
                                       
                                       + 
                                       1 
                                     
                                     ) 
                                   
                                    
                                   π 
                                 
                                 
                                   4 
                                    
                                   N 
                                 
                               
                               ] 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ( 
                     
                       
                         k 
                         = 
                         0 
                       
                       , 
                       … 
                        
                       
                           
                       
                       , 
                       
                         N 
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     2 
                   
                   ) 
                 
               
             
           
         
       
     
         [0035]    Where k is an index of each sample in one frame. Using the following equation (3), orthogonal transform processing section  204  obtains x 1 ′(n) that is a vector formed by coupling the first layer difference signal x 1 ( n ) and buffer buf 1 ( n ). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   3 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     x 
                      
                     
                         
                     
                      
                     
                       1 
                       ′ 
                     
                      
                     
                       ( 
                       n 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           
                               
                              
                             
                               buf 
                                
                               
                                   
                               
                                
                               1 
                                
                               
                                 ( 
                                 n 
                                 ) 
                               
                             
                           
                         
                         
                           
                               
                              
                             
                               ( 
                               
                                 
                                   n 
                                   = 
                                   0 
                                 
                                 , 
                                 
                                   
                                     ⋯ 
                                      
                                     
                                         
                                     
                                      
                                     N 
                                   
                                   - 
                                   1 
                                 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           
                               
                              
                             
                               x 
                                
                               
                                   
                               
                                
                               1 
                                
                               
                                 ( 
                                 
                                   n 
                                   - 
                                   N 
                                 
                                 ) 
                               
                             
                           
                         
                         
                           
                               
                              
                             
                               ( 
                               
                                 
                                   n 
                                   = 
                                   N 
                                 
                                 , 
                                 
                                   
                                     ⋯ 
                                      
                                     
                                         
                                     
                                      
                                     2 
                                      
                                     N 
                                   
                                   - 
                                   1 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     3 
                   
                   ) 
                 
               
             
           
         
       
     
         [0036]    Then, orthogonal transform processing section  204  updates buffer buf 1 ( n ) using the following equation (4). 
         [0000]      [4] 
         [0000]        buf 1( n )= x 1( n ) ( n= 0 , . . . ,N− 1)  (Equation 4)
 
         [0037]    Orthogonal transform processing section  204  outputs the first layer difference spectrum X 1 ( k ) to second layer coding section  205  and adder  207 . 
         [0038]    Second layer coding section  205  generates second layer coded information using the first layer difference spectrum X 1 ( k ) input from orthogonal transform processing section  204 , and outputs the generated second layer coded information to second layer decoding section  206  and coded information integration section  212 . The details of second layer coding section  205  will be described later. 
         [0039]    Second layer decoding section  206  decodes the second layer coded information input from second layer coding section  205 , and calculates a second layer decoded spectrum. Second layer decoding section  206  outputs the generated second layer decoded spectrum to adder  207  and third layer coding section  208 . The details of second layer decoding section  206  will be described later. 
         [0040]    Adder  207  adds the second layer decoded spectrum to the first layer difference spectrum while inverting the polarity of the second layer decoded spectrum, thereby calculating a difference spectrum between the first layer difference spectrum and the second layer decoded spectrum. Then, adder  207  outputs the obtained difference spectrum as a second layer difference spectrum to third layer coding section  208  and adder  210 . 
         [0041]    Third layer coding section  208  generates third layer coded information using the second layer decoded spectrum input from second layer decoding section  206  and the second layer difference spectrum input from adder  207 , and outputs the generated third layer coded information to third layer decoding section  209  and coded information integration section  212 . The details of third layer coding section  208  will be described later. 
         [0042]    Third layer decoding section  209  decodes the third layer coded information input from third layer coding section  208 , and calculates a third layer decoded spectrum. Third layer decoding section  209  outputs the generated third layer decoded spectrum to adder  210  and fourth layer coding section  211 . The details of third layer decoding section  209  will be described later. 
         [0043]    Adder  210  adds the third layer decoded spectrum to the second layer difference spectrum while inverting the polarity of the third layer decoded spectrum, thereby calculating a difference spectrum between the second layer difference spectrum and the third layer decoded spectrum. Then, adder  210  outputs the obtained difference spectrum as a third layer difference spectrum to fourth layer coding section  211 . 
         [0044]    Fourth layer coding section  211  generates fourth layer coded information using the third layer decoded spectrum input from third layer decoding section  209  and third layer difference spectrum input from adder  210 , and outputs the generated fourth layer coded information to coded information integration section  212 . The details of fourth layer coding section  211  will be described later. 
         [0045]    Coded information integration section  212  integrates the first layer coded information input from first layer coding section  201 , the second layer coded information input from second layer coding section  205 , the third layer coded information input from third layer coding section  208 , and the fourth layer coded information input from fourth layer coding section  211 , and if necessary, coded information integration section  212  attaches a transmission error code and the like to the integrated information source code, and outputs the result to transmission line  102  as coded information. 
         [0046]      FIG. 3  is a block diagram illustrating a main configuration of second layer coding section  205 . 
         [0047]    In  FIG. 3 , second layer coding section  205  includes band selecting section  301 , shape coding section  302 , adaptive prediction determination section  303 , gain coding section  304 , and multiplexing section  305 . 
         [0048]    Band selecting section  301  divides the first layer difference spectrum input from orthogonal transform processing section  204  into plural sub-bands, selects a band (quantization target band) that becomes a quantization target from the plural sub-bands, and outputs band information indicating the selected band to shape coding section  302 , adaptive prediction determination section  303 , and multiplexing section  305 . Band selecting section  301  outputs the first layer difference spectrum to shape coding section  302 . As to the input of the first layer difference spectrum to shape coding section  302 , the first layer difference spectrum may directly be input from orthogonal transform processing section  204  to shape coding section  302  irrespective of the input of the first layer difference spectrum from orthogonal transform processing section  204  to band selecting section  301 . The details of processing of band selecting section  301  will be described later. 
         [0049]    Using the spectrum (MDCT coefficient) corresponding to the band indicated by the band information input from band selecting section  301  in the first layer difference spectrum input from band selecting section  301 , shape coding section  302  encodes the shape information to generate shape coded information, and outputs the generated shape coded information to multiplexing section  305 . Shape coding section  302  obtains an ideal gain (gain information) that is calculated during shape encoding, and outputs the obtained ideal gain to gain coding section  304 . The details of processing of shape coding section  302  will be described later. 
         [0050]    Adaptive prediction determination section  303  includes an internal buffer in which the input from band selecting section  301  in the past is stored. Adaptive prediction determination section  303  obtains the number of sub-bands common to both the quantization target band of the current frame and the quantization target band of the past frame using the band information input from band selecting section  301 . Adaptive prediction determination section  303  determines that predictive coding is performed to the spectrum (MDCT coefficient) of the quantization target band indicated by the band information when the number of common sub-bands is more than a predetermined value. On the other hand, when the number of common sub-bands is less than the predetermined value, adaptive prediction determination section  303  determines that the predictive coding is not performed to the spectrum (MDCT coefficient) of the quantization target band indicated by the band information (that is, encoding to which prediction is not applied is performed). Adaptive prediction determination section  303  outputs the determination result to gain coding section  304 . The details of processing of adaptive prediction determination section  303  will be described later. 
         [0051]    The ideal gain from shape coding section  302  and the determination result from adaptive prediction determination section  303  are input to gain coding section  304 . When the determination result input from adaptive prediction determination section  303  indicates that the predictive coding is performed, gain coding section  304  performs the predictive coding to the ideal gain, which is input from shape coding section  302 , to obtain the gain coded information using a quantized gain value of the past frame stored in a built-in buffer, and a built-in gain code book. On the other hand, when the determination result input from adaptive prediction determination section  303  indicates that the predictive coding is not performed, gain coding section  304  directly quantizes the ideal gain input from shape coding section  302  (that is, quantizes the ideal gain without applying the prediction) to obtain the gain coded information. Gain coding section  304  outputs the obtained gain coded information to multiplexing section  305 . The details of processing of gain coding section  304  will be described later. 
         [0052]    Multiplexing section  305  multiplexes the band information input from band selecting section  301 , the shape coded information input from shape coding section  302 , and the gain coded information input from gain coding section  304 , and outputs an obtained bit stream as the second layer coded information to second layer decoding section  206  and coded information integration section  212 . 
         [0053]    Second layer coding section  205  having the above configuration is operated as follows. 
         [0054]      FIG. 4  is a block diagram illustrating a main configuration of band selecting section  301 . 
         [0055]    In  FIG. 4 , band selecting section  301  mainly includes sub-band energy calculating section  401  and band determination section  402 . 
         [0056]    The first layer difference spectrum X 1 ( k ) is input to sub-band energy calculating section  401  from orthogonal transform processing section  204 . 
         [0057]    Sub-band energy calculating section  401  divides the first layer difference spectrum X 1 ( k ) into the plural sub-bands. The case that the first layer difference spectrum X 1 ( k ) is equally divided into J (J is a natural number) sub-bands will be described by way of example. Sub-band energy calculating section  401  selects consecutive L (L is a natural number) sub-bands in the J sub-bands to obtain M (M is a natural number) kinds of groups of the sub-bands. Hereinafter, the M kinds of groups of the sub-bands are referred to as a region. 
         [0058]      FIG. 5  is a view illustrating a configuration of a region obtained in sub-band energy calculating section  401 . 
         [0059]    In  FIG. 5 , the number of sub-bands is 17 (J=17), the number of kinds of the regions is 8 (M=8), and consecutive  5  (L=5) sub-bands constitute each region. For example, region  4  includes sub-bands  6  to  10 . 
         [0060]    Then, sub-band energy calculating section  401  calculates average energy E 1 ( m ) in each of the M kinds of regions according to the following equation (5). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   5 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       E 
                        
                       
                           
                       
                        
                       1 
                        
                       
                         ( 
                         m 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ∑ 
                           
                             j 
                             = 
                             
                               S 
                                
                               
                                 ( 
                                 m 
                                 ) 
                               
                             
                           
                           
                             
                               S 
                                
                               
                                 ( 
                                 m 
                                 ) 
                               
                             
                             + 
                             L 
                             - 
                             1 
                           
                         
                          
                         
                           
                             ∑ 
                             
                               k 
                               = 
                               
                                 B 
                                  
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                             
                             
                               
                                 B 
                                  
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                               + 
                               
                                 W 
                                  
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                             
                           
                            
                           
                             
                               ( 
                               
                                 X 
                                  
                                 
                                     
                                 
                                  
                                 1 
                                  
                                 
                                   ( 
                                   k 
                                   ) 
                                 
                               
                               ) 
                             
                             2 
                           
                         
                       
                       L 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ( 
                     
                       
                         m 
                         = 
                         0 
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         M 
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     5 
                   
                   ) 
                 
               
             
           
         
       
     
         [0061]    Where j is an index of each of the J sub-bands and m is an index of each of the M kinds of regions. S(m) indicates a minimum value in indexes of the L sub-bands constituting region m, and B(j) is a minimum value in indexes of the plural MDCT coefficients constituting sub-band j. W(j) indicates a band width of sub-band j. The case that J sub-bands have the equal band width, namely, W(j) is a constant, will be described below by way of example. Sub-band energy calculating section  401  outputs the obtained average energy E 1 ( m ) of each region to band determination section  402 . 
         [0062]    The average energy E 1 ( m ) of each region is input to band determination section  402  from sub-band energy calculating section  401 . Band determination section  402  selects the region where the average energy E 1 ( m ) is maximized, for example, the band including sub-bands j″ to (j″+L−1) as a band (quantization target band) that becomes the quantization target, and band determination section  402  outputs an index m_max indicating the region as the band information to shape coding section  302 , adaptive prediction determination section  303 , and multiplexing section  305 . Band determination section  402  outputs the first layer difference spectrum X 1 ( k ) of the quantization target band to shape coding section  302 . The first layer difference spectrum input to band selecting section  301  may directly be input to band determination section  402 , or the first layer difference spectrum may be input through sub-band energy calculating section  401 . Hereinafter, it is assumed that j″ to (j″+L−1) are band indexes indicating the quantization target band selected by band determination section  402 . 
         [0063]    Shape coding section  302  performs shape quantization in each sub-band to the first layer difference spectrum X 1 ( k ) corresponding to the band that is indicated by band information m_max input from band selecting section  301 . Specifically, shape coding section  302  searches a built-in shape code book including SQ shape code vectors in each of the L sub-bands, and obtains the index of the shape code vector in which an evaluation scale Shape(k) of the following equation (6) is maximized. 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   6 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       Shape_q 
                        
                       
                         ( 
                         i 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           { 
                           
                             
                               ∑ 
                               
                                 k 
                                 = 
                                 0 
                               
                               
                                 W 
                                  
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                             
                              
                             
                               ( 
                               
                                 X 
                                  
                                 
                                     
                                 
                                  
                                 1 
                                  
                                 
                                   
                                     ( 
                                     
                                       k 
                                       + 
                                       
                                         B 
                                          
                                         
                                           ( 
                                           j 
                                           ) 
                                         
                                       
                                     
                                     ) 
                                   
                                   · 
                                   S 
                                 
                                  
                                 
                                     
                                 
                                  
                                 
                                   C 
                                   k 
                                   i 
                                 
                               
                               ) 
                             
                           
                           } 
                         
                         2 
                       
                       
                         
                           ∑ 
                           
                             k 
                             = 
                             0 
                           
                           
                             W 
                              
                             
                               ( 
                               j 
                               ) 
                             
                           
                         
                          
                         
                           S 
                            
                           
                               
                           
                            
                           
                             
                               C 
                               k 
                               i 
                             
                             · 
                             S 
                           
                            
                           
                               
                           
                            
                           
                             C 
                             k 
                             i 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ( 
                     
                       
                         j 
                         = 
                         
                           j 
                           ″ 
                         
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         
                           j 
                           ″ 
                         
                         + 
                         L 
                         - 
                         1 
                       
                       , 
                       
                         i 
                         = 
                         0 
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         
                           S 
                            
                           
                               
                           
                            
                           Q 
                         
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     6 
                   
                   ) 
                 
               
             
           
         
       
     
         [0064]    Where SC i   k  is the shape code vector constituting the shape code book, i is the index of the shape code vector, and k is the index of the element of the shape code vector. 
         [0065]    Shape coding section  302  outputs an index S_max of the shape code vector, in which the result of the equation (6) is maximized, as the shape coded information to multiplexing section  305 . Shape coding section  302  calculates an ideal gain Gain_i(j) according to the following equation (7), and outputs the calculated ideal gain Gain_i(j) to gain coding section  304 . 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   7 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       Gain_i 
                        
                       
                         ( 
                         j 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ∑ 
                           
                             k 
                             = 
                             0 
                           
                           
                             W 
                              
                             
                               ( 
                               j 
                               ) 
                             
                           
                         
                          
                         
                           ( 
                           
                             X 
                              
                             
                                 
                             
                              
                             1 
                              
                             
                               
                                 ( 
                                 
                                   k 
                                   + 
                                   
                                     B 
                                      
                                     
                                       ( 
                                       j 
                                       ) 
                                     
                                   
                                 
                                 ) 
                               
                               · 
                               S 
                             
                              
                             
                                 
                             
                              
                             
                               C 
                               k 
                               S_max 
                             
                           
                           ) 
                         
                       
                       
                         
                           ∑ 
                           
                             k 
                             = 
                             0 
                           
                           
                             W 
                              
                             
                               ( 
                               j 
                               ) 
                             
                           
                         
                          
                         
                           S 
                            
                           
                               
                           
                            
                           
                             
                               C 
                               k 
                               S_max 
                             
                             · 
                             S 
                           
                            
                           
                               
                           
                            
                           
                             C 
                             k 
                             S_max 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ( 
                     
                       
                         j 
                         = 
                         
                           j 
                           ″ 
                         
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         
                           j 
                           ″ 
                         
                         + 
                         L 
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     7 
                   
                   ) 
                 
               
             
           
         
       
     
         [0066]    Adaptive prediction determination section  303  is provided with a buffer in which the band information m_max input from band selecting section  301  in the past frame is stored. The case that adaptive prediction determination section  303  is provided with the buffer in which the pieces of band information m_max for the past three frames are stored will be described by way of example. Adaptive prediction determination section  303  obtains the number of sub-bands common to both between the quantization target band of the past frame and the quantization target band of the current frame using the band information m_max input from band selecting section  301  in the past frame and the band information m_max input from band selecting section  301  in the current frame. Adaptive prediction determination section  303  determines that the predictive coding is performed when the number of common sub-bands is equal to or more than the predetermined value, and adaptive prediction determination section  303  determines that the predictive coding is not performed when the number of common sub-bands is less than the predetermined value. Specifically, adaptive prediction determination section  303  compares the L sub-bands that are indicated by the band information m_max input from band selecting section  301  in one frame before the current frame in the past frame with the L sub-bands that are indicated by the band information m_max input from band selecting section  301  in the current frame. Adaptive prediction determination section  303  determines that the predictive coding is performed when the number of common sub-bands is equal to or more than P, and adaptive prediction determination section  303  determines that the predictive coding is not performed when the number of common sub-bands is less than P. Adaptive prediction determination section  303  outputs the determination result to gain coding section  304 . Then, using the band information m_max input from band selecting section  301  in the current frame, adaptive prediction determination section  303  updates the built-in buffer in which the band information is stored. 
         [0067]    Gain coding section  304  is provided with a buffer in which the quantized gain obtained in the past frame is stored. When the determination result input from the adaptive prediction determination section  303  indicates that the predictive coding is performed, gain coding section  304  predicts the gain value of the current frame to perform the quantization using quantized gain C t   j  of the past frame stored in the built-in buffer. Specifically, gain coding section  304  searches the built-in gain code book including the GQ gain code vectors in each of the L sub-bands, and obtains the index of the gain code vector in which a square error Gain_q(i) of the following equation (8) is minimized. 
         [0000]    
       
         
           
             
               
                 
                   
                       
                   
                    
                   
                     [ 
                     8 
                     ] 
                   
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       Gain_q 
                        
                       
                         ( 
                         i 
                         ) 
                       
                     
                     = 
                     
                       
                         { 
                         
                           
                             ∑ 
                             
                               j 
                               = 
                               0 
                             
                             
                               L 
                               - 
                               1 
                             
                           
                            
                           
                             { 
                             
                               
                                 Gain_i 
                                  
                                 
                                   ( 
                                   
                                     j 
                                     + 
                                     
                                       j 
                                       ″ 
                                     
                                   
                                   ) 
                                 
                               
                               - 
                               
                                 
                                   ∑ 
                                   
                                     t 
                                     = 
                                     1 
                                   
                                   3 
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       α 
                                       t 
                                     
                                     - 
                                     
                                       C 
                                       
                                         j 
                                         + 
                                         
                                           j 
                                           ″ 
                                         
                                       
                                       t 
                                     
                                   
                                   ) 
                                 
                               
                               - 
                               
                                 
                                   
                                     α 
                                     0 
                                   
                                   · 
                                   G 
                                 
                                  
                                 
                                     
                                 
                                  
                                 
                                   C 
                                   j 
                                   i 
                                 
                               
                             
                             } 
                           
                         
                         } 
                       
                       2 
                     
                   
                    
                   
                     
 
                   
                    
                   
                       
                   
                    
                   
                     ( 
                     
                       
                         i 
                         = 
                         0 
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         
                           G 
                            
                           
                               
                           
                            
                           Q 
                         
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     8 
                   
                   ) 
                 
               
             
           
         
       
     
         [0068]    Where GC i   j  is the gain code vector constituting the gain code book, i is the index of the gain code vector, and j is the index of the element of the gain code vector. For example, j has values of 0 to 4 in the case that the number of sub-bands constituting the region is 5 (in the case of L=5). At this point, C t   j  indicates the gain of the frame in t frames before the current frame. For example, in the case of t=1, C t   j  indicates the gain of the frame in one frame before the current frame. α 0  to α 3  are quartic linear prediction coefficients stored in gain coding section  304 . Gain coding section  304  deals with the L sub-bands in one region as an L-dimensional vector to perform vector quantization. 
         [0069]    Gain coding section  304  outputs an index G_min of the gain code vector, in which the result of the equation (8) is minimized, as the gain coded information to multiplexing section  305 . In the case that the gain of the sub-band corresponding to the past frame in the built-in buffer does not exist, in the equation (8), gain coding section  304  substitutes the gain of the closest sub-band in terms of the frequency in the built-in buffer for the gain of the sub-band corresponding to the past frame in the built-in buffer. 
         [0070]    On the other hand, when the determination result input from adaptive prediction determination section  303  indicates that the predictive coding is not performed, gain coding section  304  directly quantizes the ideal gain Gain_i(j) input from shape coding section  302  according to the following equation (9). Gain coding section  304  deals with the ideal gain as the L-dimensional vector to perform the vector quantization. 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   9 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       Gain_q 
                        
                       
                         ( 
                         i 
                         ) 
                       
                     
                     = 
                     
                       
                         { 
                         
                           
                             ∑ 
                             
                               j 
                               = 
                               0 
                             
                             
                               L 
                               - 
                               1 
                             
                           
                            
                           
                             { 
                             
                               
                                 Gain_i 
                                  
                                 
                                   ( 
                                   
                                     j 
                                     + 
                                     
                                       j 
                                       ″ 
                                     
                                   
                                   ) 
                                 
                               
                               - 
                               
                                 G 
                                  
                                 
                                     
                                 
                                  
                                 
                                   C 
                                   j 
                                   i 
                                 
                               
                             
                             } 
                           
                         
                         } 
                       
                       2 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ( 
                     
                       
                         i 
                         = 
                         0 
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         
                           G 
                            
                           
                               
                           
                            
                           Q 
                         
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     9 
                   
                   ) 
                 
               
             
           
         
       
     
         [0071]    Gain coding section  304  outputs an index G_min of the gain code vector, in which the result of the equation (9) is minimized, as the gain coded information to multiplexing section  305 . 
         [0072]    Gain coding section  304  updates the built-in buffer according to the following equation (10) using the gain coded information G_min and the quantized gain C t   j , which are obtained in the current frame. 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   10 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   { 
                   
                     
                       
                         
                           
                               
                              
                             
                               
                                 C 
                                 
                                   j 
                                   + 
                                   
                                     j 
                                     ″ 
                                   
                                 
                                 3 
                               
                               = 
                               
                                 C 
                                 
                                   j 
                                   + 
                                   
                                     j 
                                     ″ 
                                   
                                 
                                 2 
                               
                             
                           
                         
                       
                       
                         
                           
                               
                              
                             
                               
                                 C 
                                 
                                   j 
                                   + 
                                   
                                     j 
                                     ″ 
                                   
                                 
                                 2 
                               
                               = 
                               
                                 C 
                                 
                                   j 
                                   + 
                                   
                                     j 
                                     ″ 
                                   
                                 
                                 1 
                               
                             
                           
                         
                       
                       
                         
                           
                             
                               C 
                               
                                 j 
                                 + 
                                 
                                   j 
                                   ″ 
                                 
                               
                               1 
                             
                             = 
                             
                               G 
                                
                               
                                   
                               
                                
                               
                                 C 
                                 j 
                                 G_min 
                               
                             
                           
                         
                       
                     
                      
                     
                         
                     
                      
                     
                       ( 
                       
                         
                           j 
                           = 
                           0 
                         
                         , 
                         ⋯ 
                          
                         
                             
                         
                         , 
                         
                           L 
                           - 
                           1 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     10 
                   
                   ) 
                 
               
             
           
         
       
     
         [0073]    Multiplexing section  305  multiplexes the band information m_max input from band selecting section  301 , the shape coded information S_max input from shape coding section  302 , and the gain coded information G_min input from gain coding section  304 . Multiplexing section  305  outputs the bit stream obtained by the multiplexing as the second layer coded information to second layer decoding section  206  and coded information integration section  212 . 
         [0074]      FIG. 6  is a block diagram illustrating a main configuration of second layer decoding section  206 . 
         [0075]    In  FIG. 6 , second layer decoding section  206  includes demultiplexing section  701 , shape decoding section  702 , adaptive prediction determination section  703 , and gain decoding section  704 . 
         [0076]    Demultiplexing section  701  demultiplexes the band information, the shape coded information, and the gain coded information from the second layer coded information input from second layer coding section  205 , outputs the obtained band information to shape decoding section  702  and adaptive prediction determination section  703 , outputs the obtained shape coded information to shape decoding section  702 , and outputs the obtained gain coded information to gain decoding section  704 . 
         [0077]    Shape decoding section  702  obtains the value of the shape of the MDCT coefficient corresponding to the quantization target band, which is indicated by the band information input from demultiplexing section  701 , by decoding the shape coded information input from demultiplexing section  701 , and shape decoding section  702  outputs the obtained value of the shape to gain decoding section  704 . The details of processing of shape decoding section  702  will be described later. 
         [0078]    Adaptive prediction determination section  703  obtains the number of sub-bands common to both the quantization target band of the current frame and the quantization target band of the past frame using the band information input from band selecting section  701 . When the number of common sub-bands is equal to or more than a predetermined value, adaptive prediction determination section  703  determines that the prediction decoding is performed to the MDCT coefficient of the quantization target band indicated by the band information. When the number of common sub-bands is less than a predetermined value, adaptive prediction determination section  703  determines that the prediction decoding is not performed to the MDCT coefficient of the quantization target band indicated by the band information. Adaptive prediction determination section  703  outputs the determination result to gain decoding section  704 . The details of processing of adaptive prediction determination section  703  will be described later. 
         [0079]    When the determination result input from adaptive prediction determination section  703  indicates that the predictive decoding is performed, gain decoding section  704  performs the predictive decoding to the gain coded information, which is input from demultiplexing section  701 , to obtain a gain value using the gain value of the past frame stored in the built-in buffer and the built-in gain code book. On the other hand, when the determination result input from adaptive prediction determination section  703  indicates that the predictive decoding is not performed, gain decoding section  704  obtains the gain value by directly performing dequantization to the gain coded information input from demultiplexing section  701  using the built-in gain code book. Gain decoding section  704  obtains a decoded MDCT coefficient of the quantization target band using the obtained gain value and the value of the shape input from shape decoding section  702 , and outputs the obtained decoded MDCT coefficient as the second layer decoded spectrum to adder  207  and third layer coding section  208 . The details of processing of gain decoding section  704  will be described later. 
         [0080]    Second layer decoding section  206  having the above configuration is operated as follows. 
         [0081]    Demultiplexing section  701  demultiplexes the band information m_max, the shape coded information S_max, and the gain coded information G_min from the second layer coded information input from second layer coding section  205 . Demultiplexing section  701  outputs the obtained band information m_max to shape decoding section  702  and adaptive prediction determination section  703 , outputs the obtained shape coded information S_max to shape decoding section  702 , and outputs the obtained gain coded information G_min to gain decoding section  704 . 
         [0082]    Shape decoding section  702  is provided with the same shape code book as the shape code book included in shape coding section  302  of second layer coding section  205 . Shape decoding section  702  searches the shape code vector in which the shape coded information S_max input from demultiplexing section  701  is used as the index. Shape decoding section  702  outputs the searched shape code vector as the value of the shape of the MDCT coefficient of the quantization target band, which is indicated by the band information m_max input from demultiplexing section  701 , to gain decoding section  704 . At this point, the shape code vector that is searched as the value of the shape is expressed by Shape_q(k) (k=B(j″), . . . , B(j″+L)−1). 
         [0083]    Adaptive prediction determination section  703  is provided with a buffer in which the band information m_max input from band selecting section  701  in the past frame is stored. The case that adaptive prediction determination section  703  is provided with the buffer in which the pieces of band information m_max for the past three frames are stored will be described by way of example. Adaptive prediction determination section  703  obtains the number of sub-bands common to both the quantization target band of the past frame and the quantization target band of the current frame using the band information m_max input from band selecting section  701  in the past frame and the band information m_max input from band selecting section  701  in the current frame. Adaptive prediction determination section  703  determines that the prediction decoding is performed when the number of common sub-bands is equal to or more than the predetermined value, and adaptive prediction determination section  703  determines that the prediction decoding is not performed when the number of common sub-bands is less than the predetermined value. Specifically, adaptive prediction determination section  703  compares the L sub-bands that are indicated by the band information m_max input from band selecting section  701  in one frame before the current frame in the past frame and the L sub-bands that are indicated by the band information m_max input from band selecting section  701  in the current frame. Adaptive prediction determination section  703  determines that the predictive decoding is performed when the number of common sub-bands is equal to or more than P, and adaptive prediction determination section  703  determines that the predictive decoding is not performed when the number of common sub-bands is less than P. Adaptive prediction determination section  703  outputs the determination result to gain decoding section  704 . Then, using the band information m_max input from band selecting section  301  in the current frame, adaptive prediction determination section  703  updates the built-in buffer in which the band information is stored. 
         [0084]    Gain decoding section  704  is provided with a buffer in which the gain value obtained in the past frame is stored. When the determination result input from adaptive prediction determination section  703  indicates that the predictive decoding is performed, gain decoding section  704  predicts the gain value of the current frame to perform the dequantization using the gain value of the past frame stored inbuilt-in gain code book. Specifically, gain decoding section  704  is provided with the same gain code book as that of gain coding section  304  of second layer coding section  205 , and gain decoding section  704  performs the dequantization to the gain to obtain a gain value Gain_q′ according to the following equation (11). At this point, C″ t   j  indicates the gain of the frame in t frames before the current frame. For example, in the case of t=1, C″ t   j  indicates the gain of the frame in one frame before the current frame. α 0  to α 3  are quartic linear prediction coefficients stored in gain coding section  704 . Gain decoding section  704  deals with the L sub-bands in one region as the L-dimensional vector to perform vector dequantization. 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   11 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       Gain_q 
                       ′ 
                     
                      
                     
                       ( 
                       
                         j 
                         + 
                         
                           j 
                           ″ 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       
                         ∑ 
                         
                           t 
                           = 
                           1 
                         
                         3 
                       
                        
                       
                         ( 
                         
                           
                             α 
                             t 
                           
                           · 
                           
                             C 
                             
                               j 
                               + 
                               
                                 j 
                                 ″ 
                               
                             
                             
                               ″ 
                                
                               
                                   
                               
                                
                               t 
                             
                           
                         
                         ) 
                       
                     
                     + 
                     
                       
                         
                           α 
                           0 
                         
                         · 
                         G 
                       
                        
                       
                           
                       
                        
                       
                         
                           C 
                           j 
                           G_min 
                         
                          
                         
                           
 
                         
                         ( 
                         
                           
                             j 
                             = 
                             0 
                           
                           , 
                           ⋯ 
                            
                           
                               
                           
                           , 
                           
                             L 
                             - 
                             1 
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     11 
                   
                   ) 
                 
               
             
           
         
       
     
         [0085]    In the case that the gain of the sub-band corresponding to the past frame in the built-in buffer does not exist, in the equation (11), gain decoding section  704  substitutes the gain of the closest sub-band in terms of the frequency in the built-in buffer for the gain of the sub-band corresponding to the past frame in the built-in buffer. 
         [0086]    On the other hand, when the determination result input from adaptive prediction determination section  703  indicates that the predictive decoding is not performed, gain decoding section  704  performs the dequantization to the gain value according to the following equation (12) using the gain code book. Gain decoding section  704  deals with the gain value as the L-dimensional vector to perform the vector dequantization. That is, in the case that the prediction decoding is not performed, a gain code vector GC G     —     min   j  corresponding to the gain coded information G_min is directly used as the gain value. 
         [0000]      [12] 
         [0000]      Gain —   q ′( j+j ″)= GC   j   G     —     min ( j= 0 , . . . ,L− 1)  (Equation 12)
 
         [0087]    Then, gain decoding section  704  calculates the decoded MDCT coefficient as the second layer decoded spectrum according to the following equation (13) using the gain value obtained by the dequantization of the current frame and the value of the shape input from shape decoding section  702 , and the gain decoding section  704  updates the built-in buffer according to the following equation (14). At this point, the calculated decoded MDCT coefficient is expressed by X 2 ″(k). In the case that k exists in B(j″) to B(j″+1)−1 during the dequantization of the decoded MDCT coefficient, the gain value Gain_q′(j) takes a value of Gain_q′(j″). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   13 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     X 
                      
                     
                         
                     
                      
                     
                       2 
                       ″ 
                     
                      
                     
                       ( 
                       k 
                       ) 
                     
                   
                   = 
                   
                     
                       Gain_q 
                       ′ 
                     
                      
                     
                       
                         ( 
                         j 
                         ) 
                       
                       · 
                       
                         Shape_q 
                         ′ 
                       
                     
                      
                     
                       ( 
                       k 
                       ) 
                     
                      
                     
                         
                     
                      
                     
                       ( 
                       
                         
                           
                             
                                 
                                
                               
                                 
                                   k 
                                   = 
                                   
                                     B 
                                      
                                     
                                       ( 
                                       
                                         j 
                                         ″ 
                                       
                                       ) 
                                     
                                   
                                 
                                 , 
                                 ⋯ 
                                  
                                 
                                     
                                 
                                 , 
                                 
                                   
                                     B 
                                      
                                     
                                       ( 
                                       
                                         
                                           j 
                                           ″ 
                                         
                                         + 
                                         L 
                                       
                                       ) 
                                     
                                   
                                   - 
                                   1 
                                 
                               
                             
                           
                         
                         
                           
                             
                                 
                                
                               
                                 
                                   j 
                                   = 
                                   
                                     j 
                                     ″ 
                                   
                                 
                                 , 
                                 ⋯ 
                                  
                                 
                                     
                                 
                                 , 
                                 
                                   
                                     j 
                                     ″ 
                                   
                                   + 
                                   L 
                                   - 
                                   1 
                                 
                               
                             
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     13 
                   
                   ) 
                 
               
             
             
               
                 
                   [ 
                   14 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                       
                   
                    
                   
                     { 
                     
                       
                         
                           
                             
                                 
                                
                               
                                 
                                   C 
                                   j 
                                   ″3 
                                 
                                 = 
                                 
                                   C 
                                   j 
                                   ″2 
                                 
                               
                             
                           
                         
                         
                           
                             
                                 
                                
                               
                                 
                                   C 
                                   j 
                                   ″2 
                                 
                                 = 
                                 
                                   C 
                                   j 
                                   ″1 
                                 
                               
                             
                           
                         
                         
                           
                             
                               
                                 C 
                                 j 
                                 ″1 
                               
                               = 
                               
                                 G 
                                  
                                 
                                     
                                 
                                  
                                 
                                   C 
                                   j 
                                   G_min 
                                 
                               
                             
                           
                         
                       
                        
                       
                           
                       
                        
                       
                         ( 
                         
                           
                             j 
                             = 
                             
                               j 
                               ″ 
                             
                           
                           , 
                           ⋯ 
                            
                           
                               
                           
                           , 
                           
                             
                               j 
                               ″ 
                             
                             + 
                             L 
                             - 
                             1 
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     14 
                   
                   ) 
                 
               
             
           
         
       
     
         [0088]    Gain decoding section  704  outputs the calculated second layer decoded spectrum X 2 ″(k) to adder  207  and third layer coding section  208  according to the equation (13). 
         [0089]      FIG. 7  is a block diagram illustrating a main configuration of third layer coding section  208 . 
         [0090]    In  FIG. 7 , third layer coding section  208  includes band selecting section  311 A, shape coding section  302 , adaptive prediction determination section  303 , gain coding section  304 , and multiplexing section  305 . Since the structural elements except band selecting section  311 A constituting third layer coding section  208  are identical to those of second layer coding section  205 , the structural elements are designated by the identical numeral, and the description thereof is omitted. 
         [0091]      FIG. 8  is a block diagram illustrating a configuration of band selecting section  311 A. 
         [0092]    In  FIG. 8 , band selecting section  311 A mainly includes perceptual characteristic calculating section  501 , sub-band energy calculating section  502 , and band determination section  503 . 
         [0093]    The second layer difference spectrum X 2 ( k ) is input to perceptual characteristic calculating section  501  from adder  207 . The second layer decoded spectrum X 2 ″(k) is input to perceptual characteristic calculating section  501  from second layer decoding section  206 . 
         [0094]    Perceptual characteristic calculating section  501  calculates the index around a peak component of the spectrum encoded by second layer coding section  205  with respect to the second layer decoded spectrum X 2 ″(k). This is the peak component quantized by shape coding section  302  of second layer coding section  205 . Therefore, for example, in that case that shape coding section  302  encodes the spectrum by a sinusoidal coding method, the peak component can easily be calculated by decoding the shape coded information. 
         [0095]    Perceptual characteristic calculating section  501  outputs the calculated index around the peak component and an amplitude value of the peak component to sub-band energy calculating section  502 . At this point, the case that the spectrum component having the maximum amplitude in each sub-band is used as the peak component with respect to the second decoded spectrum X 2 ″(k) will be described by way of example. 
         [0096]    Similarly to sub-band energy calculating section  401 , sub-band energy calculating section  502  divides the second layer difference spectrum X 2 ( k ) into the plural sub-bands. The second layer difference spectrum input to band selecting section  311 A may directly be input to sub-band energy calculating section  502 , or the second layer difference spectrum may be input through perceptual characteristic calculating section  501 . The case that the second layer difference spectrum X 2 ( k ) is equally divided into J (J is a natural number) sub-bands will be described by way of example. Sub-band energy calculating section  502  selects the consecutive L (L is a natural number) sub-bands in the J sub-bands to obtain the M (M is a natural number) kinds of groups of the sub-bands. As described above, hereinafter the M kinds of groups of the sub-bands are referred to as the region. 
         [0097]    Then, sub-band energy calculating section  502  calculates average energy E 2 ( m ) of each of the M kinds of regions according to the following equation (15-1) using the information on the index around the peak component input from perceptual characteristic calculating section  501  and the information on the amplitude value of the peak component. At this point, it is assumed that temporary spectrum X(k) in the equation (15-1) is expressed by an equation (15-2). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   15 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     E 
                      
                     
                         
                     
                      
                     2 
                      
                     
                       ( 
                       m 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         
                           ∑ 
                           
                             j 
                             = 
                             
                               S 
                                
                               
                                 ( 
                                 m 
                                 ) 
                               
                             
                           
                           
                             
                               S 
                                
                               
                                 ( 
                                 m 
                                 ) 
                               
                             
                             + 
                             L 
                             - 
                             1 
                           
                         
                          
                         
                           
                             ∑ 
                             
                               k 
                               = 
                               
                                 B 
                                  
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                             
                             
                               
                                 B 
                                  
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                               + 
                               
                                 W 
                                  
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                             
                           
                            
                           
                             
                               ( 
                               
                                 X 
                                  
                                 
                                   ( 
                                   k 
                                   ) 
                                 
                               
                               ) 
                             
                             2 
                           
                         
                       
                       L 
                     
                      
                     
                         
                     
                      
                     
                       ( 
                       
                         
                           m 
                           = 
                           0 
                         
                         , 
                         ⋯ 
                          
                         
                             
                         
                         , 
                         
                           M 
                           - 
                           1 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     15 
                      
                     
                       - 
                     
                      
                     1 
                   
                   ) 
                 
               
             
             
               
                 
                   
                     X 
                      
                     
                       ( 
                       k 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           
                               
                              
                             
                               X 
                                
                               
                                   
                               
                                
                               2 
                                
                               
                                 ( 
                                 k 
                                 ) 
                               
                             
                           
                         
                         
                           
                               
                              
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 ( 
                                 
                                   k 
                                   &lt; 
                                   
                                     Peak 
                                     start 
                                   
                                 
                                 ) 
                               
                                
                               
                                   
                               
                                
                               or 
                                
                               
                                   
                               
                                
                               
                                 ( 
                                 
                                   k 
                                   &gt; 
                                   
                                     Peak 
                                     end 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                       
                         
                           
                               
                              
                             
                               
                                 X 
                                  
                                 
                                     
                                 
                                  
                                 2 
                                  
                                 
                                   ( 
                                   k 
                                   ) 
                                 
                               
                               - 
                               
                                 β 
                                 · 
                                 PeakValue 
                               
                             
                           
                         
                         
                           
                               
                              
                             else 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     15 
                      
                     
                       - 
                     
                      
                     2 
                   
                   ) 
                 
               
             
           
         
       
     
         [0098]    Where j is the index of each of the J sub-bands and m is the index of each of the M kinds of regions. S(m) indicates the minimum value in the indexes of the L sub-bands constituting region m, and B(j) is the minimum value in the indexes of the plural MDCT coefficients constituting sub-band j. W(j) indicates the band width of sub-band j. The case that J sub-bands have the equal band width, namely, W(j) is a constant will be described below by way of example. 
         [0099]    As expressed by an equation (15-2), in the case that an index k does not correspond to the index around the peak component input from perceptual characteristic calculating section  501 , the value of a temporary spectrum X(k) is directly used to calculate the average energy E 2 ( m ) of each region. 
         [0100]    On the other hand, in the case that the index k corresponds to the index around the peak component input from perceptual characteristic calculating section  501 , namely, in the case that the index k exists in a start index Peak start  to an end index Peak end  around the peak component, sub-band energy calculating section  502  subtracts a value, in which a predetermined value β is multiplied by the amplitude value PeakValue of the peak component input from perceptual characteristic calculating section  501 , from the value of the second layer difference spectrum X 2 ( k ). Sub-band energy calculating section  502  calculates the average energy E 2 ( m ) of each region using the temporary spectrum X(k) after the subtraction. 
         [0101]    Thus, sub-band energy calculating section  502  undervalues the energy of the spectrum component existing around the large component (peak component) in the spectrum components encoded in the lower layer. As a result, another perceptually important spectrum component can easily be selected to generate the perceptually better decoded signal. 
         [0102]    At this point, in the case that a sign of the temporary spectrum X(k) is changed by the subtraction processing, the value of the temporary spectrum X(k) is set to 0. β is a coefficient of 0 to 1 that is multiplied by the amplitude value of the peak component of the spectrum that is already quantized in the lower layer. A value of about 0.5 can be cited as an example of the coefficient β. 
         [0103]    A perception masking effect becomes stronger with decreasing distance on a frequency axis from a masker (that is a component on a masked side, and indicates the peak component in this case). At this point, a method of calculating the value of X(k) using the constant β will be described for the purpose of not largely increasing a calculation amount. Similarly, the invention is also applied in the case that the correct perception masking characteristic value is calculated. 
         [0104]    Sub-band energy calculating section  502  outputs the obtained average energy E 2 ( m ) of each region to band determination section  503 . 
         [0105]    The average energy E 2 ( m ) of each region is input to band determination section  503  from sub-band energy calculating section  502 . Band determination section  503  selects the region where the average energy E 2 ( m ) is maximized, for example, the band including sub-bands j″ to (j″+L−1) as the band (quantization target band) that becomes the quantization target, and band determination section  503  outputs an index m_max indicating the region as the band information to shape coding section  302 , adaptive prediction determination section  303 , and multiplexing section  305 . 
         [0106]    As described above, in the case that the index k corresponds to the index around the peak component input from perceptual characteristic calculating section  501 , namely, in the case that the index k exists from the start index Peak start  to the end index Peak end  around the peak component, sub-band energy calculating section  502  performs the perception masking by subtracting a value, in which the predetermined value β is multiplied by the amplitude value PeakValue of the peak component input from perceptual characteristic calculating section  501 , from the value of X 2 ( k ). 
         [0107]    In consideration of the perception masking effect, sub-band energy calculating section  502  calculates the average energy E 2 ( m ) of each region using the value of X(k) after the subtraction, thereby undervaluing the energy of the spectrum component existing around the large component (peak component) in the spectrum components encoded in the lower layer. Therefore, another perceptually important spectrum component can easily be selected in band determination section  503 . Therefore, the perceptually better decoded signal can be generated. 
         [0108]    Band determination section  503  outputs the second layer difference spectrum X 2 ( k ) of the quantization target band to shape coding section  302 . The second layer difference spectrum input to band selecting section  311 A may directly be input to band determination section  503 , or the second layer difference spectrum may be input through perceptual characteristic calculating section  501  and/or sub-band energy calculating section  502 . Hereinafter, it is assumed that j″ to (j″+L−1) are band indexes indicating the quantization target band selected by band determination section  503 . 
         [0109]    The processing of third layer coding section  208  has been described above. 
         [0110]    The processing of third layer decoding section  209  is identical to that of second layer decoding section  206  except that the third layer coded information and the third layer decoded spectrum are input and output instead of the second layer coded information and the second layer decoded spectrum, respectively. Therefore, the description is omitted. 
         [0111]    The processing of fourth layer coding section  211  is identical to that of third layer coding section  208  except that the third layer difference spectrum, the third layer decoded spectrum and the fourth layer coded information are input and output instead of the second layer difference spectrum, the second layer decoded spectrum, and the third layer coded information, respectively. Therefore, the description is omitted. 
         [0112]    The processing of coding apparatus  101  has been described above. 
         [0113]      FIG. 9  is a block diagram illustrating a main configuration of decoding apparatus  103  in  FIG. 1 . For example, it is assumed that decoding apparatus  103  is a hierarchical decoding apparatus including four decoding hierarchies (layers). At this point, similarly to coding apparatus  101 , it is assumed that the four layers are called as a first layer, a second layer, a third layer, and a fourth layer in the ascending order of the bit rate. 
         [0114]    The coded information transmitted from coding apparatus  101  through transmission line  102  is input to coded information demultiplexing section  601 , and coded information demultiplexing section  601  demultiplexes the coded information into the pieces of coded information of the layers to output each piece of coded information to the decoding section that performs the decoding processing of each piece of coded information. Specifically, coded information demultiplexing section  601  outputs the first layer coded information included in the coded information to first layer decoding section  602 , outputs the second layer coded information included in the coded information to second layer decoding section  603 , outputs the third layer coded information included in the coded information to third layer decoding section  604 , and outputs the fourth layer coded information included in the coded information to fourth layer decoding section  606 . 
         [0115]    First layer decoding section  602  decodes the first layer coded information, which is input from coded information demultiplexing section  601 , by the CELP speech decoding method to generate the first layer decoded signal, and outputs the generated first layer decoded signal to adder  609 . 
         [0116]    Second layer decoding section  603  decodes the second layer coded information input from coded information demultiplexing section  601 , and outputs the obtained second layer decoded spectrum X 2 ″(k) to adder  605 . Since the processing of second layer decoding section  603  is identical to that of second layer decoding section  206 , the description is omitted. 
         [0117]    Third layer decoding section  604  decodes the third layer coded information input from coded information demultiplexing section  601 , and outputs the obtained third layer decoded spectrum X 3 ″(k) to adder  605 . Since the processing of third layer decoding section  604  is identical to that of third layer decoding section  209 , the description is omitted. 
         [0118]    The second layer decoded spectrum X 2 ″(k) is input to adder  605  from second layer decoding section  603 . The third layer decoded spectrum X 3 ″(k) is input to adder  605  from third layer decoding section  604 . Adder  605  adds the input second layer decoded spectrum X 2 ″(k) and third layer decoded spectrum X 3 ″(k), and outputs the added spectrum as a first addition spectrum X 5 ″(k) to adder  607 . 
         [0119]    Fourth layer decoding section  606  decodes the fourth layer coded information input from coded information demultiplexing section  601 , and outputs the obtained fourth layer decoded spectrum X 4 ″(k) to adder  607 . Since the processing of fourth layer decoding section  606  is identical to that of third layer decoding section  209  except input and output names, the description is omitted. 
         [0120]    A first addition spectrum X 5 ″(k) is input to adder  607  from adder  605 . The fourth layer decoded spectrum X 4 ″(k) is input to adder  607  from fourth layer decoding section  606 . Adder  607  adds the input first addition spectrum X 5 ″(k) and fourth layer decoded spectrum X 4 ″(k), and outputs the added spectrum as a second addition spectrum X 6 ″(k) to orthogonal transform processing section  608 . 
         [0121]    Orthogonal transform processing section  608  initializes built-in buffer buf′(k) to an initial value “0” by the following equation (16). 
         [0000]      [16] 
         [0000]        buf ′( k )=0 ( k= 0 , . . . ,N− 1)  (Equation 16)
 
         [0122]    The second addition spectrum X 6 ″(k) is input to orthogonal transform processing section  608 , and orthogonal transform processing section  608  obtains a second addition decoded signal y″(n) according to the following equation (17). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   17 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       
                         y 
                         ″ 
                       
                        
                       
                         ( 
                         n 
                         ) 
                       
                     
                     = 
                     
                       
                         2 
                         N 
                       
                        
                       
                         
                           ∑ 
                           
                             n 
                             = 
                             0 
                           
                           
                             
                               2 
                                
                               N 
                             
                             - 
                             1 
                           
                         
                          
                         
                           X 
                            
                           
                               
                           
                            
                           7 
                            
                           
                             ( 
                             k 
                             ) 
                           
                            
                           
                             cos 
                              
                             
                               [ 
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         2 
                                          
                                         n 
                                       
                                       + 
                                       1 
                                       + 
                                       N 
                                     
                                     ) 
                                   
                                    
                                   
                                     ( 
                                     
                                       
                                         2 
                                          
                                         k 
                                       
                                       + 
                                       1 
                                     
                                     ) 
                                   
                                    
                                   π 
                                 
                                 
                                   4 
                                    
                                   N 
                                 
                               
                               ] 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ( 
                     
                       
                         n 
                         = 
                         0 
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         N 
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     17 
                   
                   ) 
                 
               
             
           
         
       
     
         [0123]    In the equation (17), X 7 ( k ) is a vector in which the second addition spectrum X 6 ″(k) and buffer buf′(k) are coupled, and X 7 ( k ) is obtained using the following equation (18). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   18 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     X 
                      
                     
                         
                     
                      
                     7 
                      
                     
                       ( 
                       k 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           
                               
                              
                             
                               
                                 buf 
                                 ′ 
                               
                                
                               
                                 ( 
                                 k 
                                 ) 
                               
                             
                           
                         
                         
                           
                               
                              
                             
                               ( 
                               
                                 
                                   k 
                                   = 
                                   0 
                                 
                                 , 
                                 
                                   
                                     ⋯ 
                                      
                                     
                                         
                                     
                                      
                                     N 
                                   
                                   - 
                                   1 
                                 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           
                               
                              
                             
                               X 
                                
                               
                                   
                               
                                
                               
                                 6 
                                 ″ 
                               
                                
                               
                                 ( 
                                 k 
                                 ) 
                               
                             
                           
                         
                         
                           
                               
                              
                             
                               ( 
                               
                                 
                                   k 
                                   = 
                                   N 
                                 
                                 , 
                                 
                                   
                                     ⋯ 
                                      
                                     
                                         
                                     
                                      
                                     2 
                                      
                                     N 
                                   
                                   - 
                                   1 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     18 
                   
                   ) 
                 
               
             
           
         
       
     
         [0124]    Then, orthogonal transform processing section  608  updates buffer buf′(k) according to the following equation (19). 
         [0000]      [19] 
         [0000]        buf ′( k )= X″ 6( k ) ( k= 0 , . . . ,N− 1)  (Equation 19)
 
         [0125]    Orthogonal transform processing section  608  outputs the second addition decoded signal y″(n) to adder  609 . 
         [0126]    The first layer decoded signal is input to adder  609  from first layer decoding section  602 . The second addition decoded signal is input to adder  609  from orthogonal transform processing section  608 . Adder  609  adds the input first layer decoded signal and second addition decoded signal, and outputs the added signal as the output signal. 
         [0127]    The processing of decoding apparatus  103  has been described above. 
         [0128]    According to Embodiment 1, in the configuration of coding apparatus  101  that performs the hierarchy encoding (scalable) to select the band (quantization target band) that becomes the quantization target in each hierarchy (layer), band selecting section  311 A selects the quantization target band of the current layer based on the coding result (quantized band information) of the lower layer. Specifically, in band selecting section  311 A, perceptual characteristic calculating section  501  searches the spectrum component (peak component) having the maximum amplitude in each sub-band with respect to the spectrum component quantized in the lower layer. In the case that the index k exists from the start index Peak start  to the end index Peak end  around the peak component, sub-band energy calculating section  502  subtracts the value, in which the predetermined value β is multiplied by the amplitude value PeakValue of the peak component input from perceptual characteristic calculating section  501 , from the value of the second layer difference spectrum X 2 ( k ). Sub-band energy calculating section  502  calculates the average energy E 2 ( m ) of each region using the temporary spectrum X(k) after the subtraction. Band determination section  503  selects the region where the average energy E 2 ( m ) is maximized, for example, the band including sub-bands j″ to (j″+L−1) as the band (quantization target band) that becomes the quantization target. Therefore, in the current layer, the perceptually important band is encoded in consideration of the perception masking effect of the spectrum encoded in the lower layer, so that the quality of the decoded signal can be improved. 
         [0129]    In Embodiment 1, perceptual characteristic calculating section  501  searches the spectrum component (peak component) having the maximum amplitude in each sub-band with respect to the spectrum component quantized in the lower layer, and sub-band energy calculating section  502  calculates the average energy of the region in consideration of the perception masking effect for the peak component. However, the invention is not limited to Embodiment 1. The invention can similarly be applied to the case that perceptual characteristic calculating section  501  searches the plural peak components. In this case, it is necessary that sub-band energy calculating section  502  calculates the average energy of the region in consideration of the perception masking effect for each of the plural peak components. 
       Embodiment 2 
       [0130]    Embodiment 2 of the invention will describe a configuration in which the calculation amount is further reduced without adopting the band selecting method of Embodiment 1 in gain coding sections  304  of third layer coding section  208  and fourth layer coding section  211 . 
         [0131]    A communication system (not illustrated) according to Embodiment 2 is basically identical to the communication system in  FIG. 1 , and a coding apparatus of the communication system of Embodiment 2 differs from coding apparatus  101  of the communication system in  FIG. 1  only in parts of the configuration and operation. The description is made while the coding apparatus of the communication system of Embodiment 2 is designated by the numeral “ 111 ”. Specifically, Embodiment 2 differs from Embodiment 1 only in the operations of the band selecting sections in the third layer coding section  208  and fourth layer coding section  211 . The description is made while the band selecting sections in the third layer coding section  208  and fourth layer coding section  211  of Embodiment 2 are designated by the numeral “ 321 ”. Since decoding apparatus  103  is identical to that of Embodiment 1, the description is omitted. 
         [0132]    A schematic diagram of coding apparatus  111  of Embodiment 2 is identical to that in  FIG. 2 , and the second layer decoded spectrum and the third layer decoded spectrum are input to third layer coding section  208  and fourth layer coding section  211  of Embodiment 2 from second layer decoding section  206  and third layer decoding section  209 , respectively. 
         [0133]    In band selecting sections  321  in third layer coding section  208  and fourth layer coding section  211  of Embodiment 2, the second layer coded information and the third layer coded information may be input instead of the second layer decoded spectrum and the third layer decoded spectrum, respectively. This is because the band information quantized in the lower layer is utilized in band selecting section  321 . 
         [0134]    Accordingly, not the configuration in which the second layer decoded spectrum and the third layer decoded spectrum are input to third layer coding section  208  and fourth layer coding section  211  from second layer decoding section  206  and third layer decoding section  209 , respectively, but the configuration in which the second layer coded information and the third layer coded information are input from second layer coding section  205  and third layer coding section  208 , respectively will be described below. 
         [0135]      FIG. 10  is a block diagram illustrating a main configuration of band selecting section  321 . Band selecting section  321  is a processing block common to both third layer coding section  208  and fourth layer coding section  211 . The processing of band selecting section  321  in third layer coding section  208  will representatively be described below. 
         [0136]    In  FIG. 10 , band selecting section  321  mainly includes sub-band importance calculating section  801 , sub-band energy calculating section  802 , and band determination section  803 . 
         [0137]    The second layer coded information is input to sub-band importance calculating section  801  from second layer coding section  205 . 
         [0138]    Sub-band importance calculating section  801  includes a buffer that retains a degree of importance imp(k) (k=0 to N−1) for the perception in each sub-band of the second layer difference spectrum. At this point, for example, an initial value of the degree of importance is set to 1.0. 
         [0139]    Sub-band importance calculating section  801  undervalues the importance value with respect to the sub-band that is indicated by the band information included in the input second layer coded information, namely, the band that is selected as the quantization target and quantized in second layer coding section  205  of the lower layer. 
         [0140]    Specifically, sub-band importance calculating section  801  multiplies a predetermined coefficient γ by the degree of importance of the sub-band that is indicated by the band information included in the second layer coded information according to an equation (20). At this point, the degree of importance that is multiplied by γ is expressed by imp 2 ( k ). 
         [0000]      [20] 
         [0000]        imp 2( k )= imp ( k )·γ ( k= 0 , . . . N− 1)  (Equation 20)
 
         [0141]    Desirably the value of γ is equal to or more than 0 and less than 1. For example, in the case of γ=0.8, the experimental result shows that the good effect is exerted. The value of γ may be set to a value except 0.8. 
         [0142]    The processing of adjusting the importance value of the sub-band using the equation (20) can also be applied to fourth layer coding section  211 . That is, the sub-band that is quantized by both second layer coding section  205  and third layer coding section  208  is multiplied by γ twice. The number of γ multiplying times depends on the number of layers constituting coding apparatus  111 . Therefore, the invention can similarly be applied to the case that γ is multiplied the number of times except the above number of times. 
         [0143]    Sub-band importance calculating section  801  outputs the degree of importance imp 2 ( k ) (k=0 to N−1) of each sub-band to sub-band energy calculating section  802 . Sub-band importance calculating section  801  updates the internal buffer according to an equation (21) using the degree of importance imp 2 ( k ) (k=0 to N−1) of each sub-band. 
         [0000]      [21] 
         [0000]        imp ( k )= imp 2( k ) ( k= 0 , . . . N− 1)  (Equation 21)
 
         [0144]    The degree of importance imp 2 ( k ) (k=0 to N−1) of each sub-band is input to sub-band energy calculating section  802  from sub-band importance calculating section  801 . The second layer difference spectrum is input to sub-band energy calculating section  802  from adder  207 . 
         [0145]    Sub-band energy calculating section  802  divides the second layer difference spectrum X 2 ( k ) into the plural sub-bands. The case that second layer difference spectrum X 2 ( k ) is equally divided into the J (J is a natural number) sub-bands will be described by way of example. Sub-band energy calculating section  802  selects the consecutive L (L is a natural number) sub-bands in the J sub-bands to obtain the M (M is a natural number) kinds of groups of the sub-bands. Similarly to Embodiment 1, hereinafter the M kinds of groups of the sub-bands are referred to as the region. Since the configuration of the region is identical to that of Embodiment 1, the description thereof is omitted. 
         [0146]    Then, sub-band energy calculating section  802  calculates average energy E 3 ( m ) of each of the M kinds of regions according to the following equation (22). 
         [0000]    
       
         
           
             
               
                 
                   [ 
                   22 
                   ] 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       E 
                        
                       
                           
                       
                        
                       3 
                        
                       
                         ( 
                         m 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ∑ 
                           
                             j 
                             = 
                             
                               S 
                                
                               
                                 ( 
                                 m 
                                 ) 
                               
                             
                           
                           
                             
                               S 
                                
                               
                                 ( 
                                 m 
                                 ) 
                               
                             
                             + 
                             L 
                             - 
                             1 
                           
                         
                          
                         
                           [ 
                           
                             
                               
                                 ( 
                                 
                                   
                                     ∑ 
                                     
                                       k 
                                       = 
                                       
                                         B 
                                          
                                         
                                           ( 
                                           j 
                                           ) 
                                         
                                       
                                     
                                     
                                       
                                         B 
                                          
                                         
                                           ( 
                                           j 
                                           ) 
                                         
                                       
                                       + 
                                       
                                         W 
                                          
                                         
                                           ( 
                                           j 
                                           ) 
                                         
                                       
                                     
                                   
                                    
                                   
                                     
                                       ( 
                                       
                                         X 
                                          
                                         
                                           ( 
                                           k 
                                           ) 
                                         
                                       
                                       ) 
                                     
                                     2 
                                   
                                 
                                 ) 
                               
                               · 
                               imp 
                             
                              
                             
                                 
                             
                              
                             2 
                              
                             
                               ( 
                               k 
                               ) 
                             
                           
                           ] 
                         
                       
                       L 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ( 
                     
                       
                         m 
                         = 
                         0 
                       
                       , 
                       ⋯ 
                        
                       
                           
                       
                       , 
                       
                         M 
                         - 
                         1 
                       
                     
                     ) 
                   
                 
               
               
                 
                   ( 
                   
                     Equation 
                      
                     
                         
                     
                      
                     22 
                   
                   ) 
                 
               
             
           
         
       
     
         [0147]    Where j is the index of each of the J sub-bands and m is the index of each of the M kinds of regions. S(m) indicates the minimum value in the indexes of the L sub-bands constituting region m, and B(j) is the minimum value in the indexes of the plural MDCT coefficients constituting sub-band j. W(j) indicates the band width of sub-band j. The case will be described below by way of example that J sub-bands have the equal band width, namely, W(j) is a constant. 
         [0148]    As can be seen from equation (21), in Embodiment 2, sub-band energy calculating section  802  multiplies the degree of importance of each sub-band by the energy of each sub-band, and totalizes energy of each sub-band after the degree of importance is multiplied, thereby calculating the average energy of each region. This point differs from the method of calculating the average energy of each region of Embodiment 1. 
         [0149]    As described above, the degree of importance of the sub-band quantized by the second layer coding section  205  of the lower layer is multiplied by γ having the value equal to or more than 0 and less than 1, and the degree of importance is corrected lower. Therefore, the energy of the sub-band that is not selected as the quantization target is undervalued by the equation (21). Thus, the region including the sub-band that is already quantized in the lower layer is hardly selected by utilizing the degree of importance of each sub-band as the average energy of the region. 
         [0150]    Sub-band energy calculating section  802  outputs the obtained average energy E 3 ( m ) of each region to band determination section  803 . 
         [0151]    The average energy E 3 ( m ) of each region is input to band determination section  803  from sub-band energy calculating section  802 . Band determination section  803  selects the region where the average energy E 3 ( m ) is maximized, for example, the band including sub-bands j″ to (j″+L−1) as the band (quantization target band) that becomes the quantization target, and band determination section  803  outputs the index m_max indicating the region as the band information to shape coding section  302 , adaptive prediction determination section  303 , and multiplexing section  305 . 
         [0152]    Band determination section  803  also outputs the second layer difference spectrum X 2 ( k ) of the quantization target band to shape coding section  302 . The second layer difference spectrum input to band selecting section  321  may directly be input to band determination section  803 , or the second layer difference spectrum may be input through sub-band energy calculating section  802 . Hereinafter, it is assumed that j″ to (j″+L−1) are band indexes indicating the quantization target band selected by band determination section  803 . 
         [0153]    The processing of each of band selecting sections  321  in third layer coding section  208  and fourth layer coding section  211  has been described above. 
         [0154]    According to Embodiment 2, upon calculating the energy of each sub-band, band selecting section  321  in each of third layer coding section  208  and fourth layer coding section  211  sets (corrects) the degree of importance based on whether the sub-band is already quantized in the lower layer, and band selecting section  321  utilizes the degree of importance after the setting (correction). 
         [0155]    Specifically, the degree of importance of the sub-band that is already quantized in the lower layer is set (corrected) lower, and the energy is calculated in consideration of the degree of importance after the setting (correction). Therefore, since the energy is undervalued compared with the sub-band that is not quantized in the lower layer, the sub-band that is quantized in the lower layer is hardly selected as the quantization target in the current layer. As a result, the band that is selected as the quantization target and quantized can be prevented from being partially biased over the plural layers. The wider band is quantized in all the layers, so that the improvement of the quality of the decoded signal can be achieved (for example, the wider band can perceptually be sensed). 
         [0156]    In Embodiment 1, the perception masking effect is calculated in each peak of the spectrum quantized in the lower layer. On the other hand, in Embodiment 2, it is only necessary to set (correct) the perceptual degree of importance in each sub-band. Therefore, the quantization band is selected in the higher layer based on the quantization result in the lower layer, which allows the processing calculation amount to be largely reduced compared with Embodiment 1 in implementing the quality of the decoded signal. 
         [0157]    Embodiments 1 and 2 of the invention have been described above. 
         [0158]    In Embodiments 1 and 2, the coding apparatus is configured to include the four encoding hierarchies (layers). The invention is not limited to the four encoding hierarchies, but the invention can also be applied to the configuration except the four encoding hierarchies. 
         [0159]    In Embodiments 1 and 2, the CELP encoding/decoding method is adopted in the lowest first layer coding section/decoding section. The invention is not limited to Embodiments 1 and 2, but the invention can also be applied to the case that the layer in which the CELP encoding/decoding method is adopted does not exist. For example, the adder that performs the addition and subtraction on the temporal axis in the coding apparatus and the decoding apparatus is eliminated for the configuration including the layers in each of which the frequency transform encoding/decoding method is adopted. 
         [0160]    In Embodiments 1 and 2, the coding apparatus calculates the difference signal between the first layer decoded signal and the input signal, and performs the orthogonal transform processing to calculate the difference spectrum. However, the invention is not limited to Embodiments 1 and 2. Alternatively, the present invention can also be applied to the configuration that after the orthogonal transform processing may be performed to the input signal and the first layer decoded signal to calculate the input spectrum and the first layer decoded spectrum, the difference spectrum may be calculated. 
         [0161]    In Embodiments 1 and 2, the coding apparatus calculates the average energy of the region in each coding layer to select the band of the quantization target. However, the invention is not limited to Embodiments 1 and 2. Alternatively, the present invention can also be applied to the method that the average energy of each region may be calculated by subtracting the energy calculated from the shape coded information and the gain coded information, which are encoded in the lower layer, from the average energy of the region that is already calculated in the lower layer. 
         [0162]    In Embodiments 1 and 2, by way of example, the third layer coding section selects the quantization target band by utilizing the coding result of the lower layer (second layer coding section). Alternatively, the invention can also be applied to the band selecting section of the second layer coding section. In this case, the quantization target band is selected by utilizing the coding result of the first layer coding section. For example, the quantization target band may be selected by utilizing a pitch cycle (pitch frequency) and a pitch gain, which are calculated by the first layer coding section. Specifically, the energy of the sub-band is evaluated, after a weight is multiplied such that the sub-band including the pitch frequency and the band corresponding to a multiple of the pitch frequency is easily selected. 
         [0163]    Particularly, the sinusoid encoding method is effectively adopted as the shape coding method because the energy of the quantized shape is easily calculated. 
         [0164]    The coding apparatus, decoding apparatus, and methods thereof are not limited to Embodiments 1 and 2, but various changes can be made. For example, Embodiments 1 and 2 can be implemented by a proper combination. 
         [0165]    In Embodiments 1 and 2, the decoding apparatus performs the processing using the coded information transmitted from the coding apparatus of Embodiments 1 and 2. Alternatively, as long as the coded information includes the necessary parameter and data, the processing can be performed with no use of the coded information transmitted from the coding apparatus of Embodiments 1 and 2. 
         [0166]    In addition, the present invention is also applicable to cases where this signal processing program is recorded and written on a machine-readable recording medium such as memory, disk, tape, CD, or DVD, achieving behavior and effects similar to those of the present embodiment. 
         [0167]    Also, although cases have been described with Embodiments 1 and 2 as examples where the present invention is configured by hardware, the present invention can also be realized by software. 
         [0168]    Each function block employed in the description of each of Embodiments 1 and 2 may typically be implemented as an LSI constituted by an integrated circuit. These may be implemented individually as single chips, or a single chip may incorporate some or all of them. Here, the term LSI has been used, but the terms IC, system LSI, super LSI, and ultra LSI may also be used according to differences in the degree of integration. 
         [0169]    Further, the method of circuit integration is not limited to LSI, and implementation using dedicated circuitry or general purpose processors is also possible. After LSI manufacture, utilization of an FPGA (Field Programmable Gate Array) or a reconfigurable processor where connections and settings of circuit cells in an LSI can be reconfigured is also possible. 
         [0170]    Further, if integrated circuit technology comes out to replace LSI as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Application of biotechnology is also possible. 
         [0171]    The present invention contains the disclosures of the specification, the drawings, and the abstract of Japanese Patent Application No. 2009-237683 filed on Oct. 14, 2009, the entire contents of which being incorporated herein by reference. 
       INDUSTRIAL APPLICABILITY 
       [0172]    The coding apparatus, decoding apparatus, and methods thereof according to the present invention can improve the quality of the decoded signal in the configuration in which the quantization target band is selected in the hierarchical manner to perform the coding/decoding. For example, the coding apparatus, decoding apparatus, and methods thereof according to the present invention can be applied to the packet communication system and the mobile communication system. 
       REFERENCE SIGNS LIST 
       [0000]    
       
           101  Coding apparatus 
           103  Decoding apparatus 
           102  Transmission line 
           201  First layer coding section 
           202 ,  602  First layer decoding section 
           203 ,  207 ,  210 ,  605 ,  607 ,  609  Adder 
           204 ,  608  Orthogonal transform processing section 
           205  Second layer coding section 
           206 ,  603  Second layer decoding section 
           208  Third layer coding section 
           209 ,  604  Third layer decoding section 
           211  Fourth layer coding section 
           212  Coded information integration section 
           301 ,  311 A,  321  Band selecting section 
           302  Shape coding section 
           303  Adaptive prediction determination section 
           304  Gain coding section 
           305  Multiplexing section 
           401 ,  502 ,  802  Sub-band energy calculating section 
           402 ,  503 ,  803  Band determination section 
           701  Demultiplexing section 
           702  Shape decoding section 
           703  Adaptive prediction determination section 
           704  Gain decoding section 
           501  Perceptual characteristic calculating section 
           601  Coded information demultiplexing section 
           606  Fourth layer decoding section 
           801  Sub-band importance calculating section