Signal filtering
11545167 · 2023-01-03
Assignee
Inventors
- Goran Markovic (Erlangen, DE)
- Emmanuel Ravelli (Erlangen, DE)
- Martin Dietz (Erlangen, DE)
- Bernhard Grill (Erlangen, DE)
Cpc classification
G10L19/09
PHYSICS
International classification
Abstract
In methods and systems for filtering an information input signal, a system may have: a first filter unit filtering an input signal at an initial subinterval in a current update interval according to parameters associated to the preceding update interval, the parameters being scaled by a first scaling factor changing towards 0; and a second filter unit filtering a second filter input signal, based on the output of the first filter unit, at the initial subinterval, according to parameters associated to the current update interval, the parameters being scaled by a second scaling factor changing from 0, or a value close to 0, toward a value more distant from 0.
Claims
1. A system for filtering an information input signal, divided into different update intervals, according to coefficients varying with the update intervals, to output a filtered output signal, wherein the information input signal is an audio signal, the system comprising: a first filter unit to filter a first filter input signal at least at an initial subinterval in a current update interval to output a first filter output signal, according to coefficients associated to a preceding update interval, the first filter unit being configured to scale the coefficients along at least the initial subinterval—, wherein the first filter unit is configured to scale the coefficients associated to the preceding update interval by a first scaling factor changing towards 0, or a value close to 0, along at least the initial subinterval; and a second filter unit to filter a second filter input signal, at the initial subinterval, according to coefficients associated to the current update interval to output a second filter output signal, the second filter unit being configured to scale the coefficients along at least the initial subinterval, wherein the second filter unit is configured to scale the coefficients associated to the current update interval by a second scaling factor changing from 0, or a value close to 0, toward a value different from 0, or a value more distant from 0 than the value close to 0, along at least the initial subinterval, wherein the first filter input signal is the information input signal, the first filter output signal is the second filter input signal, and the filtered output signal is the second filter output signal.
2. The system of claim 1, further comprising: a third filter unit to filter the information input signal, at a subsequent subinterval in the current update interval after the initial subinterval according to the coefficients associated to the current update interval.
3. The system of claim 2, further comprising: a selector configured to check if a distance between a parameters for the current update interval and a parameter for the preceding update interval is 0 or within a first threshold, so as to filter the information input signal at least in the initial subinterval using the third filter unit, wherein the parameter for the current update interval and the parameter for the preceding update interval are taken from one of harmonicity information, gain information, pitch lag information, an integer part of a pitch lag of the information input signal and a fractional part of the pitch lag of the information input signal.
4. The system of claim 2, wherein the third filter unit is configured, along the subsequent interval, to maintain a filter coefficients constant.
5. The system of claim 2, wherein the third filter unit operates as a long term prediction (LTP) pre-filter, a LTP post-filter, a harmonic LTP pre-filter, or a harmonic LTP post-filter.
6. The system of claim 2, further configured to check a gain g.sub.k of the current k.sup.th update interval and a gain g.sub.k−1 of a previous (k−1).sup.th update interval, so that: if g.sub.k−1=0 and g.sub.k=0, then the filtering at the first, second, and third filter units is deactivated; and/or if g.sub.k−1=0 and g.sub.k≠0, then the filtering at the first filter unit is deactivated; there is filtering at the second filter unit in at least the initial subinterval; there is filtering at the third filter unit in the subsequent subinterval; and/or if g.sub.k−1≠0 and g.sub.k=0, then there is filtering at the first filter unit in at least the initial subinterval; the filtering at the second filter unit is deactivated; the filtering at the third filter unit is deactivated; and/or if g.sub.k−1≠0 and g.sub.k≠0, then a difference of integer and fractional parts of a pitch lag are checked, so that: if the integer and fractional parts of the pitch lag in the current k.sup.th update interval and in the previous (k−1).sup.th update interval are the same, then: the filtering at the first filter unit and the second filter units is deactivated; there is filtering at the third filter unit along the whole current update interval; else if there is a difference in the integer or in the fractional part of the pitch lag: there is filtering at the first filter unit in at least the initial subinterval; there is filtering at the second filter unit in at least the initial subinterval; there is filtering at the third filter unit in the subsequent subinterval.
7. The system of claim 1, wherein at least one of the first and second filter units operates as a long term prediction (LTP) pre-filter, a LTP post-filter, a harmonic LTP pre-filter, or a harmonic LTP post-filter.
8. The system of claim 1, wherein at least one of the first and second filter unit comprises a transfer function comprising a numerator and a denominator, wherein the numerator comprises a gain value indicated by gain information, and wherein the denominator comprises an integer part of a pitch lag indicated by pitch lag information and a multi-tap filter depending on a fractional part of the pitch lag.
9. The system of claim 1, wherein: the coefficients of the first filter unit and second filter unit are derived from parameters chosen among harmonicity information, gain information, pitch lag information, an integer part of a pitch lag of the information input signal and/or a fractional part of the pitch lag of the information input signal.
10. The system of claim 1, wherein: the first and/ second filter unit are chosen among linear predictive coding (LPC) filters, infinite impulse response (IIR) filters, and/or finite impulse response (FIR), filters.
11. The system of claim 1, wherein: the first scaling factor and the second scaling factor are non-negative values complementary with each other to a value greater than 0.
12. The system of claim 1, wherein: the first scaling factor changes towards 0 towards the final extremity of at least the initial subinterval, and/or the second scaling factor changes from 0, or a value close to 0, from the initial extremity of the current update interval towards a non-zero value, or a value which is more distant from 0 than the value close to 0.
13. The system of claim 1, further comprising: a fourth filter unit configured to filter the information input signal, at least at the initial subinterval, using coefficient acquired by interpolating parameters associated to the current update interval and parameters associated to a previous update interval.
14. The system of claim 13, wherein the fourth filter unit operates as a long term prediction (LTP) pre-filter, a LTP post-filter, a harmonic LTP pre-filter, or a harmonic LTP post-filter.
15. The system of claim 13, further comprising: a selector configured to check if a distance between parameters for the current update interval is within a second threshold, so as to filter the information input signal at least in the initial subinterval using the fourth filter unit.
16. The system of claim 15, further configured to actively set the second threshold on a basis of values associated to the information input signal.
17. The system of claim 16, further configured to: set the second threshold as a pitch lag distance threshold equal to the minimum between an integer part of a pitch lag at the current update interval and an integer part of a pitch lag at the previous update interval, so as to use the fourth filter unit when a distance between the integer part of the pitch lag at the current update interval and the integer part of the pitch lag at the previous update interval is less than the pitch lag distance threshold; and/or so as to use the first and second filter units when the distance between the integer part of the pitch lag at the current update interval and the integer part of the pitch lag at the previous update interval is greater than the pitch lag distance threshold.
18. The system of claim 16, further configured to: use a condition associated to gains of the signal at the current update interval and at the preceding interval, so as to use the fourth filter unit when both the gains of the signal at the current update interval and at the preceding interval are different from zero, and/or so as to use the first and second filter units when at least one of the gains of the signal at the current update interval and at the preceding interval is zero.
19. The system of claim 1, wherein the first filter unit is to provide the first filter output signal as:
20. The system of claim 1, wherein the first filter unit is configured to provide the first filter output signal in the form of is the first filter output signal,
(n) is the filtered output signal, n is an instant, p.sub.int.sup.mem and p.sub.fr.sup.mem are respectively based on integer part and -fractional part of a pitch lag associated to the preceding update interval, P.sub.int and p.sub.fr are respectively based on integer part and fractional part of a pitch lag associated to the current update interval, c.sub.num(k) is a coefficient based on a gain value for the current update interval, c.sub.den(k,p.sub.fr) is a coefficient based on the gain value for the determined update interval and on the fractional part of the pitch, c.sub.num.sup.mem(k) is a coefficient based on a gain value for preceding update interval, c.sub.den.sup.mem(k, p.sub.fr.sup.mem) is a coefficient based on a gain value for preceding update interval and on the fractional part of the pitch, L.sub.den and L.sub.num are fixed and/or based on a sampling rate of the information input signal.
21. The system of claim 1, wherein a time length of the initial subinterval is between 5% and 40% of a time length of the current update interval.
22. The system of claim 1, comprising an encoder side and a decoder side, wherein at least one of the first and second filter units is at the decoder side.
23. The system of claim 1, comprising an encoder side and a decoder side, wherein at least one of the first and second filter units is at the encoder side.
24. The system of claim 9, comprising an encoder side which comprises: a parameter estimator configured to estimate the parameters for at least one of the first and second filter unit.
25. The system of claim 1, further comprising a converter for converting a first representation of the information input signal into a second representation of the information input signal.
26. The system of claim 1, wherein the at least a subinterval is the update interval.
27. The system of claim 1, further configured to: determine if the first and/or second filter unit will operate as an identity filter; and in case of determination, bypass the first and/or second filter.
28. The system of claim 1, wherein the first filter unit is configured to scale the coefficients gradually by fading and/or monotonically or strictly monotonically the coefficients along at least the initial subinterval.
29. The system of claim 1, wherein the second filter unit is configured to scale the coefficients gradually by fading and/or monotonically or strictly monotonically the coefficients along at least the initial subinterval.
30. A method for filtering an information input signal divided into different update intervals, according to coefficients associated with the update intervals, to output a filtered output signal, wherein the information input signal is an audio signal, the method comprising: performing a first filtering at least at an initial subinterval of a current update interval according to coefficients associated to preceding update intervals, wherein the coefficients along at least the initial subinterval are scaled by a first scaling factor changing towards 0, or a value close to 0, along at least the initial subinterval; and performing a second filtering at least at the initial subinterval, according to coefficients associated to the current update interval, wherein the coefficients along the initial subinterval are scaled by a second scaling factor changing from 0, or a value close to 0, toward a value different from 0, or a value more distant from 0 than the value close to 0, along at least the initial subinterval, wherein the first filtering is performed on the information input signal and the second filtering is performed on signal outputted by the first filtering.
31. A non-transitory digital storage medium having a computer program stored thereon to perform a method for filtering an audio input signal divided into different update intervals, according to coefficients associated with the update intervals, to output a filtered output signal, the method comprising: performing a first filtering at least at an initial subinterval of a current update interval according to coefficients associated to preceding update intervals, wherein the coefficients along at least the initial subinterval are scaled by a first scaling factor changing towards 0, or a value close to 0, along at least the initial subinterval; and performing a second filtering at least at the initial subinterval, according to coefficients associated to the current update interval, wherein the coefficients along the initial subinterval are scaled by a second scaling factor changing from 0, or a value close to 0, toward a value different from 0, or a value more distant from 0 than the value close to 0, along at least the initial subinterval, wherein the first filtering is performed on the audio input signal and the second filtering is performed on signal outputted by the first filtering, when said computer program is run by a computer.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Embodiments of the present invention will be detailed subsequently referring to the appended drawings, in which:
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION OF THE INVENTION
(8) In the approach presented here, filtering parameters (also referred to as filter parameters or parameters) are in general different for different update intervals. Two consecutive update intervals may have different parameters. In examples, the update interval may be signal adaptive and its length may be changed or shifted over time.
(9) In some examples, the signal is divided into frames. For example, the frame may be associated to a fixed number of samples and/or a fixed time length (e.g., 20 ms). When transmitted or stored, the frame may be associated to particular parameters, e.g., filtering parameters. Within the same frame, the parameters may be in general constant.
(10) In some examples, the update interval may correspond to a frame. Therefore, when transmitted or stored, the signal may comprise parameters (e.g., filtering parameters) associated to the frame (which is also the update interval), e.g., by data encoded in association with a particular frame.
(11) In some examples, the update interval does not correspond to a pre-defined frame. When transmitted or stored, the signal may comprise parameters associated to the update interval even if they are signalled as being associated to the frame. In some cases, a new frame (with the new parameters) anticipates the new update interval, and the old update interval is still associated to the old parameters. When the update intervals are adaptive (e.g., their length is determined on the fly, on the basis of the characteristics of the signal, for example), of course they in general do not correspond with fixed-length frames. Hence, it is possible to associate parameters to a particular update interval (which in some cases, is associated to a frame).
(12)
(13) The signal 11 may be an information signal, such as an audio signal. A digital representation of an information signal may be used. The signal may comprise a succession of samples, each acquired at a different time instant (e.g., discrete time instants). The signal may be divided into different frames and/or update intervals (e.g., a succession of samples). Each frame and/or update interval may be constituted by a plurality of samples (e.g., 1, 2, . . . , n, . . . ), e.g., each associated to a discrete time instant). Each frame and/or update interval may be subdivided into an initial subinterval and a subsequent subinterval (the subinterval may be a proper subinterval, as its length may be smaller than the length of the update interval). In general, samples of the initial subinterval precede (are before) the samples of the subsequent subinterval of the same frame and/or update interval. A determined (current, presently processed) frame precedes a subsequent frame and/or update interval and is preceded by a preceding (previous, old) frame. A determined (current, present) update interval precedes a subsequent update interval and is preceded by a preceding (previous, old) update interval. The initial subinterval of an update interval may have a time length which is between 1% and 99%, more in particular 20% and 30% (e.g., one quarter), of the time length of the current update interval. The subsequent subinterval may have a time length which is between 1% and 99%, more in particular 70% and 80% (e.g., three quarters), of the time length of the current update interval.
(14) For some examples, it is referred to “at least one initial subinterval” of the update interval, implying that also the 100% of the update interval may be covered in some examples.
(15) The system 10 may filter the information input signal 11 (x) according to parameters varying with the update intervals (e.g., parameters which, in general, vary in time according to the particular update interval they are associated to, e.g., by virtue of the parameters being encoded and associated to a particular frame). The system 10 may provide a filtered output signal 15 (y or y[n]). The system 10 may provide post-filtered audio signal (e.g., a time domain, TD, representation of a post-filtered audio signal).
(16) The system 10 may comprise a first filter unit 12 to filter the information input signal 11 (first filter input signal). The first filter unit 12 may operate with samples of at least an initial subinterval of a current update interval (a present update interval, such as an update interval which is currently processed), to obtain a first filter output signal which is an intermediate signal 13 (y′ or y′ [n]). (The at least an initial subinterval may refer, in examples, to only the initial subinterval or, in examples, to an interval bigger than the initial subinterval, such as the update interval). The intermediate signal 13 may be obtained using parameters associated to the preceding update interval (e.g., the update interval preceding the current update interval). The first filter unit 12 is configured to change (e.g., gradually, e.g., by fading, e.g., monotonically) the parameters along at least the initial subinterval from a higher-filtering status to a lower-filtering status. For example, the parameters may be less reduced and/or less damped (hence implying a higher-filtering status) in correspondence to the first samples in the initial subinterval. The parameters may be more reduced and/or more damped (hence implying a lower-filtering status) in correspondence to the last samples in the at least the initial subinterval (where the parameters may be processed to be closer to 0).
(17) The system 10 may comprise a second filter unit 14. The second filter unit 14 may have a second filter input signal and a second filter output signal. The second filter unit 14 may filter the intermediate signal 13 (which is the second filter input signal). The second filter unit 14 may operate with samples of at least the initial subinterval of the current update interval (e.g., the same at least initial subinterval on which the filter unit 12 operates). The second filter unit 14 may filter the intermediate signal according to parameters associated to the current update interval. The second filter unit 14 may be configured to change (e.g., gradually, e.g., by fading, e.g., monotonically) the parameters along at least the initial subinterval from a lower-filtering status to a higher-filtering status. For example, the parameters may be more reduced and/or more damped (hence implying a lower-filtering status) for the first samples in the at least an initial subinterval (where the parameters may be processed to be 0 or close to 0). The parameters may be less reduced and/or less damped (hence implying a higher-filtering status) for the last samples in the at least an initial subinterval.
(18) The lower-filtering status may be such that the impulse response is closer to the impulse response of the identity filter than the impulse response in the higher-filtering status. In some examples, the lower-filtering status and the higher-filtering status may be such that the lower-filtering status implies an increased energy of the impulse response with respect to the energy of the impulse response of the higher-filtering status. In some examples, the lower-filtering status and the higher-filtering status may be such that the lower-filtering status implies a reduced energy of the impulse response with respect to the energy of the impulse response of the higher-filtering status. When the first filter unit 12 operates at the lower-filtering status, it implies an impulse response which is different from (e.g., lower or higher than) the energy implied by the same first filter unit 12 when it operates at higher filtering-status. The same applies to the second filter unit 14. In the lower-filtering status the parameters may be closer to 0 than in the higher-filtering status.
(19) In examples, the first filtering unit 12 may change from the higher-filtering status towards a lower-filtering status, and/or the second filtering unit 14 may change from the lower-filtering status to a higher-filtering status.
(20) In general terms, when changing from the higher-filtering status to the lower-filtering status, the parameters may be modified (e.g., gradually and/or monotonically and/or by fading and/or by damping). In the lower-filtering status, the parameters may be processed to be 0, or may be processed to be closer to 0 than the parameters in the higher-filtering status. For example, in the higher-filtering status the parameters may be less reduced and/or less damped and/or more distant from 0 than in the lower-filtering status.
(21) In lower-filtering status, a filtering effect may be reduced (e.g., the same effect of or an effect close to the effect of the identity filter may be obtained). In higher-filtering status, a strong filtering effect may be obtained.
(22) In higher-filtering status, the input signal is strongly filtered. In lower-filtering status the input signal is not strongly filtered. In examples, the more the parameters are dampened, the lower the filtering status.
(23) The first and/or second filter units 12, 14 may be configured to damp and/or reduce the parameters so that in the higher-filtering status the reduced and/or damped parameters are less damped (e.g., more distant from 0) and/or less reduced than in the lower-filtering status (e.g., close to 0).
(24) The first filtering unit 12 may be configured to scale (e.g., downscale) the parameters using a first damping factor or scaling factor, and/or the second filtering unit 14 may be configured to scale (e.g., downscale) the parameters using a second damping factor or scaling factor. The first damping factor or scaling factor and/or second damping factor or scaling factor may be closer to 0 in the lower-filtering status than in the higher-filtering status.
(25) The first and/or second filter unit 12, 14 may be configured to damp and/or reduce and/or downscale the parameters so that the parameters are damped and/or reduced by first damping factors and/or scaling factors which are closer to 0 in the lower-filtering status than in the higher-filtering status.
(26) The first filter unit 12 may be configured to change the parameters from the higher-filtering status to the lower-filtering status by gradually damping and/or reducing the parameters associated to the preceding update interval, and/or the second filter unit 14 may be configured to change the parameters by gradually increasing and/or enlarging from parameters close to 0 to the parameters associated with the current update interval.
(27) The first filter unit 12 may be configured to change the parameters from the higher-filtering status to the lower-filtering status by using decreasing damping factors and/or scaling factors (e.g., by using damping factors and/or scaling factors which, e.g. gradually, go towards 0). The second filter unit 14 may be configured to change (e.g., gradually) the parameters from the lower-filtering status to the higher-filtering status by enlarging (e.g., gradually) damping factors and/or scaling factors (e.g., by using damping factors and/or scaling factors which, e.g. gradually, depart from 0).
(28) The first filter unit 12 may be configured to change the parameters from the higher-filtering status to the lower-filtering status by applying a decreasing windowing function to the parameters (e.g., a windowing function which goes towards 0, e.g. gradually), and/or the second filter unit 14 may be configured to change the parameters from the lower-filtering status to the higher-filtering status by applying an enlarging windowing function to the parameters (e.g., a windowing function which departs from 0, e.g. gradually).
(29) The parameters may be provided, for example, as control data in the input signal 11. The filters may be, for example, Liner Time Invariant (LTI) Infinite impulse response (IIR) filters (e.g., for LTP postfiltering). The parameters may be or comprise, for example, gain information and/or pitch information.
(30) In particular, the first and second filter units 12 and 14 may be part of an LTP filter (or postfilter), e.g., at a decoder (e.g., an audio decoder). For example, the parameters may be obtained from harmonicity-based measurements. For example, the parameters may be based on a pitch lag T, on an integer part T.sub.int of the pitch lag, on a fractional part T.sub.fr of a pitch lag, and/or on a gain g, as obtained, for example, at an audio decoder. The parameters may be associated, for example, to an update interval (which in some examples is a frame of a fixed length or may have an adaptive length).
(31) Each of the first and second filter unit may therefore be associated to particular parameters and/or to a particular transfer function. In particular, the transfer function may be of the type having a numerator and a denominator, wherein the numerator comprises a gain value indicated by the gain information, and wherein the denominator comprises an integer part of a pitch lag indicated by the pitch lag information and a multi-tap filter depending on a fractional part of the pitch lag. For example, a transfer function may be:
(32)
whose parameters may be determined from parameters estimated at the encoder-side and/or decoded from a bitstream. g may be the decoded gain, T.sub.int and T.sub.fr integer and fractional part of a decoded pitch-lag, α and β two scalars that weight the gain, and B(z,T.sub.fr) a low-pass FIR filter whose coefficients depend on the fractional part of the decoded pitch-lag. The order and the coefficients of B(z, T.sub.fr) can also depend on the bitrate and the output sampling rate. A different frequency response can be designed and tuned for each combination of bitrate and output sampling rate. An example of the transfer function 130 is provided in
(33) Notably, parameters and the transfer function may change for each update interval (which may be one frame according to which the original signal may be subdivided). Therefore, the k.sup.th update interval may be associated to an H.sub.k(z) transfer function and parameters such as T.sub.int,k, T.sub.fr,k, g.sub.k, while the (k−1).sup.th update interval may be associated to an H.sub.k−1(z) transfer function and parameters such as T.sub.int,k−1, T.sub.fr,k−1, g.sub.k−1. Therefore, at the k.sup.th frame or update interval, the first filter unit 12 may operate using the old parameters T.sub.int,k−1, while the second filter unit 14 may operated using the updated parameters T.sub.int,k, T.sub.fr,k, g.sub.k. This process may be performed for at least the initial subinterval (or, in some examples, for the 100%) of the k.sup.th updated interval.
(34) More in general, each or at least one of the filters at elements 10 and 12 may be an LTI IIR filter (which may also be represented as H(z)) represented in the form:
(35)
or using a linear difference equation:
(36)
(37) The coefficients b.sub.i and a.sub.j may be filter parameters. Notably, the coefficients b.sub.i and a.sub.j may vary, in general, for different frames and/or update intervals.
(38) It has been noted that the filtered signal 15 results in a smooth transition between the preceding (k−1).sup.th update interval and the current k.sup.th update interval. Discontinuities between different update intervals are therefore avoided and/or reduced.
(39) Moreover, the processes to perform the filtering functions have a particularly reduced complexity. This kind of system may be used, for example, for a long term post filter (LTPF).
(40) The first and second filter units 12 and 14 may be considered as being connected in series (or cascade, or “one after other”).
(41)
(42)
(43) The parameters stored in the storage element 21b (which had been prepared for the preceding (k−1).sup.th frame) may be applied to a first filtering portion 22 (which may implement functions of the first filter unit 12) for at least the initial subinterval of the current k.sup.th frame or update interval. The parameters stored in the storage element 21a (prepared for the current k.sup.th frame) may be applied to a second filtering portion 24 (which may implement functions of the second filter unit 14) for at least the initial subinterval of the current k.sup.th frame or update interval.
(44) However, the parameters stored in the storage element 21b (originally prepared for the preceding (k−1).sup.th update interval) may be changed, e.g., by a block 23b, to cause the first filtering portion 22 to move (e.g., gradually, e.g., monotonically) from a higher-filtering status to a lower-filtering status within the initial subinterval of the current k.sup.th update interval. For example, the parameters may be scaled (e.g., downscaled, damped) using a damping factor which goes to 0, e.g., a decreasing damping factor (e.g., damping by multiplication). Block 23b may apply a windowing function. The windowing function may change towards 0 and/or decrease in at least the initial subinterval (e.g., from a highest positive value, e.g. 1, at the first sample of the k.sup.th current update interval, to a lowest value, e.g. 0, at the last sample of the at least initial subinterval).
(45) For example, the reduction of the filtering effect (e.g., from the higher-filtering status to the lower-filtering status) may be obtained by gradually reducing the damping factor (e.g., from a maximum value, e.g. 1, to a minimum or negligible value, e.g. 0). When the damping factor is negligible (or 0), the parameters are modified to a negligible (or 0) value and the output 13 (y′) of the first filtering portion 22 is almost similar to (or the same of) the information input signal 11 (x).
(46) The parameters stored in the storage element 21a (associated to the current k.sup.th frame or update interval) may be changed by a block 23a to cause the second filtering portion 24 to move (e.g., gradually, e.g., monotonically) from a lower-filtering status to a higher-filtering status within at least the initial subinterval of the current k.sup.th frame or update interval. For example, the parameters may be scaled (e.g., downscaled, damped) by an increasing damping factor (e.g., by multiplication), which may enlarge from 0 or a value close to 0 to a value more distant to 0. Block 23a may apply a windowing function. The windowing function may increase or otherwise change (e.g., from a lower-filtering status towards a higher-filtering status) from an initial time instant of the initial subinterval to a final time instant of the initial subinterval (e.g., from a value close to 0 to a value more distant from 0, and/or from a lowest value at the first sample of the initial subinterval to a positive highest value, e.g. 1, at the last sample of the initial subinterval of the k.sup.th current frame or update interval or at the last sample of the frame or update interval).
(47) For example, the increase of the filtering effect (e.g., from a lower-filtering status towards a higher-filtering status) may be obtained by gradually enlarging from 0 or a value close to 0 to a value more distant from 0, e.g., by enlarging or increasing (e.g., monotonically or strictly monotonically) the damping factor (e.g., from a value close to 0 to a value more distant from 0, and/or from a minimum or negligible value, e.g. 0, to a maximum value, e.g. 1). When the damping factor is negligible (or 0), the parameters are modified to a negligible (or 0) value and the output of the second filtering portion 24 is almost similar to (or the same of) its input (which is the intermediate signal y′ or 13).
(48) In examples, the parameters for the first and/or second filter units 12, 14 may be modified during the succession of the samples of at least the initial subinterval, by factors (e.g., the scaling factors of blocks 23a, 23b) which are complementary with each other to a constant value (e.g., a positive value, such as 1), so that their sum is constant. In examples, the variation of the factors may be linear (e.g., describable with a 1.sup.st-degree equation).
(49) In examples, the first filtering portion 22 and the second filtering portion 24 may share the same hardware/software structure, whose output changes only by virtue of the input of different inputs and/or parameters and/or factors.
(50) Notably, the parameters may be associated, in the storage elements 21a and 21b, to a particular length of the subinterval or to the 100% of update interval. Therefore, it may be known which percentage (or in any case which portion) of the update interval or frame is to be smoothed. In some cases, a user selection (e.g., set during a configuration session) may define the length of the at least a subinterval.
(51)
(52) A selector 32 may monitor the information input signal 11 and change between the use of filtering section 10 for the initial subinterval and use of the filtering section 31 for the subsequent interval. Notably, the filtering section 31 for the subsequent interval (third filter) may be made of structural and/or functional blocks used for the first and/or second filters 12 and 14.
(53) In addition or in alternative, the selector 32 may decide if, during the initial subinterval, the filtering section 10 (with the first and second filters 12, 14) is to be used for the initial subinterval or if the filtering section 31 is to be used for at least the initial subinterval (besides using the filtering section 31 for the subsequent subinterval, in case). The decision may be based on particular conditions, which may, for example, be based on the parameters (e.g., on comparisons between parameters' values associated to the current update interval and parameters' values associated to the previous update interval). Some examples of this decision are provided in following passages.
(54) The filters at elements 22, 24, and 31 may be LTP postfilter as discussed above or more in general LTI IIR filters (which may also be represented as H(z)) and can be presented in the form:
(55)
or using a linear difference equation:
(56)
(57) The coefficients b.sub.I and a.sub.j may be filter parameters.
(58) We consider a time varying filter that is in update interval k equal to the LTI IIR filter H.sub.k (which may be an LTP postfilter):
(59)
where T relates to the update interval (and may consist in a discrete number of samples) and k is its index, k−1 being associated to the preceding (k−1).sup.th update interval. The third filtering section 31 may be of this type. P and Q may be specific to the filter (e.g., feedforward filter order and feedback filter order, respectively). Q may be for example related to the maximum possible value for T.sub.int.
(60) The first filter elements 12 and/or 22 may output an intermediate signal y′ in the form:
(61)
(62) where s.sub.k−1[n] changes towards 0 when n increases for kT−T.sub.l≤n<(k+1)T
(63)
where T.sub.l relates to the initial subinterval.
(64) The second filter elements 14 and/or 24 may output a filtered output signal y in the form:
(65)
(66) Notably, the filtered output value y[n] has an input based on the intermediate filter output y′[n] provided by the first filter.
(67)
(68)
(69) In some examples, the first, second and third filter units 51, 52, and 53 are obtained as in
(70) The first filter unit 51 may implement the first filter unit 12 and/or the first filtering portion 22 and be used for filtering the initial subinterval of a current k.sup.th update interval with parameters (originally associated to the preceding (k−1).sup.th update interval) which move from a higher-filtering status to a lower-filtering status. The second filter unit 52 may implement the second filter unit 14 and/or the second filtering portion 24 and be used for filtering the initial subinterval of the current update interval with parameters (actually associated to the current k.sup.th update interval) which move from a lower-filtering status to a higher-filtering status. The third filter unit 53 may implement the third filtering section 31 for the subsequent interval of the current update interval.
(71) The fourth filter unit 54 may implement a filter for filtering the initial subinterval of a current k.sup.th update interval with parameters obtained by interpolating the parameters for the preceding (k−1).sup.th update interval and the parameters for the current k.sup.th update interval.
(72) The selector 55 may operate: in the initial subinterval (T.sub.l), by choosing among: a filtering operation based on the combined action of the first filter unit 51 and second filter unit 52; a filtering operation based on the third filter unit 53; and a filtering operation based on the fourth filter unit 54; in the subsequent interval, by using the third filter unit 53.
(73) With reference to the decision for the initial subinterval, the selector 55 may operate, for example, by using a first and/or one second threshold and/or conditions (e.g., conditions on the gain of the signal in subsequent update intervals). For example, the selector 55 may choose: the combined action of the first filter unit 51 and second filter unit 52 when the distance between the parameters of the current k.sup.th update interval and those of the preceding (k−1).sup.th update interval is high, e.g., over a second threshold; the action of the fourth filter unit 54 only when the distance between the parameters of the current k.sup.th update interval and those of the preceding (k−1).sup.th update interval is smaller (e.g., under the second threshold); and/or the action of the third filter unit 53 only when the distance between the parameters is less than a first threshold (which may be less than the second threshold) and/or when the parameters of the current k.sup.th update interval are the same of the parameters of the preceding (k−1).sup.th update interval.
(74) The second threshold may be actively set, for example, as the minimum between the integer part of the pitch lag at the current update interval and the integer part of the pitch lag at the previous update interval.
(75) In addition or in alternative, it is also possible to use a condition based on the gain of the signal at the previous update interval, so as to use the fourth filter unit 54 when the distance between the gain at the determined (current) update interval and the gain at the previous update interval is less than the first and/or second threshold. Accordingly, the second threshold as well as the condition on the gain may be modified in real time, e.g., to obtain a better filtering behaviour.
(76)
(77)
(78) At step S61, an input information signal (e.g., x, 11) may be obtained for a (determined) current k.sup.th update interval together with parameters associated to the current k.sup.th update interval.
(79) Then, first filter operations 61 may be performed (e.g., by any of the components 12, 22, 51) for the initial subinterval of the current k.sup.th update interval, by cycling the value (index) n among a plurality of samples of the initial subinterval. At S611, the first sample of the initial subinterval may be taken into consideration by initializing the variable n (as n=0). At S612, an intermediate value y′ [n] is obtained using parameters associated to the preceding (k−1).sup.th update interval. At 613 (“last sample of the initial SIT”), it is checked whether n has reached the value associated to the last sample of the initial subinterval (e.g., it is checked whether n is the last index of the initial subinterval). If n has reached the last value (index) of the initial subinterval, the first filter operations 61 are concluded and the second filter operations 62 are initiated. Otherwise, at S614 (“change the parameters along the initial SI of the current k.sup.th UI from a higher-filtering status to a lower-filtering status”), the parameters are changed so as to move from a higher-filtering status to a lower filtering status (e.g., by reducing the factors at block 23b of
(80) The second filter operations 62 may be performed (e.g., by any of the components 14, 24, 52) for the initial subinterval of the current k.sup.th update interval, by cycling the value (index) n among a plurality of samples of the initial subinterval. At S621, the first sample (of r n=0) of the initial subinterval may be taken into consideration by initializing the variable n to 0. At S622, a filtered output value y[n] is obtained using parameters associated to the current k.sup.th update interval. At S623 (“last sample of the initial SI?”), it is checked whether the index n has reached the value associated to the last sample of the initial subinterval (e.g., it is checked whether n is the last index of the initial subinterval). If the index n has reached the last value of the initial subinterval, the second filter operations 62 are concluded and the third filter operations 63 are initiated. Otherwise, at S624 (“change the parameters along the initial SI of the current k.sup.th UI from a lower-filtering status to a higher-filtering status”), the parameters are changed so as to move from a lower-filtering status to a higher filtering status (e.g., enlarging the values from 0 or a value close to 0 to a value more distant from 0, e.g. by increasing the values of the factors at block 23a). At S625, a new sample is taken into consideration (n=n+1) and step S612 is invoked.
(81) The third filter operations 63 are performed (e.g., by any of the components 31, 24, 53) for the subsequent (e.g., final) subinterval of the current k.sup.th update interval, by cycling the value (index) n among a plurality of samples of the subsequent interval. At S632, a filtered output value y[n] is obtained using parameters associated to the current k.sup.th update interval. At 633, it is determined whether the index n has reached the value associated to the last sample of the current k.sup.th update interval (e.g., it is checked whether if n is the last index of the update interval). If n has reached the last value of the update interval, the third filter operations 63 are concluded. Otherwise, at S635, a new sample is taken into consideration (e.g., by updating the index by n=n+1) and step S632 is repeated with the new index n.
(82) At the end of the method, all the values y[n] of the filtered output signal have been obtained. The value of the index k may be updated at S64. Step S61 may be invoked again for a (k+1).sup.th update interval.
(83) It is noted that it is not strictly needed for step S61 to be after any of steps S611-S63. In some examples, the information input signal at a current k.sup.th update interval may also have been obtained during the processing of the operations 61-63. In examples, the information input signal at a current k.sup.th update interval may have been obtained a priori.
(84) In the examples in which the first and second filtering operations are performed for the 100% of the update interval, the third filtering operations 63 are not performed.
(85)
(86) At step S72 (“Are parameters for k.sup.th UI and those for the (k−1).sup.th UI the same or is their distance within a first threshold?”), a first comparison is performed: the parameters for the current k.sup.th update interval are compared to the parameters for the preceding (k−1).sup.th update interval (e.g., by selector 55). If the parameters are the same or a distance between a parameter of the k.sup.th update interval and a parameter of the (k−1).sup.th update interval is within a first (low) threshold, at S73 (“Perform third filtering operations 63 without damping coefficients along the whole k.sup.th UI”) third filtering operations 63 are performed using, for the current k.sup.th update interval (both the initial subinterval and the subsequent subinterval), the parameters associated to the current k.sup.th update interval (as these parameters are the same or almost the same for the two consecutive update intervals, it is not needed to damp or smooth them: therefore, it is possible to apply the third filter 31 or 53 to the whole update interval, without distinguishing the initial subinterval from the subsequent subinterval). Subsequently, at S77, the value of k is updated and the new (k+1).sup.th update interval may now be filtered. This decision may be taken, for example, by any of the selectors shown in
(87) If the distance between the parameters is over the first threshold, a second check may be performed: for example, at S74 (“Is the distance between parameters for k.sup.th UI and those for the (k−1).sup.th UI within a second thresholds? g.sub.k=0 or g.sub.k−1=0?”) the parameters for the current k.sup.th update interval are compared to the parameters for the preceding (k−1).sup.th update interval (e.g., at selector 55). The parameters checked at S74 may also be different from those checked at S72. If the distance between the parameters for the current k.sup.th update interval and those for the preceding (k−1).sup.th update interval is within a second threshold (which may be higher than the first threshold), at S75 (“Perform fourth filtering operations interpolating the parameters”) a fourth filtering operation (e.g., by the fourth filter unit 54) may be operated at the initial subinterval of the current k.sup.th update interval. In this case, the parameters to be applied to the initial subinterval may be obtained by interpolating (and/or averaging) the parameters for the preceding (k−1).sup.th update interval and those for the current k.sup.th update interval. After that, a third filtering 63 may be operated at S75′ (“3.sup.rd filtering on the subsequent SI”) for the subsequent interval. Subsequently, at S77 (“k=k+1”), k is updated and the new (k+1).sup.th update interval may now be filtered.
(88) If at S74 it is verified that the distance between the parameters for the current k.sup.th update interval and those for the preceding (k−1).sup.th update interval is over the second threshold, at step S76 (“Perform first and second filtering operations 61 and 62 on the initial SI of the k.sup.th UI and perform the third filtering operations 63 on the subsequent SI of the k.sup.th UI”) the first, second, and third filtering operations 61, 62, 63 may be operated (e.g., by the elements 12, 14, 22, 24, 31, 51, 52, and/or 53): therefore, the first subinterval of the current update interval may be first filtered by any of 12, 22, 51, and/or 61 and then by any of 14, 24, 52 and/or 62, and the subsequent subinterval is filtered using any of 31, 53, and/or 63. Subsequently, at S77, k is updated and the new (k+1).sup.th update interval may be filtered.
(89) In examples, at least another condition may be set, in addition or in alternative (in some cases, at step S74). In some examples it is provided that, in order to initiate step S76, the condition has to be verified. In examples, the condition at S74 may comprise at least one of: If the gain of the determined (current) update interval is zero (g.sub.k=0), then the first filter is used, the second filter is not used and third filter is not used (and, where provided, the fourth filter is not used). If the gain of the previous update interval is zero (g.sub.k−1=0), then the first filter is not used, the second filter is used, the third filter is used (and, where provided, the fourth filter is not used). If both the gains of the previous and the current update intervals are different from zero (g.sub.k−1≠0 and g.sub.k≠0) then what is used is dependent on other parameters (e.g., we may look, in some examples, to the difference of the integer and/or fractional parts of the pitch lags).
(90) In some examples, step S74 may be performed before step S72.
(91) In some examples, only one comparison is performed. Therefore, there are examples, which do not have the steps S72 and S73 and there are examples which do not have the steps S74 and S75.
(92) In some examples, only one comparison is performed. Therefore, there are examples, which do not have the steps S72 and S73 and there are examples which do not have the steps S74 and S75.
(93) In examples, the first and/or second threshold(s) is(are) (or other conditions on the parameters, e.g., on the gain) for the first and/or second steps S72, S74, may be obtained in real time, e.g., from values of the parameters.
(94) In some examples relating to an LTP filter, a second threshold may be a pitch lag distance threshold defined so as to use the fourth filter unit 54 (and/or interpolation) when the distance (e.g., modulo difference) between parameters of the current k.sup.th update interval and parameters of the preceding (k−1).sup.th update interval is less than the minimum between the integer part of the pitch lag associated to the k.sup.th update interval and the integer part of the pitch lag associated to the (k−1).sup.th update interval. Therefore, the second comparison at step S74 may be:
|T.sub.int,k−T.sub.int,k−1|<min(T.sub.int,k,T.sub.int,k−1)
where T.sub.int,k and T.sub.int,k−1 are the integer parts of the pitch lag at update intervals k and k−1, respectively. Accordingly, the second comparison at S74 may, in some examples, check if both the two following conditions apply:
T.sub.int,k<2T.sub.int,k−1
T.sub.int,k>½T.sub.int,k−1,
(95) Hence, the second comparison at S74 be such that, in order to perform the filtering with the fourth filter unit 54, it is needed that the integer pitch is not increasing (from the (k−1).sup.th update interval to the k.sup.th update interval) for more than 100% nor decreasing for more than 50%: i.e., that there is no pitch doubling or halving between the previous update interval and the current update interval.
(96) Analogously, the second comparison at S74 be such that the first and second filtering (e.g., using any of the elements 12, 14, 51, 52, etc.) may be triggered when it is verified that
∥T.sub.int,k−T.sub.int,k−1|≥min(T.sub.int,k,T.sub.int,k−1)
which is how to say that at least one of the two following conditions is verified:
T.sub.int,k≥2T.sub.int,k−1
T.sub.int,k≥½T.sub.int,k−1,
(97) Hence, the first and second filter units may be activated (e.g., by the selector 55) when the integer part of the pitch lag at the current k.sup.th update interval varies extremely with respect to the integer part of the pitch lag at the previous (k−1).sup.th update interval.
(98) Another condition may be set. For example, step S74 may provide that, in order to perform the first and second filtering operations 61 and 62 (e.g., with the first and second filter unit 12 and 14), at least one the following conditions is to be verified:
g.sub.k=0
g.sub.k−1=0
(99) When g.sub.k−1=0 an effect may be obtained which is the same of skipping the first filter. When g.sub.k=0 an effect may be obtained which is the same of skipping the second filter.
(100) A condition may be that, if both the following conditions is verified:
g.sub.k≠0
g.sub.k−1≠0
in that case, the difference between the integer parts of the pitch lags (of the current and the previous frames) is checked at S74 (e.g., as discussed above).
(101) In this example it may be seen that: 1) if the parameters between the current update interval and the preceding interval are the same, for the current update interval it is used the same filter of the previous update interval (third filter unit 53); 2) if the parameters of the current update interval and the parameters of the preceding update interval are the extremely different or if at least one of the gains is zero, it is advantageous to use the first and second filters (12, 24, 14, 24, 51, 52, 61, 62); 3) if the gains of the current and the previous update interval are both different from 0, then it is determined from the pitch lag which filter should be used.
(102) Notably, (2) increases quality as compared to (1) and (3). (2) has lower complexity then conventional technology.
(103) In some examples, the fourth filter unit 54 is not used and, therefore, the second verification at S74 are not performed and only a comparison with an extremely small threshold (or a comparison on the exact value) may be performed.
(104) Other examples (e.g., non-LTP filters) may be based on other parameters. However, the present method performs for any IIR filter.
(105) In general terms, if there is a parameter difference, then the first and the second filter are used. Otherwise the third filter is used in the initial subinterval.
(106) The present solution may be used for example when LPC parameters change in a Code-Excited Linear Prediction (CELP) codec. That way discontinuities, that exist even after subframe based line spectral frequencies (LSF) interpolation, in CELP may be handled. Another example where this technique can be used is filtering for formant enhancement in CELP codecs.
(107)
(108)
(109) The apparatus 80 may comprise, for example, an optional prefilter 81a which may be operated, for example, as any of the systems 10, 30, 40, and 50, and which may perform any of the methods above and/or below. In other examples, the apparatus 80 may be avoided.
(110) The apparatus 80 may comprise a windowing block 82. The apparatus 80 may comprise a domain converter 83 which may convert TD (time domain) representation of the information signal into an FD (frequency domain) representation) of the information signal. For example, the converter 83 may be a Modified Discrete Cosine Transform (MDCT) block or Modified Discrete Sine Transform (MDST) block 83 (or a block associated to another lapped transformation), downstream to the windowing block 82, e.g., for a conversion into the frequency domain (FD). The apparatus 80 may comprise a Temporal Noise Shaping (TNS) block 84 to control temporal shape of quantization noise within a window of a transform. The apparatus 80 may comprise a frequency domain noise shaper (FDNS) block 85. The apparatus 80 may comprise a block 87 for obtaining FDNS parameters downstream to the windowing block 82. The apparatus 80 may comprise a quantization block 86 which may also include an entropy coder. The apparatus 80 may comprise a TD/TD (Time Domain Transient Detector) block 88.
(111) The apparatus 80 may comprise an LTP block 89 for obtaining LTP parameters (e.g., harmonicity information, gain information, pitch information such as pitch lag, etc.). At least some of the parameters obtained by the LTP block 89 may be used by devices 10, 30, 40, 50, and/or by methods 60 and/or 70 for each k.sup.th update interval of the signal. For example, the parameters for the k.sup.th update interval may be the pitch lag and the gain (which is some cases is optional and may be estimated at the decoder side) associated to the signal at the k.sup.th update interval. The operations of the LTP block 89 may be independent from the operations of the prefilter 81a: the prefilter 81a may also not to be present, but the LTP block 89 may operate correctly by providing parameters to the decoder side.
(112) The signal may be encoded by a bitstream writer 89′ and may be stored in a memory and/or transmitted to a decoder (e.g., wirelessly, e.g., using a standard protocol such as Bluetooth).
(113)
(114) The LTP postfilter 91 may obtain the digital representation 11a (x) of the signal to be filtered from the block 97, for example. The LTP postfilter 91 may obtain the coefficients 11b from the bitstream, for example.
(115) At least one of the systems 80 and/or 90 may perform an analysis operation (e.g., at the block 89) for obtaining the parameters associated to the k.sup.th and/or (k+1).sup.th update interval.
(116) A digital input information signal x[n] (11a) may be filtered with a time varying filter, whose parameters change at update interval T (e.g., the current k.sup.th update interval), producing the filtered output signal y[n]. The update interval T can also be signal adaptive and thus T can change over time. We may consider filters that can be represented as a liner time invariant (LTI) Infinite impulse response (IIR) filter during a time interval T. Time interval T may be the frame (e.g., the current filter discussed above) or a sub-frame of the digital signal. We may use the term frame and/or update interval for both a frame and a sub-frame.
(117) The LTI IIR filter (which may also be represented as H(z)) can be presented in the form:
(118)
or using a linear difference equation:
(119)
(120) The coefficients b.sub.i and a.sub.j are filter parameters (e.g., parameters to be stored in memory elements 21a and 21b, for example). The LTI IIR filter may be uniquely defined by its coefficients (parameters).
(121) We consider a time varying filter that is in update interval k equal to the LTI IIR filter H.sub.k:
(122)
(123) Instead of instantly changing the filter parameters at border between update intervals k−1 and k, we process a portion at the beginning of the update interval k with new set of time varying filters: 1. If (step S72) the filter parameters are the same (of the difference is extremely small), filtering with the filter H.sub.k is performed (step S73); 2. If (step S74) the distance between the filter parameters is small (e.g., within the second threshold checked at S74), the filter parameters are interpolated (S75) sample-by-sample and the beginning portion of update interval k is filtered using the interpolated parameters; 3. If (step S74) the distance between the filter parameters is big (e.g., bigger than the second threshold), (step S76) the beginning portion of length T.sub.l is first filtered with the filter H′.sub.k−1 (e.g., at elements such as 12, 22, 51) and subsequently by H′.sub.k (e.g., at elements such as 14, 24, 52) defined by:
(124)
(125) y′ [n] may be the intermediate output of the first filter unit 12 of
(126) An example of s.sub.k [n] and s.sub.k−1 [n] is provided in
(127) In
(128)
(129) The system as described in [3] may be used as a basis, including Time Domain Transient Detector (TD TD), Windowing, MDCT, TNS, FDNS, OLA, Quantization, Arithmetic Coder and LTP postfiltering (see blocks 82-89 and 92-97 above). The modification may be realized in the LTP postfilter and thus the details of the LTP will be described.
(130) In general terms, the LTP may be seen as a harmonic post-filter for filtering a representation of an information signal. It may be based on a transfer function comprising a numerator and a denominator, wherein the numerator may comprise a gain value indicated by the gain information, and the denominator may comprise an integer part of a pitch lag indicated by the pitch lag information and a multi-tap filter depending on a fractional part of the pitch lag. In examples, the transfer function of the post-filter comprises, in the numerator, a further multi-tap FIR filter for a zero fractional part of the pitch lag. In examples, the denominator comprises a product between the multi-tap filter and the gain value. In examples, the numerator may further comprise a product of a first scalar value and a second scalar value, wherein the denominator comprises the second scalar value and not the first scalar value, wherein the first and second scalar values are predetermined and have values greater than or equal to 0 and lower than or equal to 1, and wherein the second scalar value may be lower than the first scalar value.
(131) An example of LTP filter is provided hereinbelow (see also
(132) At the encoder side (e.g. apparatus 80), LTP parameter calculation may be used as described in [14]:
(133) 1. Pitch Estimation One pitch lag (integer part+fractional part) per frame is estimated (frame size e.g. 20 ms). One frame may be, for example, one update interval. This may be done in two steps to reduce complexity and improves estimation accuracy.
(134) a. First Estimation of the Integer Part of the Pitch Lag A pitch analysis procedure that produces a smooth pitch evolution contour is used (e.g. Open-loop pitch analysis described in [15], sec. 6.6). This analysis is generally done on a subframe basis (subframe size e.g. 10 ms), and produces one pitch lag estimate per subframe. Note that these pitch lag estimates do not have any fractional part and are generally estimated on a downsampled signal (sampling rate e.g. 6400 Hz). The signal used can be any audio signal, e.g. the input signal or an LPC weighted audio signal as described in [15], sec. 6.5.
(135) b. Refinement of the Integer Part of the Pitch Lag The final integer part of the pitch lag is estimated on an audio signal x[n] running at the core encoder sampling rate, which is generally higher than the sampling rate of the downsampled signal used in a. (e.g. 12.8 kHz, 16 kHz, 32 kHz . . . ). The signal x[n] can be any audio signal e.g. an LPC weighted audio signal. The integer part of the pitch lag is then the lag d.sub.m that maximizes the autocorrelation function
(136)
T−δ.sub.1≤d≤T+δ.sub.2
(137) c. Estimation of the Fractional Part of the Pitch Lag The fractional part may be found by interpolating the autocorrelation function C(d) computed in step 1.b. and selecting the fractional pitch lag which maximizes the interpolated autocorrelation function. The interpolation can be performed using a low-pass Finite impulse response, FIR, filter as described in e.g. [15], sec. 6.6.7.
(138) 2. Gain Estimation and Quantization
(139) The gain may be estimated on the input audio signal at the core encoder sampling rate, but it can also be any audio signal like the LPC weighted audio signal. This signal is noted y[n] and can be the same or different than x[n].
(140) The prediction y.sub.P[n] of y[n] may be first found by filtering y[n] with the following filter
P(z)=B(z,T.sub.fr)z.sup.−T.sup.
with T.sub.int the integer part of the pitch lag (estimated in 1.b.) and B (z, T.sub.fr) a low-pass FIR filter whose coefficients depend on the fractional part of the pitch lag T.sub.fr (estimated in 1.c.).
(141) One example of B(z) when the pitch lag resolution is ¼:
T.sub.fr=0/4B(z)=0.0000z.sup.−2+0.2325z.sup.−1+0.5349z.sup.0+0.2325z.sup.1
T.sub.fr=¼B(z)=0.0152z.sup.−2+0.3400z.sup.−1+0.5094z.sup.0+0.1353z.sup.1
T.sub.fr= 2/4B(z)=0.0609z.sup.−2+0.4391z.sup.−1+0.4391z.sup.0+0.0609z.sup.1
T.sub.fr¾B(z)=0.1353z.sup.−2+0.5094z.sup.−1+0.3400z.sup.0+0.0152z.sup.1
(142) The gain g is then computed as follows:
(143)
and limited between 0 and 1.
(144) Finally, the gain is quantized e.g. with two bits, using e.g. uniform quantization.
(145) The LTP postfilter from [14] may be used (an example of the transfer function is provided in
(146)
whose parameters are determined from the parameters estimated at the encoder-side and decoded from the bitstream. g is the decoded gain, T.sub.int and T.sub.fr the integer and fractional part of the decoded pitch-lag, α and β two scalars that weight the gain, and B(z, T.sub.fr) a low-pass FIR filter whose coefficients depends on the fractional part of the decoded pitch-lag. The order and the coefficients of B(z, T.sub.fr) can also depend on the bitrate and the output sampling rate. A different frequency response can be designed and tuned for each combination of bitrate and output sampling rate.
(147) Difference in the LTP postfilter to [14] may be the transition from one frame to the next. LTP postfilter used in the end portion of the frame k−1 is H.sub.k−1:
(148)
and in the end portion of the frame k is H.sub.k:
(149)
(150) TABLE-US-00001 b.sub.−1.sup.0 0.0000 b.sub.0.sup.0 0.2325 b.sub.1.sup.0 0.5349 b.sub.2.sup.0 0.2325
(151) With b.sub.j(T.sub.fr) defined in the following table:
(152) TABLE-US-00002 T.sub.fr 0/4 ¼ 2/4 ¾ b.sub.−1(T.sub.fr) 0.0000 0.0152 0.0609 0.1353 b.sub.0(T.sub.fr) 0.2325 0.3400 0.4391 0.5094 b.sub.1(T.sub.fr) 0.5349 0.5094 0.4391 0.3400 b.sub.2(T.sub.fr) 0.2325 0.1353 0.0609 0.0152
(153) In the beginning portion of the frame k (current k.sup.th frame or update interval) there may be three possibilities: 1. (step S73): If parameters are the same, namely: g.sub.k=g.sub.k−1, T.sub.int,k=T.sub.int,k−1, T.sub.fr,k=T.sub.fr,k−1, the beginning portion of the frame k is filtered with H.sub.k; 2. (step S75): If the difference between parameters is small, for example|T.sub.int,k−T.sub.int,k−1|<min (T.sub.int,k,T.sub.int,k−1) and |g.sub.k−g.sub.k−1|<max (g.sub.k, g.sub.k−1), the beginning portion of length L of the frame k is filtered with the time varying filter using interpolated parameters:
(154)
(155)
and subsequently by H′.sub.k:
(156)
(157) For cases where complexity is more important than the quality, the 3. possibility is used whenever at least one of g.sub.k≠g.sub.k−1, T.sub.int,k≠T.sub.int,k−1, T.sub.fr,k≠T.sub.fr,k−1 is satisfied. Some of these conditions may be more important than some other ones, according to specific examples. In some examples, the difference in the pitch is the most important condition to be verified, for the choice between the 2. and 3. possibilities.
(158) An example of the applications of the equations above for LTP postfilter is provided below with reference to
(159) y[n]=x[n]−=x[n], by virtue of g.sub.k=0; (with reference to
(160)
(161)
(162)
(163)
(164) Notably, when it is determined (e.g., by the selector 55) that the first and/or second filtering will not be performed (or will provide, as the output, the same value of the input, basically operating as “identity filter”, which is in general useless), it is possible to bypass the useless filtering unit and/or section (e.g., as in
(165) A discussion is here provided on the operation of the filters for an LTP postfilter. The decoded signal after MDCT or MDST (or any other lapped transform) synthesis may be postfiltered in the time-domain using an IIR filter whose parameters depend on the LTPF bitstream data may be, for example, “pitch_index” and/or “ltpf_active” (the latter activating/deactivating an LTP postfilter operation). To avoid discontinuity when the parameters change from one frame to the next, a transition mechanism may be applied on the first quarter of the current frame.
(166) An LTPF IIR postfilter can be implemented using (see also above):
(167)
with {circumflex over (x)}(n) is the filter input signal (i.e. the decoded signal after MDCT or MDST synthesis) and (n) is the filter output signal.
(168) The integer part p.sub.int and the fractional part p.sub.fr of the LTPF pitch-lag may be computed as follows. First the pitch-lag (e.g., at 12.8 kHz) may be recovered using
(169)
(170) The pitch-lag may then be scaled to the output sampling rate f, and converted to integer and fractional parts using
(171)
wherein Fs is the sampling rate.
(172) The filter coefficients c.sub.num(k) and c.sub.den(k,p.sub.fr) may be computed as follows
c.sub.num(k)=0.85*gain.sub.ltpf*tab_ltpf_num_fs[k] for k=0 . . . L.sub.num
c.sub.den(k,p.sub.fr)=gain.sub.ltpf*tab_ltpf_den_fs_[p.sub.fr][k] for k=0 . . . L.sub.den
with
(173)
and gain.sub.ltpf and gain.sub.ind may be obtained, in some examples, according to procedures such as:
(174) TABLE-US-00003 fs_idx = min(4,(f.sub.s/8000-1)); if (nbits < 320 + fs_idx*80) { gain_ltpf = 0.4; gain_ind = 0; } else if (nbits < 400 + fs_idx*80) { gain_ltpf = 0.35; gain_ind = 1; } else if (nbits < 480 + fs_idx*80) { gain_ltpf = 0.3; gain_ind = 2; } else if (nbits < 560 + fs_idx*80) { gain_ltpf = 0.25; gain_ind = 3; } else { gain_ltpf = 0; }
the tables tab_ltpf_num_fs[k] and tab_ltpf_den_fs[p.sub.fr][k] are predetermined. Some examples may be (instead of “fs”, an actual bandwidth is used):
(175) TABLE-US-00004 double tab_ltpf_num_8000[4][3] = { {6.023618207009578e−01, 4.197609261363617e−01, −1.883424527883687e−02}, {5.994768582584314e−01, 4.197609261363620e−01, −1.594928283631041e−02}, {5.967764663733787e−01, 4.197609261363617e−01, −1.324889095125780e−02}, {5.942410120098895e−01, 4.197609261363618e−01, −1.071343658776831e−02}}; double tab_ltpf_num_16000[4][3] = { {6.023618207009578e−01, 4.197609261363617e−01, −1.883424527883687e−02}, {5.994768582584314e−01, 4.197609261363620e−01, −1.594928283631041e−02}, {5.967764663733787e−01, 4.197609261363617e−01, −1.324889095125780e−02}, {5.942410120098895e−01, 4.197609261363618e−01, −1.071343658776831e−02}}; double tab_ltpf_num_24000[4][5] = { {3.989695588963494e−01, 5.142508607708275e−01, 1.004382966157454e−01, −1.278893956818042e−02, −1.572280075461383e−03}, {3.948634911286333e−01, 5.123819208048688e−01, 1.043194926386267e−01, −1.091999960222166e−02, −1.347408330627317e−03}, {3.909844475885914e−01, 5.106053522688359e−01, 1.079832524685944e−01, −9.143431066188848e−03, −1.132124620551895e−03}, {3.873093888199928e−01, 5.089122083363975e−01, 1.114517380217371e−01, −7.450287133750717e−03, −9.255514050963111e−04}}; double tab_ltpf_num_32000[4][7] = { {2.982379446702096e−01, 4.652809203721290e−01, 2.105997428614279e−01, 3.766780380806063e−02, −1.015696155796564e−02, −2.535880996101096e−03, −3.182946168719958e−04}, {2.943834154510240e−01, 4.619294002718798e−01, 2.129465770091844e−01, 4.066175002688857e−02, −8.693272297010050e−03, −2.178307114679820e−03, −2.742888063983188e−04}, {2.907439213122688e−01, 4.587461910960279e−01, 2.151456974108970e−01, 4.350104772529774e−02, −7.295495347716925e−03, −1.834395637237086e−03, −2.316920186482416e−04}, {2.872975852589158e−01, 4.557148886861379e−01, 2.172126950911401e−01, 4.620088878229615e−02, −5.957463802125952e−03, −1.502934284345198e−03, −1.903851911308866e−04}}; double tab_ltpf_num_48000[4][11] = { {1.981363739883217e−01, 3.524494903964904e−01, 2.513695269649414e−01, 1.424146237314458e−01, 5.704731023952599e−02, 9.293366241586384e−03, −7.226025368953745e−03, −3.172679890356356e−03, −1.121835963567014e−03, −2.902957238400140e−04, −4.270815593769240e−05}, {1.950709426598375e−01, 3.484660408341632e−01, 2.509988459466574e−01, 1.441167412482088e−01, 5.928947317677285e−02, 1.108923827452231e−02, −6.192908108653504e−03, −2.726705509251737e−03, −9.667125826217151e−04, −2.508100923165204e−04, −3.699938766131869e−05}, {1.921810055196015e−01, 3.446945561091513e−01, 2.506220094626024e−01, 1.457102447664837e−01, 6.141132133664525e−02, 1.279941396562798e−02, −5.203721087886321e−03, −2.297324511109085e−03, −8.165608133217555e−04, −2.123855748277408e−04, −3.141271330981649e−05}, {1.894485314175868e−01, 3.411139251108252e−01, 2.502406876894361e−01, 1.472065631098081e−01, 6.342477229539051e−02, 1.443203434150312e−02, −4.254449144657098e−03, −1.883081472613493e−03, −6.709619060722140e−04, −1.749363341966872e−04, −2.593864735284285e−05}}; double tab_ltpf_den_16000[4][5] = { {0.000000000000000e+00, 2.098804630681809e−01, 5.835275754221211e−01, 2.098804630681809e−01, 0.000000000000000e+00}, {0.000000000000000e+00, 1.069991860896389e−01, 5.50075001917711e−01, 3.356906254147840e−01, 6.698858366939680e−03}, {0.000000000000000e+00, 3.967114782344967e−02, 4.592209296082350e−01, 4.592209296082350e−01, 3.967114782344967e−02}, {0.000000000000000e+00, 6.698858366939680e−03, 3.356906254147840e−01, 5.500750019177116e−01, 1.069991860896389e−01}}; double tab_ltpf_den_24000[4][7] = { {0.000000000000000e+00, 6.322231627323796−02, 2.507309606013235e−01, 3.713909428901578e−01, 2.507309606013235e−01, 6.322231627323796e−02, 0.000000000000000e+00}, {0.000000000000000e+00, 3.459272174099855e−02, 1.986515602645028e−01, 3.626411726581452e−01, 2.986750548992179e−01, 1.013092873505928e−01, 4.263543712369752e−03}, {0.000000000000000e+00, 1.535746784963907e−02, 1.474344878058222e−01, 3.374259553990717e−01, 3.374259553990717e−01, 1.474344878058222e−01, 1.535746784963907e−02}, {0.000000000000000e+00, 4.263543712369752e−03, 1.013092873505928e−01, 2.986750548992179e−01, 3.626411726581452e−01, 1.986515602645028e−01, 3.459272174099855e−02}}; double tab_ltpf_den_32000[4][9] = { {0.000000000000000e+00, 2.900401878228730e−02, 1.129857420560927e−01, 2.212024028097570e−01, 2.723909472446145e−01, 2.212024028097570e−01, 1.129857420560927e−01, 2.900401878228730e−02, 0.000000000000000e+00}, {0.000000000000000e+00, 1.703153418385261e−02, 8.722503785537784e−02, 1.961407762232199e−01, 2.689237982237257e−01, 2.424999102756389e−01, 1.405773364650031e−01, 4.474877169485788e−02, 3.127030243100724e−03}, {0.000000000000000e+00, 8.56363748488349e−03, 6.42622944493845e−02, 1.687676705918012e−01, 2.587445937795505e−01, 2.587445937795505e−01, 1.687676705918012e−01, 6.426222944493845e−02, 8.563673748488349e−03}, {0.000000000000000e+00, 3.127030243100724e−03, 4.474877169485788e−02, 1.405773364650031e−01, 2.424999102756389e−01, 2.689237982237257e−01, 1.961407762232199e−01, 8.722503785537784e−02, 1.703153418385261e−02}}; double tab_ltpf_den_48000[4][13] = { {0.000000000000000e+00, 1.082359386659387e−02, 3.608969221303979e−02, 7.676401468099964e−02, 1.241530577501703e−01, 1.627596438300696e−01, 1.776771417779109e−01, 1.627596438300696e−01, 1.241530577501703e−01, 7.676401468099964e−02, 3.608969221303979e−02, 1.082359386659387e−02, 0.000000000000000e+00}, {0.000000000000000e+00, 7.041404930459358e−03, 2.819702319820420e−02, 6.547044935127551e−02, 1.124647986743299e−01, 1.548418956489015e−01, 1.767122381341857e−01, 1.691507213057663e−01, 1.352901577989766e−01, 8.851425011427483e−02, 4.499353848562444e−02, 1.557613714732002e−02, 2.039721956502016e−03}, {0.000000000000000e+00, 4.146998467444788e−03, 2.135757310741917e−02, 5.482735584552816e−02, 1.004971444643720e−01, 1.456060342830002e−01, 1.738439838565869e−01, 1.738439838565869e−01, 1.456060342830002e−01, 1.004971444643720e−01, 5.482735584552816e−02, 2.135757310741917e−02, 4.146998467444788e−03}, {0.000000000000000e+00, 2.039721956502016e−03, 1.557613714732002e−02, 4.499353848562444e−02, 8.851425011427483e−02, 1.352901577989766e−01, 1.691507213057663e−01, 1.767122381341857e−01, 1.548418956489015e−01, 1.124647986743299e−01, 6.547044935127551e−02, 2.819702319820420e−02, 7.041404930459358e−03}};
(176) Five different cases may be considered: 1. First case: ltpf_active=0 and mem_ltpf_active=0 (“mem_ltpf_active” referring to the activation/deactivation status in the preceding frame):
(177)
(178)
(179)
with c.sub.num.sup.mem, c.sub.den.sup.mem, p.sub.int.sup.mem and p.sub.fr.sup.mem are the filter parameters computed in the previous frame 4. Fourth case: ltpf_active=1 and mem_ltpf_active=1 and p.sub.int=p.sub.int.sup.mem and
(180)
(181)
(182) Advantages of the invention are here discussed. The examples above are less complex than the previously used implementations. For example in the exemplary case of the LTP postfilter, the complexity advantage over the LPC method used in [13] is clear. Comparing to the cross-fade methods used in [9], [10], [11] and [12] there is one operation less per sample. To see this, notice that
(183)
can be realized by subtracting constant
(184)
from βg.sub.k−1 and adding constant
(185)
sample wise. Together with the filtering using H′.sub.k−1 and H′.sub.k this is equivalent number of operations to filtering with H.sub.k−1 and H.sub.k followed by weighting of the filtered signals as used in the cross-fade method. The cross-fade method then is continued with the addition of the weighted signals, while the proposed method already has already produced the output.
(186) When it is determined that the first and/or second filtering will not be performed (or will provide, as the output, the same value of the input, basically operating as “identity filter”, which is in general useless), it is possible to bypass the useless filtering unit and/or section (e.g., as in
(187) In general, discontinuities are avoided when filter changes at a frame border from H.sub.k−1:
(188)
to H.sub.k:
(189)
by filtering the beginning portion with length L of the frame k with time-varying filter H′.sub.k−1:
(190)
followed by filtering the intermediate output y′[n] of the time-varying filter H′.sub.k−1 with the time-varying filter H′.sub.k:
(191)
H′.sub.k−1 is time-varying filter that changes from full filtering with H.sub.k−1 to no filtering. H′.sub.k is time-varying filter that changes from no filtering to full filtering with H.sub.k.
(192) A first example (based on the example of
(193) TABLE-US-00005 If g.sub.k-1==g.sub.k and g.sub.k==0 then there is no filtering. Else If g.sub.k-1==0 and g.sub.k!=0 then { - there is no first filtering - there is second filtering in T.sub.1 - there is third filtering in the subsequent subinterval (where T.sub.1 != T) } Else If g.sub.k-1!=0 and g.sub.k ==0 then { - there is first filtering in T.sub.1 - there is no second filtering - there is no third filtering in the subsequent subinterval } Else If g.sub.k-1!=0 and g.sub.k!=0 then the difference of the integer and fractional part of the pitch lag is examined { If the integer and fractional part of the pitch lag in k-1 and k are the same (pitch_int(k- 1)== pitch_int(k) && pitch_fr(k-1)== pitch_fr(k)) then { ∘ there is no first filtering nor second filtering ∘ there is third filtering in T.sub.1 and in T.sub.s (i.e., along the whole T) } else if there is a difference in the integer or in the fractional part of the pitch lag { ∘ there is first filtering in T.sub.1 ∘ there is second filtering in T.sub.1 ∘ there is third filtering in the subsequent subinterval (where if T.sub.1 != T) } }
(194) A second example is here provided in pseudocode:
(195) 2.
(196) TABLE-US-00006 If g.sub.k-1==g.sub.k and g.sub.k ==0 then there is no filtering. Else If g .sub.k-1 ==0 and g.sub.k!=0 then { - there is no first filtering - there is second filtering in T.sub.1 - there is third filtering in the subsequent subinterval (where T.sub.1 != T) } Else If gk -1!=0 and g.sub.k ==0 then { - there is first filtering in T.sub.1 - there is no second filtering - there is no third filtering } Else If g.sub.k-1!=0 and g.sub.k!=0 then we look at the difference of the integer part of the pitch { If the absolute difference between the integer part of the pitch in k-1 and k is below a threshold then { o there is fourth filtering in T.sub.1 o there is third filtering in T (where T.sub.1 != T) } else if the absolute difference between the integer part of the pitch in k-1 and k is above a threshold then { o there is first filtering in T.sub.1 o there is second filtering in T.sub.1 o there is third filtering in the subsequent subinterval (of course only if T.sub.1 != T) } }
(197) In this 2. implementation we could also include the fractional part of the pitch in addition to checking the difference between the integer part of the pitch.
(198)
(199)
(200) In examples, the systems 110 and 120 may be the same device.
(201) Depending on certain implementation requirements, examples may be implemented in hardware. The implementation may be performed using a digital storage medium, for example a floppy disk, a Digital Versatile Disc (DVD), a Blu-Ray Disc, a Compact Disc (CD), a Read-only Memory (ROM), a Programmable Read-only Memory (PROM), an Erasable and Programmable Read-only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (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.
(202) Generally, examples may be implemented as a computer program product with program instructions, the program instructions being operative for performing one of the methods when the computer program product runs on a computer. The program instructions may for example be stored on a machine readable medium.
(203) Other examples comprise the computer program for performing one of the methods described herein, stored on a machine readable carrier. In other words, an example of method is, therefore, a computer program having a program instructions for performing one of the methods described herein, when the computer program runs on a computer.
(204) A further example of the methods is, therefore, a data carrier medium (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 medium, the digital storage medium or the recorded medium are tangible and/or non-transitionary, rather than signals which are intangible and transitory.
(205) A further example comprises a processing unit, for example a computer, or a programmable logic device performing one of the methods described herein.
(206) A further example comprises a computer having installed thereon the computer program for performing one of the methods described herein.
(207) A further example comprises an apparatus or a system transferring (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.
(208) In some examples, 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 examples, a field programmable gate array may cooperate with a microprocessor in order to perform one of the methods described herein. Generally, the methods may be performed by any appropriate hardware apparatus.
(209) While this invention has been described in terms of several advantageous 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.