Patent Description:
In the field of audio signal processing, an audio signal may be filtered for various reasons, e.g., a long-term prediction filter may be used in an audio signal encoder, to attenuate or even suppress completely a set of harmonics in the audio signal.

The audio signal includes a plurality of audio frames, and the frames are filtered using the long-term prediction filter. When considering two consecutive frames of an audio signal, a past frame and a current frame, a linear filter H(z) having a set of parameters c is used for filtering the audio signal. More specifically, the past frame is filtered with the filter H(z) using a first set of parameters c<NUM> which will produce a so-called filtered past frame. The current frame is filtered with the filter H(z) using a set of parameters c<NUM> which will produce a filtered current frame. <FIG> shows a block diagram for processing consecutive frames of an audio signal in accordance with a known approach. An audio signal <NUM> including a plurality of audio frames is provided. The audio signal <NUM> is supplied to a filter block <NUM> and a current frame n of the audio signal <NUM> is filtered. The filter block, besides the audio signal <NUM>, receives a set of filter parameters cn for the current frame of the audio signal. The filter block <NUM> filters the current frame n of the audio signal and outputs a filtered audio signal <NUM> including consecutive filtered frames. In <FIG>, the filtered current frame n, the filtered past frame n-<NUM> and the filtered second last frame n-<NUM> are schematically depicted. The filtered frames are schematically represented in <FIG> with respective gaps therebetween for schematically indicating a discontinuity 106a, 106b that may be introduced by the filtering process between the filtered frames. The filter block <NUM> causes filtering of the frames of the audio signal using respective filter parameters c<NUM> and c<NUM> for a past frame n-<NUM> and a current frame n. In general, the filter block <NUM> may be a linear filter H(z), and one example for such a linear filter H(z) is the above mentioned long-term prediction filter <MAT> where the filter parameters are the gain "g" and the pitch lag "T". In a more general form, the long-term prediction filter can be described as follows: <MAT> where A(z) is a FIR filter. A long-term prediction filter may be used to attenuate or even suppress completely a set of harmonics in an audio signal. However, there is a high probability of introducing a discontinuity 106a, 106b (see <FIG>) between the filtered past frame n-<NUM> and the filtered current frame n when using such a long-term prediction filter and when the past frame filter parameters c<NUM> are different from the current frame filter parameters c<NUM>. This discontinuity may produce an artifact in the filtered audio signal <NUM>, for example a "click".

Consequently, in view of the above described problems with the filtering of consecutive frames resulting in discontinuities which, in turn, may produce undesired artifacts, a technique is needed that removes a possible discontinuity. Several prior art approaches dealing with the removal of a discontinuity of filtered frames of an audio signal are known in the art.

In case the linear filter H(z) is a FIR filter, the current frame is filtered with the filter parameters c<NUM> of the current frame for producing a filtered current frame. In addition, a beginning portion of the current frame is filtered with the filter parameters of the past frame c<NUM> for producing a filtered frame portion, and then an overlap-add or cross-fade operation is performed over the beginning portion of the filtered current frame and the filtered frame portion. <FIG> shows a block diagram of such a conventional approach for processing consecutive audio frames for removing a discontinuity. When compared to <FIG>, the filter block <NUM> includes a further processing block <NUM> for performing the overlap-add or cross-fade operation. In the filtered audio signal <NUM>, there will be no or a reduced discontinuity between the consecutive filtered frames, as is schematically indicated in <FIG> showing the consecutive filtered frames n, n-<NUM> and n-<NUM> without the gaps of <FIG>.

In other prior art approaches, the filter H(z) may be a filter having a recursive part, for example an IIR filter. In such a case, the approach as described above with regard to <FIG> is applied on a sample-by-sample basis. In a first step, the processing starts with the first sample of the beginning portion of the current frame n being filtered with the filter parameters c<NUM> of the past frame n-<NUM> yielding a first filtered sample. The sample is also filtered with the filter parameters c<NUM> of the current frame n producing a second filtered sample. Then, the overlap-add or cross-fade operation is performed based on the first and second filtered samples which yields the corresponding sample of the filtered current frame n. Then the next sample is processed and the above steps are repeated until the last sample of the beginning portion of the current frame n has been processed. The remaining samples of the current frame n are filtered with the filter parameters c<NUM> of the current frame n.

Examples for the above mentioned known approaches for removing a discontinuity from consecutive filtered frames are described, for example, in <CIT> in the context of a transform coder, in <CIT> in the context of a speech bandwidth expander, in <CIT> in the context of a transform audio coder, or in <CIT> in the context of a decoded speech postfilter.

While the above approaches are efficient for removing the undesired signal discontinuities, since these approaches operate on a specific portion of the current frame, the beginning portion, for being effective, the length of the frame portion has to be sufficiently long, for example in the case of a frame length of <NUM>, the frame portion or beginning portion length could be as long as <NUM>. In certain cases, this can be too long, especially in situations where the past frame filter parameters c<NUM> will not apply well to the current frame and this may result in additional artifacts. One example is a harmonic audio signal with fast changing pitch, and a long-term prediction filter that is designed to reduce the amplitude of the harmonics. In that case, the pitch-lag is different from one frame to the next. The long-term prediction filter with the pitch estimated in the current frame would effectively reduce the amplitude of the harmonics in the current frame, but it would not reduce the amplitude of the harmonics if used in another frame (e.g. beginning portion of the next frame) where the pitch of the audio signal would be different. It could even make things worse, by reducing the amplitude of non-harmonic-related components in the signal, introducing a distortion in the signal.

<CIT> describes a method for producing forward aliasing cancellation (FAC) parameters for cancelling time-domain aliasing caused to a coded audio signal in a first transform-coded frame by a transition between the first transform-coded frame using a first coding mode with overlapping window and a second frame using a second coding mode with non-overlapping window. The method includes calculating a FAC target representative of a difference between the audio signal of the first frame prior to coding and a synthesis of the coded audio signal of the first transform-coded frame; and weighting the FAC target to produce the FAC parameters. In a decoder, weighted forward aliasing cancellation (FAC) parameters are received and inverse weighted to produce a FAC synthesis. Upon synthesis of the coded audio signal in the first frame, the time-domain aliasing is cancelled from the audio signal synthesis using the FAC synthesis.

<CIT> describes circuits and methods for providing zero-gap playback of consecutive data streams in portable electronic devices, such as media players. A circuit includes a decoder circuit configured to receive encoded audio data and to output decoded audio data including data streams associated with a data file and a subsequent data file. Moreover, a predictive circuit, which is electrically coupled to the decoder circuit, is configured to selectively generate additional samples based on samples in the data file, where the additional samples correspond to times after the end of a data stream associated with the data file. Additionally, a filter circuit, which is electrically coupled to the decoder circuit and selectively electrically coupled to the predictive circuit, is configured to selectively combine or blend samples at a beginning of the subsequent data file with the additional samples.

It is an object underlying the present invention to provide an improved approach for removing discontinuities among filtered audio frames without producing any potential distortion in the filtered audio signal.

This object is achieved by a method for processing an audio signal according to claim <NUM>, and by an audio decoder according to claim <NUM>.

In accordance with embodiments, the method comprises estimating the linear predictive filter on the filtered or non-filtered audio signal.

In accordance with embodiments, estimating the linear predictive filter comprises estimating the filter based on the past or current frame of the audio signal or based on the past filtered frame of the audio signal using the Levinson-Durbin algorithm.

In accordance with embodiments, the linear predictive filter comprises a linear predictive filter of an audio codec.

In accordance with embodiments, removing the discontinuity comprises processing the beginning portion of the filtered current frame, wherein the beginning portion of the current frame has a predefined number of samples being less or equal than the total number of samples in the current frame, and wherein processing the beginning portion of the current frame comprises subtracting a beginning portion of a zero-input-response (ZIR) from the beginning portion of the filtered current frame.

In accordance with embodiments, the method comprises generating the ZIR, wherein generating the ZIR comprises:.

In accordance with embodiments, the method comprises windowing the ZIR such that its amplitude decreases faster to zero.

The present invention is based on the inventor's findings that the problems that have been recognized in conventional approaches for removing signal discontinuities which result in the additional unwanted distortion mentioned above, are mainly due to the processing of the current frame or at least a portion thereof on the basis of the filter parameters for the past frame. In accordance with the inventive approach this is avoided, i.e. the inventive approach does not filter a portion of the current frame with the filter parameters of the past frame and thus avoids the problems mentioned above. In accordance with the present invention, for removing the discontinuity, an LPC filter (linear predictive filter) is used for removing the discontinuity. The LPC filter may be estimated on the audio signal and therefore it is a good model of the spectral shape of the audio signal so that, when using the LPC filter, the spectral shape of the audio signal will mask the discontinuity. In an embodiment, the LPC filter may be estimated on the basis of the non-filtered audio signal or on the basis of an audio signal that has been filtered by a linear filter H(z) mentioned above. In accordance with embodiments, the LPC filter may be estimated by using the audio signal, for example the current frame and/or the past frame, and the Levinson-Durbin algorithm. It may also be computed only on the basis of the past filtered frame signal using the Levinson-Durbin algorithm.

In yet other embodiments, an audio codec for processing the audio signal may use a linear filter H(z) and may also use an LPC filter, either quantized or not, for example to shape the quantization noise in a transform-based audio codec. In such an embodiment, this existing LPC filter can be directly used for smoothing the discontinuity without the additional complexity needed to estimate a new LPC filter.

In the following, embodiments of the present invention will be described with reference to the accompanying drawings, in which:.

In the following, embodiments for illustrating the inventive approach will be described in further detail and it is noted that in the accompanying drawing elements having the same or similar functionality are denoted by the same reference signs.

<FIG> shows a simplified block diagram of a system for transmitting audio signals implementing the inventive approach at the decoder side. The system of <FIG> comprises an encoder <NUM> receiving at an input <NUM> an audio signal <NUM>. The encoder includes an encoding processor <NUM> receiving the audio signal <NUM> and generating an encoded audio signal that is provided at an output <NUM> of the encoder. The encoding processor may be programmed or built to implement an approach for processing consecutive audio frames of the audio signal received to avoid discontinuities. In other examples the encoder does not need to be part of a transmission system, however, it can be a standalone device generating encoded audio signals or it may be part of an audio signal transmitter. In accordance with an example, the encoder <NUM> may comprise an antenna <NUM> to allow for a wireless transmission of the audio signal, as is indicated at <NUM>. In other examples, the encoder <NUM> may output the encoded audio signal provided at the output <NUM> using a wired connection line, as it is for example indicated at reference sign <NUM>.

The system of <FIG> further comprises a decoder <NUM> having an input <NUM> receiving an encoded audio signal to be processed by the encoder <NUM>, e.g. via the wired line <NUM> or via an antenna <NUM>. The encoder <NUM> comprises a decoding processor <NUM> operating on the encoded signal and providing a decoded audio signal <NUM> at an output <NUM>. The decoding processor <NUM> is implemented to operate in accordance with the inventive approach on consecutive frames that are filtered in such a way that discontinuities are avoided. In other embodiments the decoder does not need to be part of a transmission system, rather, it may be a standalone device for decoding encoded audio signals or it may be part of an audio signal receiver.

In the following, embodiments of the inventive approach that are implemented in the decoding processor <NUM> will be described in further detail. <FIG> shows a flow diagram for processing a current frame of the audio signal in accordance with an embodiment of the inventive approach. The processing of the current frame will be described, and the past frame is assumed to be already processed with the same technique described below. In accordance with the present invention, in step S100 a current frame of the audio signal is received. The current frame is filtered in step S102, for example in a way as described above with regard to <FIG> (see filter block <NUM>). In accordance with the inventive approach, a discontinuity between the filtered past frame n-<NUM> and the filtered current frame n (see <FIG>) will be removed using linear predictive filtering as is indicated at step S104. In accordance an embodiment the linear predictive filter may be defined as <MAT> with M the filter order and am the filter coefficients (with a<NUM> = <NUM>). This kind of filter is also known as Linear Predictive Coding (LPC). In accordance with embodiments the filtered current frame is processed by applying linear predictive filtering to at least a part of the filtered current frame. The discontinuity may be removed by modifying a beginning portion of the filtered current frame by a signal obtained by linear predictive filtering a predefined signal with initial states of the linear predictive coding filter defined on the basis of a last part of the past frame. The initial states of the linear predictive coding filter may be defined on the basis of a last part of the past frame filtered using the set of filter parameters for the current frame. The inventive approach is advantageous as it does not require filtering the current frame of an audio signal with a filter coefficient that is used for the past frame and thereby avoids problems that arise due to the mismatch of the filter parameters for the current frame and for the past frame as they are experienced in the prior art approaches described above with reference to <FIG>.

<FIG> shows a schematic block diagram for processing a current audio frame of the audio signal in accordance with embodiments of the present invention avoiding undesired distortion in the output signal despite the removal of the discontinuities. In <FIG>, the same reference signs as in <FIG> are used. A current frame n of the audio signal <NUM> is received, each frame of the audio signal <NUM> having a plurality of samples. The current frame n of the audio signal <NUM> is processed by the filter block <NUM>. When compared to the prior art approaches of <FIG>, in accordance with embodiments as described with regard to <FIG>, the filtered current frame is further processed on the basis of ZIR samples as is schematically shown by block <NUM>. In accordance with an embodiment on the basis of the past frame n-<NUM>, and on the basis of an LPC filter the ZIR samples are produced as is schematically shown by block <NUM>.

The functionality of the processing blocks <NUM> and <NUM> will now be described in further detail. <FIG> shows a flow diagram representing the functionality of the processing block <NUM> for generating the ZIR samples. As mentioned above, the frames of an audio signal <NUM> are filtered with a linear filter H(z) using filter parameters c selected or determined for the respective frame. In accordance with examples not according to the claimed invention, the filter H(z) may be a recursive filer, e.g., an IIR filter, or it may be a non-recursive filter, e.g., a FIR filter. In the processing block <NUM> a LPC filter is used which may or may not be quantized. The LPC filter is of the order M and may be either estimated on the filtered or non-filtered audio signal or may be the LPC filter that is also used in an audio codec. In a first step S200, the M (M = the order of the LPC filter) last samples of the past frame n-<NUM> are filtered with the filter H(z) using, however, the filter parameters or coefficients c<NUM> of the current frame n. Step S200 thereby produces a first portion of filtered signal. In step S202 the M last samples of the filtered past frame n-<NUM> (the M last samples of the past frame filtered using the filter parameters or coefficients c<NUM> of the past frame n-<NUM>) are subtracted from the first portion of filtered signal provided by step S200, thereby producing a second portion of filtered signal. In step S204 the LPC filter having the order M is applied, more specifically a zero input response (ZIR) of the LPC filter is generated in step S204 by filtering a frame of zero samples, wherein the initial states of the filter are equal to the second portion of filtered signals, thereby generating the ZIR. In accordance with embodiments, the ZIR can be windowed such that its amplitude decreases faster to <NUM>.

The ZIR, as described above with regard to <FIG>, is applied in the processing block <NUM>, the functionality of which is described with reference to the flow diagram of <FIG> for the case of using, as the linear filter H(z), a recursive filter, like an IIR filter which is an example not according to the claimed invention. In accordance with the embodiment described with regard to <FIG>, to remove discontinuities between the current frame and the past frame while avoiding undesired distortions, filtering the current frame n comprises processing (filtering) the current frame n on a sample-by-sample basis, wherein the samples of the beginning portion are treated in accordance with the inventive approach. To be more specific, M samples of a beginning portion of the current frame n are processed, and at a first step S300 the variables m is set to <NUM>. In a next step S302, the sample m of the current frame n is filtered using the filter H(z) and the filter coefficients or parameters c<NUM> for the current frame n. Thus, other than in conventional approaches, the current frame, in accordance with the inventive approach, is not filtered using coefficients from the past frame, but only coefficients from the current frame, which as a consequence avoids the undesired distortion which exist in conventional approaches despite the fact that discontinuities are removed. Step S302 yields a filtered sample m, and in step S304 the ZIR sample corresponding to sample m is subtracted from the filtered sample m yielding the corresponding sample of the filtered current frame n. In step S306 it is determined whether the last sample M of the beginning portion of the current frame n is processed. In case not all M samples of the beginning portions have been processed, the variable m is incremented and the method steps S302 to S306 are repeated for the next sample of the current frame n. Once all M samples of the beginning portions have been processed, at step S308 the remaining samples of the current frame n are filtered using the filter parameters of the current frame c<NUM>, thereby providing the filtered current frame n processed in accordance with the inventive approach avoiding undesired distortion upon removal of the discontinuities between consecutive frames.

In accordance with another example not according to the claimed invention, the linear filer H(z) is a non-recursive filter, like a FIR filter, and the ZIR, as described above with regard to <FIG>, is applied in the processing block <NUM>. The functionality of this embodiment is described with reference to the flow diagram of <FIG>. The current frame n, at step S400, is filtered with the filter H(z) using the filter coefficients or parameters c<NUM> for the current frame. Thus, other than in conventional approaches, the current frame, in accordance with the inventive approach, is not filtered using coefficients from the past frame, but only coefficients from the current frame, which as a consequence avoids the undesired distortion which exist in conventional approaches despite the fact that discontinuities are removed. In step S402 a beginning portion of the ZIR is subtracted from a corresponding beginning portion of the filtered current frame, thereby providing the filtered current frame n having the beginning portion filtered/processed in accordance with the inventive approach and the remaining part only filtered using filter coefficients or parameters c<NUM> for the current frame, thereby avoiding undesired distortion upon removal of the discontinuities between consecutive frames.

The inventive approach is applied at the decoder side when using an audio codec postfilter for reducing the level of coding noise between signal harmonics. For processing the audio frames at the decoder the postfilter is as follows: <MAT> where B(z) and A(z) are two FIR filters and the H(z) filter parameters are the coefficients of the FIR filters B(z) and A(z), and T indicates the pitch lag. In such a scenario, the filter may also introduce a discontinuity between the two filtered frames, for example when the past filter frame parameters c<NUM> are different from the current frame filter parameters c<NUM>, and such a discontinuity may produce an artifact in the filtered audio signal <NUM>, for example a "click". This discontinuity is removed by processing the filtered current frame as described above in detail.

Although some aspects of the described concept 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.

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.

Claim 1:
A method for processing an audio signal (<NUM>), the method comprising:
processing audio frames of the audio signal at an audio decoder by filtering the frames using an audio codec postfilter for reducing a level of coding noise between signal harmonics; and
using linear predictive filtering for removing (S102, S104, S300-S308, S400-S402) a discontinuity (106a, 106b) between a filtered past frame and a filtered current frame of the audio signal,
wherein the method comprises filtering the current frame of the audio signal and removing the discontinuity by modifying a beginning portion of the filtered current frame by a signal obtained by linear predictive filtering a predefined signal with initial states of the linear predictive filter defined on the basis of a last part of the unfiltered past frame filtered using the set of filter parameters for filtering the current frame, and
wherein the audio codec postfilter is defined as follows: <MAT>
where B(z) and A(z) are two FIR filters, the H(z) filter parameters are the coefficients of the FIR filters B(z) and A(z), and T indicates the pitch lag.