The most frequently used paradigm in speech coding is Algebraic Code Excited Linear Prediction (ACELP), which is used in standards such as the AMR-family, G.718 and MPEG USAC [1-3]. It is based on modelling speech using a source model, consisting of a linear predictor (LP) to model the spectral envelope, a long time predictor (LTP) to model the fundamental frequency and an algebraic codebook for the residual.
The coefficients of the linear predictive model are very sensitive to quantization, whereby usually, they are first transformed to Line Spectral Frequencies (LSFs) or Imittance Spectral Frequencies (ISFs) before quantization. The LSF/ISF domains are robust to quantization errors and in these domains; the stability of the predictor can be readily preserved, whereby it offers a suitable domain for quantization [4].
The LSFs/ISFs, in the following referred to as frequency values, can be obtained from a linear predictive polynomial A(z) of order m as follows. The Line Spectrum Pair polynomials are defined as
P(z)=A(z)+z−m−lA(z−1)
Q(z)=A(z)−z−m−lA(z−1) (1)
where I=1 for the Line Spectrum Pair and I=0 for the Imittance Spectrum Pair representation, but any I≧0 is in principle valid. In the following, it thus will be assumed only that I≧0.
Note that the original predictor can be reconstructed using A(z)=½ [P(z)+Q(z)]. The polynomials P(z) and Q(z) thus contain all the information of A(z).
The central property of LSP/ISP polynomials is that if and only if A(z) has all its roots inside the unit circle, then the roots of P(z) and Q(z) are interlaced on the unit circle. Since the roots of P(z) and Q(z) are on the unit circle, they can be represented by their angles only. These angles correspond to frequencies and since the spectra of P(z) and Q(z) have vertical lines in their logarithmic magnitude spectra at frequencies corresponding to the roots, the roots are referred to as frequency values.
It follows that the frequency values, encode all information of the predictor A(z). Moreover, it has been found that frequency values are robust to quantization errors such that a small error in one of the frequency values produces a small error in spectrum of the reconstructed predictor which is localized, in the spectrum, near the corresponding frequency. Due to these favorable properties, quantization in the LSF or ISF domains is used in all main-stream speech codecs [1-3].
One of the challenges in using frequency values is, however, finding their locations efficiently from the coefficients of the polynomials P(z) and Q(z). After all, finding the roots of polynomials is a classic and difficult problem. The previously proposed methods for this task include the following approaches:
While the above described methods work sufficiently in existing codecs, they do have a number of problems.
According to an embodiment, an information encoder for encoding an information signal, may have: an analyzer for analyzing the information signal in order to acquire linear prediction coefficients of a predictive polynomial A(z); a converter for converting the linear prediction coefficients of the predictive polynomial A(z) to frequency values f1 . . . fn of a spectral frequency representation of the predictive polynomial A(z), wherein the converter is configured to determine the frequency values f1 . . . fn by analyzing a pair of polynomials P(z) and Q(z) being defined as
P(z)=A(z)+z−m-lA(z−1) and
Q(z)=A(z)−z−m−lA(z−1),
wherein m is an order of the predictive polynomial A(z) and l is greater or equal to zero, wherein the converter is configured to acquire the frequency values by establishing a strictly real spectrum derived from P(z) and a strictly imaginary spectrum from Q(z) and by identifying zeros of the strictly real spectrum derived from P(z) and the strictly imaginary spectrum derived from Q(z), wherein the converter comprises a limiting device for limiting the numerical range of the spectra of the polynomials P(z) and Q(z) by multiplying the polynomials P(z) and Q(z) or one or more polynomials derived from the polynomials P(z) and Q(z) with a filter polynomial B(z), wherein the filter polynomial B(z) is symmetric and does not comprise any roots on a unit circle;
a quantizer for acquiring quantized frequency values from the frequency values; and a bitstream producer for producing a bitstream comprising the quantized frequency values.
According to another embodiment, a method for operating an information encoder for encoding an information signal may have the steps of: analyzing the information signal in order to acquire linear prediction coefficients of a predictive polynomial A(z); converting the linear prediction coefficients of the predictive polynomial A(z) to frequency values of a spectral frequency representation of the predictive polynomial A(z), wherein the frequency values are determined by analyzing a pair of polynomials P(z) and Q(z) being defined as
P(z)=A(z)+z−m−lA(z−1) and
Q(z)=A(z)−z−m−lA(z−1),
wherein m is an order of the predictive polynomial A(z) and l is greater or equal to zero, wherein the frequency values are acquired by establishing a strictly real spectrum derived from P(z) and a strictly imaginary spectrum from Q(z) and by identifying zeros of the strictly real spectrum derived from P(z) and the strictly imaginary spectrum derived from Q(z); limiting the numerical range of the spectra of the polynomials P(z) and Q(z) by multiplying the polynomials P(z) and Q(z) or one or more polynomials derived from the polynomials P(z) and Q(z) with a filter polynomial B(z), wherein the filter polynomial B(z) is symmetric and does not comprise any roots on a unit circle;
acquiring quantized frequency values from the frequency values; and producing a bitstream comprising the quantized frequency values.
Another embodiment may have a non-transitory digital storage medium having a computer program stored thereon to perform the method for operating an information encoder for encoding an information signal, the method comprising: analyzing the information signal in order to acquire linear prediction coefficients of a predictive polynomial A(z); converting the linear prediction coefficients of the predictive polynomial A(z) to frequency values of a spectral frequency representation of the predictive polynomial A(z), wherein the frequency values are determined by analyzing a pair of polynomials P(z) and Q(z) being defined as
P(z)=A(z)+z−m−lA(z−1) and
Q(z)=A(z)−z−m−lA(z−1),
wherein m is an order of the predictive polynomial A(z) and l is greater or equal to zero, wherein the frequency values are acquired by establishing a strictly real spectrum derived from P(z) and a strictly imaginary spectrum from Q(z) and by identifying zeros of the strictly real spectrum derived from P(z) and the strictly imaginary spectrum derived from Q(z); limiting the numerical range of the spectra of the polynomials P(z) and Q(z) by multiplying the polynomials P(z) and Q(z) or one or more polynomials derived from the polynomials P(z) and Q(z) with a filter polynomial B(z), wherein the filter polynomial B(z) is symmetric and does not comprise any roots on a unit circle;
acquiring quantized frequency values from the frequency values; and producing a bitstream comprising the quantized frequency values, when said computer program is run by a computer.
In a first aspect the problem is solved by an information encoder for encoding an information signal. The information encoder comprises:
an analyzer for analyzing the information signal in order to obtain linear prediction coefficients of a predictive polynomial A(z);
a converter for converting the linear prediction coefficients of the predictive polynomial A(z) to frequency values of a spectral frequency representation of the predictive polynomial A(z), wherein the converter is configured to determine the frequency values by analyzing a pair of polynomials P(z) and Q(z) being defined as
P(z)=A(z)+z−m−lA(z−1) and
Q(z)=A(z)−z−m−lA(z−1),
wherein m is an order of the predictive polynomial A(z) and l is greater or equal to zero, wherein the converter is configured to obtain the frequency values by establishing a strictly real spectrum derived from P(z) and a strictly imaginary spectrum from Q(z) and by identifying zeros of the strictly real spectrum derived from P(z) and the strictly imaginary spectrum derived from Q(z);
a quantizer for obtaining quantized frequency values from the frequency values; and
a bitstream producer for producing a bitstream comprising the quantized frequency values.
The information encoder according to the invention uses a zero crossing search, whereas the spectral approach for finding the roots according to conventional technology relies on finding valleys in the magnitude spectrum. However, when searching for valleys, the accuracy is poorer than when searching for zero-crossings. Consider, for example, the sequence [4, 2, 1, 2, 3]. Clearly, the smallest value is the third element, whereby the zero would lie somewhere between the second and the fourth element. In other words, one cannot determine whether the zero is on the right or left side of the third element. However, if one considers the sequence [4, 2, 1, −2, −3], one can immediately see that the zero crossing is between the third and fourth elements, whereby our margin of error is reduced in half. It follows that with the magnitude-spectrum approach, one need double the number of analysis points to obtain the same accuracy as with the zero-crossing search.
In comparison to evaluating the magnitudes |P(z)| and |Q(z)|, the zero-crossing approach has a significant advantage in accuracy. Consider, for example, the sequence 3, 2, −1, −2. With the zero-crossing approach it is obvious that the zero lies between 2 and −1. However, by studying the corresponding magnitude sequence 3, 2, 1, 2, one can only conclude that the zero lies somewhere between the second and the last elements. In other words, with the zero-crossing approach the accuracy is double in comparison to the magnitude-based approach.
Furthermore, the information encoder according to the invention may use long predictors such as m=128. In contrast to that, the Chebyshev transform per-forms sufficiently only when the length of A(z) is relatively small, for example m≦20. For long predictors, the Chebyshev transform is numerically unstable, whereby practical implementation of the algorithm is impossible.
The main properties of the proposed information encoder are thus that one may obtain as high or better accuracy as the Chebyshev-based method since zero crossings are searched and because a time domain to frequency domain conversion is done, so that the zeros may be found with very low computational complexity.
As a result the information encoder according to the invention determines the zeros (roots) both more accurately, but also with low computational complexity.
The information encoder according to the invention can be used in any signal processing application which needs to determine the line spectrum of a sequence. Herein, the information encoder is exemplary discussed in the context speech coding. The invention is applicable in a speech, audio and/or video encoding device or application, which employs a linear predictor for modelling the spectral magnitude envelope, perceptual frequency masking threshold, temporal magnitude envelope, perceptual temporal masking threshold, or other envelope shapes, or other representations equivalent to an envelope shape such as an autocorrelation signal, which uses a line spectrum to represent the information of the envelope, for encoding, analysis or processing, which needs a method for determining the line spectrum from an input signal, such as a speech or general audio signal, and where the input signal is represented as a digital filter or other sequence of numbers.
The information signal may be for instance an audio signal or a video signal.
The frequency values may be line spectral frequencies or Imittance spectral frequencies. The quantized frequency values transmitted within the bitstream will enable a decoder to decode the bitstream in order to re-create the audio signal or the video signal.
According to an embodiment of the invention the converter comprises a determining device to determine the polynomials P(z) and Q(z) from the predictive polynomial A(z).
According to an embodiment of the invention the converter comprises a zero identifier for identifying the zeros of the strictly real spectrum derived from P(z) and the strictly imaginary spectrum derived from Q(z).
According to an embodiment of the invention the zero identifier is configured for identifying the zeros by
Note that Q(z) and thus the imaginary part of the spectrum has a zero at the null frequency. Since the roots are overlapping, P(z) and thus the real part of the spectrum will then be non-zero at the null frequency. One can therefore start with the real part at the null frequency and increase the frequency until the first change of sign is found, which indicates the first zero-crossing and thus the first frequency value.
Since the roots are interlaced, the spectrum of Q(z) will have the next change in sign. One can thus increase the frequency until a change of sign for the spectrum of Q(z) is found. This process then may be repeated, alternating between the spectraP(z) and Q(z), until all frequency values have been found. The approach used for locating the zero-crossing in the spectra is thus similar to the approach applied in the Chebyshev-domain [6, 7].
Since the zeros of P(z) and Q(z) are interlaced, one can alternate between searching for zeros on the real and complex parts, such that one finds all zeros in one pass, and reduce complexity by half in comparison to a full search.
According to an embodiment of the invention the zero identifier is configured for identifying the zeros by interpolation.
In addition to the zero-crossing approach one can readily apply interpolation such that one can estimate the position of the zero with even higher accuracy, for example, as it is done in conventional methods, e.g. [7].
According to an embodiment of the invention the converter comprises a zero-padding device for adding one or more coefficients having a value “0” to the polynomials P(z) and Q(z) so as to produce a pair of elongated polynomials pe(z) and Qe(z). Accuracy can be further improved by extending the length of the evaluated spectrum. Based on information about the system, it is actually possible in some cases to determine a minimum distance between the frequency values, and thus determine the minimum length of the spectrum with which all frequency values can be found [8].
According to an embodiment of the invention the converter is configured in such way that during converting the linear prediction coefficients to frequency values of a spectral frequency representation of the predictive polynomial A(z) at least a part of operations with coefficients known to be have the value “0” of the elongated polynomials pe(z) and Qe(z) are omitted.
Increasing the length of the spectrum does however also increase computational complexity. The largest contributor to the complexity is the time domain to frequency domain transform, such as a fast Fourier transform, of the coefficients of A(z). Since the coefficient vector has been zero-padded to the desired length, it is however very sparse. This fact can readily be used to reduce complexity. This is a rather simple problem in the sense that one knows exactly which coefficients are zero, whereby on each iteration of the fast Fourier transform one can simply omit those operations which involve zeros. Application of such sparse fast Fourier transform is straightforward and any programmer skilled in the art can implement it. The complexity of such an implementation is O(N log2(1+m+l)), where N is the length of the spectrum and m and l are defined as before.
According to an embodiment of the invention the converter comprises a composite polynomial former configured to establish a composite polynomial Ce(pe(z), Qe(z)) from the elongated polynomials pe(z) and Qe(z).
According to an embodiment of the invention the converter is configured in such way that the strictly real spectrum derived from P(z) and the strictly imaginary spectrum from Q(z) are established by a single Fourier transform by transforming the composite polynomial Ce(pe(z), Qe(z)).
According to an embodiment invention the converter comprises a Fourier transform device for Fourier transforming the pair of polynomials P(z) and Q(z) or one or more polynomials derived from the pair of polynomials P(z) and Q(z) into a frequency domain and an adjustment device for adjusting a phase of the spectrum derived from P(z) so that it is strictly real and for adjusting a phase of the spectrum derived from Q(z) so that it is strictly imaginary. The Fourier transform device may be based on the fast Fourier transform or on the discrete Fourier transform.
According to an embodiment of the invention the adjustment device is configured as a coefficient shifter for circular shifting of coefficients of the pair of polynomials P(z) and Q(z) or one or more polynomials derived from the pair of polynomials P(z) and Q(z).
According to an embodiment of the invention the coefficient shifter is configured for circular shifting of coefficients in such way that an original midpoint of a sequence of coefficients is shifted to the first position of the sequence.
In theory, it is well known that the Fourier transform of a symmetric sequence is real-valued and antisymmetric sequences have purely imaginary Fourier spectra. In the present case, our input sequence is the coefficients of polynomial P(z) or Q(z) which is of length m+l, whereas the discrete Fourier transform of a much greater length N (m+l) would be advantageous. The conventional approach for creating longer Fourier spectra is zero-padding of the input signal. However, zero-padding the sequence has to be carefully implemented such that the symmetries are retained.
First a polynomial P(z) with coefficients
The way FFT algorithms are usually applied necessitates that the point of symmetry is the first element, whereby when applied for example in MATLAB one can write
For a zero-padded sequence
Correspondingly, consider the coefficients
Either one can implement the circular shift in the frequency domain or apply a DFT with half-samples (see below).
According to an embodiment of the invention the adjustment device is configured as a phase shifter for shifting a phase of the output of the Fourier transform device.
According to an embodiment of the invention the phase shifter is configured for shifting the phase of the output of the Fourier transform device by multiplying a k-th frequency bin with exp(i2πkh/N), wherein N is the length of the sample and h=(m+l)/2.
It is well-known that a circular shift in the time-domain is equivalent with a phase-rotation in the frequency-domain. Specifically, a shift of h=(m+l)/2 steps in the time domain corresponds to multiplication of the k-th frequency bin with exp(−i2πkh/N), where N is the length of the spectrum. Instead of the circular shift, one can thus apply a multiplication in the frequency-domain to obtain exactly the same result. The cost of this approach is a slightly increased complexity. Note that h=(m+l)/2 is an integer number only when m+l is even. When m+l is odd, the circular shift would involve a delay by rational number of steps, which is difficult to implement directly. Instead, one can apply the corresponding shift in the frequency domain by the phase-rotation described above.
According to an embodiment of the invention the converter comprises a Fourier transform device for Fourier transforming the pair of polynomials P(z) and Q(z) or one or more polynomials derived from the pair of polynomials P(z) and Q(z) into a frequency domain with half samples so that the spectrum derived from P(z) is strictly real and so that the spectrum derived from Q(z) is strictly imaginary.
An alternative is to implement a DFT with half-samples. Specifically, whereas the conventional DFT is defined as
one can define the half-sample DFT as
A fast implementation as FFT can readily be devised for this formulation.
The benefit of this formulation is that now the point of symmetry is at n=½ instead of the usual n=1. With this half-sample DFT one would then with a sequence
In the case of odd m+l, for a polynomial P(z) with coefficients p0, p1, p2, p2, p1, p0 one can then with a half-sample DFT and zero padding obtain a real valued spectrum when the input sequence is
Correspondingly, for a polynomial Q(z) one can apply the half-sample DFT on the sequence
With these methods, for any combination of m and l, one can obtain a real valued spectrum for a polynomial P(z) and a purely imaginary spectrum for any Q(z). In fact, since the spectra of P(z) and Q(z) are purely real and imaginary, respectively, one can store them in a single complex spectrum, which then corresponds to the spectrum of P(z)+Q(z)=2A(z). Scaling by the factor 2 does not change the location of roots, whereby it can be ignored. One can thus obtain the spectra of P(z) and Q(z) by evaluating only the spectrum of A(z) using a single FFT. One only need to apply the circular shift, as explained above, to the coefficients of A(z).
For example, with m=4 and I=0, the coefficients of A(z) are
If one then applies a circular shift of (m+l)/2=2 steps, one obtains
By taking the DFT of this sequence, one has the spectrum of P(z) and Q(z) in the real and complex parts of the spectrum.
According to an embodiment of the invention the converter comprises a composite polynomial former configured to establish a composite polynomial C(P(z), Q(z)) from the polynomials P(z) and Q(z).
According to an embodiment of the invention the converter is configured in such way that the strictly real spectrum derived from P(z) and the strictly imaginary spectrum from Q(z) are established by a single Fourier transform, for example a fast Fourier transform (FFT), by transforming a composite polynomial C(P(z), Q(z)).
The polynomials P(z) and Q(z) are symmetric and antisymmetric, respectively, with the axis of symmetry at z−(m+l)/2. It follows that the spectra of z−(m+l)/2P(z) and z−(m+l)/2Q(z), respectively, evaluated on the unit circle z=exp(iθ), are real and complex valued, respectively. Since the zeros are on the unit circle, one can find them by searching for zero-crossings. Moreover, the evaluation on the unit-circle can be implemented simply by an fast Fourier transform.
As the spectra corresponding to z−(m+l)/2P(z) and z−(m+1)/2Q(z) are real and complex, respectively, 2 is one can implement them with a single fast Fourier transform. Specifically, if one take the sum z−(m+l)/2P(z)+Q(z)) then the real and complex parts of the spectra correspond to z−(m+l)/2P(z) and z−(m+l)/2Q(z), respectively. Moreover, since
z
−(m+l)/2
P(z)+Q(z))=2z−(m+l)/2A(z), (4)
one can directly take the FFT of 2z−(m+l)/2A(z) to obtain the spectra corresponding to z−(m+l)/2P(z) and z−(m+)/2Q(z), without explicitly determining P(z) and Q(z). Since one is interested only in the locations of zeros, 1 can omit multiplication by the scalar 2 and evaluate z−(m+l)/2A(z) by FFT instead. Observe that since A(z) has only m+1 non-zero coefficients, one can use FFT pruning to reduce complexity [11]. To ensure that all roots are found, one has to use an FFT of sufficiently high length N that the spectrum is evaluated on at least one frequency between every two zeros.
According to an embodiment of the invention the converter comprises a limiting device for limiting the numerical range of the spectra of the polynomials P(z) and Q(z) by multiplying the polynomials P(z) and Q(z) or one or more polynomials derived from the polynomials P(z) and Q(z) with a filter polynomial B(z), wherein the filter polynomial B(z) is symmetric and does not have any roots on a unit circle.
Speech codecs are often implemented on mobile device with limited resources, whereby numerical operations need to be implemented with fixed-point representations. It is therefore essential that algorithms implemented operate with numerical representations whose range is limited. For common speech spectral envelopes, the numerical range of the Fourier spectrum is, however, so large that one needs a 32-bit implementation of the FFT to ensure that the location of zero-crossings are retained.
A 16-bit FFT can, on the other hand, often be implemented with lower complexity, whereby it would be beneficial to limit the range of spectral values to fit within that 16-bit range. From the equations |P(eiθ)|≦2|A(eiθ)| and |Q(eiθ)|≦2|A(eiθ)| it is known that by limiting the numerical range of B(z)A(z) one also limits the numerical range of B(z)P(z) and B(z)Q(z). If B(z) does not have zeros on the unit circle, then B(z)P(z) and B(z)Q(z) will have the same zero-crossing on the unit circle as P(z) and Q(z). Moreover, B(z) has to be symmetric such that z−(m+l+n)/2P(z)B(z) and z−(m+l+n)/2Q(z)B(z) remain symmetric and antisymmetric and their spectra are purely real and imaginary, respectively. Instead of evaluating the spectrum of z(n+l)/2A(z) one can thus evaluate z(n+l+n)/2A(z)B(z), where B(z) is an order n symmetric polynomial without roots on the unit circle. In other words, one can apply the same approach as described above, but first multiplying A(z) with filter B(z) and applying a modified phase-shift z−(m+l+n)/2.
The remaining task is to design a filter B(z) such that the numerical range of A(z)B(z) is limited, with the restriction that B(z) has to be symmetric and without roots on the unit circle. The simplest filter which fulfills the requirements is an order 2 linear-phase filter
B
1(z)=β0+β1z−1+β2z−2 (5)
where βkεR are the parameters and |β2|>2|β1|. By adjusting βk one can modify the spectral tilt and thus reduce the numerical range of the product A(z)B1(z). A computationally very efficient approach is to choose p such that the magnitude at 0-frequency and Nyquist is equal, |A(1)B1(1)|=|A(−1)B1(−1)|, whereby one can choose for example
β0=A(1)−A(−1) and β1=2(A(1)+A(−1)). (6)
This approach provides an approximately flat spectrum.
One observes (see also
A second, slightly more complex method is to calculate the autocorrelation rk of the impulse response of A(0.5z). Here multiplication by 0.5 moves the zeros of A(z) in the direction of origo, whereby the spectral magnitude is reduced approximately by half. By applying the Levinson-Durbin on the autocorrelation rk, one obtains a filter H(z) of order n which is minimum-phase. One can then define B2(z)=z−nH(z)H(z−1) to obtain a |B2(z)A(z)| which is approximately constant. One will note that the range of |B2(z)A(z)| is smaller than that of |B1(z)A(z)|. Further approaches for the design of B(z) can be readily found in classical literature of FIR design [18].
According to an embodiment of the invention the converter comprises a limiting device for limiting the numerical range of the spectra of the elongated polynomials pe(z) and Qe(z) or one or more polynomials derived from the elongated polynomials pe(z) and Qe(z) by multiplying the elongated polynomials pe(z) and Qe(z) with a filter polynomial B(z), wherein the filter polynomial B(z) is symmetric and does not have any roots on a unit circle. B(z) can be found as explained above.
In a further aspect the problem is solved by a method for operating an information encoder for encoding an information signal. The method comprises the steps of:
analyzing the information signal in order to obtain linear prediction coefficients of a predictive polynomial A(z);
converting the linear prediction coefficients of the predictive polynomial A(z) to frequency values f1 . . . fn of a spectral frequency representation of the predictive polynomial A(z), wherein the frequency values f1 . . . fn are determined by analyzing a pair of polynomials P(z) and Q(z) being defined as
P(z)=A(z)+z−m−lA(z−1) and
Q(z)=A(z)−z−m−lA(z−1),
wherein m is an order of the predictive polynomial A(z) and l is greater or equal to zero, wherein the frequency values f1 . . . fn are obtained by establishing a strictly real spectrum derived from P(z) and a strictly imaginary spectrum from Q(z) and by identifying zeros of the strictly real spectrum derived from P(z) and the strictly imaginary spectrum derived from Q(z);
obtaining quantized frequency fq1 . . . fqn values from the frequency values f1 . . . fn; and
producing a bitstream comprising the quantized frequency values fq1 . . . fqn.
Moreover, the program is noticed by a computer program for, when running on a processor, executing the method according to the invention.
Embodiments of the present invention will be detailed subsequently referring to the appended drawings, in which:
The information encoder 1 for encoding an information signal IS, comprises:
an analyzer 2 for analyzing the information signal IS in order to obtain linear prediction coefficients of a predictive polynomial A(z);
a converter 3 for converting the linear prediction coefficients of the predictive polynomial A(z) to frequency values f1 . . . fn of a spectral frequency representation RES, IES of the predictive polynomial A(z), wherein the converter 3 is configured to determine the frequency values f1 . . . fn by analyzing a pair of polynomials P(z) and Q(z) being defined as
P(z)=A(z)+z−m−lA(z−1) and
Q(z)=A(z)−z−m−lA(z−1),
wherein m is an order of the predictive polynomial A(z) and l is greater or equal to zero, wherein the converter 3 is configured to obtain the frequency values f1 . . . fn by establishing a strictly real spectrum RES derived from P(z) and a strictly imaginary spectrum IES from Q(z) and by identifying zeros of the strictly real spectrum RES derived from P(z) and the strictly imaginary spectrum IES derived from Q(z);
a quantizer 4 for obtaining quantized frequency fq1 . . . fqn values from the frequency values f1 . . . fn; and
a bitstream producer 5 for producing a bitstream BS comprising the quantized frequency values fq1 . . . fqn.
The information encoder 1 according to the invention uses a zero crossing search, whereas the spectral approach for finding the roots according to conventional technology relies on finding valleys in the magnitude spectrum. However, when searching for valleys, the accuracy is poorer than when searching for zero-crossings. Consider, for example, the sequence [4, 2, 1, 2, 3]. Clearly, the smallest value is the third element, whereby the zero would lie somewhere between the second and the fourth element. In other words, one cannot determine whether the zero is on the right or left side of the third element. However, if one considers the sequence [4, 2, 1, −2, −3], one can immediately see that the zero crossing is between the third and fourth elements, whereby our margin of error is reduced in half. It follows that with the magnitude-spectrum approach, one need double the number of analysis points to obtain the same accuracy as with the zero-crossing search.
In comparison to evaluating the magnitudes |P(z)| and |Q(z)|, the zero-crossing approach has a significant advantage in accuracy. Consider, for example, the sequence 3, 2, −1, −2. With the zero-crossing approach it is obvious that the zero lies between 2 and −1. However, by studying the corresponding magnitude sequence 3, 2, 1, 2, one can only conclude that the zero lies somewhere between the second and the last elements. In other words, with the zero-crossing approach the accuracy is double in comparison to the magnitude-based approach.
Furthermore, the information encoder according to the invention may use long predictors such as m=128. In contrast to that, the Chebyshev transform per-forms sufficiently only when the length of A(z) is relatively small, for example m≦20. For long predictors, the Chebyshev transform is numerically unstable, whereby practical implementation of the algorithm is impossible.
The main properties of the proposed information encoder 1 are thus that one may obtain as high or better accuracy as the Chebyshev-based method since zero crossings are searched and because a time domain to frequency domain conversion is done, so that the zeros may be found with very low computational complexity.
As a result the information encoder 1 according to the invention determines the zeros (roots) both more accurately, but also with low computational complexity.
The information encoder 1 according to the invention can be used in any signal processing application which needs to determine the line spectrum of a sequence. Herein, the information encoder 1 is exemplary discussed in the context speech coding. The invention is applicable in a speech, audio and/or video encoding device or application, which employs a linear predictor for modelling the spectral magnitude envelope, perceptual frequency masking threshold, temporal magnitude envelope, perceptual temporal masking threshold, or other envelope shapes, or other representations equivalent to an envelope shape such as an autocorrelation signal, which uses a line spectrum to represent the information of the envelope, for encoding, analysis or processing, which needs a method for determining the line spectrum from an input signal, such as a speech or general audio signal, and where the input signal is represented as a digital filter or other sequence of numbers.
The information signal IS may be for instance an audio signal or a video signal.
According to an embodiment of the invention the converter 3 comprises a determining device 6 to determine the polynomials P(z) and Q(z) from the predictive polynomial A(z).
According to an embodiment invention the converter comprises a Fourier transform device 8 for Fourier transforming the pair of polynomials P(z) and Q(z) or one or more polynomials derived from the pair of polynomials P(z) and Q(z) into a frequency domain and an adjustment device 7 for adjusting a phase of the spectrum RES derived from P(z) so that it is strictly real and for adjusting a phase of the spectrum IES derived from Q(z) so that it is strictly imaginary. The Fourier transform device may 8 be based on the fast Fourier transform or on the discrete Fourier transform.
According to an embodiment of the invention the adjustment device 7 is configured as a coefficient shifter 7 for circular shifting of coefficients of the pair of polynomials P(z) and Q(z) or one or more polynomials derived from the pair of polynomials P(z) and Q(z).
According to an embodiment of the invention the coefficient shifter 7 is configured for circular shifting of coefficients in such way that an original midpoint of a sequence of coefficients is shifted to the first position of the sequence.
In theory, it is well known that the Fourier transform of a symmetric sequence is real-valued and antisymmetric sequences have purely imaginary Fourier spectra. In the present case, our input sequence is the coefficients of polynomial P(z) or Q(z) which is of length m+l, whereas the discrete Fourier transform of a much greater length N (m+l) would be advantageous. The conventional approach for creating longer Fourier spectra is zero-padding of the input signal.
However, zero-padding the sequence has to be carefully implemented such that the symmetries are retained.
First a polynomial P(z) with coefficients
The way fast Fourier transform algorithms are usually applied necessitates that the point of symmetry is the first element, whereby when applied for example in MATLAB one can write
For a zero-padded sequence
Correspondingly, consider the coefficients
According to an embodiment of the invention the converter 3 comprises a zero identifier 9 for identifying the zeros of the strictly real spectrum RES derived from P(z) and the strictly imaginary spectrum IES derived from Q(z).
According to an embodiment of the invention the zero identifier 9 is configured for identifying the zeros by
Note that Q(z) and thus the imaginary part IES of the spectrum has a zero at the null frequency. Since the roots are overlapping, P(z) and thus the real part RES of the spectrum will then be non-zero at the null frequency. One can therefore start with the real part RES at the null frequency and increase the frequency until the first change of sign is found, which indicates the first zero-crossing and thus the first frequency value f1.
Since the roots are interlaced, the spectrum IES of Q(z) will have the next change in sign. One can thus increase the frequency until a change of sign for the spectrum IES of Q(z) is found. This process then may be repeated, alternating between the spectra of P(z) and Q(z), until all frequency values f1 . . . fn, have been found. The approach used for locating the zero-crossing in the spectra RES and IES is thus similar to the approach applied in the Chebyshev-domain [6, 7].
Since the zeros of P(z) and Q(z) are interlaced, one can alternate between searching for zeros on the real parts RES and complex parts IES, such that one finds all zeros in one pass, and reduce complexity by half in comparison to a full search.
According to an embodiment of the invention the zero identifier 9 is configured for identifying the zeros by interpolation.
In addition to the zero-crossing approach one can readily apply interpolation such that one can estimate the position of the zero with even higher accuracy, for example, as it is done in conventional methods, e.g. [7].
According to an embodiment of the invention the converter 3 comprises a zero-padding device 10 for adding one or more coefficients having a value “0” to the polynomials P(z) and Q(z) so as to produce a pair of elongated polynomials pe(z) and Qe(z). Accuracy can be further improved by extending the length of the evaluated spectrum RES, IES. Based on information about the system, it is actually possible in some cases to determine a minimum distance between the frequency values f1 . . . fn, and thus determine the minimum length of the spectrum RES, IES with which all frequency values f1 . . . fn, can be found [8].
According to an embodiment of the invention the converter 3 is configured in such way that during converting the linear prediction coefficients to frequency values f1 . . . fn, of a spectral frequency representation RES, IES of the predictive polynomial A(z) at least a part of operations with coefficients known to be have the value “0” of the elongated polynomials pe(z) and Qe(z) are omitted.
Increasing the length of the spectrum does however also increase computational complexity. The largest contributor to the complexity is the time domain to frequency domain transform, such as a fast Fourier transform, of the coefficients of A(z). Since the coefficient vector has been zero-padded to the desired length, it is however very sparse. This fact can readily be used to reduce complexity. This is a rather simple problem in the sense that one knows exactly which coefficients are zero, whereby on each iteration of the fast Fourier transform one can simply omit those operations which involve zeros. Application of such sparse fast Fourier transform is straightforward and any programmer skilled in the art can implement it. The complexity of such an implementation is O(N log2(1+m+l)), where N is the length of the spectrum and m and l are defined as before.
According to an embodiment of the invention the converter comprises a limiting device 11 for limiting the numerical range of the spectra of the elongated polynomials pe(z) and Qe(z) or one or more polynomials derived from the elongated polynomials pe(z) and Qe(z) by multiplying the elongated polynomials pe(z) and Qe(z) with a filter polynomial B(z), wherein the filter polynomial B(z) is symmetric and does not have any roots on a unit circle. B(z) can be found as explained above.
According to an embodiment (not shown) of the invention the converter 3 comprises a limiting device 11 for limiting the numerical range of the spectra RES, IES of the polynomials P(z) and Q(z) by multiplying the polynomials P(z) and Q(z) or one or more polynomials derived from the polynomials P(z) and Q(z) with a filter polynomial B(z), wherein the filter polynomial B(z) is symmetric and does not have any roots on a unit circle.
Speech codecs are often implemented on mobile device with limited resources, whereby numerical operations need to be implemented with fixed-point representations. It is therefore essential that algorithms implemented operate with numerical representations whose range is limited. For common speech spectral envelopes, the numerical range of the Fourier spectrum is, however, so large that one needs a 32-bit implementation of the FFT to ensure that the location of zero-crossings are retained.
A 16-bit FFT can, on the other hand, often be implemented with lower complexity, whereby it would be beneficial to limit the range of spectral values to fit within that 16-bit range. From the equations |P(eiθ)|≦2|A(eiθ)| and |Q(eiθ)|≦2|A(eiθ)| it is known that by limiting the numerical range of B(z)A(z) one also limits the numerical range of B(z)P(z) and B(z)Q(z). If B(z) does not have zeros on the unit circle, then B(z)P(z) and B(z)Q(z) will have the same zero-crossing on the unit circle as P(z) and Q(z). Moreover, B(z) has to be symmetric such that z−(m+l+n)/2P(z)B(z) and z−(m+l+n)/2Q(z)B(z) remain symmetric and antisymmetric and their spectra are purely real and imaginary, respectively. Instead of evaluating the spectrum of z(n+l)/2A(z) one can thus evaluate z(n+l+n)/2A(z)B(z), where B(z) is an order n symmetric polynomial without roots on the unit circle. In other words, one can apply the same approach as described above, but first multiplying A(z) with filter B(z) and applying a modified phase−shift z−(m+l+n)/2.
The remaining task is to design a filter B(z) such that the numerical range of A(z)B(z) is limited, with the restriction that B(z) has to be symmetric and without roots on the unit circle. The simplest filter which fulfills the requirements is an order 2 linear-phase filter B1(z)=β0+β1z−1+β2z−2, where βkεR are the parameters and |β2|>2|β1|. By adjusting pk one can modify the spectral tilt and thus reduce the numerical range of the product A(z)B1(z). A computationally very efficient approach is to choose p such that the magnitude at 0-frequency and Nyquist is equal, |A(1)B1(1)|=|A(−1)B1(−1)|, whereby one can choose for example β0=A(1)−A(−1) and β1=2 (A(1)+A(−1)).
This approach provides an approximately flat spectrum.
One observes from
A second, slightly more complex method is to calculate the autocorrelation rk of the impulse response of A(0.5z). Here multiplication by 0.5 moves the zeros of A(z) in the direction of origo, whereby the spectral magnitude is reduced approximately by half. By applying the Levinson-Durbin on the autocorrelation rk, one obtains a filter H(z) of order n which is minimum-phase. One can then define B2(z)=z−nH(z)H(z−1) to obtain a|B2(z)A(z)| which is approximately constant. One will note that the range of |B2(z)A(z)| is smaller than that of |B1(z)A(z)|. Further approaches for the design of B(z) can be readily found in classical literature of FIR design [18].
According to an embodiment of the invention the adjustment device 12 is configured as a phase shifter 12 for shifting a phase of the output of the Fourier transform device 8.
According to an embodiment of the invention the phase shifter 12 is configured for shifting the phase of the output of the Fourier transform device 8 by multiplying a k-th frequency bin with exp(i2πkh/N), wherein N is the length of the sample and h=(m+l)/2.
It is well-known that a circular shift in the time-domain is equivalent with a phase-rotation in the frequency-domain. Specifically, a shift of h=(m+l)/2 steps in the time domain corresponds to multiplication of the k-th frequency bin with exp(−i2πkh/N), where N is the length of the spectrum. Instead of the circular shift, one can thus apply a multiplication in the frequency-domain to obtain exactly the same result. The cost of this approach is a slightly increased complexity. Note that h=(m+l)/2 is an integer number only when m+l is even. When m+l is odd, the circular shift would involve a delay by rational number of steps, which is difficult to implement directly. Instead, one can apply the corresponding shift in the frequency domain by the phase-rotation described above.
According to an embodiment of the invention the converter 3 comprises a composite polynomial former 13 configured to establish a composite polynomial C(P(z), Q(z)) from the polynomials P(z) and Q(z).
According to an embodiment of the invention the converter 3 is configured in such way that the strictly real spectrum derived from P(z) and the strictly imaginary spectrum from Q(z) are established by a single Fourier transform, for example a fast Fourier transform (FFT), by transforming a composite polynomial C(P(z), Q(z)).
The polynomials P(z) and Q(z) are symmetric and antisymmetric, respectively, with the axis of symmetry at z−(m+1)/2. It follows that the spectra of z−(m+l)/2P(z) and z−(m+l)/2Q(z), respectively, evaluated on the unit circle z=exp(iθ), are real and complex valued, respectively. Since the zeros are on the unit circle, one can find them by searching for zero-crossings. Moreover, the evaluation on the unit-circle can be implemented simply by an fast Fourier transform.
As the spectra corresponding to z−(m+l)/2P(z) and z−(m+)/2Q(z) are real and complex, respectively, 2 is one can implement them with a single fast Fourier transform. Specifically, if one take the sum z−(m+l)/2P(z)+Q(z)) then the real and complex parts of the spectra correspond to z−(m+l)/2P(z) and z−(m+l)/2Q(z), respectively. Moreover, since z−(m+)/2 (P(z)+Q(z))=2z−(m+1)/2A(z), one can directly take the FFT of 2z−(m+l)/2A(z) to obtain the spectra corresponding to z−(m+l)/2P(z) and z−(m+l)/2Q(z), without explicitly determining P(z) and Q(z). Since one is interested only in the locations of zeros, 1 can omit multiplication by the scalar 2 and evaluate z−(m+l)/2A(z) by FFT instead. Observe that since A(z) has only m+1 non-zero coefficients, one can use FFT pruning to reduce complexity [11]. To ensure that all roots are found, one has to use an FFT of sufficiently high length N that the spectrum is evaluated on at least one frequency between every two zeros.
According to an embodiment (not shown) of the invention the converter 3 comprises a composite polynomial former configured to establish a composite polynomial Ce(pe(z), Qe(z)) from the elongated polynomials pe(z) and Qe(z).
According to an embodiment (not shown) of the invention the converter is configured in such way that the strictly real spectrum derived from P(z) and the strictly imaginary spectrum from Q(z) are established by a single Fourier transform by transforming the composite polynomial Ce(pe(z), Qe(z)).
According to an embodiment of the invention the converter 3 comprises a Fourier transform device 14 for Fourier transforming the pair of polynomials P(z) and Q(z) or one or more polynomials derived from the pair of polynomials P(z) and Q(z) into a frequency domain with half samples so that the spectrum derived from P(z) is strictly real and so that the spectrum derived from Q(z) is strictly imaginary.
An alternative is to implement a DFT with half-samples. Specifically, whereas the conventional DFT is defined as
one can define the half-sample DFT as
A fast implementation as FFT can readily be devised for this formulation.
The benefit of this formulation is that now the point of symmetry is at n=½ instead of the usual n=1. With this half-sample DFT one would then with a sequence
In the case of odd m+l, for a polynomial P(z) with coefficients p0, p1, p2, p2, p1, p0 one can then with a half-sample DFT and zero padding obtain a real valued spectrum RES when the input sequence is
Correspondingly, for a polynomial Q(z) one can apply the half-sample DFT on the sequence
With these methods, for any combination of m and l, one can obtain a real valued spectrum for a polynomial P(z) and a purely imaginary spectrum for any Q(z). In fact, since the spectra of P(z) and Q(z) are purely real and imaginary, respectively, one can store them in a single complex spectrum, which then corresponds to the spectrum of P(z)+Q(z)=2A(z). Scaling by the factor 2 does not change the location of roots, whereby it can be ignored. One can thus obtain the spectra of P(z) and Q(z) by evaluating only the spectrum of A(z) using a single FFT. One only need to apply the circular shift, as explained above, to the coefficients of A(z).
For example, with m=4 and I=0, the coefficients of A(z) are
The overall algorithm in the case where m+l is even can be stated as follows. Let the coefficients of A(z), denoted by ak, reside in a buffer of length N.
Here the functions sign(x), real(x) and imag(x) refer to the sign of x, the real part of x and the imaginary part of x, respectively.
For the case of m+l odd, the circular shift is reduced to only (m+l−1)/2 steps left and the regular fast Fourier transform is replaced by the half-sample fast Fourier transform.
Alternatively, we can replace the combination of circular shift and 1st Fourier transform, with fast Fourier transform and a phase-shift in frequency domain.
For more accurate locations of roots, it is possible to use the above proposed method to provide a first guess and then apply a second step which refines the root loci. For the refinement, we can apply any classical polynomial root finding method such as Durand-Kerner, Aberth-Ehrlich's, Laguerre's the Gauss-Newton method or others [11-17].
In one formulation, the presented method consists of the following steps:
In another formulation, the presented method consists of the following steps
With respect to the encoder 1 and the methods of the described embodiments the following is mentioned:
Although some aspects have been described in the context of an apparatus, it is clear that these aspects also represent a description of the corresponding method, where a block or device corresponds to a method step or a feature of a method step. Analogously, aspects described in the context of a method step also represent a description of a corresponding block or item or feature of a corresponding apparatus.
Depending on certain implementation requirements, embodiments of the invention can be implemented in hardware or in software. The implementation can be performed using a digital storage medium, for example a floppy disk, a DVD, a CD, a ROM, a PROM, an EPROM, an EEPROM or a FLASH memory, having electronically readable control signals stored thereon, which cooperate (or are capable of cooperating) with a programmable computer system such that the respective method is performed.
Some embodiments according to the invention comprise a data carrier having electronically readable control signals, which are capable of cooperating with a programmable computer system, such that one of the methods described herein is performed.
Generally, embodiments of the present invention can be implemented as a computer program product with a program code, the program code being opera-tive for performing one of the methods when the computer program product runs on a computer. The program code may for example be stored on a machine readable carrier.
Other embodiments comprise the computer program for performing one of the methods described herein, stored on a machine readable carrier or a non-transitory storage medium.
In other words, an embodiment of the inventive method is, therefore, a computer program having a program code for performing one of the methods described herein, when the computer program runs on a computer.
A further embodiment of the inventive methods is, therefore, a data carrier (or a digital storage medium, or a computer-readable medium) comprising, recorded thereon, the computer program for performing one of the methods described herein.
A further embodiment of the inventive method is, therefore, a data stream or a sequence of signals representing the computer program for performing one of the methods described herein. The data stream or the sequence of signals may for example be configured to be transferred via a data communication connec-tion, for example via the Internet.
A further embodiment comprises a processing means, for example a computer, or a programmable logic device, configured to or adapted to perform one of the methods described herein.
A further embodiment comprises a computer having installed thereon the computer program for performing one of the methods described herein.
In some embodiments, a programmable logic device (for example a field programmable gate array) may be used to perform some or all of the functionalities of the methods described herein. In some embodiments, a field programmable gate array may cooperate with a microprocessor in order to perform one of the methods described herein. Generally, the methods are advantageously performed by any hardware apparatus.
While this invention has been described in terms of several embodiments, there are alterations, permutations, and equivalents which fall within the scope of this invention. It should also be noted that there are many alternative ways of imple-menting the methods and compositions of the present invention. It is therefore intended that the following appended claims be interpreted as including all such alterations, permutations and equivalents as fall within the true spirit and scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
14158396.3 | Mar 2014 | EP | regional |
14178789.5 | Jul 2014 | EP | regional |
This application is a continuation of copending International Application No. PCT/EP2015/052634, filed Feb. 9, 2015, which is incorporated herein by reference in its entirety, and additionally claims priority from European Applications Nos. EP 14 158 396.3, filed Mar. 7, 2014, and EP 14 178 789.5, filed Jul. 28, 2014, all of which are incorporated herein by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/EP2015/052634 | Feb 2015 | US |
Child | 15258702 | US |