Embodiments according to the present invention are related to a multi-mode audio signal decoder for providing a decoded representation of an audio content on the basis of an encoded representation of the audio content.
Further embodiments according to the invention are related to a multi-mode audio signal encoder for providing an encoded representation of an audio content on the basis of an input representation of the audio content.
Further embodiments according to the invention are related to a method for providing a decoded representation of an audio content on the basis of an encoded representation of the audio content.
Further embodiments according to the invention are related to a method for providing an encoded representation of an audio content on the basis of an input representation of the audio content.
Further embodiments according to the invention are related to computer programs implementing said methods.
In the following, some background of the invention will be explained in order to facilitate the understanding of the invention and the advantages thereof.
During the past decade, big effort has been put on creating the possibility to digitally store and distribute audio contents. One important achievement on this way is the definition of the international standard ISO/IEC 14496-3. Part 3 of this standard is related to an encoding and decoding of audio contents, and sub-part 4 of part 3 is related to general audio coding. ISO/IEC 14496 part 3, sub-part 4 defines a concept for encoding and decoding of general audio content. In addition, further improvements have been proposed in order to improve the quality and/or reduce the needed bit rate.
Moreover, it has been found that the performance of frequency-domain based audio coders is not optimal for audio contents comprising speech. Recently, a unified speech-and-audio codec has been proposed which efficiently combines techniques from both worlds, namely speech coding and audio coding (see, for example, Reference [1].)
In such an audio coder, some audio frames are encoded in the frequency domain and some audio frames are encoded in the linear-prediction-domain.
However, it has been found that it is difficult to transition between frames encoded in different domains without sacrificing a significant amount of bit rate.
In view of this situation, there is a desire to create a concept for encoding and decoding an audio content comprising both speech and general audio, which allows for an efficient realization of transitions between portions encoded using different modes.
According to an embodiment, a multi-mode audio signal decoder for providing a decoded representation of an audio content on the basis of an encoded representation of the audio content may have a spectral value determinator configured to acquire sets of decoded spectral coefficients for a plurality of portions of the audio content; a spectrum processor configured to apply a spectral shaping to a set of decoded spectral coefficients, or to a pre-processed version thereof, in dependence on a set of linear-prediction-domain parameters for a portion of the audio content encoded in the linear-prediction mode, and to apply a spectral shaping to a set of decoded spectral coefficients, or a pre-processed version thereof, in dependence on a set of scale factor parameters for a portion of the audio content encoded in the frequency-domain mode, and a frequency-domain-to-time-domain converter configured to acquire a time-domain representation of the audio content on the basis of a spectrally-shaped set of decoded spectral coefficients for a portion of the audio content encoded in the linear-prediction mode, and to acquire a time-domain representation of the audio content on the basis of a spectrally-shaped set of decoded spectral coefficients for a portion of the audio content encoded in the frequency-domain mode.
According to another embodiment, a multi-mode audio signal encoder for providing an encoded representation of an audio content on the basis of an input representation of the audio content may have a time-domain-to-frequency-domain converter configured to process the input representation of the audio content, to acquire a frequency-domain representation of the audio content, wherein the frequency-domain representation has a sequence of sets of spectral coefficients; a spectrum processor configured to apply a spectral shaping to a set of spectral coefficients, or a pre-processed version thereof, in dependence on a set of linear-prediction domain parameters for a portion of the audio content to be encoded in the linear-prediction mode, to acquire a spectrally-shaped set of spectral coefficients, and to apply a spectral shaping to a set of spectral coefficients, or a pre-processed version thereof, in dependence on a set of scale factor parameters for a portion of the audio content to be encoded in the frequency-domain mode, to acquire a spectrally-shaped set of spectral coefficients; and a quantizing encoder configured to provide an encoded version of a spectrally-shaped set of spectral coefficients for the portion of the audio content to be encoded in the linear-prediction mode, and to provide an encoded version of a spectrally-shaped set of spectral coefficients for the portion of the audio content to be encoded in the frequency-domain mode.
According to another embodiment, a method for providing a decoded representation of an audio content on the basis of an encoded representation of the audio content may have the steps of acquiring sets of decoded spectral coefficients for a plurality of portions of the audio content; applying a spectral shaping to a set of decoded spectral coefficients, or a pre-processed version thereof, in dependence on a set of linear-prediction-domain parameters for a portion of the audio content encoded in a linear-prediction mode, and applying a spectral shaping to a set of decoded spectral coefficients, or a pre-processed version thereof, in dependence on a set of scale factor parameters for a portion of the audio content encoded in a frequency-domain mode; and acquiring a time-domain representation of the audio content on the basis of a spectrally-shaped set of decoded spectral coefficients for a portion of the audio content encoded in the linear-prediction mode, and acquiring a time-domain representation of the audio content on the basis of a spectrally-shaped set of decoded spectral coefficients for a portion of the audio content encoded in the frequency-domain mode.
According to another embodiment, a method for providing an encoded representation of an audio content on the basis of an input representation of the audio content may have the steps of processing the input representation of the audio content, to acquire a frequency-domain representation of the audio content, wherein the frequency-domain representation has a sequence of sets of spectral coefficients; applying a spectral shaping to a set of spectral coefficients, or a pre-processed version thereof, in dependence on a set of linear-prediction domain parameters for a portion of the audio content to be encoded in the linear-prediction mode, to acquire a spectrally-shaped set of spectral coefficients; applying a spectral shaping to a set of spectral coefficients, or a pre-processed version thereof, in dependence on a set of scale factor parameters for a portion of the audio content to be encoded in the frequency-domain mode, to acquire a spectrally-shaped set of spectral coefficients; providing an encoded representation of a spectrally-shaped set of spectral coefficients for the portion of the audio content to be encoded in the linear-prediction mode using a quantizing encoding; and providing an encoded version of a spectrally-shaped set of spectral coefficients for the portion of the audio content to be encoded in the frequency domain mode using a quantizing encoding.
According to another embodiment, a computer program may performing one of the above mentioned methods, when the computer program runs on a computer.
An embodiment according to the invention creates a multi-mode audio signal decoder for providing a decoded representation of an audio content on the basis of an encoded representation of the audio content. The audio signal decoder comprises a spectral value determinator configured to obtain sets of decoded spectral coefficients for a plurality of portions of the audio content. The multi-mode audio signal decoder also comprises a spectrum processor configured to apply a spectral shaping to a set of the decoded spectral coefficients, or to a preprocessed version thereof, in dependence on a set of linear-prediction-domain parameters for a portion of the audio content encoded in a linear prediction mode, and to apply a spectral shaping to a set of decoded spectral coefficients, or to a pre-processed version thereof, independence on a set of scale factor parameters for a portion of the audio content encoded in a frequency domain mode. The multi-mode audio signal decoder also comprises a frequency-domain-to-time-domain converter configured to obtain a time-domain representation of the audio content on the basis of a spectrally shaped set of decoded spectral coefficients for a portion of the audio content encoded in the linear prediction mode, and to also obtain a time-domain representation of the audio content on the basis of a spectrally shaped set of decoded spectral coefficients for a portion of the audio content encoded in the frequency domain mode.
This multi-mode audio signal decoder is based on the finding that efficient transitions between portions of the audio content encoded in different modes can be obtained by performing a spectral shaping in the frequency domain, i.e., a spectral shaping of sets of decoded spectral coefficients, both for portions of the audio content encoded in the frequency-domain mode and for portions of the audio content encoded in the linear-prediction mode. By doing so, a time-domain representation obtained on the basis of a spectrally shaped set of decoded spectral coefficients for a portion of the audio content encoded in the linear-prediction mode is “in the same domain” (for example, are output values of frequency-domain-to-time-domain transforms of the same transform type) as a time domain representation obtained on the basis of a spectrally shaped set of decoded spectral coefficients for a portion of the audio content encoded in the frequency-domain mode. Thus, the time-domain representations of a portion of the audio content encoded in the linear prediction mode and of a portion of the audio content encoded in the frequency-domain mode can be combined efficiently and without inacceptable artifacts. For example, aliasing cancellation characteristics of typical frequency-domain-to-time-domain converters can be exploited by frequency-domain-to-time-domain converting signals, which are in the same domain (for example, both represent an audio content in an audio content domain). Thus, good quality transitions can be obtained between portions of the audio content encoded in different modes without needing a substantial amount of bit rate for allowing such transitions.
In an embodiment, the multi-mode audio signal decoder further comprises an overlapper configured to overlap-and-add a time-domain representation of a portion of the audio content encoded in the linear-prediction mode with a portion of the audio content encoded in the frequency-domain mode. By overlapping portions of the audio content encoded in different domains, the advantage, which can be obtained by inputting spectrally-shaped sets of decoded spectral coefficients to the frequency-domain-to-time-domain converter in both modes of the multi-mode audio signal decoder can be realized. By performing the spectral shaping before the frequency-domain-to-time-domain conversion in both modes of the multi-mode audio signal decoder, the time-domain representations of the portions of the audio contents encoded in the different modes typically comprise very good overlap-and-add-characteristics, which allow for good quality transitions without needing additional side information.
In an embodiment, the frequency-domain-to-time-domain converter is configured to obtain a time-domain representation of the audio content for a portion of the audio content encoded in the linear-prediction mode using a lapped transform and to obtain a time-domain representation of the audio content for a portion of the audio content encoded in the frequency-domain mode using a lapped transform. In this case, the overlapper is advantageously configured to overlap time domain representations of subsequent portions of the audio content encoded in different of the modes. Accordingly, smooth transitions can be obtained. Due to the fact that a spectral shaping is applied in the frequency domain for both of the modes, the time domain representations provided by the frequency-domain-to-time-domain converter in both of the modes are compatible and allow for a good-quality transition. The use of lapped transform brings an improved tradeoff between quality and bit rate efficiency of the transitions because lapped transforms allow for smooth transitions even in the presence of quantization errors while avoiding a significant bit rate overhead.
In an embodiment, the frequency-domain-to-time-domain converter is configured to apply a lapped transform of the same transform type for obtaining time-domain representation of the audio contents of portions of the audio content encoded in different of the modes. In this case, the overlapper is configured to overlap-and-add the time domain representations of subsequent portions of the audio content encoded in different of the modes, such that a time-domain aliasing caused by the lapped transform is reduced or eliminated by the overlap-and-add. This concept is based on the fact that the output signals of the frequency-domain-to-time-domain conversion is in the same domain (audio content domain) for both of the modes by applying both the scale factor parameters and the linear-prediction-domain parameters in the frequency-domain. Accordingly, the aliasing-cancellation, which is typically obtained by applying lapped transforms of the same transform type to subsequent and partially overlapping portions of an audio signal representation can be exploited.
In an embodiment, the overlapper is configured to overlap-and-add a time domain representation of a first portion of the audio content encoded in a first of the modes, as provided by an associated synthesis lapped transform, or an amplitude-scaled but spectrally-undistorted version thereof, and a time-domain representation of a second subsequent portion of the audio content encoded in a second of the modes, as provided by an associated synthesis lapped transform, or an amplitude-scaled but spectrally-undistorted version thereof. By avoiding at the output signals of the synthesis lapped transform to apply any signal processing (for example, a filtering or the like) not common to all different coding modes used for subsequent (partially overlapping) portions of the audio content, full advantage can be taken from the aliasing—cancellation characteristics of the lapped transform.
In an embodiment, the frequency-domain-to-time-domain converter is configured to provide time-domain representations of portions of the audio content encoded indifferent of the modes such that the provided time-domain representations are in a same domain in that they are linearly combinable without applying a signal shaping filtering operation to one or both of the provided time-domain representations. In other words, the output signals of the frequency-domain-to-time-domain conversion are time-domain representations of the audio content itself for both of the modes (and not excitation signals for an excitation-domain-to-time-domain conversion filtering operation).
In an embodiment, the frequency-domain-to-time-domain converter is configured to perform an inverse modified discrete cosine transform, to obtain, as a result of the inverse-modified-discrete-cosine-transform, a time domain representation of the audio content in a audio signal domain, both for a portion of the audio content encoded in the linear prediction mode and for a portion of the audio content encoded in the frequency-domain mode.
In an embodiment, the multi-mode audio signal decoder comprises an LPC-filter coefficient determinator configured to obtain decoded LPC-filter coefficients on the basis of an encoded representation of the LPC-filter coefficients for a portion of the audio content encoded in a linear-prediction mode. In this case, the multi-mode audio signal decoder also comprises a filter coefficient transformer configured to transform the decoded LPC-filter coefficients into a spectral representation, in order to obtain gain values associated with different frequencies. Thus, the LPC-filter coefficient may serve as linear prediction domain parameters. The multi-mode audio signal decoder also comprises a scale factor determinator configured to obtain decoded scale factor values (which serve as scale factor parameters) on the basis of an encoded representation of the scale factor values for a portion of the audio content encoded in a frequency-domain mode. The spectrum processor comprises a spectrum modifier configured to combine a set of decoded spectral coefficients associated with a portion of the audio content encoded in the linear-prediction mode, or a pre-processed version thereof, with the linear-prediction mode gain values, in order to obtain a gain-value processed (and, consequently, spectrally-shaped) version of the (decoded) spectral coefficients in which contributions of the decoded spectral coefficients, or of the pre-processed version thereof, are weighted in dependence on the gain values. Also, the spectrum modifier is configured to combine a set of decoded spectral coefficients associated to a portion of the audio content encoded in the frequency-domain mode, or a pre-processed version thereof, with the decoded scale factor values, in order to obtain a scale-factor-processed (spectrally shaped) version of the (decoded) spectral coefficients in which contributions of the decoded spectral coefficients, or of the pre-processed version thereof, are weighted in dependence on the scale factor values.
By using this approach, a own noise-shaping can be obtained in both modes of the multi-mode audio signal decoder while still ensuring that the frequency-domain-to-time-domain converter provides output signals with good transition characteristics at the transitions between portions of the audio signal encoded in different modes.
In an embodiment, the coefficient transformer is configured to transform the decoded LPC-filter coefficients, which represent a time-domain impulse response of a linear-prediction-coding filter (LPC-filter), into the spectral representation using an odd discrete Fourier transform. The filter coefficient transformer is configured to derive the linear prediction mode gain values from the spectral representation of the decoded LPC-filter coefficients, such that the gain values are a function of magnitudes of coefficients of the spectral representation. Thus, the spectral shaping, which is performed in the linear-prediction mode, takes over the noise-shaping functionality of a linear-prediction-coding filter. Accordingly, quantization noise of the decoded spectral representation (or of the pre-processed version thereof) is modified such that the quantization noise is comparatively small for “important” frequencies, for which the spectral representation of the decoded LPC-filter coefficient is comparatively large.
In an embodiment, the filter coefficient transformer and the combiner are configured such that a contribution of a given decoded spectral coefficient, or of a pre-processed version thereof, to a gain-processed version of the given spectral coefficient is determined by a magnitude of a linear-prediction mode gain value associated with the given decoded spectral coefficient.
In an embodiment, the spectral value determinator is configured to apply an inverse quantization to decoded quantized spectral values, in order to obtain decoded and inversely quantized spectral coefficients. In this case, the spectrum modifier is configured to perform a quantization noise shaping by adjusting an effective quantization step for a given decoded spectral coefficient in dependence on a magnitude of a linear prediction mode gain value associated with the given decoded spectral coefficient. Accordingly, the noise-shaping, which is performed in the spectral domain, is adapted to signal characteristics described by the LPC-filter coefficients.
In an embodiment, the multi-mode audio signal decoder is configured to use an intermediate linear-prediction mode start frame in order to transition from a frequency-domain mode frame to a combined linear-prediction mode/algebraic-code-excited-linear-prediction mode frame. In this case, the audio signal decoder is configured to obtain a set of decoded spectral coefficients for the linear-prediction mode start frame. Also, the audio decoder is configured to apply a spectral shaping to the set of decoded spectral coefficients for the linear-prediction mode start frame, or to a preprocessed version thereof, in dependence on a set of linear-prediction-domain parameters associated therewith. The audio signal decoder is also configured to obtain a time-domain representation of the linear-prediction mode start frame on the basis of a spectrally shaped set of decoded spectral coefficients. The audio decoder is also configured to apply a start window having a comparatively long left-sided transition slope and a comparatively short right-sided transition slope to the time-domain representation of the linear-prediction mode start frame. By doing so, a transition between a frequency-domain mode frame and a combined linear-prediction mode/algebraic-code-excited-linear-prediction mode frame is created which comprises good overlap-and-add characteristics with the preceding frequency-domain mode frame and which, at the same time, makes linear-prediction-domain coefficients available for use by the subsequent combined linear-prediction mode/algebraic-code-excited-linear-prediction mode frame.
In an embodiment, the multi-mode audio signal decoder is configured to overlap a right-sided portion of a time-domain representation of a frequency-domain mode frame preceding the linear-prediction mode start frame with a left-sided portion of a time-domain representation of the linear-prediction mode start frame, to obtain a reduction or cancellation of a time-domain aliasing. This embodiment is based on the finding that good time-domain aliasing cancellation characteristics are obtained by performing a spectral shaping of the linear-prediction mode start frame in the frequency domain, because a spectral shaping of the previous frequency-domain mode frame is also performed in the frequency-domain.
In an embodiment, the audio signal decoder is configured to use linear-prediction domain parameters associated with the linear-prediction mode start frame in order to initialize an algebraic-code-excited-linear-prediction mode decoder for decoding at least a portion of the combined linear-prediction mode/algebraic-code-excited-linear-prediction mode frame. In this way, the need to transmit an additional set of linear-prediction-domain parameters, which exists in some conventional approaches, is eliminated. Rather, the linear-prediction mode start frame allows to create a good transition from a previous frequency-domain mode frame, even for a comparatively long overlap period, and to initialize a algebraic-code-excited-linear-prediction (ACELP) mode decoder. Thus, transitions with good audio quality can be obtained with very high degree of efficiency.
Another embodiment according to the invention creates a multi-mode audio signal encoder for providing an encoded representation of an audio content on the basis of an input representation of the audio content. The audio encoder comprises a time-domain-to-time-frequency-domain converter configured to process the input representation of the audio content, to obtain a frequency-domain representation of the audio content. The audio encoder further comprises a spectrum processor configured to apply a spectral shaping to a set of spectral coefficients, or a pre-processed version thereof, in dependence on a set of linear-prediction-domain parameters for a portion of the audio content to be encoded in the linear-prediction-domain. The spectrum processor is also configured to apply a spectral shaping to a set of spectral coefficients, or to a preprocessed version thereof, in dependence on a set of a scale factor parameters for a portion of the audio content to be encoded in the frequency-domain mode.
The above described multi-mode audio signal encoder is based on the finding that an efficient audio encoding, which allows for a simple audio decoding with low distortions, can be obtained if an input representation of the audio content is converted into the frequency-domain (also designated as time-frequency domain) both for portions of the audio content to be encoded in the linear-prediction mode and for portions of the audio content to be encoded in the frequency-domain mode. Also, it has been found that quantization errors can be reduced by applying a spectral shaping to a set of spectral coefficients (or a pre-processed version thereof) both for a portion of the audio content to be encoded in the linear-prediction mode and for a portion of the audio content to be encoded in the frequency-domain mode. If different types of parameters are used to determine the spectral shaping in the different modes (namely, linear-prediction-domain parameters in the linear-prediction mode and scale factor parameters in the frequency-domain mode), the noise shaping can be adapted to the characteristic of the currently-processed portion of the audio content while still applying the time-domain-to-frequency-domain conversion to (portions of) the same audio signal in the different modes. Consequently, the multi-mode audio signal encoder is capable of providing a good coding performance for audio signals having both general audio portions and speech audio portions by selectively applying the proper type of spectral shaping to the sets of spectral coefficients. In other words, a spectral shaping on the basis of a set of linear-prediction-domain parameters can be applied to a set of spectral coefficients for an audio frame which is recognized to be speech-like, and a spectral shaping on the basis of a set of scale factor parameters can be applied to a set of spectral coefficients for an audio frame which is recognized to be of a general audio type, rather than of a speech-like type.
To summarize the multi-mode audio signal encoder allows for encoding an audio content having temporally variable characteristics (speech like for some temporal portions and general audio for other portions) wherein the time-domain representation of the audio content is converted into the frequency domain in the same way for portions of the audio content to be encoded in different modes. The different characteristics of different portions of the audio content are considered by applying a spectral shaping on the basis of different parameters (linear-prediction-domain parameters versus scale factor parameters), in order to obtain spectrally shaped spectral coefficients or the subsequent quantization.
In an embodiment, the time-domain-to-frequency-domain converter is configured to convert a time-domain representation of an audio content in an audio signal domain into a frequency-domain representation of the audio content both for a portion of the audio content to be encoded in the linear-prediction mode and for a portion of the audio content to be encoded in the frequency-domain mode. By performing the time-domain-to-frequency-domain conversion (in the sense of a transform operation, like, for example, an MDCT transform operation or a filter bank-based frequency separation operation) on the basis of the same input signal both for the frequency-domain mode and the linear-prediction mode, a decoder-sided overlap-and-add operation can be performed with particularly good efficiency, which facilitates the signal reconstruction at the decoder side and avoids the need to transmit additional data whenever there is a transition between the different modes.
In an embodiment, the time-domain-to-frequency-domain converter is configured to apply an analysis lapped transforms of the same transform type for obtaining frequency-domain representations for portions of the audio content to be encoded in different modes. Again, using lapped transforms of the same transform type allows for a simple reconstruction of the audio content while avoiding blocking artifacts. In particular, it is possible to use a critical sampling without a significant overhead.
In an embodiment, the spectrum processor is configured to selectively apply the spectral shaping to the set of spectral coefficients, or a pre-processed version thereof, in dependence on a set of linear prediction domain parameters obtained using a correlation-based analysis of a portion of the audio content to be encoded in the linear prediction mode, or in dependence on a set of scale factor parameters obtained using a psychoacoustic model analysis of a portion of the audio content to be encoded in the frequency domain mode. By doing so, an appropriate noise shaping can be achieved both for speech-like portions of the audio content, in which the correlation-based analysis provides meaningful noise shaping information, and for general audio portions of the audio content, for which the psychoacoustic model analysis provides meaningful noise shaping information.
In an embodiment, the audio signal encoder comprises a mode selector configured to analyze the audio content in order to decide whether to encode a portion of the audio content in the linear-prediction mode or in the frequency-domain mode. Accordingly, the appropriate noise shaping concept can be chosen while leaving the type of time-domain-to-frequency-domain conversion unaffected in some cases.
In an embodiment, the multi-mode audio signal encoder is configured to encode an audio frame, which is between a frequency-domain mode frame and a combined linear-prediction mode/algebraic-code-excited-linear-prediction mode frame as a linear-prediction mode start frame. The multi-mode audio signal encoder is configured to apply a start window having a comparatively long left-sided transition slope and a comparatively short right-sided transition slope to the time-domain representation of the linear-prediction mode start frame, to obtain a windowed time-domain representation. The multi-mode audio signal encoder is also configured to obtain a frequency-domain representation of the windowed time-domain representation of the linear-prediction mode start frame. The multi-mode audio signal encoder is also configured to obtain a set of linear-prediction domain parameters for the linear-prediction mode start frame and to apply a spectral shaping to the frequency-domain representation of the windowed time-domain representation of the linear-prediction mode start frame, or to a pre-processed version thereof, in dependence on the set of linear-prediction-domain parameters. The audio signal encoder is also configured to encode the set of linear-prediction-domain parameters and the spectrally-shaped frequency-domain representation of the windowed time-domain representation of the linear-prediction mode start frame. In this manner, encoded information of a transition audio frame is obtained, which encoded information of the transition audio frame can be used for a reconstruction of the audio content, wherein the encoded information about the transition audio frame allows for a smooth left-sided transition and at the same time allows for an initialization of an ACELP mode decoder for decoding a subsequent audio frame. An overhead caused by the transition between different modes of the multi-mode audio signal encoder is minimized.
In an embodiment, the multi-mode audio signal encoder is configured to use the linear-prediction-domain parameters associated with the linear-prediction mode start frame in order to initialize an algebraic-code-excited-linear prediction mode encoder for encoding at least a portion of the combined linear-prediction mode/algebraic-code-excited-linear-prediction mode frame following the linear-prediction mode start frame. Accordingly, the linear-prediction-domain parameters, which are obtained for the linear-prediction mode start frame, and which are also encoded in a bit stream representing the audio content, are re-used for the encoding of a subsequent audio frame, in which the ACELP-mode is used. This increases the efficiency of the encoding and also allows for an efficient decoding without additional ACELP initialization side information.
In an embodiment, the multi-mode audio signal encoder comprises an LPC-filter coefficient determinator configured to analyze a portion of the audio content to be encoded in a linear-prediction mode, or a pre-processed version thereof, to determine LPC-filter coefficients associated with the portion of the audio content to be encoded in the linear-prediction mode. The multi-mode audio signal encoder also comprises a filter coefficient transformer configured to transform the decoded LPC-filter coefficients into a spectral representation, in order to obtain linear prediction mode gain values associated with different frequencies. The multi-mode audio signal encoder also comprises a scale factor determinator configured to analyze a portion of the audio content to be encoded in the frequency-domain mode, or a pre-processed version thereof, to determine scale factors associated with the portion of the audio content to be encoded in the frequency-domain mode. The multi-mode audio signal encoder also comprises a combiner arrangement configured to combine a frequency-domain representation of a portion of the audio content to be encoded in the linear prediction mode, or a processed version thereof, with the linear prediction mode gain values, to obtain gain-processed spectral components (also designated as coefficients), wherein contributions of the spectral components (or spectral coefficients) of the frequency-domain representation of the audio content are weighted in dependence on the linear prediction mode gain values. The combiner is also configured to combine a frequency-domain representation of a portion of the audio content to be encoded in the frequency domain mode, or a processed version thereof, with the scale factors, to obtain gain-processed spectral components, wherein contributions of the spectral components (or spectral coefficients) of the frequency-domain representation of the audio content are weighted in dependence on the scale factors.
In this embodiment, the gain-processed spectral components form spectrally shaped sets of spectral coefficients (or spectral components).
Another embodiment according to the invention creates a method for providing a decoded representation of an audio content on the basis of an encoded representation of the audio content.
Yet another embodiment according to the invention creates a method for providing an encoded representation of an audio content on the basis of an input representation of the audio content.
Yet another embodiment according to the invention creates a computer program for performing one or more of said methods.
The methods and the computer program are based on the same findings as the above discussed apparatus.
Embodiments of the present invention will subsequently be described taking reference to the enclosed Figs., in which:
a shows a schematic representation of an audio window transition in an embodiment of the invention;
b shows a table representing an audio window transition in an extended embodiment according to the invention; and
In the following, an audio signal encoder according to an embodiment of the invention will be discussed taking reference to
The audio encoder 100 is configured to receive an input representation 110 of an audio content, which input representation 100 is typically a time-domain representation. The audio encoder 100 provides, on the basis thereof, an encoded representation of the audio content. For example, the audio encoder 100 provides a bitstream 112, which is an encoded audio representation.
The audio encoder 100 comprises a time-domain-to-frequency-domain converter 120, which is configured to receive the input representation 110 of the audio content, or a pre-processed version 110′ thereof. The time-domain-to-frequency-domain converter 120 provides, on the basis of the input representation 110, 110′, a frequency-domain representation 122 of the audio content. The frequency-domain representation 122 may take the form of a sequence of sets of spectral coefficients. For example, the time-domain-to-frequency-domain converter may be a window-based time-domain-to-frequency-domain converter, which provides a first set of spectral coefficients on the basis of time-domain samples of a first frame of the input audio content, and to provide a second set of spectral coefficients on the basis of time-domain samples of a second frame of the input audio content. The first frame of the input audio content may overlap, for example, by approximately 50%, with the second frame of the input audio content. A time-domain windowing may be applied to derive the first set of spectral coefficients from the first audio frame, and a windowing can also be applied to derive the second set of spectral coefficients from the second audio frame. Thus, the time-domain-to-frequency-domain converter may be configured to perform lapped transforms of windowed portions (for example, overlapping frames) of the input audio information.
The audio encoder 100 also comprises a spectrum processor 130, which is configured to receive the frequency-domain representation 122 of the audio content (or, optionally, a spectrally post-processed version 122′ thereof), and to provide, on the basis thereof, a sequence of spectrally-shaped sets 132 of spectral coefficients. The spectrum processor 130 may be configured to apply a spectral shaping to a set 122 of spectral coefficients, or a pre-processed version 122′ thereof, in dependence on a set of linear-prediction-domain parameters 134 for a portion (for example, a frame) of the audio content to be encoded in the linear-prediction mode, to obtain a spectrally-shaped set 132 of spectral coefficients. The spectrum processor 130 may also be configured to apply a spectral shaping to a set 122 of spectral coefficients, or to a pre-processed version 122′ thereof, in dependence on a set of scale factor parameters 136 for a portion (for example, a frame) of the audio content to be encoded in a frequency-domain mode, to obtain a spectrally-shaped set 132 of spectral coefficients for said portion of the audio content to be encoded in the frequency domain mode. The spectrum processor 130 may, for example, comprise a parameter provider 138, which is configured to provide the set of linear-prediction-domain parameters 134 and the set of scale factor parameters 136. For example, the parameter provider 138 may provide the set of linear-prediction-domain parameters 134 using a linear-prediction-domain analyzer, and to provide the set of scale factor parameters 136 using a psycho-acoustic model processor. However, other possibilities to provide the linear-prediction-domain parameters 134 or the set of scale factor parameters 136 may also be applied.
The audio encoder 100 also comprises a quantizing encoder 140, which is configured to receive a spectrally-shaped set 132 of spectral coefficients (as provided by the spectrum processor 130) for each portion (for example, for each frame) of the audio content. Alternatively, the quantizing encoder 140 may receive a post-processed version 132′ of a spectrally-shaped set 132 of spectral coefficients. The quantizing encoder 140 is configured to provide an encoded version 142 of a spectrally-shaped set of spectral coefficients 132 (or, optionally, of a pre-processed version thereof). The quantizing encoder 140 may, for example, be configured to provide an encoded version 142 of a spectrally-shaped set 132 of spectral coefficients for a portion of the audio content to be encoded in the linear-prediction mode, and to also provide an encoded version 142 of a spectrally-shaped set 132 of spectral coefficients for a portion of the audio content to be encoded in the frequency-domain mode. In other words, the same quantizing encoder 140 may be used for encoding spectrally-shaped sets of spectral coefficients irrespective of whether a portion of the audio content is to be encoded in the linear-prediction mode or the frequency-domain mode.
In addition, the audio encoder 100 may optionally comprise a bitstream payload formatter 150, which is configured to provide the bitstream 112 on the basis of the encoded versions 142 of the spectrally-shaped sets of spectral coefficients. However, the bitstream payload formatter 150 may naturally include additional encoded information in the bitstream 112, as well as configuration information control information, etc. For example, an optional encoder 160 may receive the encoded set 134 of linear-prediction-domain parameters and/or the set 136 of scale factor parameters and provide an encoded version thereof to the bitstream payload formatter 150. Accordingly, an encoded version of the set 134 of linear-prediction-domain parameters may be included into the bitstream 112 for a portion of the audio content to be encoded in the linear-prediction mode and an encoded version of the set 136 of scale factor parameters may be included into the bitstream 112 for a portion of the audio content to be encoded in the frequency-domain.
The audio encoder 100 further comprises, optionally, a mode controller 170, which is configured to decide whether a portion of the audio content (for example, a frame of the audio content) is to be encoded in the linear-prediction mode or in the frequency-domain mode. For this purpose, the mode controller 170 may receive the input representation 110 of the audio content, the pre-processed version 110′ thereof or the frequency-domain representation 122 thereof. The mode controller 170 may, for example, use a speech detection algorithm to determine speech-like portions of the audio content and provide a mode control signal 172 which indicates to encode the portion of the audio content in the linear-prediction mode in response to detecting a speech-like portion. In contrast, if the mode controller finds that a given portion of the audio content is not speech-like, the mode controller 170 provides the mode control signal 172 such that the mode control signal 172 indicates to encode said portion of the audio content in the frequency-domain mode.
In the following, the overall functionality of the audio encoder 100 will be discussed in detail. The multi-mode audio signal encoder 100 is configured to efficiently encode both portions of the audio content which are speech-like and portions of the audio content which are not speech-like. For this purpose, the audio encoder 100 comprises at least two modes, namely the linear-prediction mode and the frequency-domain mode. However, the time-domain-to-frequency-domain converter 120 of the audio encoder 110 is configured to transform the same time-domain representation of the audio content (for example, the input representation 110, or the pre-processed version 110′ thereof) into the frequency-domain both for the linear-prediction mode and the frequency-domain mode. A frequency resolution of the frequency-domain representation 122 may, however, be different for the different modes of operation. The frequency-domain representation 122 is not quantized and encoded immediately, but rather spectrally-shaped before the quantization and the encoding. The spectral-shaping is performed in such a manner that an effect of the quantization noise introduced by the quantizing encoder 140 is kept sufficiently small, in order to avoid excessive distortions. In the linear-prediction mode, the spectral shaping is performed in dependence on a set 134 of linear-prediction-domain parameters, which are derived from the audio content. In this case, the spectral shaping may, for example, be performed such that spectral coefficients are emphasized (weighted higher) if a corresponding spectral coefficient of a frequency-domain representation of the linear-prediction-domain parameters comprises a comparatively larger value. In other words, spectral coefficients of the frequency-domain representation 122 are weighted in accordance with corresponding spectral coefficients of a spectral domain representation of the linear-prediction-domain parameters. Accordingly, spectral coefficients of the frequency-domain representation 122, for which the corresponding spectral coefficient of the spectral domain representation of the linear-prediction-domain parameters take comparatively larger values, are quantized with comparatively higher resolution due to the higher weighting in the spectrally-shaped set 132 of spectral coefficients. In other words, there are portions of the audio content for which a spectral shaping in accordance with the linear-prediction-domain parameters 134 (for example, in accordance with a spectral-domain representation of the linear-prediction-domain parameters 134) brings along a good noise shaping, because spectral coefficients of the frequency-domain representation 132, which are more sensitive with respect to quantization noise, are weighted higher in the spectral shaping, such that the effective quantization noise introduced by the quantizing encoder 140 is actually reduced.
In contrast, portions of the audio content, which are encoded in the frequency-domain mode, experience a different spectral shaping. In this case, scale factor parameters 136 are determined, for example, using a psycho-acoustic model processor. The psycho-acoustic model processor evaluates a spectral masking and/or temporal masking of spectral components of the frequency-domain representation 122. This evaluation of the spectral masking and temporal masking is used to decide which spectral components (for example, spectral coefficients) of the frequency-domain representation 122 should be encoded with high effective quantization accuracy and which spectral components (for example, spectral coefficients) of the frequency-domain representation 122 may be encoded with comparatively low effective quantization accuracy. In other words, the psycho-acoustic model processor may, for example, determine the psycho-acoustic relevance of different spectral components and indicate that psycho-acoustically less-important spectral components should be quantized with low or even very low quantization accuracy. Accordingly, the spectral shaping (which is performed by the spectrum processor 130), may weight the spectral components (for example, spectral coefficients) of the frequency-domain representation 122 (or of the post-processed version 122′ thereof), in accordance with the scale factor parameters 136 provided by the psycho-acoustic model processor. Psycho-acoustically important spectral components are given a high weighting in the spectral shaping, such that they are effectively quantized with high quantization accuracy by the quantizing encoder 140. Thus, the scale factors may describe a psychoacoustic relevance of different frequencies or frequency bands.
To conclude, the audio encoder 100 is switchable between at least two different modes, namely a linear-prediction mode and a frequency-domain mode. Overlapping portions of the audio content can be encoded in different of the modes. For this purpose, frequency-domain representations of different (but advantageously overlapping) portions of the same audio signal are used when encoding subsequent (for example immediately subsequent) portions of the audio content in different modes. Spectral domain components of the frequency-domain representation 122 are spectrally shaped in dependence on a set of linear-prediction-domain parameters for a portion of the audio content to be encoded in the frequency-domain mode, and in dependence on scale factor parameters for a portion of the audio content to be encoded in the frequency-domain mode. The different concepts, which are used to determine an appropriate spectral shaping, which is performed between the time-domain-to-frequency-domain conversion and the quantization/encoding, allows to have a good encoding efficiency and low distortion noise shaping for different types of audio contents (speech-like and non-speech-like).
In the following, an audio encoder 300 according to another embodiment of the invention will be described taking reference to
In other words, to facilitate the understanding of the audio encoder 300 according to
The linear-prediction-domain encoder 240 is configured to provide an encoded excitation 242 and an encoded LPC-filter coefficient information 244 on the basis of the input audio representation 210″. The LPD coder 240 comprises a linear-prediction analysis 240a, which is configured to provide LPC-filter coefficients 240b and the encoded LPC-filter coefficient information 244 on the basis of the input representation 210″ of the audio content. The LPD coder 240 also comprises an excitation encoding, which comprises two parallel branches, namely a TCX branch 250 and an ACELP branch 260. The branches are switchable (for example, using a switch 270), to either provide a transform-coded-excitation 252 or an algebraic-encoded-excitation 262. The TCX branch 250 comprises an LPC-based filter 250a, which is configured to receive both the input representation 210″ of the audio content and the LPC-filter coefficients 240b provided by the LP analysis 240a. The LPC-based filter 250a provides a filter output signal 250b, which may describe a stimulus needed by an LPC-based filter in order to provide an output signal which is sufficiently similar to the input representation 210″ of the audio content. The TCX branch also comprises a modified-discrete-cosine-transform (MDCT) configured to receive the stimulus signal 250d and to provide, on the basis thereof, a frequency-domain representation 250d of the stimulus signal 250b. The TCX branch also comprises a quantizer 250e configured to receive the frequency-domain representation 250b and to provide a quantized version 250f thereof. The TCX branch also comprises an entropy-coder 250g configured to receive the quantized version 250f of the frequency-domain representation 250d of the stimulus signal 250b and to provide, on the basis thereof, the transform-coded excitation signal 252.
The ACELP branch 260 comprises an LPC-based filter 260a which is configured to receive the LPC filter coefficients 240b provided by the LP analysis 240a and to also receive the input representation 210″ of the audio content. The LPC-based filter 260a is configured to provide, on the basis thereof, a stimulus signal 260b, which describes, for example, a stimulus needed by a decoder-sided LPC-based filter in order to provide a reconstructed signal which is sufficiently similar to the input representation 210″ of the audio content. The ACELP branch 260 also comprises an ACELP encoder 260c configured to encode the stimulus signal 260b using an appropriate algebraic coding algorithm.
To summarize the above, in a switching audio codec, like, for example, an audio codec according to the MPEG-D unified speech and audio coding working draft (USAC), which is described in reference [1], adjacent segments of an input signal can be processed by different coders. For example, the audio codec according to the unified speech and audio coding working draft (USAC WD) can switch between a frequency-domain coder based on the so-called advanced audio coding (AAC), which is described, for example, in reference [2], and linear-prediction-domain (LPD) coders, namely TCX and ACELP, based on the so-called AMR-WB+concept, which is described, for example, in reference [3]. The USAC encoder is schematized in
It has been found that the design of transitions between the different coders is an important or even essential issue for being able to switch seamlessly between the different coders. It has also been found that it is usually difficult to achieve such transitions due to the different nature of the coding techniques gathering in the switched structure. However, it has been found that common tools shared by the different coders may ease the transitions. Taking reference now to the reference audio encoder 200 according to
Taking reference again to the reference audio encoder 200 according to
In the following, the audio signal encoder 300 according to
The audio signal encoder 300 is configured to receive an input representation 310 of an audio content, and to provide, on the basis thereof, an encoded representation 312 of the audio content. The audio signal encoder 300 is configured to be switchable between a frequency-domain mode, in which an encoded representation of a portion of the audio content is provided by a frequency domain coder 230, and a linear-prediction mode in which an encoded representation of a portion of the audio content is provided by the linear prediction-domain coder 340. The portions of the audio content encoded in different of the modes may be overlapping in some embodiments, and may be non-overlapping in other embodiments.
The frequency-domain coder 330 receives the input representation 310′ of the audio content for a portion of the audio content to be encoded in the frequency-domain mode and provides, on the basis thereof, an encoded spectral representation 332. The linear-prediction domain coder 340 receives the input representation 310″ of the audio content for a portion of the audio content to be encoded in the linear-prediction mode and provides, on the basis thereof, an encoded excitation 342. The switch 320 may be used, optionally, to provide the input representation 310 to the frequency-domain coder 330 and/or to the linear-prediction-domain coder 340.
The frequency-domain coder also provides an encoded scale factor information 334. The linear-prediction-domain coder 340 provides an encoded LPC-filter coefficient information 344.
The output-sided multiplexer 380 is configured to provide, as the encoded representation 312 of the audio content, the encoded spectral representation 332 and the encoded scale factor information 334 for a portion of the audio content to be encoded in the frequency-domain and to provide, as the encoded representation 312 of the audio content, the encoded excitation 342 and the encoded LPC filter coefficient information 344 for a portion of the audio content to be encoded in the linear-prediction mode.
The frequency-domain encoder 330 comprises a modified-discrete-cosine-transform 330a, which receives the time-domain representation 310′ of the audio content and transforms the time-domain representation 310′ of the audio content, to obtain a MDCT-transformed frequency-domain representation 330b of the audio content. The frequency-domain coder 330 also comprises a psycho-acoustic analysis 330c, which is configured to receive the time-domain representation 310′ of the audio content and to provide, on the basis thereof, scale factors 330d and the encoded scale factor information 334. The frequency-domain coder 330 also comprises a combiner 330e configured to apply the scale factors 330e to the MDCT-transformed frequency-domain representation 330d of the audio content, in order to scale the different spectral coefficients of the MDCT-transformed frequency-domain representation 330b of the audio content with different scale factor values. Accordingly, a spectrally-shaped version 330f of the MDCT-transformed frequency-domain representation 330d of the audio content is obtained, wherein the spectral-shaping is performed in dependence on the scale factors 330d, wherein spectral regions, to which comparatively large scale factors 330e are associated, are emphasized over spectral regions to which comparatively smaller scale factors 330e are associated. The frequency-domain coder 330 also comprises a quantizer configured to receive the scaled (spectrally-shaped) version 330f of the MDCT-transformed frequency-domain representation 330b of the audio content, and to provide a quantized version 330h thereof. The frequency-domain coder 330 also comprises an entropy coder 330i configured to receive the quantized version 330h and to provide, on the basis thereof, the encoded spectral representation 332. The quantizer 330g and the entropy coder 330i may be considered as a quantizing encoder.
The linear-prediction-domain coder 340 comprises a TCX branch 350 and a ACELP branch 360. In addition, the LPD coder 340 comprises an LP analysis 340a, which is commonly used by the TCX branch 350 and the ACELP branch 360. The LP analysis 340a provides LPC-filter coefficients 340b and the encoded LPC-filter coefficient information 344.
The TCX branch 350 comprises an MDCT transform 350a, which is configured to receive, as an MDCT transform input, the time-domain representation 310″. Importantly to note, the MDCT 330a of the frequency-domain coder and the MDCT 350a of the TCX branch 350 receive (different) portions of the same time-domain representation of the audio content as transform input signals.
Accordingly, if subsequent and overlapping portions (for example, frames) of the audio content are encoded in different modes, the MDCT 330a of the frequency domain coder 330 and the MDCT 350a of the TCX branch 350 may receive time domain representations having a temporal overlap as transform input signals. In other words, the MDCT 330a of the frequency domain coder 330 and the MDCT 350a of the TCX branch 350 receive transform input signals which are “in the same domain”, i.e. which are both time domain signals representing the audio content. This is in contrast to the audio encoder 200, wherein the MDCT 230a of the frequency domain coder 230 receives a time domain representation of the audio content while the MDCT 250c of the TCX branch 250 receives a residual time-domain representation of a signal or excitation signal 250b, but not a time domain representation of the audio content itself.
The TCX branch 350 further comprises a filter coefficient transformer 350b, which is configured to transform the LPC filter coefficients 340b into the spectral domain, to obtain gain values 350c. The filter coefficient transformer 350b is sometimes also designated as a “linear-prediction-to-MDCT-converter”. The TCX branch 350 also comprises a combiner 350d, which receives the MDCT-transformed representation of the audio content and the gain values 350c and provides, on the basis thereof, a spectrally shaped version 350e of the MDCT-transformed representation of the audio content. For this purpose, the combiner 350d weights spectral coefficients of the MDCT-transformed representation of the audio content in dependence on the gain values 350c in order to obtain the spectrally shaped version 350e. The TCX branch 350 also comprises a quantizer 350f which is configured to receive the spectrally shaped version 350e of the MDCT-transformed representation of the audio content and to provide a quantized version 350g thereof. The TCX branch 350 also comprises an entropy encoder 350h, which is configured to provide an entropy-encoded (for example, arithmetically encoded) version of the quantized representation 350g as the encoded excitation 342.
The ACELP branch comprises an LPC based filter 360a, which receives the LPC filter coefficients 340b provided by the LP analysis 340a and the time domain representation 310″ of the audio content. The LPC based filter 360a takes over the same functionality as the LPC based filter 260a and provides an excitation signal 360b, which is equivalent to the excitation signal 260b. The ACELP branch 360 also comprises an ACELP encoder 360c, which is equivalent to the ACELP encoder 260c. The ACELP encoder 360c provides an encoded excitation 342 for a portion of the audio content to be encoded using the ACELP mode (which is a sub-mode of the linear prediction mode).
Regarding the overall functionality of the audio encoder 300, it can be said that a portion of the audio content can either be encoded in the frequency domain mode, in the TCX mode (which is a first sub-mode of the linear prediction mode) or in the ACELP mode (which is a second sub-mode of the linear prediction mode). If a portion of the audio content is encoded in the frequency domain mode or in the TCX mode, the portion of the audio content is first transformed into the frequency domain using the MDCT 330a of the frequency domain coder or the MDCT 350a of the TCX branch. Both the MDCT 330a and the MDCT 350a operate on the time domain representation of the audio content, and even operate, at least partly, on identical portions of the audio content when there is a transition between the frequency domain mode and the TCX mode. In the frequency domain mode, the spectral shaping of the frequency domain representation provided by the MDCT transformer 330a is performed in dependence on the scale factor provided by the psychoacoustic analysis 330c, and in the TCX mode, the spectral shaping of the frequency domain representation provided by the MDCT 350a is performed in dependence on the LPC filter coefficients provided by the LP analysis 340a. The quantization 330g may be similar to, or even identical to the quantization 350f, and the entropy encoding 330i may be similar to, or even identical to, the entropy encoding 350h. Also, the MDCT transform 330a may be similar to, or even identical to, the MDCT transform 350a. However, different dimensions of the MDCT transform may be used in the frequency domain coders 330 and the TCX branch 350.
Moreover, it can be seen that the LPC filter coefficients 340b are used both by the TCX branch 350 and the ACELP branch 360. This facilitates transitions between portions of the audio content encoded in the TCX mode and portions of the audio content encoded in the ACELP mode.
To summarize the above, one embodiment of the present invention consists of performing, in the context of unified speech and audio coding (USAC), the MDCT 350a of the TCX in the time domain and applying the LPC-based filtering in the frequency domain (combiner 350d). The LPC analysis (for example, LP analysis 340a) is done as before (for example, as in the audio signal encoder 200), and the coefficients (for example, the coefficients 340b) are still transmitted as usual (for example, in the form of encoded LPC filter coefficients 344). However, the noise shaping is no more done by applying in the time domain a filter but by applying a weighting in the frequency domain (which is performed, for example, by the combiner 350d). The noise shaping in the frequency domain is achieved by converting the LPC coefficients (for example, the LPC filter coefficients 340b) into the MDCT domain (which may be performed by the filter coefficients transformer 350b). For details, reference is made to
In the following, the computation and application of the LPC coefficients will be described. First, a appropriate set of LPC coefficients are calculated for the present TCX window, for example, using the LPC analysis 340a. A TCX window may be a windowed portion of the time domain representation of the audio content, which is to be encoded in the TCX mode. The LPC analysis windows are located at the end bounds of LPC coder frames, as is shown in
Taking reference to
An interpolation is done for computing the LPC set of coefficients 340b corresponding to the barycentre of the TCX window. The interpolation is performed in the immittance spectral frequency (ISF domain), where the LPC coefficients are usually quantized and coded. The interpolated coefficients are then centered in the middle of the TCX window of size sizeR+sizeM+sizeL.
For details, reference is made to
The interpolated LPC coefficients are then weighted as is done in TCX (for details, see reference [3]), for getting an appropriate noise shaping inline with psychoacoustic consideration. The obtained interpolated and weighted LPC coefficients (also briefly designated with lpc_coeffs) are finally converted to MDCT scale factors (also designated as linear prediction mode gain values) using a method, a pseudo code of which is shown in
Accordingly, the arrays “InRealData[i]” and “InImagData[i]” describe a real part and an imaginary part of a time domain response described by the LPC coefficients, modulated with a complex modulation term (cos(i·π/sizeN)−j·sin(i·π/sizeN)).
Subsequently, a complex fast Fourier transform is applied, wherein the arrays “InRealData[i]” and “InImagData[i]” describe the input signal of the complex fast Fourier transform. A result of the complex fast Fourier transform is provided by the arrays “OutRealData” and “OutImagData”. Thus, the arrays “OutRealData” and “OutImagData” describe spectral coefficients (having frequency indices i) representing the LPC filter response described by the time domain filter coefficients.
Subsequently, so-called MDCT scale factors are computed, which have frequency indices i, and which are designated with “mdct_scaleFactors[i]”. An MDCT scale factor “mdct_scaleFactors[i]” is computed as the inverse of the absolute value of the corresponding spectral coefficient (described by the entries “OutRealData[i]” and “OutImagData[i]”).
It should be noted that the complex-valued modulation operation shown at reference numeral 510 and the execution of a complex fast Fourier transform shown at reference numeral 520 effectively constitute an odd discrete Fourier transform (ODFT). The odd discrete Fourier transform has the following formula:
where N=sizeN, which is two times the size of the MDCT
In the above formula, LPC coefficients lpc_coeffs[n] take the role of the transform input function x(n). The output function X0(k) is represented by the values “OutRealData[k]” (real part) and “OutImagData[k]” (imaginary part).
The function “complex_fft( )” is a fast implementation of a conventional complex discrete Fourier transform (DFT). The obtained MDCT scale factors (“mdct_scaleFactors”) are positive values which are then used to scale the MDCT coefficients (provided by the MDCT 350a) of the input signal. The scaling will be performed in accordance with the pseudo-code shown in
The windowing and the overlapping between subsequent frames are described in
Taking reference now to
The second audio frame 716, which overlaps the first audio frame 710 by approximately 50%, and which is encoded in the frequency-domain mode, is windowed using a window 718, which is designated as a “start window”. The start window has a long left-sided transition slope 718a and a short right-sided transition slope 718c.
A third audio frame 722, which is encoded in the linear prediction mode, is windowed using a linear prediction mode window 724, which comprises a short left-sided transition slope 724a matching the right-sided transition slope 718c and a short right-sided transition slope 724c. A fourth audio frame 728, which is encoded in the frequency domain mode, is windowed using a “stop window” 730 having a comparatively short left-sided transition slope 730a and a comparatively long right-sided transition slope 730c.
When transitioning from the frequency domain mode to the linear prediction mode, i.e. as a transition between the second audio frame 716 and the third audio frame 722, an extra set of LPC coefficients (also designated as “LPC0”) is conventionally sent for securing a proper transition to the linear prediction domain coding mode.
However, and embodiment according the invention creates an audio encoder having a new type of start window for the transition between the frequency domain mode and the linear prediction mode. Taking reference now to
A third audio frame 822 is windowed using a window 824, which is identical to the window 724 described before. The third audio frame 822 is encoded in the linear prediction mode. A fourth audio frame 828 is windowed using a window 830, which is substantially identical to the window 730.
The concept described with reference to
To summarize, in the embodiment described with reference to
To summarize the above,
In the following, an audio signal encoder 900 will be described taking reference to
However, the audio signal encoder 900 is extended in comparison to the audio signal encoder 300 in that the combiner 330e of the frequency domain coder 930 can selectively apply the scale factors 340d or linear prediction domain gain values 350c for the spectral shaping. For this purpose, a switch 930j is used, which allows to feed either the scale factors 330d or the linear prediction domain gain values 350c to the combiner 330e for the spectral shaping of the spectral coefficients 330b. Thus, the audio signal encoder 900 knows even three modes of operation, namely:
By using the above-described third mode, it is possible to achieve the transition which has been described with reference to
In the following, a unified view of the USAC (unified speech-and-audio coding) with TCX MDCT performed in the signal domain will be described taking reference to
It should be noted here that in some embodiments according to the invention the TCX branch 350 and the frequency domain coder 330, 930 share almost all the same coding tools (MDCT 330a, 350a; combiner 330e, 350d; quantization 330g, 350f; entropy coder 330i, 350h) and can be considered as a single coder, as it is depicted in
Taking reference now to
The audio signal encoder 1000 comprises an ACELP signal processing path 1060, which also receives the time domain representation 1010 of the audio content and which provides, on the basis thereof, an encoded excitation 1062 using an LPC filter coefficient information 1040b. The ACELP signal processing path 1060, which may be considered as being optional, comprises an LPC based filter 1060a, which receives the time domain representation 1010 of the audio content and provides a residual signal or excitation signal 1060b to the ACELP encoder 1060c. The ACELP encoder provides the encoded excitation 1062 on the basis of the excitation signal or residual signal 1060b.
The audio signal encoder 1000 also comprises a common signal analyzer 1070 which is configured to receive the time domain representation 1010 of the audio content and to provide, on the basis thereof, the spectral shaping information 1040a and the LPC filter coefficient filter information 1040b, as well as an encoded version of the side information needed for decoding a current audio frame. Thus, the common signal analyzer 1070 provides the spectral shaping information 1040a using a psychoacoustic analysis 1070a if the current audio frame is encoded in the frequency domain mode, and provides an encoded scale factor information if the current audio frame is encoded in the frequency domain mode. The scale factor information, which is used for the spectral shaping, is provided by the psychoacoustic analysis 1070a, and an encoded scale factor information describing the scale factors 1070b is included into the bitstream 1012 for an audio frame encoded in the frequency domain mode.
For an audio frame encoded in the TCX sub-mode of the linear prediction mode, the common signal analyzer 1070 derives the spectral shaping information 1040a using a linear prediction analysis 1070c. The linear prediction analysis 1070c results in a set of LPC filter coefficients, which are transformed into a spectral representation by the linear prediction-to-MDCT block 1070d. Accordingly, the spectral shaping information 1040a is derived from the LPC filter coefficients provided by the LP analysis 1070c as discussed above. Consequently, for an audio frame encoded in the transform-coded excitation sub-mode of the linear-prediction mode, the common signal analyzer 1070 provides the spectral shaping information 1040a on the basis of the linear-prediction analysis 1070c (rather than on the basis of the psychoacoustic analysis 1070a) and also provides an encoded LPC filter coefficient information rather than an encoded scale-factor information, for inclusion into the bitstream 1012.
Moreover, for an audio frame to be encoded in the ACELP sub-mode of the linear-prediction mode, the linear-prediction analysis 1070c of the common signal analyzer 1070 provides the LPC filter coefficient information 1040b to the LPC-based filter 1060a of the ACELP signal processing branch 1060. In this case, the common signal analyzer 1070 provides an encoded LPC filter coefficient information for inclusion into the bitstream 1012.
To summarize the above, the same signal processing path is used for the frequency-domain mode and for the TCX sub-mode of the linear-prediction mode. However, the windowing applied before or in combination with the MDCT and the dimension of the MDCT 1030a may vary in dependence on the encoding mode. Nevertheless, the frequency-domain mode and the TCX sub-mode of the linear-prediction mode differ in that an encoded scale-factor information is included into the bitstream in the frequency-domain mode while an encoded LPC filter coefficient information is included into the bitstream in the linear-prediction mode.
In the ACELP sub-mode of the linear-prediction mode, an ACELP-encoded excitation and an encoded LPC filter coefficient information is included into the bitstream.
In the following, an audio signal decoder will be described, which is capable of decoding the encoded representation of an audio content provided by the audio signal encoder described above.
The audio signal decoder 1100 according to
The audio signal decoder 1100 also comprises a spectral value determinator 1130 which is configured to obtain a plurality of sets 1132 of decoded spectral coefficients for a plurality of portions (for example, overlapping or non-overlapping audio frames) of the audio content. The sets of decoded spectral coefficients may optionally be preprocessed using a preprocessor 1140, thereby yielding preprocessed sets 1132′ of decoded spectral coefficients.
The audio signal decoder 1100 also comprises a spectrum processor 1150 configured to apply a spectral shaping to a set 1132 of decoded spectral coefficients, or to a preprocessed version 1132′ thereof, in dependence on a set 1152 of linear-prediction-domain parameters for a portion of the audio content (for example, an audio frame) encoded in a linear-prediction mode, and to apply a spectral shaping to a set 1132 of decoded spectral coefficients, or to a preprocessed version 1132′ thereof, in dependence on a set 1154 of scale-factor parameters for a portion of the audio content (for example, an audio frame) encoded in a frequency-domain mode. Accordingly, the spectrum processor 1150 obtains spectrally shaped sets 1158 of decoded spectral coefficients.
The audio signal decoder 1100 also comprises a frequency-domain-to-time-domain converter 1160, which is configured to receive a spectrally-shaped set 1158 of decoded spectral coefficients and to obtain a time-domain representation 1162 of the audio content on the basis of the spectrally-shaped set 1158 of decoded spectral coefficients for a portion of the audio content encoded in the linear-prediction mode. The frequency-domain-to-time-domain converter 1160 is also configured to obtain a time-domain representation 1162 of the audio content on the basis of a respective spectrally-shaped set 1158 of decoded spectral coefficients for a portion of the audio content encoded in the frequency-domain mode.
The audio signal decoder 1100 also comprises an optional time-domain processor 1170, which optionally performs a time-domain post processing of the time-domain representation 1162 of the audio content, to obtain the decoded representation 1112 of the audio content. However, in the absence of the time-domain post-processor 1170, the decoded representation 1112 of the audio content may be equal to the time-domain representation 1162 of the audio content provided by the frequency-domain-to-time-domain converter 1160.
In the following, further details of the audio decoder 1100 will be described, which details may be considered as optional improvements of the audio signal decoder.
It should be noted that the audio signal decoder 1100 is a multi-mode audio signal decoder, which is capable of handling an encoded audio signal representation in which subsequent portions (for example, overlapping or non-overlapping audio frames) of the audio content are encoded using different modes. In the following, audio frames will be considered as a simple example of a portion of the audio content. As the audio content is sub-divided into audio frames, it is particularly important to have smooth transitions between decoded representations of subsequent (partially overlapping or non-overlapping) audio frames encoded in the same mode, and also between subsequent (overlapping or non-overlapping) audio frames encoded in different modes. Advantageously, the audio signal decoder 1100 handles audio signal representations in which subsequent audio frames are overlapping by approximately 50%, even though the overlapping may be significantly smaller in some cases and/or for some transitions.
By this reason, the audio signal decoder 1100 comprises an overlapper configured to overlap-and-add time-domain representations of subsequent audio frames encoded in different of the modes. The overlapper may, for example, be part of the frequency-domain-to-time-domain converter 1160, or may be arranged at the output of the frequency-domain-to-time-domain converter 1160. In order to obtain high efficiency and good quality when overlapping subsequent audio frames, the frequency-domain-to-time-to-domain converter is configured to obtain a time-domain representation of an audio frame encoded in the linear-prediction mode (for example, in the transform-coded-excitation sub-mode thereof) using a lapped transform, and to also obtain a time-domain-representation of an audio frame encoded in the frequency-domain mode using a lapped transform. In this case, the overlapper is configured to overlap the time-domain-representations of the subsequent audio frames encoded in different of the modes. By using such synthesis lapped transforms for the frequency-domain-to-time-domain conversions, which may advantageously be of the same transform type for audio frames encoded in different of the modes, a critical sampling can be used and the overhead caused by the overlap-and-add operation is minimized. At the same time, there is a time domain aliasing cancellation between overlapping portions of the time-domain-representations of the subsequent audio frames. It should be noted that the possibility to have a time-domain aliasing cancellation at the transition between subsequent audio frames encoded in different modes is caused by the fact that a frequency-domain-to-time-domain conversion is applied in the same domain in different modes, such that an output of a synthesis lapped transform performed on a spectrally-shaped set of decoded spectral coefficients of a first audio frame encoded in a first of the modes can be directly combined (i.e. combined without an intermediate filtering operation) with an output of a lapped transform performed on a spectrally-shaped set of decoded spectral coefficients of a subsequent audio frame encoded in a second of the modes. Thus, a linear combination of the output of the lapped transform performed for an audio frame encoded in the first mode and of the output of the lapped transform for an audio frame encoded in the second of the mode is performed. Naturally, an appropriate overlap windowing can be performed as part of the lapped transform process or subsequent to the lapped transform process.
Accordingly, a time-domain aliasing cancellation is obtained by the mere overlap-and-add operation between time-domain representations of subsequent audio frames encoded in different of the modes.
In other words, it is important that the frequency-domain-to-time-domain converter 1160 provides time-domain output signals, which are in the same domain for both of the modes. The fact that the output signals of the frequency-domain-to-time-domain conversion (for example, the lapped transform in combination with an associated transition windowing) is in the same domain for different modes means that output signals of the frequency-domain-to-time-domain conversion are linearly combinable even at a transition between different modes. For example, the output signals of the frequency-domain-to-time-domain conversion are both time-domain representations of an audio content describing a temporal evolution of a speaker signal. In other words, the time-domain representations 1162 of the audio contents of subsequent audio frames can be commonly processed in order to derive the speaker signals.
Moreover, it should be noted that the spectrum processor 1150 may comprise a parameter provider 1156, which is configured to provide the set 1152 of linear-prediction domain parameters and the set 1154 of scale factor parameters on the basis of the information extracted from the bitstream 1110, for example, on the basis of an encoded scale factor information and an encoded LPC filter parameter information. The parameter provider 1156 may, for example, comprise an LPC filter coefficient determinator configured to obtain decoded LPC filter coefficients on the basis of an encoded representation of the LPC filter coefficients for a portion of the audio content encoded in the linear-prediction mode. Also, the parameter provider 1156 may comprise a filter coefficient transformer configured to transform the decoded LPC filter coefficients into a spectral representation, in order to obtain linear-prediction mode gain values associated with different frequencies. The linear-prediction mode gain values (sometimes also designated with g[k]) may constitute a set 1152 of linear-prediction domain parameters.
The parameter provider 1156 may further comprise a scale factor determinator configured to obtain decoded scale factor values on the basis of an encoded representation of the scale factor values for an audio frame encoded in the frequency-domain mode. The decoded scale factor values may serve as a set 1154 of scale factor parameters.
Accordingly, the spectral-shaping, which may be considered as a spectrum modification, is configured to combine a set 1132 of decoded spectral coefficients associated to an audio frame encoded in the linear-prediction mode, or a preprocessed version 1132′ thereof, with the linear-prediction mode gain values (constituting the set 1152 of linear-prediction domain parameters), in order to obtain a gain processed (i.e. spectrally-shaped) version 1158 of the decoded spectral coefficients 1132 in which contributions of the decoded spectral coefficients 1132, or of the pre-processed version 1132′ thereof, are weighted in dependence on the linear-prediction mode gain values. In addition, the spectrum modifier may be configured to combine a set 1132 of decoded spectral coefficients associated to an audio frame encoded in the frequency-domain mode, or a pre-processed version 1132′ thereof, with the scale factor values (which constitute the set 1154 of scale factor parameters) in order to obtain a scale-factor-processed (i.e. spectrally-shaped) version 1158 of the decoded spectral coefficients 1132 in which contributions of the decoded spectral coefficients 1132, or of the pre-processed version 1132′ thereof, are weighted in dependence on the scale factor values (of the set 1154 of scale factor parameters). Accordingly, a first type of spectral shaping, namely a spectral shaping in dependence on a set 1152 of linear-prediction domain parameters, is performed in the linear-prediction mode, and a second type of spectral-shaping, namely a spectral-shaping in dependence on a set 1154 of scale factor parameters, is performed in the frequency-domain mode. Consequently, a detrimental impact of the quantization noise on the time-domain-representation 1162 is kept small both for speech-like audio frames (in which the spectral-shaping is advantageously performed in dependence on the set 1152 of linear-prediction-domain parameters) and for general audio, for example, non-speech-like audio frames for which the spectral shaping is advantageously performed in dependence the set 1154 of scale factor parameters. However, by performing the noise-shaping using the spectral shaping both for speech-like and non-speech-like audio frames, i.e. both for audio frames encoded in the linear-prediction mode and for audio frames encoded in the frequency-domain mode, the multi-mode audio decoder 1100 comprises a low-complexity structure and at the same time allows for an aliasing-canceling overlap-and-add of the time-domain representations 1162 of audio frames encoded in different of the modes.
Other details will be discussed below.
The audio signal decoder 1200 according to
The audio signal decoder 1200 also comprises switches 1216, 1218, which are configured to distribute components of the encoded representation of the audio content provided by the bitstream demultiplexer to different component processing blocks of the audio signal decoder 1200. For example, the audio signal decoder 1200 comprises a combined frequency-domain-mode/TCX sub-mode branch 1230, which receives from the switch 1216 an encoded frequency-domain representation 1228 and provides, on the basis thereof, a time-domain representation 1232 of the audio content. The audio signal decoder 1200 also comprises an ACELP decoder 1240, which is configured to receive from the switch 1216 an ACELP-encoded excitation information 1238 and to provide, on the basis thereof, a time-domain representation 1242 of the audio content.
The audio signal decoder 1200 also comprises a parameter provider 1260, which is configured to receive from the switch 1218 an encoded scale-factor information 1254 for an audio frame encoded in the frequency-domain mode and an encoded LPC filter coefficient information 1256 for an audio frame encoded in the linear-prediction mode, which comprises the TCX sub-mode and the ACELP sub-mode. The parameter provider 1260 is further configured to receive control information 1258 from the switch 1218. The parameter provider 1260 is configured to provide a spectral-shaping information 1262 for the combined frequency-domain mode/TCX sub-mode branch 1230. In addition, the parameter provider 1260 is configured to provide a LPC filter coefficient information 1264 to the ACELP decoder 1240.
The combined frequency domain mode/TCX sub-mode branch 1230 may comprise an entropy decoder 1230a, which receives the encoded frequency domain information 1228 and provides, on the basis thereof, a decoded frequency domain information 1230b, which is fed to an inverse quantizer 1230c. The inverse quantizer 1230c provides, on the basis of the decoded frequency domain information 1230b, a decoded and inversely quantized frequency domain information 1230d, for example, in the form of sets of decoded spectral coefficients. A combiner 1230e is configured to combine the decoded and inversely quantized frequency domain information 1230d with the spectral shaping information 1262, to obtain the spectrally-shaped frequency domain information 1230f. An inverse modified-discrete-cosine-transform 1230g receives the spectrally shaped frequency domain information 1230f and provides, on the basis thereof, the time domain representation 1232 of the audio content.
The entropy decoder 1230a, the inverse quantizer 1230c and the inverse modified discrete cosine transform 1230g may all optionally receive some control information, which may be included in the bitstream or derived from the bitstream by the parameter provider 1260.
The parameter provider 1260 comprises a scale factor decoder 1260a, which receives the encoded scale factor information 1254 and provides a decoded scale factor information 1260b. The parameter provider 1260 also comprises an LPC coefficient decoder 1260c, which is configured to receive the encoded LPC filter coefficient information 1256 and to provide, on the basis thereof, a decoded LPC filter coefficient information 1260d to a filter coefficient transformer 1260e. Also, the LPC coefficient decoder 1260c provides the LPC filter coefficient information 1264 to the ACELP decoder 1240. The filter coefficient transformer 1260e is configured to transform the LPC filter coefficients 1260d into the frequency domain (also designated as spectral domain) and to subsequently derive linear prediction mode gain values 1260f from the LPC filter coefficients 1260d. Also, the parameter provider 1260 is configured to selectively provide, for example using a switch 1260g, the decoded scale factors 1260b or the linear prediction mode gain values 1260f as the spectral shaping information 1262.
It should be noted here that the audio signal encoder 1200 according to
Some details will be described in the following.
In the following, a possible signal flow will be described taking reference to
It should be noted that the signal flow 1300 of
The common frequency domain mode/TCX sub-mode branch 1230 receives the encoded frequency domain information 1228. The encoded frequency domain information 1228 may comprise so-called arithmetically coded spectral data “ac_spectral_data”, which are extracted from a frequency domain channel stream (“fd_channel_stream”) in the frequency domain mode. The encoded frequency domain information 1228 may comprise a so-called TCX coding (“tcx_coding”), which may be extracted from a linear prediction domain channel stream (“lpd_channel_stream”) in the TCX sub-mode. An entropy decoding 1330a may be performed by the entropy decoder 1230a. For example, the entropy decoding 1330a may be performed using an arithmetic decoder. Accordingly, quantized spectral coefficients “x_ac_quant” are obtained for frequency-domain encoded audio frames, and quantized TCX mode spectral coefficients “x_tcx_quant” are obtained for audio frames encoded in the TCX mode. The quantized frequency domain mode spectral coefficients and the quantized TCX mode spectral coefficients may be integer numbers in some embodiments. The entropy decoding may, for example, jointly decode groups of encoded spectral coefficients in a context-sensitive manner. Moreover, the number of bits needed to encode a certain spectral coefficient may vary in dependence on the magnitude of the spectral coefficients, such that more codeword bits are needed for encoding a spectral coefficient having a comparatively larger magnitude.
Subsequently, inverse quantization 1330c of the quantized frequency domain mode spectral coefficients and of the quantized TCX mode spectral coefficients will be performed, for example using the inverse quantizer 1230c. The inverse quantization may be described by the following formula:
Accordingly, inversely quantized frequency domain mode spectral coefficients (“x_ac_invquant”) are obtained for audio frames encoded in the frequency domain mode, and inversely quantized TCX mode spectral coefficients (“x_tcx_invquant”) are obtained for audio frames encoded in the TCX sub-mode.
In the following, the processing in the frequency domain mode will be summarized. In the frequency domain mode, a noise filling 1340 is optionally applied to the inversely quantized frequency domain mode spectral coefficients, to obtain a noise-filled version 1342 of the inversely quantized frequency domain mode spectral coefficients 1330d (“x_ac_invquant”). Next, a scaling of the noise filled version 1342 of the inversely quantized frequency domain mode spectral coefficients may be performed, wherein the scaling is designated with 1344. In the scaling, scale factor parameters (also briefly designated as scale factors or sf[g][sfb]) are applied to scale the inversely quantized frequency domain mode spectral coefficients 1342 (“x_ac_invquant”). For example, different scale factors may be associated to spectral coefficients of different frequency bands (frequency ranges or scale factor bands). Accordingly, inversely quantized spectral coefficients 1342 may be multiplied with associated scale factors to obtain scaled spectral coefficients 1346. The scaling 1344 may advantageously be performed as described in International Standard ISO/IEC 14496-3, subpart 4, sub-clauses 4.6.2 and 4.6.3. The scaling 1344 may, for example, be performed using the combiner 1230e. Accordingly, a scaled (and consequently, spectrally shaped) version 1346, “x_rescal” of the frequency domain mode spectral coefficients is obtained, which may be equivalent to the frequency domain representation 1230f. Subsequently, a combination of a mid/side processing 1348 and of a temporal noise shaping processing 1350 may optionally be performed on the basis of the scaled version 1346 of the frequency domain mode spectral coefficients, to obtain a post-processed version 1352 of the scaled frequency domain mode spectral coefficients 1346. The optional mid/side processing 1348 may, for example, be performed as described in ISO/IEC 14496-3: 2005, information technology-coding of audio-visual objects—part 3: Audio, subpart 4, sub-clause 4.6.8.1. The optional temporal noise shaping may be performed as described in ISO/IEC 14496-3: 2005, information technology-coding of audio-visual objects—part 3: Audio, subpart 4, sub-clause 4.6.9.
Subsequently, an inverse modified discrete cosine transform 1354 may be applied to the scaled version 1346 of the frequency-domain mode spectral coefficients or to the post-processed version 1352 thereof. Consequently, a time domain representation 1356 of the audio content of the currently processed audio frame is obtained. The time domain representation 1356 is also designated with xi,n. As a simplifying assumption, it can be assumed that there is one time domain representation xi,n per audio frame. However, in some cases, in which multiple windows (for example, so-called “short windows”) are associated with a single audio frame, there may be a plurality of time domain representations xi,n per audio frame.
Subsequently, a windowing 1358 is applied to the time domain representation 1356, to obtain a windowed time domain representation 1360, which is also designated with zi,n. Accordingly, in a simplified case, in which there is one window per audio frame, one windowed time domain representation 1360 is obtained per audio frame encoded in the frequency domain mode.
In the following, the processing will be described for an audio frame encoded entirely or partly in the TCX mode. Regarding this issue, it should be noted that an audio frame may be divided into a plurality of, for example, four sub-frames, which can be encoded in different sub-modes of the linear prediction mode. For example, the sub-frames of an audio frame can selectively be encoded in the TCX sub-mode of the linear prediction mode or in the ACELP sub-mode of the linear prediction mode. Accordingly, each of the sub-frames can be encoded such that an optimal coding efficiency or an optimal tradeoff between audio quality and bitrate is obtained. For example, a signaling using an array named “mod [ ]” may be included in the bitstream for an audio frame encoded in the linear prediction mode to indicate which of the sub-frames of said audio frame are encoded in the TCX sub-mode and which are encoded in the ACELP sub-mode. However, it should be noted that the present concept can be understood most easily if it is assumed that the entire frame is encoded in the TCX mode. The other cases, in which an audio frame comprises both TCX sub-frames should be considered as an optional extension of said concept.
Assuming now that the entire frame is encoded in the TCX mode, it can be seen that a noise filling 1370 is applied to inversely quantized TCX mode spectral coefficients 1330d, which are also designated as “quant[ ]”. Accordingly, a noise filled set of TCX mode spectral coefficients 1372, which is also designated as “r[i]”, is obtained. In addition, a so-called spectrum de-shaping 1374 is applied to the noise filled set of TCX mode spectral coefficients 1372, to obtain a spectrum-de-shaped set 1376 of TCX mode spectral coefficients, which is also designated as “r[i]”. Subsequently, a spectral shaping 1378 is applied, wherein the spectral shaping is performed in dependence on linear-prediction-domain gain values which are derived from encoded LPC coefficients describing a filter response of a Linear-Prediction-Coding (LPC) filter. The spectral shaping 1378 may for example be performed using the combiner 1230a. Accordingly, a reconstructed set 1380 of TCX mode spectral coefficients, also designated with “rr[i]”, is obtained. Subsequently, an inverse MDCT 1382 is performed on the basis of the reconstructed set 1380 of TCX mode spectral coefficients, to obtain a time domain representation 1384 of a frame (or, alternatively, of a sub-frame) encoded in the TCX mode. Subsequently, a rescaling 1386 is applied to the time domain representation 1384 of a frame (or a sub-frame) encoded in the TCX mode, to obtain a rescaled time domain representation 1388 of the frame (or sub-frame) encoded in the TCX mode, wherein the rescaled time domain representation is also designated with “xw[i]”. It should be noted that the rescaling 1386 is typically an equal scaling of all time domain values of a frame encoded in the TCX mode or of sub-frame encoded in the TCX mode. Accordingly, the rescaling 1386 typically does not bring along a frequency distortion, because it is not frequency selective.
Subsequent to the rescaling 1386, a windowing 1390 is applied to the rescaled time domain representation 1388 of a frame (or a sub-frame) encoded in the TCX mode. Accordingly, windowed time domain samples 1392 (also designated with “zi,n” are obtained, which represent the audio content of a frame (or a sub-frame) encoded in the TCX mode.
The time domain representations 1360, 1392 of a sequence of frames are combined using an overlap-and-add processing 1394. In the overlap-and-add processing, time domain samples of a right-sided (temporally later) portion of a first audio frame are overlapped and added with time domain samples of a left-sided (temporally earlier) portion of a subsequent second audio frame. This overlap-and-add processing 1394 is performed both for subsequent audio frames encoded in the same mode and for subsequent audio frames encoded in different modes. A time domain aliasing cancellation is performed by the overlap-and-add processing 1394 even if subsequent audio frames are encoded in different modes (for example, in the frequency domain mode and in the TCX mode) due to the specific structure of the audio decoder, which avoids any distorting processing between the output of the inverse MDCT 1954 and the overlap-and-add processing 1394, and also between the output of the inverse MDCT 1382 and the overlap-and-add processing 1394. In other words, there is no additional processing between the inverse MDCT processing 1354, 1382 and the overlap-and-add processing 1394 except for the windowing 1358, 1390 and the rescaling 1386 (and optionally, a spectrally non-distorting combination of a pre-emphasis filtering and a de-emphasizing operation).
When the core mode is a linear prediction mode (which is indicated by the fact the bitstream variable “core mode” is equal to one) and when one or more of the three TCX modes (for example, out of a first TCX mode for providing a TCX portion of 512 samples, including 256 samples of overlap, a second TCX mode for providing 768 time domain samples, including 256 overlap samples, and a third TCX mode for providing 1280 TCX samples, including 256 overlap samples) is selected as the “linear prediction domain” coding, i.e. if one of the four array entries of “mod [x]” is greater than zero (wherein four array entries mod [0], mod [1], mod [2], mod [3] are derived from a bitstream variable and indicate the LPC sub-modes for four sub-frames of the current audio frame, i.e. indicate whether a sub-frame is encoded in the ACELP sub-mode of the linear prediction mode or in the TCX sub-mode of the linear prediction mode, and whether a comparatively long TCX encoding, a medium length TCX encoding or a short length TCX encoding is used), the MDCT based TCX tool is used. In other words, if one of the sub-frames of the current audio frame is encoded in the TCX sub-mode of the linear prediction mode, the TCX tool is used. The MDCT based TCX receives the quantized spectral coefficients from an arithmetic decoder (which may be used to implement the entropy decoder 1230a or the entropy decoding 1330a). The quantized coefficients (or an inversely quantized version 1230b thereof) are first completed by a comfort noise (which may be performed by the noise filling operation 1370). LPC based frequency-domain noise shaping is then applied to the resulting spectral coefficients (for example, using the combiner 1230e, or the spectral shaping operation 1378) (or to a spectral-de-shaped version thereof), and an inverse MDCT transformation (which may be implemented by the MDCT 1230g or by the inverse MDCT operation 1382) is performed to get the time domain synthesis signal.
In the following, some definitions will be given.
“lg” designates a number of quantized spectral coefficients output by the arithmetic decoder (for example, for an audio frame encoded in the linear prediction mode).
The bitstream variable “noise_factor” designates a noise level quantization index.
The variable “noise level” designates a level of noise injected in the reconstructed spectrum.
The variable “noise[ ]” designates a vector of generated noise.
The bitstream variable “global_gain” designates a rescaling gain quantization index.
The variable “g” designates a rescaling gain.
The variable “rms” designates a root mean square of the synthesized time-domain signal “x[ ]”.
The variable “x[ ]” designates the synthesized time-domain signal.
The MDCT-based TCX requests from the arithmetic decoder 1230a a number of quantized spectral coefficients, Ig, which is determined by the mod [ ] value (i.e. by the value of the variable mod [ ]). This value (i.e. the value of the variable mod [ ]) also defines the window length and shape which will be applied in the inverse MDCT 1230g (or by the inverse MDCT processing 1382 and the corresponding windowing 1390). The window is composed of three parts, a left side overlap of L samples (also designated as left-sided transition slope), a middle part of ones of M samples and a right overlap part (also designated as right-sided transition slope) of R samples. To obtain an MDCT window of length 2*lg, ZL zeros are added on the left side and ZR zeros are added on the right side.
In case of a transition from or to a “short_window” the corresponding overlap region L or R may need to be reduced to 128 (samples) in order to adapt to a possible shorter window slope of the “short_window”. Consequently, the region M and the corresponding zero region ZL or ZR may need to be expanded by 64 samples each.
In other words, normally there is an overlap of 256 samples=L=R. It is reduced to 128 in case of FD mode to LPD mode.
The diagram of
The MDCT window is given by
The definitions of WSIN
The MDCT window W(n) is applied in the windowing step 1390, which may be considered as a part of a windowing inverse MDCT (for example, of the inverse MDCT 1230g).
The quantized spectral coefficients, also designated as “quant[ ]”, delivered by the arithmetic decoder 1230a (or, alternatively, by the inverse quantization 1230c) are completed by a comfort noise. The level of the injected noise is determined by the decoded bitstream variable “noise_factor” as follows:
noise_level=0.0625*(8−noise_factor)
A noise vector, also designated with “noise[ ]”, is then computed using a random function, designated with “random_sign( )”, delivering randomly the value −1 or +1. The following relationship holds:
noise[i]=random_sign( )*noise_level;
The “quant[ ]” and “noise[ ]” vectors are combined to form the reconstructed spectral coefficients vector, also designated with “r[ ]”, in a way that the runs of 8 consecutive zeros in “quant[ ]” are replaced by the components of “noise[ ]”. A run of 8 non-zeros are detected according to the following formula:
One obtains the reconstructed spectrum as follows:
The above described noise filling may be performed as a post-processing between the entropy decoding performed by the entropy decoder 1230a and the combination performed by the combiner 1230e.
A spectrum de-shaping is applied to the reconstructed spectrum (for example, to the reconstructed spectrum 1376, r[i]) according to the following steps:
Each 8-dimensional block belonging to the first quarter of the spectrum is then multiplied by the factor Rm.
A spectrum de-shaping will be performed as a post-processing arranged in a signal path between the entropy decoder 1230a and the combiner 1230e. The spectrum de-shaping may, for example, be performed by the spectrum de-shaping 1374.
Prior to applying the inverse MDCT, the two quantized LPC filters corresponding to both extremity of the MDCT block (i.e. the left and right folding points) are retrieved, their weighted versions are computed, and the corresponding decimated (64 points, whatever the transform length) spectrums are computed.
In other words, a first set of LPC filter coefficients is obtained for a first period of time and a second set of LPC filter coefficients is determined for a second period of time. The sets of LPC filter coefficients are advantageously derived from an encoded representation of said LPC filter coefficients, which is included in the bitstream. The first period of time is advantageously at or before the beginning of the current TCX-encoded frame (or sub-frame), and the second period of time is advantageously at or after the end of the TCX encoded frame or sub-frame. Accordingly, an effective set of LPC filter coefficients is determined by forming a weighted average of the LPC filter coefficients of the first set and of the LPC filter coefficients of the second set.
The weighted LPC spectrums are computed by applying an odd discrete Fourier transform (ODFT) to the LPC filters coefficients. A complex modulation is applied to the LPC (filter) coefficients before computing the odd discrete Fourier transform (ODFT), so that the ODFT frequency bins are (advantageously perfectly) aligned with the MDCT frequency bins. For example, the weighted LPC synthesis spectrum of a given LPC filter Â(z) is computed as follows:
where ŵ[n], n=0 . . . lpc_order+1, are the coefficients of the weighted LPC filter given by:
Ŵ(z)=Â(z/γ1) with γ1=0.92
In other words, a time domain response of an LPC filter, represented by values ŵ[n], with n between 0 and lpc_order−1, is transformed into the spectral domain, to obtain spectral coefficients X0[k]. The time domain response ŵ[n] of the LPC filter may be derived from, the time domain coefficients a1 to a16 describing the Linear Prediction Coding filter.
Gains g[k] can be calculated from the spectral representation X0[k] of the LPC coefficients (for example, a1 to a16) according to the following equation:
where M=64 is the number of bands in which the calculated gains are applied.
Subsequently, a reconstructed spectrum 1230f, 1380, rr[i] is obtained in dependence on the calculated gains g[k] (also designated as linear prediction mode gain values). For example, a gain value g[k] may be associated with a spectral coefficient 1230d, 1376, r[i]. Alternatively, a plurality of gain values may be associated with a spectral coefficient 1230d, 1376, r[i]. A weighting coefficient a[i] may be derived from one or more gain values g[k], or the weighting coefficient a[i] may even be identical to a gain value g[k] in some embodiments. Consequently, a weighting coefficient a[i] may be multiplied with an associated spectral value r[i], to determine a contribution of the spectral coefficient r[i] to the spectrally shaped spectral coefficient rr[i].
For example, the following equation may hold:
rr[i]=g[k]·r[i].
However, different relationships may also be used.
In the above, the variable k is equal to i/(lg/64) to take into consideration the fact that the LPC spectrums are decimated. The reconstructed spectrum rr[ ] is fed into an inverse MDCT 1230g, 1382. When performing the inverse MDCT, which will be described in detail below, the reconstructed spectrum values rr[i] serve as the time-frequency values Xi,k, or as the time-frequency values spec[i][k]. The following relationship may hold:
X
i,k
=rr[k]; or
spec[i][k]=rr[k].
It should be pointed out here that in the above discussion of the spectrum processing in the TCX branch, the variable i is a frequency index. In contrast, in the discussion of the MDCT filter bank and the block switching, the variable i is a window index. A man skilled in the art will easily recognize from the context whether the variable i is a frequency index or a window index.
Also, it should be noted that a window index may be equivalent to a frame index, if an audio frame comprises only one window. If a frame comprises multiple windows, which is the case sometimes, there may be multiple window index values per frame.
The non-windowed output signal x[ ] is resealed by the gain g, obtained by an inverse quantization of the decoded global gain index (“global_gain”):
Where rms is calculated as:
The resealed synthesized time-domain signal is then equal to:
x
w
[n]=x[n]·g
After resealing, the windowing and overlap-add is applied. The windowing may be performed using a window W(n) as described above and taking into account the windowing parameters shown in
z
i,n
=x
w
[n]·W(n).
In the following, a concept will be described which is helpful if there are both TCX encoded audio frames (or audio subframes) and ACELP encoded audio frames (or audio subframes). Also, it should be noted that the LPC filter coefficients, which are transmitted for TCX-encoded frames or subframes means some embodiments will be applied in order to initialize the ACELP decoding.
Note also that the length of the TCX synthesis is given by the TCX frame length (without the overlap): 256, 512 or 1024 samples for the mod [ ] of 1, 2 or 3 respectively.
Afterwards, the following notation is adopted: x[ ] designates the output of the inverse modified discrete cosine transform, z[ ] the decoded windowed signal in the time domain and out[ ] the synthesized time domain signal.
The output of the inverse modified discrete cosine transform is then resealed and windowed as follows:
z[n]=x[n]·w[n]·g;∀0≦n<N
N corresponds to the MDCT window size, i.e. N=2lg.
When the previous coding mode was either FD mode or MDCT based TCX, a conventional overlap and add is applied between the current decoded windowed signal zi,n and the previous decoded windowed signal zi-1,n, where the index i counts the number of already decoded MDCT windows. The final time domain synthesis out is obtained by the following formulas.
In case zi-1,n comes from FD mode:
N_l is the size of the window sequence coming from FD mode. i_out indexes the output buffer out and is incremented by the number
of written samples.
In case zi-1,n comes from MDCT based TCX:
Ni-1 is the size of the previous MDCT window. i_out indexes the output buffer out and is incremented by the number (N+L−R)/2 of written samples.
In the following, some possibilities will be described to reduce artifacts at a transition from a frame or sub-frame encoded in the ACELP mode to a frame or sub-frame encoded in the MDCT-based TCX mode. However, it should be noted that different approaches may also be used.
In the following, a first approach will be briefly described. When coming from ACELP, a specific window cane be used for the next TCX by means of reducing R to 0, and then eliminating overlapping region between the two subsequent frames.
In the following, a second approach will be briefly described (as it is described in USAC WD5 and earlier). When coming from ACELP, the next TCX window is enlarged by means of increasing M (middle length) by 128 samples. At decoder the right part of window, i.e. the first R non-zero decoded samples are simply discarded and replaced by the decoded ACELP samples.
The reconstructed synthesis out[iout+n] is then filtered through the pre-emphasis filter (1−0.68z−1). The resulting pre-emphasized synthesis is then filtered by the analysis filter Â(z) in order to obtain the excitation signal. The calculated excitation updates the ACELP adaptive codebook and allows switching from TCX to ACELP in a subsequent frame. The analysis filter coefficients are interpolated in a subframe basis.
In the following, details regarding the inverse modified discrete cosine transform and the block switching, i.e. the overlap-and-add performed between subsequent frames or subframes, will be described in more detail. It should be noted that the inverse modified discrete cosine transform described in the following can be applied both for audio frames encoded in the frequency domain and for audio frames or audio subframes encoded in the TCX mode. While the windows (W(n)) for use in the TCX mode have been described above, the windows used for the frequency-domain-mode will be discussed in the following: it should be noted that the choice of appropriate windows, in particular at the transition from a frame encoded in the frequency-mode to a subsequent frame encoded in the TCX mode, or vice versa, allows to have a time-domain aliasing cancellation, such that transitions with low or no aliasing can be obtained without the bitrate overhead.
The time/frequency representation of the signal (for example, the time-frequency representation 1158, 1230f, 1352, 1380) is mapped onto the time domain by feeding it into the filterbank module (for example, the module 1160, 1230g, 1354-1358-1394, 1382-1386-1390-1394). This module consists of an inverse modified discrete cosine transform (IMDCT), and a window and an overlap-add function. In order to adapt the time/frequency resolution of the filterbank to the characteristics of the input signal, a block switching tool is also adopted. N represents the window length, where N is a function of the bitstream variable “window_sequence”. For each channel, the N/2 time-frequency values Xi,k are transformed into the N time domain values xi,n via the IMDCT. After applying the window function, for each channel, the first half of the zi,n sequence is added to the second half of the previous block windowed sequence z(i-1),n to reconstruct the output samples for each channel outi,n.
In the following, some definitions of bitstream variables will be given.
The bitstream variable “window_sequence” comprises two bits indicating which window sequence (i.e. block size) is used. The bitstream variable “window_sequence” is typically used for audio frames encoded in the frequency-domain.
Bitstream variable“window_shape” comprises one bit indicating which window function is selected.
The table of
In the following, LPD_SEQUENCE refers to all allowed window/coding mode combinations inside the so called linear prediction domain codec. In the context of decoding a frequency domain coded frame it is important to know only if a following frame is encoded with the LP domain coding modes, which is represented by an LPD_SEQUENCE. However, the exact structure within the LPD_SEQUENCE is taken care of when decoding the LP domain coded frame.
In other words, an audio frame encoded in the linear-prediction mode may comprise a single TCX-encoded frame, a plurality of TCX-encoded subframes or a combination of TCX-encoded subframes and ACELP-encoded subframes.
The analytical expression of the IMDCT is:
where:
n=sample index
i=window index
k=spectral coefficient index
N=window length based on the window_sequence value
n0=(N/2+1)/2
The synthesis window length N for the inverse transform is a function of the syntax element “window_sequence” and the algorithmic context. It is defined as follows:
A tick mark () in a given table cell of the table of
Meaningful block transitions of a first embodiment are listed in
Depending on the bitstream variables (or elements) “window_sequence” and “window_shape” element different transform windows are used. A combination of the window halves described as follows offers all possible window sequences.
For “window_shape”==1, the window coefficients are given by the Kaiser—Bessel derived (KBD) window as follows:
where:
W′, Kaiser—Bessel kernel widow function, see also [5], is defined as follows:
α=kernel window alpha factor,
Otherwise, for “window_shape”==0, a sine window is employed as follows:
The window length N can be 2048 (1920) or 256 (240) for the KBD and the sine window.
How to obtain the possible window sequences is explained in the parts a)-e) of this subclause.
For all kinds of window sequences the variable “window_shape” of the left half of the first transform window is determined by the window shape of the previous block which is described by the variable “window_shape_previous_block”. The following formula expresses this fact:
where:
“window_shape_previous_block” is a variable, which is equal to the bitstream variable “window_shape” of the previous block (i−1).
For the first raw data block “raw_data_block( )” to be decoded, the variable “window_shape” of the left and right half of the window are identical.
In case the previous block was coded using LPD mode, “window_shape_previous_block” is set to 0.
The window sequence designated by window_sequence==ONLY_LONG_SEQUENCE is equal to one window of type “LONG_WINDOW” with a total window length N_l of 2048 (1920).
For window_shape==1 the window for variable value “ONLY_LONG_SEQUENCE” is given as follows:
If window_shape==0 the window for variable value “ONLY_LONG_SEQUENCE” can be described as follows:
After windowing, the time domain values (zi,n) can be expressed as:
z
i,n
=w(n)·xi,n;
The window of type “LONG_START_SEQUENCE” can be used to obtain a correct overlap and add for a block transition from a window of type “ONLY_LONG_SEQUENCE” to any block with a low-overlap (short window slope) window half on the left (EIGHT_SHORT_SEQUENCE, LONG_STOP_SEQUENCE, STOP_START_SEQUENCE or LPD_SEQUENCE).
In case the following window sequence is not a window of type “LPD_SEQUENCE”: Window length N_l and N_s is set to 2048 (1920) and 256 (240) respectively.
In case the following window sequence is a window of type “LPD_SEQUENCE”: Window length N_l and N_s is set to 2048 (1920) and 512 (480) respectively.
If window_shape==1 the window for window type “LONG_START_SEQUENCE” is given as follows:
If window_shape=0 the window for window type “LONG_START_SEQUENCE” looks like:
The windowed time-domain values can be calculated with the formula explained in a).
The window sequence for window_sequence==EIGHT_SHORT comprises eight overlapped and added SHORT_WINDOWs with a length N_s of 256 (240) each. The total length of the window_sequence together with leading and following zeros is 2048 (1920). Each of the eight short blocks are windowed separately first. The short block number is indexed with the variable j=0, . . . , M−1 (M=N_l/N_s).
The window_shape of the previous block influences the first of the eight short blocks (W0(n)) only. If window_shape==1 the window functions can be given as follows:
Otherwise, if window_shape==0, the window functions can be described as:
The overlap and add between the EIGHT_SHORT window_sequence resulting in the windowed time domain values zi,n is described as follows:
This window_sequence is needed to switch from a window sequence “EIGHT_SHORT_SEQUENCE” or a window type “LPD_SEQUENCE” back to a window type “ONLY_LONG_SEQUENCE”.
In case the previous window sequence is not an LPD_SEQUENCE: Window length N_l and N_s is set to 2048 (1920) and 256 (240) respectively.
In case the previous window sequence is an LPD_SEQUENCE: Window length N_l and N_s is set to 2048 (1920) and 512 (480) respectively.
If window_shape==1 the window for window type “LONG_STOP_SEQUENCE” is given as follows:
If window_shape==0 the window for LONG_START_SEQUENCE is determined by:
The windowed time domain values can be calculated with the formula explained in a).
The window type “STOP_START_SEQUENCE” can be used to obtain a correct overlap and add for a block transition from any block with a low-overlap (short window slope) window half on the right to any block with a low-overlap (short window slope) window half on the left and if a single long transform is desired for the current frame.
In case the following window sequence is not an LPD_SEQUENCE: Window length N_l and N_sr is set to 2048 (1920) and 256 (240) respectively.
In case the following window sequence is an LPD_SEQUENCE: Window length N_l and N_sr is set to 2048 (1920) and 512 (480) respectively.
In case the previous window sequence is not an LPD_SEQUENCE: Window length N_l and N_sl is set to 2048 (1920) and 256 (240) respectively.
In case the previous window sequence is an LPD_SEQUENCE: Window length N_l and N_sl is set to 2048 (1920) and 512 (480) respectively.
If window_shape==1 the window for window type “STOP_START_SEQUENCE” is given as follows:
If window_shape==0 the window for window type “STOP_START_SEQUENCE” looks like:
The windowed time-domain values can be calculated with the formula explained in a).
9.3.3 Filterbank and Block Switching—Overlapping and Adding with Previous Window Sequence
Besides the overlap and add within the EIGHT_SHORT window sequence the first (left) part of every window sequence (or of every frame or subframe) is overlapped and added with the second (right) part of the previous window sequence (or the previous frame or subframe) resulting in the final time domain values outi,n. The mathematic expression for this operation can be described as follows.
In case of ONLY_LONG_SEQUENCE, LONG_START_SEQUENCE, EIGHT_SHORT_SEQUENCE, LONG_STOP_SEQUENCE, STOP_START_SEQUENCE:
The above equation for the overlap-and-add between audio frames encoded in the frequency-domain mode may also be used for the overlap-and-add of time-domain representations of the audio frames encoded in different modes.
Alternatively, the overlap-and-add may be defined as follows:
In case of ONLY_LONG_SEQUENCE, LONG_START_SEQUENCE, EIGHT_SHORT_SEQUENCE, LONG_STOP_SEQUENCE, STOP_START_SEQUENCE:
N_l is the size of the window sequence. i_out indexes the output buffer out and is incremented by the number
of written samples.
In case of LPD_SEQUENCE:
In the following, a first approach will be described which may be used to reduce aliasing artifacts. When coming from ACELP, a specific window cane be used for the next TCX by means of reducing R to 0, and then eliminating overlapping region between the two subsequent frames.
In the following, a second approach will be described which may be used to reduce aliasing artifacts (as it is described in USAC WD5 and earlier). When coming from ACELP, the next TCX window is enlarged by means of increasing M (middle length) by 128 samples and by also increasing a number of MDCT coefficients associated with the TCX window. At the decoder, the right part of window, i.e. the first R non-zero decoded samples are simply discarded and replaced by the decoded ACELP samples. In other words, by providing additional MDCT coefficients (for example, 1152 instead of 1024), aliasing artifacts are reduced. Worded differently, by providing extra MDCT coefficients (such that the number of MDCT coefficients is larger than half of the number of time domain samples per audio frame), an aliasing-free portion of the time-domain representation can be obtained, which eliminates the need for a dedicated aliasing cancellation at the cost of a non-critical sampling of the spectrum.
Otherwise, when the previous decoded windowed signal zi-1,n comes from the MDCT based TCX, a conventional overlap and add is performed for getting the final time signal out. The overlap and add can be expressed by the following formula when FD mode window sequence is a LONG_START_SEQUENCE or an EIGHT_SHORT_SEQUENCE:
Ni-1 corresponds to the size 2lg of the previous window applied in MDCT based TCX. i_out indexes the output buffer out and is incremented by the number of (N_l+N_s)/4 of written samples. N_s/2 should be equal to the value L of the previous MDCT based TCX defined in the table of
For a STOP_START_SEQUENCE the overlap and add between FD mode and MDCT based TCX as the following expression:
Ni-1 corresponds to the size 2lg of the previous window applied in MDCT based TCX. i_out indexes the buffer out and is incremented by the number (N_l+N_sl)/4 of written samples N_sl/2 should be equal to the value L of the previous MDCT based TCX defined in the table of
10. Details Regarding the Computation of ŵ[n]
In the following, some details regarding the computation of the linear-prediction-domain gain values g[k] will be described to facilitate the understanding. Typically, a bitstream representing the encoded audio content (encoded in the linear-prediction mode) comprises encoded LPC filter coefficients. The encoded LPC filter coefficients may for example be described by corresponding code words and may describe a linear prediction filter for recovering the audio content. It should be noted that the number of sets of LPC filter coefficients transmitted per LPC-encoded audio frame may vary. Indeed, the actual number of sets of LPC filter coefficients which are encoded within the bitstream for an audio frame encoded in the linear-prediction mode depends on the ACELP-TCX mode combination of the audio frame (which is sometimes also designated as “superframe”). This ACELP-TCX mode combination may be determined by a bitstream variable. However, there are naturally also cases in which there is only one TCX mode available, and there are also cases in which there is no ACELP mode available.
The bitstream is typically parsed to extract the quantization indices corresponding to each of the sets LPC filter coefficients needed by the ACELP TCX mode combination.
In a first processing step 1810, an inverse quantization of the LPC filter is performed. It should be noted that the LPC filters (i.e. the sets of LPC filter coefficients, for example, al to a16) are quantized using the line spectral frequency (LSF) representation (which is an encoding representation of the LPC filter coefficients). In the first processing step 1810, inverse quantized line spectral frequencies (LSF) are derived from the encoded indices.
For this purpose, a first stage approximation may be computed and an optional algebraic vector quantized (AVQ) refinement may be calculated. The inverse-quantized line spectral frequencies may be reconstructed by adding the first stage approximation and the inverse-weighted AVQ contribution. The presence of the AVQ refinement may depend on the actual quantization mode of the LPC filter.
The inverse-quantized line spectral frequencies vector, which may be derived from the encoded representation of the LPC filter coefficients, is later on converted into a vector of line-spectral pair parameters, then interpolated and converted again into LPC parameters. The inverse quantization procedure, performed in the processing step 1810, results in a set of LPC parameters in the line-spectral-frequency-domain. The line-spectral-frequencies are then converted, in a processing step 1820, to the cosine domain, which is described by line-spectral pairs. Accordingly, line-spectral pairs qi are obtained. For each frame or subframe, the line-spectral pair coefficients qi (or an interpolated version thereof) are converted into linear-prediction filter coefficients ak, which are used for synthesizing the reconstructed signal in the frame or subframe. The conversion to the linear-prediction-domain is done as follows. The coefficients f1(i) and f2(i) may for example be derived using the following recursive relation:
with initial values f1(0)=1 and f1(−1)=0. The coefficients f2(i) are computed similarly by replacing q2i-1 by q2i.
Once the coefficients of f1(i) and f2(i) are found, coefficients f1′(i) and F2′(i) are computed according to
f
1′(i)=f1(i)+f1(i−1), i=1, . . . , 8
f
2′(i)=f2(i)−f2(i−1), i=1, . . . , 8
Finally, the LP coefficients ai are computed from fƒ1(i) and f′2(i) by
To summarize, the derivation of the LPC coefficients ai from the line-spectral pair coefficients q, is performed using processing steps 1830, 1840, 1850, as explained above.
The coefficients ŵ[n], n=0 . . . lpc_order-1, which are coefficients of a weighted LPC filter, are obtained in a processing step 1860. When deriving the coefficients ŵ[n] from the coefficients ai, it is considered that the coefficients ai are time-domain coefficients of a filter having filter characteristics Â[z], and that the coefficients ŵ[n] are time-domain coefficients of a filter having frequency-domain response Ŵ[z]. Also, it is considered that the following relationship holds:
Ŵ(z)=Â(z/γ1) with γ1=0.92
In view of the above, it can be seen that the coefficients ŵ[n] can easily be derived from the encoded LPC filter coefficients, which are represented, for example, by respective indices in the bitstream.
It should also be noted that the derivation of xt[n], which is performed in the processing step 1870 has been discussed above. Similarly, the computation of X0[k] has been discussed above. Similarly, the computation of the linear-prediction-domain gain values g[k], which is performed in step 1890, has been discussed above.
It should be noted that a concept for spectral-shaping has been described above, which is applied for audio frames encoded in the linear-prediction-domain, and which is based on a transformation of LPC filter coefficients ŵ[n] into a spectral representation X0[k] from which the linear-prediction-domain gain values are derived. As discussed above, the LPC filter coefficients ŵ[n] are transformed into a frequency-domain representation X0[k], using an odd discrete Fourier transform having 64 equally-spaced frequency bins. However, it is naturally not necessary to obtain frequency-domain values x0[k], which are spaced equally in frequency. Rather, it may sometimes be recommendable to use frequency-domain values x0[k], which are spaced non-linearly in frequency. For example, the frequency-domain values x0[k] may be spaced logarithmically in frequency or may be spaced in frequency in accordance with a Bark scale. Such a non-linear spacing of the frequency-domain values X0[k] and of the linear-prediction-domain gain values g[k] may result in a particularly good trade-off between hearing impression and computational complexity. Nevertheless, it is not necessary to implement such a concept of a non-uniform frequency spacing of the linear-prediction-domain gain values.
In the following, an improved concept for the transition between an audio frame encoded in the frequency domain and an audio frame encoded in the linear-prediction-domain will be described. This improved concept uses a so-called linear-prediction mode start window, which will be explained in the following.
Taking reference first to
However, in some embodiments according to the invention, a new type of audio frame is used, namely an audio frame to which a linear-prediction mode start window is associated.
A new type of audio frame (also briefly designated as a linear-prediction mode start frame) is encoded in the TCX sub-mode of the linear-prediction-domain mode. The linear-prediction mode start frame comprises a single TCX frame (i.e., is not sub-divided into TCX subframes). Consequently, as much as 1024 MDCT coefficients are included in the bitstream, in an encoded form, for the linear-prediction mode start frame. In other words, the number of MDCT coefficients associated to a linear-prediction start frame is identical to the number of MDCT coefficients associated to the frequency-domain encoded audio frame to which a window of window type “only_long_sequence” is associated. Additionally, the window associated to the linear-prediction mode start frame may be of the window type “LONG_START_SEQUENCE”. Thus, the linear-prediction mode start frame may be very similar to the frequency-domain encoded frame to which a window of type “long_start_sequence” is associated. However, the linear-prediction mode start frame differs from such a frequency-domain encoded audio frame in that the spectral-shaping is performed in dependence on the linear-prediction domain gain values, rather than in dependence on scale factor values. Thus, encoded linear-prediction-coding filter coefficients are included in the bitstream for the linear-prediction-mode start frame.
As the inverse MDCT 1354, 1382 is applied in the same domain (as explained above) both for an audio frame encoded in the frequency-domain mode and for an audio frame encoded in the linear-prediction mode, a time-domain-aliasing-canceling overlap-and-add operation with good time-aliasing-cancellation characteristics can be performed between a previous audio frame encoded in the frequency-domain mode and having a comparatively long right-sided transition slope (for example, of 1024 samples) and the linear-prediction mode start frame having a comparatively long left-sided transition slope (for example, of 1024 samples), wherein the transition slopes are matched for time-aliasing cancellation. Thus, the linear-prediction mode start frame is encoded in the linear-prediction mode (i.e. using linear-prediction-coding filter coefficients) and comprises a significantly longer (for example, at least by the factor of 2, or at least by the factor of 4, or at least by the factor of 8) left-sided transition slope than other linear-prediction mode encoded audio frames to create additional transition possibilities.
As a consequence, a linear-prediction mode start frame can replace the frequency-domain encoded audio frame having the window type “long_sequence”. The linear-prediction mode start frame comprises the advantage that MDCT filter coefficients are transmitted for the linear-prediction mode start frame, which are available for a subsequent audio frame encoded in the linear-prediction mode. Consequently, it is not necessary to include extra LPC filter coefficient information into the bitstsream in order to have initialization information for a decoding of the subsequent linear-prediciton-mode-encoded audio-frame.
As can be seen in
To summarize, the embodiments according to the invention use an LPC-based noise-shaping applied in frequency-domain for a switched audio coder.
Embodiments according to the invention apply an LPC-based filter in the frequency-domain for easing the transition between different coders in the context of a switched audio codec.
Some embodiments consequently solve the problems to design efficient transitions between the three coding modes, frequency-domain coding, TCX (transform-coded-excitation linear-prediction-domain) and ACELP (algebraic-code-excited linear prediction). However, in some other embodiments, it is sufficient to have only two of said modes, for example, the frequency-domain coding and the TCX mode.
Embodiments according to the invention outperform the following alternative solutions:
Embodiments according to the present invention perform the frequency-domain coder and the LPC coder MDCT in the same domain while still using the LPC for shaping the quantization error in the MDCT domain. This brings along a number of advantages:
To further conclude, it is an important aspect that
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. Some or all of the method steps may be executed by (or using) a hardware apparatus, like for example, a microprocessor, a programmable computer or an electronic circuit. In some embodiments, some one or more of the most important method steps may be executed by such an apparatus.
The inventive encoded audio signal can be stored on a digital storage medium or can be transmitted on a transmission medium such as a wireless transmission medium or a wired transmission medium such as the Internet.
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 Blue-Ray, 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. Therefore, the digital storage medium may be computer readable.
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 operative 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.
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. The data carrier, the digital storage medium or the recorded medium are typically tangible and/or non-transitionary.
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 connection, 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.
A further embodiment according to the invention comprises an apparatus or a system configured to transfer (for example, electronically or optically) a computer program for performing one of the methods described herein to a receiver. The receiver may, for example, be a computer, a mobile device, a memory device or the like. The apparatus or system may, for example, comprise a file server for transferring the computer program to the receiver.
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.
The above described embodiments are merely illustrative for the principles of the present invention. It is understood that modifications and variations of the arrangements and the details described herein will be apparent to others skilled in the art. It is the intent, therefore, to be limited only by the scope of the impending patent claims and not by the specific details presented by way of description and explanation of the embodiments herein.
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 implementing 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.
This application is a continuation of copending International Application No. PCT/EP2010/064917, filed Oct. 6, 2010, which is incorporated herein by reference in its entirety, and additionally claims priority from U.S. Application No. US 61/249,774 filed Oct. 8, 2009, which is incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
61249774 | Oct 2009 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/EP2010/064917 | Oct 2010 | US |
Child | 13441469 | US |