Software Patent: Excitation quantisation in noise feedback coding
Table of contents:
Bibliography
|
Title |
|
|
Title - german |
|
|
Title - french |
|
|
Pending application |
|
|
Thyssen, Jes (US); Chen, Juin-Hwey (US) |
|
|
None |
|
|
US20020344375P 20020104; US20020216276 20020812 |
|
|
AT, BE, CH, DE, DK, ES, FR, GB, GR, IE, IT, LI, LU, MC, NL, PT, SE, FI, CY, TR, BG, CZ, EE, SI, SK |
|
|
|
|
|
US2003135367-A1 |
|
|
- |
|
|
ep1326237 |
|
|
EP20020259023 20021231 |
Abstract
||<#ffd0d0>[[patent( In a Noise Feedback Coding (NFC) system operable in a ZERO-STATE condition and a ZERO-INPUT condition, the NFC system including at least one filter having a filter memory, a method of updating the filter memory. The method comprises: (a) producing a ZERO-STATE contribution to the filter memory when the NFC system is in the ZERO-STATE condition; (b) producing a ZERO-INPUT contribution to the filter memory when the NFC system is in the ZERO-INPUT condition; and (c) updating the filter memory as a function of both the ZERO-STATE contribution and the ZERO-INPUT contribution. )]] ||
Description
[[patent( Description of <strong>EP1326237</strong><br/> <br/> <br/> BACKGROUND OF THE INVENTION<br/>
<br/> [0001] This invention relates generally to digital communications, and more particularly, to digital coding (or compression) of speech and/or audio signals. <br/> <br/> <br/> Related Art<br/>
<br/> [0002] In speech or audio coding, the coder encodes the input speech or audio signal into a digital bit stream for transmission or storage, and the decoder decodes the bit stream into an output speech or audio signal. The combination of the coder and the decoder is called a codec. <br/> <br/> [0003] In the field of speech coding, predictive coding is a very popular technique. Prediction of the input waveform is used to remove redundancy from the waveform, and instead of quantizing an input speech waveform directly, a residual signal waveform is quantized. The predictor(s) used in predictive coding can be either backward adaptive or forward adaptive predictors. Backward adaptive predictors do not require any side information as they are derived from a previously quantized waveform, and therefore can be derived at a decoder. On the other hand, forward adaptive predictor(s) require side information to be transmitted to the decoder as they are derived from the input waveform, which is not available at the decoder. <br/> <br/> [0004] In the field of speech coding, two types of predictors are commonly used. A first type of predictor is called a short-term predictor. It is aimed at removing redundancy between nearby samples in the input waveform. This is equivalent to removing a spectral envelope of the input waveform. A second type of predictor is often referred as a long-term predictor. It removes redundancy between samples further apart, typically spaced by a time difference that is constant for a suitable duration. For speech, this time difference is typically equivalent to a local pitch period of the speech signal, and consequently the long-term predictor is often referred as a pitch predictor. The long-term predictor removes a harmonic structure of the input waveform. A residual signal remaining after the removal of redundancy by the predictor(s) is quantized along with any information needed to reconstruct the predictor(s) at the decoder. <br/> <br/> [0005] This quantization of the residual signal provides a series of bits representing a compressed version of the residual signal. This compressed version of the residual signal is often denoted the excitation signal and is used to reconstruct an approximation of the input waveform at the decoder in combination with the predictor(s). Generating the series of bits representing the excitation signal is commonly denoted excitation quantization and generally requires the search for, and selection of, a best or preferred candidate excitation among a set of candidate excitations with respect to some cost function. The search and selection require a number of mathematical operations to be performed, which translates into a certain computational complexity when the operations are implemented on a signal processing device. It is advantageous to minimize the number of mathematical operations in order to minimize a power consumption, and maximize a processing bandwidth, of the signal processing device. <br/> <br/> [0006] Excitation quantization in predictive coding can be based on a sample-by-sample quantization of the excitation. This is referred to as Scalar Quantization (SQ). Techniques for performing Scalar Quantization of the excitation are relatively simple, and thus, the computational complexity associated with SQ is relatively manageable. <br/> <br/> [0007] Alternatively, the excitation can be quantized based on groups of samples. Quantizing groups of samples is often referred to as Vector Quantization (VQ), and when applied to the excitation, simply as excitation VQ. The use of VQ can provide superior performance to SQ, and may be necessary when the number of coding bits per residual signal sample becomes small (typically less than two bits per sample). Also, VQ can provide a greater flexibility in bit-allocation as compared to SQ, since a fractional number of bits per sample can be used. However, excitation VQ can be relatively complex when compared to excitation SQ. Therefore, there is need to reduce the complexity of excitation VQ as used in a predictive coding environment. <br/> <br/> [0008] One type of predictive coding is Noise Feedback Coding (NFC), wherein noise feedback filtering is used to shape coding noise, in order to improve a perceptual quality of quantized speech. Therefore, it would be advantageous to use excitation VQ with noise feedback coding, and further, to do so in a computationally efficient manner. <br/> <br/> <br/> SUMMARY OF THE INVENTION<br/>
<br/> [0009] The present invention includes efficient methods related to excitation quantization in noise feedback coding, for example, in NFC systems, where the short-term shaping of the coding noise is generalized. The methods are described primarily in Section IX.D and in connection with FIGs. 21-31. The methods are based in part on separating an NFC quantization error signal into ZERO-STATE and ZERO-INPUT response contributions. The methods accommodate general shaping of the coding noise while providing an efficient excitation quantization. The present invention provides an efficient method of updating the filter memories of the noise feedback coding structure with the generalized noise shaping. <br/> <br/> [0010] In an embodiment, the method is performed in a Noise Feedback Coding (NFC) system operable in a ZERO-STATE condition and a ZERO-INPUT condition, the NFC system including at least one filter having a filter memory, a method of updating the filter memory. The method comprises: (a) producing a ZERO-STATE contribution to the filter memory when the NFC system is in the ZERO-STATE condition; (b) producing a ZERO-INPUT contribution to the filter memory when the NFC system is in the ZERO-INPUT condition; and (c) updating the filter memory as a function of both the ZERO-STATE contribution and the ZERO-INPUT contribution. <br/> <br/> <br/> Terminology<br/>
<br/> <br/> Predictor:<br/>
<br/> [0011] A predictor P as referred to herein predicts a current signal value (e.g., a current sample) based on previous or past signal values (e.g., past samples). A predictor can be a short-term predictor or a long-term predictor. A short-term signal predictor (e.g., a short term speech predictor) can predict a current signal sample (e.g., speech sample) based on adjacent signal samples from the immediate past. With respect to speech signals, such "short-term" predicting removes redundancies between, for example, adjacent or close-in signal samples. A long-term signal predictor can predict a current signal sample based on signal samples from the relatively distant past. With respect to a speech signal, such "long-term" predicting removes redundancies between relatively distant signal samples. For example, a long-term speech predictor can remove redundancies between distant speech samples due to a pitch periodicity of the speech signal. <br/> <br/> [0012] The phrases "a predictor P predicts a signal s(n) to produce a signal ps(n)" means the same as the phrase "a predictor P makes a prediction ps(n) of a signal s(n)." Also, a predictor can be considered equivalent to a predictive filter that predictively filters an input signal to produce a predictively filtered output signal. <br/> <br/> <br/> Coding noise and filtering thereof:<br/>
<br/> [0013] Often, a speech signal can be characterized in part by spectral characteristics (i.e., the frequency spectrum) of the speech signal. Two known spectral characteristics include 1) what is referred to as a harmonic fine structure or line frequencies of the speech signal, and 2) a spectral envelope of the speech signal. The harmonic fine structure includes, for example, pitch harmonics, and is considered a long-term (spectral) characteristic of the speech signal. On the other hand, the spectral envelope of the speech signal is considered a short-term (spectral) characteristic of the speech signal. <br/> <br/> [0014] Coding a speech signal can cause audible noise when the encoded speech is decoded by a decoder. The audible noise arises because the coded speech signal includes coding noise introduced by the speech coding process, for example, by quantizing signals in the encoding process. The coding noise can have spectral characteristics (i.e., a spectrum) different from the spectral characteristics (i.e., spectrum) of natural speech (as characterized above). Such audible coding noise can be reduced by spectrally shaping the coding noise (i.e., shaping the coding noise spectrum) such that it corresponds to or follows to some extent the spectral characteristics (i.e., spectrum) of the speech signal. This is referred to as "spectral noise shaping" of the coding noise, or "shaping the coding noise spectrum." The coding noise is shaped to follow the speech signal spectrum only "to some extent" because it is not necessary for the coding noise spectrum to exactly follow the speech signal spectrum. Rather, the coding noise spectrum is shaped sufficiently to reduce audible noise, thereby improving the perceptual quality of the decoded speech. <br/> <br/> [0015] Accordingly, shaping the coding noise spectrum (i.e. spectrally shaping the coding noise) to follow the harmonic fine structure (i.e., long-term spectral characteristic) of the speech signal is referred to as "harmonic noise (spectral) shaping" or "long-term noise (spectral) shaping." Also, shaping the coding noise spectrum to follow the spectral envelope (i.e., short-term spectral characteristic) of the speech signal is referred to a "short-term noise (spectral) shaping" or "envelope noise (spectral) shaping." <br/> <br/> [0016] Noise feedback filters can be used to spectrally shape the coding noise to follow the spectral characteristics of the speech signal, so as to reduce the above mentioned audible noise. For example, a short-term noise feedback filter can short-term filter coding noise to spectrally shape the coding noise to follow the short-term spectral characteristic (i.e., the envelope) of the speech signal. On the other hand, a long-term noise feedback filter can long-term filter coding noise to spectrally shape the coding noise to follow the long-term spectral characteristic (i.e., the harmonic fine structure or pitch harmonics) of the speech signal. Therefore, short-term noise feedback filters can effect short-term or envelope noise spectral shaping of the coding noise, while long-term noise feedback filters can effect long-term or harmonic noise spectral shaping of the coding noise, in the present invention. <br/> <br/> <br/> BRIEF DESCRIPTION OF THE DRAWINGS<br/>
<br/> [0017] The present invention is described with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. <br/>
<br/> <br/> DETAILED DESCRIPTION OF THE INVENTION<br/>
<br/> <br/> I. Conventional Noise Feedback Coding<br/>
<br/> [0018] Before describing the present invention, it is helpful to first describe the conventional noise feedback coding schemes. <br/> <br/> <br/> A. First Conventional Coder<br/>
<br/> [0019] FIG. 1 is a block diagram of a first conventional NFC structure or codec 1000. Codec 1000 includes the following functional elements: a first predictor 1002 (also referred to as predictor P(z)); a first combiner or adder 1004; a second combiner or adder 1006; a quantizer 1008; a third combiner or adder 1010; a second predictor 1012 (also referred to as a predictor P(z)); a fourth combiner 1014; and a noise feedback filter 1016 (also referred to as a filter F(z)). <br/> <br/> [0020] Codec 1000 encodes a sampled input speech or audio signal s(n) to produce a coded speech signal, and then decodes the coded speech signal to produce a reconstructed speech signal sq(n), representative of the input speech signal s(n). Reconstructed output speech signal sq(n) is associated with an overall coding noise r(n) = s(n) - sq(n). An encoder portion of codec 1000 operates as follows. Sampled input speech or audio signal s(n) is provided to a first input of combiner 1004, and to an input of predictor 1002. Predictor 1002 makes a prediction of current speech signal s(n) values (e.g., samples) based on past values of the speech signal to produce a predicted signal ps(n). This process is referred to as predicting signal s(n) to produce predicted signal ps(n). Predictor 1002 provides predicted speech signal ps(n) to a second input of combiner 1004. Combiner 1004 combines signals s(n) and ps(n) to produce a prediction residual signal d(n). <br/> <br/> [0021] Combiner 1006 combines residual signal d(n) with a noise feedback signal fq(n) to produce a quantizer input signal u(n). Quantizer 1008 quantizes input signal u(n) to produce a quantized signal uq(n). Combiner 1014 combines (that is, differences) signals u(n) and uq(n) to produce a quantization error or noise signal q(n) associated with the quantized signal uq(n). Filter 1016 filters noise signal q(n) to produce feedback noise signal fq(n). <br/> <br/> [0022] A decoder portion of codec 1000 operates as follows. Exiting quantizer 1008, combiner 1010 combines quantizer output signal uq(n) with a prediction ps(n)' of input speech signal s(n) to produce reconstructed output speech signal sq(n). Predictor 1012 predicts input speech signal s(n) to produce predicted speech signal ps(n)', based on past samples of output speech signal sq(n). <br/> <br/> [0023] The following is an analysis of codec 1000 described above. The predictor P(z) (1002 or 1012) has a transfer function of <br/> EMI12.1<br/>
EMI12.2<br/>
<br/> [0024] With the NFC codec structure 1000 in FIG. 1, it can be shown that the codec reconstruction error, or coding noise, is given by <br/> EMI12.3<br/>
<br/> [0025] If the encoding bit rate of the quantizer 1008 in FIG. 1 is sufficiently high, the quantization error q(n) = u(n) - uq(n) is roughly white. From the equation above, it follows that the magnitude spectrum of the coding noise r(n) will have the same shape as the magnitude of the frequency response of the filter [l - F(z)] / [l - P(z)]. If F(z) = P(z), then R(z) = Q(z), the coding noise is white, and the system 1000 in FIG. 1 is equivalent to a conventional DPCM codec. If F(z) = 0, then R(z) = Q(z) / [l - P(z)], the coding noise has the same spectral shape as the input signal spectrum, and the codec system 1000 in FIG. 1 becomes a so-called "open-loop DPCM" codec. If F(z) is somewhere between P(z) and 0, for example, F(z) = P(z/ alpha ), where 0 < alpha < 1, then the spectrum of the coding noise is somewhere between a white spectrum and the input signal spectrum. Coding noise spectrally shaped this way is indeed less audible than either the white noise or the noise with spectral shape identical to the input signal spectrum. <br/> <br/> <br/> B. Second Conventional Codec<br/>
<br/> [0026] FIG. 2 is a block diagram of a second conventional NFC structure or codec 2000. Codec 2000 includes the following functional elements: a first combiner or adder 2004; a second combiner or adder 2006; a quantizer 2008; a third combiner or adder 2010; a predictor 2012 (also referred to as a predictor P(z)); a fourth combiner 2014; and a noise feedback filter 2016 (also referred to as a filter N(z)-1). <br/> <br/> [0027] Codec 2000 encodes a sampled input speech signal s(n) to produce a coded speech signal, and then decodes the coded speech signal to produce a reconstructed speech signal sq(n), representative of the input speech signal s(n). Reconstructed speech signal sq(n) is associated with an overall coding noise r(n) = s(n) - sq(n). Codec 2000 operates as follows. A sampled input speech or audio signal s(n) is provided to a first input of combiner 2004. A feedback signal x(n) is provided to a second input of combiner 2004. Combiner 2004 combines signals s(n) and x(n) to produce a quantizer input signal u(n). Quantizer 2008 quantizes input signal u(n) to produce a quantized signal uq(n) (also referred to as a quantizer output signal uq(n)). Combiner 2014 combines (that is, differences) signals u(n) and uq(n) to produce a quantization error or noise signal q(n) associated with the quantized signal uq(n). Filter 2016 filters noise signal q(n) to produce feedback noise signal fq(n). Combiner 2006 combines feedback noise signal fq(n) with a predicted signal ps(n) (i.e., a prediction of input speech signal s(n)) to produce feedback signal x(n). <br/> <br/> [0028] Exiting quantizer 2008, combiner 2010 combines quantizer output signal uq(n) with prediction or predicted signal ps(n) to produce reconstructed output speech signal sq(n). Predictor 2012 predicts input speech signal s(n) (to produce predicted speech signal ps(n)) based on past samples of output speech signal sq(n). Thus, predictor 2012 is included in the encoder and decoder portions of codec 2000. <br/> <br/> [0029] Codec structure 2000 was proposed by J. D. Makhoul and M. Berouti in "Adaptive Noise Spectral Shaping and Entropy Coding in Predictive Coding of Speech," IEEE Transactions on Acoustics, Speech, and Signal Processing, pp. 63-73, February 1979. This equivalent, known NFC codec structure 2000 has at least two advantages over codec 1000. First, only one predictor P(z) (2012) is used in the structure. Second, if N(z) is the filter whose frequency response corresponds to the desired noise spectral shape, this codec structure 2000 allows us to use [N(z) - 1] directly as the noise feedback filter 2016. Makhoul and Berouti showed in their 1979 paper that very good perceptual speech quality can be obtained by choosing N(z) to be a simple second-order finite-impulse-response (FIR) filter. <br/> <br/> [0030] The codec structures in Figs 1 and 2 described above can each be viewed as a predictive codec with an additional noise feedback loop. In Fig. 1, a noise feedback loop is added to the structure of an "open-loop DPCM" codec, where the predictor in the encoder uses unquantized original input signal as its input. In Fig. 2, on the other hand, a noise feedback loop is added to the structure of a "closed-loop DPCM" codec, where the predictor in the encoder uses the quantized signal as its input. Other than this difference in the signal that is used as the predictor input in the encoder, the codec structures in Fig.1 and Fig.2 are conceptually very similar. <br/> <br/> <br/> II. Two-Stage Noise Feedback Coding<br/>
<br/> [0031] The conventional noise feedback coding principles described above are well-known prior art. Now we will address two-stage noise feedback coding with both short-term and long-term prediction, and both short-term and long-term noise spectral shaping. <br/> <br/> <br/> A. Composite Codec Embodiments<br/>
<br/> [0032] A first approach is to combine a short-term predictor and a long-term predictor into a single composite short-term and long-term predictor, and then re-use the general structure of codec 1000 in FIG. 1 or that of codec 2000 in FIG. 2 to construct an improved codec corresponding to the general structure of codec 1000 and an improved codec corresponding to the general structure of codec 2000. Note that in FIG. 1, the feedback loop to the right of the symbol uq(n) that includes the adder 1010 and the predictor loop (including predictor 1012) is often called a synthesis filter, and has a transfer function of 1/[1 - P(z)]. Also note that in most predictive codecs employing both short-term and long-term prediction, the decoder has two such synthesis filters cascaded: one with the short-term predictor and the other with the long-term predictor in the feedback loop. Let Ps(z) and Pl(z) be the transfer functions of the short-term predictor and the long-term predictor, respectively. Then, the cascaded synthesis filter will have a transfer function of <br/>
<br/> [0033] Similarly, in FIG. 1, the filter structure to the left of the symbol d(n), including the adder 1004 and the predictor loop (i.e., including predictor 1002), is often called an analysis filter, and has a transfer function of 1 - P(z). If we cascade two such analysis filters, one with the short-term predictor and the other with the long-term predictor, then the transfer function of the cascaded analysis filter is <br/>
<br/> [0034] Therefore, one can replace the predictor P(z) (1002 or 1012) in FIG. 1 and the predictor P(z) (2012) in FIG. 2 by the composite predictor P'(z) = Ps(z) + Pl(z) - Ps(z)Pl(z) to get the effect of two-stage prediction. To get both short-term and long-term noise spectral shaping, one can use the general coding structure of codec 1000 in FIG. 1 and choose the filter transfer function F(z) = Ps(z/ alpha ) + Pl(z/ beta ) - Ps(z/ alpha )Pl(z/ beta ) = F' (z). Then, the noise spectral shape will follow the frequency response of the filter <br/>
<br/> [0035] Thus, both short-term noise spectral shaping and long-term spectral shaping are achieved, and they can be individually controlled by the parameters alpha and beta , respectively. <br/> <br/> <br/> 1. First Codec Embodiment - Composite Codec<br/>
<br/> [0036] FIG. 1A is a block diagram of an example NFC structure or codec 1050 using composite short-term and long-term predictors P'(z) and a composite short-term and long-term noise feedback filter F' (z), according to a first embodiment of the present invention. Codec 1050 reuses the general structure of known codec 1000 in FIG. 1, but replaces the predictors P(z) and filter of codec 1000 F(z) with the composite predictors P'(z) and the composite filter F'(z), as is further described below. <br/> <br/> [0037] 1050 includes the following functional elements: a first composite short-term and long-term predictor 1052 (also referred to as a composite predictor P'(z)); a first combiner or adder 1054; a second combiner or adder 1056; a quantizer 1058; a third combiner or adder 1060; a second composite short-term and long-term predictor 1062 (also referred to as a composite predictor P'(z)); a fourth combiner 1064; and a composite short-term and long-term noise feedback filter 1066 (also referred to as a filter F'(z)). <br/> <br/> [0038] The functional elements or blocks of codec 1050 listed above are arranged similarly to the corresponding blocks of codec 1000 (described above in connection with FIG. 1) having reference numerals decreased by "50." Accordingly, signal flow between the functional blocks of codec 1050 is similar to signal flow between the corresponding blocks of codec 1000. <br/> <br/> [0039] Codec 1050 encodes a sampled input speech signal s(n) to produce a coded speech signal, and then decodes the coded speech signal to produce a reconstructed speech signal sq(n), representative of the input speech signal s(n). Reconstructed speech signal sq(n) is associated with an overall coding noise r(n) = s(n) - sq(n). An encoder portion of codec 1050 operates in the following exemplary manner. Composite predictor 1052 short-term and long-term predicts input speech signal s(n) to produce a short-term and long-term predicted speech signal ps(n). Combiner 1054 combines short-term and long-term predicted signal ps(n) with speech signal s(n) to produce a prediction residual signal d(n). <br/> <br/> [0040] Combiner 1056 combines residual signal d(n) with a short-term and long-term filtered, noise feedback signal fq(n) to produce a quantizer input signal u(n). Quantizer 1058 quantizes input signal u(n) to produce a quantized signal uq(n) (also referred to as a quantizer output signal) associated with a quantization noise or error signal q(n). Combiner 1064 combines (that is, differences) signals u(n) and uq(n) to produce the quantization error or noise signal q(n). Composite filter 1066 short-term and long-term filters noise signal q(n) to produce short-term and long-term filtered, feedback noise signal fq(n). In codec 1050, combiner 1064, composite short-term and long-term filter 1066, and combiner 1056 together form a noise feedback loop around quantizer 1058. This noise feedback loop spectrally shapes the coding noise associated with codec 1050, in accordance with the composite filter, to follow, for example, the short-term and long-term spectral characteristics of input speech signal s(n). <br/> <br/> [0041] A decoder portion of coder 1050 operates in the following exemplary manner. Exiting quantizer 1058, combiner 1060 combines quantizer output signal uq(n) with a short-term and long-term prediction ps(n)' of input speech signal s(n) to produce a quantized output speech signal sq(n). Composite predictor 1062 short-term and long-term predicts input speech signal s(n) (to produce short-term and long-term predicted signal ps(n)') based on output signal sq(n). <br/> <br/> <br/> 2. Second Codec Embodiment-Alternative Composite Codec<br/>
<br/> [0042] As an alternative to the above described first embodiment, a second embodiment of the present invention can be constructed based on the general coding structure of codec 2000 in FIG. 2. Using the coding structure of codec 2000 with P(z) replaced by composite function P'(z), one can choose a suitable composite noise feedback filter N'(z) - 1 (replacing filter 2016) such that it includes the effects of both short-term and long-term noise spectral shaping. For example, N'(z) can be chosen to' contain two FIR filters in cascade: a short-term filter to control the envelope of the noise spectrum, while another, long-term filter, controls the harmonic structure of the noise spectrum. <br/> <br/> [0043] FIG. 2A is a block diagram of an example NFC structure or codec 2050 using a composite short-term and long-term predictor P'(z) and a composite short-term and long-term noise feedback filter N'(z)-1, according to a second embodiment of the present invention. Codec 2050 includes the following functional elements: a first combiner or adder 2054; a second combiner or adder 2056; a quantizer 2058; a third combiner or adder 2060; a composite short-term and long-term predictor 2062 (also referred to as a predictor P'(z)); a fourth combiner 2064; and a noise feedback filter 2066 (also referred to as a filter N'(z)-1). <br/> <br/> [0044] The functional elements or blocks of codec 2050 listed above are arranged similarly to the corresponding blocks of codec 2000 (described above in connection with FIG. 2) having reference numerals decreased by "50." Accordingly, signal flow between the functional blocks of codec 2050 is similar to signal flow between the corresponding blocks of codec 2000. <br/> <br/> [0045] Codec 2050 operates in the following exemplary manner. Combiner 2054 combines a sampled input speech or audio signal s(n) with a feedback signal x(n) to produce a quantizer input signal u(n). Quantizer 2058 quantizes input signal u(n) to produce a quantized signal uq(n) associated with a quantization noise or error signal q(n). Combiner 2064 combines (that is, differences) signals u(n) and uq(n) to produce quantization error or noise signal q(n). Composite filter 2066 concurrently long-term and short-term filters noise signal q(n) to produce short-term and long-term filtered, feedback noise signal fq(n). Combiner 2056 combines short-term and long-term filtered, feedback noise signal fq(n) with a short-term and long-term prediction s(n) of input signal s(n) to produce feedback signal x(n). In codec 2050, combiner 2064, composite short-term and long-term filter 2066, and combiner 2056 together form a noise feedback loop around quantizer 2058. This noise feedback loop spectrally shapes the coding noise associated with codec 2050 in accordance with the composite filter, to follow, for example, the short-term and long-term spectral characteristics of input speech signal s(n). <br/> <br/> [0046] Exiting quantizer 2058, combiner 2060 combines quantizer output signal uq(n) with the short-term and long-term predicted signal ps(n)' to produce a reconstructed output speech signal sq(n). Composite predictor 2062 short-term an long-term predicts input speech signal s(n) (to produce short-term and long-term predicted signal ps(n)) based on reconstructed output speech signal sq(n). <br/> <br/> [0047] In this invention, the first approach for two-stage NFC described above achieves the goal by re-using the general codec structure of conventional single-stage noise feedback coding (for example, by re-using the structures of codecs 1000 and 2000) but combining what are conventionally separate short-term and long-term predictors into a single composite short-term and long-term predictor. A second preferred approach, described below, allows separate short-term and long-term predictors to be used, but requires a modification of the conventional codec structures 1000 and 2000 of Figs. 1 and 2. <br/> <br/> <br/> B. Codec Embodiments Using Separate Short-Term and Long-Term Predictors (Two-Stage Prediction) and Noise Feedback Coding<br/>
<br/> [0048] It is not obvious how the codec structures in Figs. 1 and 2 should be modified in order to achieve two-stage prediction and two-stage noise spectral shaping at the same time. For example, assuming the filters in FIG. 1 are all short-term filters, then, cascading a long-term analysis filter after the short-term analysis filter, cascading a long-term synthesis filter before the short-term synthesis filter, and cascading a long-term noise feedback filter to the short-term noise feedback filter in FIG. 1 will not give a codec that achieves the desired result. <br/> <br/> [0049] To achieve two-stage prediction and two-stage noise spectral shaping at the same time without combining the two predictors into one, the key lies in recognizing that the quantizer block in Figs. 1 and 2 can be replaced by a coding system based on long-term prediction. Illustrations of this concept are provided below. <br/> <br/> <br/> 1. Third Codec Embodiment - Two Stage Prediction With One Stage Noise Feedback<br/>
<br/> [0050] As an illustration of this concept, FIG. 3 shows a codec structure where the quantizer block 1008 in FIG. I has been replaced by a DPCM-type structure based on long-term prediction (enclosed by the dashed box and labeled as Q' in FIG. 3). FIG. 3 is a block diagram of a first exemplary arrangement of an example NFC structure or codec 3000, according to a third embodiment of the present invention. <br/> <br/> [0051] Codec 3000 includes the following functional elements: a first short-term predictor 3002 (also referred to as a short-term predictor Ps(z)); a first combiner or adder 3004; a second combiner or adder 3006; predictive quantizer 3008 (also referred to as predictive quantizer Q'); a third combiner or adder 3010; a second short-term predictor 3012 (also referred to as a short-term predictor Ps(z)); a fourth combiner 3014; and a short-term noise feedback filter 3016 (also referred to as a short-term noise feedback filter Fs(z)). <br/> <br/> [0052] Predictive quantizer Q' (3008) includes a first combiner 3024, either a scalar or a vector quantizer 3028, a second combiner 3030, and a long-term predictor 3034 (also referred to as a long-term predictor (Pl(z)). <br/> <br/> [0053] Codec 3000 encodes a sampled input speech signal s(n) to produce a coded speech signal, and then decodes the coded speech signal to produce a reconstructed output speech signal sq(n), representative of the input speech signal s(n). Reconstructed speech signal sq(n) is associated with an overall coding noise r(n) = s(n) - sq(n). Codec 3000 operates in the following exemplary manner. First, a sampled input speech or audio signal s(n) is provided to a first input of combiner 3004, and to an input of predictor 3002. Predictor 3002 makes a short-term prediction of input speech signal s(n) based on past samples thereof to produce a predicted input speech signal ps(n). This process is referred to as short-term predicting input speech signal s(n) to produce predicted signal ps(n). Predictor 3002 provides predicted input speech signal ps(n) to a second input of combiner 3004. Combiner 3004 combines signals s(n) and ps(n) to produce a prediction residual signal d(n). <br/> <br/> [0054] Combiner 3006 combines residual signal d(n) with a first noise feedback signal fqs(n) to produce a predictive quantizer input signal v(n). Predictive quantizer 3008 predictively quantizes input signal v(n) to produce a predictively quantized output signal vq(n) (also referred to as a predictive quantizer output signal vq(n)) associated with a predictive noise or error signal qs(n). Combiner 3014 combines (that is, differences) signals v(n) and vq(n) to produce the predictive quantization error or noise signal qs(n). Short-term filter 3016 short-term filters predictive quantization noise signal q(n) to produce the feedback noise signal fqs(n). Therefore, Noise Feedback (NF) codec 3000 includes an outer NF loop around predictive quantizer 3008, comprising combiner 3014, short-term noise filter 3016, and combiner 3006. This outer NF loop spectrally shapes the coding noise associated with codec 3000 in accordance with filter 3016, to follow, for example, the short-term spectral characteristics of input speech signal s(n). <br/> <br/> [0055] Predictive quantizer 3008 operates within the outer NF loop mentioned above to predictively quantize predictive quantizer input signal v(n) in the following exemplary manner. Predictor 3034 long-term predicts (i.e., makes a long-term prediction of) predictive quantizer input signal v(n) to produce a predicted, predictive quantizer input signal pv(n). Combiner 3024 combines signal pv(n) with predictive quantizer input signal v(n) to produce a quantizer input signal u(n). Quantizer 3028 quantizes quantizer input signal u(n) using a scalar or vector quantizing technique, to produce a quantizer output signal uq(n). Combiner 3030 combines quantizer output signal uq(n) with signal pv(n) to produce predictively quantized output signal vq(n). <br/> <br/> [0056] Exiting predictive quantizer 3008, combiner 3010 combines predictive quantizer output signal vq(n) with a prediction ps(n)' of input speech signal s(n) to produce output speech signal sq(n). Predictor 3012 short-term predicts (i.e., makes a short-term prediction of) input speech signal s(n) to produce signal ps(n)', based on output speech signal sq(n). <br/> <br/> [0057] In the first exemplary arrangement of NF codec 3000 depicted in FIG. 3, predictors 3002, 3012 are short-term predictors and NF filter 3016 is a short-term noise filter, while predictor 3034 is a long-term predictor. In a second exemplary arrangement of NF codec 3000, predictors 3002, 3012 are long-term predictors and NF filter 3016 is a long-term filter, while predictor 3034 is a short-term predictor. The outer NF loop in this alternative arrangement spectrally shapes the coding noise associated with codec 3000 in accordance with filter 3016, to follow, for example, the long-term spectral characteristics of input speech signal s(n). <br/> <br/> [0058] In the first arrangement described above, the DPCM structure inside the Q' dashed box (3008) does not perform long-term noise spectral shaping. If everything inside the Q' dashed box (3008) is treated as a black box, then for an observer outside of the box, the replacement of a direct quantizer (for example, quantizer 1008) by a long-term-prediction-based DPCM structure (that is, predictive quantizer Q' (3008)) is an advantageous way to improve the quantizer performance. Thus, compared with FIG. 1, the codec structure of codec 3000 in FIG. 3 will achieve the advantage of a lower coding noise, while maintaining the same kind of noise spectral envelope. In fact, the system 3000 in FIG. 3 is good enough for some applications when the bit rate is high enough and it is simple, because it avoids the additional complexity associated with long-term noise spectral shaping. <br/> <br/> <br/> 2. Fourth Codec Embodiment - Two Stage Prediction With Two Stage Noise Feedback (Nested Two Stage Feedback Coding)<br/>
<br/> [0059] Taking the above concept one step further, predictive quantizer Q' (3008) of codec 3000 in FIG. 3 can be replaced by the complete NFC structure of codec 1000 in FIG. 1. A resulting example "nested" or "layered" two-stage NFC codec structure 4000 is depicted in FIG. 4, and described below. <br/> <br/> [0060] FIG. 4 is a block diagram of a first exemplary arrangement of the example nested two-stage NF coding structure or codec 4000, according to a fourth embodiment of the present invention. Codec 4000 includes the following functional elements: a first short-term predictor 4002 (also referred to as a short-term predictor Ps(z)); a first combiner or adder 4004; a second combiner or adder 4006; a predictive quantizer 4008 (also referred to as a predictive quantizer Q"); a third combiner or adder 4010; a second short-term predictor 4012 (also referred to as a short-term predictor Ps(z)); a fourth combiner 4014; and a short-term noise feedback filter 4016 (also referred to as a short-term noise feedback filter Fs(z)). <br/> <br/> [0061] Predictive quantizer Q" (4008) includes a first long-term predictor 4022 (also referred to as a long-term predictor Pl(z)), a first combiner 4024, either a scalar or a vector quantizer 4028, a second combiner 4030, a second long-term predictor 4034 (also referred to as a long-term predictor (Pl(z)), a second combiner or adder 4036, and a long-term filter 4038 (also referred to as a long-term filter Fl(z)). <br/> <br/> [0062] Codec 4000 encodes a sampled input speech signal s(n) to produce a coded speech signal, and then decodes the coded speech signal to produce a reconstructed output speech signal sq(n), representative of the input speech signal s(n). Reconstructed speech signal sq(n) is associated with an overall coding noise r(n) = s(n) - sq(n). In coding input speech signal s(n), predictors 4002 and 4012, combiners 4004, 4006, and 4010, and noise filter 4016 operate similarly to corresponding elements described above in connection with FIG. 3 having reference numerals decreased by "1000". Therefore, NF codec 4000 includes an outer or first stage NF loop comprising combiner 4014, short-term noise filter 4016, and combiner 4006. This outer NF loop spectrally shapes the coding noise associated with codec 4000 in accordance with filter 4016, to follow, for example, the short-term spectral characteristics of input speech signal s(n). <br/> <br/> [0063] Predictive quantizer Q" (4008) operates within the outer NF loop mentioned above to predictively quantize predictive quantizer input signal v(n) to produce a predictively quantized output signal vq(n) (also referred to as a predictive quantizer output signal vq(n)) in the following exemplary manner. As mentioned above, predictive quantizer Q" has a structure corresponding to the basic NFC structure of codec 1000 depicted in FIG. 1. In operation, predictor 4022 long-term predicts predictive quantizer input signal v(n) to produce a predicted version pv(n) thereof. Combiner 4024 combines signals v(n) and pv(n) to produce an intermediate result signal i(n). Combiner 4026 combines intermediate result signal i(n) with a second noise feedback signal fq(n) to produce a quantizer input signal u(n). Quantizer 4028 quantizes input signal u(n) to produce a quantized output signal uq(n) (or quantizer output signal uq(n)) associated with a quantization error or noise signal q(n). Combiner 4036 combines (differences) signals u(n) and uq(n) to produce the quantization noise signal q(n). Long-term filter 4038 long-term filters the noise signal q(n) to produce feedback noise signal fq(n). Therefore, combiner 4036, long-term filter 4038 and combiner 4026 form an inner or second stage NF loop nested within the outer NF loop. This inner NF loop spectrally shapes the coding noise associated with codec 4000 in accordance with filter 4038, to follow, for example, the long-term spectral characteristics of input speech signal s(n). <br/> <br/> [0064] Exiting quantizer 4028, combiner 4030 combines quantizer output signal uq(n) with a prediction pv(n)' of predictive quantizer input signal v(n). Long-term predictor 4034 long-term predicts signal v(n) (to produce predicted signal pv(n)') based on signal vq(n). <br/> <br/> [0065] Exiting predictive quantizer Q" (4008), predictively quantized signal vq(n) is combined with a prediction ps(n)' of input speech signal s(n) to produce reconstructed speech signal sq(n). Predictor 4012 short term predicts input speech signal s(n) (to produce predicted signal ps(n)') based on reconstructed speech signal sq(n). <br/> <br/> [0066] In the first exemplary arrangement of NF codec 4000 depicted in FIG. 4, predictors 4002 and 4012 are short-term predictors and NF filter 4016 is a short-term noise filter, while predictors 4022, 4034 are long-term predictors and noise filter 4038 is a long-term noise filter. In a second exemplary arrangement of NF codec 4000, predictors 4002, 4012 are long-term predictors and NF filter 4016 is a long-term noise filter (to spectrally shape the coding noise to follow, for example, the long-term characteristic of the input speech signal s(n)), while predictors 4022, 4034 are short-term predictors and noise filter 4038 is a short-term noise filter (to spectrally shape the coding noise to follow, for example, the short-term characteristic of the input speech signal s(n)). <br/> <br/> [0067] In the first arrangement of codec 4000 depicted in FIG. 4, the dashed box labeled as Q" (predictive filter Q" (4008)) contains an NFC codec structure just like the structure of codec 1000 in FIG. 1, but the predictors 4022, 4034 and noise feedback filter 4038 are all long-term filters. Therefore, the quantization error qs(n) of the "predictive quantizer" Q" (4008) is simply the reconstruction error, or coding noise of the NFC structure inside the Q" dashed box 4008. Hence, from earlier equation, we have <br/>
<br/> [0068] This proves that the nested two-stage NFC codec structure 4000 in FIG. 4 indeed performs both short-term and long-term noise spectral shaping, in addition to short-term and long-term prediction. <br/> <br/> [0069] One advantage of nested two-stage NFC structure 4000 as shown in FIG. 4 is that it completely decouples long-term noise feedback coding from short-term noise feedback coding. This allows us to use different codec structures for long-term NFC and short-term NFC, as the following examples illustrate. <br/> <br/> <br/> 3. Fifth Codec Embodiment - Two Stage Prediction With Two Stage Noise Feedback (Nested Two Stage Feedback Coding)<br/>
<br/> [0070] Due to the above mentioned "decoupling" between the long-term and short-term noise feedback coding, predictive quantizer Q" (4008) of codec 4000 in FIG. 4 can be replaced by codec 2000 in FIG. 2, thus constructing another example nested two-stage NFC structure 5000, depicted in FIG. 5 and described below. <br/> <br/> [0071] FIG. 5 is a block diagram of a first exemplary arrangement of the example nested two-stage NFC structure or codec 5000, according to a fifth embodiment of the present invention. Codec 5000 includes the following functional elements: a first short-term predictor 5002 (also referred to as a short-term predictor Ps(z)); a first combiner or adder 5004; a second combiner or adder 5006; a predictive quantizer 5008 (also referred to as a predictive quantizer Q"'); a third combiner or adder 5010; a second short-term predictor 5012 (also referred to as a short-term predictor Ps(z)); a fourth combiner 5014; and a short-term noise feedback filter 5016 (also referred to as a short-term noise feedback filter Fs(z)). <br/> <br/> [0072] Predictive quantizer Q"' (5008) includes a first combiner 5024, a second combiner 5026, either a scalar or a vector quantizer 5028, a third combiner 5030, a long-term predictor 5034 (also referred to as a long-term predictor (Pl(z)), a fourth combiner 5036, and a long-term filter 5038 (also referred to as a long-term filter Nl(z)-1). <br/> <br/> [0073] Codec 5000 encodes a sampled input speech signal s(n) to produce a coded speech signal, and then decodes the coded speech signal to produce a reconstructed output speech signal sq(n), representative of the input speech signal s(n). Reconstructed speech signal sq(n) is associated with an overall coding noise r(n) = s(n) - sq(n). In coding input speech signal s(n), predictors 5002 and 5012, combiners 5004, 5006, and 5010, and noise filter 5016 operate similarly to corresponding elements described above in connection with FIG. 3 having reference numerals decreased by "2000". Therefore, NF codec 5000 includes an outer or first stage NF loop comprising combiner 5014, short-term noise filter 5016, and combiner 5006. This outer NF loop spectrally shapes the coding noise associated with codec 5000 according to filter 5016, to follow, for example, the short-term spectral characteristics of input speech signal s(n). <br/> <br/> [0074] Predictive quantizer 5008 has a structure similar to the structure of NF codec 2000 described above in connection with FIG. 2. Predictive quantizer Q (5008) operates within the outer NF loop mentioned above to predictively quantize a predictive quantizer input signal v(n) to produce a predictively quantized output signal vq(n) (also referred to as predicted quantizer output signal vq(n)) in the following exemplary manner. Predictor 5034 long-term predicts input signal v(n) based on output signal vq(n), to produce a predicted signal pv(n) (i.e., representing a prediction of signal v(n)). Combiners 5026 and 5024 collectively combine signal pv(n) with a noise feedback signal fq(n) and with input signal v(n) to produce a quantizer input signal u(n). Quantizer 5028 quantizes input signal u(n) to produce a quantized output signal uq(n) (also referred to as a quantizer output signal uq(n)) associated with a quantization error or noise signal q(n). Combiner 5036 combines (i.e., differences) signals u(n) and uq(n) to produce the quantization noise signal q(n). Filter 5038 long-term filters the noise signal q(n) to produce feedback noise signal fq(n). Therefore, combiner 5036, long-term filter 5038 and combiners 5026 and 5024 form an inner or second stage NF loop nested within the outer NF loop. This inner NF loop spectrally shapes the coding noise associated with codec 5000 in accordance with filter 5038, to follow, for example, the long-term spectral characteristics of input speech signal s(n). <br/> <br/> [0075] In a second exemplary arrangement of NF codec 5000, predictors 5002, 5012 are long-term predictors and NF filter 5016 is a long-term noise filter (to spectrally shape the coding noise to follow, for example, the long-term characteristic of the input speech signal s(n)), while predictor 5034 is a short-term predictor and noise filter 5038 is a short-term noise filter (to spectrally shape the coding noise to follow, for example, the short-term characteristic of the input speech signal s(n)). <br/> <br/> [0076] FIG. 5A is a block diagram of an alternative but mathematically equivalent signal combining arrangement 5050 corresponding to the combining arrangement including combiners 5024 and 5026 of FIG. 5. Combining arrangement 5050 includes a first combiner 5024' and a second combiner 5026'. Combiner 5024' receives predictive quantizer input signal v(n) and predicted signal pv(n) directly from predictor 5034. Combiner 5024' combines these two signals to produce an intermediate signal i(n)'. Combiner 5026' receives intermediate signal i(n)' and feedback noise signal fq(n) directly from noise filter 5038. Combiner 5026' combines these two received signals to produce quantizer input signal u(n). Therefore, equivalent combining arrangement 5050 is similar to the combining arrangement including combiners 5024 and 5026 of FIG. 5. <br/> <br/> <br/> 4. Sixth Codec Embodiment - Two Stage Prediction With Two Stage Noise Feedback (Nested Two Stage Feedback Coding)<br/>
<br/> [0077] In a further example, the outer layer NFC structure in FIG. 5 (i.e., all of the functional blocks outside of predictive quantizer Q (5008)) can be replaced by the NFC structure 2000 in FIG. 2, thereby constructing a further codec structure 6000, depicted in FIG. 6 and described below. <br/> <br/> [0078] FIG. 6 is a block diagram of a first exemplary arrangement of the example nested two-stage NF coding structure or codec 6000, according to a sixth embodiment of the present invention. Codec 6000 includes the following functional elements: a first combiner 6004; a second combiner 6006; predictive quantizer Q (5008) described above in connection with FIG. 5; a third combiner or adder 6010; a short-term predictor 6012 (also referred to as a short-term predictor Ps(z)); a fourth combiner 6014; and a short-term noise feedback filter 6016 (also referred to as a short-term noise feedback filter Ns(z)-1). <br/> <br/> [0079] Codec 6000 encodes a sampled input speech signal s(n) to produce a coded speech signal, and then decodes the coded speech signal to produce a reconstructed output speech signal sq(n), representative of the input speech signal s(n). Reconstructed speech signal sq(n) is associated with an overall coding noise r(n) = s(n) - sq(n). In coding input speech signal s(n), an outer coding structure depicted in FIG. 6, including combiners 6004, 6006, and 6010, noise filter 6016, and predictor 6012, operates in a manner similar to corresponding codec elements of codec 2000 described above in connection with FIG. 2 having reference numbers decreased by "4000." A combining arrangement including combiners 6004 and 6006 can be replaced by an equivalent combining arrangement similar to combining arrangement 5050 discussed in connection with FIG. 5A, whereby a combiner 6004' (not shown) combines signals s(n) and ps(n)' to produce a residual signal d(n) (not shown), and then a combiner 6006' (also not shown) combines signals d(n) and fqs(n) to produce signal v(n). <br/> <br/> [0080] Unlike codec 2000, codec 6000 includes a predictive quantizer equivalent to predictive quantizer 5008 (described above in connection with FIG. 5, and depicted in FIG. 6 for descriptive convenience) to predictively quantize a predictive quantizer input signal v(n) to produce a quantized output signal vq(n). Accordingly, codec 6000 also includes a first stage or outer noise feedback loop to spectrally shape the coding noise to follow, for example, the short-term characteristic of the input speech signal s(n), and a second stage or inner noise feedback loop nested within the outer loop to spectrally shape the coding noise to follow, for example, the long-term characteristic of the input speech signal. <br/> <br/> [0081] In a second exemplary arrangement of NF codec 6000, predictor 6012 is a long-term predictor and NF filter 6016 is a long-term noise filter, while predictor 5034 is a short-term predictor and noise filter 5038 is a short-term noise filter. <br/> <br/> [0082] There is an advantage for such a flexibility to mix and match different single-stage NFC structures in different parts of the nested two-stage NFC structure. For example, although the codec 5000 in FIG. 5 mixes two different types of single-stage NFC structures in the two nested layers, it is actually the preferred embodiment of the current invention, because it has the lowest complexity among the three systems 4000, 5000, and 6000, respectively shown in FIGs. 4, 5 and 6. <br/> <br/> [0083] To see the codec 5000 in FIG. 5 has the lowest complexity, consider the inner layer involving long-term NFC first. To get better long-term prediction performance, we normally use a three-tap pitch predictor of the kind used by Atal and Schroeder in their 1979 paper, rather than a simpler one-tap pitch predictor. With Fl(z) = Pl(z/ beta ), the long-term NFC structure inside the Q" dashed box has three long-term filters, each with three taps. In contract, by choosing the harmonic noise spectral shape to be the same as the frequency response of <br/>
<br/> [0084] Now consider the short-term NFC structure in the outer layer of codec 5000 in Fig 5. The short-term synthesis filter (including predictor 5012) to the right of the Q dashed box (5008) does not need to be implemented in the encoder (and all three decoders corresponding to FIGs. 4-6 need to implement it). The short-term analysis filter (including predictor 5002) to the left of the symbol d(n) needs to be implemented anyway even in FIG. 6 (although not shown there), because we are using d(n) to derive a weighted speech signal, which is then used for pitch estimation. Therefore, comparing the rest of the outer layer, FIG. 5 has only one short-term filter Fs(z) (5016) to implement, while FIG. 6 has two short-term filters. Thus, the outer layer of FIG. 5 has a lower complexity than the outer layer of FIG. 6. <br/> <br/> <br/> 5. Coding Method<br/>
<br/> [0085] FIG. 6A is an example method 6050 of coding a speech or audio signal using any one of the example codecs 3000, 4000, 5000, and 6000 described above. In a first step 6055, a predictor (e.g., 3002 in FIG. 3, 4002 in FIG. 4, 5002 in FIG. 5 , or 6012 in FIG. 6) predicts an input speech or audio signal (e.g., s(n)) to produce a predicted speech signal (e.g., ps(n) or ps(n)'). <br/> <br/> [0086] In a next step 6060, a combiner (e.g., 3004, 4004, 5004, 6004/6006 or equivalents thereof) combines the predicted speech signal (e.g., ps(n)) with the speech signal (e.g., s(n)) to produce a first residual signal (e.g., d(n)). <br/> <br/> [0087] In a next step 6062, a combiner (e.g., 3006, 4006, 5006, 6004/6006 or equivalents thereof) combines a first noise feedback signal (e.g., fqs(n)) with the first residual signal (e.g., d(n)) to produce a predictive quantizer input signal (e.g., v(n)). <br/> <br/> [0088] In a next step 6064, a predictive quantizer (e.g., Q', Q", or Q"') predictively quantizes the predictive quantizer input signal (e.g., v(n)) to produce a predictive quantizer output signal (e.g., vq(n)) associated with a predictive quantization noise (e.g., qs(n)). <br/> <br/> [0089] In a next step 6066, a filter (e.g., 3016, 4016, or 5016) filters the predictive quantization noise (e.g., qs(n)) to produce the first noise feedback signal (e.g., fqs(n)). <br/> <br/> [0090] FIG. 6B is a detailed method corresponding to predictive quantizing step 6064 described above. In a first step 6070, a predictor (e.g., 3034, 4022, or 5034) predicts the predictive quantizer input signal (e.g., v(n)) to produce a predicted predictive quantizer input signal (e.g., pv(n)). <br/> <br/> [0091] In a next step 6072 used in all of the codecs 3000-6000, a combiner (e.g., 3024, 4024, 5024/5026 or an equivalent thereof, such as 5024') combines at least the predictive quantizer input signal (e.g., v(n)) with at least the first predicted predictive quantizer input signal (e.g., pv(n)) to produce a quantizer input signal (e.g., u(n)). <br/> <br/> [0092] Additionally, the codec embodiments including an inner noise feedback loop (that is, exemplary codecs 4000, 5000, and 6000) use further combining logic (e.g., combiners 5026/5026' or 4026 or equivalents thereof)) to further combine a second noise feedback signal (e.g., fq(n)) with the predictive quantizer input signal (e.g., v(n)) and the first predicted predictive quantizer input signal (e.g., pv(n)), to produce the quantizer input signal (e.g., u(n)). <br/> <br/> [0093] In a next step 6076, a scalar or vector quantizer (e.g., 3028, 4028, or 5028) quantizes the input signal (e.g., u(n)) to produce a quantizer output signal (e.g., uq(n)). <br/> <br/> [0094] In a next step 6078 applying only to those embodiments including the inner noise feedback loop, a filter (e.g., 4038 or 5038) filters a quantization noise (e.g., q(n)) associated with the quantizer output signal (e.g., q(n)) to produce the second noise feedback signal (fq(n)). <br/> <br/> [0095] In a next step 6080, deriving logic (e.g., 3034 and 3030 in FIG. 3, 4034 and 4030 in FIG. 4, and 5034 and 5030 in FIG. 5) derives the predictive quantizer output signal (e.g., vq(n)) based on the quantizer output signal (e.g., uq(n)). <br/> <br/> <br/> III. Overview of Preferred Embodiment (Based on the Fifth Embodiment above)<br/>
<br/> [0096] We now describe our preferred embodiment of the present invention. FIG. 7 shows an example encoder 7000 of the preferred embodiment. FIG. 8 shows the corresponding decoder. As can be seen, the encoder structure 7000 in FIG. 7 is based on the structure of codec 5000 in FIG. 5. The short-term synthesis filter (including predictor 5012) in FIG. 5 does not need to be implemented in FIG. 7, since its output is not used by encoder 7000. Compared with FIG. 5, only three additional functional blocks (10, 20, and 95) are added near the top of FIG. 7. These functional blocks (also singularly and collectively referred to as "parameter deriving logic") adaptively analyze and quantize (and thereby derive) the coefficients of the short-term and long-term filters. FIG. 7 also explicitly shows the different quantizer indices that are multiplexed for transmission to the communication channel. The decoder in FIG. 8 is essentially the same as the decoder of most other modern predictive codecs such as MPLPC and CELP. No postfilter is used in the decoder. <br/> <br/> [0097] Coder 7000 and coder 5000 of FIG. 5 have the following corresponding functional blocks: predictors 5002 and 5034 in FIG. 5 respectively correspond to predictors 40 and 60 in FIG. 7; combiners 5004, 5006, 5014, 5024, 5026, 5030 and 5036 in FIG. 5 respectively correspond to combiners 45, 55, 90, 75, 70, 85 and 80 in FIG. 7; filters 5016 and 5038 in FIG. 5 respectively correspond to filters 50 and 65 in FIG. 7; quantizer 5028 in FIG. 5 corresponds to quantizer 30 in FIG. 7; signals vq(n), pv(n), fqs(n), and fq(n) in FIG. 5 respectively correspond to signals dq(n), ppv(n), stnf(n), and ltnf(n) in FIG. 7; signals sharing the same reference labels in FIG.5 and FIG. 7 also correspond to each other. Accordingly, the operation of codec 5000 described above in connection with FIG. 5 correspondingly applies to codec 7000 of FIG. 7. <br/> <br/> <br/> IV. Short-Term Linear Predictive Analysis and Quantization<br/>
<br/> [0098] We now give a detailed description of the encoder operations. Refer to FIG. 7. The input signal s(n) is buffered at block 10, which performs short-term linear predictive analysis and quantization to obtain the coefficients for the short-term predictor 40 and the short-term noise feedback filter 50. This block 10 is further expanded in FIG. 9. The processing blocks within FIG. 9 all employ well-known prior-art techniques. <br/> <br/> [0099] Refer to FIG. 9. The input signal s(n) is buffered at block 11, where it is multiplied by an analysis window that is 20 ms in length. If the coding delay is not critical, then a frame size of 20 ms and a sub-frame size of 5 ms can be used, and the analysis window can be a symmetric window centered at the mid-point of the last sub-frame in the current frame. In our preferred embodiment of the codec, however, we want the coding delay to be as small as possible; therefore, the frame size and the sub-frame size are both selected to be 5 ms, and no look ahead is allowed beyond the current frame. In this case, an asymmetric window is used. The "left window" is 17.5 ms long, and the "right window" is 2.5 ms long. The two parts of the window concatenate to give a total window length of 20 ms. Let LWINSZ be the number of samples in the left window (LWINSZ = 140 for 8 kHz sampling and 280 for 16 kHz sampling), then the left window is given by <br/> EMI34.1<br/>
<br/> [0100] Let RWINSZ be the number of samples in the right window. Then, RWINSZ = 20 for 8 kHz sampling and 40 for 16 kHz sampling. The right window is given by <br/> EMI35.1<br/>
<br/> [0101] The concatenation of wl(n) and wr(n) gives the 20 ms asymmetric analysis window. When applying this analysis window, the last sample of the window is lined up with the last sample of the current frame, so there is no look ahead. <br/> <br/> [0102] After the 5 ms current frame of input signal and the preceding 15 ms of input signal in the previous three frames are multiplied by the 20 ms window, the resulting signal is used to calculate the autocorrelation coefficients r(i), for lags i = 0, 1, 2, ..., M, where M is the short-term predictor order, and is chosen to be 8 for both 8 kHz and 16 kHz sampled signals. <br/> <br/> [0103] The calculated autocorrelation coefficients are passed to block 12, which applies a Gaussian window to the autocorrelation coefficients to perform the well-known prior-art method of spectral smoothing. The Gaussian window function is given by <br/>
<br/> [0104] After multiplying r(i) by such a Gaussian window, block 12 then multiplies r(0) by a white noise correction factor of WNCF = 1 + epsilon , where epsilon = 0.0001. In summary, the output of block 12 is given by <br/> EMI35.2<br/>
<br/> [0105] The spectral smoothing technique smoothes out (widens) sharp resonance peaks in the frequency response of the short-term synthesis filter. The white noise correction adds a white noise floor to limit the spectral dynamic range. Both techniques help to reduce ill conditioning in the Levinson-Durbin recursion of block 13. <br/> <br/> [0106] Block 13 takes the autocorrelation coefficients modified by block 12, and performs the well-known prior-art method of Levinson-Durbin recursion to convert the autocorrelation coefficients to the short-term predictor coefficients i , i = 0, 1, ..., M. Block 14 performs bandwidth expansion of the resonance spectral peaks by modifying i as <br/>
<br/> [0107] Block 15 converts the {ai} coefficients to Line Spectrum Pair (LSP) coefficients {li}, which are sometimes also referred to as Line Spectrum Frequencies (LSFs). Again, the operation of block 15 is a well-known prior-art procedure. <br/> <br/> [0108] Block 16 quantizes and encodes the M LSP coefficients to a pre-determined number of bits. The output LSP quantizer index array LSPI is passed to the bit multiplexer (block 95), while the quantized LSP coefficients are passed to block 17. Many different kinds of LSP quantizers can be used in block 16. In our preferred embodiment, the quantization of LSP is based on inter-frame moving-average (MA) prediction and multi-stage vector quantization, similar to (but not the same as) the LSP quantizer used in the ITU-T Recommendation G.729. <br/> <br/> [0109] Block 16 is further expanded in FIG. 10. Except for the LSP quantizer index array LSPI, all other signal paths in FIG. 10 are for vectors of dimension M. Block 161 uses the unquantized LSP coefficient vector to calculate the weights to be used later in VQ codebook search with weighted mean-square error (WMSE) distortion criterion. The weights are determined as <br/> EMI36.1<br/>
<br/> [0110] Basically, the i-th weight is the inverse of the distance between the i-th LSP coefficient and its nearest neighbor LSP coefficient. These weights are different from those used in G.729. <br/> <br/> [0111] Block 162 stores the long-term mean value of each of the M LSP coefficients, calculated off-line during codec design phase using a large training data file. Adder 163 subtracts the LSP mean vector from the unquantized LSP coefficient vector to get the mean-removed version of it. Block 164 is the inter-frame MA predictor for the LSP vector. In our preferred embodiment, the order of this MA predictor is 8. The 8 predictor coefficients are fixed and pre-designed off-line using a large training data file. With a frame size of 5 ms, this 8<th>-order predictor covers a time span of 40 ms, the same as the time span covered by the 4<th>-order MA predictor of LSP used in G.729, which has a frame size of 10 ms. <br/> <br/> [0112] Block 164 multiplies the 8 output vectors of the vector quantizer block 166 in the previous 8 frames by the 8 sets of 8 fixed MA predictor coefficients and sum up the result. The resulting weighted sum is the predicted vector, which is subtracted from the mean-removed unquantized LSP vector by adder 165. The two-stage vector quantizer block 166 then quantizes the resulting prediction error vector. <br/> <br/> [0113] The first-stage VQ inside block 166 uses a 7-bit codebook (128 codevectors). For the narrowband (8 kHz sampling) codec at 16 kb/s, the second-stage VQ also uses a 7-bit codebook. This gives a total encoding rate of 14 bits/frame for the 8 LSP coefficients of the 16 kb/s narrowband codec. For the wideband (16 kHz sampling) codec at 32 kb/s, on the other hand, the second-stage VQ is a split VQ with a 3-5 split. The first three elements of the error vector of first-stage VQ are vector quantized using a 5-bit codebook, and the remaining 5 elements are vector quantized using another 5-bit codebook. This gives a total of (7+5+5)=17 bits/frame encoding rate for the 8 LSP coefficients of the 32 kb/s wideband codec. The selected codevectors from the two VQ stages are added together to give the final output quantized vector of block 166. <br/> <br/> [0114] During codebook searches, both stages of VQ within block 166 use the WMSE distortion measure with the weights {wi} calculated by block 161. The codebook indices for the best matches in the two VQ stages (two indices for 16 kb/s narrowband codec and three indices for 32 kb/s wideband codec) form the output LSP index array LSPI, which is passed to the bit multiplexer block 95 in FIG. 7. <br/> <br/> [0115] The output vector of block 166 is used to update the memory of the inter-frame LSP predictor block 164. The predicted vector generated by block 164 and the LSP mean vector held by block 162 are added to the output vector of block 166, by adders 167 and 168, respectively. The output of adder 168 is the quantized and mean-restored LSP vector. <br/> <br/> [0116] It is well known in the art that the LSP coefficients need to be in a monotonically ascending order for the resulting synthesis filter to be stable. The quantization performed in FIG. 10 may occasionally reverse the order of some of the adjacent LSP coefficients. Block 169 check for correct ordering in the quantized LSP coefficients, and restore correct ordering if necessary. The output of block 169 is the final set of quantized LSP coefficients { <br/> EMI38.1<br/> }. <br/> <br/> [0117] Now refer back to FIG. 9. The quantized set of LSP coefficients { <br/> EMR38.1<br/> }, which is determined once a frame, is used by block 17 to perform linear interpolation of LSP coefficients for each sub-frame within the current frame. In a general coding scheme based on the current invention, there may be two or more sub-frames per frame. For example, the sub-frame size can stay at 5 ms, while the frame size can be 10 ms or 20 ms. In this case, the linear interpolation of LSP coefficients is a well-known prior art. In the preferred embodiment of the current invention, to keep the coding delay low, the frame size is chosen to be 5 ms, the same as the sub-frame size. In this degenerate case, block 17 can be omitted. This is why it is shown in dashed box. <br/> <br/> [0118] Block 18 takes the set of interpolated LSP coefficients {l'i} and converts it to the corresponding set of direct-form linear predictor coefficients { <br/> EMI38.2<br/> } for each sub-frame. Again, such a conversion from LSP coefficients to predictor coefficients is well known in the art. The resulting set of predictor coefficients { <br/> EMR38.2<br/> } are used to update the coefficients of the short-term predictor block 40 in FIG. 7. <br/> <br/> [0119] Block 19 performs further bandwidth expansion on the set of predictor coefficients { <br/> EMR38.2<br/> } using a bandwidth expansion factor of gamma 1 = 0.75. The resulting bandwidth-expanded set of filter coefficients is given by <br/> EMI39.1<br/>
<br/> [0120] This bandwidth-expanded set of filter coefficients {a'i} are used to update the coefficients of the short-term noise feedback filter block 50 in FIG. 7 and the coefficients of the weighted short-term synthesis filter block 21 in FIG. 11 (to be discussed later). This completes the description of short-term predictive analysis and quantization block 10 in FIG. 7. <br/> <br/> <br/> V. Short-Term Linear Prediction of Input Signal<br/>
<br/> [0121] Now refer to FIG. 7 again. Except for block 10 and block 95, whose operations are performed once a frame, the operations of most of the rest of the blocks in FIG. 7 are performed once a sub-frame, unless otherwise noted. The short-term predictor block 40 predicts the input signal sample s(n) based on a linear combination of the preceding M samples. The adder 45 subtracts the resulting predicted value from s(n) to obtain the short-term prediction residual signal, or the difference signal, d(n). Specifically, <br/> EMI39.2<br/>
<br/> <br/> VI. Long-Term Linear Predictive Analysis and Quantization<br/>
<br/> [0122] The long-term predictive analysis and quantization block 20 uses the short-term prediction residual signal {d(n)} of the current sub-frame and its quantized version {dq(n)} in the previous sub-frames to determine the quantized values of the pitch period and the pitch predictor taps. This block 20 is further expanded in FIG. 11. <br/> <br/> [0123] Now refer to FIG. 11. The short-term prediction residual signal d(n) passes through the weighted short-term synthesis filter block 21, whose output is calculated as <br/> EMI40.1<br/>
<br/> [0124] The signal dw(n) is basically a perceptually weighted version of the input signal s(n), just like what is done in CELP codecs. This dw(n) signal is passed through a low-pass filter block 22, which has a -3 dB cut off frequency at about 800 Hz. In the preferred embodiment, a 4<th>-order elliptic filter is used for this purpose. Block 23 down-samples the low-pass filtered signal to a sampling rate of 2 kHz. This represents a 4:1 decimation for the 16 kb/s narrowband codec or 8:1 decimation for the 32 kb/s wideband codec. <br/> <br/> [0125] The first-stage pitch search block 24 then uses the decimated 2 kHz sampled signal dwd(n) to find a "coarse pitch period", denoted as cpp in FIG. 11. A pitch analysis window of 10 ms is used. The end of the pitch analysis window is lined up with the end of the current sub-frame. At a sampling rate of 2 kHz, 10 ms correspond to 20 samples. Without loss of generality, let the index range of n = 1 to n = 20 correspond to the pitch analysis window for dwd(n). Block 24 first calculates the following correlation function and energy values <br/> EMI40.2<br/>
EMI40.3<br/>
<br/> [0126] For the narrowband codec, MINPPD = 4 samples and MAXPPD = 36 samples. For the wideband codec, MINPPD = 2 samples and MAXPPD = 34 samples. Block 24 then searches through the calculated {c(k)} array and identifies all positive local peaks in the {c(k)} sequence. Let Kp denote the resulting set of indices kp where c(kp) is a positive local peak, and let the elements in Kp be arranged in an ascending order. <br/> <br/> [0127] If there is no positive local peak at all in the {c(k)} sequence, the processing of block 24 is terminated and the output coarse pitch period is set to cpp = MINPPD. If there is at least one positive local peak, then the block 24 searches through the indices in the set Kp and identifies the index kp that maximizes c(kp)<2> / E(kp). Let the resulting index be k*p. <br/> <br/> [0128] To avoid picking a coarse pitch period that is around an integer multiple of the true coarse pitch period, the following simple decision logic is used. <br/>
<br/> [0129] Block 25 takes cpp as its input and performs a second-stage pitch period search in the undecimated signal domain to get a refined pitch period pp. Block 25 first converts the coarse pitch period cpp to the undecimated signal domain by multiplying it by the decimation factor DECF. (This decimation factor DECF = 4 and 8 for narrowband and wideband codecs, respectively). Then, it determines a search range for the refined pitch period around the value cpp*DECF. The lower bound of the search range is lb = max(MINPP, cpp*DECF - DECF + 1) , where MINPP = 17 samples is the minimum pitch period. The upper bound of the search range is ub = min(MAXPP, cpp*DECF + DECF-1), where MAXPP is the maximum pitch period, which is 144 and 272 samples for narrowband and wideband codecs, respectively. <br/> <br/> [0130] Block 25 maintains a signal buffer with a total of MAXPP + 1 + SFRSZ samples, where SFRSZ is the sub-frame size, which is 40 and 80 samples for narrowband and wideband codecs, respectively. The last SFRSZ samples of this buffer are populated with the open-loop short-term prediction residual signal d(n) in the current sub-frame. The first MAXPP + 1 samples are populated with the MAXPP + 1 samples of quantized version of d(n), denoted as dq(n), immediately preceding the current sub-frame. For convenience of equation writing later, we will use dq(n) to denote the entire buffer of MAXPP + 1 + SFRSZ samples, even though the last SFRSZ samples are really d(n) samples. Again, without loss of generality, let the index range from n = 1 to n = SFRSZ denotes the samples in the current sub-frame. <br/> <br/> [0131] After the lower bound lb and upper bound ub of the pitch period search range are determined, block 25 calculates the following correlation and energy terms in the undecimated dq(n) signal domain for time lags k within the search range [lb, ub]. <br/> EMI42.1<br/>
EMI42.2<br/>
<br/> [0132] The time lag k ELEMENT [lb,ub] that maximizes the ratio <br/> EMI43.1<br/> (k)/<br/> EMI43.2<br/> (k) is chosen as the final refined pitch period. That is, <br/> EMI43.3<br/>
<br/> [0133] Once the refined pitch period pp is determined, it is encoded into the corresponding output pitch period index PPI, calculated as <br/>
<br/> [0134] Possible values of PPI are 0 to 127 for the narrowband codec and 0 to 255 for the wideband codec. Therefore, the refined pitch period pp is encoded into 7 bits or 8 bits, without any distortion. <br/> <br/> [0135] Block 25 also calculates ppt1, the optimal tap weight for a single-tap pitch predictor, as follows <br/> EMI43.4<br/>
<br/> [0136] Block 27 calculates the long-term noise feedback filter coefficient lambda as follows. <br/> EMI43.5<br/>
<br/> [0137] Pitch predictor taps quantizer block 26 quantizes the three pitch predictor taps to 5 bits using vector quantization. Rather than minimizing the mean-square error of the three taps as in conventional VQ codebook search, block 26 finds from the VQ codebook the set of candidate pitch predictor taps that minimizes the pitch prediction residual energy in the current sub-frame. Using the same dq(n) buffer and time index convention as in block 25, and denoting the set of three taps corresponding to the j-th codevector as {bj1,bj2,bj3}, we can express such pitch prediction residual energy as <br/> EMI43.6<br/>
<br/> [0138] This equation can be re-written as <br/> EMI44.1<br/>
EMI44.2<br/>
EMI44.3<br/>
<br/> [0139] In the codec design stage, the optimal three-tap codebooks {bj1,bj2,bj3}, j = 0, 1, 2, ..., 31 are designed off-line. The corresponding 9-dimensional codevectors xj, j = 0, 1, 2, ..., 31 are calculated and stored in a codebook. In actual encoding, block 26 first calculates the vector p<T>, then it calculates the 32 inner products p<T>xj for j = 0, 1, 2, ... , 31. The codebook index j* that maximizes such an inner product also minimizes the pitch prediction residual energy Ej. Thus, the output pitch predictor taps index PPTI is chosen as <br/> EMI44.4<br/>
<br/> [0140] The corresponding vector of three quantized pitch predictor taps, denoted as ppt in FIG. 11, is obtained by multiplying the first three elements of the selected codevector xj* by 0.5. <br/> <br/> [0141] Once the quantized pitch predictor taps have been determined, block 28 calculates the open-loop pitch prediction residual signal e(n) as follows. <br/> EMI44.5<br/>
<br/> [0142] Again, the same dq(n) buffer and time index convention of block 25 is used here. That is, the current sub-frame of dq(n) for n = 1, 2, ..., SFRSZ is actually the unquantized open-loop short-term prediction residual signal d(n). <br/> <br/> [0143] This completes the description of block 20, long-term predictive analysis and quantization. <br/> <br/> <br/> VII. Quantization of Residual Gain<br/>
<br/> [0144] The open-loop pitch prediction residual signal e(n) is used to calculate the residual gain. This is done inside the prediction residual quantizer block 30 in FIG. 7. Block 30 is further expanded in FIG. 12. <br/> <br/> [0145] Refer to FIG. 12. Block 301 calculates the residual gain in the base-2 logarithmic domain. Let the current sub-frame corresponds to time indices from n = 1 to n = SFRSZ. For the narrowband codec, the logarithmic gain (log-gain) is calculated once a sub-frame as <br/> EMI45.1<br/>
<br/> [0146] For the wideband codec, on the other hand, two log-gains are calculated for each sub-frame. The first log-gain is calculated as <br/> EMI45.2<br/>
EMI45.3<br/>
<br/> [0147] Lacking a better name, we will use the term "gain frame" to refer to the time interval over which a residual gain is calculated. Thus, the gain frame size is SFRSZ for the narrowband codec and SFRSZ/2 for the wideband codec. All the operations in FIG. 12 are done on a once-per-gain-frame basis. <br/> <br/> [0148] The long-term mean value of the log-gain is calculated off-line and stored in block 302. The adder 303 subtracts this long-term mean value from the output log-gain of block 301 to get the mean-removed version of the log-gain. The MA log-gain predictor block 304 is an FIR filter, with order 8 for the narrowband codec and order 16 for the wideband codec. In either case, the time span covered by the log-gain predictor is 40 ms. The coefficients of this log-gain predictor are pre-determined off-line and held fixed. The adder 305 subtracts the output of block 304, which is the predicted log-gain, from the mean-removed log-gain. The scalar quantizer block 306 quantizes the resulting log-gain prediction residual. The narrowband codec uses a 4-bit quantizer, while the wideband codec uses a 5-bit quantizer here. <br/> <br/> [0149] The gain quantizer codebook index GI is passed to the bit multiplexer block 95 of FIG. 7. The quantized version of the log-gain prediction residual is passed to block 304 to update the MA log-gain predictor memory. The adder 307 adds the predicted log-gain to the quantized log-gain prediction residual to get the quantized version of the mean-removed log-gain. The adder 308 then adds the log-gain mean value to get the quantized log-gain, denoted as qlg. <br/> <br/> [0150] Block 309 then converts the quantized log-gain to the quantized residual gain in the linear domain as follows: <br/>
<br/> [0151] Block 310 scales the residual quantizer codebook. That is, it multiplies all entries in the residual quantizer codebook by g. The resulting scaled codebook is then used by block 311 to perform residual quantizer codebook search. <br/> <br/> [0152] The prediction residual quantizer in the current invention of TSNFC can be either a scalar quantizer or a vector quantizer. At a given bit-rate, using a scalar quantizer gives a lower codec complexity at the expense of lower output quality. Conversely, using a vector quantizer improves the output quality but gives a higher codec complexity. A scalar quantizer is a suitable choice for applications that demand very low codec complexity but can tolerate higher bit rates. For other applications that do not require very low codec complexity, a vector quantizer is more suitable since it gives better coding efficiency than a scalar quantizer. <br/> <br/> [0153] In the next two sections, we describe the prediction residual quantizer codebook search procedures in the current invention, first for the case of scalar quantization in SQ-TSNFC, and then for the case of vector quantization in VQ-TSNFC. The codebook search procedures are very different for the two cases, so they need to be described separately. <br/> <br/> <br/> VIII. Scalar Quantization of Linear Prediction Residual Signal<br/>
<br/> [0154] If the residual quantizer is a scalar quantizer, the encoder structure of FIG. 7 is directly used as is, and blocks 50 through 90 operate on a sample-by-sample basis. Specifically, the short-term noise feedback filter block 50 of FIG. 7 uses its filter memory to calculate the current sample of the short-term noise feedback signal stnf(n) as follows. <br/> EMI47.1<br/>
<br/> [0155] The adder 55 adds stnf(n) to the short-term prediction residual d(n) to get v(n). <br/>
<br/> [0156] Next, using its filter memory, the long-term predictor block 60 calculates the pitch-predicted value as <br/> EMI47.2<br/>
<br/> [0157] The adders 70 and 75 together calculates the quantizer input signal u(n) as <br/>
<br/> [0158] Next, Block 311 of FIG. 12 quantizes u(n) by simply performing the codebook search of a conventional scalar quantizer. It takes the current sample of the unquantized signal u(n), find the nearest neighbor from the scaled codebook provided by block 310, passes the corresponding codebook index CI to the bit multiplexer block 95 of FIG. 7, and passes the quantized value uq(n) to the adders 80 and 85 of FIG. 7. <br/> <br/> [0159] The adder 80 calculates the quantization error of the quantizer block 30 as <br/>
<br/> [0160] This q(n) sample is passed to block 65 to update the filter memory of the long-term noise feedback filter. <br/> <br/> [0161] The adder 85 adds ppv(n) to uq(n) to get dq(n), the quantized version of the current sample of the short-term prediction residual. <br/>
<br/> [0162] This dq(n) sample is passed to block 60 to update the filter memory of the long-term predictor. <br/> <br/> [0163] The adder 90 calculates the current sample of qs(n) as <br/>
<br/> [0164] We found that for speech signals at least, if the prediction residual scalar quantizer operates at a bit rate of 2 bits/sample or higher, the corresponding SQ-TSNFC codec output has essentially transparent quality. <br/> <br/> <br/> IX. Vector Quantization of Linear Prediction Residual Signal<br/>
<br/> [0165] If the residual quantizer is a vector quantizer, the encoder structure of FIG. 7 cannot be used directly as is. An alternative approach and alternative structures need to be used. To see this, consider a conventional vector quantizer with a vector dimension K. Normally, an input vector is presented to the vector quantizer, and the vector quantizer searches through all codevectors in its codebook to find the nearest neighbor to the input vector. The winning codevector is the VQ output vector, and the corresponding address of that codevector is the quantizer out codebook index. If such a conventional VQ scheme is to be used with the codec structure in FIG. 7, then we need to determine K samples of the quantizer input u(n) at a time. Determining the first sample of u(n) in the VQ input vector is not a problem, as we have already shown how to do that in the last section. However, the second through the K-th samples of the VQ input vector cannot be determined, because they depend on the first through the (K - 1)-th samples of the VQ output vector of the signal uq(n), which have not been determined yet. <br/> <br/> [0166] The present invention avoids this chicken-and-egg problem by modifying the VQ codebook search procedure, as described below beginning with reference to FIG. 13A. <br/> <br/> <br/> A. General VQ Search<br/>
<br/> <br/> 1. High-Level Embodiment<br/>
<br/> <br/> a. System<br/>
<br/> [0167] FIG. 13A is a block diagram of an example Noise Feedback Coding (NFC) system 1300 for searching through N VQ codevectors, stored in a scaled VQ codebook 5028a, for a preferred one of the N VQ codevectors to be used for coding a speech or audio signal s(n). System 1300 includes scaled VQ codebook 5028a including a VQ codebook 1302 and a gain scaling unit 1304. Scaled VQ codebook 5028a corresponds to quantizer 3028, 4028, 5028, or 30, described above in connection with FIGs 3, 4, 5, or 7, respectively. <br/> <br/> [0168] VQ codebook 1302 includes N VQ codevectors. VQ codebook 1302 provides each of the N VQ codevectors stored in the codebook to gain scaling unit 1304. Gain scaling unit 1304 scales the codevectors, and provides scaled codevectors to an output of scaled VQ codebook 5028a. Symbol g(n) represents the quantized residual gain in the linear domain, as calculated in previous sections. The combination of VQ codebook 1302 and gain scaling unit 1304 (also labeled g(n)) is equivalent to a scaled VQ codebook. <br/> <br/> [0169] System 1300 further includes predictor logic unit 1306 (also referred to as a predictor 1306), an input vector deriver 1308, an error energy calculator 1310, a preferred codevector selector 1312, and a predictor/filter restorer 1314. Predictor 1306 includes combining and predicting logic. Input vector deriver 1308 includes combining, filtering, and predicting logic, corresponding to such logic used in codecs 3000, 4000, 5000, 6000, and 7000, for example, as will be further described below. The logic used in predictor 1306, input vector deriver 1308, and quantizer 1508a operates sample-by-sample in the same manner as described above in connection with codecs 3000-7000. Nevertheless, the VQ systems and methods are described below in terms of performing operations on "vectors" instead of individual samples. A "vector" as used herein refers to a group of samples. It is to be understood that the VQ systems and methods described below process each of the samples in a vector (that is, in a group of samples) one sample at a time. For example, a filter filters an input vector in the following manner: a first sample of the input vector is applied to an input of the filter; the filter processes the first sample of the vector to produce a first sample of an output vector corresponding to the first sample of the input vector; and the process repeats for each of the next sequential samples of the input vector until there are no input vector samples left, whereby the filter sequentially produces each of the next samples of the output vector. The last sample of the output vector to be produced or output by the filter can remain at the filter output such that it is available for processing immediately or at some later sample time (for example, to be combined, or otherwise processed, with a sample associated with another vector). A predictor predicts an input vector in much the same way as the filter processes (that is, filters) the input vector. Therefore, the term "vector" is used herein as a convenience to describe a group of samples to be sequentially processed in accordance with the present invention. <br/> <br/> <br/> b. Methods<br/>
<br/> [0170] A brief overview of a method of operation of system 1300 is now provided. In the modified VQ codebook search procedure of the current invention implemented using system 1300, we provide one VQ codevector at a time from scaled VQ codebook 5028a, perform all predicting, combining, and filtering functions of predictor 1306 and input vector deriving logic 1308 to calculate the corresponding VQ input vector of the signal u(n), and then calculate the energy of the quantization error vector of the signal q(n) using error energy calculator 1310. This process is repeated for N times for the N codevectors in scaled VQ codebook 5028a, with the filter memories in input vector deriving logic 1308 reset to their initial values before we repeat the process for each new codevector. After all the N codevectors have been tried, we have calculated N corresponding quantization error energy values of q(n). The VQ codevector that minimizes the energy of the quantization error vector is the winning codevector and is used as the VQ output vector. The address of this winning codevector is the output VQ codebook index CI that is passed to the bit multiplexer block 95. <br/> <br/> [0171] The bit multiplexer block 95 in FIG. 7 packs the five sets of indices LSPI, PPI, PPTI, GI, and CI into a single bit stream. This bit stream is the output of the encoder. It is passed to the communication channel. <br/> <br/> [0172] FIG. 13B is a flow diagram of an example method 1350 of searching the N VQ codevectors stored in VQ codebook 1302 for a preferred one of the N VQ codevectors to be used in coding a speech or audio signal (method 1350 is also referred to as a prediction residual VQ codebook search of an NFC). Method 1350 is implemented using system 1300. With reference to FIGs. 13A and 13B, at a first step 1352, predictor 1306 predicts a speech signal s(n) to derive a residual signal d(n). Predictor 1306 can include a predictor and a combiner, such as predictor 5002 and combiner 5004 discussed above in connection with FIG. 5, for example. <br/> <br/> [0173] At a next step 1354, input vector deriver 1308 derives N VQ input vectors u(n) each based on the residual signal d(n) and a corresponding one of the N VQ codevector stored in codebook 1302. Each of the VQ input vectors u(n) corresponds to one of N VQ error vectors q(n). Input vector deriver 1308 and step 1354 are described in further detail below. <br/> <br/> [0174] At a next step 1358, error energy calculator 1310 derives N VQ error energy values e(n) each corresponding to one of the N VQ error vectors q(n) associated with the N VQ input vectors u(n) of step 1354. Error energy calculator 1310 performs a squaring operation, for example, on each of the error vectors q(n) to derive the energy values corresponding to the error vectors. <br/> <br/> [0175] At a next step 1360, preferred codevector selector 1312 selects a preferred one of the N VQ codevectors as a VQ output vector uq(n) corresponding to the residual signal d(n), based on the N VQ error energy values e(n) derived by error energy calculator 1310. <br/> <br/> [0176] Predictor/filter restorer 1314 initializes and restores (that is, resets) the filter states and predictor states of various filters and predictors included in system 1300, during method 1350, as will be further described below. <br/> <br/> <br/> 2. Example Specific Embodiment<br/>
<br/> <br/> a. System<br/>
<br/> [0177] FIG. 13C is a block diagram of a portion of an example codec structure or system 1362 used in a prediction residual VQ codebook search of TSNFC 5000 (discussed above in connection with FIG. 5). System 1362 includes scaled VQ codebook 5028a, and an input vector deriver 1308a (a specific embodiment of input vector deriver 1308) configured according to the embodiment of TSNFC 5000 of FIG 5. Input vector deriver 1308a includes essentially the same feedback structure involved in the quantizer codebook search as in FIG. 7, except the shorthand z-transform notations of filter blocks in FIG. 5 are used. Input vector deriver 1308a includes an outer or first stage NF loop including NF filter 5016, and an inner or second stage NF loop including NF filter 5038, as described above in connection with FIG. 5. Also, all of the filter blocks and adders (combiners) in input vector deriver 1308a operate sample-by-sample in the same manner as described in connection with FIG. 5. <br/> <br/> <br/> b. Methods<br/>
<br/> [0178] The method of operation of codec structure 1362 can be considered to encompass a single method. Alternatively, the method of operation of codec structure 1362 can be considered to include a first method associated with the inner NF loop of codec structure 1362 (mentioned above in connection with FIG. 13C), and a second method associated with the outer NF loop of the codec structure (also mentioned above). The first and second methods associated respectively with the inner and outer NF loops of codec structure 1362 operate concurrently, and in an inter-related manner (that is, together), with one ano |