Abstract:
A method and apparatus for implementing fixed codebooks as a common module are provided. In the method of implementing fixed codebooks of a plurality of speech codecs as a common module, it is possible to include only a part excluding fixed codebooks in a communication terminal or communication system, support various speech codecs without using a chip with high price and high performance, and reduce a memory space that is occupied by the speech codecs by generating a track of a fixed codebook corresponding to a speech codec based on information on the speech codec among the plurality of speech codecs and selecting a codebook vector corresponding to a target signal among codebook vectors constructed with combinations of pulses represented by the generated track. In addition, it is possible to reduce processing complexity as compared with a case of embodying the common fixed codebook module in software by embodying the common fixed codebook module in hardware. In addition, it is possible to improve the entire voice processing performance by applying the latest fixed codebook searching algorithm only to the common fixed codebook, thereby easily applying the latest fixed codebook searching algorithm to the entire voice codec.

Description:
CROSS-REFERENCE TO RELATED PATENT APPLICATION 
       [0001]    This application claims the benefit of Korean Patent Application No. 10-2007-0077810, filed on Aug. 2, 2007, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to fixed codebooks of speech codecs, and more particularly, to a method and apparatus for implementing fixed codebooks in a code excited linear prediction (hereinafter, referred to as CELP) structure and an algebraic codebook technique. 
         [0004]    2. Description of the Related Art 
         [0005]    The term “codec” is a compound word made up of the word “coder” for converting an analogue signal into a digital signal and “decoder” for converting a digital signal into an original analogue signal. A speech codec serves to convert an analogue voice signal into a digital signal composed of a relatively small amount of data, and transmits the digital signal to a distant place. The speech codec serves to convert a received digital signal into an analogue voice signal recognizable by a human being. Most speech codecs developed so far use algebraic codebooks as fixed codebooks. The entire structure of the algebraic codebooks is the same as a code excited linear prediction (CELP) structure. A technique obtained by combining the algebraic codebook technique with the CELP structure is referred to as an algebraic code excited linear prediction (hereinafter, referred to as ACELP) technique. Current speech codecs are the ACELP. 
         [0006]      FIG. 1  illustrates an entire structure of an ACELP technique. As shown in  FIG. 1 , a speech codec with a general code excited linear prediction (CELP) structure  120  is constructed with three modules. A fixed codebook module  121  generates an excitation signal and transmits the generated excitation signal to an adaptive codebook module  122 . The adaptive codebook module  122  functions as a human vocal chord. The adaptive codebook module  122  adds a pitch component to the excitation signal and transmits excitation signal to a linear predictive coding (LPC) synthesis module  123 . The LPC synthesis module  123  generates a final voice signal by mimicking the shape of a human mouth by using a tenth all-poll filter in the case of a narrow band signal or a sixteenth all-poll filter in the case of a wide band signal. The aforementioned speech codec structure is referred to as the CELP structure  120 . The ACELP technique was developed by combining an algebraic codebook technique  110 , which is one of various algorithms of a fixed codebook, with the CELP structure  120 . Hereinafter, when the algebraic codebook is exemplified, the algebraic codebook may be used as a term indicating a fixed codebook. 
         [0007]    However, although a single technique such as ACELP is used, various speech codecs are used in connection with various systems, standardization groups, and available fields. Accordingly, a user has to use a device in which a plurality of speech codecs are embedded or has to use a plurality of devices accessible to various systems so as to access the various systems. For example, when a user has to access various systems such as code division multiple access 2000 (CDMA2000), wideband code division multiple access (WCDMA), and voice-over-Internet protocol (VoIP) systems by using one communication terminal, various speech codecs currently used or likely to be used in the near future, such as enhanced variable rate codecs (EVRCs), 13k qualcomm code excited linear predictive coding (13k-QCELP), adaptive multi-rate (AMR), adaptive multi-rate wideband (AMR-WB), G.729, G.729.1, and the like have to be embedded in a chip included in the communication terminal. Accordingly, a voice processing chip has to have high performance so as to include the various speech codecs. This increases the size and cost of the chip. 
         [0008]      FIG. 2  is a graph showing a calculation amount ratio of each module of a speech codec. In general, a module that performs the largest amount of calculation is an algebraic codebook module.  FIG. 2  illustrates complexity of each module measured by an encoder of an AMR-WB that is a standard codec of the third generation partnership project (3GPP) and a standard speech codec of the telecommunication standardization sector of the international telecommunication union (ITU-T). In  FIG. 2 , an amount of calculation performed by an algebraic codebook module  201  is greater than 54% of the total calculation amount. Accordingly, it is necessary to decrease the complexity of the fixed codebook that performs the largest amount of calculation in the calculation of the speech codec to which the ACELP technique is applied, when the various speech codecs are embedded in a chip. 
       SUMMARY OF THE INVENTION 
       [0009]    The present invention provides a method and apparatus for implementing fixed codebooks capable of removing inconvenience that various speech codecs required by various systems so as to allow a communication system for processing a voice signal to access different networks have to be embedded in a single communication terminal and solving a problem that costs is increased due to a high performance chip needed to process a voice signal by excessively using a memory for the speech codecs in the communication terminal. 
         [0010]    According to an aspect of the present invention, there is provided a method of implementing fixed codebooks of a plurality of speech codecs as a common module, the method comprising: generating a track of a fixed codebook corresponding to a speech codec based on information on the speech codec among the plurality of speech codecs; and selecting a codebook vector corresponding to a target signal among codebook vectors constructed with combinations of pulses represented by the generated track. 
         [0011]    According to another aspect of the present invention, there is provided a computer-readable recording medium having embodied thereon a computer program for executing the aforementioned method of implementing fixed codebooks of a plurality of speech codecs as a common module. 
         [0012]    According to an aspect of the present invention, there is provided an apparatus for implementing fixed codebooks of a plurality of speech codecs, the apparatus comprising: a track generator generating a track of a fixed codebook corresponding to a speech codec based on information on the speech codec among the plurality of speech codecs; and a codebook selector selecting a codebook vector corresponding to a target signal among codebook vectors constructed with combinations of pulses represented by the generated track. 
         [0013]    The present invention provides a method and apparatus for implementing fixed codebooks capable of including only a part excluding fixed codebooks in a communication terminal or communication system by embodying fixed codebooks commonly used for various speech codecs as a common module, supporting various speech codecs without using a chip with high price and high performance, and reducing a memory space that is occupied by the speech codecs, in order to remove inconvenience that various speech codecs required by various systems so as to allow a conventional communication system for processing a voice signal to access different networks have to be embedded in a single communication terminal and in order to solve a problem that costs is increased due to a high performance chip needed to process a voice signal by excessively using a memory for the speech codecs in the communication terminal. In addition, it is possible to reduce processing complexity as compared with a case of embodying the common fixed codebook module in software by embodying the common fixed codebook module in hardware. In addition, it is possible to improve the entire voice processing performance by applying the latest fixed codebook searching algorithm only to the common fixed codebook, thereby easily applying the latest fixed codebook searching algorithm to the entire voice codec. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]    The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which: 
           [0015]      FIG. 1  illustrates an entire structure of an algebraic code excited linear prediction (ACELP) technique; 
           [0016]      FIG. 2  is a graph showing a calculation amount ratio of each module of a speech codec; 
           [0017]      FIG. 3  illustrates a concept of a fixed codebook embodied as a common module according to an embodiment of the present invention; 
           [0018]      FIG. 4  illustrates a structure of a fixed codebook embodied as a common module according to an embodiment of the present invention; 
           [0019]      FIG. 5  illustrates a fixed codebook embodied as a common module and input parameters according to an embodiment of the present invention; 
           [0020]      FIG. 6  is a flowchart of a method of generating a track in a track generator of a fixed codebook according to an embodiment of the present invention; and 
           [0021]      FIG. 7  illustrates a function of repeatedly searching for a codebook in a codebook selector of a fixed codebook according to an embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0022]    Hereinafter, the present invention will be described more fully with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. 
         [0023]      FIG. 3  illustrates a concept of a fixed codebook embodied as a common module according to an embodiment of the present invention. In this embodiment, a structure obtained by constructing an algebraic codebook module, which is a fixed codebook commonly used for various speech codecs, as a single module is suggested, in consideration of a fact that most existing speech codecs use a code excited linear prediction (CELP) technique using a fixed codebook, specifically, an algebraic code excited linear prediction (ACELP) technique. 
         [0024]    A conventional modulation system  301  is embodied so that various speech codecs such as AMR, EVRC, 13k-QCELP, G.729, and the like are embedded in the conventional modulation system  301 . Since the conventional modulation system  301  has no common module, various codecs have to be embedded in the conventional modulation system  301 . Unlike the conventional modulation system  301 , in a speech codec  302  according the embodiment of the present invention, an algebraic codebook  303 , which is a fixed codebook, is embodied in each speech codec as a common module. Accordingly, in the embodiment, only the modules except the algebraic codebook have to be embodied in each speech codec based on the algebraic codebook. That is, the voice processing system may be embodied so as to share the algebraic codebook in which each speech codec is optimized and a search module for the algebraic codebook. Hereinafter, basic terminology to be used in an embodiment of  FIG. 4  will be briefly described. The structure of the fixed codebook and a method of implementing the fixed codebooks as a common module will be described in detail. 
         [0025]    The algebraic codebook uses an interleaved single-pulse permutation (ISPP) structure. The ISPP represents an excitation signal by using a plurality of unit pulses. Each pulse is constructed with an algebraic sign with amplitude of +1 or −1. Accordingly, the algebraic codebook can express various excitation signals by using a small number of bits as compared with another fixed codebook algorithm. Thus, it is possible to efficiently search the algebraic codebook. In general, the excitation signal indicates a remaining signal after allowing an analogue voice signal to pass through an LP analysis, an adaptive codebook, an LPC and a pitch analysis. In the embodiment, the excitation signal indicates a remaining signal that is finally input so as to search for the fixed codebook. 
         [0026]    The codebook indicates a representative value of a remaining excitation signal after extracting a formant and a pitch from an analogue voice signal of a human being. The algebraic codebook represents the representative value by using the aforementioned unit pulse of +1 or −1. The algebraic codebook includes information on a position of the unit pulse. A group consisting of positions of a series of pulses is referred to as a track. In the algebraic codebook, a predetermined number of pulses are allocated to a predetermined track in order to effectively model the representatives of the excitation signals. The number of pulse position groups and position information included in the pulse position groups are changed based on the type of the speech codec. 
         [0027]      FIG. 4  illustrates a structure of a fixed codebook embodied as a common module according to an embodiment of the present invention. As shown in  FIG. 3 , speech codecs  411  and  412  may be various speech codecs. Since the speech codecs commonly use an algebraic codebook module  420 , the shown speech codecs  411  and  412  correspond to only a part excluding the algebraic codebook module  420 . In the speech codecs, a form of an algebraic codebook is changed based on features such as a frame length, a bit rate, and a bandwidth. Thus, a track indicating the aforementioned pulse group is changed. 
         [0028]    In order to search the algebraic codebook through the common algebraic codebook module  420 , the algebraic codebook and the track have to be defined. Accordingly, as shown in  FIG. 4 , the common algebraic codebook  420  includes a track generator  421  and a codebook selector  422 . The track generator  421  generates a track by receiving track information from each speech codec  411  and  412 . The codebook selector  422  selects an optimal codebook vector based on the generated track. The codebook vector is constructed by selecting at least one pulse for each track. Since the number of pulses to be selected for each track is changed based on the type of the speech codec, the codebook vector that is the combination of the selected pulses is also various. 
         [0029]    Next, the optimal codebook vector indicates a codebook vector corresponding to a signal in which a mean-square error (MSE) of a found signal and a target signal is minimized. Here, the found signal indicates a signal found to be most similar to the input excitation signal. The target signal indicates an original input excitation signal. That is, a signal in which a degree of distortion of a signal encoded through the speech codec with respect to the input signal is minimized is regarded as an optimal encoding signal. The codebook vector with respect to a position of which MSE is minimized is selected. Hereinafter, the track information input into the common algebraic codebook module and other input parameters will be described through a practical example of the entire ACELP structure. 
         [0030]      FIG. 5  illustrates a fixed codebook embodied as a common module and input parameters according to an embodiment of the present invention. In order to explain the track information and a parameter to be input into the common algebraic codebook module, G.729 speech codec is described as an example. The G.729 speech codec to be described is a standard of ITU speech codec. It will be understood by those of ordinary skill in the art that various speech codecs belonging to the ACELP structure are applicable, in addition to the G.729 speech codec. When the G.729 speech codec is constructed with four unit pulses so as to represent the excitation signal, the excitation signal c(n) will be represented by Equation 1 as follows: 
         [0000]        c ( n )= s   0 δ( n−m   0 )+ s   1 δ( n−m   1 )+ s   2 δ( n−m   2 )+ s   3 δ( n−m   3 )  [Equation 1] 
         [0000]    δ( n ):unit pulse
 
where, s i  indicates a sign of an i-th pulse, and m i  indicates a position of the i-th pulse. In the case of G.729, four tracks exist. A pulse is found in each track. The track is constructed as shown in Table 1.
 
         [0000]    
       
         
               
               
               
               
             
           
               
                   
                 TABLE 1 
               
               
                   
                   
               
               
                   
                 Pulse 
                 Sign 
                 Position 
               
               
                   
                   
               
             
             
               
                   
                 i 0   
                 s 0 : ±1 
                 m 0 : 0, 5, 10, 15, 20, 25, 30, 35 
               
               
                   
                 i 1   
                 s 1 : ±1 
                 m 1 : 1, 6, 11, 16, 21, 26, 31, 36 
               
               
                   
                 i 2   
                 s 2 : ±1 
                 m 2 : 2, 7, 12, 17, 22, 27, 32, 37 
               
               
                   
                 i 3   
                 s 3 : ±1 
                 m 3 : 3, 8, 13, 18, 23, 28, 33, 38, 
               
               
                   
                   
                   
                 4, 9, 14, 19, 24, 29, 34, 39 
               
               
                   
                   
               
             
          
         
       
     
         [0031]    As shown in  FIG. 4 , when a code vector in which the MSE with respect to the target signal is minimized in searching for the fixed codebook is c k , in the code vector c k , a performance value T k  of the code vector c k  is maximized. That is, the performance values T k  of all the selectable code vectors in the searching for the fixed codebook are calculated. It is possible to obtain the optimal code vector c k  by selecting a code vector corresponding to the greatest performance value T k  from among the performance values T k . 
         [0000]    
       
         
           
             
               
                 
                   
                     T 
                     k 
                   
                   = 
                   
                     
                       
                         C 
                         k 
                         2 
                       
                       
                         E 
                         k 
                       
                     
                     = 
                     
                       
                         
                           ( 
                           
                             
                               ∑ 
                               
                                 n 
                                 = 
                                 0 
                               
                               39 
                             
                              
                             
                               
                                 d 
                                  
                                 
                                   ( 
                                   n 
                                   ) 
                                 
                               
                                
                               
                                 
                                   c 
                                   k 
                                 
                                  
                                 
                                   ( 
                                   n 
                                   ) 
                                 
                               
                             
                           
                           ) 
                         
                         2 
                       
                       
                         
                           c 
                           k 
                           t 
                         
                          
                         Φ 
                          
                         
                             
                         
                          
                         
                           c 
                           k 
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     2 
                   
                   ] 
                 
               
             
           
         
       
     
         [0032]    Here, k is an index of a code vector, c k   t  is a transpose of a code vector c k , and n is used as a sample index. The performance value T k  is defined as a performance value of the code vector c k . A vector d(n) is represented by a correlation equation between the target signal and an impulse response which is Equation 3 as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     d 
                      
                     
                       ( 
                       n 
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         n 
                       
                       39 
                     
                      
                     
                       
                         
                           x 
                           ′ 
                         
                          
                         
                           ( 
                           n 
                           ) 
                         
                       
                        
                       
                         h 
                          
                         
                           ( 
                           
                             i 
                             - 
                             n 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     3 
                   
                   ] 
                 
               
             
           
         
       
     
         [0000]    where x′(n) is a target signal, and h(n) is an impulse response of a synthesis filter. The target signal is a reference signal for measuring performance of each code vector. The target signal is calculated through an LPC searching process and a pitch searching process. 
         [0033]    φ represents a correlation equation of the impulse response h(n). When H is defined as a lower triangular Toepliz convolution matrix, φ=H t H is represented by Equation 4. 
         [0000]    
       
         
           
             
               
                 
                   
                     φ 
                      
                     
                       ( 
                       
                         i 
                         , 
                         j 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         n 
                         = 
                         j 
                       
                       L 
                     
                      
                     
                       
                         h 
                          
                         
                           ( 
                           
                             n 
                             - 
                             i 
                           
                           ) 
                         
                       
                        
                       
                         h 
                          
                         
                           ( 
                           
                             n 
                             - 
                             j 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     4 
                   
                   ] 
                 
               
             
           
         
       
     
         [0034]    Since the codebook vector C k  practically includes four non-zero vectors, it is possible to search for a codebook with high speed. A correlation equation of the numerator term of Equation 2 is represented by Equation 5 as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         C 
                         = 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               0 
                             
                             3 
                           
                            
                           
                             
                               s 
                               i 
                             
                              
                             
                               d 
                                
                               
                                 ( 
                                 
                                   m 
                                   i 
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                         
                           
                              
                             
                               d 
                                
                               
                                 ( 
                                 
                                   m 
                                   0 
                                 
                                 ) 
                               
                             
                              
                           
                           + 
                           
                              
                             
                               d 
                                
                               
                                 ( 
                                 
                                   m 
                                   1 
                                 
                                 ) 
                               
                             
                              
                           
                           + 
                           
                              
                             
                               d 
                                
                               
                                 ( 
                                 
                                   m 
                                   2 
                                 
                                 ) 
                               
                             
                              
                           
                           + 
                           
                              
                             
                               d 
                                
                               
                                 ( 
                                 
                                   m 
                                   3 
                                 
                                 ) 
                               
                             
                              
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     5 
                   
                   ] 
                 
               
             
           
         
       
     
         [0000]    where, m i  indicates a position of an i-th pulse, and s i  indicates an amplitude of the i-th pulse. An energy equation of the denominator term of Equation 2 is represented by Equation 6. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         E 
                         = 
                           
                          
                         
                           
                             
                               s 
                               0 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     
                                       
                                         
                                           s 
                                           o 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               0 
                                             
                                             , 
                                             
                                               m 
                                               0 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                       
                                         
                                           s 
                                           1 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               1 
                                             
                                             , 
                                             
                                               m 
                                               0 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                     
                                   
                                 
                                 
                                   
                                     
                                       
                                         
                                           s 
                                           2 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               2 
                                             
                                             , 
                                             
                                               m 
                                               0 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                       
                                         
                                           s 
                                           3 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               3 
                                             
                                             , 
                                             
                                               m 
                                               0 
                                             
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                 
                               
                               ) 
                             
                           
                           + 
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           
                             
                               s 
                               1 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     
                                       
                                         
                                           s 
                                           o 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               0 
                                             
                                             , 
                                             
                                               m 
                                               1 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                       
                                         
                                           s 
                                           1 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               1 
                                             
                                             , 
                                             
                                               m 
                                               1 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                     
                                   
                                 
                                 
                                   
                                     
                                       
                                         
                                           s 
                                           2 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               2 
                                             
                                             , 
                                             
                                               m 
                                               1 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                       
                                         
                                           s 
                                           3 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               3 
                                             
                                             , 
                                             
                                               m 
                                               1 
                                             
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                 
                               
                               ) 
                             
                           
                           + 
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           
                             
                               s 
                               2 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     
                                       
                                         
                                           s 
                                           o 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               0 
                                             
                                             , 
                                             
                                               m 
                                               2 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                       
                                         
                                           s 
                                           1 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               1 
                                             
                                             , 
                                             
                                               m 
                                               2 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                     
                                   
                                 
                                 
                                   
                                     
                                       
                                         
                                           s 
                                           2 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               2 
                                             
                                             , 
                                             
                                               m 
                                               2 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                       
                                         
                                           s 
                                           3 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               m 
                                               3 
                                             
                                             , 
                                             
                                               m 
                                               2 
                                             
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                 
                               
                               ) 
                             
                           
                           + 
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           
                             s 
                             3 
                           
                            
                           
                             ( 
                             
                               
                                 
                                   
                                     
                                       
                                         s 
                                         o 
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             m 
                                             0 
                                           
                                           , 
                                           
                                             m 
                                             3 
                                           
                                         
                                         ) 
                                       
                                     
                                     + 
                                     
                                       
                                         s 
                                         1 
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             m 
                                             1 
                                           
                                           , 
                                           
                                             m 
                                             3 
                                           
                                         
                                         ) 
                                       
                                     
                                     + 
                                   
                                 
                               
                               
                                 
                                   
                                     
                                       
                                         s 
                                         2 
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             m 
                                             2 
                                           
                                           , 
                                           
                                             m 
                                             3 
                                           
                                         
                                         ) 
                                       
                                     
                                     + 
                                     
                                       
                                         s 
                                         3 
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             m 
                                             3 
                                           
                                           , 
                                           
                                             m 
                                             3 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 0 
                               
                               3 
                             
                              
                             
                               φ 
                                
                               
                                 ( 
                                 
                                   
                                     m 
                                     i 
                                   
                                   , 
                                   
                                     m 
                                     i 
                                   
                                 
                                 ) 
                               
                             
                           
                           + 
                           
                             2 
                              
                             
                               
                                 ∑ 
                                 
                                   i 
                                   = 
                                   0 
                                 
                                 2 
                               
                                
                               
                                 
                                   ∑ 
                                   
                                     j 
                                     = 
                                     
                                       i 
                                       + 
                                       1 
                                     
                                   
                                   3 
                                 
                                  
                                 
                                   
                                     s 
                                     i 
                                   
                                    
                                   
                                     s 
                                     j 
                                   
                                    
                                   
                                     φ 
                                      
                                     
                                       ( 
                                       
                                         
                                           m 
                                           i 
                                         
                                         , 
                                         
                                           m 
                                           j 
                                         
                                       
                                       ) 
                                     
                                   
                                 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     6 
                   
                   ] 
                 
               
             
           
         
       
     
         [0035]    In order to reduce complexity of the searching process, in the correlation equation C and the energy E, only a value needed for a practical searching process is calculated before the searching process. Previously calculated values are sequentially stored in the necessary order for the searching process. Thus, it is possible to search for a codebook with high speed. In the correlation equation C, a sign sign[d(i)] and an absolute value are separately stored previously. The energy E is separately stored as a form of Equation 7. 
         [0000]      φ′( i,j )=sign[ d ( i )]sign[ d ( j )]φ( i,j )  [Equation 7] 
         [0036]    i=0, . . . , 39 
         [0037]    j=i+1, . . . , 39 
         [0038]    if i=j, then 
         [0000]      φ′( i,j )=0.5φ′( i,j ) 
         [0039]    i=0, . . . , 39 
         [0040]    Accordingly, Equation 6 that is the energy term may be represented by Equation 8. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           E 
                           / 
                           2 
                         
                         = 
                           
                          
                         
                           
                             
                               φ 
                               ′ 
                             
                              
                             
                               ( 
                               
                                 
                                   m 
                                   0 
                                 
                                 , 
                                 
                                   m 
                                   0 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               φ 
                               ′ 
                             
                              
                             
                               ( 
                               
                                 
                                   m 
                                   1 
                                 
                                 , 
                                 
                                   m 
                                   1 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               φ 
                               ′ 
                             
                              
                             
                               ( 
                               
                                 
                                   m 
                                   0 
                                 
                                 , 
                                 
                                   m 
                                   1 
                                 
                               
                               ) 
                             
                           
                           + 
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           
                             
                               φ 
                               ′ 
                             
                              
                             
                               ( 
                               
                                 
                                   m 
                                   2 
                                 
                                 , 
                                 
                                   m 
                                   2 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               
                                 
                                   φ 
                                   ′ 
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       m 
                                       0 
                                     
                                     , 
                                     
                                       m 
                                       2 
                                     
                                   
                                   ) 
                                 
                               
                               ++ 
                             
                              
                             
                               
                                 φ 
                                 ′ 
                               
                                
                               
                                 ( 
                                 
                                   
                                     m 
                                     1 
                                   
                                   , 
                                   
                                     m 
                                     2 
                                   
                                 
                                 ) 
                               
                             
                           
                           + 
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           
                             
                               φ 
                               ′ 
                             
                              
                             
                               ( 
                               
                                 
                                   m 
                                   3 
                                 
                                 , 
                                 
                                   m 
                                   3 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               φ 
                               ′ 
                             
                              
                             
                               ( 
                               
                                 
                                   m 
                                   0 
                                 
                                 , 
                                 
                                   m 
                                   3 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               φ 
                               ′ 
                             
                              
                             
                               ( 
                               
                                 
                                   m 
                                   1 
                                 
                                 , 
                                 
                                   m 
                                   3 
                                 
                               
                               ) 
                             
                           
                           + 
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           
                             φ 
                             ′ 
                           
                            
                           
                             ( 
                             
                               
                                 m 
                                 2 
                               
                               , 
                               
                                 m 
                                 3 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     8 
                   
                   ] 
                 
               
             
           
         
       
     
         [0041]    Up to now, general contents of searching for the algebraic codebook have been described through the example of G.729. 
         [0042]    As described in  FIG. 4 , a structure of a common algebraic codebook module  520  for searching for an algebraic codebook in  FIG. 5  is constructed with a track generator  521  and a codebook searcher  522 . First, a codec interface  530  transmits track information corresponding to a speech codec identified by identifying a type of a speech codec currently to be used to the track generator  521  of the common fixed codebook module as an input parameter. As described above, since the structure of the track is changed based on the type of the speech codec, the codec interface  530  serves to allow the track generator  521  to generate a track suitable for the speech codec to be used. Although the codec interface  530  is separately shown in  FIG. 5 , in practice, it is possible to embody the codec interface  530  so as to be included in the track generator  521 . 
         [0043]    The track generator  521  generates a track of an algebraic codebook based on the input track information. The track information may include the number N of tracks for the speech codec, the number of positions L[N] included in each track, and position information P[M] included in each track. A defined track T is expressed as a two-dimensional array. Rows indicate tracks. Columns indicate position values of pulses belonging to the tracks. 
         [0044]    Next, the codebook selector  522  receives a matrix φ, a correlation value d(n) of a target signal and an impulse response, and the number I[N] of pulses to be found for each track as parameters and selects an optimal codebook vector. As shown in  FIG. 4 , the optimal codebook vector is selected by searching for the codebook vector in which the MSE is minimized. The procedure of searching for the codebook is described in relation to Equation 2. 
         [0045]    A procedure of generating the matrix φ and the correlation value d(n) of the target signal and the impulse response in  FIG. 5  is described through an adaptive multi-rate wideband (AMR-WB) ( 511 ) and a variable multi-rate wideband (VMR-WB) ( 512 ). The AMR-WB is a speech codec belonging to the third generation partnership project (3GPP) standard group. The VMR-WB is a speech codec belonging to the 3GPP2 standard group. The AMR-WB and the VMR-WB have ACELP structures. Accordingly, in  FIG. 5 , the AMR-WB  511  and VMR-WB  512  shows an encoding process of the ACELP as follows. First, the target signal is calculated through the LP analysis by receiving a voice signal of 16 kHz. The matrix φ and the correlation value d(n) of the target signal and impulse response are calculated by allowing the calculation result to pass through the adaptive codebook module. The calculated matrix φ and the correlation value d(n) are input into the codebook selector  522 . Accordingly, the optimal codebook vector is selected. 
         [0046]      FIG. 6  is a flowchart of a method of generating a track in a track generator of a fixed codebook according to an embodiment of the present invention. 
         [0047]    In operation  601 , in order to obtain an array size for a track, the maximum value is obtained from the number of positions belonging to each track. As exemplified in Table 1, this is because the number of positions belonging to each track for each speech codec may be different. Accordingly, an equation for searching for the maximum value from the number L[N] of positions included in each track and storing the maximum value in L max  is represented as operation  604 . 
         [0048]    In operation  602 , a memory needed to generate a track is allocated based on the maximum value obtained in operation  601 . The number of columns in an array T to which the memory is allocated is defined as the number N of the tracks. The number of rows is defined as the L max . That is, the array T is represented as T[N][L max ]. 
         [0049]    In operation  603 , position information is stored in each track of the array to which the memory is allocated from position information P[M] included in each track. Here, M is the total number of positions. The position information belonging to tracks  0  to N is sequentially stored in the vector P[M]. For example, in the algebraic codebook track of G.729 exemplified in Table 1, the vector P is represented by Equation 9. 
         [0000]      P={0,5,10,15,20,25,30,35,1,6,11,16,21,26,31,36,2,7,12,17,22,27,32,37,3,8,13,18,23,28,33,38,4,9,14,19,24,29,34,39} 
         [0050]    Operation  605  represents operation  603  as a simple pseudo-code. A procedure of allocating the position information from the vector P[k] in which the position information is stored to a track and storing the position information. 
         [0051]      FIG. 7  illustrates a function of repeatedly searching for a codebook in a codebook selection unit of a fixed codebook according to an embodiment of the present invention. 
         [0052]    A procedure of searching for the optimal codebook may be constructed with repetitive loops of which the number is the same as the number of tracks. However, since the number of tracks is changed based on the speech codec, the number of repetitions is dynamically constructed in the procedure of searching for the optimal codebook. In  FIG. 7 , a dynamic loop structure is embodied as a pseudo code by using a recursive method among methods of embodying algorithm. In  FIG. 7 , a function CodeBookSearch( ) is repeatedly called by increasing an array number for a track until satisfying an end condition of a program. In addition, when a value less than the existing MSE is found by repeatedly calculating an MSE value, an array Oip          in which the optimal position value is stored is updated. 
         [0053]    Although the function embodied by using the recursive method is exemplified among the methods of embodying algorithm, it is possible for those of ordinary skill in the art to embody a method of searching for an optimal codebook by dynamically controlling the number of searching processes by receiving the number of tracks by using various methods of embodying algorithm such as an iterative method, in addition to a recursive method. 
         [0054]    Since each speech codec includes a fixed codebook in a conventional technique, the speech codec is embodied as a type of software. Unlike the conventional technique, when a fixed codebook is embodied as a common module according to embodiments of the present invention, it is possible to manufacture only the fixed codebook module commonly used by each speech codec as hardware. A difference between a case where the fixed codebook is manufactured in hardware and a case where the fixed codebook is manufactured in software is exemplified through the AMR-WB as follows. First, when the algebraic codebook is manufactured in hardware, the processing complexity is assumed to be reduced to a tenth of that in the case where the algebraic codebook is manufacture in software. In this case, when the algebraic codebook is manufactured in hardware, the processing complexity is reduced to about 50% of that in the case where the algebraic codebook is manufacture in software. The complexity for each module is represented in Table 2. 
         [0000]    
       
         
               
               
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                   
                 TABLE 2 
               
             
             
               
                   
                   
               
               
                   
                 Complexity 
                   
               
               
                   
                 ratio (%) 
               
             
          
           
               
                   
                 Module 
                 Before 
                 After 
               
               
                   
                   
               
             
          
           
               
                   
                 LPC 
                 17 
                 17 
               
               
                   
                 Open-loop pitch 
                 5 
                 5 
               
               
                   
                 Adaptive codebook 
                 19 
                 19 
               
               
                   
                 Algebraic codebook 
                 54 
                 5.4 
               
               
                   
                 Others 
                 5 
                 5 
               
               
                   
                 Total 
                 100 
                 51.4 
               
               
                   
                   
               
             
          
         
       
     
         [0055]    While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. The exemplary embodiments should be considered in descriptive sense only and not for purposes of limitation. Therefore, the scope of the invention is defined not by the detailed description of the invention but by the appended claims, and all differences within the scope will be construed as being included in the present invention.