Apparatus and method for adaptive gain long-term post-filtering

The adaptive gain control for long-term post-filtering stabilizes noise suppression by adjusting gain based on pitch stability, addressing artifacts and maintaining compatibility, while reducing computational complexity.

EP4756800A1Pending Publication Date: 2026-06-10FRAUNHOFER GESELLSCHAFT ZUR FORDERUNG DER ANGEWANDTEN FORSCHUNG EV

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
FRAUNHOFER GESELLSCHAFT ZUR FORDERUNG DER ANGEWANDTEN FORSCHUNG EV
Filing Date
2024-12-05
Publication Date
2026-06-10

Smart Images

  • Figure IMGAF001_ABST
    Figure IMGAF001_ABST
Patent Text Reader

Abstract

An apparatus for long-term post-filtering according to an embodiment is provided. The apparatus comprises a gain controller (110) for determining a long-term post-filter gain for long-term post-filtering. Moreover, the apparatus comprises a long-term post-filter (120) for conducting long-term post-filtering of an audio input signal depending on the long-term post-filter gain to obtain a filtered audio signal. The gain controller (110) is configured to determine the long-term post-filter gain depending on a stability of a pitch of the audio input signal.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention relates to long-term post-filtering, to an apparatus and a method for long-term post-filtering, and, more particularly, to an apparatus and a method for long-term post-filtering with an adaptive gain.

[0002] A Long-Term Post-Filter (LTPF) suppresses noise between harmonics and thus improves the perceptual quality of a signal. The amount of noise suppression is controlled by the gain of the LTPF. In LC3 (see [1]), a LTPF uses constant gain that is dependent on the bitrate to reduce the number of bits (needed otherwise for coding different values of the gain). See also [7], chapter 5.4.9, regarding LTPF in LC3plus. There, a decoded signal obtained after MDCT synthesis is postfiltered in the time-domain using an IIR filter whose parameters depend on the LTPF bitstream parameters pitch_index and ltpf_active. The filter coefficients are a pre-defined set, and thus, the result of the IIR filter is always stable. To avoid discontinuities when the parameters change from one frame to the next, a particular transition mechanism is applied (see chapter 5.4.9.2 of [7]).

[0003] A LTPF (see [2]) in EVS (see [3]) uses signal adaptive quantized gain that is computed at the encoder and transmitted in the bitstream. A Bass Post-Filter (BPF) (see [4]) in EVS (see [3]) uses signal adaptive gain that is computed and quantized at the decoder using the gain adjustment factor received from the encoder in the bitstream. Pre- / Post-filters in Opus (see [5]) also use signal adaptive gain that is computed at the encoder and transmitted in the bitstream. A pitch lag used in the post-filters of the above codecs is computed at the encoder and transmitted in the bitstream. In Harmonic Post-Filter (HPF) (see [6]), gain and pitch for the post-filter are computed at the decoder.

[0004] However, for example, LTPF in LC3 uses constant gain for the whole signal and thus achieves the same level of noise suppression between harmonics. For a given bitrate, the gain needs to be set for wide range of signals and thus inherently includes a compromise between full and minimal filtering.

[0005] Because of the limitation of the precision for coding the pitch lag and because of rounding errors in pitch calculation, the coded pitch lag can significantly fluctuate even for signals with constant pitch. In LTPF, this fluctuation of the coded pitch lag can produce audible artifacts.

[0006] The object of the present invention is to provide improved concepts for long-term post-filtering. The object of the present invention is solved by the subject-matter of the independent claims. Particular embodiments are provided in the dependent claims.

[0007] An apparatus for long-term post-filtering according to an embodiment is provided. The apparatus comprises a gain controller for determining a long-term post-filter gain for long-term post-filtering. Moreover, the apparatus comprises a long-term post-filter for conducting long-term post-filtering of an audio input signal depending on the long-term post-filter gain to obtain a filtered audio signal. The gain controller is configured to determine the long-term post-filter gain depending on a stability of a pitch of the audio input signal.

[0008] Moreover, a method for long-term post-filtering according to an embodiment is provided. The method comprises: Determining a long-term post-filter gain for long-term post-filtering. And: Conducting long-term post-filtering of an audio input signal depending on the long-term post-filter gain to obtain a filtered audio signal.

[0009] Determining the long-term post-filter gain is conducted depending on a stability of a pitch of the audio input signal.

[0010] Furthermore, a computer program according to an embodiment for implementing the above-described method when being executed on a computer or signal processor is provided.

[0011] According to an embodiment, if the coded pitch lag is constant or has only insignificant fluctuations, the LTPF gain may, e.g., be increased in small steps. If the coded pitch lag changes, then an apparatus or a method of an embodiment may, e.g., return to the default LTPF gain in small steps. If LTPF is deactivated, then an apparatus or a method of an embodiment may, e.g., continue to apply LTPF with the same pitch lag in subsequent frames but by decrementing the gain in small steps until it reaches zero.

[0012] In embodiments, insignificant fluctuations in the pitch lag used in LTPF may, e.g., be avoided, by ignoring small differences at the border of the quantization precision for the coded pitch lag. According to embodiments, basically, in most cases, if there is difference of just one step in the possible representation of the coded pitch lag in the bitstream, then this difference may, e.g., be ignored.

[0013] By correcting the fluctuations in the coded pitch lag of signals with constant pitch and / or by varying the strength of the LTPF by tracking pitch changes, embodiments control the amount of noise suppression between harmonics. This leads to a backward compatible improvement in perceptual quality, without need for additional signaling, with insignificant increase in computational complexity.

[0014] Embodiments provide an approach of extremely low complexity, which is backward compatible (as the decoder side is affected only).

[0015] An apparatus according to an embodiment, may, e.g., comprise a gain controller and a long-term post filter (LTPF).

[0016] Moreover, in an embodiment, an apparatus of an embodiment may, e.g., furthermore comprise a pitch stability calculator.

[0017] Furthermore, according to an embodiment, an apparatus of an embodiment may, e.g., moreover comprise a pitch corrector.

[0018] In the following, embodiments of the present invention are described in more detail with reference to the figures, in which: Fig. 1illustrates an apparatus for long-term post-filtering according to an embodiment. Fig. 2illustrates an apparatus for long-term post-filtering according to an embodiment further comprising a pitch stability calculator. Fig. 3illustrates an apparatus for long-term post-filtering according to an embodiment further comprising a pitch corrector. Fig. 4illustrates an apparatus for long-term post-filtering according to a particular embodiment, which comprises a gain controller, a long-term post-filter, a pitch stability calculator and a pitch corrector. Fig. 5illustrates an apparatus for long-term post-filtering according to a specific embodiment being implemented by a specific circuitry, which comprises a gain controller, a long-term post-filter, a pitch stability calculator and a pitch corrector. Fig. 5(a)-(d)illustrate portions of Fig. 5 in enlarged versions with additional explanations regarding the realized functionality. Fig. 6illustrates a spectrogram of a pitch pipe before applying adaptive gain and pitch correction. Fig. 7illustrates a spectrogram of a pitch pipe after applying adaptive gain and pitch correction according to an embodiment. Fig. 8illustrates an average periodogram of pitch pipe before and after applying adaptive gain and pitch correction.

[0019] Fig. 1 illustrates an apparatus for long-term post-filtering according to an embodiment is provided.

[0020] The apparatus comprises a gain controller 110 for determining a long-term post-filter gain for long-term post-filtering.

[0021] Moreover, the apparatus comprises a long-term post-filter 120 for conducting long-term post-filtering of an audio input signal depending on the long-term post-filter gain to obtain a filtered audio signal. The gain controller 110 is configured to determine the long-term post-filter gain depending on a stability of a pitch of the audio input signal.

[0022] According to an embodiment, the gain controller 110 may, e.g., be configured to determine a first gain value for the long-term post-filter gain depending on a first stability of the pitch in a first portion of the audio input signal, wherein the long-term post-filter 120 may, e.g., be configured to conduct long-term post-filtering of the first portion of the audio input signal using the first gain value to obtain a first filtered portion of the filtered audio signal. The gain controller 110 may, e.g., be configured to determine a second gain value for the long-term post-filter gain depending on a second stability of the pitch in a second portion of the audio input signal, wherein the second gain value is different from the first gain value, wherein the long-term post-filter 120 may, e.g., be configured to conduct long-term post-filtering of the second portion of the audio input signal using the second gain value to obtain a second filtered portion of the filtered audio signal.

[0023] In an embodiment, a pitch lag of a current frame of a plurality of frames indicates a pitch lag of a current audio signal portion being encoded within the current frame. A pitch lag for a previous frame of a plurality of frames indicates a pitch lag for a previous audio signal portion being encoded within a previous frame, preceding the current frame.

[0024] Said previous frame may, e.g., be one of a plurality of preceding frames of the plurality of frames, which precede the current frame.

[0025] For example, the plurality of frames may, e.g., be received at a receiver side at different points-in-time, and all of the plurality of frames, which have been received earlier than the current frame at the receiver side may, e.g., be considered as preceding frames of the plurality of frames, which precede the current frame. Or, for example, each of the plurality of frames may, e.g., comprise a time-stamp, and all of the plurality of frames, which have an earlier time stamp than the time stamp of the current frame may, e.g., be considered as preceding frames of the plurality of frames, which precede the current frame. Or, for example, each of the plurality of frames may, e.g., comprise a numerical index, and all of the plurality of frames, which have a numerical index being smaller than the numerical index of the current frame may, e.g., be considered as preceding frames of the plurality of frames, which precede the current frame.

[0026] In embodiments, said previous frame does not have to be the frame immediately preceding the current frame. For example, in some embodiments, said previous frame may, e.g., be the second-last frame before the current frame. Such an embodiment may, e.g., be particularly useful for embodiments, where information on a pitch lag, e.g., a parameter indicating the pitch lag, is transmitted only every second frame.

[0027] The gain controller 110 may, e.g., be configured to determine the long term post filter gain depending on whether the pitch lag for the current frame is equal to a pitch lag for the previous frame or whether the pitch lag for the current frame is different from the pitch lag for the previous frame. Or, the gain controller 110 may, e.g., be configured to determine the long term post filter gain depending on whether an absolute difference between the pitch lag for the current frame and the pitch lag for the previous frame is smaller than a threshold value or whether the absolute difference is greater than or equal to the threshold value.

[0028] According to an embodiment, the apparatus may, e.g., be configured to receive a bitstream comprising the plurality of frames or an encoding of the plurality of frames and comprising an encoding of the pitch lag for the previous frame and an encoding of the pitch lag for the current frame.

[0029] In an embodiment, the gain controller 110 may, e.g., be configured to increase the long term post filter gain per frame over a group of frames, if, over the group of frames, the pitch lag for each frame of the group of frames remains constant. Or, the gain controller 110 may, e.g., be configured to increase the long term post filter gain per frame over a group of frames, if, over the group of frames, an absolute difference between the pitch lag for each frame of the group of frames and the pitch lag for its previous frame is smaller than a threshold value.

[0030] According to an embodiment, the gain controller 110 may, e.g., be configured to decrease the long term post filter gain per frame over a group of frames, if, over the group of frames, the pitch lag changes for each frame of the group of frames with respect to its previous frame. Or, the gain controller 110 may, e.g., be configured to decrease the long term post filter gain per frame over a group of frames, if, over the group of frames, an absolute difference between the pitch lag for each frame of the group of frames and the pitch lag for its previous frame is greater than or equal to a threshold value.

[0031] In an embodiment, the gain controller 110 may, e.g., be configured to determine the long-term post-filter gain further depending on whether or not the long-term post-filter 120 has been active for the previous frame of the current frame.

[0032] According to an embodiment, the gain controller 110 may, e.g., be configured to determine the long-term post-filter gain further depending on whether or not the long-term post-filter 120 is active for the current frame.

[0033] Fig. 2 illustrates an apparatus for long-term post-filtering according to an embodiment further comprising a pitch stability calculator 105. The pitch stability calculator 105 may, e.g., be configured to determine first information indicating whether or not the pitch lag for the current frame has changed. The gain controller 110 may, e.g., be configured to determine the long-term post-filter gain depending on the first information. The pitch stability calculator 105 may, e.g., be configured to determine that the pitch lag for the current frame has changed, if the coded pitch lag of the current frame is different from the pitch lag used by the long-term post-filter 120 in the previous frame of the current frame; and is configured to determine that the pitch lag for the current frame has not changed, if the coded pitch lag of the current frame is equal to the pitch lag used by the long-term post-filter 120 in the previous frame of the current frame.

[0034] In an embodiment, the pitch stability calculator 105 may, e.g., be configured to determine second information indicating whether or not the pitch lag for the previous frame of the current frame has been stable. The gain controller 110 may, e.g., be configured to receive the first information and the second information from the pitch stability calculator 105. The gain controller 110 may, e.g., be configured to determine the long-term post-filter gain using said information from the pitch stability calculator 105. The pitch stability calculator 105 may, e.g., be configured to determine that the pitch lag for the previous frame of the current frame has been stable, if, over a group of preceding frames of the current frame, the pitch lag remains constant for each frame of the group of preceding frames; and is configured to determine that the pitch lag for the previous frame has not been stable, if, over a group of preceding frames of the current frame, the pitch lag does not remain constant for each frame of the group of preceding frames. Or, the pitch stability calculator 105 may, e.g., be configured to determine that the pitch lag for the previous frame of the current frame has been stable, if the absolute difference between the pitch lag for the previous frame and the pitch lag for its preceding frame is smaller than a threshold value; and is configured to determine that the pitch lag for the previous frame of the current frame has not been stable, if the absolute difference is greater than or equal to the threshold value.

[0035] According to an embodiment, the gain controller 110 may, e.g., be configured to increase the long-term post-filter gain, if the long-term post-filter 120 is active for the current frame and if the first information from the pitch stability calculator 105 indicates that the pitch lag for the current frame has not changed. The gain controller 110 may, e.g., be configured to decrease the long-term post-filter gain, if the long-term post-filter 120 is active for the current frame and if the second information from the pitch stability calculator 105 indicates that the pitch lag for the previous frame has not been stable and if the first information from the pitch stability calculator 105 indicates that the pitch lag for the current frame has changed.

[0036] In an embodiment, the gain controller 110 may, e.g., be configured to decrease the long-term post-filter gain, if the long-term post-filter 120 is not active for the current frame and if the long-term post-filter 120 has been active for the previous frame and if the second information from the pitch stability calculator 105 indicates that the pitch lag for the previous frame has not been stable and if the first information from the pitch stability calculator 105 indicates that the pitch lag for the current frame has changed. The gain controller 110 may, e.g., be configured to set the long-term post-filter gain to 0, if the long-term post-filter 120 is not active for the current frame and if the long-term post-filter 120 has not been active for the previous frame and if the second information from the pitch stability calculator 105 indicates that the pitch lag for the previous frame has not been stable. According to an embodiment, in any condition other the above mentioned, the gain controller 110 may, e.g., be configured to use the long-term post-filter gain from a previous frame.

[0037] According to an embodiment, the pitch stability calculator 105 may, e.g., be configured to determine whether or not the pitch lag for the previous frame of the current frame has been stable depending on whether or not a normalized correlation of the current frame computed using the pitch lag used by the long-term post-filter 120 in the previous frame is greater than a normalized correlation of the current frame computed using the coded pitch lag from the current frame. E.g., in the previous frame, the pitch lag may have been corrected, and so, in the previous frame, the coded pitch lag and the pitch lag used by the long-term post-filter 120 can be different, and the normalized correlation may, e.g., be computed using the pitch lag used by the long-term post-filter 120 in the previous frame.

[0038] In an embodiment, the pitch stability calculator 105 may, e.g., be configured to compute the normalized correlation of the current frame using the pitch lag used by the long-term post-filter 120 in the previous frame or may, e.g., be configured to compute the normalized correlation of the current frame using the coded pitch lag from the previous frame.

[0039] Fig. 3 illustrates an apparatus for long-term post-filtering according to an embodiment further comprising a pitch corrector 108. The pitch corrector 108 may, e.g., be configured to amend a pitch lag for a current frame for conducting long-term post-filtering of the audio signal portion of the current frame depending on whether or not the pitch lag for the previous frame of the current frame has been stable and / or depending on whether or not the pitch lag for the current frame has changed.

[0040] According to an embodiment, the pitch corrector 108 may, e.g., be configured to use the pitch lag for the current frame for conducting long-term post-filtering of the audio signal portion of the current frame, if the long-term post-filter 120 is active for the current frame and if the second information from the pitch stability calculator 105 indicates that the pitch lag for the previous frame has not been stable and if the first information from the pitch stability calculator 105 indicates that the pitch lag for the current frame has changed. Otherwise the pitch corrector 108 may, e.g., be configured to use a previous pitch lag for conducting long-term post-filtering of the audio signal portion of the current frame.

[0041] In a following, concepts of a pitch stability calculator 105 according to an embodiment are described.

[0042] A pitch stability calculator 105 may, e.g., have a counter which is updated as given below: Conditional Signals Pitch stability counter update LTPF active LTPF active in previous frame Pitch changed Pitch was stable trueXfalseXincrementAny combination of values other than the abovereset

[0043] An X in the tables indicates that the value of the variable can be either true or false and that the output of the apparatus is not depending on its value.

[0044] In an embodiment, a pitch stability calculator 105 may, e.g., output two pitch stability control signals: A first signal may, e.g., be a "pitch changed" signal: A Boolean signal which indicates if pitch lag changed in the current frame. A second signal may, e.g., be a "pitch was stable" signal: A Boolean signal which indicates if pitch lag was stable until the previous frame.

[0045] The value of the variable pitch changed may, e.g., be set to true if the coded pitch lag of the current frame is different from the pitch lag used by the long-term post-filter 120 in the previous frame.

[0046] The value of the variable pitch was stable may, e.g., be set to true if: the value of the counter is greater than certain value n. pitch changed is true, and the coded pitch lag of the current frame and the pitch lag used by the long-term post-filter 120 in the previous frame are non-zero, and the normalized correlation of the current frame computed using the pitch lag used by the long-term post-filter 120 in the previous frame is greater than the normalized correlation of the current frame computed using the coded pitch lag from the current frame.

[0047] In an embodiment, the normalized correlation may, e.g., be computed on current frame x̂(n) for pitch lag T as below: nc = max 0 ∑ i = 0 L − 1 x ^ i x ^ i − T ∑ i = 0 L − 1 x ^ 2 i ∑ i = 0 L − 1 x ^ 2 i − T

[0048] L is the length of the frame.

[0049] In the following, tables are presented, which summarize the actions of a gain controller 110 of a particular embodiment and of a pitch corrector 108 of a particular embodiment depending on different control signals:Gain controller:

[0050] Conditional Signals Gain update LTPF active LTPF active in previous frame Pitch changed Pitch was stable trueXfalseXincrementtrueXtruefalsedecrementfalsetruetruefalsedecrementfalsefalseXfalseset to 0Any combination of values other than the aboveuse previous LTPF gain Pitch corrector:

[0051] Conditional Signals Pitch update LTPF active LTPF active in previous frame Pitch changed Pitch was stable trueXtruefalseuse current coded pitch lagAny combination of values other than the aboveuse previous LTPF pitch lag

[0052] Fig. 4 illustrates an apparatus for long-term post-filtering according to a particular embodiment, which comprises a gain controller 110, a long-term post-filter 120, a pitch stability calculator 105 and a pitch corrector 108.

[0053] Fig. 5 illustrates an apparatus for long-term post-filtering according to a specific embodiment being implemented by a specific circuitry, which comprises a gain controller 110, a long-term post-filter 120, a pitch stability calculator 105 and a pitch corrector 108.

[0054] For example, a gain controller 110 according to an embodiment may, e.g., implement one or more of the following functionalities: According to an embodiment, if the long-term post-filter 120 is active in the current frame AND pitch has not changed THEN increment the long-term post-filter gain from the previous frame by a step. In an embodiment, if pitch has changed in the current frame AND pitch was not stable until the previous frame THEN decrement the long-term post-filter gain from the previous frame. According to an embodiment, if the long-term post-filter 120 is not active in the current frame AND if the long-term post-filter 120 was not active in the previous frame AND if pitch was also not stable until the previous frame THEN the long-term post-filter 120 shall be kept inactive. This may, e.g., be done by setting the long-term post-filter gain to zero. In an embodiment, if the long-term post-filter 120 was deactivated after being active for a certain number of frames, then the long-term post-filter gain eventually decrements to zero. After the long-term post-filter gain reaching zero, if the long-term post-filter 120 gets activated again, THEN MIN GAIN is set to init gain. In this case, the long-term post-filter gain from the previous frame was zero and it may, e.g., be decremented by a step to become a negative value. In Fig. 5(d), this is < MIN GAIN, leading to a switch change after the decrement block. So, in this case the long-term post-filter gain will be set to init gain. According to an embodiment, the value of MIN GAIN depends on the long-term post-filter 120 is active or not. If the long-term post-filter 120 is active THEN gain should not be decremented below init gain. If the long-term post-filter 120 is inactive THEN gain can be decremented until it reaches zero.

[0055] For example, a pitch stability calculator 105 according to an embodiment may, e.g., be configured to assume the pitch to be stable until the previous frame, if counter > n; or if a normalized correlation of previous pitch lag > normalized correlation of current pitch lag.

[0056] In an embodiment, a pitch stability calculator 105 according to an embodiment may, e.g., if pitch has not changed, increment a pitch stability counter.

[0057] According to an embodiment, a pitch corrector 108 may, e.g., be configured, if the long-term post-filter 120 is active in the current frame, and if the pitch has changed, and if pitch was not stable until the previous frame, to then use the current value of the pitch lag sent in the bitstream, and otherwise, to keep using the pitch lag used by the long-term post-filter 120 in the previous frame.

[0058] In the following, an adaptive gain for the long-term post-filter 120 according to embodiments is described.

[0059] For example, the following embodiment may, e.g., be employed together with a long term postfilter as described in chapter 5.4.9 of [7]: ETSI TS 103 634, V1.2.1: Digital Enhanced Cordless Telecommunications (DECT); Low Complexity Communication Codec plus (LC3plus), (2020-10). References and terms used in the following may, for example, only, be defined, as described in in chapter 5.4.9 of [7] and the related chapters of [7].

[0060] For N ms =1,25 (N ms indicates a frame duration), adaptive gain is used for the long-term post-filter 120. The long-term post-filter 120 gain is increased in steps if the pitch remains unchanged for more than 12,5ms, e.g. 10 frames each of 1,25ms. When the pitch changes or the the long-term post-filter 120 is deactivated, the gain is decreased slowly in steps. Any fluctuations in the pitch lag are also corrected for signals which exhibit stable pitch.

[0061] Filter coefficients c num (k) and c den (k, p fr ) may, e.g., be computed as follows: c num k = 0,85 ⋅ gain ltpf ⋅ tab_ltpf_num_fs gain_ind k for k = 0 … L num

[0062] In adaptive gain, a constant of 0,98 is used instead of 0,85 in Equation 139 above. Also, adaptive gain updates are made only in the frames where the first part of the transition is applied as described above.

[0063] Adaptive gain uses four Boolean control variables: 1. ltpf_active indicates if the long-term post-filter 120 must be applied in the current frame as described above. 2. mem_ltpf_active indicates if the long-term post-filter 120 was applied in the previous frame as described above. 3. pitch_changed indicates if pitch lag has changed. 4. pitch_was_stable indicates if pitch lag was stable for the last frames.

[0064] A counter is used to keep track of the stability of the pitch lag. It is updated as in the below table: Control Variables Pitch stability counter update ltpf_active mem_ltpf_active pitch_changed pitch_was_stable trueXfalseXincrement by one update intervalAny combination of values other than the abovereset

[0065] The value of the update interval is 2,5ms, as the pitch information is transmitted over two consecutive 1,25ms frames. If the value of the counter is greater than or equal to 12,5ms, then pitch is assumed to be stable and pitch_was_stable is set to true.

[0066] Pitch stability is also decided based on normalized correlations computed over the current frame x̂(n) for the current pitch lag and the pitch lag used by the long-term post-filter 120 in the previous frame. Normalized correlation is computed, e.g., using Equation 87 below, where L = N F and T = pitch_int.

[0067] As side information, the used Equation 87 is may, e.g., used, e.g., when encoding to determine the final estimate of the pitch-lag in the current frame, which may, e.g., given by: T curr = T 1 if normcorr x 6,4 corr len T 2 ≤ 0,85 ⋅ normcorr x 6,4 corr len T 1 T 2 otherwise where normcorr(x, L, T) is the normalized correlation of the signal x of length L at lag T: normcorr x L T = max 0 ∑ n = Δ 6,4 L − 1 x n x n − T ∑ n = Δ 6,4 L − 1 x 2 n ∑ n = Δ 6,4 L − 1 x 2 n − T E.g., corr len = 64 , N ms = 10 48 , N ms = 7,5 32 , N ms = 5 16 , N ms = 2,5

[0068] A negative index of x means that the sample has been taken from the previous processed frame. At start-up, these values shall be set to zero.

[0069] Returning to describing the adaptive gain for the long-term post-filter 120 according to embodiments: The control variable pitch_was_stable is set to true if the normalized correlation corresponding to the pitch lag used by the long-term post-filter 120 in the previous frame is greater than the normalized correlation corresponding to the pitch lag in the current frame. These computations are done only if the variable pitch_changed is true and the pitch lags are non-zero.

[0070] When the long-term post-filter 120 becomes active after being inactive in the previous frame(s), the gain value indicated by the variable gain_ltpf (see above) is used. In the subsequent frames, based on the values of the control variables, it is updated in steps of 0.01 per frame for all bitrates and sampling rates. It is allowed to reach a maximum value indicated by the variable gain_ltpf_max given above. Below table describes how the gain values are updated depending on the control variables: Control Variables Gain update ltpf_active mem_ltpf_active pitch_changed pitch_was_stable trueXfalseXincrement by a steptrueXtruefalsedecrement by a stepfalsetruetruefalsedecrement by a stepfalsefalseXfalseset to 0Any combination of values other than the aboveuse gain_ltpf from the previous frame

[0071] Based on the values of the control variables, pitch lag is corrected as in the below table: Control Variables Pitch lag correction ltpf_active mem_ltpf_active pitch_changed pitch_was_stable trueXtruefalseuse p int and p fr from the current frameAny combination of values other than the aboveuse p int and P fr from the previous frame

[0072] The tables for tab_ltpf_num_fs[gain_ind][k] and tab_ltpf_den_fs[p fr ][k] are given in Table 5.42. Table 5.42: Tables for LTPF Variable in the present document Constant name in . / src / floating_point / constants.c. tab_resamp_filter

[240] lp_filter

[240] tab_ltpf_interp_R

[33] inter4_1

[33] tab_interp_x12k8[4] [4]enc_inter_filter[4] [4]tab_ltpf_num_8000[4] [4]conf_inter_filter_16[4] [4]tab_ltpf_num_16000[4] [4]conf_inter_filter_16[4] [4]tab_ltpf_num_24000[4] [6]conf_inter_filter_24[4] [6]tab_ltpf_num_32000[4] [8]conf_inter_filter_32[4] [8]tab_ltpf_num_48000[4]

[12] conf_inter_filter_16[4]

[12] tab_ltpf_den_8000[4] [3]conf_tilt_filter_16[4] [3]tab_ltpf_den_16000[4] [3]conf_tilt_filter_16[4] [3]tab_ltpf_den_24000[4] [5]conf_tilt_filter_24[4] [5]tab_ltpf_den_32000[4] [7]conf_tilt_filter_32[4] [7]tab_ltpf_den_48000[4]

[11] conf_tilt_filter_48[4]

[11]

[0073] Fig. 6 to Fig. 8 depict results of the long-term post-filtering according to an embodiment.

[0074] In particular, Fig. 6 illustrates a spectrogram of a pitch pipe before applying adaptive gain and pitch correction.

[0075] Fig. 7 illustrates a spectrogram of a pitch pipe after applying adaptive gain and pitch correction according to an embodiment.

[0076] Fig. 8 illustrates an average periodogram of pitch pipe before and after applying adaptive gain and pitch correction.

[0077] Although some aspects have been described in the context of an apparatus, it is clear that these aspects also represent a description of the corresponding method, where a block or device corresponds to a method step or a feature of a method step. Analogously, aspects described in the context of a method step also represent a description of a corresponding block or item or feature of a corresponding apparatus. Some or all of the method steps may be executed by (or using) a hardware apparatus, like for example, a microprocessor, a programmable computer or an electronic circuit. In some embodiments, one or more of the most important method steps may be executed by such an apparatus.

[0078] Depending on certain implementation requirements, embodiments of the invention can be implemented in hardware or in software or at least partially in hardware or at least partially in software. The implementation can be performed using a digital storage medium, for example a floppy disk, a DVD, a Blu-Ray, a CD, a ROM, a PROM, an EPROM, an EEPROM or a FLASH memory, having electronically readable control signals stored thereon, which cooperate (or are capable of cooperating) with a programmable computer system such that the respective method is performed. Therefore, the digital storage medium may be computer readable.

[0079] Some embodiments according to the invention comprise a data carrier having electronically readable control signals, which are capable of cooperating with a programmable computer system, such that one of the methods described herein is performed.

[0080] Generally, embodiments of the present invention can be implemented as a computer program product with a program code, the program code being operative for performing one of the methods when the computer program product runs on a computer. The program code may for example be stored on a machine readable carrier.

[0081] Other embodiments comprise the computer program for performing one of the methods described herein, stored on a machine readable carrier.

[0082] In other words, an embodiment of the inventive method is, therefore, a computer program having a program code for performing one of the methods described herein, when the computer program runs on a computer.

[0083] A further embodiment of the inventive methods is, therefore, a data carrier (or a digital storage medium, or a computer-readable medium) comprising, recorded thereon, the computer program for performing one of the methods described herein. The data carrier, the digital storage medium or the recorded medium are typically tangible and / or non-transitory.

[0084] A further embodiment of the inventive method is, therefore, a data stream or a sequence of signals representing the computer program for performing one of the methods described herein. The data stream or the sequence of signals may for example be configured to be transferred via a data communication connection, for example via the Internet.

[0085] A further embodiment comprises a processing means, for example a computer, or a programmable logic device, configured to or adapted to perform one of the methods described herein.

[0086] A further embodiment comprises a computer having installed thereon the computer program for performing one of the methods described herein.

[0087] A further embodiment according to the invention comprises an apparatus or a system configured to transfer (for example, electronically or optically) a computer program for performing one of the methods described herein to a receiver. The receiver may, for example, be a computer, a mobile device, a memory device or the like. The apparatus or system may, for example, comprise a file server for transferring the computer program to the receiver.

[0088] In some embodiments, a programmable logic device (for example a field programmable gate array) may be used to perform some or all of the functionalities of the methods described herein. In some embodiments, a field programmable gate array may cooperate with a microprocessor in order to perform one of the methods described herein. Generally, the methods are preferably performed by any hardware apparatus.

[0089] The apparatus described herein may be implemented using a hardware apparatus, or using a computer, or using a combination of a hardware apparatus and a computer.

[0090] The methods described herein may be performed using a hardware apparatus, or using a computer, or using a combination of a hardware apparatus and a computer.

[0091] The above described embodiments are merely illustrative for the principles of the present invention. It is understood that modifications and variations of the arrangements and the details described herein will be apparent to others skilled in the art. It is the intent, therefore, to be limited only by the scope of the impending patent claims and not by the specific details presented by way of description and explanation of the embodiments herein.Literature:

[0092] [1] E. Ravelli, C. Helmrich, G. Markovic, M. Neusinger, M. Jander, M. Dietz and S. Disch, "Apparatus and method for processing an audio signal using a harmonic post-filter". US Patent 20170140769 A1, 18 May 2017. [2] 3GPP TS 26.445, Codec for Enhanced Voice Services (EVS); Detailed algorithmic description, 2020. [3] Low Complexity Communication Codec; Bluetooth Specification v1.0, 2020. [4] G. Fuchs, B. Grill, M. Lutzky and M. Multrus, "Apparatus and method for processing an encoded signal and encoder and method for generating an encoded signal". US Patent 2015332700 AA, 07 August 2014. [5] J.-M. Valin, K. Vos and T. B. Terriberry, Definition of the Opus Audio Codec, IETF RFC 6716, 2012. [6] G. Markovic, B. Edler, S. Bayer and J. F. Keine, "Processor for generating a prediction spectrum based on long-term prediciation and / or harmonic post-filtering". EP 4120256 A1, 18 Jan 2023. [7] ETSI TS 103 634, V1.2.1: Digital Enhanced Cordless Telecommunications (DECT); Low Complexity Communication Codec plus (LC3plus), (2020-10).

Claims

1. An apparatus for long-term post-filtering, wherein the apparatus comprises: a gain controller (110) for determining a long-term post-filter gain for long-term post-filtering, and a long-term post-filter (120) for conducting long-term post-filtering of an audio input signal depending on the long-term post-filter gain to obtain a filtered audio signal, wherein the gain controller (110) is configured to determine the long-term post-filter gain depending on a stability of a pitch of the audio input signal.

2. An apparatus according to claim 1, wherein the gain controller (110) is configured to determine a first gain value for the long-term post-filter gain depending on a first stability of the pitch in a first portion of the audio input signal, wherein the long-term post-filter (120) is configured to conduct long-term post-filtering of the first portion of the audio input signal using the first gain value to obtain a first filtered portion of the filtered audio signal, wherein the gain controller (110) is configured to determine a second gain value for the long-term post-filter gain depending on a second stability of the pitch in a second portion of the audio input signal, wherein the second gain value is different from the first gain value, wherein the long-term post-filter (120) is configured to conduct long-term post-filtering of the second portion of the audio input signal using the second gain value to obtain a second filtered portion of the filtered audio signal.

3. An apparatus according to claim 1 or 2, wherein a pitch lag of a current frame of a plurality of frames indicates a pitch lag of a current audio signal portion being encoded within the current frame, wherein a pitch lag for a previous frame of a plurality of frames indicates a pitch lag for a previous audio signal portion being encoded within said previous frame preceding the current frame, wherein said previous frame is one of a plurality of preceding frames of the plurality of frames, which precede the current frame, wherein the gain controller (110) is configured to determine the long term post filter gain depending on whether the pitch lag for the current frame is equal to a pitch lag for the previous frame or whether the pitch lag for the current frame is different from the pitch lag for the previous frame; or wherein the gain controller (110) is configured to determine the long term post filter gain depending on whether an absolute difference between the pitch lag for the current frame and the pitch lag for the previous frame is smaller than a threshold value or whether the absolute difference is greater than or equal to the threshold value.

4. An apparatus according to claim 3, wherein the apparatus is configured to receive a bitstream comprising the plurality of frames or an encoding of the plurality of frames and comprising an encoding of the pitch lag for the previous frame and an encoding of the pitch lag for the current frame.

5. An apparatus according to claim 3 or 4, wherein the gain controller (110) is configured to increase the long term post filter gain per frame over a group of frames, if, over the group of frames, the pitch lag for each frame of the group of frames remains constant, or wherein the gain controller (110) is configured to increase the long term post filter gain per frame over a group of frames, if, over the group of frames, an absolute difference between the pitch lag for each frame of the group of frames and the pitch lag for its previous frame is smaller than a threshold value.

6. An apparatus according to one of claims 3 to 5, wherein the gain controller (110) is configured to decrease the long term post filter gain per frame over a group of frames, if, over the group of frames, the pitch lag changes for each frame of the group of frames with respect to its previous frame, or wherein the gain controller (110) is configured to decrease the long term post filter gain per frame over a group of frames, if, over the group of frames, an absolute difference between the pitch lag for each frame of the group of frames and the pitch lag for its previous frame is greater than or equal to a threshold value.

7. An apparatus according to one of claims 3 to 6, wherein the gain controller (110) is configured to determine the long-term post-filter gain further depending on whether or not the long-term post-filter (120) has been active for the previous frame of the current frame; and / or wherein the gain controller (110) is configured to determine the long-term post-filter gain further depending on whether or not the long-term post-filter (120) is active for the current frame.

8. An apparatus according to one of the preceding claims, wherein the apparatus further comprises a pitch stability calculator (105), wherein the pitch stability calculator (105) is configured to determine first information indicating whether or not a pitch lag for the current frame has changed; and wherein the gain controller (110) is configured to determine the long-term post-filter gain depending on the first information; wherein the pitch stability calculator (105) is configured to determine that the pitch lag for the current frame has changed, if a coded pitch lag of the current frame is different from a pitch lag used by the long-term post-filter (120) in the previous frame of the current frame; and is configured to determine that the pitch lag for the current frame has not changed, if the coded pitch lag of the current frame is equal to the pitch lag used by the long-term post-filter (120) in the previous frame of the current frame.

9. An apparatus according to claim 8, wherein the pitch stability calculator (105) is configured to determine second information indicating whether or not a pitch lag for a previous frame of the current frame has been stable; wherein said previous frame is one of a plurality of preceding frames of the plurality of frames, which precede the current frame, wherein the gain controller (110) is configured to receive the first information and the second information from the pitch stability calculator (105); and the gain controller (110) is configured to determine the long-term post-filter gain using said information from the pitch stability calculator (105); wherein the pitch stability calculator (105) is configured to determine that the pitch lag for the previous frame of the current frame has been stable, if, over a group of preceding frames of the current frame, the pitch lag remains constant for each frame of a group of preceding frames; and is configured to determine that the pitch lag for the previous frame has not been stable, if, over the group of preceding frames of the current frame, the pitch lag does not remain constant for each frame of the group of preceding frames; or wherein the pitch stability calculator (105) is configured to determine that the pitch lag for the previous frame of the current frame is stable, if the absolute difference between the pitch lag for the previous frame and the pitch lag for its preceding frame is smaller than a threshold value; and is configured to determine that the pitch lag for the previous frame of the current frame is not stable, if the absolute difference is greater than or equal to the threshold value.

10. An apparatus according to claim 9, wherein the gain controller (110) is configured to increase the long-term post-filter gain, if the long-term post-filter (120) is active for the current frame and if the first information from the pitch stability calculator (105) indicates that the pitch lag for the current frame has not changed; wherein the gain controller (110) is configured to decrease the long-term post-filter gain, if the long-term post-filter (120) is active for the current frame and if the second information from the pitch stability calculator (105) indicates that the pitch lag for the previous frame has not been stable and if the first information from the pitch stability calculator (105) indicates that the pitch lag for the current frame has changed.

11. An apparatus according to claim 10, wherein the gain controller (110) is configured to decrease the long-term post-filter gain, if the long-term post-filter (120) is not active for the current frame and if the long-term post-filter (120) has been active for the previous frame and if the second information from the pitch stability calculator (105) indicates that the pitch lag for the previous frame has not been stable and if the first information from the pitch stability calculator (105) indicates that the pitch lag for the current frame has changed; wherein the gain controller (110) is configured to set the long-term post-filter gain to 0, if the long-term post-filter (120) is not active for the current frame and if the long-term post-filter (120) has not been active for the previous frame and if the second information from the pitch stability calculator (105) indicates that the pitch lag for the previous frame has not been stable.

12. An apparatus according to one of claims 9 to 11, wherein the pitch stability calculator (105) is configured to determine whether or not the pitch lag for the previous frame of the current frame has been stable depending on whether or not a normalized correlation of the current frame computed using the pitch lag used by the long-term post-filter 120 in the previous frame is greater than a normalized correlation of the current frame computed using a coded pitch lag of the current frame.

13. An apparatus according to one of the preceding claims, wherein the apparatus further comprises a pitch corrector (108), wherein the pitch corrector (108) is configured to amend a pitch lag for a current frame for conducting long-term post-filtering of the audio signal portion of the current frame depending on whether or not a pitch lag for a previous frame of the current frame has been stable and / or depending on whether or not the pitch lag for the current frame has changed, wherein said previous frame is one of a plurality of preceding frames of the plurality of frames, which precede the current frame.

14. An apparatus according to one of claims 9 to 12, wherein the apparatus further comprises a pitch corrector (108), wherein the pitch corrector (108) is configured to amend the pitch lag for a current frame for conducting long-term post-filtering of the audio signal portion of the current frame depending on whether or not the pitch lag for the previous frame of the current frame has been stable and / or depending on whether or not the pitch lag for the current frame has changed, wherein the pitch corrector (108) is configured to use the pitch lag for the current frame for conducting long-term post-filtering of the audio signal portion of the current frame, if the long-term post-filter (120) is active for the current frame and if the second information from the pitch stability calculator (105) indicates that the pitch lag for the previous frame has not been stable and if the first information from the pitch stability calculator (105) indicates that the pitch lag for the current frame has changed; and otherwise the pitch corrector (108) is configured to use a previous pitch lag for conducting long-term post-filtering of the audio signal portion of the current frame.

15. A method for long-term post-filtering, wherein the method comprises: determining a long-term post-filter gain for long-term post-filtering, and conducting long-term post-filtering of an audio input signal depending on the long-term post-filter gain to obtain a filtered audio signal, wherein determining the long-term post-filter gain is conducted depending on a stability of a pitch of the audio input signal.

16. A computer program for implementing the method of claim 15 when being executed on a computer or signal processor.