Patent Description:
In a system for encoding a sound such as speech or audio, a linear predictive coding (LPC) coefficient is used to represent a short-term frequency characteristic of the sound. The LPC coefficient is obtained in a form of dividing an input sound in frame units and minimizing energy of a prediction error for each frame. However, the LPC coefficient has a large dynamic range, and a characteristic of a used LPC filter is very sensitive to a quantization error of the LPC coefficient, and thus stability of the filter is not guaranteed.

Therefore, an LPC coefficient is quantized by converting the LPC coefficient into another coefficient in which stability of the filter is easily confirmed, interpolation is advantageous, and a quantization characteristic is good. It is mostly preferred that an LPC coefficient is quantized by converting the LPC coefficient into a line spectral frequency (LSF) or an immittance spectral frequency (ISF). Particularly, a scheme of quantizing an LSF coefficient may use a high inter-frame correlation of the LSF coefficient in a frequency domain and a time domain, thereby increasing a quantization gain.

An LSF coefficient exhibits a frequency characteristic of a short-term sound, and in a case of frame in which a frequency characteristic of an input sound sharply varies, an LSF coefficient of a corresponding frame also sharply varies. However, a quantizer including an inter-frame predictor using a high inter-frame correlation of an LSF coefficient cannot perform proper prediction for a sharply varying frame, and thus, quantization performance decreases.

Therefore, it is necessary to select an optimized quantizer in correspondence with a signal characteristic of each frame of an input sound.

From <CIT>, a quantization method is known that includes quantizing an input signal by selecting one of a first quantization scheme not using an inter-frame prediction and a second quantization scheme using the inter-frame prediction, in consideration of one or more of a prediction mode, a predictive error, and a transmission channel state.

One or more exemplary embodiments include an apparatus for efficiently quantizing a linear predictive coding (LPC) coefficient with low complexity and a method and apparatus for inverse quantization.

According to one or more exemplary embodiments, a quantization apparatus is provided according to claim <NUM>.

The quantization apparatus may include additionally advantageous features according to any of claims <NUM>-<NUM>.

According to an exemplary embodiment, when a speech or audio signal is quantized by classifying the speech or audio signal into a plurality of coding modes according to a signal characteristic of speech or audio and allocating a various number of bits according to a compression ratio applied to each coding mode, the speech or audio signal may be more efficiently quantized by designing a quantizer having good performance at a low bit rate.

In addition, a used amount of a memory may be minimized by sharing a codebook of some quantizers when a quantization device for providing various bit rates is designed.

These and/or other aspects will become apparent and more readily appreciated from the following description of the exemplary embodiments, taken in conjunction with the accompanying drawings in which:.

The inventive concept may allow various kinds of change or modification and various changes in form, and specific embodiments will be illustrated in drawings and described in detail in the specification. In the description of the inventive concept, when it is determined that a specific description of relevant well-known features may obscure the essentials of the inventive concept, a detailed description thereof is omitted.

Although terms, such as 'first' and 'second', can be used to describe various elements, the elements cannot be limited by the terms. The terms can be used to classify a certain element from another element.

The terminology used in the application is used only to describe specific embodiments and does not have any intention to limit the inventive concept. The terms used in this specification are those general terms currently widely used in the art, but the terms may vary according to the intention of those of ordinary skill in the art, precedents, or new technology in the art. Also, specified terms may be selected by the applicant, and in this case, the detailed meaning thereof will be described in the detailed description. Thus, the terms used in the specification should be understood not as simple names but based on the meaning of the terms and the overall description.

An expression in the singular includes an expression in the plural unless they are clearly different from each other in context. In the application, it should be understood that terms, such as 'include' and 'have', are used to indicate the existence of an implemented feature, number, step, operation, element, part, or a combination thereof without excluding in advance the possibility of the existence or addition of one or more other features, numbers, steps, operations, elements, parts, or combinations thereof.

Hereinafter, embodiments of the inventive concept will be described in detail with reference to the accompanying drawings, and like reference numerals in the drawings denote like elements, and thus their repetitive description will be omitted.

In general, a trellis coded quantizer (TCQ) quantizes an input vector by allocating one element to each TCQ stage, whereas a trellis coded vector quantizer (TCVQ) uses a structure of generating sub-vectors by dividing an entire input vector into sub-vectors and then allocating each sub-vector to a TCQ stage. When a quantizer is formed using one element, a TCQ is formed, and when a quantizer is formed using a sub-vector by combining a plurality of elements, a TCVQ is formed. Therefore, when a two-dimensional (2D) sub-vector is used, a total number of TCQ stages are the same size as obtained by dividing a size of an input vector by <NUM>. Commonly, a speech/audio codec encodes an input signal in a frame unit, and a line spectral frequency (LSF) coefficient is extracted for each frame. An LSF coefficient has a vector form, and a dimension of <NUM> or <NUM> is used for the LSF coefficient. In this case, when considering a 2D TCVQ, the number of sub-vectors is <NUM> or <NUM>.

<FIG> is a block diagram of a sound coding apparatus according to an illustrative example.

A sound coding apparatus <NUM> shown in <FIG> may include a coding mode selection unit <NUM>, a linear predictive coding (LPC) coefficient quantization unit <NUM>, and a CELP coding unit <NUM>. Each component may be implemented as at least one processor (not shown) by being integrated into at least one module. In an embodiment, since a sound may indicate audio or speech, or a mixed signal of audio and speech, hereinafter, a sound is referred to as a speech for convenience of description.

Referring to <FIG>, the coding mode selection unit <NUM> may select one of a plurality of coding modes in correspondence with multiple rates. The coding mode selection unit <NUM> may determine a coding mode of a current frame by using a signal characteristic, voice activity detection (VAD) information, or a coding mode of a previous frame.

The LPC coefficient quantization unit <NUM> may quantize an LPC coefficient by using a quantizer corresponding to the selected coding mode and determine a quantization index representing the quantized LPC coefficient. The LPC coefficient quantization unit <NUM> may perform quantization by converting the LPC coefficient into another coefficient suitable for the quantization.

The excitation signal coding unit <NUM> may perform excitation signal coding according to the selected coding mode. For the excitation signal coding, a code-excited linear prediction (CELP) or algebraic CELP (ACELP) algorithm may be used. Representative parameters for encoding an LPC coefficient by a CELP scheme are an adaptive codebook index, an adaptive codebook gain, a fixed codebook index, a fixed codebook gain, and the like. The excitation signal coding may be carried out based on a coding mode corresponding to a characteristic of an input signal. For example, four coding modes, i.e., an unvoiced coding (UC) mode, a voiced coding (VC) mode, a generic coding (GC) mode, and a transition coding (TC) mode, may be used. The UC mode may be selected when a speech signal is an unvoiced sound or noise having a characteristic that is similar to that of the unvoiced sound. The VC mode may be selected when a speech signal is a voiced sound. The TC mode may be used when a signal of a transition period in which a characteristic of a speech signal sharply varies is encoded. The GC mode may be used to encode the other signals. The UC mode, the VC mode, the TC mode, and the GC mode follow the definition and classification criterion drafted in ITU-T G. <NUM> but is not limited thereto. The excitation signal coding unit <NUM> may include an open-loop pitch search unit (not shown), a fixed codebook search unit (not shown), or a gain quantization unit (not shown), but components may be added to or omitted from the excitation signal coding unit <NUM> according to a coding mode. For example, in the VC mode, all the components described above are included, and in the UC mode, the open-loop pitch search unit is not used. The excitation signal coding unit <NUM> may be simplified in the GC mode and the VC mode when the number of bits allocated to quantization is large, i.e., in the case of a high bit rate. That is, by including the UC mode and the TC mode in the GC mode, the GC mode may be used for the UC mode and the TC mode. In the case of a high bit rate, an inactive coding (IC) mode and an audio coding (AC) mode may be further included. The excitation signal coding unit <NUM> may classify a coding mode into the GC mode, the UC mode, the VC mode, and the TC mode when the number of bits allocated to quantization is small, i.e., in the case of a low bit rate. In the case of a low bit rate, the IC mode and the AC mode may be further included. The IC mode may be selected for mute, and the AC mode may be selected when a characteristic of a speech signal is close to audio.

The coding mode may be further subdivided according to a bandwidth of a speech signal. The bandwidth of a speech signal may be classified into, for example, a narrowband (NB), a wideband (WB), a super wideband (SWB), and a full band (FB). The NB may have a bandwidth of <NUM>-<NUM> or <NUM>-<NUM>, the WB may have a bandwidth of <NUM>-<NUM> or <NUM>-<NUM>, the SWB may have a bandwidth of <NUM>-<NUM> or <NUM>-<NUM>, and the FB may have a bandwidth up to <NUM>. Herein, the numeric values related to the bandwidths are set for convenience and are not limited thereto. In addition, the classification of the bandwidth may also be set to be simpler or more complex.

When the types and number of coding modes are determined, it is necessary that a codebook is trained again using a speech signal corresponding to a determined coding mode.

The excitation signal coding unit <NUM> may additionally use a transform coding algorithm according to a coding mode. An excitation signal may be encoded in a frame or subframe unit.

<FIG> is a block diagram of a sound coding apparatus according to another illustrative example.

A sound coding apparatus <NUM> shown in <FIG> may include a pre-processing unit <NUM>, an LP analysis unit <NUM>, a weighted-signal calculation unit <NUM>, an open-loop pitch search unit <NUM>, a signal analysis and voice activity detection (VAD) unit <NUM>, an encoding unit <NUM>, a memory update unit <NUM>, and a parameter coding unit <NUM>. Each component may be implemented as at least one processor (not shown) by being integrated into at least one module. In the embodiment, since a sound may indicate audio or speech, or a mixed signal of audio and speech, hereinafter, a sound is referred to as a voice for convenience of description.

Referring to <FIG>, the pre-processing unit <NUM> may pre-process an input speech signal. Through pre-processing processing, a undesired frequency component may be removed from the speech signal, or a frequency characteristic of the speech signal may be regulated so as to be advantageous in encoding. In detail, the pre-processing unit <NUM> may perform high-pass filtering, pre-emphasis, sampling conversion, or the like.

The LP analysis unit <NUM> may extract an LPC coefficient by performing an LP analysis on the pre-processed speech signal. In general, one LP analysis per frame is performed, but two or more LP analyses per frame may be performed for additional sound quality enhancement. In this case, one analysis is an LP for a frame-end, which is an existing LP analysis, and the other analyses may be LPs for a mid-subframe to enhance sound quality. Herein, a frame-end of a current frame indicates the last subframe among subframes constituting the current frame, and a frame-end of a previous frame indicates the last subframe among subframes constituting the previous frame. The mid-subframe indicates one or more subframes among subframes existing between the last subframe which is the frame-end of the previous frame and the last subframe which is the frame-end of the current frame. For example, one frame may consist of four subframes. A dimension of <NUM> is used for an LPC coefficient when an input signal is an NB, and a dimension of <NUM>-<NUM> is used for an LPC coefficient when an input signal is a WB, but the embodiment is not limited thereto.

The weighted-signal calculation unit <NUM> may receive the pre-processed speech signal and the extracted LPC coefficient and calculate a perceptual weighting filtered signal based on a perceptual weighting filter. The perceptual weighting filter may reduce quantization noise of the pre-processed speech signal within a masking range in order to use a masking effect of a human auditory structure.

The open-loop pitch search unit <NUM> may search an open-loop pitch by using the perceptual weighting filtered signal.

The signal analysis and VAD unit <NUM> may determine whether the input signal is an active speech signal by analyzing various characteristics including the frequency characteristic of the input signal.

The encoding unit <NUM> may determine a coding mode of the current frame by using a signal characteristic, VAD information or a coding mode of the previous frame, quantize an LPC coefficient by using a quantizer corresponding to the selected coding mode, and encode an excitation signal according to the selected coding mode. The encoding unit <NUM> may include the components shown in <FIG>.

The memory update unit <NUM> may store the encoded current frame and parameters used during encoding for encoding of a subsequent frame.

The parameter coding unit <NUM> may encode parameters to be used for decoding at a decoding end and include the encoded parameters in a bitstream. Preferably, parameters corresponding to a coding mode may be encoded. The bitstream generated by the parameter coding unit <NUM> may be used for the purpose of storage or transmission.

Table <NUM> below shows an example of a quantization scheme and structure for four coding modes. A scheme of performing quantization without an inter-frame prediction can be named a safety-net scheme, and a scheme of performing quantization with an inter-frame prediction can be named a predictive scheme. In addition, a VQ stands for a vector quantizer, and a BC-TCQ stands for a block-constrained trellis coded quantizer.

A BC-TCVQ stands for a block-constrained trellis coded vector quantizer. A TCVQ allows a vector codebook and a branch label by generalizing a TCQ. Main features of the TCVQ are to partition VQ symbols of an expanded set into subsets and to label trellis branches with these subsets. The TCVQ is based on a rate <NUM>/<NUM> convolution code, which has N=<NUM>ν trellis states, and has two branches entering and leaving each trellis state. When M source vectors are given, a minimum distortion path is searched for using a Viterbi algorithm. As a result, a best trellis path may begin in any of N initial states and end in any of N terminal states. A codebook in the TCVQ has <NUM>(R+R')L vector codewords. Herein, since the codebook has <NUM>R'L times as many codewords as a nominal rate R VQ, R' may be a codebook expansion factor. An encoding operation is simply described as follows. First, for each input vector, distortion corresponding to the closest codeword in each subset is searched for, and a minimum distortion path through a trellis is searched for using the Viterbi algorithm by putting, as searched distortion, a branch metric for a branch labeled to a subset S. Since the BC-TCVQ requires one bit for each source sample to designate a trellis path, the BC-TCVQ has low complexity. A BC-TCVQ structure may have <NUM>k initial trellis states and <NUM>ν-k terminal states for each allowed initial trellis state when <NUM>≤k≤ν. Single Viterbi encoding starts from an allowed initial trellis state and ends at a vector stage m-k. To specify an initial state, k bits are required, and to designate a path to the vector stage m-k, m-k bits are required. The unique terminating path depending on an initial trellis state is pre-specified for each trellis state at the vector stage m-k through a vector stage m. Regardless of a value of k, m bits are required to specify an initial trellis state and a path through a trellis.

A BC-TCVQ for the VC mode at an internal sampling frequency of <NUM> may use <NUM>-state and <NUM>-stage TCVQ having a 2D vector. LSF sub-vectors having two elements may be allocated to each stage. Table <NUM> below shows initial states and terminal states for a <NUM>-state BC-TCVQ. Herein, k and v denotes <NUM> and <NUM>, respectively, and four bits for an initial state and a terminal state are used.

A coding mode may vary according to an applied bit rate. As described above, to quantize an LPC coefficient at a high bit rate using two coding modes, <NUM> or <NUM> bits for each frame may be used in the GC mode, and <NUM> bits for each frame may be used in the TC mode.

<FIG> is a block diagram of an LPC coefficient quantization unit according to an illustrative example.

An LPC coefficient quantization unit <NUM> shown in <FIG> may include a first coefficient conversion unit <NUM>, a weighting function determination unit <NUM>, an ISF/LSF quantization unit <NUM>, and a second coefficient conversion unit <NUM>. Each component may be implemented as at least one processor (not shown) by being integrated into at least one module. A un-quantized LPC coefficient and coding mode information may be provided as inputs to the LPC coefficient quantization unit <NUM>.

Referring to <FIG>, the first coefficient conversion unit <NUM> may convert an LPC coefficient extracted by LP-analyzing a frame-end of a current frame or a previous frame of a speech signal into a coefficient of a different form. For example, the first coefficient conversion unit <NUM> may convert the LPC coefficient of the frame-end of the current frame or the previous frame into any one form of an LSF coefficient and an ISF coefficient. In this case, the ISF coefficient or the LSF coefficient indicates an example of a form in which the LPC coefficient can be more easily quantized.

The weighting function determination unit <NUM> may determine a weighting function for the ISF/LSF quantization unit <NUM> by using the ISF coefficient or the LSF coefficient converted from the LPC coefficient. The determined weighting function may be used in an operation of selecting a quantization path or a quantization scheme or searching for a codebook index with which a weighted error is minimized in quantization. For example, the weighting function determination unit <NUM> may determine a final weighting function by combining a magnitude weighting function, a frequency weighting function and a weighting function based on a position of the ISF/LSF coefficient.

In addition, the weighting function determination unit <NUM> may determine a weighting function by taking into account at least one of a frequency bandwidth, a coding mode, and spectrum analysis information. For example, the weighting function determination unit <NUM> may derive an optimal weighting function for each coding mode. Alternatively, the weighting function determination unit <NUM> may derive an optimal weighting function according to a frequency bandwidth of a speech signal. Alternatively, the weighting function determination unit <NUM> may derive an optimal weighting function according to frequency analysis information of a speech signal. In this case, the frequency analysis information may include spectral tilt information. The weighting function determination unit <NUM> is described in detail below.

The ISF/LSF quantization unit <NUM> may obtain an optimal quantization index according to an input coding mode. In detail, the ISF/LSF quantization unit <NUM> may quantize the ISF coefficient or the LSF coefficient converted from the LPC coefficient of the frame-end of the current frame. When an input signal is the UC mode or the TC mode corresponding to a non-stationary signal, the ISF/LSF quantization unit <NUM> may quantize the input signal by only using the safety-net scheme without an inter-frame prediction, and when an input signal is the VC mode or the GC mode corresponding to a stationary signal, the ISF/LSF quantization unit <NUM> may determine an optimal quantization scheme in consideration of a frame error by switching the predictive scheme and the safety-net scheme.

The ISF/LSF quantization unit <NUM> may quantize the ISF coefficient or the LSF coefficient by using the weighting function determined by the weighting function determination unit <NUM>. The ISF/LSF quantization unit <NUM> may quantize the ISF coefficient or the LSF coefficient by using the weighting function determined by the weighting function determination unit <NUM> to select one of a plurality of quantization paths. An index obtained as a result of the quantization may be used to obtain the quantized ISF (QISF) coefficient or the quantized LSF (QLSF) coefficient through an inverse quantization operation.

The second coefficient conversion unit <NUM> may convert the QISF coefficient or the QLSF coefficient into a quantized LPC (QLPC) coefficient.

Hereinafter, a relationship between vector quantization of LPC coefficients and a weighting function is described.

The vector quantization indicates an operation of selecting a codebook index having the least error by using a squared error distance measure based on the consideration that all entries in a vector have the same importance. However, for the LPC coefficients, since all the coefficients have different importance, when errors of important coefficients are reduced, perceptual quality of a finally synthesized signal may be improved. Therefore, when the LSF coefficients are quantized, a decoding apparatus may select an optimal codebook index by applying a weighting function representing the importance of each LPC coefficient to a squared error distance measure, thereby improving the performance of a synthesized signal.

According to an illustrative example, a magnitude weighting function about what is actually affected to a spectral envelope by each ISF or LSF may be determined using frequency information of the ISF and the LSF and an actual spectral magnitude. According to an illustrative example, additional quantization efficiency may be obtained by combining a frequency weighting function in which a perceptual characteristic of a frequency domain and a formant distribution are considered and the magnitude weighting function. In this case, since an actual magnitude in the frequency domain is used, envelope information of whole frequencies may be well reflected, and a weight of each ISF or LSF coefficient may be accurately derived. According to an illustrative example, additional quantization efficiency may be obtained by combining a weighting function based on position information of LSF coefficients or ISF coefficients with the magnitude weighting function and the frequency weighting function.

According to an illustrative example, when an ISF or an LSF converted from an LPC coefficient is vector-quantized, if the importance of each coefficient is different, a weighting function indicating which entry is relatively more important in a vector may be determined. In addition, by determining a weighting function capable of assigning a higher weight to a higher-energy portion by analyzing a spectrum of a frame to be encoded, accuracy of the encoding may be improved. High energy in a spectrum indicates a high correlation in a time domain.

In Table <NUM>, an optimal quantization index for a VQ applied to all modes may be determined as an index for minimizing Ewerr(p) of Equation <NUM>.

In Equation <NUM>, w(i) denotes a weighting function, r(i) denotes an input of a quantizer, and c(i) denotes an output of the quantizer and is to obtain an index for minimizing weighted distortion between two values.

Next, a distortion measure used by a BC-TCQ basically follows a method disclosed in US <NUM>, <NUM>, <NUM>. In this case, a distortion measure d(x, y) may be represented by Equation <NUM>.

According to an illustrative example, a weighting function may be applied to the distortion measure d(x, y). Weighted distortion may be obtained by extending a distortion measure used for a BC-TCQ in <CIT> to a measure for a vector and then applying a weighting function to the extended measure. That is, an optimal index may be determined by obtaining weighted distortion as represented in Equation <NUM> below at all stages of a BC-TCVQ.

The ISF/LSF quantization unit <NUM> may perform quantization according to an input coding mode, for example, by switching a lattice vector quantizer (LVQ) and a BC-TCVQ. If a coding mode is the GC mode, the LVQ may be used, and if the coding mode is the VC mode, the BC-TCVQ may be used. An operation of selecting a quantizer when the LVQ and the BC-TCVQ are mixed is described as follows. First, bit rates for encoding may be selected. After selecting the bit rates for encoding, bits for an LPC quantizer corresponding to each bit rate may be determined. Thereafter, a bandwidth of an input signal may be determined. A quantization scheme may vary according to whether the input signal is an NB or a WB. In addition, when the input signal is a WB, it is necessary that it is additionally determined whether an upper limit of a bandwidth to be actually encoded is <NUM> or <NUM>. That is, since a quantization scheme may vary according to whether an internal sampling frequency is <NUM> or <NUM>, it is necessary to check a bandwidth. Next, an optimal coding mode within a limit of usable coding modes may be determined according to the determined bandwidth. For example, four coding modes (the UC, the VC, the GC, and the TC) are usable, but only three modes (the VC, the GC, and the TC) may be used at a high bit rate (for example, <NUM> Kbit/s or above). A quantization scheme, e.g., one of the LVQ and the BC-TCVQ, is selected based on a bit rate for encoding, a bandwidth of an input signal, and a coding mode, and an index quantized based on the selected quantization scheme is output.

According to an illustrative example, it is determined whether a bit rate corresponds to between <NUM> Kbps and <NUM> Kbps, and if the bit rate does not correspond to between <NUM> Kbps and <NUM> Kbps, the LVQ may be selected. Otherwise, if the bit rate corresponds to between <NUM> Kbps and <NUM> Kbps, it is determined whether a bandwidth of an input signal is an NB, and if the bandwidth of the input signal is an NB, the LVQ may be selected. Otherwise, if the bandwidth of the input signal is not an NB, it is determined whether a coding mode is the VC mode, and if the coding mode is the VC mode, the BC-TCVQ may be used, and if the coding mode is not the VC mode, the LVQ may be used.

According to another illustrative example, it is determined whether a bit rate corresponds to between <NUM> Kbps and <NUM> Kbps, and if the bit rate does not correspond to between <NUM> Kbps and <NUM> Kbps, the LVQ may be selected. Otherwise, if the bit rate corresponds to between <NUM> Kbps and <NUM> Kbps, it is determined whether a bandwidth of an input signal is a WB, and if the bandwidth of the input signal is not a WB, the LVQ may be selected. Otherwise, if the bandwidth of the input signal is a WB, it is determined whether a coding mode is the VC mode, and if the coding mode is the VC mode, the BC-TCVQ may be used, and if the coding mode is not the VC mode, the LVQ may be used.

According to an illustrative example, an encoding apparatus may determine an optimal weighting function by combining a magnitude weighting function using a spectral magnitude corresponding to a frequency of an ISF coefficient or an LSF coefficient converted from an LPC coefficient, a frequency weighting function in which a perceptual characteristic of an input signal and a formant distribution are considered, a weighting function based on positions of LSF coefficients or ISF coefficients.

<FIG> is a block diagram of the weighting function determination unit of <FIG>, according to an illustrative example.

A weighting function determination unit <NUM> shown in <FIG> may include a spectrum analysis unit <NUM>, an LP analysis unit <NUM>, a first weighting function generation unit <NUM>, a second weighting function generation unit <NUM>, and a combination unit <NUM>. Each component may be integrated and implemented as at least one processor.

Referring to <FIG>, the spectrum analysis unit <NUM> may analyze a characteristic of the frequency domain for an input signal through a time-to-frequency mapping operation. Herein, the input signal may be a pre-processed signal, and the time-to-frequency mapping operation may be performed using fast Fourier transform (FFT), but the embodiment is not limited thereto. The spectrum analysis unit <NUM> may provide spectrum analysis information, for example, spectral magnitudes obtained as a result of FFT. Herein, the spectral magnitudes may have a linear scale. In detail, the spectrum analysis unit <NUM> may generate spectral magnitudes by performing <NUM>-point FFT. In this case, a bandwidth of the spectral magnitudes may correspond to a range of <NUM>-<NUM>. When an internal sampling frequency is <NUM>, the number of spectral magnitudes may extend to <NUM>. In this case, spectral magnitudes for a range of <NUM>-<NUM> are omitted, and the omitted spectral magnitudes may be generated by an input spectrum. In detail, the omitted spectral magnitudes for the range of <NUM>-<NUM> may be replaced using the last <NUM> spectral magnitudes corresponding to a bandwidth of <NUM>-<NUM>. F or example, a mean value of the last <NUM> spectral sizes may be used.

The LP analysis unit <NUM> may generate an LPC coefficient by LP-analyzing the input signal. The LP analysis unit <NUM> may generate an ISF or LSF coefficient from the LPC coefficient.

The first weighting function generation unit <NUM> may obtain a magnitude weighting function and a frequency weighting function based on spectrum analysis information of the ISF or LSF coefficient and generate a first weighting function by combining the magnitude weighting function and the frequency weighting function. The first weighting function may be obtained based on FFT, and a large weight may be allocated as a spectral magnitude is large. For example, the first weighting function may be determined by normalizing the spectrum analysis information, i.e., spectral magnitudes, so as to meet an ISF or LSF band and then using a magnitude of a frequency corresponding to each ISF or LSF coefficient.

The second weighting function generation unit <NUM> may determine a second weighting function based on interval or position information of adjacent ISF or LSF coefficients. According to an illustrative example, the second weighting function related to spectrum sensitivity may be generated from two ISF or LSF coefficients adjacent to each ISF or LSF coefficient. Commonly, ISF or LSF coefficients are located on a unit circle of a Z-domain and are characterized in that when an interval between adjacent ISF or LSF coefficients is narrower than that of the surroundings, a spectral peak appears. As a result, the second weighting function may be used to approximate spectrum sensitivity of LSF coefficients based on positions of adjacent LSF coefficients. That is, by measuring how close adjacent LSF coefficients are located, a density of the LSF coefficients may be predicted, and since a signal spectrum may have a peak value near a frequency at which dense LSF coefficients exist, a large weight may be allocated. Herein, to increase accuracy when the spectrum sensitivity is approximated, various parameters for the LSF coefficients may be additionally used when the second weighting function is determined.

As described above, an interval between ISF or LSF coefficients and a weighting function may have an inverse proportional relationship. Various illustrative examples may be carried out using this relationship between an interval and a weighting function. For example, an interval may be represented by a negative value or represented as a denominator. As another example, to further emphasis an obtained weight, each element of a weighting function may be multiplied by a constant or represented as a square of the element. As another example, a weighting function secondarily obtained by performing an additional computation, e.g., a square or a cube, of a primarily obtained weighting function may be further reflected.

An example of deriving a weighting function by using an interval between ISF or LSF coefficients is as follows.

According to an illustrative example, a second weighting function Ws(n) may be obtained by Equation <NUM> below. <MAT> where di = lsfi+<NUM> - lsfi-<NUM>.

In Equation <NUM>, lsfi-<NUM> and lsfi+<NUM> denote LSF coefficients adjacent to a current LSF coefficient.

According to another illustrative example, the second weighting function Ws(n) may be obtained by Equation <NUM> below.

In Equation <NUM>, lsfn denotes a current LSF coefficient, lsfn-<NUM> and lsfn+<NUM> denote adjacent LSF coefficients, and M is a dimension of an LP model and may be <NUM>. For example, since LSF coefficients span between <NUM> and π, first and last weights may be calculated based on lsf<NUM>=<NUM> and lsfM=π.

The combination unit <NUM> may determine a final weighting function to be used to quantize an LSF coefficient by combining the first weighting function and the second weighting function. In this case, as a combination scheme, various schemes, such as a scheme of multiplying the first weighting function and the second weighting function, a scheme of multiplying each weighting function by a proper ratio and then adding the multiplication results, and a scheme of multiplying each weight by a value predetermined using a lookup table or the like and then adding the multiplication results, may be used.

<FIG> is a detailed block diagram of the first weighting function generation unit of <FIG>, according to an exemplary embodiment.

A first weighting function generation unit <NUM> shown in <FIG> may include a normalization unit <NUM>, a size weighting function generation unit <NUM>, a frequency weighting function generation unit <NUM>, and a combination unit <NUM>. Herein, for convenience of description, LSF coefficients are used for an example as an input signal of the first weighting function generation unit <NUM>.

Referring to <FIG>, the normalization unit <NUM> may normalize the LSF coefficients in a range of <NUM> to K-<NUM>. The LSF coefficients may commonly have a range of <NUM> to π. For an internal sampling frequency of <NUM>, K may be <NUM>, and for an internal sampling frequency of <NUM>, K may be <NUM>.

The magnetude weighting function generation unit <NUM> may generate a magnitude weighting function W<NUM>(n) based on spectrum analysis information for the normalized LSF coefficient. According to an illustrative example, the magnitude weighting function may be determined based on a spectral magnitude of the normalized LSF coefficient.

In detail, the magnitude weighting function may be determined using a spectral bin corresponding to a frequency of the normalized LSF coefficient and two neighboring spectral bins located at the left and the right of, e.g., one previous or subsequent to, a corresponding spectral bin. Each magnitude weighting function W<NUM>(n) related to a spectral envelope may be determined based on Equation <NUM> below by extracting a maximum value among magnitudes of three spectral bins.

In Equation <NUM>, Min denotes a minimum value of wf(n), and wf(n) may be defined by 10log(Emax(n)) (herein, n=<NUM>,. Herein, M denotes <NUM>, and Emax(n) denotes a maximum value among magnitudes of three spectral bins for each LSF coefficient.

The frequency weighting function generation unit <NUM> may generate a frequency weighting function W<NUM>(n) based on frequency information for the normalized LSF coefficient. According to an embodiment, the frequency weighting function may be determined using a perceptual characteristic of an input signal and a formant distribution. The frequency weighting function generation unit <NUM> may extract the perceptual characteristic of the input signal according to a bark scale. In addition, the frequency weighting function generation unit <NUM> may determine a weighting function for each frequency based on a first formant of a distribution of formants. The frequency weighting function may exhibit a relatively low weight at a very low frequency and a high frequency and exhibit the same sized weight in a certain frequency period, e.g., a period corresponding to a first formant, at a low frequency. The frequency weighting function generation unit <NUM> may determine the frequency weighting function according to an input bandwidth and a coding mode.

The combination unit <NUM> may determine an FFT-based weighting function Wf(n) by combining the magnitude weighting function W<NUM>(n) and the frequency weighting function W<NUM>(n). The combination unit <NUM> may determine a final weighting function by multiplying or adding the magnitude weighting function and the frequency weighting function. For example, the FFT-based weighting function Wf(n) for frame-end LSF quantization may be calculated based on Equation <NUM> below.

An LPC coefficient quantization unit <NUM> shown in <FIG> may include a selection unit <NUM>, a first quantization module <NUM>, and a second quantization module <NUM>.

Referring to <FIG>, the selection unit <NUM> may select one of quantization without an inter-frame prediction and quantization with an inter-frame prediction based on a predetermined criterion. Herein, as the predetermined criterion, a prediction error of a un-quantized LSF may be used. The prediction error may be obtained based on an inter-frame prediction value.

The first quantization module <NUM> may quantize an input signal provided through the selection unit <NUM> when the quantization without an inter-frame prediction is selected.

The second quantization module <NUM> may quantize an input signal provided through the selection unit <NUM> when the quantization with an inter-frame prediction is selected.

The first quantization module <NUM> may perform quantization without an inter-frame prediction and may be named the safety-net scheme. The second quantization module <NUM> may perform quantization with an inter-frame prediction and may be named the predictive scheme.

Accordingly, an optimal quantizer may be selected in correspondence with various bit rates from a low bit rate for a highly efficient interactive voice service to a high bit rate for providing a service of differentiated quality.

<FIG> is a block diagram of the selection unit of <FIG>, according to an illustrative example.

A selection unit <NUM> shown in <FIG> may include a prediction error calculation unit <NUM> and a quantization scheme selection unit <NUM>. Herein, the prediction error calculation unit <NUM> may be included in the second quantization module <NUM> of <FIG>.

Referring to <FIG>, the prediction error calculation unit <NUM> may calculate a prediction error based on various methods by receiving, as inputs, an inter-frame prediction value p(n), a weighting function w(n), and an LSF coefficient z(n) from which a DC value has been removed. First, the same inter-frame predictor as used in the predictive scheme of the second quantization module <NUM> may be used. Herein, any one of an auto-regressive (AR) method and a moving average (MA) method may be used. As a signal z(n) of a previous frame for an inter-frame prediction, a quantized value or a un-quantized value may be used. In addition, when a prediction error is obtained, a weighting function may be applied or may not be applied. Accordingly, a total of eight combinations may be obtained, and four of the eight combinations are as follows.

First, a weighted AR prediction error using a quantized signal z(n) of a previous frame may be represented by Equation <NUM> below.

Second, an AR prediction error using the quantized signal z(n) of the previous frame may be represented by Equation <NUM> below.

Third, a weighted AR prediction error using a signal z(n) of the previous frame may be represented by Equation <NUM> below.

Fourth, an AR prediction error using the signal z(n) of the previous frame may be represented by Equation <NUM> below.

Herein, M denotes a dimenstion of an LSF, and when a bandwidth of an input speech signal is a WB, <NUM> is commonly used for M, and ρ(i) denotes a predicted coefficient of the AR method. As described above, a case in which information about an immediately previous frame is used is usual, and a quantization scheme may be determined using a prediction error obtained as described above.

If a prediction error is greater than a predetermined threshold, this may suggest that a current frame tends to be non-stationary. In this case, the safety-net scheme may be used. Otherwise, the predictive scheme is used, and in this case, it may be restrained such that the predictive scheme is not continuously selected.

According to an illustrative example, to prepare for a case in which information about a previous frame does not exist due to the occurrence of a frame error on the previous frame, a second prediction error may be obtained using a previous frame of the previous frame, and a quantization scheme may be determined using the second prediction error. In this case, compared with the first case described above, the second prediction error may be represented by Equation <NUM> below.

The quantization scheme selection unit <NUM> may determine a quantization scheme for a current frame by using the prediction error obtained by the prediction error calculation unit <NUM>. In this case, the coding mode obtained by the coding mode determination unit (<NUM> of <FIG>) may be further taken into account. According to an illustrative example, in the VC mode or the GC mode, the quantization scheme selection unit <NUM> may operate.

<FIG> is a flowchart for describing an operation of the selection unit of <FIG>, according to an illustrative example. When a prediction mode has a value of <NUM>, this indicates that the safety-net scheme is always used, and when the prediction mode has a value except for <NUM>, this indicates that a quantization scheme is determined by switching the safety-net scheme and the predictive scheme. Examples of a coding mode in which the safety-net scheme is always used may be the UC mode and the TC mode. In addition, examples of a coding mode in which the safety-net scheme and the predictive scheme are switched and used may be the VC mode and the GC mode.

Referring to <FIG>, in operation <NUM>, it is determined whether a prediction mode of a current frame is <NUM>. As a result of the determination in operation <NUM>, if the prediction mode is <NUM>, e.g., if the current frame has high variability as in the UC mode or the TC mode, since a prediction between frames is difficult, the safety-net scheme, i.e., the first quantization module <NUM>, may be always selected in operation <NUM>.

Otherwise, as a result of the determination in operation <NUM>, if the prediction mode is not <NUM>, one of the safety-net scheme and the predictive scheme may be determined as a quantization scheme in consideration of a prediction error. To this end, in operation <NUM>, it is determined whether the prediction error is greater than a predetermined threshold. Herein the threshold may be determined in advance through experiments or simulations. For example, for a WB of which a dimension is <NUM>, the threshold may be determined as, for example, <NUM>,<NUM>,<NUM>. However, it may be restrained such that the predictive scheme is not continuously selected.

As a result of the determination in operation <NUM>, if the prediction error is greater than or equal to the threshold, the safety-net scheme may be selected in operation <NUM>. Otherwise, as a result of the determination in operation <NUM>, if the prediction error is less than the threshold, the predictive scheme may be selected in operation <NUM>.

<FIG> are block diagrams illustrating various implemented examples of the first quantization module shown in <FIG>. According to an illustrative example, it is assumed that a <NUM>-dimension LSF vector is used as an input of the first quantization module.

A first quantization module <NUM> shown in <FIG> may include a first quantizer <NUM> for quantizing an outline of an entire input vector by using a TCQ and a second quantizer <NUM> for additionally quantizing a quantization error signal. The first quantizer <NUM> may be implemented using a quantizer using a trellis structure, such as a TCQ, a TCVQ, a BC-TCQ, or a BC-TCVQ. The second quantizer <NUM> may be implemented using a vector quantizer or a scalar quantizer but is not limited thereto. To improve the performance while minimizing a memory size, a split vector quantizer (SVQ) may be used, or to improve the performance, a multi-stage vector quantizer (MSVQ) may be used. When the second quantizer <NUM> is implemented using an SVQ or an MSVQ, if there is complexity to spare, two or more candidates may be stored, and then a soft decision technique of performing an optimal codebook index search may be used.

An operation of the first quantizer <NUM> and the second quantizer <NUM> is as follows.

First, a signal z(n) may be obtained by removing a previously defined mean value from a un-quantized LSF coefficient. The first quantizer <NUM> may quantize or inverse-quantize an entire vector of the signal z(n). A quantizer used herein may be, for example, a BC-TCQ or a BC-TCVQ. To obtain a quantization error signal, a signal r(n) may be obtained using a difference value between the signal z(n) and an inverse-quantized signal. The signal r(n) may be provided as an input of the second quantizer <NUM>. The second quantizer <NUM> may be implemented using an SVQ, an MSVQ, or the like. A signal quantized by the second quantizer <NUM> becomes a quantized value z(n) after being inverse-quantized and then added to a result inverse-quantized by the first quantizer <NUM>, and a quantized LSF value may be obtained by adding the mean value to the quantized value z(n).

The first quantization module <NUM> shown in <FIG> may further include an intra-frame predictor <NUM> in addition to a first quantizer <NUM> and a second quantizer <NUM>. The first quantizer <NUM> and the second quantizer <NUM> may correspond to the first quantizer <NUM> and the second quantizer <NUM> of <FIG>. Since an LSF coefficient is encoded for each frame, a prediction may be performed using a <NUM>- or <NUM>-dimension LSF coefficient in a frame. According to <FIG>, a signal z(n) may be quantized through the first quantizer <NUM> and the intra-frame predictor <NUM>. As a past signal to be used for an intra-frame prediction, a value t(n) of a previous stage, which has been quantized through a TCQ, is used. A prediction coefficient to be used for the intra-frame prediction may be defined in advance through a codebook training operation. For the TCQ, one dimension is commonly used, and according to circumstances, a higher degree or dimension may be used. Since a TCVQ deals with a vector, the prediction coefficient may have a 2D matrix format corresponding to a size of a dimension of the vector. Herein, the dimension may be a natural number of <NUM> or more. For example, when a dimension of a VQ is <NUM>, it is necessary to obtain a prediction coefficient in advance by using a 2X2-size matrix. According to an illustrative example, the TCVQ uses 2D, and the intra-frame predictor <NUM> has a size of 2X2.

An intra-frame prediction operation of the TCQ is as follows. An input signal tj(n) of the first quantizer <NUM>, i.e., a first TCQ, may be obtained by Equation <NUM> below.

However, an intra-frame prediction operation of the TCVQ using 2D is as follows. The input signal tj(n) of the first quantizer <NUM>, i.e., the first TCQ, may be obtained by Equation <NUM> below.

Herein, M denotes a dimension of an LSF coefficient and uses <NUM> for an NB and <NUM> for a WB, ρj denotes a 1D prediction coefficient, and Aj denotes a 2X2 prediction coefficient.

The first quantizer <NUM> may quantize a prediction error vector t(n). According to an illustrative example, the first quantizer <NUM> may be implemented using a TCQ, in detail, a BC-TCQ, a BC-TCVQ, a TCQ, or a TCVQ. The intra-frame predictor <NUM> used together with the first quantizer <NUM> may repeat a quantization operation and a prediction operation in an element unit or a sub-vector unit of an input vector. An operation of the second quantizer <NUM> is the same as that of the second quantizer <NUM> of <FIG>.

<FIG> shows the first quantization module <NUM> for codebook sharing in addition to the structure of <FIG>. The first quantization module <NUM> may include a first quantizer <NUM> and a second quantizer <NUM>. When a speech/audio encoder supports multi-rate encoding, a technique of quantizing the same LSF input vector to various bits is necessary. In this case, to exhibit efficient performance while minimizing a codebook memory of a quantizer to be used, it may be implemented to enable two types of bit number allocation with one structure. In <FIG>, fH(n) denotes a high-rate output, and fL(n) denotes a low-rate output. In <FIG>, when only a BC-TCQ/BC-TCVQ is used, quantization for a low rate may be performed only with the number of bits used for the BC-TCQ/BC-TCVQ. If more precise quantization is needed in addition to the quantization described above, an error signal of the first quantizer <NUM> may be quantized using the additional second quantizer <NUM>.

<FIG> further includes an intra-frame predictor <NUM> in addition to the structure of <FIG>. The first quantization module <NUM> may further include the intra-frame predictor <NUM> in addition to a first quantizer <NUM> and a second quantizer <NUM>. The first quantizer <NUM> and the second quantizer <NUM> may correspond to the first quantizer <NUM> and the second quantizer <NUM> of <FIG>.

10A through 10F are block diagrams illustrating various implemented examples of the second quantization module shown in <FIG>.

A second quantization module <NUM> shown in <FIG> further includes an inter-frame predictor <NUM> in addition to the structure of <FIG>. The second quantization module <NUM> shown in <FIG> may further include the inter-frame predictor <NUM> in addition to a first quantizer <NUM> and a second quantizer <NUM>. The inter-frame predictor <NUM> is a technique of predicting a current frame by using an LSF coefficient quantized with respect to a previous frame. An inter-frame prediction operation uses a method of performing subtraction from a current frame by using a quantized value of a previous frame and then performing addition of a contribution portion after quantization. In this case, a prediction coefficient is obtained for each element.

The second quantization module <NUM> shown in <FIG> further includes an intra-frame predictor <NUM> in addition to the structure of <FIG>. The second quantization module <NUM> shown in <FIG> may further include the intra-frame predictor <NUM> in addition to a first quantizer <NUM>, a second quantizer <NUM>, and an inter-frame predictor <NUM>.

<FIG> shows the second quantization module <NUM> for codebook sharing in addition to the structure of <FIG>. That is, a structure of sharing a codebook of a BC-TCQ/BC-TCVQ between a low rate and a high rate is shown in addition to the structure of <FIG>. In <FIG>, an upper circuit diagram indicates an output related to a low rate for which a second quantizer (not shown) is not used, and a lower circuit diagram indicates an output related to a high rate for which a second quantizer <NUM> is used.

<FIG> shows an example in which the second quantization module <NUM> is implemented by omitting an intra-frame predictor from the structure of <FIG>.

<FIG> are block diagrams illustrating various implemented examples of a quantizer <NUM> in which a weight is applied to a BC-TCVQ.

<FIG> shows a basic BC-TCVQ and may include a weighting function calculation unit <NUM> and a BC-TCVQ part <NUM>. When the BC-TCVQ obtains an optimal index, an index by which weighted distortion is minimized is obtained. <FIG> shows a structure of adding an intra-frame predictor <NUM> to <FIG>. For intra-frame prediction used in <FIG>, the AR method or the MA method may be used. According to an illustrative example, the AR method is used, and a prediction coefficient to be used may be defined in advance.

<FIG> shows a structure of adding an inter-frame predictor <NUM> to <FIG> for additional performance improvement. <FIG> shows an example of a quantizer used in the predictive scheme. For inter-frame prediction used in <FIG>, the AR method or the MA method may be used. According to an illustrative example, the AR method is used, and a prediction coefficient to be used may be defined in advance. A quantization operation is described as follows. First, a prediction error value predicted using the inter-frame prediction may be quantized by means of a BC-TCVQ using the inter-frame prediction. A quantization index value is transmitted to a decoder. A decoding operation is described as follows. A quantized value r(n) is obtained by adding an intra-frame prediction value to a quantized result of the BC-TCVQ. A finally quantized LSF value is obtained by adding a prediction value of the inter-frame predictor <NUM> to the quantized value r(n) and then adding a mean value to the addition result.

<FIG> shows a structure in which an intra-frame predictor is omitted from <FIG>. <FIG> shows a structure of how a weight is applied when a second quantizer <NUM> is added. A weighting function obtained by a weighting function calculation unit <NUM> is used for both a first quantizer <NUM> and the second quantizer <NUM>, and an optimal index is obtained using weighted distortion. The first quantizer <NUM> may be implemented using a BC-TCQ, a BC-TCVQ, a TCQ, or a TCVQ. The second quantizer <NUM> may be implemented using an SQ, a VQ, an SVQ, or an MSVQ. <FIG> shows a structure in which an inter-frame predictor is omitted from <FIG>.

A quantizer of a switching structure mat be implemented by combining the quantizer forms of various structures, which have been described with reference to <FIG>.

<FIG> is a block diagram of a quantization device having a switching structure of an open-loop scheme at a low rate, according to an illustrative example. A quantization device <NUM> shown in <FIG> may include a selection unit <NUM>, a first quantization module <NUM>, and a second quantization module <NUM>.

The selection unit <NUM> may select one of the safety-net scheme and the predictive scheme as a quantization scheme based on a prediction error.

The first quantization module <NUM> performs quantization without an inter-frame prediction when the safety-net scheme is selected and may include a first quantizer <NUM> and a first intra-frame predictor <NUM>. In detail, an LSF vector may be quantized to <NUM> bits by the first quantizer <NUM> and the first intra-frame predictor <NUM>.

The second quantization module <NUM> performs quantization with an inter-frame prediction when the predictive scheme is selected and may include a second quantizer <NUM>, a second intra-frame predictor <NUM>, and an inter-frame predictor <NUM>. In detail, a prediction error corresponding to a difference between an LSF vector from which a mean value has been removed and a prediction vector may be quantized to <NUM> bits by the second quantizer <NUM> and the second intra-frame predictor <NUM>.

The quantization apparatus shown in <FIG> illustrates an example of LSF coefficient quantization using <NUM> bits in the VC mode. The first and second quantizers <NUM> and <NUM> in the quantization device of <FIG> may share codebooks with first and second quantizers <NUM> and <NUM> in a quantization device of <FIG>. An operation of the quantization apparatus shown in <FIG> is described as follows. A signal z(n) may be obtained by removing a mean value from an input LSF value f(n). The selection unit <NUM> may select or determine an optimal quantization scheme by using values p(n) and z(n) inter-frame-predicted using a decoded value z(n) in a previous frame, a weighting function, and a prediction mode pred_mode. According to the selected or determined result, quantization may be performed using one of the safety-net scheme and the predictive scheme. The selected or determined quantization scheme may be encoded by means of one bit.

When the safety-net scheme is selected by the selection unit <NUM>, an entire input vector of an LSF coefficient z(n) from which the mean value has been removed may be quantized through the first intra-frame predictor <NUM> and using the first quantizer <NUM> using <NUM> bits. However, when the predictive scheme is selected by the selection unit <NUM>, a prediction error signal obtained using the inter-frame predictor <NUM> from the LSF coefficient z(n) from which the mean value has been removed may be quantized through the second intra-frame predictor <NUM> and using the second quantizer <NUM> using <NUM> bits. The first and second quantizers <NUM> and <NUM> may be, for example, quantizers having a form of a TCQ or a TCVQ. In detail, a BC-TCQ, a BC-TCVQ, or the like may be used. In this case, a quantizer uses a total of <NUM> bits. A quantized result is used as an output of a quantizer of a low rate, and main outputs of the quantizer are a quantized LSF vector and a quantization index.

<FIG> is a block diagram of a quantization apparatus according to an embodiment of the present invention having a switching structure of an open-loop scheme at a high rate, according to an exemplary embodiment. A quantization device <NUM> shown in <FIG> may include a selection unit <NUM>, a first quantization module <NUM>, and a second quantization module <NUM>. When compared with <FIG>, there are differences in that a third quantizer <NUM> is added to the first quantization module <NUM>, and a fourth quantizer <NUM> is added to the second quantization module <NUM>. In <FIG> and <FIG>, the first quantizers <NUM> and <NUM> and the second quantizers <NUM> and <NUM> may use the same codebooks, respectively. That is, the <NUM>-bit LSF quantization apparatus <NUM> of <FIG> and the <NUM>-bit LSF quantization apparatus <NUM> of <FIG> may use the same codebook for a BC-TCVQ. Accordingly, although the codebook cannot be said as an optimal codebook, a memory size may be significantly saved.

The first quantization module <NUM> may perform quantization without an inter-frame prediction when the safety-net scheme is selected and may include the first quantizer <NUM>, the first intra-frame predictor <NUM>, and the third quantizer <NUM>.

The second quantization module <NUM> may perform quantization with an inter-frame prediction when the predictive scheme is selected and may include the second quantizer <NUM>, a second intra-frame predictor <NUM>, the fourth quantizer <NUM>, and an inter-frame predictor <NUM>.

The quantization apparatus shown in <FIG> illustrates an example of LSF coefficient quantization using <NUM> bits in the VC mode. The first and second quantizers <NUM> and <NUM> in the quantization device <NUM> of <FIG> may share codebooks with the first and second quantizers <NUM> and <NUM> in the quantization device <NUM> of <FIG>, respectively. An operation of the quantization apparatus <NUM> is described as follows. A signal z(n) may be obtained by removing a mean value from an input LSF value f(n). The selection unit <NUM> may select or determine an optimal quantization scheme by using values p(n) and z(n) inter-frame-predicted using a decoded value z(n) in a previous frame, a weighting function, and a prediction mode pred_mode. According to the selected or determined result, quantization may be performed using one of the safety-net scheme and the predictive scheme. The selected or determined quantization scheme may be encoded by means of one bit.

When the safety-net scheme is selected by the selection unit <NUM>, an entire input vector of an LSF coefficient z(n) from which the mean value has been removed may be quantized and inverse-quantized through the first intra-frame predictor <NUM> and the first quantizer <NUM> using <NUM> bits. A second error vector indicating a difference between an original signal and the inverse-quantized result may be provided as an input of the third quantizer <NUM>. The third quantizer <NUM> may quantize the second error vector by using <NUM> bits. The third quantizer <NUM> may be, for example, an SQ, a VQ, an SVQ, or an MSVQ. After the quantization and the inverse quantization, a finally quantized vector may be stored for a subsequent frame.

However, when the predictive scheme is selected by the selection unit <NUM>, a prediction error signal obtained by subtracting p(n) of the inter-frame predictor <NUM> from the LSF coefficient z(n) from which the mean value has been removed may be quantized or inverse-quantized by the second quantizer <NUM> using <NUM> bits and the second intra-frame predictor <NUM>. The first and second quantizers <NUM> and <NUM> may be, for example, quantizers having a form of a TCQ or a TCVQ. In detail, a BC-TCQ, a BC-TCVQ, or the like may be used. A second error vector indicating a difference between an original signal and the inverse-quantized result may be provided as an input of the fourth quantizer <NUM>. The fourth quantizer <NUM> may quantize the second error vector by using <NUM> bits. Herein, the second error vector may be divided into two 8X8-dimension sub-vectors and then quantized by the fourth quantizer <NUM>. Since a low band is more important that a high band in terms of perception, the second error vector may be encoded by allocating a different number of bits to a first VQ and a second VQ. The fourth quantizer <NUM> may be, for example, an SQ, a VQ, an SVQ, or an MSVQ. After the quantization and the inverse quantization, a finally quantized vector may be stored for a subsequent frame.

In this case, a quantizer uses a total of <NUM> bits. A quantized result is used as an output of a quantizer of a high rate, and main outputs of the quantizer are a quantized LSF vector and a quantization index.

As a result, when both <FIG> and <FIG> are used, the first quantizer <NUM> of <FIG> and the first quantizer <NUM> of <FIG> may share a quantization codebook, and the second quantizer <NUM> of <FIG> and the second quantizer <NUM> of <FIG> may share a quantization codebook, thereby significantly saving an entire codebook memory. To additionally save the codebook memory, the third quantizer <NUM> and the fourth quantizer <NUM> share a quantization codebook. In this case, since an input distribution of the third quantizer <NUM> differs from that of the fourth quantizer <NUM>, a scaling factor may be used to compensate for a difference between input distributions. The scaling factor may be calculated by taking into account an input of the third quantizer <NUM> and an input distribution of the fourth quantizer <NUM>. According to an embodiment, an input signal of the third quantizer <NUM> may be divided by the scaling factor, and a signal obtained by the division result may be quantized by the third quantizer <NUM>. The signal quantized by the third quantizer <NUM> may be obtained by multiplying an output of the third quantizer <NUM> by the scaling factor. As described above, if an input of the third quantizer <NUM> or the fourth quantizer <NUM> is properly scaled and then quantized, a codebook may be shared while maintaining the performance at most.

<FIG> is a block diagram of a quantization apparatus having a switching structure of an open-loop scheme at a low rate, according to another illustrative example. In a quantization device <NUM> of <FIG>, low rate parts of <FIG> and <FIG> may be applied to a first quantizer <NUM> and a second quantizer <NUM> used by a first quantization module <NUM> and a second quantization module <NUM>. An operation of the quantization device <NUM> is described as follows. A weighting function calculation <NUM> may obtain a weighting function w(n) by using an input LSF value. The obtained weighting function w(n) may be used by the first quantizer <NUM> and the second quantizer <NUM>. A signal z(n) may be obtained by removing a mean value from an LSF value f(n). A selection unit <NUM> may determine an optimal quantization scheme by using values p(n) and z(n) inter-frame-predicted using a decoded value z(n) in a previous frame, a weighting function, and a prediction mode pred_mode. According to the selected or determined result, quantization may be performed using one of the safety-net scheme and the predictive scheme. The selected or determined quantization scheme may be encoded by means of one bit.

When the safety-net scheme is selected by the selection unit <NUM>, an LSF coefficient z(n) from which the mean value has been removed may be quantized by the first quantizer <NUM>. The first quantizer <NUM> may use an intra-frame prediction for high performance or may not use the intra-frame prediction for low complexity as described with reference to <FIG> and <FIG>. When an intra-frame predictor is used, an entire input vector may be provided to the first quantizer <NUM> for quantizing the entire input vector by using a TCQ or a TCVQ through the intra-frame prediction.

When the predictive scheme is selected by the selection unit <NUM>, the LSF coefficient z(n) from which the mean value has been removed may be provided to the second quantizer <NUM> for quantizing a prediction error signal, which is obtained using inter-frame prediction, by using a TCQ or a TCVQ through the intra-frame prediction. The first and second quantizers <NUM> and <NUM> may be, for example, quantizers having a form of a TCQ or a TCVQ. In detail, a BC-TCQ, a BC-TCVQ, or the like may be used. A quantized result is used as an output of a quantizer of a low rate.

<FIG> is a block diagram of a quantization apparatus having a switching structure of an open-loop scheme at a high rate, according to another illustrative example. A quantization apparatus <NUM> shown in <FIG> may include a selection unit <NUM>, a first quantization module <NUM>, and a second quantization module <NUM>. When compared with <FIG>, there are differences in that a third quantizer <NUM> is added to the first quantization module <NUM>, and a fourth quantizer <NUM> is added to the second quantization module <NUM>. In <FIG> and <FIG>, the first quantizers <NUM> and <NUM> and the second quantizers <NUM> and <NUM> may use the same codebooks, respectively. Accordingly, although the codebook cannot be said as an optimal codebook, a memory size may be significantly saved. An operation of the quantization device <NUM> is described as follows. When the safety-net scheme is selected by the selection unit <NUM>, the first quantizer <NUM> performs first quantization and inverse quantization, and a second error vector indicating a difference between an original signal and an inverse-quantized result may be provided as an input of the third quantizer <NUM>. The third quantizer <NUM> may quantize the second error vector. The third quantizer <NUM> may be, for example, an SQ, a VQ, an SVQ, or an MSVQ. After the quantization and inverse quantization, a finally quantized vector may be stored for a subsequent frame.

However, when the predictive scheme is selected by the selection unit <NUM>, the second quantizer <NUM> performs quantization and inverse quantization, and a second error vector indicating a difference between an original signal and an inverse-quantized result may be provided as an input of the fourth quantizer <NUM>. The fourth quantizer <NUM> may quantize the second error vector. The fourth quantizer <NUM> may be, for example, an SQ, a VQ, an SVQ, or an MSVQ. After the quantization and inverse quantization, a finally quantized vector may be stored for a subsequent frame.

<FIG> is a block diagram of an LPC coefficient quantization unit according to another illustrative example.

An LPC coefficient quantization unit <NUM> shown in <FIG> may include a selection unit <NUM>, a first quantization module <NUM>, a second quantization module <NUM>, and a weighting function calculation unit <NUM>. When compared with the LPC coefficient quantization unit <NUM> shown in <FIG>, there is a difference in that the weighting function calculation unit <NUM> is further included. A detailed implementation example is shown in <FIG>.

<FIG> is a block diagram of a quantization apparatus having a switching structure of a closed-loop scheme, according to an illustrative example. A quantization apparatus <NUM> shown in <FIG> may include a first quantization module <NUM>, a second quantization module <NUM>, and a selection unit <NUM>. The first quantization module <NUM> may include a first quantizer <NUM>, a first intra-frame predictor <NUM>, and a third quantizer <NUM>, and the second quantization module <NUM> may include a second quantizer <NUM>, a second intra-frame predictor <NUM>, a fourth quantizer <NUM>, and an inter-frame predictor <NUM>.

Referring to <FIG>, in the first quantization module <NUM>, the first quantizer <NUM> may quantize an entire input vector by using a BC-TCVQ or a BC-TCQ through the first intra-frame predictor <NUM>. The third quantizer <NUM> may quantize a quantization error signal by using a VQ.

In the second quantization module <NUM>, the second quantizer <NUM> may quantize a prediction error signal by using a BC-TCVQ or a BC-TCQ through the second intra-frame predictor <NUM>. The fourth quantizer <NUM> may quantize a quantization error signal by using a VQ.

The selection unit <NUM> may select one of an output of the first quantization module <NUM> and an output of the second quantization module <NUM>.

In <FIG>, the safety-net scheme is the same as that of <FIG>, and the predictive scheme is the same as that of <FIG>. Herein, for inter-frame prediction, one of the AR method and the MA method may be used. According to an illustrative example, an example of using a first order AR method is shown. A prediction coefficient is defined in advance, and as a past vector for prediction, a vector selected as an optimal vector between two schemes in a previous frame.

<FIG> is a block diagram of a quantization apparatus having a switching structure of a closed-loop scheme, according to another illustrative example. When compared with <FIG>, an intra-frame predictor is omitted. A quantization device <NUM> shown in <FIG> may include a first quantization module <NUM>, a second quantization module <NUM>, and a selection unit <NUM>. The first quantization module <NUM> may include a first quantizer <NUM> and a third quantizer <NUM>, and the second quantization module <NUM> may include a second quantizer <NUM>, a fourth quantizer <NUM>, and an inter-frame predictor <NUM>.

Referring to <FIG>, the selection unit <NUM> may select or determine an optimal quantization scheme by using, as an input, weighted distortion obtained using an output of the first quantization module <NUM> and an output of the second quantization module <NUM>. An operation of determining an optimal quantization scheme is described as follows.

Herein, when a prediction mode (predmode) is <NUM>, this indicates a mode in which the safety-net scheme is always used, and when the prediction mode (predmode) is not <NUM>, this indicates that the safety-net scheme and the predictive scheme are switched and used. An example of a mode in which the safety-net scheme is always used may be the TC or UC mode. In addition, WDist[<NUM>] denotes weighted distortion of the safety-net scheme, and WDist[<NUM>] denotes weighted distortion of the predictive scheme. In addition, abs_threshold denotes a preset threshold. When the prediction mode is not <NUM>, an optimal quantization scheme may be selected by giving a higher priority to the weighted distortion of the safety-net scheme in consideration of a frame error. That is, basically, if a value of WDist[<NUM>] is less than the pre-defined threshold, the safety-net scheme may be selected regardless of a value of WDist[<NUM>]. Even in the other cases, instead of simply selecting less weighted distortion, for the same weighted distortion, the safety-net scheme may be selected because the safety-net scheme is more robust against a frame error. Therefore, only when WDist[<NUM>] is greater than PREFERSFNET*WDist[<NUM>], the predictive scheme may be selected. Herein, usable PREFERSFNET=<NUM> but is not limited thereto. By doing this, when a quantization scheme is selected, bit information indicating the selected quantization scheme and a quantization index obtained by performing quantization using the selected quantization scheme may be transmitted.

<FIG> is a block diagram of an inverse quantization apparatus according to an illustrative example.

An inverse quantization apparatus <NUM> shown in <FIG> may include a selection unit <NUM>, a first inverse quantization module <NUM>, and a second inverse quantization module <NUM>.

Referring to <FIG>, the selection unit <NUM> may provide an encoded LPC parameter, e.g., a prediction residual, to one of the first inverse quantization module <NUM> and the second inverse quantization module <NUM> based on quantization scheme information included in a bitstream. For example, the quantization scheme information may be represented by one bit.

The first inverse quantization module <NUM> may inverse-quantize the encoded LPC parameter without an inter-frame prediction.

The second inverse quantization module <NUM> may inverse-quantize the encoded LPC parameter with an inter-frame prediction.

The first inverse quantization module <NUM> and the second inverse quantization module <NUM> may be implemented based on inverse processing of the first and second quantization modules of each of the various illustrative examples described above according to an encoding apparatus corresponding to a decoding apparatus.

The inverse quantization apparatus of <FIG> may be applied regardless of whether a quantizer structure is an open-loop scheme or a closed-loop scheme.

The VC mode in a <NUM>-KHz internal sampling frequency may have two decoding rates of, for example, <NUM> bits per frame or <NUM> or <NUM> bits per frame. The VC mode may be decoded by a <NUM>-state <NUM>-stage BC TCVQ.

<FIG> is a block diagram of the inverse quantization apparatus according to an exemplary embodiment which may correspond to an encoding rate of <NUM> bits. An inverse quantization apparatus <NUM> shown in <FIG> may include a selection unit <NUM>, a first inverse quantization module <NUM>, and a second inverse quantization module <NUM>. The first inverse quantization module <NUM> may include a first inverse quantizer <NUM> and a first intra-frame predictor <NUM>, and the second inverse quantization module <NUM> may include a second inverse quantizer <NUM>, a second intra-frame predictor <NUM>, and an inter-frame predictor <NUM>. The inverse quantization apparatus of <FIG> may correspond to the quantization apparatus of <FIG>.

Referring to <FIG>, the selection unit <NUM> may provide an encoded LPC parameter to one of the first inverse quantization module <NUM> and the second inverse quantization module <NUM> based on quantization scheme information included in a bitstream.

When the quantization scheme information indicates the safety-net scheme, the first inverse quantizer <NUM> of the first inverse quantization module <NUM> may perform inverse quantization by using a BC-TCVQ. A quantized LSF coefficient may be obtained through the first inverse quantizer <NUM> and the first intra-frame predictor <NUM>. A finally decoded LSF coefficient is generated by adding a mean value that is a predetermined DC value to the quantized LSF coefficient.

However, when the quantization scheme information indicates the predictive scheme, the second inverse quantizer <NUM> of the second inverse quantization module <NUM> may perform inverse quantization by using a BC-TCVQ. An inverse quantization operation starts from the lowest vector among LSF vectors, and the intra-frame predictor <NUM> generates a prediction value for a vector element of a next order by using a decoded vector. The inter-frame predictor <NUM> generates a prediction value through a prediction between frames by using an LSF coefficient decoded in a previous frame. A finally decoded LSF coefficient is generated by adding an inter-frame prediction value obtained by the inter-frame predictor <NUM> to a quantized LSF coefficient obtained through the second inverse quantizer <NUM> and the intra-frame predictor <NUM> and then adding a mean value that is a predetermined DC value to the addition result.

<FIG> is a detailed block diagram of the inverse quantization apparatus according to another embodiment which may correspond to an encoding rate of <NUM> bits. An inverse quantization apparatus <NUM> shown in <FIG> may include a selection unit <NUM>, a first inverse quantization module <NUM>, and a second inverse quantization module <NUM>. The first inverse quantization module <NUM> may include a first inverse quantizer <NUM>, a first intra-frame predictor <NUM>, and a third inverse quantizer <NUM>, and the second inverse quantization module <NUM> may include a second inverse quantizer <NUM>, a second intra-frame predictor <NUM>, a fourth inverse quantizer <NUM>, and an inter-frame predictor <NUM>. The inverse quantization apparatus of <FIG> may correspond to the quantization apparatus of <FIG>.

When the quantization scheme information indicates the safety-net scheme, the first inverse quantizer <NUM> of the first inverse quantization module <NUM> may perform inverse quantization by using a BC-TCVQ. The third inverse quantizer <NUM> may perform inverse quantization by using an SVQ. A quantized LSF coefficient may be obtained through the first inverse quantizer <NUM> and the first intra-frame predictor <NUM>. A finally decoded LSF coefficient is generated by adding a quantized LSF coefficient obtained by the third inverse quantizer <NUM> to the quantized LSF coefficient and then adding a mean value that is a predetermined DC value to the addition result.

However, when the quantization scheme information indicates the predictive scheme, the second inverse quantizer <NUM> of the second inverse quantization module <NUM> may perform inverse quantization by using a BC-TCVQ. An inverse quantization operation starts from the lowest vector among LSF vectors, and the second intra-frame predictor <NUM> generates a prediction value for a vector element of a next order by using a decoded vector. The fourth inverse quantizer <NUM> may perform inverse quantization by using an SVQ. A quantized LSF coefficient provided from the fourth inverse quantizer <NUM> may be added to a quantized LSF coefficient obtained through the second inverse quantizer <NUM> and the second intra-frame predictor <NUM>. The inter-frame predictor <NUM> may generate a prediction value through a prediction between frames by using an LSF coefficient decoded in a previous frame. A finally decoded LSF coefficient is generated by adding an inter-frame prediction value obtained by the inter-frame predictor <NUM> to the addition result and then adding a mean value that is a predetermined DC value thereto.

Herein, the third inverse quantizer <NUM> and the fourth inverse quantizer <NUM> share a codebook.

Although not shown, the inverse quantization apparatuses of <FIG> may be used as components of a decoding apparatuse corresponding to <FIG>.

The contents related to a BC-TCVQ employed in association with LPC coefficient quantization/inverse quantization are described in detail in "Block Constrained Trellis Coded Vector Quantization of LSF Parameters for Wideband Speech Codecs" (Jungeun Park and Sangwon Kang, ETRI Journal, Volume <NUM>, Number <NUM>, October <NUM>). In addition, the contents related to a TCVQ are described in detail in "Trellis Coded Vector Quantization" (Thomas R. Fischer et al, IEEE Transactions on Information Theory, Vol. <NUM>, No. <NUM>, November <NUM>).

The methods according to the illustrative examples may be edited by computer-executable programs and implemented in a general-use digital computer for executing the programs by using a computer-readable recording medium. In addition, data structures, program commands, or data files usable in the embodiments of the present invention may be recorded in the computer-readable recording medium through various means. The computer-readable recording medium may include all types of storage devices for storing data readable by a computer system. Examples of the computer-readable recording medium include magnetic media such as hard discs, floppy discs, or magnetic tapes, optical media such as compact disc-read only memories (CD-ROMs), or digital versatile discs (DVDs), magneto-optical media such as floptical discs, and hardware devices that are specially configured to store and carry out program commands, such as ROMs, RAMs, or flash memories. In addition, the computer-readable recording medium may be a transmission medium for transmitting a signal for designating program commands, data structures, or the like. Examples of the program commands include a high-level language code that may be executed by a computer using an interpreter as well as a machine language code made by a compiler.

Claim 1:
A quantization apparatus for encoding of an audio signal, the quantization apparatus comprising:
a first quantization module, implemented by at least one processor, configured to quantize line spectral frequency, LSF, coefficients of the audio signal without an inter-frame prediction;
a second quantization module, implemented by the at least one processor, configured to quantize the LSF coefficients with the inter-frame prediction; and
a selection unit for selecting one of the first quantization module and the second quantization module,
wherein the first quantization module comprises:
a first quantization part configured to quantize an input audio signal to generate a first quantization signal; and
a third quantization part configured to quantize a first quantization error signal generated from the first quantization signal and the input audio signal,
wherein the second quantization module comprises:
an inter-frame predictor configured to generate a prediction signal to predict the input audio signal;
a second quantization part configured to quantize a prediction error signal generated from the prediction signal and the input audio signal, to generate a second quantization signal; and
a fourth quantization part configured to quantize a second quantization error signal generated from the prediction error signal and the second quantization signal,
wherein the first quantization part and the second quantization part comprise a trellis coded vector quantizer, TCVQ, which allocates sub-vectors to each stage of the TCVQ, and
wherein the third quantization part and the fourth quantization part share a codebook.