Voiced/unvoiced classification of speech for use in speech decoding during frame erasures
Abstract
A speech decoder includes a first portion comprising an adaptive codebook and a second portion comprising a fixed codebook. The decoder generates a speech excitation signal selectively based on output signals from said first and second portions when said decoder fails to receive reliably at least a portion of a current frame of compressed speech information. The decoder does this by classifying the speech signal to be generated as periodic or non-periodic and then generating an excitation signal based on this classification. If the speech signal is classified as periodic, the excitation signal is generated based on the output signal from the first portion and not on the output signal from the second portion. If the speech signal is classified as non-periodic, the excitation signal is generated based on the output signal from said second portion and not on the output signal from said first portion.

Term
Term ended
Projected expiry passed 29 May 2016, 10.3 years ago.
- Priority
- Filed
- Published
- Projected expiry
- Today
20 claims: 2 independent, 18 dependent
- 1A method for use in a speech decoder which includes a first portion comprising an adaptive codebook and a second portion comprising a fixed codebook, said decoder generating a speech excitation signal selectively based on output signals from said first and second portions when said decoder fails to receive reliably at least a portion of a current frame of compressed speech information, the method comprising:classifying a speech signal to be generated by the decoder as periodic or non-periodic;based on the classification of the speech signal, either generating said excitation signal based on the output signal from said first portion and not on the output signal from said second portion if the speech signal is classified as periodic, or generating said excitation signal based on the output signal from said second portion and not on the output signal from said first portion if the speech signal is classified as non-periodic.
- 11A speech decoder for generating a speech signal based on compressed speech information received from a communication channel, the decoder comprising:an adaptive codebook memory;a fixed codebook memory;means for classifying the speech signal to be generated by the decoder as periodic or non-periodic;means for forming an excitation signal, said means comprising first means for forming an excitation signal when said decoder fails to receive reliably at least a portion of a current frame of compressed speech information, said first means forming said excitation signal based on a vector signal from said adaptive codebook memory and not based on a vector signal from said fixed codebook memory, when the speech signal to be generated is classified as periodic, and based on a vector signal from said fixed codebook memory and not on a vector signal from said adaptive codebook memory, when said speech signal to be generated is classified as non-periodic;and a linear predictive filter for synthesizing a speech signal based on said excitation signal.
Independent claims2
270 paragraphs, as filed
<u>Field of the Invention</u>
0001The present invention relates generally to speech coding arrangements for use in communication systems, and more particularly to the ways in which such speech coders function in the event of burst-like errors in transmission.
<u>Background of the Invention</u>
0002Many communication systems, such as cellular telephone and personal communications systems, rely on wireless channels to communicate information. In the course of communicating such information, wireless communication channels can suffer from several sources of error, such as multipath fading. These error sources can cause, among other things, the problem <i>of frame erasure. Erasure</i> refers to the total loss or whole or partial corruption of a set of bits communicated to a receiver. <i>A frame</i> is a predetermined fixed number of bits which may be communicated as a block through a communication channel. A frame may therefore represent a time-segment of a speech signal.
0003If a frame of bits is totally lost, then the receiver has no bits to interpret. Under such circumstances, the receiver may produce a meaningless result. If a frame of received bits is corrupted and therefore unreliable, the receiver may produce a severely distorted result. In either case, the frame of bits may be thought of as "erased" in that the frame is unavailable or unusable by the receiver.
0004As the demand for wireless system capacity has increased, a need has arisen to make the best use of available wireless system bandwidth. One way to enhance the efficient use of system bandwidth is to employ a signal compression technique. For wireless systems which carry speech signals, speech compression (or <i>speech coding)</i> techniques may be employed for this purpose. Such speech coding techniques include analysis-by-synthesis speech coders, such as the well-known Code-Excited Linear Prediction (or <i>CELP)</i> speech coder.
0005The problem of packet loss in packet-switched networks employing speech coding arrangements is very similar to frame erasure in the wireless context. That is, due to packet loss, a speech decoder may either fail to receive a frame or receive a frame having a significant number of missing bits. In either case, the speech decoder is presented with the same essential problem -- the need to synthesize speech despite the loss of compressed speech information. Both "frame erasure" and "packet loss" concern a communication channel (or network) problem which causes the loss of transmitted bits. For purposes of this description, the term "frame erasure" may be deemed to include "packet loss."
0006Among other things, CELP speech coders employ a codebook of <i>excitation signals</i> to encode an original speech signal. These excitation signals, scaled by an excitation gain, are used to "excite" filters which synthesize a speech signal (or some precursor to a speech signal) in response to the excitation. The synthesized speech signal is compared to the original speech signal. The codebook excitation signal is identified which yields a synthesized speech signal which most closely matches the original signal. The identified excitation signal's <i>codebook index</i> and <i>gain</i> representation (which is often itself a gain codebook index) are then communicated to a CELP decoder (depending upon the type of CELP system, other types of information, such as linear prediction (LPC) filter coefficients, may be communicated as well). The decoder contains codebooks identical to those of the CELP coder. The decoder uses the transmitted indices to select an excitation signal and gain value. This selected scaled excitation signal is used to excite the decoder's LPC filter. Thus excited, the LPC filter of the decoder generates a decoded (or quantized) speech signal -- the same speech signal which was previously determined to be closest to the original speech signal.
0007Some CELP systems also employ other components, such as a <i>periodicity model (e.g.,</i> a <i>pitch-predictive filter</i> or an <i>adaptive codebook).</i> Such a model simulates the periodicity of voiced speech. In such CELP systems, parameters relating to these components must also be sent to the decoder. In the case of an adaptive codebook, signals representing a <i>pitch-period (delay)</i> and adaptive codebook gain must also be sent to the decoder so that the decoder can recreate the operation of the adaptive codebook in the speech synthesis process.
0008Wireless and other systems which employ speech coders may be more sensitive to the problem of frame erasure than those systems which do not compress speech. This sensitivity is due to the reduced redundancy of coded speech (compared to uncoded speech) making the possible loss of each transmitted bit more significant. In the context of a CELP speech coders experiencing frame erasure, excitation signal codebook indices and other signals representing speech in the frame may be either lost or substantially corrupted preventing proper synthesis of speech at the decoder. For example, because of the erased frame(s), the CELP decoder will not be able to reliably identify which entry in its codebook should be used to synthesize speech. As a result, speech coding system performance may degrade significantly.
0009Because frame erasure causes the loss of excitation signal codebook indicies, LPC coefficients, adaptive codebook delay information, and adaptive and fixed codebook gain information, normal techniques for synthesizing an excitation signal in a speech decoder are ineffective. Therefore, these normal techniques must be replaced by alternative measures.
<u>Summary of the Invention</u>
0010In accordance with the present invention, a speech decoder includes a first portion comprising an adaptive codebook and a second portion comprising a fixed codebook. The decoder generating a speech excitation signal selectively based on output signals from said first and second portions when said decoder fails to receive reliably at least a portion of a current frame of compressed speech information. The decoder does this by classifying the speech signal to be generated as periodic or non-periodic and then generating an excitation signal based on this classification.
0011If the speech signal is classified as periodic, the excitation signal is generated based on the output signal from the first portion and not on the output signal from the second portion. If the speech signal is classified as non-periodic, the excitation signal is generated based on the output signal from said second portion and not on the output signal from said first portion.
0012See sections II.B.1. and 2. of the Detailed Description for a discussion relating to the present invention.
<u>Brief Description of the Drawings</u>
0013Figure 1 presents a block diagram of a G.729 Draft decoder modified in accordance with the present invention.
0014Figure 2 presents an illustrative wireless communication system employing the embodiment of the present invention presented in Figure 1
<u>Detailed Description</u>
I. Introduction
0015The present invention concerns the operation of a speech coding system experiencing frame erasure -- that is, the loss of a group of consecutive bits in the compressed bit-stream, which group is ordinarily used to synthesize speech. The description which follows concerns features of the present invention applied illustratively to an 8 kbit/s CELP speech coding system proposed to the ITU for adoption as its international standard G.729. For the convenience of the reader, a preliminary draft recommendation for the G.729 standard is attached hereto as an Appendix (the draft will be referred to herein as the "G.729 Draft"). The G.729 Draft includes detailed descriptions of the speech encoder and decoder <i>(see</i> G.729 Draft, sections 3 and 4, respectively). The illustrative embodiment of the present invention is directed to modifications of normal G.729 decoder operation, as detailed in G.729 Draft section 4.3. No modifications to the encoder are required to implement the present invention.
0016The applicability of the present invention to the proposed G.729 standard notwithstanding, those of ordinary skill in the art will appreciate that features of the present invention have applicability to other speech coding systems.
0017Knowledge of the erasure of one or more frames is an input signal, <i>e,</i> to the illustrative embodiment of the present invention. Such knowledge may be obtained in any of the conventional ways well-known in the art. For example, whole or partially corrupted frames may be detected through the use of a conventional error detection code. When a frame is determined to have been erased, <i>e</i> = 1 and special procedures are initiated as described below. Otherwise, if not erased <i>(e =</i> 0<i>)</i> normal procedures are used. Conventional error protection codes could be implemented as part of a conventional radio transmission/reception subsystem of a wireless communication system.
0018In addition to the application of the full set of remedial measures applied as the result of an erasure (<i>e</i> = 1), the decoder employs a subset of these measures when a parity error is detected. A parity bit is computed based on the pitch delay index of the first of two subframes of a frame of coded speech. <i>See</i> G.729 Draft Section 3.7.1. This parity bit is computed by the decoder and checked against the parity bit received from the encoder. If the two parity bits are not the same, the delay index is said to be corrupted <i>(PE =</i> 1, in the embodiment) and special processing of the pitch delay is invoked.
0019For clarity of explanation, the illustrative embodiment of the present invention is presented as comprising individual functional blocks. The functions these blocks represent may be provided through the use of either shared or dedicated hardware, including, but not limited to, hardware capable of executing software. For example, the blocks presented in Figure 1 may be provided by a single shared processor. (Use of the term "processor" should not be construed to refer exclusively to hardware capable of executing software.)
0020Illustrative embodiments may comprise digital signal processor (DSP) hardware, such as the AT&T DSP16 or DSP32C, read-only memory (ROM) for storing software performing the operations discussed below, and random access memory (RAM) for storing DSP results. Very large scale integration (VLSI) hardware embodiments, as well as custom VLSI circuitry in combination with a general purpose DSP circuit, may also be provided.
II. An Illustrative Embodiment
0021Figure 1 presents a block diagram of a G.729 Draft decoder modified in accordance with the present invention (Figure 1 is a version of figure 3 of the G.728 standard draft which has been augmented to more clearly illustrate features of the claimed invention). In normal operation <i>(i.e.,</i> without experiencing frame erasure) the decoder operates in accordance with the G.729 Draft as described in sections 4.1 - 4.2. During frame erasure, the operation of the embodiment of Figure 1 is augmented by special processing to make up for the erasure of information from the encoder.
A. Normal Decoder Operation
0022The encoder described in the G.729 Draft provides a frame of data representing compressed speech every 10 ms. The frame comprises 80 bits and is detailed in Tables 1 and 9 of the G.729 Draft. Each 80-bit frame of compressed speech is sent over a communication channel to a decoder which synthesizes a speech (representing two subframes) signals based on the frame produced by the encoder. The channel over which the frames are communicated (not shown) may be of any type (such as conventional telephone networks, packet-based networks, cellular or wireless networks, ATM networks, <i>etc.)</i> and/or may comprise a storage medium (such as magnetic storage, semiconductor RAM or ROM, optical storage such as CD-ROM, <i>etc.).</i>
0023The illustrative decoder of Figure 1 includes both an adaptive codebook (ACB) portion and a fixed codebook (FCB) portion . The ACB portion includes ACB 50 and a gain amplifier 55. The FCB portion includes a FCB 10, a pitch predictive filter (PPF) 20, and gain amplifier 30. The decoder decodes transmitted parameters <i>(see</i> G.729 Draft Section 4.1) and performs synthesis to obtain reconstructed speech.
0024The FCB 10 operates in response to an index, I, sent by the encoder. Index I is received through switch 40. The FCB 10 generates a vector, <i>c(n),</i> of length equal to a subframe. <i>See</i> G.729 Draft Section 4.1.2. This vector is applied to the PPF 20. PPF 20 operates to yield a vector for application to the FCB gain amplifier 30. See G.729 Draft Sections 3.8 and 4.1.3. The amplifier, which applies a gain, <i>ĝ</i><sub><i>c</i></sub>, from the channel, generates a scaled version of the vector produced by the PPF 20. <i>See</i> G.729 Draft Section 4.1.3. The output signal of the amplifier 30 is supplied to summer 85 (through switch 42).
0025The gain applied to the vector produced by PPF 20 is determined based on information provided by the encoder. This information is communicated as codebook indices. The decoder receives these indicies and synthesizes a gain correction factor, γ̂. <i>See</i> G.729 Draft Section 4.1.4. This gain correction factor, γ̂, is supplied to code vector prediction energy (E-) processor 120. E-processor 120 determines a value of the code vector predicted error energy, <i>R̂</i>, in accordance with the following expression:<maths id="math0001" num="[dB]"><math display="block"><mrow><msup><mrow><mover accent="true"><mrow><mtext mathvariant="italic">R</mtext></mrow><mo>ˆ</mo></mover></mrow><mrow><mtext>(n)</mtext></mrow></msup><mtext> = 20 log </mtext><mover accent="true"><mrow><mtext>γ</mtext></mrow><mo>ˆ</mo></mover></mrow></math><img file="EP0747883A2_D0001.tif" /></maths> The value of <i>R̂</i> is stored in a processor buffer which holds the five most recent (successive) values of <i>R̂</i>. <i>R̂</i><sup>(n)</sup> represents the predicted error energy of the fixed code vector at subframe n. The predicted mean-removed energy of the codevector is formed as a weighted sum of past values of <i>R̂</i>:<maths id="math0002" num=""><img file="EP0747883A2_D0002.tif" /></maths> where <i>b</i> = [0.68 0.58 0.34 0.19] and where the past values of <i>R̂</i> are obtained from the buffer. This predicted energy is then output from processor 120 to a predicted gain processor 125.
0026Processor 125 determines the actual energy of the code vector supplied by codebook 10. This is done according to the following expression:<maths id="math0003" num=""><img file="EP0747883A2_D0003.tif" /></maths> where <i>i</i> indexes the samples of the vector. The predicted gain is then computed as follows:<maths id="math0004" num=""><img file="EP0747883A2_D0004.tif" /></maths> where <maths id="math0005" num=""><math display="inline"><mrow><mover accent="true"><mrow><mtext mathvariant="italic">E</mtext></mrow><mo>¯</mo></mover></mrow></math><img file="EP0747883A2_D0005.tif" /></maths> is the mean energy of the FCB <i>(e.g.,</i> 30 dB)
0027Finally, the actual scale factor (or gain) is computed by multiplying the received gain correction factor, γ, by the predicted gain, <i>g'</i><sub><i>c</i></sub> at multiplier 130. This value is then supplied to amplifier 30 to scale the fixed codebook contribution provided by PPF 20.
0028Also provided to the summer 85 is the output signal generated by the ACB portion of the decoder. The ACB portion comprises the ACB 50 which generates a excitation signal, <i>v(n),</i> of length equal to a subframe based on past excitation signals and the ACB pitch-period, M, received (through switch 43) from encoder via the channel. <i>See</i> G.729 Draft Section 4.1.1. This vector is scaled by amplifier 250 based on gain factor, <i>ĝ</i><sub>p</sub>, received over the channel. This scaled vector is the output of the ACB portion.
0029Summer 85 generates an excitation signal, u(n), in response to signals from the FCB and ACB portions of the decoder. The excitation signal, u(n), is applied to an LPC synthesis filter 90 which synthesizes a speech signal based on LPC coefficients, a<sub>i</sub>, received over the channel. <i>See</i> G.729 Draft Section 4.1.6.
0030Finally, the output of the LPC synthesis filter 90 is supplied to a post processor 100 which performs adaptive postfiltering <i>(see</i> G.729 Draft Sections 4.2.1 - 4.2.4), high-pass filtering <i>(see</i> G.729 Draft Section 4.2.5), and up-scaling <i>(see</i> G.729 Draft Section 4.2.5).
B. Excitation Signal Synthesis During Frame Erasure
0031In the presence of frame erasures, the decoder of Figure 1 does not receive reliable information (if it receives anything at all) from which an excitation signal, <i>u(n),</i> may be synthesized. As such, the decoder will not know which vector of signal samples should be extracted from codebook 10, or what is the proper delay value to use for the adaptive codebook 50. In this case, the decoder must obtain a <i>substitute</i> excitation signal for use in synthesizing a speech signal. The generation of a substitute excitation signal during periods of frame erasure is dependent on whether the erased frame is classified as <i>voiced</i> (periodic) or <i>unvoiced</i> (aperiodic). An indication of periodicity for the erased frame is obtained from the post processor 100, which classifies each properly received frame as periodic or aperiodic. <i>See</i> G.729 Draft Section 4.2.1. The erased frame is taken to have the same periodicity classification as the previous frame processed by the postfilter. The binary signal representing periodicity, <i>v,</i> is determined according to postfilter variable g<sub>pit</sub>, Signal <i>v</i> = 1 if g<sub>pit</sub> > 0; else, <i>v</i> = 0. As such, for example, if the last good frame was classified as periodic, <i>v</i> = 1; otherwise <i>v</i> = 0.
1. Erasure of Frames Representing Periodic Speech
0032For an erased frame <i>(e =</i> 1) which is thought to have represented speech which is periodic <i>(v</i> = 1), the contribution of the fixed codebook is set to zero. This is accomplished by switch 42 which switches states (in the direction of the arrow) from its normal (biased) operating position coupling amplifier 30 to summer 85 to a position which decouples the fixed codebook contribution from the excitation signal, <i>u(n).</i> This switching of state is accomplished in accordance with the control signal developed by AND-gate 110 (which tests for the condition that the frame is erased, <i>e</i> = 1, and it was a periodic frame, <i>v</i> = 1). On the other hand, the contribution of the adaptive codebook is maintained in its normal operating position by switch 45 (since <i>e</i> = 1 but <i>not_v</i> = 0).
0033The pitch delay, M, used by the adaptive codebook during an erased frame is determined by delay processor 60. Delay processor 60 stores the most recently received pitch delay from the encoder. This value is overwritten with each successive pitch delay received. For the first erased frame following a "good" (correctly received) frame, delay processor 60 generates a value for M which is equal to the pitch delay of the last good frame <i>(i.e.,</i> the previous frame). To avoid excessive periodicity, for each successive erased frame processor 60 increments the value of M by one (1). The processor 60 restricts the value of M to be less than or equal to 143 samples. Switch 43 effects the application of the pitch delay from processor 60 to adaptive codebook 50 by changing state from its normal operating position to its "voiced frame erasure" position in response to an indication of an erasure of a voiced frame (since <i>e</i> = 1 and <i>v</i> = 1).
0034The adaptive codebook gain is also synthesized in the event of an erasure of a voiced frame in accordance with the procedure discussed below in section C. Note that switch 44 operates identically to switch 43 in that it effects the application of a synthesized adaptive codebook gain by changing state from its normal operating position to its "voiced frame erasure" position.
2. Erasure of Frames Representing Aperiodic Speech
0035For an erased frame <i>(e =</i> 1) which is thought to have represented speech which is aperiodic <i>(v</i> = 0), the contribution of the adaptive codebook is set to zero. This is accomplished by switch 45 which switches states (in the direction of the arrow) from its normal (biased) operating position coupling amplifier 55 to summer 85 to a position which decouples the adaptive codebook contribution from the excitation signal, <i>u(n).</i> This switching of state is accomplished in accordance with the control signal developed by AND-gate 75 (which tests for the condition that the frame is erased, <i>e =</i> 1, and it was an aperiodic frame, <i>not_v =</i> 1). On the other hand, the contribution of the fixed codebook is maintained in its normal operating position by switch 42 (since <i>e</i> = 1 but <i>v</i> = 0).
0036The fixed codebook index, I, and codebook vector sign are not available do to the erasure. In order to synthesize a fixed codebook index and sign index from which a codebook vector, <i>c(n),</i> could be determined, a random number generator 45 is used. The output of the random number generator 45 is coupled to the fixed codebook 10 through switch 40. Switch 40 is normally is a state which couples index I and sign information to the fixed codebook. However, gate 47 applies a control signal to the switch which causes the switch to change state when an erasure occurs of an aperiodic frame <i>(e</i> = 1 and <i>not_v =</i>1)<i>.</i>
0037The random number generator 45 employs the function:<maths id="math0006" num=""><math display="block"><mrow><mtext mathvariant="italic">seed</mtext><mtext> = </mtext><mtext mathvariant="italic">seed</mtext><mtext> * 31821 + 13849</mtext></mrow></math><img file="EP0747883A2_D0006.tif" /></maths> to generate the fixed codebook index and sign. The initial seed value for the generator 45 is equal to 21845. For a given coder subframe, the codebook index is the 13 least significant bits of the random number. The random sign is the 4 least significant bits of the <i>next</i> random number. Thus the random number generator is run twice for each fixed codebook vector needed. Note that a noise vector could have been generated on a sample-by-sample basis rather than using the random number generator in combination with the FCB.
0038The fixed codebook gain is also synthesized in the event of an erasure of an aperiodic frame in accordance with the procedure discussed below in section D. Note that switch 41 operates identically to switch 40 in that it effects the application of a synthesized fixed codebook gain by changing state from its normal operating position to its "voiced frame erasure" position.
0039Since PPF 20 adds periodicity (when delay is less than a subframe), PPF 20 should not be used in the event of an erasure of an aperiodic frame. Therefore switch 21 selects either the output of FCB 10 when <i>e</i> = 0 or the output of PPF 20 when <i>e =</i> 1.
C. LPC Filter Coefficients for Erased Frames
0040The excitation signal, <i>u(n),</i> synthesized during an erased frame is applied to the LPC synthesis filter 90. As with other components of the decoder which depend on data from the encoder, the LPC synthesis filter 90 must have substitute LPC coefficients, <i>a</i><sub><i>i</i></sub>, during erased frames. This is accomplished by repeating the LPC coefficients of the last good frame. LPC coefficients received from the encoder in a non-erased frame are stored by memory 95. Newly received LPC coefficients overwrite previously received coefficients in memory 95. Upon the occurrence of a frame erasure, the coefficients stored in memory 95 are supplied to the LPC synthesis filter via switch 46. Switch 46 is normally biased to couple LPC coefficients received in a good frame to the filter 90. However, in the event of an erased frame (<i>e</i> = 1), the switch changes state (in the direction of the arrow) coupling memory 95 to the filter 90.
D. Attenuation of Adaptive and Fixed Codebook Gains
0041As discussed above, both the adaptive and fixed codebooks 50, 10 have a corresponding gain amplifier 55, 30 which applies a scale factor to the codebook output signal. Ordinarily, the values of the scale factors for these amplifiers is supplied by the encoder. However, in the event of a frame erasure, the scale factor information is not available from the encoder. Therefore, the scale factor information must be synthesized.
0042For both the fixed and adaptive codebooks, the synthesis of the scale factor is accomplished by attenuation processors 65 and 115 which scale (or attenuate) the value of the scale factor used in the previous subframe. Thus, in the case of a frame erasure following a good frame, the value of the scale factor of the first subframe of the erased frame for use by the amplifier is the second scale factor from the good frame multiplied by an attenuation factor. In the case of successive erased subframes, the later erased subframe (subframe <i>n)</i> uses the value of the scale factor from the former erased subframe (subframe <i>n-</i>1<i>)</i> multiplied by the attenuation factor. This technique is used no matter how many successive erased frames (and subframes) occur. Attenuation processors 65, 115 store each new scale factor, whether received in a good frame or synthesized for an erased frame, in the event that the <i>next</i> subframe will be en erased subframe.
0043Specifically, attenuation processor 115 synthesizes the fixed codebook gain, g<sub>c</sub>, for erased subframe <i>n</i> in accordance with:<maths id="math0007" num=""><math display="block"><mrow><msub><mrow><mtext>g</mtext></mrow><mrow><mtext>c</mtext></mrow></msub><msup><mrow><mtext></mtext></mrow><mrow><mtext>(n)</mtext></mrow></msup><msub><mrow><mtext> = 0.98 g</mtext></mrow><mrow><mtext>c</mtext></mrow></msub><msup><mrow><mtext></mtext></mrow><mrow><mtext>(n-1)</mtext></mrow></msup><mtext>.</mtext></mrow></math><img file="EP0747883A2_D0007.tif" /></maths> Attenuation processor 65 synthesizes the adaptive codebook gain, g<sub>p</sub>, for erased subframe <i>n</i> in accordance with:<maths id="math0008" num=""><math display="block"><mrow><msub><mrow><mtext>g</mtext></mrow><mrow><mtext>p</mtext></mrow></msub><msup><mrow><mtext></mtext></mrow><mrow><mtext>(n)</mtext></mrow></msup><msub><mrow><mtext> = 0.9 g</mtext></mrow><mrow><mtext>p</mtext></mrow></msub><msup><mrow><mtext></mtext></mrow><mrow><mtext>(n-1)</mtext></mrow></msup><mtext>.</mtext></mrow></math><img file="EP0747883A2_D0008.tif" /></maths> In addition, processor 65 limits (or clips) the value of the synthesized gain to be less than 0.9. The process of attenuating gains is performed to avoid undesired perceptual effects.
E. Attenuation of Gain Predictor Memory
0044As discussed above, there is a buffer which forms part of E-Processor 120 which stores the five most recent values of the prediction error energy. This buffer is used to predict a value for the predicted energy of the code vector from the fixed codebook.
0045However, due to frame erasure, there will be no information communicated to the decoder from the encoder from which new values of the prediction error energy. Therefore, such values will have to be synthesized. This synthesis is accomplished by E-processor 120 according to the following expression:<maths id="math0009" num=""><img file="EP0747883A2_D0009.tif" /></maths> Thus, a new value for <i>R̂</i><sup>(n)</sup> is computed as the average of the four previous values of <i>R̂</i> less 4dB. The attenuation of the value of <i>R̂</i> is performed so as to ensure that once a good frame is received undesirable speech distortion is not created. The value of the synthesized R is limited not to fall below -14dB.
F. An Illustrative Wireless System
0046As stated above, the present invention has application to wireless speech communication systems. Figure 2 presents an illustrative wireless communication system employing an embodiment of the present invention. Figure 2 includes a transmitter 600 and a receiver 700. An illustrative embodiment of the transmitter 600 is a wireless base station. An illustrative embodiment of the receiver 700 is a mobile user terminal, such as a cellular or wireless telephone, or other personal communications system device. (Naturally, a wireless base station and user terminal may also include receiver and transmitter circuitry, respectively.) The transmitter 600 includes a speech coder 610, which may be, for example, a coder according to the G.729 Draft. The transmitter further includes a conventional channel coder 620 to provide error detection (or detection and correction) capability; a conventional modulator 630; and conventional radio transmission circuitry; all well known in the art. Radio signals transmitted by transmitter 600 are received by receiver 700 through a transmission channel. Due to, for example, possible destructive interference of various multipath components of the transmitted signal, receiver 700 may be in a deep fade preventing the clear reception of transmitted bits. Under such circumstances, frame erasure may occur.
0047Receiver 700 includes conventional radio receiver circuitry 710, conventional demodulator 720, channel decoder 730, and a speech decoder 740 in accordance with the present invention. Note that the channel decoder generates a frame erasure signal whenever the channel decoder determines the presence of a substantial number of bit errors (or unreceived bits). Alternatively (or in addition to a frame erasure signal from the channel decoder), demodulator 720 may provide a frame erasure signal to the decoder 740.
G. Discussion
0048Although specific embodiments of this invention have been shown and described herein, it is to be understood that these embodiments are merely illustrative of the many possible specific arrangements which can be devised in application of the principles of the invention. Numerous and varied other arrangements can be devised in accordance with these principles by those of ordinary skill in the art without departing from the scope of the invention.
0049In addition, although the illustrative embodiment of present invention refers to codebook "amplifiers," it will be understood by those of ordinary skill in the art that this term encompasses the scaling of digital signals. Moreover, such scaling may be accomplished with scale factors (or gains) which are less than or equal to one (including negative values), as well as greater than one.<img file="EP0747883A2_D0010.tif" /><img file="EP0747883A2_D0011.tif" /><img file="EP0747883A2_D0012.tif" /><img file="EP0747883A2_D0013.tif" />
1 Introduction
0050This Recommendation contains the description of an algorithm for the coding of speech signals at 8 kbit/s using Conjugate-Structure-Algebraic-Code-Excited Linear-Predictive (CS-ACELP) coding.
0051This coder is designed to operate with a digital signal obtained by first performing telephone bandwidth filtering (ITU Rec. G.710) of the analog input signal, then sampling it at 8000 Hz. followed by conversion to 16 bit linear PCM for the input to the encoder. The output of the decoder should be converted back to an analog signal by similar means. Other input/output characteristics, such as those specified by ITU Rec. G.711 for 64 kbit/s PCM data, should be converted to 16 bit linear PCM before encoding, or from 16 bit linear PCM to the appropriate format after decoding. The bitstream from the encoder to the decoder is defined within this standard.
0052This Recommendation is organized as follows: Section 2 gives a general outline of the CS-ACELP algorithm. In Sections 3 and 4, the CS-ACELP encoder and decoder principles are discussed, respectively. Section 5 describes the software that defines this coder in 16 bit fixed point arithmetic.
2 General description of the coder
0053The CS-ACELP coder is based on the code-excited linear-predictive (CELP) coding model. The coder operates on speech frames of 10 ms corresponding to 80 samples at a sampling rate of 8000 samples/sec. For every 10 msec frame, the speech signal is analyzed to extract the parameters of the CELP model (LP filter coefficients, adaptive and fixed codebook indices and gains). These parameters are encoded and transmitted. The bit allocation of the coder parameters is shown in Table 1. At the decoder, these parameters are used to retrieve the excitation and synthesis filter <tables id="tabl0001" num="0001"><table frame="all"><title>Table 1:</title><tgroup cols="5" colsep="1" rowsep="1"><colspec colnum="1" colname="col1" colwidth="31.50mm" /><colspec colnum="2" colname="col2" colwidth="31.50mm" /><colspec colnum="3" colname="col3" colwidth="31.50mm" /><colspec colnum="4" colname="col4" colwidth="31.50mm" colsep="1" /><colspec colnum="5" colname="col5" colwidth="31.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col5" align="center">Bit allocation of the 8 kbit/s CS-ACELP algorithm (10 msec frame).</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="center"><i>Parameter</i></entry><entry namest="col2" nameend="col2" align="center"><i>Codeword</i></entry><entry namest="col3" nameend="col3" align="center"><i>Subframe 1</i></entry><entry namest="col4" nameend="col4" align="center"><i>Subframe 2</i></entry><entry namest="col5" nameend="col5" align="center"><i>Total per frame</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">LSP</entry><entry namest="col2" nameend="col2" align="right">L0, L1, L2, L3</entry><entry namest="col3" nameend="col3" /><entry namest="col4" nameend="col4" /><entry namest="col5" nameend="col5" align="right">18</entry></row><row><entry namest="col1" nameend="col1" align="left">Adaptive codebook delay</entry><entry namest="col2" nameend="col2" align="right">P1, P2</entry><entry namest="col3" nameend="col3" align="right">8</entry><entry namest="col4" nameend="col4" align="right">5</entry><entry namest="col5" nameend="col5" align="right">13</entry></row><row><entry namest="col1" nameend="col1" align="left">Delay parity</entry><entry namest="col2" nameend="col2" align="right">P0</entry><entry namest="col3" nameend="col3" align="right">1</entry><entry namest="col4" nameend="col4" /><entry namest="col5" nameend="col5" align="right">1</entry></row><row><entry namest="col1" nameend="col1" align="left">Fixed codebook index</entry><entry namest="col2" nameend="col2" align="right">C1, C2</entry><entry namest="col3" nameend="col3" align="right">13</entry><entry namest="col4" nameend="col4" align="right">13</entry><entry namest="col5" nameend="col5" align="right">26</entry></row><row><entry namest="col1" nameend="col1" align="left">Fixed codebook sign</entry><entry namest="col2" nameend="col2" align="right">S1, S2</entry><entry namest="col3" nameend="col3" align="right">4</entry><entry namest="col4" nameend="col4" align="right">4</entry><entry namest="col5" nameend="col5" align="right">8</entry></row><row><entry namest="col1" nameend="col1" align="left">Codebook gains (stage 1)</entry><entry namest="col2" nameend="col2" align="right">GA1, GA2</entry><entry namest="col3" nameend="col3" align="right">3</entry><entry namest="col4" nameend="col4" align="right">3</entry><entry namest="col5" nameend="col5" align="right">6</entry></row><row><entry namest="col1" nameend="col1" align="left">Codebook gains (stage 2)</entry><entry namest="col2" nameend="col2" align="right">GB1, GB2</entry><entry namest="col3" nameend="col3" align="right">4</entry><entry namest="col4" nameend="col4" align="right">4</entry><entry namest="col5" nameend="col5" align="right">8</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">Total</entry><entry namest="col2" nameend="col2" /><entry namest="col3" nameend="col3" /><entry namest="col4" nameend="col4" /><entry namest="col5" nameend="col5" align="right">80</entry></row></tbody></tgroup></table></tables> parameters. The speech is reconstructed by filtering this excitation through the LP synthesis filter, as is shown in Figure 1. The short-term synthesis filter is based on a 10th order linear prediction<img file="EP0747883A2_D0014.tif" /> (LP) filter. The long-term, or pitch synthesis filter is implemented using the so-called adaptive codebook approach for delays less than the subframe length. After computing the reconstructed speech, it is further enhanced by a postfilter.
2.1 Encoder
0054The signal flow at the encoder is shown in Figure 2. The input signal is high-pass filtered and scaled<img file="EP0747883A2_D0015.tif" /> in the pre-processing block. The pre-processed signal serves as the input signal for all subsequent analysis. LP analysis is done once per 10 ms frame to compute the LP filter coefficients. These coefficients are converted to line spectrum pairs (LSP) and quantized using predictive two-stage vector quantization (VQ) with 18 bits. The excitation sequence is chosen by using an analysis-by-synthesis search procedure in which the error between the original and synthesized speech is minimized according to a perceptually weighted distortion measure. This is done by filtering the error signal with a perceptual weighting filter, whose coefficients are derived from the unquantized LP filter. The amount of perceptual weighting is made adaptive to improve the performance for input signals with a flat frequency-response.
0055The excitation parameters (fixed and adaptive codebook parameters) are determined per subframe of 5 ms (40 samples) each. The quantized and unquantized LP filter coefficients are used for the second subframe, while in the first subframe interpolated LP filter coefficients are used (both quantized and unquantized). An open-loop pitch delay is estimated once per 10 ms frame based on the perceptually weighted speech signal. Then the following operations are repeated for each subframe. The target signal <i>x(n)</i> is computed by filtering the LP residual through the weighted synthesis filter <i>W(z)/Â(z)</i>. The initial states of these filters are updated by filtering the error between LP residual and excitation. This is equivalent to the common approach of subtracting the zero-input response of the weighted synthesis filter from the weighted speech signal. The impulse response. <i>h(n)</i>, of the weighted synthesis filter is computed. Closed-loop pitch analysis is then done (to find the adaptive codebook delay and gain), using the target <i>z(n)</i> and impulse response <i>h(n)</i>, by searching around the value of the open-loop pitch delay. A fractional pitch delay with 1/3 resolution is used. The pitch delay is encoded with 8 bits in the first subframe and differentially encoded with 5 bits in the second subframe. The target signal <i>x(n)</i> is updated by removing the adaptive codebook contribution (filtered adaptive codevector), and this new target, <i>x</i><sub><i>2</i></sub><i>(n)</i>, is used in the fixed algebraic codebook search (to find the optimum excitation). An algebraic codebook with 17 bits is used for the fixed codebook excitation. The gains of the adaptive and fixed codebook are vector quantized with 7 bits, (with MA prediction applied to the fixed codebook gain). Finally, the filter memories are updated using the determined excitation signal.
2.2 Decoder
0056The signal flow at the decoder is shown in Figure 3. First, the parameters indices are extracted from the received bitstream. These indices are decoded to obtain the coder parameters corresponding to a 10 ms speech frame. These parameters are the LSP coefficients, the 2 fractional pitch delays, the 2 fixed codebook vectors, and the 2 sets of adaptive and fixed codebook gains. The LSP coefficients are interpolated and converted to LP filter coefficients for each subframe. Then, for each 40-sample subframe the following steps are done: <ul id="ul0001" list-style="bullet"><li>the excitation is constructed by adding the adaptive and fixed codebook vectors scaled by their respective gains,<img file="EP0747883A2_D0016.tif" /></li><li>the speech is reconstructed by filtering the excitation through the LP synthesis filter,</li><li>the reconstructed speech signal is passed through a post-processing stage, which comprises of an adaptive postfilter based on the long-term and short-term synthesis filters, followed by a high-pass filter and scaling operation.</li></ul>
2.3 Delay
0057This coder encodes speech and other audio signals with 10 ms frames. In addition, there is a look-ahead of 5 ms, resulting in a total algorithmic delay of 15 ms. All additional delays in a practical implementation of this coder are due to: <ul id="ul0002" list-style="bullet"><li>processing time needed for encoding and decoding operations,</li><li>transmission time on the communication link,</li><li>multiplexing delay when combining audio data with other data.</li></ul>
2.4 Speech coder description
0058The description of the speech coding algorithm of this Recommendation is made in terms of bit-exact, fixed-point mathematical operations. The ANSI C code indicated in Section 5, which constitutes an integral part of this Recommendation, reflects this bit-exact, fixed-point descriptive approach. The mathematical descriptions of the encoder (Section 3), and decoder (Section 4), can be implemented in several other fashions, possibly leading to a codec implementation not complying with this Recommendation. Therefore, the algorithm description of the C code of Section 5 shall take precedence over the mathematical descriptions of Sections 3 and 4 whenever discrepancies are found. A non-exhaustive set of test sequences which can be used in conjunction with the C code are available from the ITU.
2.5 Notational conventions
0059Throughout this document it is tried to maintain the following notational conventions. <ul id="ul0003" list-style="bullet"><li>Codebooks are denoted by caligraphic characters (e.g. <i>C</i>).</li><li>Time signals are denoted by the symbol and the sample time index between parenthesis (e.g. <i>s</i>(<i>n</i>)). The symbol <i>n</i> is used as sample instant index.</li><li>Superscript time indices (e.g <i>g</i><sup>(<i>m</i>)</sup>) refer to that variable corresponding to subframe <i>m</i>.</li><li>Superscripts identify a particular element in a coefficient array.</li><li>A identifies a quantized version of a parameter.</li><li>Range notations are done using square brackets, where the boundaries are included (e.g. [0.6, 0.9]).</li><li><i>log</i> denotes a logarithm with base 10.</li></ul>
0060Table 2 lists the most relevant symbols used throughout this document. A glossary of the most <tables id="tabl0002" num="0002"><table frame="all"><title>Table 2:</title><tgroup cols="3" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="52.50mm" /><colspec colnum="2" colname="col2" colwidth="52.50mm" /><colspec colnum="3" colname="col3" colwidth="52.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col3" align="center">Glossary of symbols.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Name</i></entry><entry namest="col2" nameend="col2" align="center"><i>Reference</i></entry><entry namest="col3" nameend="col3" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left"><i>1/A(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (2)</entry><entry namest="col3" nameend="col3" align="left">LP synthesis filter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>H</i><sub><i>h</i></sub><sub>1</sub><i>(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (1)</entry><entry namest="col3" nameend="col3" align="left">input high-pass filter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>H</i><sub><i>p</i></sub><i>(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (77)</entry><entry namest="col3" nameend="col3" align="left">pitch postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>H</i><sub><i>f</i></sub><i>(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (83)</entry><entry namest="col3" nameend="col3" align="left">short-term postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>H</i><sub><i>t</i></sub><i>(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (85)</entry><entry namest="col3" nameend="col3" align="left">tilt-compensation filter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>H</i><sub><i>h</i></sub><sub>2</sub><i>(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (90)</entry><entry namest="col3" nameend="col3" align="left">output high-pass filter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>P(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (46)</entry><entry namest="col3" nameend="col3" align="left">pitch filter</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left"><i>W(z)</i></entry><entry namest="col2" nameend="col2" align="left">Eq. (27)</entry><entry namest="col3" nameend="col3" align="left">weighting filter</entry></row></tbody></tgroup></table></tables> relevant signals is given in Table 3. Table 4 summarizes relevant variables and their dimension.
0061Constant parameters are listed in Table 5. The acronyms used in this Recommendation are summarized in Table 6. <tables id="tabl0003" num="0003"><table frame="all"><title>Table 3:</title><tgroup cols="2" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="78.75mm" /><colspec colnum="2" colname="col2" colwidth="78.75mm" /><thead valign="top"><row><entry namest="col1" nameend="col2" align="center">Glossary of signals.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Name</i></entry><entry namest="col2" nameend="col2" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left"><i>h(n)</i></entry><entry namest="col2" nameend="col2" align="left">impulse response of weighting and synthesis filters</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>r(k)</i></entry><entry namest="col2" nameend="col2" align="left">auto-correlation sequence</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>r'(k)</i></entry><entry namest="col2" nameend="col2" align="left">modified auto-correlation sequence</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>R(k)</i></entry><entry namest="col2" nameend="col2" align="left">correlation sequence</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>sw(n)</i></entry><entry namest="col2" nameend="col2" align="left">weighted speech signal</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>s(n)</i></entry><entry namest="col2" nameend="col2" align="left">speech signal</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>s'(n)</i></entry><entry namest="col2" nameend="col2" align="left">windowed speech signal</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>sf(n)</i></entry><entry namest="col2" nameend="col2" align="left">postfiltered output</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>sf'(n)</i></entry><entry namest="col2" nameend="col2" align="left">gain-scaled postfiltered output</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>ŝ(n)</i></entry><entry namest="col2" nameend="col2" align="left">reconstructed speech signal</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>r(n)</i></entry><entry namest="col2" nameend="col2" align="left">residual signal</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>x(n)</i></entry><entry namest="col2" nameend="col2" align="left">target signal</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>x</i><sub><i>2</i></sub><i>(n)</i></entry><entry namest="col2" nameend="col2" align="left">second target signal</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>v(n)</i></entry><entry namest="col2" nameend="col2" align="left">adaptive codebook contribution</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>c(n)</i></entry><entry namest="col2" nameend="col2" align="left">fixed codebook contribution</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>y(n)</i></entry><entry namest="col2" nameend="col2" align="left"><i>v(n) ∗ h(n)</i></entry></row><row><entry namest="col1" nameend="col1" align="left"><i>z(n)</i></entry><entry namest="col2" nameend="col2" align="left"><i>c(n) ∗ h(n)</i></entry></row><row><entry namest="col1" nameend="col1" align="left"><i>u(n)</i></entry><entry namest="col2" nameend="col2" align="left">excitation to LP synthesis filter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>d(n)</i></entry><entry namest="col2" nameend="col2" align="left">correlation between target signal and <i>h(n)</i></entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left"><i>ew(n)</i></entry><entry namest="col2" nameend="col2" align="left">error signal</entry></row></tbody></tgroup></table></tables>
0062<tables id="tabl0004" num="0004"><table frame="all"><title>Table 4:</title><tgroup cols="3" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="52.50mm" /><colspec colnum="2" colname="col2" colwidth="52.50mm" /><colspec colnum="3" colname="col3" colwidth="52.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col3" align="center">Glossary of variables.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Name</i></entry><entry namest="col2" nameend="col2" align="center"><i>Size</i></entry><entry namest="col3" nameend="col3" align="center">Description</entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left"><i>g</i><sub><i>p</i></sub></entry><entry namest="col2" nameend="col2" align="left">1</entry><entry namest="col3" nameend="col3" align="left">adaptive codebook gain</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>g</i><sub><i>e</i></sub></entry><entry namest="col2" nameend="col2" align="left">1</entry><entry namest="col3" nameend="col3" align="left">fixed codebook gain</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>g</i><sub><i>o</i></sub></entry><entry namest="col2" nameend="col2" align="left">1</entry><entry namest="col3" nameend="col3" align="left">modified gain for pitch postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>g</i><sub><i>pit</i></sub></entry><entry namest="col2" nameend="col2" align="left">1</entry><entry namest="col3" nameend="col3" align="left">pitch gain for pitch postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>g</i><sub><i>f</i></sub></entry><entry namest="col2" nameend="col2" align="left">1</entry><entry namest="col3" nameend="col3" align="left">gain term short-term postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>g</i><sub><i>t</i></sub></entry><entry namest="col2" nameend="col2" align="left">1</entry><entry namest="col3" nameend="col3" align="left">gain term tilt postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>T</i><sub><i>op</i></sub></entry><entry namest="col2" nameend="col2" align="left">1</entry><entry namest="col3" nameend="col3" align="left">open-loop pitch delay</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>a</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="left">10</entry><entry namest="col3" nameend="col3" align="left">LP coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>k</i><sub><i>1</i></sub></entry><entry namest="col2" nameend="col2" align="left">10</entry><entry namest="col3" nameend="col3" align="left">reflection coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>o</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="left">2</entry><entry namest="col3" nameend="col3" align="left">LAR coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>w</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="left">10</entry><entry namest="col3" nameend="col3" align="left">LSF normalized frequencies</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>q</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="left">10</entry><entry namest="col3" nameend="col3" align="left">LSP coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>r(k)</i></entry><entry namest="col2" nameend="col2" align="left">11</entry><entry namest="col3" nameend="col3" align="left">correlation coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>w</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="left">10</entry><entry namest="col3" nameend="col3" align="left">LSP weighting coefficients</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left"><i>l</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="left">10</entry><entry namest="col3" nameend="col3" align="left">LSP quantizer output</entry></row></tbody></tgroup></table></tables>
0063<tables id="tabl0005" num="0005"><table frame="all"><title>Table 5:</title><tgroup cols="3" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="52.50mm" /><colspec colnum="2" colname="col2" colwidth="52.50mm" /><colspec colnum="3" colname="col3" colwidth="52.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col3" align="center">Glossary of constants.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Name</i></entry><entry namest="col2" nameend="col2" align="center"><i>Value</i></entry><entry namest="col3" nameend="col3" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left"><i>f</i><sub><i>s</i></sub></entry><entry namest="col2" nameend="col2" align="left">8000</entry><entry namest="col3" nameend="col3" align="left">sampling frequency</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>f</i><sub><i>o</i></sub></entry><entry namest="col2" nameend="col2" align="left">60</entry><entry namest="col3" nameend="col3" align="left">bandwidth expansion</entry></row><row><entry namest="col1" nameend="col1" align="left">γ<sub><i>1</i></sub></entry><entry namest="col2" nameend="col2" align="left">0.94/0.98</entry><entry namest="col3" nameend="col3" align="left">weight factor perceptual weighting filter</entry></row><row><entry namest="col1" nameend="col1" align="left">γ<sub><i>2</i></sub></entry><entry namest="col2" nameend="col2" align="left">0.60/[0.4-0.7]</entry><entry namest="col3" nameend="col3" align="left">weight factor perceptual weighting filter</entry></row><row><entry namest="col1" nameend="col1" align="left">γ<sub><i>n</i></sub></entry><entry namest="col2" nameend="col2" align="left">0.55</entry><entry namest="col3" nameend="col3" align="left">weight factor post filter</entry></row><row><entry namest="col1" nameend="col1" align="left">γ<sub><i>d</i></sub></entry><entry namest="col2" nameend="col2" align="left">0.70</entry><entry namest="col3" nameend="col3" align="left">weight factor post filter</entry></row><row><entry namest="col1" nameend="col1" align="left">γ<sub><i>p</i></sub></entry><entry namest="col2" nameend="col2" align="left">0.50</entry><entry namest="col3" nameend="col3" align="left">weight factor pitch post filter</entry></row><row><entry namest="col1" nameend="col1" align="left">γ<sub><i>t</i></sub></entry><entry namest="col2" nameend="col2" align="left">0.90/0.2</entry><entry namest="col3" nameend="col3" align="left">weight factor tilt post filter</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>C</i></entry><entry namest="col2" nameend="col2" align="left">Table 7</entry><entry namest="col3" nameend="col3" align="left">fixed (algebraic) codebook</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>£0</i></entry><entry namest="col2" nameend="col2" align="left">Section 3.2.4</entry><entry namest="col3" nameend="col3" align="left">moving average predictor codebook</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>£1</i></entry><entry namest="col2" nameend="col2" align="left">Section 3.2.4</entry><entry namest="col3" nameend="col3" align="left">First stage LSP codebook</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>£2</i></entry><entry namest="col2" nameend="col2" align="left">Section 3.2.4</entry><entry namest="col3" nameend="col3" align="left">Second stage LSP codebook (low part)</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>£3</i></entry><entry namest="col2" nameend="col2" align="left">Section 3.2.4</entry><entry namest="col3" nameend="col3" align="left">Second stage LSP codebook (high part)</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>GA</i></entry><entry namest="col2" nameend="col2" align="left">Section 3.9</entry><entry namest="col3" nameend="col3" align="left">First stage gain codebook</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>GB</i></entry><entry namest="col2" nameend="col2" align="left">Section 3.9</entry><entry namest="col3" nameend="col3" align="left">Second stage gain codebook</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>w</i><sub><i>lag</i></sub></entry><entry namest="col2" nameend="col2" align="left">Eq. (6)</entry><entry namest="col3" nameend="col3" align="left">correlation lag window</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left"><i>w</i><sub><i>lp</i></sub></entry><entry namest="col2" nameend="col2" align="left">Eq. (3)</entry><entry namest="col3" nameend="col3" align="left">LPC analysis window</entry></row></tbody></tgroup></table></tables>
0064<tables id="tabl0006" num="0006"><table frame="all"><title>Table 6:</title><tgroup cols="2" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="78.75mm" /><colspec colnum="2" colname="col2" colwidth="78.75mm" /><thead valign="top"><row><entry namest="col1" nameend="col2" align="center">Glossary of acronyms.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Acronym</i></entry><entry namest="col2" nameend="col2" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">CELP</entry><entry namest="col2" nameend="col2" align="left">code-excited linear-prediction</entry></row><row><entry namest="col1" nameend="col1" align="left">MA</entry><entry namest="col2" nameend="col2" align="left">moving average</entry></row><row><entry namest="col1" nameend="col1" align="left">MSB</entry><entry namest="col2" nameend="col2" align="left">most significant bit</entry></row><row><entry namest="col1" nameend="col1" align="left">LP</entry><entry namest="col2" nameend="col2" align="left">linear prediction</entry></row><row><entry namest="col1" nameend="col1" align="left">LSP</entry><entry namest="col2" nameend="col2" align="left">line spectral pair</entry></row><row><entry namest="col1" nameend="col1" align="left">LSF</entry><entry namest="col2" nameend="col2" align="left">line spectral frequency</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">VQ</entry><entry namest="col2" nameend="col2" align="left">vector quantization</entry></row></tbody></tgroup></table></tables>
3 Functional description of the encoder
0065In this section we describe the different functions of the encoder represented in the blocks of Figure 1.
3.1 Pre-processing
0066As stated in Section 2, the input to the speech encoder is assumed to be a 16 bit PCM signal. Two pre-processing functions are applied before the encoding process: 1) signal scaling, and 2) high-pass filtering.
0067The scaling consists of dividing the input by a factor 2 to reduce the possibility of overflows in the fixed-point implementation. The high-pass filter serves as a precaution against undesired low-frequency components. A second order pole/zero filter with a cutoff frequency of 140 Hz is used. Both the scaling and high-pass filtering are combined by dividing the coefficients at the numerator of this filter by 2. The resulting filter is given by<maths id="math0010" num="(1)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">H</mtext></mrow><mrow><mtext mathvariant="italic">h1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>) = </mtext><mfrac><mrow><mtext>0.46363718 - 0.92724705</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext> + 0.46363718</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-2</mtext></mrow></msup><mtext></mtext></mrow><mrow><mtext>1 - 1.9059465</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext> + 0.9114024</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-2</mtext></mrow></msup></mrow></mfrac></mrow></math><img file="EP0747883A2_D0017.tif" /></maths>
0068The input signal filtered through <i>H</i><sub><i>h1</i></sub><i>(z)</i> is referred to as <i>s(n)</i>, and will be used in all subsequent coder operations.
3.2 Linear prediction analysis and quantization
0069The short-term analysis and synthesis filters are based on 10th order linear prediction (LP) filters. The LP synthesis filter is defined as<maths id="math0011" num=""><img file="EP0747883A2_D0018.tif" /></maths> where <i>â</i><sub><i>i</i></sub>, <i>i</i> = 1,...,10, are the (quantized) linear prediction (LP) coefficients. Short-term prediction, or linear prediction analysis is performed once per speech frame using the autocorrelation approach with a 30 ms asymmetric window. Every 80 samples (10 ms), the autocorrelation coefficients of windowed speech are computed and converted to the LP coefficients using the Levinson algorithm. Then the LP coefficients are transformed to the LSP domain for quantization and interpolation purposes. The interpolated quantized and unquantized filters are converted back to the LP filter coefficients (to construct the synthesis and weighting filters at each subframe).
3.2.1 Windowing and autocorrelation computation
0070The LP analysis window consists of two parts: the first part is half a Hamming window and the second part is a quarter of a cosine function cycle. The window is given by:<maths id="math0012" num=""><img file="EP0747883A2_D0019.tif" /></maths>
0071There is a 5 ms lookahead in the LP analysis which means that 40 samples are needed from the future speech frame. This translates into an extra delay of 5 ms at the encoder stage. The LP analysis window applies to 120 samples from past speech frames, 80 samples from the present speech frame, and 40 samples from the future frame. The windowing in LP analysis is illustrated in Figure 4.<img file="EP0747883A2_D0020.tif" />
0072The autocorrelation coefficients of the windowed speech<maths id="math0013" num="(4)"><math display="block"><mrow><mtext mathvariant="italic">s'(n)</mtext><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">w</mtext></mrow><mrow><mtext mathvariant="italic">lp</mtext></mrow></msub><mtext mathvariant="italic">(n)s(n)</mtext><mtext>, </mtext><mtext mathvariant="italic">n</mtext><mtext> = 0,...,239,</mtext></mrow></math><img file="EP0747883A2_D0021.tif" /></maths> are computed by<maths id="math0014" num=""><img file="EP0747883A2_D0022.tif" /></maths>
0073To avoid arithmetic problems for low-level input signals the value of <i>r</i>(0) has a lower boundary of <i>r</i>(0) = 1.0. A 60 Hz bandwidth expansion is applied, by multiplying the autocorrelation coefficients with<maths id="math0015" num=""><img file="EP0747883A2_D0023.tif" /></maths> where <i>f</i><sub><i>o</i></sub> = 60 Hz is the bandwidth expansion and <i>f</i><sub><i>s</i></sub> = 8000 Hz is the sampling frequency. Further, <i>r</i>(0) is multiplied by the white noise correction factor 1.0001, which is equivalent to adding a noise floor at -40 dB.
3.2.2 Levinson-Durbin algorithm
0074The modified autocorrelation coefficients<maths id="math0016" num="(7)"><math display="block"><mrow><mtext mathvariant="italic">r'</mtext><mtext>(0 ) = 1.0001 </mtext><mtext mathvariant="italic">r</mtext><mtext>(0)</mtext><mspace linebreak="newline" /><mtext mathvariant="italic">r'(k)</mtext><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">w</mtext></mrow><mrow><mtext mathvariant="italic">lag</mtext></mrow></msub><mtext mathvariant="italic">(k)r(k)</mtext><mtext>, </mtext><mtext mathvariant="italic">k</mtext><mtext> = 1.....10</mtext></mrow></math><img file="EP0747883A2_D0024.tif" /></maths> are used to obtain the LP filter coefficients <i>a</i><sub><i>i</i></sub>, <i>i</i> = 1,....10, by solving the set of equations<maths id="math0017" num=""><img file="EP0747883A2_D0025.tif" /></maths>
0075The set of equations in (8) is solved using the Levinson-Durbin algorithm. This algorithm uses the following recursion:<img file="EP0747883A2_D0026.tif" />
0076The final solution is given as <i>a</i><sub><i>j</i></sub> = <i>a</i><maths id="math0018" num=""><math display="inline"><mrow><mfrac linethickness="0" numalign="left" denomalign="left"><mrow><mtext>(10)</mtext></mrow><mrow><mtext mathvariant="italic">j</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0027.tif" /></maths>, <i>j</i> = 1,...,10.
3.2.3 LP to LSP conversion
0077The LP filter coefficients <i>a</i><sub><i>i</i></sub><i>, i</i> = 1,...,10 are converted to the line spectral pair (LSP) representation for quantization and interpolation purposes. For a 10th order LP filter, the LSP coefficients are defined as the roots of the sum and difference polynomials<maths id="math0019" num="(9)"><math display="block"><mrow><msubsup><mrow><mtext mathvariant="italic">F</mtext></mrow><mrow><mtext>1</mtext></mrow><mrow><mtext>'</mtext></mrow></msubsup><mtext></mtext><mtext mathvariant="italic">(z)</mtext><mtext> = </mtext><mtext mathvariant="italic">A(z)</mtext><mtext> + </mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-11</mtext></mrow></msup><mtext mathvariant="italic">A</mtext><mtext>(</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext>),</mtext></mrow></math><img file="EP0747883A2_D0028.tif" /></maths> and<maths id="math0020" num="(10)"><math display="block"><mrow><msubsup><mrow><mtext mathvariant="italic">F</mtext></mrow><mrow><mtext>2</mtext></mrow><mrow><mtext>'</mtext></mrow></msubsup><mtext></mtext><mtext mathvariant="italic">(z)</mtext><mtext> = </mtext><mtext mathvariant="italic">A</mtext><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>) - </mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-11</mtext></mrow></msup><mtext></mtext><mtext mathvariant="italic">A</mtext><mtext>(</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext>).</mtext></mrow></math><img file="EP0747883A2_D0029.tif" /></maths> respectively. The polynomial F<maths id="math0021" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext>'</mtext></mrow><mrow><mtext>1</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0030.tif" /></maths>(<i>z</i>) is symmetric, and F<maths id="math0022" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext>'</mtext></mrow><mrow><mtext>2</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0031.tif" /></maths>(<i>z</i>) is antisymmetric. It can be proven that all roots of these polynomials are on the unit circle and they alternate each other. F<maths id="math0023" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext>'</mtext></mrow><mrow><mtext>1</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0032.tif" /></maths>(<i>z</i>) has a root <i>z</i> = -1 (ω = π) and F<maths id="math0024" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext>'</mtext></mrow><mrow><mtext>2</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0033.tif" /></maths>(<i>z</i>) has a root <i>z</i> = 1 (ω = 0). To eliminate these two roots, we define the new polynomials<maths id="math0025" num="(11)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">F</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>) = </mtext><msubsup><mrow><mtext mathvariant="italic">F</mtext></mrow><mrow><mtext>1</mtext></mrow><mrow><mtext>'</mtext></mrow></msubsup><mtext> (</mtext><mtext mathvariant="italic">z</mtext><mtext>)/(1 + </mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext>),</mtext></mrow></math><img file="EP0747883A2_D0034.tif" /></maths> and<maths id="math0026" num="(12)"><math display="block"><mrow><mtext mathvariant="italic">F</mtext><msub><mrow><mtext></mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>)= </mtext><msubsup><mrow><mtext mathvariant="italic">F</mtext></mrow><mrow><mtext>2</mtext></mrow><mrow><mtext>'</mtext></mrow></msubsup><mtext> (</mtext><mtext mathvariant="italic">z</mtext><mtext>)/(1 - </mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext>).</mtext></mrow></math><img file="EP0747883A2_D0035.tif" /></maths>
0078Each polynomial has 5 conjugate roots on the unit circle (<i>e</i><sup>±</sup><sup><i>jωi</i></sup>), therefore, the polynomials can be written as<maths id="math0027" num=""><img file="EP0747883A2_D0036.tif" /></maths> and<maths id="math0028" num=""><img file="EP0747883A2_D0037.tif" /></maths> where <i>q</i><sub><i>i</i></sub> = cos(<i>ω</i><sub><i>i</i></sub>) with <i>ω</i><sub><i>i</i></sub> being the line spectral frequencies (LSF) and they satisfy the ordering property 0 < <i>ω</i><sub>1</sub> < <i>ω</i><sub>2</sub> < ... < <i>ω</i><sub>10</sub> < π. We refer to <i>q</i><sub><i>i</i></sub> as the LSP coefficients in the cosine domain.
0079Since both polynomials <i>F</i><sub>1</sub><i>(z)</i> and <i>F</i><sub>2</sub><i>(z)</i> are symmetric only the first 5 coefficients of each polynomial need to be computed. The coefficients of these polynomials are found by the recursive relations<maths id="math0029" num="(15)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext> + 1) = </mtext><msub><mrow><mtext mathvariant="italic">a</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><msub><mrow><mtext></mtext></mrow><mrow><mtext>+1</mtext></mrow></msub><mtext> + </mtext><msub><mrow><mtext mathvariant="italic">a</mtext></mrow><mrow><mtext>10-</mtext></mrow></msub><msub><mrow><mtext></mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><mtext> - </mtext><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext>), </mtext><mtext mathvariant="italic">i</mtext><mtext> = 0,...,4,</mtext><mspace linebreak="newline" /><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext> + 1) = </mtext><msub><mrow><mtext mathvariant="italic">a</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><msub><mrow><mtext></mtext></mrow><mrow><mtext>+1</mtext></mrow></msub><mtext> - </mtext><msub><mrow><mtext mathvariant="italic">a</mtext></mrow><mrow><mtext>10-</mtext></mrow></msub><msub><mrow><mtext></mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><mtext> + </mtext><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext>), </mtext><mtext mathvariant="italic">i</mtext><mtext> = 0,...,4,</mtext></mrow></math><img file="EP0747883A2_D0038.tif" /></maths> where <i>f</i><sub>1</sub>(0) = <i>f</i><sub>2</sub>(0) = 1.0. The LSP coefficients are found by evaluating the polynomials <i>F</i><sub>1</sub>(<i>z</i>) and <i>F</i><sub>2</sub>(<i>z</i>) at 60 points equally spaced between 0 and π and checking for sign changes. A sign change signifies the existence of a root and the sign change interval is then divided 4 times to better track the root. The Chebyshev polynomials are used to evaluate <i>F</i><sub>1</sub>(<i>z</i>) and <i>F</i><sub>2</sub>(<i>z</i>). In this method the roots are found directly in the cosine domain {<i>q</i><sub><i>i</i></sub>}. The polynomials <i>F</i><sub>1</sub>(<i>z</i>) Or <i>F</i><sub>2</sub>(<i>z</i>), evaluated at <i>z</i> = <i>e</i><sup><i>jω</i></sup>, can be written as<maths id="math0030" num="(16)"><math display="block"><mrow><mtext mathvariant="italic">F(ω)</mtext><mtext> = 2</mtext><msup><mrow><mtext mathvariant="italic">e</mtext></mrow><mrow><mtext mathvariant="italic">-j5ω</mtext></mrow></msup><mtext mathvariant="italic">C</mtext><mtext>(</mtext><mtext mathvariant="italic">x</mtext><mtext>),</mtext></mrow></math><img file="EP0747883A2_D0039.tif" /></maths> with<maths id="math0031" num="(17)"><math display="block"><mrow><mtext mathvariant="italic">C(x)</mtext><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">T</mtext></mrow><mrow><mtext>5</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">x</mtext><mtext>) + </mtext><mtext mathvariant="italic">f</mtext><mtext>(1)</mtext><msub><mrow><mtext mathvariant="italic">T</mtext></mrow><mrow><mtext>4</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">x</mtext><mtext>) + </mtext><mtext mathvariant="italic">f</mtext><mtext>(2)</mtext><msub><mrow><mtext mathvariant="italic">T</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">x</mtext><mtext>) + </mtext><mtext mathvariant="italic">f</mtext><mtext>(3)</mtext><msub><mrow><mtext mathvariant="italic">T</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">x</mtext><mtext>) + </mtext><mtext mathvariant="italic">f</mtext><mtext>(4)</mtext><msub><mrow><mtext mathvariant="italic">T</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">x</mtext><mtext>) + </mtext><mtext mathvariant="italic">f</mtext><mtext>(5)/2,</mtext></mrow></math><img file="EP0747883A2_D0040.tif" /></maths> where <i>T</i><sub><i>m</i></sub>(<i>x</i>) = cos(<i>m</i>ω) is the <i>m</i>th order Chebyshev polynomial, and <i>f</i>(<i>i</i>), <i>i</i> = 1,...,5, are the coefficients of either <i>F</i><sub>1</sub>(<i>z</i>) or <i>F</i><sub>2</sub>(<i>z</i>), computed using the equations in (15). The polynomial <i>C</i>(<i>x</i>) is evaluated at a certain value of <i>x</i> = cos(ω) using the recursive relation:<img file="EP0747883A2_D0041.tif" /><img file="EP0747883A2_D0042.tif" /> with initial values <i>b</i><sub>5</sub> = 1 and <i>b</i><sub>6</sub> = 0.
3.2.4 Quantization of the LSP coefficients
0080The LP filter coefficients are quantized using the LSP representation in the frequency domain; that is<maths id="math0032" num="(18)"><math display="block"><mrow><msub><mrow><mtext>ω</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">arccos(q</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><mtext>), </mtext><mtext mathvariant="italic">i</mtext><mtext> = 1,...,10.</mtext></mrow></math><img file="EP0747883A2_D0043.tif" /></maths> where ω<sub><i>i</i></sub> are the line spectral frequencies (LSF) in the normalized frequency domain [0, π]. A switched 4th order MA prediction is used to predict the current set of LSF coefficients. The difference between the computed and predicted set of coefficients is quantized using a two-stage vector quantizer. The first stage is a 10-dimensional VQ using codebook <i>£</i>1 with 128 entries (-7 bits). The second stage is a 10 bit VQ which has been implemented as a split VQ using two 5-dimensional codebooks, <i>£</i>2 and <i>£</i>3 containing 32 entries (5 bits) each.
0081To explain the quantization process, it is convenient to first describe the decoding process. Each coefficient is obtained from the sum of 2 codebooks:<maths id="math0033" num=""><img file="EP0747883A2_D0044.tif" /></maths> where L1, L2, and L3 are the codebook indices. To avoid sharp resonances in the quantized LP synthesis filters, the coefficients <i>l</i><sub><i>i</i></sub> are arranged such that adjacent coefficients have a minimum distance of <i>J</i>. The rearrangement routine is shown below:<img file="EP0747883A2_D0045.tif" />
0082This rearrangement process is executed twice. First with a value of <i>J</i> = 0.0001, then with a value of <i>J</i> = 0.000095.
0083After this rearrangement process, the quantized LSF coefficients <i>ω̂</i><maths id="math0034" num=""><math display="inline"><mrow><mfrac linethickness="0" numalign="left" denomalign="left"><mrow><mtext>(m)</mtext></mrow><mrow><mtext>i</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0046.tif" /></maths> for the current frame <i>n</i>, are obtained from the weighted sum of previous quantizer outputs <i>l</i><sup>(</sup><sup><i>m</i></sup><sup>-</sup><sup><i>k</i></sup><sup>)</sup>, and the current quantizer output <i>l</i><sup><i>(m)</i></sup><maths id="math0035" num=""><img file="EP0747883A2_D0047.tif" /></maths> where <i>m</i><maths id="math0036" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext mathvariant="italic">k</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0048.tif" /></maths> are the coefficients of the switched MA predictor. Which MA predictor to use is defined by a separate bit <i>L</i>0. At startup the initial values of <i>l</i><maths id="math0037" num=""><math display="inline"><mrow><mfrac linethickness="0" numalign="left" denomalign="left"><mrow><mtext mathvariant="italic">(k)</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0049.tif" /></maths> are given by <i>l</i><sub><i>i</i></sub> = <i>i</i>π/11 for all <i>k</i> < 0.
0084After computing <i>ŵ</i><sub><i>i</i></sub>, the corresponding filter is checked for stability. This is done as follows: <ul id="ul0004" list-style="none"><li>1. Order the coefficient <i>ω̂</i><sub><i>i</i></sub> in increasing value,</li><li>2. If ω̂<sub>1</sub> < 0.005 then ω̂<sub>1</sub> = 0.005,</li><li>3. If <i>ω̂</i><sub><i>i</i></sub><sub>+1</sub> - <i>ω̂</i><sub><i>i</i></sub> < 0.0001, then <i>ω̂</i><sub><i>i</i></sub><sub>+1</sub> = <i>ω̂</i><sub><i>i</i></sub> + 0.0001 <i>i</i> = 1,...,9,</li><li>4. If ω̂<sub>10</sub> > 3.135 then ω̂<sub>10</sub> = 3.135.</li></ul>
0085The procedure for encoding the LSF parameters can be outlined as follows. For each of the two MA predictors the best approximation to the current LSF vector has to be found. The best approximation is defined as the one that minimizes a weighted mean-squared error<maths id="math0038" num=""><img file="EP0747883A2_D0050.tif" /></maths>
0086The weights <i>w</i><sub><i>i</i></sub> are made adaptive as a function of the unquantized LSF coefficients,<maths id="math0039" num=""><img file="EP0747883A2_D0051.tif" /></maths> In addition, the weights <i>w</i><sub>5</sub> and <i>w</i><sub>6</sub> are multiplied by 1.2 each.
0087The vector to be quantized for the current frame is obtained from<maths id="math0040" num=""><img file="EP0747883A2_D0052.tif" /></maths>
0088The first codebook <i>£</i>1 is searched and the entry L1 that minimizes the (unweighted) mean-squared error is selected. This is followed by a search of the second codebook <i>£</i>2, which defines the lower part of the second stage. For each possible candidate, the partial vector <i>ω̂</i><sub><i>i</i></sub>, <i>i</i> = 1,...,5 is reconstructed using Eq. (20), and rearranged to guarantee a minimum distance of 0.0001. The vector with index L2 which after addition to the first stage candidate and rearranging, approximates the lower part of the corresponding target best in the weighted MSE sense is selected. Using the selected first stage vector L1 and the lower part of the second stage (L2), the higher part of the second stage is searched from codebook <i>£</i>3. Again the rearrangement procedure is used to guarantee a minimum distance of 0.0001. The vector L3 that minimizes the overall weighted MSE is selected.
0089This process is done for each of the two MA predictors defined by <i>£</i>0, and the MA predictor L0 that produces the lowest weighted MSE is selected.
3.2.5 Interpolation of the LSP coefficients
0090The quantized (and unquantized) LP coefficients are used for the second subframe. For the first subframe, the quantized (and unquantized) LP coefficients are obtained from linear interpolation of the corresponding parameters in the adjacent subframes. The interpolation is done on the LSP coefficients in the <i>q</i> domain. Let <i>q</i><maths id="math0041" num=""><math display="inline"><mrow><mfrac linethickness="0" numalign="left" denomalign="left"><mrow><mtext mathvariant="italic">(m)</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0053.tif" /></maths> be the LSP coefficients at the 2nd subframe of frame <i>m</i>, and <i>q</i><maths id="math0042" num=""><math display="inline"><mrow><mfrac linethickness="0" numalign="left" denomalign="left"><mrow><mtext mathvariant="italic">(m-1)</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0054.tif" /></maths> the LSP coefficients at the 2nd subframe of the past frame (<i>m</i> - 1). The (unquantized) interpolated LSP coefficients in each of the 2 subframes are given by<maths id="math0043" num=""><img file="EP0747883A2_D0055.tif" /></maths>
0091The same interpolation procedure is used for the interpolation of the quantized LSP coefficients by substituting <i>q</i><sub><i>i</i></sub> by <i>q̂</i><sub><i>i</i></sub> in Eq. (24).
3.2.6 LSP to LP conversion
0092Once the LSP coefficients are quantized and interpolated, they are converted back to LP coefficients {<i>a</i><sub><i>i</i></sub>}. The conversion to the LP domain is done as follows. The coefficients of <i>F</i><sub>1</sub>(<i>z</i>) and <i>F</i><sub>2</sub>(<i>z</i>) are found by expanding Eqs. (13) and (14) knowing the quantized and interpolated LSP coefficients. The following recursive relation is used to compute <i>f</i><sub>1</sub>(<i>i</i>), <i>i</i> = 1,...,5, from <i>q</i><sub><i>i</i></sub><img file="EP0747883A2_D0056.tif" /><img file="EP0747883A2_D0057.tif" /> with initial values <i>f</i><sub>1</sub>(0) = 1 and <i>f</i><sub>1</sub>(-1) = 0. The coefficients <i>f</i><sub>2</sub>(<i>i</i>) are computed similarly by replacing <i>q</i><sub>2</sub><sub><i>i</i></sub><sub>-1</sub> by <i>q</i><sub>2</sub><sub><i>i</i></sub>.
0093Once the coefficients <i>f</i><sub>1</sub>(<i>i</i>) and <i>f</i><sub>2</sub>(<i>i</i>) are found, <i>F</i><sub>1</sub>(<i>z</i>) and <i>F</i><sub>2</sub>(<i>z</i>) are multiplied by 1 + <i>z</i><sup>-1</sup> and 1 - <i>z</i><sup>-1</sup>, respectively, to obtain <i>F</i><maths id="math0044" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext mathvariant="italic">'</mtext></mrow><mrow><mtext mathvariant="italic">1</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0058.tif" /></maths>(<i>z</i>) and <i>F</i><maths id="math0045" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext mathvariant="italic">'</mtext></mrow><mrow><mtext mathvariant="italic">2</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0059.tif" /></maths>(<i>z</i>); that is<maths id="math0046" num="(25)"><math display="block"><mrow><msubsup><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>1</mtext></mrow><mrow><mtext>'</mtext></mrow></msubsup><mtext> (</mtext><mtext mathvariant="italic">i</mtext><mtext>) = </mtext><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext>) + </mtext><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext> - 1), </mtext><mtext mathvariant="italic">i</mtext><mtext> = 1,...5,</mtext><mspace linebreak="newline" /><msubsup><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>2</mtext></mrow><mrow><mtext>'</mtext></mrow></msubsup><mtext> (</mtext><mtext mathvariant="italic">i</mtext><mtext>) = </mtext><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext>) - </mtext><msub><mrow><mtext mathvariant="italic">f</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext> - 1), </mtext><mtext mathvariant="italic">i</mtext><mtext> = 1,...,5.</mtext></mrow></math><img file="EP0747883A2_D0060.tif" /></maths>
0094Finally the LP coefficients are found by<maths id="math0047" num=""><img file="EP0747883A2_D0061.tif" /></maths>
0095This is directly derived from the relation <i>A(z)</i> = (<i>F</i><maths id="math0048" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext mathvariant="italic">'</mtext></mrow><mrow><mtext mathvariant="italic">1</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0062.tif" /></maths><i>(z)</i> + <i>F</i><maths id="math0049" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext mathvariant="italic">'</mtext></mrow><mrow><mtext mathvariant="italic">2</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0063.tif" /></maths>(<i>z</i>))/2, and because <i>F</i><maths id="math0050" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext mathvariant="italic">'</mtext></mrow><mrow><mtext mathvariant="italic">1</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0064.tif" /></maths>(<i>z</i>) and <i>F</i><maths id="math0051" num=""><math display="inline"><mrow><mfrac linethickness="0"><mrow><mtext mathvariant="italic">'</mtext></mrow><mrow><mtext mathvariant="italic">2</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0065.tif" /></maths>(<i>z</i>) are symmetric and antisymmetric polynomials, respectively.
3.3 Perceptual weighting
0096The perceptual weighting filter is based on the unquantized LP filter coefficients and is given by<maths id="math0052" num=""><img file="EP0747883A2_D0066.tif" /></maths>
0097The values of γ<sub>1</sub> and γ<sub>2</sub> determine the frequency response of the filter <i>W(z)</i>. By proper adjustment of these variables it is possible to make the weighting more effective. This is accomplished by making γ<sub>1</sub> and γ<sub>2</sub> a function of the spectral shape of the input signal. This adaptation is done once per 10 ms frame, but an interpolation procedure for each first subframe is used to smooth this adaptation process. The spectral shape is obtained from a 2nd-order linear prediction filter, obtained as a by product from the Levinson-Durbin recursion (Section 3.2.2). The reflection coefficients <i>k</i><sub><i>i</i></sub>, are converted to Log Area Ratio (LAR) coefficients <i>o</i><sub><i>i</i></sub> by<maths id="math0053" num="(28)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">o</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><mtext> = log </mtext><mfrac><mrow><mfenced open="(" close=")"><mrow><mtext>1.0 + </mtext><msub><mrow><mtext mathvariant="italic">k</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub></mrow></mfenced></mrow><mrow><mfenced open="(" close=")"><mrow><mtext>1.0 -</mtext><msub><mrow><mtext mathvariant="italic">k</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub></mrow></mfenced></mrow></mfrac><mtext> </mtext><mtext mathvariant="italic">i</mtext><mtext> = 1,2.</mtext></mrow></math><img file="EP0747883A2_D0067.tif" /></maths>
0098These LAR coefficients are used for the second subframe. The LAR coefficients for the first subframe are obtained through linear interpolation with the LAR parameters from the previous frame, and are given by:<maths id="math0054" num=""><img file="EP0747883A2_D0068.tif" /></maths>
0099The spectral envelope is characterized as being either flat (<i>flat</i> = 1) or tilted (<i>flat</i> = 0). For each subframe this characterization is obtained by applying a threshold function to the LAR coefficients. To avoid rapid changes, a hysteresis is used by taking into account the value of <i>flat</i> in the previous <i>subframe</i> (<i>m</i> - 1),<maths id="math0055" num=""><img file="EP0747883A2_D0069.tif" /></maths>
0100If the interpolated spectrum for a subframe is classified as flat (<i>flat</i><sup>(<i>m</i>)</sup> = 1), the weight factors are set to γ<sub>1</sub> = 0.94 and γ<sub>2</sub> = 0.6. If the spectrum is classified as tilted (<i>flat</i><sup>(<i>m</i>)</sup> = 0), the value of γ<sub>1</sub> is set to 0.98, and the value of γ<sub>2</sub> is adapted to the strength of the resonances in the LP synthesis filter, but is bounded between 0.4 and 0.7. If a strong resonance is present, the value of γ<sub>2</sub> is set closer to the upperbound. This adaptation is achieved by a criterion based on the minimum distance between 2 successive LSP coefficients for the current subframe. The minimum distance is given by<maths id="math0056" num="(31)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">d</mtext></mrow><mrow><mtext mathvariant="italic">min</mtext></mrow></msub><mtext> = </mtext><mtext mathvariant="italic">min</mtext><mtext>[</mtext><msub><mrow><mtext mathvariant="italic">ω</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><msub><mrow><mtext></mtext></mrow><mrow><mtext>+1</mtext></mrow></msub><mtext> - </mtext><msub><mrow><mtext mathvariant="italic">ω</mtext></mrow><mrow><mtext mathvariant="italic">i</mtext></mrow></msub><mtext>] </mtext><mtext mathvariant="italic">i</mtext><mtext> = 1,...,9.</mtext></mrow></math><img file="EP0747883A2_D0070.tif" /></maths>
0101The following linear relation is used to compute γ<sub>2</sub>:<maths id="math0057" num="(32)"><math display="block"><mrow><msub><mrow><mtext>γ</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = -6.0∗</mtext><msub><mrow><mtext mathvariant="italic">d</mtext></mrow><mrow><mtext mathvariant="italic">min</mtext></mrow></msub><mtext> + 1.0, </mtext><mtext mathvariant="italic">and</mtext><msub><mrow><mtext> 0.4 ≤ γ</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> ≤ 0.7</mtext></mrow></math><img file="EP0747883A2_D0071.tif" /></maths>
0102The weighted speech signal in a subframe is given by<maths id="math0058" num=""><img file="EP0747883A2_D0072.tif" /></maths>
0103The weighted speech signal <i>sw(n)</i> is used to find an estimation of the pitch delay in the speech frame.
3.4 Open-loop pitch analysis
0104To reduce the complexity of the search for the best adaptive codebook delay, the search range is limited around a candidate delay <i>T</i><sub><i>op</i></sub>, obtained from an open-loop pitch analysis. This open-loop pitch analysis is done once per frame (10 ms). The open-loop pitch estimation uses the weighted speech signal <i>sw</i>(<i>n</i>) of Eq. (33), and is done as follows: In the first step, 3 maxima of the correlation<maths id="math0059" num=""><img file="EP0747883A2_D0073.tif" /></maths> are found in the following three ranges <i>i</i> = 1: 80,...,143, <i>i</i> = 2: 40,...,79, <i>i</i> = 3: 20,...,39.
0105The retained maxima <i>R</i>(<i>t</i><sub><i>i</i></sub>), i = 1,...,3, are normalized through<maths id="math0060" num=""><img file="EP0747883A2_D0074.tif" /></maths>
0106The winner among the three normalized correlations is selected by favoring the delays with the values in the lower range. This is done by weighting the normalized correlations corresponding to the longer delays. The best open-loop delay <i>T</i><sub><i>op</i></sub> is determined as follows:<img file="EP0747883A2_D0075.tif" />
0107This procedure of dividing the delay range into 3 sections and favoring the lower sections is used to avoid choosing pitch multiples.
3.5 Computation of the impulse response
0108The impulse response, <i>h</i>(<i>n</i>), of the weighted synthesis filter <i>W</i>(<i>z</i>)/<i>Â</i>(<i>z</i>) is computed for each subframe. This impulse response is needed for the search of adaptive and fixed codebooks. The impulse response <i>h</i>(<i>n</i>) is computed by filtering the vector of coefficients of the filter <i>A</i>(<i>z</i>/γ<sub>1</sub>) extended by zeros through the two filters 1/<i>Â</i>(<i>z</i>) and 1/<i>A</i>(<i>z</i>/γ<sub>2</sub>).
3.6 Computation of the target signal
0109The target signal <i>x</i>(<i>n</i>) for the adaptive codebook search is usually computed by subtracting the zero-input response of the weighted synthesis filter <i>W</i>(<i>z</i>)/<i>Â</i>(<i>z</i>) = <i>A</i>(<i>z</i>/γ<sub>1</sub>)/[<i>Â</i>(<i>z</i>)<i>A</i>(<i>z/y</i><sub>2</sub>)] from the weighted speech signal <i>sw</i>(<i>n</i>) of Eq. (33). This is done on a subframe basis.
0110An equivalent procedure for computing the target signal, which is used in this Recommendation, is the filtering of the LP residual signal <i>r</i>(<i>n</i>) through the combination of synthesis filter 1/<i>Â</i>(<i>z</i>) and the weighting filter <i>A</i>(<i>z</i>/γ<sub>1</sub>)/<i>A</i>(<i>z</i>/γ<sub>2</sub>). After determining the excitation for the subframe, the initial states of these filters are updated by filtering the difference between the LP residual and excitation. The memory update of these filters is explained in Section 3.10.
0111The residual signal <i>r</i>(<i>n</i>), which is needed for finding the target vector is also used in the adaptive codebook search to extend the past excitation buffer. This simplifies the adaptive codebook search procedure for delays less than the subframe size of 40 as will be explained in the next section. The LP residual is given by<maths id="math0061" num=""><img file="EP0747883A2_D0076.tif" /></maths>
3.7 Adaptive-codebook search
0112The adaptive-codebook parameters (or pitch parameters) are the delay and gain. In the adaptive codebook approach for implementing the pitch filter, the excitation is repeated for delays less than the subframe length. In the search stage, the excitation is extended by the LP residual to simplify the closed-loop search. The adaptive-codebook search is done every (5 ms) subframe. In the first subframe, a fractional pitch delay <i>T</i><sub>1</sub> is used with a resolution of 1/3 in the range [19<maths id="math0062" num=""><math display="inline"><mrow><mfrac><mrow><mtext>1</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0077.tif" /></maths>, 84<maths id="math0063" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0078.tif" /></maths>)] and integers only in the range [85, 143]. For the second subframe, a delay <i>T</i><sub>2</sub> with a resolution of 1/3 is always used in the range [(<i>int</i>)<i>T</i><sub>1</sub> - 5<maths id="math0064" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0079.tif" /></maths>), (<i>int</i>)<i>T</i><sub>1</sub> + 4<maths id="math0065" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0080.tif" /></maths>)], where (<i>int</i>)<i>T</i><sub>1</sub> is the nearest integer to the fractional pitch delay <i>T</i><sub>1</sub> of the first subframe. This range is adapted for the cases where <i>T</i><sub>1</sub> straddles the boundaries of the delay range.
0113For each subframe the optimal delay is determined using closed-loop analysis that minimizes the weighted mean-squared error. In the first subframe the delay <i>T</i><sub>1</sub> is found be searching a small range (6 samples) of delay values around the open-loop delay <i>T</i><sub><i>op</i></sub> (see Section 3.4). The search boundaries <i>t</i><sub><i>min</i></sub> and <i>t</i><sub><i>max</i></sub> are defined by<img file="EP0747883A2_D0081.tif" /><img file="EP0747883A2_D0082.tif" />
0114For the second subframe, closed-loop pitch analysis is done around the pitch selected in the first subframe to find the optimal delay <i>T</i><sub>2</sub>. The search boundaries are between <i>t</i><sub><i>min</i></sub> - <maths id="math0066" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0083.tif" /></maths> and <i>t</i><sub><i>max</i></sub> + <maths id="math0067" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0084.tif" /></maths>, where <i>t</i><sub><i>min</i></sub> and <i>t</i><sub><i>max</i></sub> are derived from <i>T</i><sub>1</sub> as follows:<img file="EP0747883A2_D0085.tif" />
0115The closed-loop pitch search minimizes the mean-squared weighted error between the original and synthesized speech. This is achieved by maximizing the term<maths id="math0068" num=""><img file="EP0747883A2_D0086.tif" /></maths> where <i>x(n)</i> is the target signal and <i>y</i><sub><i>k</i></sub><i>(n)</i> is the past filtered excitation at delay <i>k</i> (past excitation convolved with <i>h(n))</i>. Note that the search range is limited around a preselected value, which is the open-loop pitch <i>T</i><sub><i>op</i></sub> for the first subframe, and <i>T</i><sub>1</sub> for the second subframe.
0116The convolution <i>y</i><sub><i>k</i></sub><i>(n)</i> is computed for the delay <i>t</i><sub><i>min</i></sub><i>,</i> and for the other integer delays in the search range <i>k</i> = <i>t</i><sub><i>min</i></sub> + 1,...,<i>t</i><sub><i>max</i></sub>, it is updated using the recursive relation<maths id="math0069" num="(38)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">y</mtext></mrow><mrow><mtext mathvariant="italic">k</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = </mtext><msub><mrow><mtext mathvariant="italic">y</mtext></mrow><mrow><mtext mathvariant="italic">k</mtext></mrow></msub><msub><mrow><mtext></mtext></mrow><mrow><mtext>-1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext> - 1) + </mtext><mtext mathvariant="italic">u</mtext><mtext>(-</mtext><mtext mathvariant="italic">k</mtext><mtext>)</mtext><mtext mathvariant="italic">h</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>), </mtext><mtext mathvariant="italic">n</mtext><mtext> = 39,...,0,</mtext></mrow></math><img file="EP0747883A2_D0087.tif" /></maths> where <i>u</i>(<i>n</i>), <i>n</i> = -143,...,39, is the excitation buffer, and <i>y</i><sub><i>k</i></sub><sub>-1</sub>(-1) = 0. Note that in the search stage, the samples <i>u</i>(<i>n</i>), <i>n</i> = 0,...,39 are not known, and they are needed for pitch delays less than 40. To simplify the search, the LP residual is copied to <i>u</i>(<i>n</i>) to make the relation in Eq. (38) valid for all delays.
0117For the determination of <i>T</i><sub>2</sub>, and <i>T</i><sub>1</sub> if the optimum integer closed-loop delay is less than 84. the fractions around the optimum integer delay have to be tested. The fractional pitch search is done by interpolating the normalized correlation in Eq. (37) and searching for its maximum.
0118The interpolation is done using a FIR filter <i>b</i><sub>12</sub> based on a Hamming windowed sinc function with the sine truncated at ±11 and padded with zeros at ±12 (<i>b</i><sub>12</sub>(12) = 0). The filter has its cut-off frequency (-3dB) at 3600 Hz in the oversampled domain. The interpolated values of <i>R</i>(<i>k</i>) for the fractions - <maths id="math0070" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0088.tif" /></maths>, - <maths id="math0071" num=""><math display="inline"><mrow><mfrac><mrow><mtext>1</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0089.tif" /></maths>, 0, <maths id="math0072" num=""><math display="inline"><mrow><mfrac><mrow><mtext>1</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0090.tif" /></maths>, and <maths id="math0073" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0091.tif" /></maths> are obtained using the interpolation formula<maths id="math0074" num=""><img file="EP0747883A2_D0092.tif" /></maths> where <i>t</i> = 0,1, 2 corresponds to the fractions 0, <maths id="math0075" num=""><math display="inline"><mrow><mfrac><mrow><mtext>1</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0093.tif" /></maths>, and <maths id="math0076" num=""><math display="inline"><mrow><mfrac><mrow><mtext>2</mtext></mrow><mrow><mtext>3</mtext></mrow></mfrac></mrow></math><img file="EP0747883A2_D0094.tif" /></maths>, respectively. Note that it is necessary to compute correlation terms in Eq. (37) using a range <i>t</i><sub><i>min</i></sub> - 4, <i>t</i><sub><i>max</i></sub> + 4, to allow for the proper interpolation.
3.7.1 Generation of the adaptive codebook vector
0119Once the noninteger pitch delay has been determined, the adaptive codebook vector <i>v</i>(<i>n</i>) is computed by interpolating the past excitation signal <i>u</i>(<i>n</i>) at the given integer delay <i>k</i> and fraction <i>t</i><maths id="math0077" num=""><img file="EP0747883A2_D0095.tif" /></maths>
0120The interpolation filter <i>b</i><sub>30</sub> is based on a Hamming windowed sinc functions with the sinc truncated at ±29 and padded with zeros at ±30 (<i>b</i><sub>30</sub>(30) = 0). The filters has a cut-off frequency (-3dB) at 3600 Hz in the oversampled domain.
3.7.2 Codeword computation for adaptive codebook delays
0121The pitch delay <i>T</i><sub>1</sub> is encoded with 8 bits in the first subframe and the relative delay in the second subframe is encoded with 5 bits. A fractional delay <i>T</i> is represented by its integer part (<i>int</i>)<i>T</i>, and a fractional part <i>frac</i>/3<i>, frac</i> = -1,0,1. The pitch index <i>P</i>1 is now encoded as<maths id="math0078" num=""><img file="EP0747883A2_D0096.tif" /></maths>
0122The value of the pitch delay <i>T</i><sub>2</sub> is encoded relative to the value of <i>T</i><sub>1</sub>. Using the same interpretation as before, the fractional delay <i>T</i><sub>2</sub> represented by its integer part (<i>int</i>)<i>T</i><sub>2</sub>, and a fractional part <i>frac</i>/3<i>, frac</i> = -1,0,1, is encoded as<maths id="math0079" num="(42)"><math display="block"><mrow><mtext mathvariant="italic">P</mtext><mtext>2 = ((</mtext><mtext mathvariant="italic">int</mtext><mtext>)</mtext><msub><mrow><mtext mathvariant="italic">T</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> - </mtext><msub><mrow><mtext mathvariant="italic">t</mtext></mrow><mrow><mtext mathvariant="italic">min</mtext></mrow></msub><mtext>)∗ 3 + </mtext><mtext mathvariant="italic">frac +</mtext><mtext> 2</mtext></mrow></math><img file="EP0747883A2_D0097.tif" /></maths> where <i>t</i><sub><i>min</i></sub> is derived from <i>T</i><sub>1</sub> as before.
0123To make the coder more robust against random bit errors, a parity bit <i>P</i>0 is computed on the delay index of the first subframe. The parity bit is generated through an XOR operation on the 6 most significant bits of <i>P</i>1. At the decoder this parity bit is recomputed and if the recomputed value does not agree with the transmitted value, an error concealment procedure is applied.
3.7.3 Computation of the adaptive-codebook gain
0124Once the adaptive-codebook delay is determined, the adaptive-codebook gain <i>g</i><sub><i>p</i></sub> is computed as<maths id="math0080" num=""><img file="EP0747883A2_D0098.tif" /></maths> where <i>y(n)</i> is the filtered adaptive codebook vector (zero-state response of <i>W(z</i>)/<i>Â</i>(<i>z</i>) to <i>v</i>(<i>n</i>)). This vector is obtained by convolving <i>v(n)</i> with <i>h(n)</i><maths id="math0081" num=""><img file="EP0747883A2_D0099.tif" /></maths>
0125Note that by maximizing the term in Eq. (37) in most cases <i>g</i><sub><i>p</i></sub> > 0. In case the signal contains only negative correlations, the value of <i>g</i><sub><i>p</i></sub> is set to 0.
3.8 Fixed codebook: structure and search
0126The fixed codebook is based on an algebraic codebook structure using an interleaved single-pulse permutation (ISPP) design. In this codebook, each codebook vector contains 4 non-zero pulses. Each pulse can have either the amplitudes +1 or -1, and can assume the positions given in Table 7.
0127The codebook vector <i>c</i>(<i>n</i>) is constructed by taking a zero vector, and putting the 4 unit pulses at the found locations, multiplied with their corresponding sign.<maths id="math0082" num="(45)"><math display="block"><mrow><mtext mathvariant="italic">c</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = s0δ(</mtext><mtext mathvariant="italic">n</mtext><mtext> - </mtext><mtext mathvariant="italic">i</mtext><mtext>0) + </mtext><mtext mathvariant="italic">s</mtext><mtext>1δ(</mtext><mtext mathvariant="italic">n</mtext><mtext> - </mtext><mtext mathvariant="italic">i</mtext><mtext>1) + </mtext><mtext mathvariant="italic">s</mtext><mtext>2δ(</mtext><mtext mathvariant="italic">n</mtext><mtext> - </mtext><mtext mathvariant="italic">i</mtext><mtext>2) + </mtext><mtext mathvariant="italic">s</mtext><mtext>3δ(</mtext><mtext mathvariant="italic">n</mtext><mtext> - </mtext><mtext mathvariant="italic">i</mtext><mtext>3), </mtext><mtext mathvariant="italic">n</mtext><mtext> = 0,....39.</mtext></mrow></math><img file="EP0747883A2_D0100.tif" /></maths> where δ(0) is a unit pulse. A special feature incorporated in the codebook is that the selected codebook vector is filtered through an adaptive pre-filter <i>P</i>(<i>z</i>) which enhances harmonic components to improve the synthesized speech quality. Here the filter<maths id="math0083" num="(46)"><math display="block"><mrow><mtext mathvariant="italic">P</mtext><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>) = 1/(1 - β</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-</mtext></mrow></msup><msup><mrow><mtext></mtext></mrow><mrow><mtext mathvariant="italic">T</mtext></mrow></msup><mtext>)</mtext></mrow></math><img file="EP0747883A2_D0101.tif" /></maths>
0128<tables id="tabl0007" num="0007"><table frame="all"><title>Table 7:</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colnum="1" colname="col1" colwidth="52.50mm" /><colspec colnum="2" colname="col2" colwidth="52.50mm" /><colspec colnum="3" colname="col3" colwidth="52.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col3" align="center">Structure of fixed codebook <i>C</i></entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left"><i>Pulse</i></entry><entry namest="col2" nameend="col2" align="left"><i>Sign</i></entry><entry namest="col3" nameend="col3" align="center"><i>Positions</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="right">i0</entry><entry namest="col2" nameend="col2" align="right">s0</entry><entry namest="col3" nameend="col3" align="left">0, 5, 10, 15, 20, 25, 30, 35</entry></row><row><entry namest="col1" nameend="col1" align="right">i1</entry><entry namest="col2" nameend="col2" align="right">s1</entry><entry namest="col3" nameend="col3" align="left">1, 6, 11, 16, 21, 26, 31, 36</entry></row><row><entry namest="col1" nameend="col1" align="right">i2</entry><entry namest="col2" nameend="col2" align="right">s2</entry><entry namest="col3" nameend="col3" align="left">2, 7, 12, 17, 22, 27, 32, 37</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="right">i3</entry><entry namest="col2" nameend="col2" align="right">s3</entry><entry namest="col3" nameend="col3" align="left">3, 8, 13, 18, 23, 28, 33, 38 4, 9, 14, 19, 24, 29, 34, 39</entry></row></tbody></tgroup></table></tables> is used, where <i>T</i> is the integer component of the pitch delay of the current subframe, and β is a pitch gain. The value of β is made adaptive by using the quantized adaptive codebook gain from the previous subframe bounded by 0.2 and 0.8.<maths id="math0084" num="(47)"><math display="block"><mrow><mtext>β = </mtext><mover accent="true"><mrow><mtext mathvariant="italic">g</mtext></mrow><mo>ˆ</mo></mover><msubsup><mrow><mtext></mtext></mrow><mrow><mtext>p</mtext></mrow><mrow><mfenced open="(" close=")"><mrow><mtext mathvariant="italic">m</mtext><mtext>-1</mtext></mrow></mfenced></mrow></msubsup><mtext> , 0.2 ≤ β ≤ 0.8.</mtext></mrow></math><img file="EP0747883A2_D0102.tif" /></maths>
0129This filter enhances the harmonic structure for delays less than the subframe size of 40. This modification is incorporated in the fixed codebook search by modifying the impulse response <i>h(n)</i>. according to<maths id="math0085" num="(48)"><math display="block"><mrow><mtext mathvariant="italic">h</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = </mtext><mtext mathvariant="italic">h</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) + β</mtext><mtext mathvariant="italic">h</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext> - </mtext><mtext mathvariant="italic">T</mtext><mtext>), </mtext><mtext mathvariant="italic">n</mtext><mtext> = </mtext><mtext mathvariant="italic">T</mtext><mtext>,...39.</mtext></mrow></math><img file="EP0747883A2_D0103.tif" /></maths>
3.8.1 Fixed-codebook search procedure
0130The fixed codebook is searched by minimizing the mean-squared error between the weighted input speech <i>sw</i>(<i>n</i>) of Eq. (33), and the weighted reconstructed speech. The target signal used in the closed-loop pitch search is updated by subtracting the adaptive codebook contribution. That is<maths id="math0086" num="(49)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">x</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = </mtext><mtext mathvariant="italic">x</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) - </mtext><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><mtext mathvariant="italic">y</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>), </mtext><mtext mathvariant="italic">n</mtext><mtext> = 0,....39,</mtext></mrow></math><img file="EP0747883A2_D0104.tif" /></maths> where <i>y</i>(<i>n</i>) is the filtered adaptive codebook vector of Eq. (44).
0131The matrix H is defined as the lower triangular Toepliz convolution matrix with diagonal <i>h</i>(0) and lower diagonals <i>h</i>(1),...,<i>h</i>(39)<i>.</i> If <i>c</i><sub><i>k</i></sub> is the algebraic codevector at index <i>k</i>, then the codebook is searched by maximizing the term<maths id="math0087" num=""><img file="EP0747883A2_D0105.tif" /></maths> where <i>d</i>(<i>n</i>) is the correlation between the target signal <i>x</i><sub>2</sub>(<i>n</i>) and the impulse response <i>h</i>(<i>n</i>), and Φ = H<sup><i>t</i></sup>H is the matrix of correlations of <i>h</i>(<i>n</i>). The signal <i>d</i>(<i>n</i>) and the matrix Φ are computed before the codebook search. The elements of <i>d</i>(<i>n</i>) are computed from<maths id="math0088" num=""><img file="EP0747883A2_D0106.tif" /></maths> and the elements of the symmetric matrix Φ are computed by<maths id="math0089" num=""><img file="EP0747883A2_D0107.tif" /></maths>
0132Note that only the elements actually needed are computed and an efficient storage procedure has been designed to speed up the search procedure.
0133The algebraic structure of the codebook <i>C</i> allows for a fast search procedure since the codebook vector <i>c</i><sub><i>k</i></sub> contains only four nonzero pulses. The correlation in the numerator of Eq. (50) for a given vector <i>c</i><sub><i>k</i></sub> is given by<maths id="math0090" num=""><img file="EP0747883A2_D0108.tif" /></maths> where <i>m</i><sub><i>i</i></sub> is the position of the <i>i</i>th pulse and <i>a</i><sub><i>i</i></sub> is its amplitude. The energy in the denominator of Eq. (50) is given by<maths id="math0091" num=""><img file="EP0747883A2_D0109.tif" /></maths>
0134To simplify the search procedure, the pulse amplitudes are predetermined by quantizing the signal <i>d</i>(<i>n</i>). This is done by setting the amplitude of a pulse at a certain position equal to the sign of <i>d</i>(<i>n</i>) at that position. Before the codebook search, the following steps are done. First, the signal <i>d</i>(<i>n</i>) is decomposed into two signals: the absolute signal <i>d'</i>(<i>n</i>) = <maths id="math0092" num=""><math display="inline"><mrow><mfenced open="|" close="|"><mrow><mtext mathvariant="italic">d</mtext><mfenced open="(" close=")"><mrow><mtext mathvariant="italic">n</mtext></mrow></mfenced></mrow></mfenced></mrow></math><img file="EP0747883A2_D0110.tif" /></maths> and the sign signal sign[<i>d</i>(<i>n</i>)]. Second, the matrix Φ is modified by including the sign information; that is,<maths id="math0093" num="(55)"><math display="block"><mrow><mtext mathvariant="italic">o'</mtext><mtext>(</mtext><mtext mathvariant="italic">i, j</mtext><mtext>) = sign [</mtext><mtext mathvariant="italic">d</mtext><mtext>(</mtext><mtext mathvariant="italic">i</mtext><mtext>)] sign[</mtext><mtext mathvariant="italic">d</mtext><mtext>(</mtext><mtext mathvariant="italic">j</mtext><mtext>)] φ(</mtext><mtext mathvariant="italic">i, j</mtext><mtext>), </mtext><mtext mathvariant="italic">i</mtext><mtext> = 0,...,39, </mtext><mtext mathvariant="italic">j</mtext><mtext> = </mtext><mtext mathvariant="italic">i</mtext><mtext>,...,39.</mtext></mrow></math><img file="EP0747883A2_D0111.tif" /></maths>
0135To remove the factor 2 in Eq. (54)<maths id="math0094" num="(56)"><math display="block"><mrow><mtext>φ'(</mtext><mtext mathvariant="italic">i, i</mtext><mtext>) = 0.5φ(</mtext><mtext mathvariant="italic">i, i</mtext><mtext>), </mtext><mtext mathvariant="italic">i</mtext><mtext> = 0,...,39.</mtext></mrow></math><img file="EP0747883A2_D0112.tif" /></maths>
0136The correlation in Eq. (53) is now given by<maths id="math0095" num="(57)"><math display="block"><mrow><mtext mathvariant="italic">C</mtext><mtext> = </mtext><mtext mathvariant="italic">d'</mtext><mtext>(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><mtext>) + </mtext><mtext mathvariant="italic">d'</mtext><mtext>(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>) + </mtext><mtext mathvariant="italic">d'</mtext><mtext>(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) + </mtext><mtext mathvariant="italic">d'</mtext><mtext>(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>),</mtext></mrow></math><img file="EP0747883A2_D0113.tif" /></maths> and the energy in Eq. (54) is given by<maths id="math0096" num="(58)"><math display="block"><mrow><mtext mathvariant="italic">E</mtext><mtext> = φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><mtext>,</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><mtext>)</mtext><mspace linebreak="newline" /><mtext> + φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>) + φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>)</mtext><mspace linebreak="newline" /><mtext>+ φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) + φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>) + φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>)</mtext><mspace linebreak="newline" /><mtext>+ φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>) + φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>) + φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>) + φ'(</mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>, </mtext><msub><mrow><mtext mathvariant="italic">m</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>).</mtext></mrow></math><img file="EP0747883A2_D0114.tif" /></maths>
0137A focused search approach is used to further simplify the search procedure. In this approach a precomputed threshold is tested before entering the last loop, and the loop is entered only if this threshold is exceeded. The maximum number of times the loop can be entered is fixed so that a low percentage of the codebook is searched. The threshold is computed based on the correlation <i>C</i>. The maximum absolute correlation and the average correlation due to the contribution of the first three pulses, <i>max</i><sub>3</sub> and <i>av</i><sub>3</sub>, are found before the codebook search. The threshold is given by<maths id="math0097" num="(59)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">thr</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">av</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext> + </mtext><msub><mrow><mtext mathvariant="italic">K</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>(</mtext><msub><mrow><mtext mathvariant="italic">max</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext> - </mtext><msub><mrow><mtext mathvariant="italic">av</mtext></mrow><mrow><mtext>3</mtext></mrow></msub><mtext>).</mtext></mrow></math><img file="EP0747883A2_D0115.tif" /></maths>
0138The fourth loop is entered only if the absolute correlation (due to three pulses) exceeds <i>thr</i><sub>3</sub><i>,</i> where 0 ≤ <i>K</i><sub>3</sub> < 1. The value of <i>K</i><sub>3</sub> controls the percentage of codebook search and it is set here to 0.4. Note that this results in a variable search time, and to further control the search the number of times the last loop is entered (for the 2 subframes) cannot exceed a certain maximum, which is set here to 180 (the average worst case per subframe is 90 times).
3.8.2 Codeword computation of the fixed codebook
0139The pulse positions of the pulses i0, i1, and i2, are encoded with 3 bits each, while the position of i3 is encoded with 4 bits. Each pulse amplitude is encoded with 1 bit. This gives a total of 17 bits for the 4 pulses. By defining <i>s</i> = 1 if the sign is positive and <i>s</i> = 0 is the sign is negative, the sign codeword is obtained from<maths id="math0098" num="(60)"><math display="block"><mrow><mtext mathvariant="italic">S</mtext><mtext> = </mtext><mtext mathvariant="italic">s</mtext><mtext>0 + 2 ∗ </mtext><mtext mathvariant="italic">s</mtext><mtext>1 + 4 ∗·</mtext><mtext mathvariant="italic">s</mtext><mtext>2 + 8 ∗ </mtext><mtext mathvariant="italic">s</mtext><mtext>3</mtext></mrow></math><img file="EP0747883A2_D0116.tif" /></maths> and the fixed codebook codeword is obtained from<maths id="math0099" num="(61)"><math display="block"><mrow><mtext mathvariant="italic">C</mtext><mtext> = (</mtext><mtext mathvariant="italic">i</mtext><mtext>0/5) + 8 ∗ (</mtext><mtext mathvariant="italic">i</mtext><mtext>1/5) + 64 ∗ (</mtext><mtext mathvariant="italic">i</mtext><mtext>2/5) + 512 ∗ (2 ∗ (</mtext><mtext mathvariant="italic">i</mtext><mtext>3/5) + </mtext><mtext mathvariant="italic">jx</mtext><mtext>)</mtext></mrow></math><img file="EP0747883A2_D0117.tif" /></maths> where <i>jx</i> = 0 if <i>i</i>3 = 3, 8,..., and <i>jx</i> = 1 if <i>i</i>3 = 4,9, ...
3.9 Quantization of the gains
0140The adaptive-codebook gain (pitch gain) and the fixed (algebraic) codebook gain are vector quantized using 7 bits. The gain codebook search is done by minimizing the mean-squared weighted error between original and reconstructed speech which is given by<maths id="math0100" num="(62)"><math display="block"><mrow><mtext mathvariant="italic">E =</mtext><msup><mrow><mtext> x</mtext></mrow><mrow><mtext mathvariant="italic">t</mtext></mrow></msup><mtext>x + </mtext><msubsup><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow><mrow><mtext>2</mtext></mrow></msubsup><msup><mrow><mtext> y</mtext></mrow><mrow><mtext>t</mtext></mrow></msup><mtext> + </mtext><msubsup><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext>c</mtext></mrow><mrow><mtext>2</mtext></mrow></msubsup><msup><mrow><mtext> z</mtext></mrow><mrow><mtext mathvariant="italic">t</mtext></mrow></msup><mtext>z - 2</mtext><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><msup><mrow><mtext>x</mtext></mrow><mrow><mtext mathvariant="italic">t</mtext></mrow></msup><mtext>y - 2</mtext><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><msup><mrow><mtext>x</mtext></mrow><mrow><mtext mathvariant="italic">t</mtext></mrow></msup><mtext>z + 2</mtext><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><msup><mrow><mtext>y</mtext></mrow><mrow><mtext mathvariant="italic">t</mtext></mrow></msup><mtext>z,</mtext></mrow></math><img file="EP0747883A2_D0118.tif" /></maths> where x is the target vector (see Section 3.6), y is the filtered adaptive codebook vector of Eq. (44), and z is the fixed codebook vector convolved with <i>h(n)</i>,<maths id="math0101" num=""><img file="EP0747883A2_D0119.tif" /></maths>
3.9.1 Gain prediction
0141The fixed codebook gain <i>g</i><sub><i>c</i></sub> can be expressed as<maths id="math0102" num="(64)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext> = γ</mtext><msub><mrow><mtext mathvariant="italic">g'</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext>,</mtext></mrow></math><img file="EP0747883A2_D0120.tif" /></maths> where <i>g'</i><sub><i>c</i></sub> is a predicted gain based on previous fixed codebook energies, and γ is a correction factor.
0142The mean energy of the fixed codebook contribution is given by<maths id="math0103" num=""><img file="EP0747883A2_D0121.tif" /></maths> After scaling the vector <i>c</i><sub><i>i</i></sub> with the fixed codebook gain <i>g</i><sub><i>c</i></sub>, the energy of the scaled fixed codebook is given by 20 log<i>g</i><sub><i>c</i></sub> + <i>E</i>. Let <i>E</i><sup>(<i>m</i>)</sup> be the mean-removed energy (in dB) of the (scaled) fixed codebook contribution at subframe <i>m</i>, given by<maths id="math0104" num="(66)"><math display="block"><mrow><msup><mrow><mtext mathvariant="italic">E</mtext></mrow><mrow><mtext>(</mtext><mtext mathvariant="italic">m</mtext><mtext>)</mtext></mrow></msup><mtext> = 20 log</mtext><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext> + </mtext><mtext mathvariant="italic">E - </mtext><mover accent="true"><mrow><mtext mathvariant="italic">E</mtext></mrow><mo>¯</mo></mover><mtext>,</mtext></mrow></math><img file="EP0747883A2_D0122.tif" /></maths> where <maths id="math0105" num=""><math display="inline"><mrow><mover accent="true"><mrow><mtext mathvariant="italic">E</mtext></mrow><mo>¯</mo></mover></mrow></math><img file="EP0747883A2_D0123.tif" /></maths> = 30 dB is the mean energy of the fixed codebook excitation. The gain <i>g</i><sub><i>c</i></sub> can be expressed as a function of <i>E</i><sup>(<i>m</i>)</sup>, <i>E</i>, and <maths id="math0106" num=""><math display="inline"><mrow><mover accent="true"><mrow><mtext mathvariant="italic">E</mtext></mrow><mo>¯</mo></mover></mrow></math><img file="EP0747883A2_D0124.tif" /></maths> by<maths id="math0107" num="(67)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext> = 10</mtext><msup><mrow><mtext></mtext></mrow><mrow><mtext>(</mtext><msup><mrow><mtext mathvariant="italic">E</mtext></mrow><mrow><mtext mathvariant="italic">(m)</mtext></mrow></msup><mtext mathvariant="italic">+</mtext><mover accent="true"><mrow><mtext mathvariant="italic">E</mtext></mrow><mo>¯</mo></mover><mtext mathvariant="italic">-E</mtext><mtext>)/20</mtext></mrow></msup><mtext>.</mtext></mrow></math><img file="EP0747883A2_D0125.tif" /></maths>
0143The predicted gain <i>g'</i><sub><i>c</i></sub> is found by predicting the log-energy of the current fixed codebook contribution from the log-energy of previous fixed codebook contributions. The 4th order MA prediction is done as follows. The predicted energy is given by<maths id="math0108" num=""><img file="EP0747883A2_D0126.tif" /></maths> where [<i>b</i><sub>1</sub><i>b</i><sub>2</sub><i>b</i><sub>3</sub><i>b</i><sub>4</sub>] = [0.68 0.58 0.34 0.19] are the MA prediction coefficients, and <i>R̂</i><sup>(<i>m</i>)</sup> is the quantized version of the prediction error <i>R</i><sup>(<i>m</i>)</sup> at subframe <i>m</i>, defined by<maths id="math0109" num=""><img file="EP0747883A2_D0127.tif" /></maths>
0144The predicted gain <i>g'</i><sub><i>c</i></sub> is found by replacing <i>E</i><sup><i>(m)</i></sup> by its predicted value in Eq (67).<maths id="math0110" num=""><img file="EP0747883A2_D0128.tif" /></maths>
0145The correction factor γ is related to the gain-prediction error by<maths id="math0111" num=""><img file="EP0747883A2_D0129.tif" /></maths>
3.9.2 Codebook search for gain quantization
0146The adaptive-codebook gain, <i>g</i><sub><i>p</i></sub>, and the factor 7 are vector quantized using a 2-stage conjugate structured codebook. The first stage consists of a 3 bit two-dimensional codebook <i>GA</i>, and the second stage consists of a 4 bit two-dimensional codebook <i>GB</i>. The first element in each codebook represents the quantized adaptive codebook gain <i>ĝ</i><sub><i>p</i></sub>, and the second element represents the quantized fixed codebook gain correction factor γ̂. Given codebook indices <i>m</i> and <i>n</i> for <i>GA</i> and <i>GB</i>, respectively, the quantized adaptive-codebook gain is given by<maths id="math0112" num="(72)"><math display="block"><mrow><msub><mrow><mover accent="true"><mrow><mtext mathvariant="italic">g</mtext></mrow><mo>ˆ</mo></mover></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">GA</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">m</mtext><mtext>) + </mtext><msub><mrow><mtext mathvariant="italic">GB</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>),</mtext></mrow></math><img file="EP0747883A2_D0130.tif" /></maths> and the quantized fixed-codebook gain by<maths id="math0113" num="(73)"><math display="block"><mrow><msub><mrow><mover accent="true"><mrow><mtext mathvariant="italic">g</mtext></mrow><mo>ˆ</mo></mover></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">g'</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext></mtext><mover accent="true"><mrow><mtext>γ</mtext></mrow><mo>ˆ</mo></mover><mtext> = </mtext><msub><mrow><mtext mathvariant="italic">g'</mtext></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext> (</mtext><msub><mrow><mtext mathvariant="italic">GA</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">m</mtext><mtext>) + </mtext><msub><mrow><mtext mathvariant="italic">GB</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>)).</mtext></mrow></math><img file="EP0747883A2_D0131.tif" /></maths>
0147This conjugate structure simplifies the codebook search, by applying a pre-selection process. The optimum pitch gain <i>g</i><sub><i>p</i></sub>, and fixed-codebook gain, <i>g</i><sub><i>c</i></sub>, are derived from Eq. (62), and are used for the pre-selection. The codebook <i>GA</i> contains 8 entries in which the second element (corresponding to <i>g</i><sub><i>c</i></sub>) has in general larger values than the first element (corresponding to <i>g</i><sub><i>p</i></sub>). This bias allows a pre-selection using the value of <i>g</i><sub><i>c</i></sub>. In this pre-selection process, a cluster of 4 vectors whose second element are close to <i>gx</i><sub><i>c</i></sub>, where <i>gx</i><sub><i>c</i></sub> is derived from <i>g</i><sub><i>c</i></sub> and <i>g</i><sub><i>p</i></sub>. Similarly, the codebook <i>GB</i> contains 16 entries in which have a bias towards the first element (corresponding to <i>g</i><sub><i>p</i></sub>). A cluster of 8 vectors whose first elements are close to <i>g</i><sub><i>p</i></sub> are selected. Hence for each codebook the best 50 % candidate vectors are selected. This is followed by an exhaustive search over the remaining 4 ∗ 8 = 32 possibilities, such that the combination of the two indices minimizes the weighted mean-squared error of Eq. (62).
3.9.3 Codeword computation for gain quantizer
0148The codewords <i>GA</i> and <i>GB</i> for the gain quantizer are obtained from the indices corresponding to the best choice. To reduce the impact of single bit errors the codebook indices are mapped.
3.10 Memory update
0149An update of the states of the synthesis and weighting filters is needed to compute the target signal in the next subframe. After the two gains are quantized, the excitation signal, <i>u(n)</i>. in the present subframe is found by<maths id="math0114" num="(74)"><math display="block"><mrow><mtext mathvariant="italic">u</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = </mtext><msub><mrow><mover accent="true"><mrow><mtext mathvariant="italic">g</mtext></mrow><mo>ˆ</mo></mover></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><mtext mathvariant="italic">v</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) + </mtext><msub><mrow><mover accent="true"><mrow><mtext mathvariant="italic">g</mtext></mrow><mo>ˆ</mo></mover></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext mathvariant="italic">c</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>), </mtext><mtext mathvariant="italic">n</mtext><mtext> = 0,...,39,</mtext></mrow></math><img file="EP0747883A2_D0132.tif" /></maths> where <i>ĝ</i><sub><i>p</i></sub> and <i>ĝ</i><sub><i>c</i></sub> are the quantized adaptive and fixed codebook gains, respectively <i>v</i>(<i>n</i>) the adaptive codebook vector (interpolated past excitation), and <i>c</i>(<i>n</i>) is the fixed codebook vector (algebraic codevector including pitch sharpening). The states of the filters can be updated by filtering the signal <i>r</i>(<i>n</i>) - <i>u</i>(<i>n</i>) (difference between residual and excitation) through the filters 1/<i>Â</i>(<i>z</i>) and <i>A</i>(<i>z</i>/γ<sub>1</sub>)/<i>A</i>(<i>z</i>/γ<sub>2</sub>) for the 40 sample subframe and saving the states of the filters. This would require 3 filter operations. A simpler approach, which requires only one filtering is as follows. The local synthesis speech, <i>ŝ</i>(<i>n</i>), is computed by filtering the excitation signal through 1/<i>Â</i>(<i>z</i>). The output of the filter due to the input <i>r</i>(<i>n</i>) - <i>u</i>(<i>n</i>) is equivalent to <i>e</i>(<i>n</i>) = <i>s</i>(<i>n</i>) - <i>ŝ</i>(<i>n</i>). So the states of the synthesis filter 1/<i>Â</i>(<i>z</i>) are given by <i>e</i>(<i>n</i>), <i>n</i> = 30,...,39. Updating the states of the filter <i>A</i>(<i>z</i>/γ<sub>1</sub>)/<i>A</i>(<i>z</i>/γ<sub>2</sub>) can be done by filtering the error signal <i>e</i>(<i>n</i>) through this filter to find the perceptually weighted error <i>ew</i>(<i>n</i>). However, the signal <i>ew</i>(<i>n</i>) can be equivalently found by<maths id="math0115" num="(75)"><math display="block"><mrow><mtext mathvariant="italic">ew</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = </mtext><mtext mathvariant="italic">x</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) - </mtext><msub><mrow><mover accent="true"><mrow><mtext mathvariant="italic">g</mtext></mrow><mo>ˆ</mo></mover></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><mtext mathvariant="italic">y</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) + </mtext><msub><mrow><mover accent="true"><mrow><mtext mathvariant="italic">g</mtext></mrow><mo>ˆ</mo></mover></mrow><mrow><mtext mathvariant="italic">c</mtext></mrow></msub><mtext mathvariant="italic">z</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>).</mtext></mrow></math><img file="EP0747883A2_D0133.tif" /></maths>
0150Since the signals <i>x</i>(<i>n</i>), <i>y</i>(<i>n</i>), and <i>z</i>(<i>n</i>) are available, the states of the weighting filter are updated by computing <i>ew</i>(<i>n</i>) as in Eq. (75) for <i>n</i> = 30,...,39. This saves two filter operations.
3.11 Encoder and Decoder initialization
0151All static encoder variables should be initialized to 0, except the variables listed in table 8. These variables need to be initialized for the decoder as well.
0152<tables id="tabl0008" num="0008"><table frame="all"><title>Table 8:</title><tgroup cols="3" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="52.50mm" /><colspec colnum="2" colname="col2" colwidth="52.50mm" /><colspec colnum="3" colname="col3" colwidth="52.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col3" align="center">Description of parameters with nonzero initialization.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Variable</i></entry><entry namest="col2" nameend="col2" align="center"><i>Reference</i></entry><entry namest="col3" nameend="col3" align="center"><i>Initial value</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left"><sub><i>i</i></sub><i>3</i></entry><entry namest="col2" nameend="col2" align="right">Section 3.8</entry><entry namest="col3" nameend="col3" align="right">0.8</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>l</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="right">Section 3.2.4</entry><entry namest="col3" nameend="col3" align="right"><i>i</i>π/11</entry></row><row><entry namest="col1" nameend="col1" align="left"><i>q</i><sub><i>i</i></sub></entry><entry namest="col2" nameend="col2" align="right">Section 3.2.4</entry><entry namest="col3" nameend="col3" align="right">0.9595, ..,</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left"><i>R̂</i><sup>(<i>k</i>)</sup></entry><entry namest="col2" nameend="col2" align="right">Section 3.9.1</entry><entry namest="col3" nameend="col3" align="right">-14</entry></row></tbody></tgroup></table></tables>
4 Functional description of the decoder
0153The signal flow at the decoder was shown in Section 2 (Figure 3). First the parameters are decoded (LP coefficients, adaptive codebook vector, fixed codebook vector, and gains). These decoded parameters are used to compute the reconstructed speech signal. This process is described in Section 4.1. This reconstructed signal is enhanced by a post-processing operation consisting of a postfilter and a high-pass filter (Section 4.2). Section 4.3 describes the error concealment procedure used when either a parity error has occurred, or when the frame erasure flag has been set.
4.1 Parameter decoding procedure
0154The transmitted parameters are listed in Table 9. At startup all static encoder variables should be
0155<tables id="tabl0009" num="0009"><table frame="all"><title>Table 9:</title><tgroup cols="3" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="52.50mm" /><colspec colnum="2" colname="col2" colwidth="52.50mm" /><colspec colnum="3" colname="col3" colwidth="52.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col3" align="center">Description of transmitted parameters indices. The bitstream ordering is reflected by the order in the table. For each the most significant bit (MSB) is transmitted first.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Symbol</i></entry><entry namest="col2" nameend="col2" align="left"><i>Description</i></entry><entry namest="col3" nameend="col3" align="center"><i>Bits</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">L0</entry><entry namest="col2" nameend="col2" align="left">Switched predictor index of LSP quantizer</entry><entry namest="col3" nameend="col3" align="right">1</entry></row><row><entry namest="col1" nameend="col1" align="left">L1</entry><entry namest="col2" nameend="col2" align="left">First stage vector of LSP quantizer</entry><entry namest="col3" nameend="col3" align="right">7</entry></row><row><entry namest="col1" nameend="col1" align="left">L2</entry><entry namest="col2" nameend="col2" align="left">Second stage lower vector of LSP quantizer</entry><entry namest="col3" nameend="col3" align="right">5</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">L3</entry><entry namest="col2" nameend="col2" align="left">Second stage higher vector of LSP quantizer</entry><entry namest="col3" nameend="col3" align="right">5</entry></row><row><entry namest="col1" nameend="col1" align="left">P1</entry><entry namest="col2" nameend="col2" align="left">Pitch delay 1st subframe</entry><entry namest="col3" nameend="col3" align="right">8</entry></row><row><entry namest="col1" nameend="col1" align="left">P0</entry><entry namest="col2" nameend="col2" align="left">Parity bit for pitch</entry><entry namest="col3" nameend="col3" align="right">1</entry></row><row><entry namest="col1" nameend="col1" align="left">S1</entry><entry namest="col2" nameend="col2" align="left">Signs of pulses 1st subframe</entry><entry namest="col3" nameend="col3" align="right">4</entry></row><row><entry namest="col1" nameend="col1" align="left">C1</entry><entry namest="col2" nameend="col2" align="left">Fixed codebook 1st subframe</entry><entry namest="col3" nameend="col3" align="right">13</entry></row><row><entry namest="col1" nameend="col1" align="left">GA1</entry><entry namest="col2" nameend="col2" align="left">Gain codebook (stage 1) 1st subframe</entry><entry namest="col3" nameend="col3" align="right">3</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">GB1</entry><entry namest="col2" nameend="col2" align="left">Gain codebook (stage 2) 1st subframe</entry><entry namest="col3" nameend="col3" align="right">4</entry></row><row><entry namest="col1" nameend="col1" align="left">P2</entry><entry namest="col2" nameend="col2" align="left">Pitch delay 2nd subframe</entry><entry namest="col3" nameend="col3" align="right">5</entry></row><row><entry namest="col1" nameend="col1" align="left">S2</entry><entry namest="col2" nameend="col2" align="left">Signs of pulses 2nd subframe</entry><entry namest="col3" nameend="col3" align="right">4</entry></row><row><entry namest="col1" nameend="col1" align="left">C2</entry><entry namest="col2" nameend="col2" align="left">Fixed codebook 2nd subframe</entry><entry namest="col3" nameend="col3" align="right">13</entry></row><row><entry namest="col1" nameend="col1" align="left">GA2</entry><entry namest="col2" nameend="col2" align="left">Gain codebook (stage 1) 2nd subframe</entry><entry namest="col3" nameend="col3" align="right">3</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">GB2</entry><entry namest="col2" nameend="col2" align="left">Gain codebook (stage 2) 2nd subframe</entry><entry namest="col3" nameend="col3" align="right">4</entry></row></tbody></tgroup></table></tables> initialized to 0, except the variables listed in Table 8. The decoding process is done in the following order:
4.1.1 Decoding of LP filter parameters
0156The received indices L0, L1, L2, and L3 of the LSP quantizer are used to reconstruct the quantized LSP coefficients using the procedure described in Section 3.2.4. The interpolation procedure described in Section 3.2.5 is used to obtain 2 interpolated LSP vectors (corresponding to 2 subframes). For each subframe, the interpolated LSP vector is converted to LP filter coefficients <i>a</i><sub><i>i</i></sub>, which are used for synthesizing the reconstructed speech in the subframe.
0157The following steps are repeated for each subframe: <ul id="ul0005" list-style="none"><li>1. decoding of the adaptive codebook vector,</li><li>2. decoding of the fixed codebook vector,</li><li>3. decoding of the adaptive and fixed codebook gains,</li><li>4. computation of the reconstructed speech,</li></ul>
4.1.2 Decoding of the adaptive codebook vector
0158The received adaptive codebook index is used to find the integer and fractional parts of the pitch delay. The integer part (<i>int</i>)<i>T</i><sub>1</sub> and fractional part <i>frac</i> of <i>T</i><sub>1</sub> are obtained from P1 as follows:<img file="EP0747883A2_D0134.tif" />
0159The integer and fractional part of <i>T</i><sub>2</sub> are obtained from P2 and <i>t</i><sub><i>min</i></sub>, where <i>t</i><sub><i>min</i></sub> is derived from <i>P</i>1 as follows<img file="EP0747883A2_D0135.tif" /> Now <i>T</i><sub>2</sub> is obtained from<maths id="math0116" num=""><math display="block"><mrow><mtext>(</mtext><mtext mathvariant="italic">int</mtext><mtext>)</mtext><msub><mrow><mtext mathvariant="italic">T</mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext> = (P2+2)/3-1 + </mtext><msub><mrow><mtext mathvariant="italic">t</mtext></mrow><mrow><mtext mathvariant="italic">min</mtext></mrow></msub><mspace linebreak="newline" /><mtext mathvariant="italic">frac</mtext><mtext> = P2-2 - ((P2+2)/3-1)∗3</mtext></mrow></math><img file="EP0747883A2_D0136.tif" /></maths>
0160The adaptive codebook vector <i>v</i>(<i>n</i>) is found by interpolating the past excitation <i>u</i>(<i>n</i>) (at the pitch delay) using Eq. (40).
4.1.3 Decoding of the fixed codebook vector
0161The received fixed codebook index <i>C</i> is used to extract the positions of the excitation pulses. The pulse signs are obtained from <i>S</i>. Once the pulse positions and signs are decoded the fixed codebook vector <i>c</i>(<i>n</i>), can be constructed. If the integer part of the pitch delay, <i>T</i>, is less than the subframe size 40, the pitch enhancement procedure is applied which modifies <i>c</i>(<i>n</i>) according to Eq. (48).
4.1.4 Decoding of the adaptive and fixed codebook gains
0162The received gain codebook index gives the adaptive codebook gain <i>ĝ</i><sub><i>p</i></sub> and the fixed codebook gain correction factor γ̂. This procedure is described in detail in Section 3.9. The estimated fixed codebook gain <i>g'</i><sub><i>c</i></sub> is found using Eq. (70). The fixed codebook vector is obtained from the product of the quantized gain correction factor with this predicted gain (Eq. (64)). The adaptive codebook gain is reconstructed using Eq. (72).
4.1.5 Computation of the parity bit
0163Before the speech is reconstructed, the parity bit is recomputed from the adaptive codebook delay (Section 3.7.2). If this bit is not identical to the transmitted parity bit <i>P</i>0, it is likely that bit errors occurred during transmission and the error concealment procedure of Section 4.3 is used.
4.1.6 Computing the reconstructed speech
0164The excitation <i>u</i>(<i>n</i>) at the input of the synthesis filter (see Eq. (74)) is input to the LP synthesis filter. The reconstructed speech for the subframe is given by<maths id="math0117" num=""><img file="EP0747883A2_D0137.tif" /></maths> where <i>â</i><sub><i>i</i></sub> are the interpolated LP filter coefficients.
0165The reconstructed speech <i>ŝ</i>(<i>n</i>) is then processed by a post processor which is described in the next section.
4.2 Post-processing
0166Post-processing consists of three functions: adaptive postfiltering, high-pass filtering, and signal up-scaling. The adaptive postfilter is the cascade of three filters: a pitch postfilter <i>H</i><sub><i>p</i></sub>(<i>z</i>), a short-term postfilter <i>H</i><sub><i>f</i></sub>(<i>z</i>), and a tilt compensation filter <i>H</i><sub><i>t</i></sub>(<i>z</i>), followed by an adaptive gain control procedure. The postfilter is updated every subframe of 5 ms. The postfiltering process is organized as follows. First, the synthesis speech <i>ŝ</i>(<i>n</i>) is inverse filtered through <i>Â(z/</i>γ<sub><i>n</i></sub>) to produce the residual signal <i>r̂</i>(<i>n</i>). The signal <i>r</i>(<i>n</i>) is used to compute the pitch delay <i>T</i> and gain <i>g</i><sub><i>pit</i></sub>. The signal <i>r̂</i>(<i>n</i>) is filtered through the pitch postfilter <i>H</i><sub><i>p</i></sub>(<i>z</i>) to produce the signal <i>r'</i>(<i>n</i>) which, in its turn, is filtered by the synthesis filter 1/[<i>g</i><sub><i>f</i></sub><i>Â</i>(<i>z/γ </i><sub><i>d</i></sub>)]. Finally, the signal at the outputs of the synthesis filter 1/[<i>g</i><sub><i>f</i></sub><i>Â</i>(<i>z/γ</i><sub><i>d</i></sub>)] is passed to the tilt compensation filter <i>H</i><sub><i>t</i></sub>(<i>z</i>) resulting in the postfiltered synthesis speech signal <i>sf</i>(<i>n</i>). Adaptive gain controle is then applied between <i>sf</i>(<i>n</i>) and <i>ŝ</i>(<i>n</i>) resulting in the signal <i>sf'</i>(<i>n</i>). The high-pass filtering and scaling operation operate on the postfiltered signal <i>sf'</i>(<i>n</i>).
4.2.1 Pitch postfilter
0167The pitch, or harmonic, postfilter is given by<maths id="math0118" num="(77)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">H</mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>) = </mtext><mfrac><mrow><mtext>1</mtext></mrow><mrow><mtext>1 + </mtext><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext>0</mtext></mrow></msub></mrow></mfrac><mtext> (1 + </mtext><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext mathvariant="italic">-T</mtext></mrow></msup><mtext>),</mtext></mrow></math><img file="EP0747883A2_D0138.tif" /></maths> where <i>T</i> is the pitch delay and <i>g</i><sub>0</sub> is a gain factor given by<maths id="math0119" num="(78)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext>0</mtext></mrow></msub><msub><mrow><mtext> = γ</mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow></msub><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext mathvariant="italic">pit</mtext></mrow></msub><mtext>,</mtext></mrow></math><img file="EP0747883A2_D0139.tif" /></maths> where <i>g</i><sub><i>pit</i></sub> is the pitch gain. Both the pitch delay and gain are determined from the decoder output signal. Note that <i>g</i><sub><i>pit</i></sub> is bounded by 1, and it is set to zero if the pitch prediction gain is less that 3 dB. The factor γ<sub><i>p</i></sub> controls the amount of harmonic postfiltering and has the value γ<sub><i>p</i></sub> = 0.5. The pitch delay and gain are computed from the residual signal <i>r̂</i>(<i>n</i>) obtained by filtering the speech <i>ŝ</i>(<i>n</i>) through <i>Â</i>(<i>z</i>/γ<sub><i>n</i></sub>), which is the numerator of the short-term postfilter (see Section 4.2.2)<maths id="math0120" num=""><img file="EP0747883A2_D0140.tif" /></maths>
0168The pitch delay is computed using a two pass procedure. The first pass selects the best integer <i>T</i><sub>0</sub> in the range [<i>T</i><sub>1</sub> - 1,<i>T</i><sub>1</sub> + 1], where <i>T</i><sub>1</sub> is the integer part of the (transmitted) pitch delay in the first subframe. The best integer delay is the one that maximizes the correlation<maths id="math0121" num=""><img file="EP0747883A2_D0141.tif" /></maths>
0169The second pass chooses the best fractional delay <i>T</i> with resolution 1/8 around <i>T</i><sub>0</sub>. This is done by finding the delay with the highest normalized correlation.<maths id="math0122" num=""><img file="EP0747883A2_D0142.tif" /></maths> where <i>r̂</i><sub><i>k</i></sub>(<i>n</i>) is the residual signal at delay <i>k</i>. Once the optimal delay <i>T</i> is found, the corresponding correlation value is compared against a threshold. <i>If R'</i>(<i>T</i>) < 0.5 then the harmonic postfilter is disabled by setting <i>g</i><sub><i>pit</i></sub> = 0. Otherwise the value of <i>g</i><sub><i>pit</i></sub> is computed from:<maths id="math0123" num=""><img file="EP0747883A2_D0143.tif" /></maths>
0170The noninteger delayed signal <i>r̂</i><sub><i>k</i></sub>(<i>n</i>) is first computed using an interpolation filter of length 33. After the selection of T, <i>r̂</i><sub><i>k</i></sub>(<i>n</i>) is recomputed with a longer interpolation filter of length 129. The new signal replaces the previous one only if the longer filter increases the value of <i>R'</i>(<i>T</i>).
4.2.2 Short-term postfilter
0171The short-term postfilter is given by<maths id="math0124" num=""><img file="EP0747883A2_D0144.tif" /></maths> where <i>Â</i>(<i>z</i>) is the received quantized LP inverse filter (LP analysis is not done at the decoder), and the factors γ<sub><i>n</i></sub> and γ<sub><i>d</i></sub> control the amount of short-term postfiltering, and are set to γ<sub><i>n</i></sub> = 0.55, and γ<sub><i>d</i></sub> = 0.7. The gain term <i>g</i><sub><i>f</i></sub> is calculated on the truncated impulse response, <i>h</i><sub><i>f</i></sub>(<i>n</i>), of the filter<i>Â</i>(<i>z/γ</i><sub><i>n</i></sub>)/<i>Â</i>(<i>z/γ</i><sub><i>d</i></sub>) and given by<maths id="math0125" num=""><img file="EP0747883A2_D0145.tif" /></maths>
4.2.3 Tilt compensation
0172Finally, the filter <i>H</i><sub><i>t</i></sub>(<i>z</i>) compensates for the tilt in the short-term postfilter <i>H</i><sub><i>f</i></sub>(<i>z</i>) and is given by<maths id="math0126" num="(85)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">H</mtext></mrow><mrow><mtext mathvariant="italic">t</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>) = </mtext><mfrac><mrow><mtext>1</mtext></mrow><mrow><msub><mrow><mtext mathvariant="italic">g</mtext></mrow><mrow><mtext>t</mtext></mrow></msub></mrow></mfrac><msub><mrow><mtext> (1 + γ</mtext></mrow><mrow><mtext mathvariant="italic">t</mtext></mrow></msub><msub><mrow><mtext mathvariant="italic">k</mtext></mrow><mrow><mtext>1</mtext></mrow></msub><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext>),</mtext></mrow></math><img file="EP0747883A2_D0146.tif" /></maths> where γ<sub>1</sub><i>k</i><sub>1</sub> is a tilt factor, <i>k</i><sub>1</sub> being the first reflection coefficient calculated on <i>h</i><sub><i>f</i></sub>(<i>n</i>) with<maths id="math0127" num=""><img file="EP0747883A2_D0147.tif" /></maths>
0173The gain term <i>g</i><sub><i>t</i></sub> = 1 - <maths id="math0128" num=""><math display="inline"><mrow><mfenced open="|" close="|"><mrow><msub><mrow><mtext>γ</mtext></mrow><mrow><mtext>t</mtext></mrow></msub><msub><mrow><mtext mathvariant="italic">k</mtext></mrow><mrow><mtext>1</mtext></mrow></msub></mrow></mfenced></mrow></math><img file="EP0747883A2_D0148.tif" /></maths> compensates for the decreasing effect of <i>g</i><sub><i>f</i></sub> in <i>H</i><sub><i>f</i></sub>(<i>z</i>). Furthermore, it has been shown that the product filter <i>H</i><sub><i>f</i></sub>(<i>z</i>)<i>H</i><sub><i>t</i></sub>(<i>z</i>) has generally no gain.
0174Two values for γ<sub><i>t</i></sub> are used depending on the sign of <i>k</i><sub>1</sub>. If <i>k</i><sub>1</sub> is negative, γ<sub><i>t</i></sub> = 0.9, and if <i>k</i><sub>1</sub> is positive, γ<sub><i>t</i></sub> = 0.2.
4.2.4 Adaptive gain control
0175Adaptive gain control is used to compensate for gain differences between the reconstructed speech signal <i>ŝ</i>(<i>n</i>) and the postfiltered signal <i>s</i><sub><i>f</i></sub>(<i>n</i>). The gain scaling factor G for the present subframe is computed by<maths id="math0129" num=""><img file="EP0747883A2_D0149.tif" /></maths>
0176The gain-scaled postfiltered signal <i>sf'</i>(<i>n</i>) is given by<maths id="math0130" num="(88)"><math display="block"><mrow><mtext mathvariant="italic">sf'</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = </mtext><mtext mathvariant="italic">g</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>)</mtext><mtext mathvariant="italic">sf</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>), </mtext><mtext mathvariant="italic">n</mtext><mtext> = 0,...,39,</mtext></mrow></math><img file="EP0747883A2_D0150.tif" /></maths> where <i>g</i>(<i>n</i>) is updated on a sample-by-sample basis and given by<maths id="math0131" num="(89)"><math display="block"><mrow><mtext mathvariant="italic">g</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext>) = 0.85</mtext><mtext mathvariant="italic">g</mtext><mtext>(</mtext><mtext mathvariant="italic">n</mtext><mtext> - 1) + 0.15</mtext><mtext mathvariant="italic">G</mtext><mtext>, </mtext><mtext mathvariant="italic">n</mtext><mtext> = 0,...,39.</mtext></mrow></math><img file="EP0747883A2_D0151.tif" /></maths>
0177The initial value of <i>g</i>(-1) = 1.0.
4.2.5 High-pass filtering and up-scaling
0178A high-pass filter at a cutoff frequency of 100 Hz is applied to the reconstructed and postfiltered speech <i>sf'</i>(<i>n</i>). The filter is given by<maths id="math0132" num="(90)"><math display="block"><mrow><msub><mrow><mtext mathvariant="italic">H</mtext></mrow><mrow><mtext mathvariant="italic">h</mtext></mrow></msub><msub><mrow><mtext></mtext></mrow><mrow><mtext>2</mtext></mrow></msub><mtext>(</mtext><mtext mathvariant="italic">z</mtext><mtext>) = </mtext><mfrac><mrow><mtext>0.93980581 - 1.8795834</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext> + 0.93980581</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-2</mtext></mrow></msup><mtext></mtext></mrow><mrow><mtext>1 - 1.9330735</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-1</mtext></mrow></msup><mtext> + 0.93589199</mtext><msup><mrow><mtext mathvariant="italic">z</mtext></mrow><mrow><mtext>-2</mtext></mrow></msup></mrow></mfrac><mtext> .</mtext></mrow></math><img file="EP0747883A2_D0152.tif" /></maths>
0179Up-scaling consists of multiplying the high-pass filtered output by a factor 2 to retrieve the input signal level.
4.3 Concealment of frame erasures and parity errors
0180An error concealment procedure has been incorporated in the decoder to reduce the degradations in the reconstructed speech because of frame erasures or random errors in the bitstream. This error concealment process is functional when either i) the frame of coder parameters (corresponding to a 10 ms frame) has been identified as being erased, or ii) a checksum error occurs on the parity bit for the pitch delay index <i>P</i>1. The latter could occur when the bitstream has been corrupted by random bit errors.
0181If a parity error occurs on <i>P</i>1, the delay value <i>T</i><sub>1</sub> is set to the value of the delay of the previous frame. The value of <i>T</i><sub>2</sub> is derived with the procedure outlined in Section 4.1.2, using this new value of <i>T</i><sub>1</sub>. If consecutive parity errors occur, the previous value of <i>T</i><sub>1</sub>, incremented by 1, is used.
0182The mechanism for detecting frame erasures is not defined in the Recommendation, and will depend on the application. The concealment strategy has to reconstruct the current frame, based on previously received information. The method used replaces the missing excitation signal with one of similar characteristics, while gradually decaying its energy. This is done by using a voicing classifier based on the long-term prediction gain, which is computed as part of the long-term postfilter analysis. The pitch postfilter (see Section 4.2.1) finds the long-term predictor for which the prediction gain is more than 3 dB. This is done by setting a threshold of 0.5 on the normalized correlation <i>R'</i>(<i>k</i>) (Eq. (81)). For the error concealment process, these frames will be classified as periodic. Otherwise the frame is declared nonperiodic. An erased frame inherits its class from the preceding (reconstructed) speech frame. Note that the voicing classification is continuously updated based on this reconstructed speech signal. Hence, for many consecutive erased frames the classification might change. Typically, this only happens if the original classification was periodic.
0183The specific steps taken for an erased frame are: <ul id="ul0006" list-style="none"><li>1. repetition of the LP filter parameters,</li><li>2. attenuation of adaptive and fixed codebook gains,</li><li>3. attenuation of the memory of the gain predictor,</li><li>4. generation of the replacement excitation.</li></ul>
4.3.1 Repetition of LP filter parameters
0184The LP parameters of the last good frame are used. The states of the LSF predictor contain the values of the received codewords <i>l</i><sub><i>i</i></sub>. Since the current codeword is not available it is computed from the repeated LSF parameters <i>ŵ</i><sub><i>i</i></sub> and the predictor memory from<maths id="math0133" num=""><img file="EP0747883A2_D0153.tif" /></maths>
4.3.2 Attenuation of adaptive and fixed codebook gains
0185An attenuated version of the previous fixed codebook gain is used.<maths id="math0134" num="(92)"><math display="block"><mrow><mtext mathvariant="italic">g</mtext><msubsup><mrow><mtext></mtext></mrow><mrow><mtext>c</mtext></mrow><mrow><mfenced open="(" close=")"><mrow><mtext mathvariant="italic">m</mtext></mrow></mfenced></mrow></msubsup><mtext> = 0.98 </mtext><mtext mathvariant="italic">g</mtext><msubsup><mrow><mtext></mtext></mrow><mrow><mtext>c</mtext></mrow><mrow><mfenced open="(" close=")"><mrow><mtext mathvariant="italic">m</mtext><mtext>-1</mtext></mrow></mfenced></mrow></msubsup><mtext> .</mtext></mrow></math><img file="EP0747883A2_D0154.tif" /></maths>
0186The same is done for the adaptive codebook gain. In addition a clipping operation is used to keep its value below 0,9.<maths id="math0135" num="(93)"><math display="block"><mrow><mtext mathvariant="italic">g</mtext><msubsup><mrow><mtext></mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow><mrow><mfenced open="(" close=")"><mrow><mtext mathvariant="italic">m</mtext></mrow></mfenced></mrow></msubsup><mtext> = 0.9 </mtext><mtext mathvariant="italic">g</mtext><msubsup><mrow><mtext></mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow><mrow><mfenced open="(" close=")"><mrow><mtext mathvariant="italic">m</mtext><mtext>-1</mtext></mrow></mfenced></mrow></msubsup><mtext></mtext><mtext mathvariant="italic">and g</mtext><msubsup><mrow><mtext></mtext></mrow><mrow><mtext mathvariant="italic">p</mtext></mrow><mrow><mfenced open="(" close=")"><mrow><mtext mathvariant="italic">m</mtext></mrow></mfenced></mrow></msubsup><mtext> < 0.9.</mtext></mrow></math><img file="EP0747883A2_D0155.tif" /></maths>
4.3.3 Attenuation of the memory of the gain predictor
0187The gain predictor uses the energy of previously selected codebooks. To allow for a smooth continuation of the coder once good frames are received, the memory of the gain predictor is updated with an attenuated version of the codebook energy. The value of <i>R̂</i><sup>(<i>m</i>)</sup> for the current subframe n is set to the averaged quantized gain prediction error. attenuated by 4 dB.<maths id="math0136" num=""><img file="EP0747883A2_D0156.tif" /></maths>
4.3.4 Generation of the replacement excitation
0188The excitation used depends on the periodicity classification. If the last correctly received frame was classified as periodic, the current frame is considered to be periodic as well. In that case only the adaptive codebook is used, and the fixed codebook contribution is set to zero. The pitch delay is based on the last correctly received pitch delay and is repeated for each successive frame. To avoid excessive periodicity the delay is increased by one for each next subframe but bounded by 143. The adaptive codebook gain is based on an attenuated value according to Eq. (93).
0189If the last correctly received frame was classified as nonperiodic, the current frame is considered to be nonperiodic as well, and the adaptive codebook contribution is set to zero. The fixed codebook contribution is generated by randomly selecting a codebook index and sign index. The random generator is based on the function<maths id="math0137" num="(95)"><math display="block"><mrow><mtext mathvariant="italic">seed = seed ∗</mtext><mtext> 31821 + 13849,</mtext></mrow></math><img file="EP0747883A2_D0157.tif" /></maths> with the initial seed value of 21845. The random codebook index is derived from the 13 least significant bits of the next random number. The random sign is derived from the 4 least significant bits of the next random number. The fixed codebook gain is attenuated according to Eq. (92).
5 Bit-exact description of the CS-ACELP coder
0190ANSI C code simulating the CS-ACELP coder in 16 bit fixed-point is available from ITU-T. The following sections summarize the use of this simulation code, and how the software is organized.
5.1 Use of the simulation software
0191The C code consists of two main programs coder.c, which simulates the encoder, and decoder.c, which simulates the decoder. The encoder is run as follows: coder inputfile bstreamfile
0192The inputfile and outputfile are sampled data files containing 16-bit PCM signals. The bitstream file contains 81 16-bit words, where the first word can be used to indicate frame erasure, and the remaining 80 words contain one bit each. The decoder takes this bitstream file and produces a postfiltered output file containing a 16-bit PCM signal. decoder bstreamfile outputfile
5.2 Organization of the simulation software
0193In the fixed-point ANSI C simulation, only two types of fixed-point data are used as is shown in Table 10. To facilitate the implementation of the simulation code, loop indices, Boolean values and <tables id="tabl0010" num="0010"><table frame="all"><title>Table 10:</title><tgroup cols="4" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="39.37mm" /><colspec colnum="2" colname="col2" colwidth="39.37mm" /><colspec colnum="3" colname="col3" colwidth="39.37mm" /><colspec colnum="4" colname="col4" colwidth="39.37mm" /><thead valign="top"><row><entry namest="col1" nameend="col4" align="center">Data types used in ANSI C simulation.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Type</i></entry><entry namest="col2" nameend="col2" align="center"><i>Max. value</i></entry><entry namest="col3" nameend="col3" align="center"><i>Min. value</i></entry><entry namest="col4" nameend="col4" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">Word16</entry><entry namest="col2" nameend="col2" align="left">0x7fff</entry><entry namest="col3" nameend="col3" align="left">0x8000</entry><entry namest="col4" nameend="col4" align="left">signed 2's complement 16 bit word</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">Word32</entry><entry namest="col2" nameend="col2" align="left">0x7fffffffL</entry><entry namest="col3" nameend="col3" align="left">0x80000000L</entry><entry namest="col4" nameend="col4" align="left">signed 2's complement 32 bit word</entry></row></tbody></tgroup></table></tables>
flags use the type Flag, which would be either 16 bit or 32 bits depending on the target platform.
0194All the computations are done using a predefined set of basic operators. The description of these operators is given in Table 11. The tables used by the simulation coder are summarized in Table 12. These main programs use a library of routines that are summarized in Tables 13, 14, and 15. <tables id="tabl0011" num="0011"><table frame="all"><title>Table 11:</title><tgroup cols="2" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="78.75mm" /><colspec colnum="2" colname="col2" colwidth="78.75mm" /><thead valign="top"><row><entry namest="col1" nameend="col2" align="center">Basic operations used in ANSI C simulation.</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left"><i>Operation</i></entry><entry namest="col2" nameend="col2" align="left"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">Word16 sature(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Limit to 16 bits</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 add(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Short addition</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 sub(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Short subtraction</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 abs_s(Word16 var1)</entry><entry namest="col2" nameend="col2" align="left">Short abs</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 shl(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Short shift left</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 shr(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Short shift right</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 mult(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Short multiplication</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_mult(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Long multiplication</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 negate(Word16 var1)</entry><entry namest="col2" nameend="col2" align="left">Short negate</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 extract_h(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Extract high</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 extract_l(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Extract low</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 round(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Round</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Mac</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Msu</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_macNs(Word32 L_var3, Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Mac without sat</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_msuNs(Word32 L_var3, Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Msu without sat</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_add(Word32 L_var1, Word32 L_var2)</entry><entry namest="col2" nameend="col2" align="left">Long addition</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_sub(Word32 L_var1, Word32 L_var2)</entry><entry namest="col2" nameend="col2" align="left">Long subtraction</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_add_c(Word32 L_var1, Word32 L_var2)</entry><entry namest="col2" nameend="col2" align="left">Long add with c</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_sub_c(Word32 L_var1, Word32 L_var2)</entry><entry namest="col2" nameend="col2" align="left">Long sub with c</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_negate(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Long negate</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 mult_r(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Multiplication with round</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_shl(Word32 L_var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Long shift left</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_shr(Word32 L_var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Long shift right</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 shr_r(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Shift right with round</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 mac_r(Word32 L_var3, Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Mac with rounding</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 msu_r(Word32 L_var3, Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Msu with rounding</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_deposit_h(Word16 var1)</entry><entry namest="col2" nameend="col2" align="left">16 bit war1 -¿ MSB</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_deposit_l(Word16 var1)</entry><entry namest="col2" nameend="col2" align="left">16 bit war1 -¿ LSB</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_shr_r(Word32 L_var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Long shift right with round</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_abs(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Long abs</entry></row><row><entry namest="col1" nameend="col1" align="left">Word32 L_sat(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Long saturation</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 norm_s(Word16 var1)</entry><entry namest="col2" nameend="col2" align="left">Short norm</entry></row><row><entry namest="col1" nameend="col1" align="left">Word16 div_s(Word16 var1, Word16 var2)</entry><entry namest="col2" nameend="col2" align="left">Short division</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">Word16 norm_l(Word32 L_var1)</entry><entry namest="col2" nameend="col2" align="left">Long norm</entry></row></tbody></tgroup></table></tables>
0195<tables id="tabl0012" num="0012"><table frame="all"><title>Table 12:</title><tgroup cols="4" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="39.37mm" /><colspec colnum="2" colname="col2" colwidth="39.37mm" /><colspec colnum="3" colname="col3" colwidth="39.37mm" /><colspec colnum="4" colname="col4" colwidth="39.37mm" /><thead valign="top"><row><entry namest="col1" nameend="col4" align="center">Summary of tables.</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="center"><i>File</i></entry><entry namest="col2" nameend="col2" align="center"><i>Table name</i></entry><entry namest="col3" nameend="col3" align="center"><i>Size</i></entry><entry namest="col4" nameend="col4" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">tab_hup.c</entry><entry namest="col2" nameend="col2" align="left">tab_hup_s</entry><entry namest="col3" nameend="col3" align="left">28</entry><entry namest="col4" nameend="col4" align="left">upsampling filter for postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left">tab_hup.c</entry><entry namest="col2" nameend="col2" align="left">tab_hup_l</entry><entry namest="col3" nameend="col3" align="left">112</entry><entry namest="col4" nameend="col4" align="left">upsampling filter for postfilter</entry></row><row><entry namest="col1" nameend="col1" align="left">inter_3.c</entry><entry namest="col2" nameend="col2" align="left">inter_3</entry><entry namest="col3" nameend="col3" align="left">13</entry><entry namest="col4" nameend="col4" align="left">FIR filter for interpolating the correlation</entry></row><row><entry namest="col1" nameend="col1" align="left">pred_lt3.c</entry><entry namest="col2" nameend="col2" align="left">inter_3</entry><entry namest="col3" nameend="col3" align="left">31</entry><entry namest="col4" nameend="col4" align="left">FIR filter for interpolating put excitation</entry></row><row><entry namest="col1" nameend="col1" align="left">lspcb.tab</entry><entry namest="col2" nameend="col2" align="left">lspcb1</entry><entry namest="col3" nameend="col3" align="left">128 × 10</entry><entry namest="col4" nameend="col4" align="left">LSP quantizer (first stage)</entry></row><row><entry namest="col1" nameend="col1" align="left">lspcb.tab</entry><entry namest="col2" nameend="col2" align="left">lspcb2</entry><entry namest="col3" nameend="col3" align="left">32 × 10</entry><entry namest="col4" nameend="col4" align="left">LSP quantizer (second stage)</entry></row><row><entry namest="col1" nameend="col1" align="left">lspcb.tab</entry><entry namest="col2" nameend="col2" align="left">fg</entry><entry namest="col3" nameend="col3" align="left">2 × 4 × 10</entry><entry namest="col4" nameend="col4" align="left">MA predictors in LSP VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">lspcb.tab</entry><entry namest="col2" nameend="col2" align="left">fg_sum</entry><entry namest="col3" nameend="col3" align="left">2 × 10</entry><entry namest="col4" nameend="col4" align="left">used in LSP VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">lspcb.tab</entry><entry namest="col2" nameend="col2" align="left">fg_sum_inv</entry><entry namest="col3" nameend="col3" align="left">2 × 10</entry><entry namest="col4" nameend="col4" align="left">used in LSP VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_gain.tab</entry><entry namest="col2" nameend="col2" align="left">gbk1</entry><entry namest="col3" nameend="col3" align="left">8 × 2</entry><entry namest="col4" nameend="col4" align="left">codebook GA in gain VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_gain.tab</entry><entry namest="col2" nameend="col2" align="left">gbk2</entry><entry namest="col3" nameend="col3" align="left">16 × 2</entry><entry namest="col4" nameend="col4" align="left">codebook GB in gain VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_gain.tab</entry><entry namest="col2" nameend="col2" align="left">map1</entry><entry namest="col3" nameend="col3" align="left">8</entry><entry namest="col4" nameend="col4" align="left">used in gain VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_gain.tab</entry><entry namest="col2" nameend="col2" align="left">imap1</entry><entry namest="col3" nameend="col3" align="left">8</entry><entry namest="col4" nameend="col4" align="left">used in gain VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_gain.tab</entry><entry namest="col2" nameend="col2" align="left">map2</entry><entry namest="col3" nameend="col3" align="left">16</entry><entry namest="col4" nameend="col4" align="left">used in gain VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_gain.tab</entry><entry namest="col2" nameend="col2" align="left">ima21</entry><entry namest="col3" nameend="col3" align="left">16</entry><entry namest="col4" nameend="col4" align="left">used in gain VQ</entry></row><row><entry namest="col1" nameend="col1" align="left">window.tab</entry><entry namest="col2" nameend="col2" align="left">window</entry><entry namest="col3" nameend="col3" align="left">240</entry><entry namest="col4" nameend="col4" align="left">LP analysis window</entry></row><row><entry namest="col1" nameend="col1" align="left">lag_wind.tab</entry><entry namest="col2" nameend="col2" align="left">lag_h</entry><entry namest="col3" nameend="col3" align="left">10</entry><entry namest="col4" nameend="col4" align="left">lag window for bandwidth expansion (high put)</entry></row><row><entry namest="col1" nameend="col1" align="left">lag_wind.tab</entry><entry namest="col2" nameend="col2" align="left">lag_l</entry><entry namest="col3" nameend="col3" align="left">10</entry><entry namest="col4" nameend="col4" align="left">lag window for bandwidth expansion (low part)</entry></row><row><entry namest="col1" nameend="col1" align="left">grid.tab</entry><entry namest="col2" nameend="col2" align="left">grid</entry><entry namest="col3" nameend="col3" align="left">61</entry><entry namest="col4" nameend="col4" align="left">grid points in LP to LSP conversion</entry></row><row><entry namest="col1" nameend="col1" align="left">inv_sqrt.tab</entry><entry namest="col2" nameend="col2" align="left">table</entry><entry namest="col3" nameend="col3" align="left">49</entry><entry namest="col4" nameend="col4" align="left">lookup table in inverse square root computation</entry></row><row><entry namest="col1" nameend="col1" align="left">log2.tab</entry><entry namest="col2" nameend="col2" align="left">table</entry><entry namest="col3" nameend="col3" align="left">33</entry><entry namest="col4" nameend="col4" align="left">lookup table in base 2 logarithm computation</entry></row><row><entry namest="col1" nameend="col1" align="left">lsp_lsf.tab</entry><entry namest="col2" nameend="col2" align="left">table</entry><entry namest="col3" nameend="col3" align="left">65</entry><entry namest="col4" nameend="col4" align="left">lookup table in LSF to LSP conversion and vice versa</entry></row><row><entry namest="col1" nameend="col1" align="left">lsp_lsf.tab</entry><entry namest="col2" nameend="col2" align="left">slope</entry><entry namest="col3" nameend="col3" align="left">64</entry><entry namest="col4" nameend="col4" align="left">line slopes in LSP to LSF conversion</entry></row><row><entry namest="col1" nameend="col1" align="left">pow2.tab</entry><entry namest="col2" nameend="col2" align="left">table</entry><entry namest="col3" nameend="col3" align="left">33</entry><entry namest="col4" nameend="col4" align="left">lockup table in 2<sup><i>x</i></sup> computation</entry></row><row><entry namest="col1" nameend="col1" /></row><row><entry namest="col1" nameend="col1" align="left">acelp.h</entry><entry namest="col2" nameend="col2" /><entry namest="col3" nameend="col3" /><entry namest="col4" nameend="col4" align="left">prototypes for fixed codebook search</entry></row><row><entry namest="col1" nameend="col1" align="left">ld8k.h</entry><entry namest="col2" nameend="col2" /><entry namest="col3" nameend="col3" /><entry namest="col4" nameend="col4" align="left">prototypes and constants</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">typedef.h</entry><entry namest="col2" nameend="col2" /><entry namest="col3" nameend="col3" /><entry namest="col4" nameend="col4" align="left">type definitions</entry></row></tbody></tgroup></table></tables>
0196<tables id="tabl0013" num="0013"><table frame="all"><title>Table 13:</title><tgroup cols="2" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="78.75mm" /><colspec colnum="2" colname="col2" colwidth="78.75mm" /><thead valign="top"><row><entry namest="col1" nameend="col2" align="center">Summary of encoder specific routines.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Filename</i></entry><entry namest="col2" nameend="col2" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">acelp_co.c</entry><entry namest="col2" nameend="col2" align="left">Search fixed codebook</entry></row><row><entry namest="col1" nameend="col1" align="left">autocorr.c</entry><entry namest="col2" nameend="col2" align="left">Compute autocorrelation for LP analysis</entry></row><row><entry namest="col1" nameend="col1" align="left">az_lsp.c</entry><entry namest="col2" nameend="col2" align="left">compute LSPs from LP coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left">cod_ld8k.c</entry><entry namest="col2" nameend="col2" align="left">encoder routine</entry></row><row><entry namest="col1" nameend="col1" align="left">convolve.c</entry><entry namest="col2" nameend="col2" align="left">convolution operation</entry></row><row><entry namest="col1" nameend="col1" align="left">corr_xy2.c</entry><entry namest="col2" nameend="col2" align="left">compute correlation terms for gain quantization</entry></row><row><entry namest="col1" nameend="col1" align="left">enc_lag3.c</entry><entry namest="col2" nameend="col2" align="left">encode adaptive codebook index</entry></row><row><entry namest="col1" nameend="col1" align="left">g_pitch.c</entry><entry namest="col2" nameend="col2" align="left">compute adaptive codebook gain</entry></row><row><entry namest="col1" nameend="col1" align="left">gainpred.c</entry><entry namest="col2" nameend="col2" align="left">gain predictor</entry></row><row><entry namest="col1" nameend="col1" align="left">int_lpc.c</entry><entry namest="col2" nameend="col2" align="left">interpolation of LSP</entry></row><row><entry namest="col1" nameend="col1" align="left">inter_3.c</entry><entry namest="col2" nameend="col2" align="left">fractional delay interpolation</entry></row><row><entry namest="col1" nameend="col1" align="left">lag_wind.c</entry><entry namest="col2" nameend="col2" align="left">lag-windowing</entry></row><row><entry namest="col1" nameend="col1" align="left">levinson.c</entry><entry namest="col2" nameend="col2" align="left">levinson recursion</entry></row><row><entry namest="col1" nameend="col1" align="left">lspenc. c</entry><entry namest="col2" nameend="col2" align="left">LSP encoding routine</entry></row><row><entry namest="col1" nameend="col1" align="left">lspgetq.c</entry><entry namest="col2" nameend="col2" align="left">LSP quantizer</entry></row><row><entry namest="col1" nameend="col1" align="left">lspgett.c</entry><entry namest="col2" nameend="col2" align="left">compute LSP quantizer distortion</entry></row><row><entry namest="col1" nameend="col1" align="left">lspgetw.c</entry><entry namest="col2" nameend="col2" align="left">compute LSP weights</entry></row><row><entry namest="col1" nameend="col1" align="left">lsplast.c</entry><entry namest="col2" nameend="col2" align="left">select LSP MA predictor</entry></row><row><entry namest="col1" nameend="col1" align="left">lsppre.c</entry><entry namest="col2" nameend="col2" align="left">pre-selection first LSP codebook</entry></row><row><entry namest="col1" nameend="col1" align="left">lspprev.c</entry><entry namest="col2" nameend="col2" align="left">LSP predictor routines</entry></row><row><entry namest="col1" nameend="col1" align="left">lspsel1.c</entry><entry namest="col2" nameend="col2" align="left">first stage LSP quantizer</entry></row><row><entry namest="col1" nameend="col1" align="left">lspsel2.c</entry><entry namest="col2" nameend="col2" align="left">second stage LSP quantizer</entry></row><row><entry namest="col1" nameend="col1" align="left">lspstab.c</entry><entry namest="col2" nameend="col2" align="left">stability test for LSP quantizer</entry></row><row><entry namest="col1" nameend="col1" align="left">pitch_fr.c</entry><entry namest="col2" nameend="col2" align="left">closed-loop pitch search</entry></row><row><entry namest="col1" nameend="col1" align="left">pitch_ol.c</entry><entry namest="col2" nameend="col2" align="left">open-loop pitch search</entry></row><row><entry namest="col1" nameend="col1" align="left">pre_proc.c</entry><entry namest="col2" nameend="col2" align="left">pre-processing (HP filtering and scaling)</entry></row><row><entry namest="col1" nameend="col1" align="left">pwf.c</entry><entry namest="col2" nameend="col2" align="left">computation of perceptual weighting coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_gain.c</entry><entry namest="col2" nameend="col2" align="left">gain quantizer</entry></row><row><entry namest="col1" nameend="col1" align="left">qua_lsp.c</entry><entry namest="col2" nameend="col2" align="left">LSP quantizer</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">relspwe.c</entry><entry namest="col2" nameend="col2" align="left">LSP quantizer</entry></row></tbody></tgroup></table></tables>
0197<tables id="tabl0014" num="0014"><table frame="all"><title>Table 14:</title><tgroup cols="2" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="78.75mm" /><colspec colnum="2" colname="col2" colwidth="78.75mm" /><thead valign="top"><row><entry namest="col1" nameend="col2" align="center">Summary of decoder specific routines.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Filename</i></entry><entry namest="col2" nameend="col2" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">d_lsp.c</entry><entry namest="col2" nameend="col2" align="left">decode LP information</entry></row><row><entry namest="col1" nameend="col1" align="left">de_acelp.c</entry><entry namest="col2" nameend="col2" align="left">decode algebraic codebook</entry></row><row><entry namest="col1" nameend="col1" align="left">dec_gain.c</entry><entry namest="col2" nameend="col2" align="left">decode gains</entry></row><row><entry namest="col1" nameend="col1" align="left">dec_lag3.c</entry><entry namest="col2" nameend="col2" align="left">decode adaptive codebook index</entry></row><row><entry namest="col1" nameend="col1" align="left">dec_ld8k.c</entry><entry namest="col2" nameend="col2" align="left">decoder routine</entry></row><row><entry namest="col1" nameend="col1" align="left">lspdec.c</entry><entry namest="col2" nameend="col2" align="left">LSP decoding routine</entry></row><row><entry namest="col1" nameend="col1" align="left">post_pro.c</entry><entry namest="col2" nameend="col2" align="left">post processing (HP filtering and scaling)</entry></row><row><entry namest="col1" nameend="col1" align="left">pred_lt3.c</entry><entry namest="col2" nameend="col2" align="left">generation of adaptive codebook</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">pst.c</entry><entry namest="col2" nameend="col2" align="left">postfilter routines</entry></row></tbody></tgroup></table></tables>
0198<tables id="tabl0015" num="0015"><table frame="all"><title>Table 15:</title><tgroup cols="2" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="78.75mm" /><colspec colnum="2" colname="col2" colwidth="78.75mm" /><thead valign="top"><row><entry namest="col1" nameend="col2" align="center">Summary of general routines.</entry></row><row><entry namest="col1" nameend="col1" align="center"><i>Filename</i></entry><entry namest="col2" nameend="col2" align="center"><i>Description</i></entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">basicop2.c</entry><entry namest="col2" nameend="col2" align="left">basic operators</entry></row><row><entry namest="col1" nameend="col1" align="left">bits.c</entry><entry namest="col2" nameend="col2" align="left">bit manipulation routines</entry></row><row><entry namest="col1" nameend="col1" align="left">gainpred.c</entry><entry namest="col2" nameend="col2" align="left">gain predictor</entry></row><row><entry namest="col1" nameend="col1" align="left">int_lpc.c</entry><entry namest="col2" nameend="col2" align="left">interpolation of LSP</entry></row><row><entry namest="col1" nameend="col1" align="left">inter_3.c</entry><entry namest="col2" nameend="col2" align="left">fractional delay interpolation</entry></row><row><entry namest="col1" nameend="col1" align="left">lsp_az.c</entry><entry namest="col2" nameend="col2" align="left">compute LP from LSP coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left">lsp_lsf.c</entry><entry namest="col2" nameend="col2" align="left">conversion between LSP and LSF</entry></row><row><entry namest="col1" nameend="col1" align="left">lsp_lsf2.c</entry><entry namest="col2" nameend="col2" align="left">high precision conversion between LSP and LSF</entry></row><row><entry namest="col1" nameend="col1" align="left">lspexp.c</entry><entry namest="col2" nameend="col2" align="left">expansion of LSP coefficients</entry></row><row><entry namest="col1" nameend="col1" align="left">lspstab.c</entry><entry namest="col2" nameend="col2" align="left">stability test for LSP quantizer</entry></row><row><entry namest="col1" nameend="col1" align="left">p_parity.c</entry><entry namest="col2" nameend="col2" align="left">compute pitch parity</entry></row><row><entry namest="col1" nameend="col1" align="left">pred_lt3.c</entry><entry namest="col2" nameend="col2" align="left">generation of adaptive codebook</entry></row><row><entry namest="col1" nameend="col1" align="left">random.c</entry><entry namest="col2" nameend="col2" align="left">random generator</entry></row><row><entry namest="col1" nameend="col1" align="left">residu.c</entry><entry namest="col2" nameend="col2" align="left">compute residual signal</entry></row><row><entry namest="col1" nameend="col1" align="left">syn_filt.c</entry><entry namest="col2" nameend="col2" align="left">synthesis filter</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">weight_a.c</entry><entry namest="col2" nameend="col2" align="left">bandwidth expansion LP coefficients</entry></row></tbody></tgroup></table></tables>
160 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22 Sheet 23 Sheet 24 Sheet 25 Sheet 26 Sheet 27 Sheet 28 Sheet 29 Sheet 30 Sheet 31 Sheet 32 Sheet 33 Sheet 34 Sheet 35 Sheet 36 Sheet 37 Sheet 38 Sheet 39 Sheet 40 Sheet 41 Sheet 42 Sheet 43 Sheet 44 Sheet 45 Sheet 46 Sheet 47 Sheet 48 Sheet 49 Sheet 50 Sheet 51 Sheet 52 Sheet 53 Sheet 54 Sheet 55 Sheet 56 Sheet 57 Sheet 58 Sheet 59 Sheet 60 Sheet 61 Sheet 62 Sheet 63 Sheet 64 Sheet 65 Sheet 66 Sheet 67 Sheet 68 Sheet 69 Sheet 70 Sheet 71 Sheet 72 Sheet 73 Sheet 74 Sheet 75 Sheet 76 Sheet 77 Sheet 78 Sheet 79 Sheet 80 Sheet 81 Sheet 82 Sheet 83 Sheet 84 Sheet 85 Sheet 86 Sheet 87 Sheet 88 Sheet 89 Sheet 90 Sheet 91 Sheet 92 Sheet 93 Sheet 94 Sheet 95 Sheet 96 Sheet 97 Sheet 98 Sheet 99 Sheet 100 Sheet 101 Sheet 102 Sheet 103 Sheet 104 Sheet 105 Sheet 106 Sheet 107 Sheet 108 Sheet 109 Sheet 110 Sheet 111 Sheet 112 Sheet 113 Sheet 114 Sheet 115 Sheet 116 Sheet 117 Sheet 118 Sheet 119 Sheet 120 Sheet 121 Sheet 122 Sheet 123 Sheet 124 Sheet 125 Sheet 126 Sheet 127 Sheet 128 Sheet 129 Sheet 130 Sheet 131 Sheet 132 Sheet 133 Sheet 134 Sheet 135 Sheet 136 Sheet 137 Sheet 138 Sheet 139 Sheet 140 Sheet 141 Sheet 142 Sheet 143 Sheet 144 Sheet 145 Sheet 146 Sheet 147 Sheet 148 Sheet 149 Sheet 150 Sheet 151 Sheet 152 Sheet 153 Sheet 154 Sheet 155 Sheet 156 Sheet 157 Sheet 158 Sheet 159 Sheet 160
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| CN100338648C | Cited by | China | Search report |
| US10141001B2 | Cited by | United States of America | Applicant |
| EP2951823B1 | Cited by | European Patent Office (EPO) | Examiner |
| WO03102921A1 | Cited by | World Intellectual Property Organization (WIPO) | International search |
| EP1001541B1 | Cited by | European Patent Office (EPO) | Examiner |
| EP2951823A2 | Cited by | European Patent Office (EPO) | Examiner |
| EP1001541A1 | Cited by | European Patent Office (EPO) | Examiner |
| US9728200B2 | Cited by | United States of America | Applicant |
| US8255207B2 | Cited by | United States of America | Applicant |
| US7693710B2 | Cited by | United States of America | Applicant |
| AU2003233724B2 | Cited by | Australia | Search report |
| US7693710B2 | Cited by | United States of America | Applicant |
| EP0459358A2 | Cites | European Patent Office (EPO) | Search report |
| EP0573398A2 | Cites | European Patent Office (EPO) | Search report |
| US5091945A | Cites | United States of America | Search report |
14 members in 9 offices; this record represents the family
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 48270895 | United States of America | A | |
| 482708 | United States of America | – | |
| US19950482708 | – | – | – |
| 482708 | – | – | – |
Members14
| Document | Office | Kind | |
|---|---|---|---|
| CA2177422A1 | Canada | A1 | |
| EP0747883A2This record | European Patent Office (EPO) | A2 | |
| AU5464996A | Australia | A | |
| KR970004467A | Republic of Korea | A | |
| JPH09120298A | Japan | A | |
| EP0747883A3 | European Patent Office (EPO) | A3 | |
| MX9602142A | Mexico | A | |
| US5732389A | United States of America | A | |
| CA2177422C | Canada | C | |
| EP0747883B1 | European Patent Office (EPO) | B1 | |
| DE69613908D1 | Germany | D1 | |
| ES2163589T3 | Spain | T3 | |
| DE69613908T2 | Germany | T2 | |
| KR100389178B1 | Republic of Korea | B1 |
38 legal events, as 5 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Announcement of lapse in spainLapsedFD2A | FD2A | ES | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Patent expired after termination of 20 yearsExpiredPE20 | PE20 | GB | |
| Expiry of rightR071 | R071 | DE | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Fee paymentPLFP | PLFP | FR | |
| Lien (pledge) cancelledRG | RG | FR | |
| Lien (pledge) constitutedGC | GC | FR | |
| Amendments to the register in respect of changes of name or changes affecting rights (sect. 32/1977)REGISTERED BETWEEN 20130822 AND 20130828732E | 732E | GB | |
| Change of name or company nameCD | CD | FR | |
| Transmission of propertyTP | TP | FR | |
| No opposition filedOpposition26N | 26N | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Definitive protectionFG2A | FG2A | ES | |
| European patent in force as of 2002-01-01IF02 | IF02 | GB | |
| Fr: translation filedET | ET | EP | |
| It: translation for a ep patent filedITF | ITF | EP | |
| It: translation for a ep patent filedITF | ITF | EP | |
| Corresponds to:REF | REF | EP | |
| Designated contracting statesAK | AK | EP | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOS IGRAGRAH | GRAH | EP | |
| Despatch of communication of intention to grantORIGINAL CODE: EPIDOS AGRAGRAG | GRAG | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOS IGRAGRAH | GRAH | EP | |
| Despatch of communication of intention to grantORIGINAL CODE: EPIDOS AGRAGRAG | GRAG | EP | |
| Information provided on ipc code assigned before grant7G 10L 11/06 ARIC1 | RIC1 | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Search report despatchedORIGINAL CODE: 0009013PUAL | PUAL | EP | |
| Designated contracting statesAK | AK | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 0747883
- Publication, DOCDB
- 0747883
- Publication, EPODOC
- EP0747883
- Application
- 96303797
- Application, DOCDB
- 96303797
- Application, EPODOC
- EP19960303797
Titles3
- German
- Stimmhaft/stimmlos-Klassifizierung von Sprache für Sprachdekodierung bei Verlust von Datenrahmen
- English
- Voiced/unvoiced classification of speech for use in speech decoding during frame erasures
- French
- Classification voisé/non voisé de parole utilisée pour décoder la parole en cas de pertes de paquets de données
Classification
- CPC, 3
- G10L25/93
- G10L2019/0003
- G10L2025/932
- IPC, 6
- G10L19 08
- G10L19 00
- G10L19 04
- G10L25 93
- H03M7 30
- H04B14 04
Designated states5
- Contracting states, 5
- Germany
- Spain
- France
- United Kingdom
- Italy