The present invention relates to an improved technique for digitally encoding a sound signal, in particular but not exclusively a speech signal, in view of transmitting and synthesizing this sound signal.
Demand for efficient digital narrowband and wideband speech coding techniques with a good trade-off between the subjective quality and bit rate is increasing in various application areas such as teleconferencing, multimedia, and wireless communications. Until recently, telephone bandwidth constrained into a range of 200-3400 Hz has mainly been used in speech coding applications. However, wideband speech applications provide increased intelligibility and naturalness in communication compared to the conventional telephone bandwidth. A bandwidth in the range 50-7000 Hz has been found sufficient for delivering a good quality giving an impression of face-to-face communication. For general audio signals, this bandwidth gives an acceptable subjective quality, but is still lower than the quality of FM radio or CD that operate in the ranges of 20-16000 Hz and 20-20000 Hz, respectively.
A speech encoder converts a speech signal into a digital bit stream that is transmitted over a communication channel or stored in a storage medium. The speech signal is digitized, that is, sampled and quantized with usually 16-bits per sample. The speech encoder has the role of representing these digital samples with a smaller number of bits while maintaining a good subjective speech quality. The speech decoder or synthesizer operates on the transmitted or stored bit stream and converts it back to a sound signal.
Code-Excited Linear Prediction (CELP) coding is one of the best prior art techniques for achieving a good compromise between the subjective quality and bit rate. This coding technique constitutes a basis for several speech coding standards both in wireless and wire line applications. In CELP coding, the sampled speech signal is processed in successive blocks of L samples usually called frames, where L is a predetermined number corresponding typically to 10-30 ms. A linear prediction (LP) filter is computed and transmitted every frame. The computation of the LP filter typically needs a lookahead, i.e. a 5-15 ms speech segment from the subsequent frame. The L-sample frame is divided into smaller blocks called subframes. Usually the number of subframes is three or four resulting in 4-10 ms subframes. In each subframe, an excitation signal is usually obtained from two components, the past excitation and the innovative, fixed-codebook excitation. The component formed from the past excitation is often referred to as the adaptive codebook or pitch excitation. The parameters characterizing the excitation signal are coded and transmitted to the decoder, where the reconstructed excitation signal is used as the input of the LP filter.
In wireless systems using Code Division Multiple Access (CDMA) technology, the use of source-controlled variable bit rate (VBR) speech coding significantly improves the capacity of the system. In source-controlled VBR coding, the codec operates at several bit rates, and a rate selection module is used to determine which bit rate is used for encoding each speech frame based on the nature of the speech frame (e.g. voiced, unvoiced, transient, background noise, etc.). The goal is to attain the best speech quality at a given average bit rate, also referred to as average data rate (ADR). The codec can operate with different modes by tuning the rate selection module to attain different ADRs in the different modes of operation where the codec performance is improved at increased ADRs. The mode of operation is imposed by the system depending on channel conditions. This enables the codec with a mechanism of trade-off between speech quality and system capacity. In CDMA systems (e.g. CDMA-one and CDMA2000), typically 4 bit rates are used and they are referred to as full-rate (FR), half-rate (HR), quarter-rate (QR), and eighth-rate (ER). In this system two rate sets are supported referred to as Rate Set I and Rate Set II. In Rate Set II, a variable-rate codec with rate selection mechanism operates at source-coding bit rates of 13.3 (FR), 6.2 (HR), 2.7 (QR), and 1.0 (ER) kbit/s, corresponding to gross bit rates of 14.4, 7.2, 3.6, and 1.8 kbit/s (with some bits added for error detection).
Typically, in VBR coding for CDMA systems, the eighth-rate is used for encoding frames without speech activity (silence or noise-only frames). When the frame is stationary voiced or stationary unvoiced, half-rate or quarter-rate are used depending on the mode of operation. When half-rate is used for the stationary unvoiced frames, a CELP model without the pitch codebook is used. When the half-rate is used in case of stationary voiced frames, signal modification is used to enhance the periodicity and reduce the number of bits for the pitch indices. If the mode of operation imposes a quarter-rate, no waveform matching is usually possible as the number of bits is insufficient and some parametric coding is generally applied. Full-rate is used for onsets, transient frames, and mixed voiced frames (a typical CELP model is usually used). In addition to the source controlled codec operation in CDMA systems, the system can limit the maximum bit rate in some speech frames in order to send in-band signaling information (called dim-and-burst signaling) or during bad channel conditions (such as near the cell boundaries) in order to improve the codec robustness. This is referred to as half-rate max. When the rate selection module chooses the frame to be encoded as a full-rate frame and the system imposes for example HR frame, the speech performance is degraded since the dedicated HR modes are not capable of efficiently encoding onsets and transient signals. Another generic HR coding model is designed to cope with these special cases.
An adaptive multi-rate wideband (AMR-WB) speech codec was adopted by the ITU-T (International Telecommunications Union—Telecommunication Standardization Sector) for several wideband speech telephony and services and by 3GPP (Third Generation Partnership Project) for GSM and W-CDMA third generation wireless systems. AMR-WB codec consists of nine bit rates, namely 6.60, 8.85, 12.65, 14.25, 15.85, 18.25, 19.85, 23.05, and 23.85 kbit/s. Designing an AMR-WB-based source controlled VBR codec for CDMA systems has the advantage of enabling the interoperation between CDMA and other systems using the AMR-WB codec. The AMR-WB bit rate of 12.65 kbit/s is the closest rate that can fit in the 13.3 kbit/s full-rate of Rate Set II. This rate can be used as the common rate between a CDMA wideband VBR codec and AMR-WB to enable the interoperability without the need for transcoding (which degrades the speech quality). Lower rate coding types must be designed specifically for the CDMA VBR wideband solution to enable an efficient operation in the Rate Set II framework. The codec then can operate in few CDMA-specific modes using all rates but it will have a mode that enables interoperability with systems using the AMR-WB codec.
In VBR coding based on CELP, typically all classes, except for the unvoiced and inactive speech classes, use both a pitch (or adaptive) codebook and an innovation (or fixed) codebook to represent the excitation signal. Thus the encoded excitation consists of the pitch delay (or pitch codebook index), the pitch gain, the innovation codebook index, and the innovation codebook gain. Typically, the pitch and innovation gains are jointly quantized, or vector quantized, to reduce the bit rate. If individually quantized, the pitch gain requires 4 bits and the innovation codebook gain requires 5 or 6 bits. However, when jointly quantized, 6 or 7 bits are sufficient (saving 3 bits per 5 ms subframe is equivalent to saving 0.6 kbit/s). In general, the quantization table, or codebook, is trained using all types of speech segments (e.g. voiced, unvoiced, transient, onset, offset, etc.). In the context of VBR coding, the half-rate coding models are usually class-specific. So different half-rate models are designed for different signal classes (voiced, unvoiced, or generic). Thus new quantization tables need to be designed for these class-specific coding models.
The present invention relates to a gain quantization method for implementation in a technique for coding a sampled sound signal processed, during coding, by successive frames of L samples, wherein:
The present invention also relates to a gain quantization device for implementation in a system for coding a sampled sound signal processed, during coding, by successive frames of L samples, wherein:
The present invention is further concerned with a gain quantization device for implementation in a technique for coding a sampled sound signal processed, during coding, by successive frames of L samples, wherein:
The present invention is still further concerned with a gain quantization method for implementation in a technique for coding a sampled sound signal processed, during coding, by successive frames of L samples, wherein each frame is divided into a number of subframes, and each subframe comprises a number N of samples, where N<L. This gain quantization method comprises:
calculating an initial pitch gain based on a period K longer than the subframe;
selecting a portion of a gain quantization codebook in relation to the initial pitch gain;
identifying the selected portion of the gain quantization codebook using at least one bit per successive group of f subframes; and
jointly quantizing pitch and fixed-codebook gains, this joint quantization of the pitch and fixed-codebook gains comprising:
calculating an initial pitch gain based on a period K longer than the subframe comprises using the following relation:
where TOL is an open-loop pitch delay and sw(n) is a signal derived from a perceptually weighted version of the sampled sound signal.
Finally, the present invention relates to a gain quantization device for implementation in a technique for coding a sampled sound signal processed, during coding, by successive frames of L samples, wherein each frame is divided into a number of subframes, and each subframe comprises a number N of samples, where N<L. the gain quantization device comprises:
a calculator of an initial pitch gain based on a period K longer than the subframe;
a selector of a portion of a gain quantization codebook in relation to the initial pitch gain;
an identifier of the selected portion of the gain quantization codebook using at least one bit per successive group of f subframes; and
a joint quantizer for jointly quantizing pitch and fixed-codebook gains, this joint quantizer comprising:
the calculator of the initial pitch gain comprises the following relation used to calculate the initial pitch gain g′p:
where TOL is an open-loop pitch delay and sw(n) is a signal derived from a perceptually weighted version of the sound signal.
The foregoing and other objects, advantages and features of the present invention will become more apparent upon reading of the following non restrictive description of illustrative embodiments thereof, given by way of example only with reference to the accompanying drawings.
In the appended drawings:
Although the non-restrictive illustrative embodiments of the present invention will be described in relation to a speech signal, it should be kept in mind that the present invention can also be applied to other types of sound signals such as, for example, audio signals.
On the transmitter side, a microphone 101 converts speech to an analog speech signal 110 supplied to an analog-to-digital (A/D) converter 102. The function of the A/D converter 102 is to convert the analog speech signal 110 to a digital speech signal 111. A speech encoder 103 codes the digital speech signal 111 to produce a set of signal-coding parameters 112 under a binary form and delivered to an optional channel encoder 104. The optional channel encoder 104 adds redundancy to the binary representation of the signal-coding parameters 112 before transmitting them (see 113) over the communication channel 105.
On the receiver side, a channel decoder 106 utilizes the redundant information in the received bit stream 114 to detect and correct channel errors occurred during the transmission. A speech decoder 107 converts the bit stream 115 received from the channel decoder back to a set of signal-coding parameters for creating a synthesized speech signal 116. The synthesized speech signal 116 reconstructed in the speech decoder 107 is converted back to an analog speech signal 117 in a digital-to-analog (D/A) converter 108. Finally, the analog speech signal 117 is played back through a loudspeaker unit 109.
Overview of the AMR-WB Encoder
This section will give an overview of the AMR-WB encoder operating at a bit rate of 12.65 kbit/s. This AMR-WB encoder will be used as the full-rate encoder in the non-restrictive, illustrative embodiments of the present invention.
The input, sampled sound signal 212, for example a speech signal, is processed or encoded on a block by block basis by the encoder 200 of
The input sampled speech signal 212 is processed into the above mentioned successive blocks of L samples called frames.
Referring to
The down-sampled frame 213 is then supplied to an optional pre-processing unit. In the non-restrictive example of
The down-sampled, pre-processed signal is denoted by sp(n), where n=0, 1, 2, . . . ,L−1, and L is the length of the frame (256 at a sampling frequency of 12.8 kHz). According to a non restrictive example, the signal sp(n) is pre-emphasized using a pre-emphasis filter 203 having the following transfer function:
P(z)=1−μz−1 (1)
where μ is a pre-emphasis factor with a value located between 0 and 1 (a typical value is μ=0.7). The function of the pre-emphasis filter 203 is to enhance the high frequency contents of the input speech signal. The pre-emphasis filter 203 also reduces the dynamic range of the input speech signal, which renders it more suitable for fixed-point implementation. Pre-emphasis also plays an important role in achieving a proper overall perceptual weighting of the quantization error, which contributes to improve the sound quality. This will be explained in more detail herein below.
The output signal of the pre-emphasis filter 203 is denoted s(n). This signal s(n) is used for performing LP analysis in a LP analysis, quantization and interpolation module 204. LP analysis is a technique well known to those of ordinary skill in the art. In the non-restrictive illustrative example of
LP analysis is performed in the LP analysis, quantization and interpolation module 204, which also performs quantization and interpolation of the LP filter coefficients. The LP filter coefficients ai are first transformed into another equivalent domain more suitable for quantization and interpolation purposes. The Line Spectral Pair (LSP) and Immitance Spectral Pair (ISP) domains are two domains in which quantization and interpolation can be efficiently performed. The 16 LP filter coefficients ai can be quantized with a number of bits of the order of 30 to 50 using split or multi-stage quantization, or a combination thereof. The purpose of the interpolation is to enable updating of the LP filter coefficients ai every subframe while transmitting them once every frame, which improves the encoder performance without increasing the bit rate. Quantization and interpolation of the LP filter coefficients is believed to be otherwise well known to those of ordinary skill in the art and, accordingly, will not be further described in the present specification.
The following paragraphs will describe the rest of the coding operations performed on a subframe basis. In the non-restrictive, illustrative example of
In analysis-by-synthesis encoders, the optimum pitch and innovation parameters are searched by minimizing the mean squared error between the input speech and the synthesized speech in a perceptually weighted domain. A perceptually weighted signal, denoted sw(n) in
W(z)=A(z/y1)/(1−y2z−1) where 0<y2<y1≦1
In order to simplify the pitch analysis, an open-loop pitch lag TOL is first estimated in an open-loop pitch search module 206 using the weighted speech signal sw(n). Then the closed-loop pitch analysis, which is performed in a closed-loop pitch search module 207 on a subframe basis, is restricted around the open-loop pitch lag TOL, to thereby significantly reduce the search complexity of the LTP parameters T and gp (pitch lag and pitch gain, respectively). The open-loop pitch analysis is usually performed in module 206 once every 10 ms (two subframes) using techniques well known to those of ordinary skill in the art.
The target vector x for Long Term Prediction (LTP) analysis is first computed. This is usually done by subtracting the zero-input response s0 of weighted synthesis filter W(z)/Â(z) from the weighted speech signal sw(n). This zero-input response s0 is calculated by a zero-input response calculator 208 in response to the quantized interpolation LP filter Â(z) from the LP analysis, quantization and interpolation module 204 and to the initial states of the weighted synthesis filter W(z)/Â(z) stored in memory update module 211 in response to the LP filters A(z) and Â(z), and the excitation vector u. This operation is well known to those of ordinary skill in the art and, accordingly, will not be further described in the present specification.
A N-dimensional impulse response vector h of the weighted synthesis filter W(z)/Â(z) is computed in the impulse response generator 209 using the coefficients of the LP filter A(z) and Â(z) from the LP analysis, quantization and interpolation module 204. Again, this operation is well known to those of ordinary skill in the art and, accordingly, will not be further described in the present specification.
The closed-loop pitch (or pitch codebook) parameters gp, T and j are computed in the closed-loop pitch search module 207, which uses the target vector x(n), the impulse response vector h(n) and the open-loop pitch lag TOL as inputs.
The pitch search consists of finding the best pitch lag T and gain gp that minimize a mean squared weighted pitch prediction error, for example
e(j)=∥x−b(j)y(j)∥2 where j=1, 2, . . . , k
between the target vector x(n) and a scaled filtered version of the past excitation gp yT(n).
More specifically, the pitch codebook (adaptive codebook) search is composed of three stages.
In the first stage, an open-loop pitch lag TOL is estimated in the open-loop pitch search module 206 in response to the weighted speech signal sw(n). As indicated in the foregoing description, this open-loop pitch analysis is usually performed once every 10 ms (two subframes) using techniques well known to those of ordinary skill in the art.
In the second stage, a search criterion C is searched in the closed-loop pitch search module 207 for integer pitch lags around the estimated open-loop pitch lag TOL (usually ±5), which significantly simplifies the pitch codebook search procedure. A simple procedure is used for updating the filtered codevector yT(n) (this vector is defined in the following description) without the need to compute the convolution for every pitch lag. An example of search criterion C is given by:
where t denotes vector transpose
Once an optimum integer pitch lag is found in the second stage, a third stage of the search (closed-loop pitch search module 207) tests, by means of the search criterion C, the fractions around that optimum integer pitch lag. For example, the AMR-WB encoder uses ¼ and ½ subsample resolution.
In wideband signals, the harmonic structure exists only up to a certain frequency, depending on the speech segment. Thus, in order to achieve efficient representation of the pitch contribution in voiced segments of a wideband speech signal, flexibility is needed to vary the amount of periodicity over the wideband spectrum. This is achieved by processing the pitch codevector through a plurality of frequency shaping filters (for example low-pass or band-pass filters), and the frequency shaping filter that minimizes the above defined mean-squared weighted error e(j) is selected. The selected frequency shaping filter is identified by an index j.
The pitch codebook index T is encoded and transmitted to a multiplexer 214 for transmission through a communication channel. The pitch gain gp is quantized and transmitted to the multiplexer 214. An extra bit is used to encode the index j, this extra bit being also supplied to the multiplexer 214.
Once the pitch, or Long Term Prediction (LTP) parameters gp, T, and j are determined, the next step consists of searching for the optimum innovative (fixed codebook) excitation by means of the innovative excitation search module 210 of
x′(n)=x(n)−gpyT(n)
where gp is the pitch gain and yT(n) is the filtered pitch codebook vector (the past excitation at pitch delay T filtered with the selected frequency shaping filter (index j) and convolved with the impulse response h(n)).
The innovative excitation search procedure in CELP is performed in an innovation (fixed) codebook to find the optimum excitation (fixed codebook) codevector ck and gain gc which minimize the mean-squared error E between the target vector x′(n) and a scaled filtered version of the codevector ck, for example:
E=∥x′−gcHck∥2
where H is a lower triangular convolution matrix derived from the impulse response vector h(n). The index k of the innovation codebook corresponding to the found optimum codevector ck and the gain gc are supplied to the multiplexer 214 for transmission through a communication channel.
It should be noted that the used innovation codebook can be a dynamic codebook consisting of an algebraic codebook followed by an adaptive pre-filter F(z) which enhances given spectral components in order to improve the synthesis speech quality, according to U.S. Pat. No. 5,444,816 granted to Adoul et al. on Aug. 22, 1995. More specifically, the innovative codebook search can be performed in module 210 by means of an algebraic codebook as described in U.S. Pat. No. 5,444,816 (Adoul et al.) issued on Aug. 22, 1995; U.S. Pat. No. 5,699,482 granted to Adoul et al., on Dec. 17, 1997; U.S. Pat. No. 5,754,976 granted to Adoul et al., on May 19, 1998; and U.S. Pat. No. 5,701,392 (Adoul et al.) dated Dec. 23, 1997.
The index k of the optimum innovation codevector is transmitted. As a non-limitative example, an algebraic codebook is used where the index consists of the positions and signs of the non-zero-amplitude pulses in the excitation vector. The pitch gain gp and innovation gain gc are finally quantized using a joint quantization procedure that will be described in the following description.
The bit allocation of the AMR-WB encoder operating at 12.65 kbit/s is given in Table 1.
Joint Quantization of Gains
The pitch codebook gain gp and the innovation codebook gain gc can be either scalar or vector quantized.
In scalar quantization, the pitch gain is independently quantized using typically 4 bits (non-uniform quantization in the range 0 to 1.2). The innovation codebook gain is usually quantized using 5 or 6 bits; the sign is quantized with 1 bit and the magnitude with 4 or 5 bits. The magnitude of the gains is usually quantized uniformly in the logarithmic domain.
In joint or vector quantization, a quantization table, or a gain quantization codebook, is designed and stored at both the encoder and decoder ends. This codebook can be a two-dimensional codebook having a size that depends on the number of bits used to quantize the two gains gp and gc. For example, a 7-bit codebook used to quantize the two gains gp and gc contains 128 entries with a dimension of 2. The best entry for a certain subframe is found by minimizing a certain error criterion. For example, the best codebook entry can be searched by minimizing a mean squared error between the input signal and the synthesized signal.
To further exploit the signal correlation, prediction can be performed on the innovation codebook gain gc. Typically, prediction is performed on the scaled innovation codebook energy in the logarithmic domain.
Prediction can be conducted, for example, using moving average (MA) prediction with fixed coefficients. For example, a 4th order MA prediction is performed on the innovation codebook energy as follows. Let E(n) be the mean-removed innovation codebook energy (in dB) at subframe n, and given by:
where N is the size of the subframe, c(i) is the innovation codebook excitation, and Ē is the mean of the innovation codebook energy in dB. In this non-limitative example, N=64 corresponding to 5 ms at the sampling frequency of 12.8 kHz and Ē=30 dB. The innovation codebook predicted energy is given by:
where [b1, b2, b3, b4]=[0.5,0.4,0.3,0.2] are the MA prediction coefficients, and {circumflex over (R)}(n−i) is the quantized energy prediction error at subframe n−i. The innovation codebook predicted energy is used to compute a predicted innovation gain g′c as in Equation (3) by substituting E(n) by {tilde over (E)}(n) and gc by g′c. This is done as follows. First, the mean innovation codebook energy is calculated using the following relation:
and then the predicted innovation gain g′c is found by
g′c=100.05({tilde over (E)}(n)+Ē−E
A correction factor between the gain gc, as computed during processing of the input speech signal 212, and the estimated, predicted gain g′c is given by:
y=gc/g′c. (7)
Note that the energy prediction error is given by:
R(n)=E(n)−{tilde over (E)}(n)=20 log(y) (8)
The pitch gain gp and correction factor y are jointly vector quantized using a 6-bit codebook for AMR-WB rates of 8.85 kbits/s and 6.60 kbit/s, and a 7-bit codebook for the other AMR-WB rates. The search of the gain quantization codebook is performed by minimizing the mean-square of the weighted error between the original and reconstructed speech which is given by the following relation:
E=xtx+gp2yty+gc2ztz−2gpxty−2gcxtz+2gpgcytz, (9)
where x is the target vector, y is the filtered pitch codebook signal (the signal y(n) is usually computed as the convolution between the pitch codebook vector and the impulse response h(n) of the weighted synthesis filter), z is the innovation codebook vector filtered through the weighted synthesis filter, and t denotes “transpose”. The quantized energy prediction error associated with the chosen gains is used to update {circumflex over (R)}(n).
Gain Quantization in Variable Bit Rate Coding
The use of source-controlled VBR speech coding significantly improves the capacity of many communication systems, especially wireless systems using CDMA technology. In source-controlled VBR coding, the codec operates at several bit rates, and a rate selection module is used to determine the bit rate to be used for encoding each speech frame based on the nature of the speech frame, e.g. voiced, unvoiced, transient, background noise, etc. The goal is to obtain the best speech quality at a given average bit rate. The codec can operate at different modes by tuning the rate selection module to attain different Average Data Rates (ADRs), where the codec performance improves with increasing ADRs. In some communication systems, the mode of operation can be imposed by the system depending on channel conditions. This provides the codec with a mechanism of trade-off between speech quality and system capacity. The codec then comprises a signal classification algorithm to analyze the input speech signal and classify each speech frame into one of a set of predetermined classes, for example background noise, voiced, unvoiced, mixed voiced, transient, etc. The codec also comprises a rate selection algorithm to decide what bit rate and what coding model is to be used based on the determined class of the speech frame and desired average bit rate.
As an example, when a CDMA2000 system is used (this system will be referred to as CDMA system), typically 4 bit rates are used and they are referred to as full-rate (FR), half-rate (HR), quarter-rate (QR), and eighth-rate (ER). Also, two rate sets referred to as Rate Set I and Rate Set II are supported by the CDMA system. In Rate Set II, a variable-rate codec with rate selection mechanism operates at source-coding bit rates of 13.3 (FR), 6.2 (HR), 2.7 (QR), and 1.0 (ER) kbit/s. In Rate Set I, the source-coding bit rates are 8.55 (FR), 4.0 (HR), 2.0 (QR), and 0.8 (ER) kbit/s. Rate Set II will be considered in the non-restrictive illustrative embodiments of the present invention.
In multi-mode VBR coding, different operating modes corresponding to different average bit rates can be obtained by defining the percentage of usage of individual bit rates. Thus, the rate selection algorithm decides the bit rate to be used for a certain speech frame based on the nature of the speech frame (classification information) and the required average bit rate.
In addition to imposing the operating mode, the CDMA system can also limit the maximum bit rate in some speech frames in order to send in-band signaling information (called dim-and-burst signaling) or during bad channel conditions (such as near the cell boundaries) in order to improve the codec robustness.
In the non-restrictive illustrative embodiments of the present invention, a source controlled multi-mode variable bit rate coding system that can operate in Rate Set II of CDMA2000 systems is used. It will be referred to in the following description as the VMR-WB (Variable Multi-Rate Wide-Band) codec. The latter codec is based on the adaptive multi-rate wideband (AMR-WB) speech codec as described in the foregoing description. The full rate (FR) coding is based on the AMR-WB at 12.65 kbit/s. For stationary voiced frames, a Voiced HR coding model is designed. For unvoiced frames, an Unvoiced HR and Unvoiced QR coding models are designed. For background noise frames (inactive speech), an ER comfort noise generator (CNG) is designed. When the rate selection algorithm chooses the FR model for a specific frame, but the communications system imposes the use of HR for signaling purposes, then neither Voiced HR nor Unvoiced HR are suitable for encoding the frame. For this purpose, a Generic HR model was designed. The Generic HR model can be also used for encoding frames not classified as voiced or unvoiced, but with a relatively low energy with respect to the long-term average energy, as those frames have low perceptual importance.
The coding methods for the above system are summarized in Table 2 and will be generally referred to as coding types. Other coding types can be used without loss of generality.
The gain quantization codebook for the FR coding type is designed for all classes of signal, e.g. voiced, unvoiced, transient, onset, offset, etc., using training procedures well known to those of ordinary skill in the art. In the context of VBR coding, the Voiced and Generic HR coding types use both a pitch codebook and an innovation codebook to form the excitation signal. Thus similar to the FR coding type, the pitch and innovation gains (pitch codebook gain and innovation codebook gain) need to be quantized. At lower bit rates, however, it is advantageous to reduce the number of quantization bits that necessitate the design of new codebooks. Furthermore, for Voiced HR, a new quantization codebook is required for this class-specific coding type. Therefore, the non-restrictive illustrative embodiments of the present invention provides gain quantization in VBR CELP-based coding, capable of reducing the number of bits for gain quantization without the need to design new quantization codebooks for lower rate coding types. More specifically, a portion of the codebook designed for the Generic FR coding type are used. The gain quantization codebook is ordered based on the pitch gain values. The portion of the codebook used in the quantization is determined on the basis of an initial pitch gain value computed over a longer period, for example over two subframes or more, or in a pitch-synchronous manner over one pitch period or more. This will result in a reduction of the bit rate since the information regarding the portion of the codebook is not sent on a subframe basis. Furthermore, this will result in a quality improvement in case of stationary voiced frames since the gain variation within the frame will be reduced.
The unquantized pitch gain in a subframe is computed as
where x(n) is the target signal, y(n) is the filtered pitch codebook vector, and N is the size of the subframe (number of samples in the subframe). The signal y(n) is usually computed as the convolution between the pitch codebook vector and the impulse response h(n) of the weighted synthesis filter. The computation of the target vector and filtered pitch codebook vector in CELP-based coding is well know to those of ordinary skill in the art. An example of this computation is described in the references [ITU-T Recommendation G.722.2 “Wideband coding of speech at around 16 kbit/s using Adaptive Multi-Rate Wideband (AMR-WB)”, Geneva, 2002] and [3GPP TS 26.190, “AMR Wideband Speech Codec; Transcoding Functions,” 3GPP Technical Specification]. In order to reduce the possibility of instability in case of channel errors, the computed pitch gain is limited to the range between 0 and 1.2.
In a first non-restrictive illustrative embodiment, while coding the first subframe of a four-subframe frame, an initial pitch gain gi is computed based on the first two subframes of the same frame using Equation (10), but for a length of 2N (two subframes). In this case, Equation (10) becomes:
Then, computation of the target signal x(n) and the filtered pitch codebook signal y(n) is also performed over a period of two subframes, for example the first and second subframes of the frame. Computing the target signal x(n) over a period longer than one subframe is performed by extending the computation of the weighted speech signal sw(n) and the zero input response s0 over a longer period while using the same LP filter as in the initial subframe of the two first subframes for all the extended period; the target signal x(n) is computed as the weighted speech signal sw(n) after subtracting the zero-input response s0 of the weighted synthesis filter W(z)/Â(z). Similarly, computation of the weighted pitch codebook signal y(n) is performed by extending the computation of the pitch codebook vector v(n) and the impulse response h(n) of the weighted synthesis filter W(z)/Â(z) of the first subframe over a period longer than the subframe length; the weighted pitch codebook signal is the convolution between the pitch codebook vector v(n) and the impulse response h(n), where the convolution in this case is computed over the longer period.
Having computed the initial pitch gain gi over two subframes, then during HR (half-rate) coding of the first two subframes, the joint quantization of the pitch gp and innovation gc gains is restricted to a portion of the codebook used for quantizing the gains at full rate (FR), whereby that portion is determined by the value of the initial pitch gain computed over two subframes. In the first non-restrictive illustrative embodiment, in FR (full-rate) coding type, the gains gp and gc are jointly quantized using 7 bits according to the quantization procedure described earlier; MA prediction is applied to the innovative excitation energy in the logarithmic domain to obtain a predicted innovation codebook gain and the correction factor y is quantized. The content of the quantization table used in the FR (full-rate) coding type are shown in Table 3 (as used in AMR-WB [ITU-T Recommendation G.722.2 “Wideband coding of speech at around 16 kbit/s using Adaptive Multi-Rate Wideband (AMR-WB)”, Geneva, 2002] [3GPP TS 26.190, “AMR Wideband Speech Codec; Transcoding Functions,” 3GPP Technical Specification]). In the first illustrative embodiment, the quantization of the gains gp and gc of the two subframes is performed by restricting the search of Table 3 (quantization table or codebook) to either the first or the second half of this quantization table according to the initial pitch gain value gi computed over two subframes. If the initial pitch gain value gi is less than 0.768606 then the quantization in the first two subframes is restricted to the first half of Table 3 (quantization table or codebook). Otherwise, the quantization is restricted to the second half of Table 3. The pitch value of 0.768606 corresponds to a quantized pitch gain value gp at the beginning of the second half of the quantization table (the top of the fifth column in Table 3). One bit is needed once every two subframes to indicate which portion of the quantization table or codebook is used for the quantization.
It should be noted that for the third and fourth subframes, a similar gain quantization procedure is performed. Namely, an initial gain gi is computed over the third and fourth subframes, then the portion of the gain quantization Table 3 (gain quantization codebook) to be used in the quantization procedure is determined on the basis of the value of this initial pitch gain gi. Finally, the joint quantization of the two gains gp and gc is restricted to the determined codebook portion and one (1) bit is transmitted to indicate which portion is used; one (1) bit is required to indicate the table or codebook portion when each codebook portion corresponds to half the gain quantization codebook.
Step 301 of
Step 302 consists of finding, for example in a 7-bit joint gain quantization codebook, an initial index associated to the pitch gain closest to the initial pitch gain gi. Step 302 is conducted by searching unit 402.
Step 303 consists of selecting the portion (for example half) of the quantization codebook containing the initial index determined during step 302 and identify the selected codebook portion (for example half) using at least one (1) bit per two subframes. Step 303 is performed by selector 403 and identifier 404.
Step 304 consists of restricting the table or codebook search in the two subframes to the selected codebook portion (for example half) and expressing the selected index with, for example, 6 bits per subframe. Step 304 is performed by the searcher 405 and the quantizer 406.
In the above-described first illustrative embodiment, 7 bits per subframe are used in FR (full-rate) coding to quantize the gains gp and gc resulting in 28 bits per frame. In HR (half-rate) voiced and generic coding, the same quantization codebook as FR (full-rate) coding is used. However, only 6 bits per subframe are used, and extra 2 bits are needed for the whole frame to indicate, in the case of a half portion, the codebook portion in the quantization every two subframes. This gives a total of 26 bits per subframe without memory increase, and with improved quality compared to designing a new 6 bit codebook as was found by experiments. In fact, experiments showed objective results (e.g. Segmental signal-to-noise ratio (Seg-SNR), average bit rate, . . . ) equivalent to or better than the results obtained using the original 7-bit quantizer. This better performance seems to be attributed to the reduction in gain variation within the frame. Table 4 shows the bit allocation of the different coding modes according to the first illustrative embodiment.
Another variation of the first illustrative embodiment can be easily derived for attaining more saving in the number of bits. For instance, the initial pitch gain can be computed over the whole frame, and the codebook portion (for example codebook half) used in the quantization of the two gains gp and gc can be determined for all the subframes based on the initial pitch gain value gi. In this case only 1 bit per frame is needed to indicate the codebook portion (for example codebook half) resulting in a total of 25 bits.
According to another example, the gain quantization codebook, which is sorted based on the pitch gain, is divided into 4 portions and the initial pitch gain value gi is used to determine the portion of the codebook to be used for quantization process. For the 7-bit codebook example given in Table 3, the codebook is divided into 4 portions of 32 entries corresponding to the following pitch gain ranges: less than 0.445842, from 0.445842 to less than 0.768606, from 0.768606 to less than 0.962625, and more than or equal to 0.962625. Only 5 bits are needed to transmit the quantization index in each portion every subframe, then 2 bits are needed every 2 subframes to indicate the portion of the codebook being used. This gives a total of 24 bits. Further, the same codebook portion can be used for all four subframes which will need only 2 bits overhead per frame, resulting in a total of 22 bits.
Also, a decoder (not shown) according to the first illustrative embodiment comprises, for example, a 7-bit codebook used to store the quantized gain vectors. Every two subframes, the decoder receives one (1) bit (in the case of a codebook half) to identify the codebook portion that was used for encoding the gains gp and gc, and 6-bits per subframe to extract the quantized gains from that codebook portion.
The second illustrative embodiment is similar to the first one explained herein above in connection with
where TOL is the open loop pitch delay and K is the time period over which the initial pitch gain gi is computed. The time period can be 2 or 4 subframes as described above, or can be multiple of the open-loop pitch period TOL. For example, K can be set equal to TOL, 2TOL, 3TOL, and so on according to the value of TOL: a larger number of pitch cycles can be used for short pitch periods. Other signals can be used in Equation (12) without loss of generality, such as the residual signal produced in CELP-based coding processes.
In a third non-restrictive illustrative embodiment of the present invention, the idea of restricting the portion of the gain quantization codebook searched according to an initial pitch gain value gi computed over a longer time period, as explained above, is used. However, the aim of using this approach is not to reduce the bit rate but to improve the quality. Thus there is no need to reduce the number of bits per subframe and send overhead information regarding the codebook portion used, since the index is always quantized for the whole codebook size (7 bits according to the example of Table 3). This will give no restriction on the portion of the codebook used for the search. Confining the search to a portion of the codebook according to an initial pitch gain value gi computed over a longer time period reduces the fluctuation in the quantized gain values and improves the overall quality, resulting in a smoother waveform evolution.
According to a non-limitative example, the quantization codebook in Table 3 is used in each subframe. The initial pitch gain gi can be computed as in Equation (12) or Equation (11), or any other suitable method. When Equation (12) is used, examples of values of K (multiple of the open-loop pitch period) are the following: for pitch values TOL<50, K is set to 3TOL; for pitch values 51<TOL<96, K is set to 2TOL; otherwise K is set to TOL.
After having computed the initial pitch gain gi, the search of the vector quantization codebook is confined to the range Iinit−p to Iinit+p, where Iinit is the index of the vector of the gain quantization codebook whose pitch gain value is closest to the initial pitch gain gi. A typical value of p is 15 with the limitations Iinit−p≧0 and Iinit+p<128. Once the gain quantization index is found, it is encoded using 7 bits as in ordinary gain quantization.
Of course, many other modifications and variations are possible to the disclosed invention. In view of the above detailed description of the present invention and associated drawings, such other modifications and variations will now become apparent to those skilled in the art. It should also be apparent that such other variations may be effected within the scope of the claims without departing from the spirit and scope of the present invention.
This application is a continuation of International Patent Application No. PCT/CA2004/000380 filed Mar. 12, 2004.
Number | Name | Date | Kind |
---|---|---|---|
6260010 | Gao et al. | Jul 2001 | B1 |
6397178 | Benyassine | May 2002 | B1 |
7315815 | Gersho et al. | Jan 2008 | B1 |
Number | Date | Country |
---|---|---|
09-120299 | May 1997 | JP |
2002-328700 | Nov 2002 | JP |
2003-295879 | Oct 2003 | JP |
WO 0137264 | May 2001 | WO |
WO-03058407 | Jul 2003 | WO |
Number | Date | Country | |
---|---|---|---|
20050251387 A1 | Nov 2005 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CA2004/000380 | Mar 2004 | US |
Child | 11039538 | US |