Method and device for limiting output synthesis distortion in an audio codec - Patents.com
Patent Information
- Application Number
- JP2024508526
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-08-10
- Filing Date
- 2022-08-05
- Publication Date
- 2025-08-13
- Estimated Expiration
- 2042-08-05
AI Technical Summary
Existing audio codecs suffer from distortion issues due to clipping and saturation, particularly in multi-channel codecs, which affect the quality of immersive audio experiences when using headphones or loudspeaker-based systems.
A two-stage distortion limiter is implemented in the audio signal processing pipeline, comprising a level detector and a saturation detector to calculate and update control gains, attenuating the signal to reduce distortion and preserve spatial audio characteristics.
The two-stage distortion limiter effectively reduces distortion in audio signals, improving the quality of immersive audio experiences by minimizing clipping and saturation, especially in scenarios with bit errors or strong saturation.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to sound coding, and in particular, but not exclusively, to methods and devices (limiters) for limiting distortion of a sound signal, for example an output sound signal synthesis from a sound signal decoder. If a sound renderer is used, the distortion limiting methods and devices (limiters) may be implemented after or as part of the renderer.
[0002] In this disclosure and the accompanying claims: The term "sound" can relate to voice, audio, and any other sound. The term "stereo" is an abbreviation of "stereophonic." The term "mono" is an abbreviation of "monophonic." The term "multi-channel" may relate to two or more sound signals or sound codecs. [Background technology]
[0003] Historically, conversational telephony has been implemented with handsets that have only one transducer to output sound to only one ear of the user. During the last decade, users have begun to use mobile handsets in conjunction with headphones to receive sound in both ears, primarily for listening to music, but occasionally for listening to speech. Still, when mobile handsets are used to transmit and receive conversational audio, the content reaches both ears of the user, whereas when headphones are used, the content remains mono.
[0004] The latest 3GPP (Third Generation Partnership Project) speech coding standard, Enhanced Voice Services (EVS), as described in Reference [1], the entire contents of which are incorporated herein by reference, has significantly improved the quality of coded sounds, e.g., voice and / or audio, transmitted and received through mobile handsets. The next natural step is to transmit stereo information in such a way that the receiver gets as close as possible to the real audio scene captured at the other end of the communication link.
[0005] Efficient stereo coding techniques have been developed and used at low bit rates. As a non-limiting example, so-called parametric stereo coding constitutes one efficient technique for low bit rate stereo coding. Parametric stereo encodes two, left and right, channels as a mono signal using a common mono codec plus a certain amount of stereo side information (corresponding to stereo parameters) that represents the stereo image. The two input, left and right channels are downmixed to a mono signal, for example by adding the left and right channels and dividing the sum by two. The stereo parameters are usually calculated in a transform domain, for example the discrete Fourier transform (DFT) domain, and relate to so-called binaural or inter-channel cues. Binaural cues may include interaural level difference (ILD), interaural time difference (ITD), and interaural correlation (IC). Depending on the signal characteristics, the stereo scene configuration, etc., some or all binaural cues are coded and transmitted to the decoder.
[0006] More recently, audio generation, recording, representation, coding, transmission, and reproduction have moved closer to an enhanced, interactive, and immersive experience for the listener. An immersive experience can be described, for example, as a state of being deeply involved or involved in a sound scene with sounds coming from all directions. In immersive audio (also called 3D (three-dimensional) audio), the sound image is reproduced in all three dimensions around the listener, taking into account a wide range of sound characteristics such as timbre, directionality, reverberation, transparency, and spatial accuracy. Immersive audio is created for a specific sound reproduction or reproduction system, such as a loudspeaker-based system, an integrated reproduction system (sound bar), or headphones. The interactivity of the sound reproduction system can then include, for example, the ability to adjust the sound level, change the position of the sound, or select a different language for the reproduction.
[0007] Recently, the 3GPP (3rd Generation Partnership Project) has begun work on developing a 3D (three-dimensional) sound codec for immersive services called IVAS (Immersive Voice and Audio Services) based on the EVS codec (see reference [2], the entire contents of which are incorporated herein by reference).
[0008] In an audio codec, the output audio signal may be corrupted by several types of distortion.
[0009] The distortion may be caused by clipping, where samples of the sound signal have values above or below a certain threshold. This situation may typically occur when samples of the sound signal are a) converted from a floating-point representation to a fixed-point representation, b) converted from one fixed-point representation to another fixed-point representation with a smaller bit length (e.g., from a long integer to a short integer (e.g., in the C99 programming language standard, as described in reference [3], the entire contents of which are incorporated herein by reference, that a signed long integer type can include a 32-bit range of [-2,147,483,647, +2,147,483,647], while a signed short integer type can include a 16-bit range of [-32,767, +32,767]), c) as a result of instability in the decoding algorithm of a sound codec, d) during rendering when the sound (speech and / or audio) signal is manipulated, downmixed, etc. When one of these situations occurs, the amplitude of the sound signal samples may become saturated, causing the sound signal to be clipped or limited, resulting in a perceptually annoying sound.
[0010] To reduce such clipping, an automatic gain control (AGC) can be used, as implemented in the ACELP core of the mono EVS codec [1]. The AGC is a closed-loop feedback algorithm that adjusts and maintains the changing amplitude of the sound signal samples within limits suitable for processing these sound signal samples without distortion. The AGC is designed to adjust the sound signal samples in the time domain without additional delay.
[0011] The saturation problem is even more difficult with multi-channel codecs, typically when the number of decoded channels is greater than the number of output channels, or when the decoded channels are correlated. One example is the rendering of decoded multi-channel audio to a binaural output.
[0012] Saturation often also occurs as a result of instabilities in the decoding algorithms, for example when the long-term synthesis filters used in CELP-based speech codecs are unstable, or when the received bitstream is corrupted by frame erasures or bit errors. Summary of the Invention [Means for solving the problem]
[0013] The present disclosure relates to a method and device for limiting distortion of a sound signal (limiter). When a sound renderer is implemented following a sound signal decoder, the method and device for limiting distortion of a sound signal (limiter) can be performed on the rendered sound signal.
[0014] According to a first aspect, the present disclosure relates to a two-stage method for limiting distortion in a sound signal, comprising in a first stage detecting an amplitude value of the sound signal, calculating a control gain using the detected amplitude value, and attenuating a level of the sound signal using the control gain, and in a second stage detecting saturation in the sound signal and updating the control gain in response to detecting the saturation.
[0015] According to a second aspect, the present disclosure relates to a two-stage method for limiting distortion in an output sound signal synthesis from a sound signal decoder. In a first stage, an amplitude value of the output sound signal synthesis is detected, a control gain is calculated using the detected amplitude value, and a level of the output sound signal synthesis is attenuated using the control gain. In a second stage, saturation of the output sound signal synthesis is detected and the control gain is updated in response to detecting the saturation.
[0016] According to another aspect, a two-stage distortion limiter for limiting distortion of a sound signal is provided, comprising (a) a first stage comprising a level detector for detecting an amplitude value of the sound signal and calculating a control gain using the detected amplitude value and an attenuator of the level of the sound signal using the control gain, and (b) a second stage comprising a saturation detector for detecting saturation of the sound signal and updating the control gain in response to detection of saturation.
[0017] According to a further aspect, a two-stage distortion limiter is provided for limiting distortion in an output sound signal synthesis from a sound signal decoder, comprising (a) a first stage comprising a level detector for detecting an amplitude value of the output sound signal synthesis and calculating a control gain using the detected amplitude value and an attenuator of the level of the output sound signal synthesis using the control gain, and (b) a second stage comprising a saturation detector for detecting saturation of the output sound signal synthesis and updating the control gain in response to detection of saturation.
[0018] The foregoing and other features will become more apparent after reading the following non-limiting description of an exemplary embodiment of a two-stage distortion limiter and distortion limiting method, given by way of example only with reference to the accompanying drawings, in which:
[0019] The accompanying drawings are described below. [Brief description of the drawings]
[0020] [Figure 1] 1 is a schematic block diagram illustrating an example implementation of a one-stage multi-channel distortion limiter together with a corresponding distortion limiting method; [Diagram 2] 1 is a schematic block diagram of a two-stage multi-channel distortion limiter and a corresponding distortion limiting method. [Diagram 3] 3 is a schematic block diagram illustrating together a saturation detector forming part of the device of FIG. 2 and a corresponding saturation detection method; [Figure 4] FIG. 13 is an explanatory diagram illustrating the effect of a two-stage distortion limiter and distortion limiting method on output sound signal synthesis. [Diagram 5] FIG. 2 is a simplified block diagram illustrating an example configuration of hardware components for implementing a distortion limiter and a distortion limiting method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0021] The present disclosure relates to limiting distortion in output sound signal synthesis from a sound signal decoder of a sound codec. As previously shown in this disclosure, when a sound renderer is implemented following the sound signal decoder, a method and device (limiter) for limiting distortion in output sound signal synthesis from the sound signal decoder may be performed on the rendered sound signal. Distortion may occur as a result of an unstable decoding process. In particular, the present disclosure introduces a distortion limiter and a second stage algorithm in the distortion limiting method to detect and limit distortion caused, for example, by a) a bitstream having bit errors or other types of damaged bitstreams, and b) saturation in general. The distortion limiter may be implemented in a mono, stereo, or multi-channel sound signal decoder, for example, just before the final floating-point to integer conversion or just before the long integer to short integer conversion. When the distortion limiter detects distortion such as saturation, attenuation is applied, resulting in a more pleasing output sound signal synthesis.
[0022] An example of a simple distortion limiter and distortion limiting method with saturation control is the so-called automatic gain control (AGC) applied to the audio signal decoded at the internal sampling rate in the EVS codec. The AGC as used in the EVS codec is described in reference [1]. The AGC algorithm consists of two steps. First, the frame coefficient β1 is calculated using the following relations (1) and (2):
[0023]
number
[0024] where s(n), n=0,...,N-1 is the de-emphasized sound signal synthesis at the internal sampling rate and N is the frame length in samples.
[0025] The frame coefficient β1 is then used to update the long-term AGC coefficient β2 using the following relation (3): β2(n)=0.99·β2(n-1)+0.01·β1(3)
[0026] Finally, each sample of the output sound signal synthesis is updated using closed-loop feedback as expressed in relation (4) below. s'(n)=(1-β2(n))·s(n)-β2(n)·s(n-1), n=0,...,N-1 (4)
[0027] The AGC limiter described above has been adopted in some recent speech and audio mono coding standards, such as EVS. More elaborate distortion limiters and distortion limiting methods are implemented in stereo and multi-channel codecs. In this disclosure, the distortion limiter and corresponding distortion limiting method are implemented, for example, in a 3D sound coding framework, i.e., the IVAS framework.
[0028] 1. Distortion limiter in multi-channel codecs In multi-channel codecs such as IVAS outlined in [2], distortions such as saturation may occur in one, some, or all output channels. Attenuation may then be applied to all output channels, regardless of whether any of them originally contained saturation, in order to preserve the spatial characteristics of the output sound, such as audio / speech.
[0029] An exemplary implementation of a distortion limiter in a multi-channel codec can be a general non-specific digital limiter, for example, an audio dynamic range controller with variable parameters as described in Reference [4], the entire contents of which are incorporated herein by reference. Any other distortion limiter can be used without departing from the spirit and scope of the present disclosure. In the following description, distortion level limiting is used, which includes generating a control gain and using a first-order IIR (infinite impulse response) filter for processing the attack time and release time. Figure 1 is a schematic block diagram illustrating an exemplary implementation of a one-stage multi-channel distortion limiter and a corresponding distortion limiting method, etc. at the same time.
[0030] Distortion limiting methods and devices (limiters) can be used in several parts of an audio encoding, decoding and / or playback system, for example, in a pre-renderer at the encoding end, as part of the decoder, after the decoder, as part of the audio renderer, or after the audio renderer, just before outputting the audio signal from the system. For the purpose of simplifying the description, but without limiting the scope of this disclosure, the terminology used in this disclosure focuses on implementations of distortion limiting methods and devices (limiters) after the audio renderer.
[0031] Referring to FIG. 1, an exemplary embodiment of a one-stage multi-channel distortion limiting method 100 includes an operation 101 of output sound signal synthesis level detection, an operation 102 of setting limiter parameters, and an operation 105 of attenuation filtering, which may be divided into a “gain filtering” sub-operation 103, e.g. as described by relation (7), and a “gain application” sub-operation 104, e.g. as described by relation (8), as illustrated in FIG.
[0032] s m(n) (which is the distortion-limited sound signal in the exemplary implementation of FIG. 1 ) is the mth channel of the output sound signal synthesis (e.g., speech and / or audio), where m=0,...,M-1, M is the number of output channels, n=0,...,N-1 is the time sample index, and N is the frame length in samples. As known to those skilled in the art, the output sound signal synthesis is processed in consecutive blocks of output sound signal synthesis samples called frames (hereinafter output sound signal synthesis processing frames).
[0033] To perform operation 101, the one-stage multi-channel distortion limiter 150 of FIG. 1 includes a level detector 151 that detects the amplitude value of the sound signal synthesis. In the illustrated non-limiting implementation, the level detector detects, for example, the amplitude value of the sound signal synthesis according to the relationship (5):
[0034]
number
[0035] is a peak level detector 151 for detecting the maximum absolute value p (also called the "peak value") of the sound signal synthesis samples of all output channels m of the output sound signal synthesis in the current frame using
[0036] The peak level detector 151 then uses the detected peak value p to calculate g c The peak level detector 151 first compares the peak value p with a limiter threshold (also called the "gate level") denoted as Ω. If p≦Ω, the peak level detector 151 then calculates the control gain g c However, if p>Ω, the peak level detector 151 sets, for example, the relation (6)
[0037]
number
[0038] Calculate the control gains using Here, the parameter Γ1 indicates the minimum gain limit, e.g., Γ1=0.15. Of course, other values of the parameter Γ1 can also be implemented. The control gain g c Limiting Ω to 0.01 or less is not expected and generally cannot occur in a stable sound signal decoder, typically a sound signal decoder receiving a bitstream that is not corrupted by bit errors. However, if gain limiting is not implemented, longer segments of the output sound signal synthesis may be attenuated too strongly (to near zero), resulting in inaudible sounds. For example, in a non-limiting exemplary implementation, if the distortion limiter 150 is intended to limit the output sound signal synthesis to short integer values in the range of [-32,768;32,767], the limiter threshold may be set to Ω=32,750.
[0039] To perform operation 102, the one-stage multi-channel distortion limiter 150 of FIG. 1 includes a calculator 152 of limiter parameters that are calculated to produce the desired dynamic characteristics, as taught by reference [4]. For example, an attack / release time parameter γ is calculated, which involves defining shorter or longer attack / release times. The attack / release time parameter γ controls how fast the distortion limiter works and is generally subject to adjustment or tuning during development, as described in more detail below. The attack parameter controls the time it takes for the distortion limiter to reduce the control gain after a detected peak value of the output sound signal synthesis exceeds the limiter threshold Ω. The release parameter controls how long it takes for the control gain to return to its normal level of 1.0 after the detected peak value of the output sound signal synthesis falls below the limiter threshold Ω.
[0040] To perform operation 103, the one-stage multi-channel distortion limiter 150 of FIG. 1 includes a gain filter 153, such as a first order IIR low-pass filter, for obtaining a per-sample gain g(n) of the output sound signal synthesis s(n) using an attack / release time parameter γ. m The filter 153 includes an attenuator 155 having a level (n) of the filter 153, for example, satisfying the relation (7) g(n) = γ [g(n-1) - g c ]+g c (7) It can be written as where γ represents the attack / release time parameter mentioned above. To perform operation 103, the attenuator 155 of FIG. 1 also uses, for example, the following equation (8): s'm(n)=g(n)·s m (n), n=0,...,N-1, m=0,...,M-1 (8) Using the output sound signal synthesis s m A distortion-limited output sound signal synthesis s' is obtained by applying a gain g(n) to every n-th sample of every channel m of m and an amplifier 154 for acquiring (n).
[0041] The one-stage procedure described above can adequately handle common situations in multi-channel codecs, but the output audio signal synthesis s m (n) cannot perform well in situations where a) bit-erroneous or otherwise severely corrupted bitstreams, and b) are typically corrupted by strong saturation. To address this shortcoming, a second stage is added to the distortion limiter 150 and distortion limiting method 100, which detects and limits saturation.
[0042] 2. Second stage distortion limiter FIG. 2 is a schematic block diagram of a two-stage multi-channel distortion limiter 250 and a corresponding distortion limiting method 200 .
[0043] With reference to Figure 2, an exemplary embodiment of a two-stage multi-channel distortion limiting method 200 includes as a first stage an operation 101 of output sound signal synthesis level detection, an operation 102 of setting limiter parameters, and an operation 105 of attenuation filtering including a gain filtering sub-operation 103 and a gain application sub-operation 104 as described with reference to Figure 1. Similarly, the two-stage multi-channel distortion limiter 250 of Figure 2 includes as a first stage a sound signal synthesis level detector such as a peak level detector 151, a calculator 152 of limiter parameters, and an attenuator 155 including a gain filter 153 and an amplifier 154, again as described with reference to Figure 1.
[0044] The two-stage multi-channel distortion limiting method 200 includes, as a second stage, a synthesis of the output sound signal s m 2 includes an operation 201 of detecting saturation in (n). The two-stage multi-channel distortion limiter 250 of FIG.
[0045] The second stage of the two-stage multi-channel distortion limiter 250 and the corresponding distortion limiting method 200 is m The saturation detector 251 is designed to detect saturation, particularly strong saturation, in (n). The term "strong saturation" is intended to designate an unexpectedly high level of saturation, e.g., saturation higher than 1 / Γ1 times the desired maximum output sound signal level. Although the exemplary embodiment refers to detection of strong saturation as defined above, it is within the scope of the present disclosure to also detect weaker saturation by adapting values of parameters, thresholds, counters, constants, etc. used in the saturation detector 251 and corresponding saturation detection method 201, as described later in this specification, with a view to improving the output sound signal synthesis.
[0046] In the illustrated exemplary implementation, the second stage (saturation detector 251 and saturation detection operation 201) comprises: (a) determining an output sound signal synthesis s m (n) determining whether additional damping is to be applied; and (b) determining the updated control gain g cThe output sound signal synthesis denoted by s m (n) to generate an output 203 indicative of the degree of attenuation that should be applied to the input signal.
[0047] The second stage may be implemented not only in the distortion limiter of FIG. 1 but also in other distortion limiters, including the mono AGC limiter described above, in which case the second stage is used to modify the frame coefficient β1 from relation (1) and therefore the long-term AGC coefficient β2 from relation (3).
[0048] 3 is a schematic block diagram illustrating simultaneously the saturation detector 251 and the corresponding saturation detection method 201 of FIG. 2. The saturation detector 251 outputs a saturation detection flag flag indicating whether saturation is detected and an updated control gain g c and generate.
[0049] 3, the saturation detection operation 201 and corresponding saturation detector 251 initialize a saturation detection flag, flag, to 0 at the beginning of every output sound signal synthesis processing frame (see 301). It should be noted that the saturation detector 251 performs saturation detection for each of the M audio channels in every sound signal synthesis processing frame.
[0050] The saturation detector 251 and the corresponding saturation detection method 201 then have two parts: a first calculator 320 for updating a saturation detection counter cnt, which stores a metric measuring the probability that a saturation, particularly a strong saturation, is present in the current output sound signal synthesis processing frame, and for setting a saturation detection flag flag; (a) an output sound signal synthesis s, as described herein above; m (b) determining whether additional damping should be applied to the updated control gain g c The output sound signal is synthesized by generating s m a second calculator 330 for determining the degree of attenuation to be applied to (n); Equipped with.
[0051] Next, the saturation detector 251 and the corresponding first calculator 320 of the saturation detection method 201 will be described.
[0052] The first calculator 320 of the saturation detector 251 and the corresponding saturation detection method 201 calculates a parameter flag BER The method starts with a determination (see 302) of whether a bit error, signaled from the algorithm of the audio signal decoder by BER ==1 (see 302), the saturation detection counter cnt is set to the maximum value cnt=C MAX (see 303) and the saturation detection flag is set to a saturation indication value flag=1 (see 303). The saturation detection is then continued by the second calculator 330 (starting at 309) of the saturation detector 251 and the corresponding saturation detection method 201. The saturation detection counter cnt is updated to its maximum value C MAX Note that updating to may also be driven by other decoding parameters 202 (FIG. 2) from the sound signal decoder. In this non-limiting example implementation, C MAX = 50. Note that the saturation detection counter cnt is set to cnt = 0 at decoder initialization.
[0053] Still referring to FIG. 3, the parameter flag BER==0 (see 302), indicating that there are no bit errors detected in the bit stream received by the sound signal decoder, the saturation detector 251 and the corresponding saturation detection method 201 proceed to a second decision (see 304) using the detected peak value p from relation (5). If the peak value p is greater than a given threshold P1 and the saturation detection counter cnt>0, the saturation detection flag is set to its saturation indication value flag=1 (see 305). Then, the saturation detection continues in a second calculator 330 (starting at 309) of the saturation detector 251 and the corresponding saturation detection method 201. In this non-limiting exemplary implementation, P1=3·Ω, where Ω is the limiter threshold from relation (6).
[0054] (a) Parameter flag BER ==0 (see 302), indicating that no bit errors are detected in the bit stream received by the sound signal decoder; (b) the peak value p is equal to or less than (not greater than) the threshold value P1, and / or the saturation detection counter cnt=0 (see 304), the saturation detector 251 and the first calculator 320 of the corresponding saturation detection method 201 proceed to a third decision (see 306) of whether the peak value p is greater than a given threshold value P2. For the purposes of decision 306, the saturation detection counter cnt is not used to attempt to detect instabilities in the sound signal decoder other than those caused by bit errors. If p>P2 (see 306), the saturation detection counter cnt is set to C MAX and cnt+c up The sum of cnt is updated to the minimum value between the maximum value C MAX ) and the saturation detection flag is set to flga=1 (see 307). In this non-limiting example implementation, P2=10·Ω (Ω is the limiter threshold from relation (6)), and the constant c up = 20 represents the incremental step up. Saturation detection then continues in the second calculator 330 (starting at 309) of the saturation detector 251 and the corresponding saturation detection method 201.
[0055] Parameter flagBER ==0 (see 302), indicating that no bit errors are detected in the bit stream received by the sound signal decoder; (b) the peak value p is equal to or less than (not greater than) the threshold value P1 and / or the saturation detection counter cnt=0 (see 304); and (c) the peak value p is equal to or less than (not greater than) the threshold value P2 (see 306), the first calculator 320 subtracts the saturation detection counter cnt (see 308) from 0 to obtain cnt-cnt. dw (The minimum value of the detection counter cnt is guaranteed to be 0.) In this non-limiting exemplary implementation, the constant c dw =1 represents an incremental step down. Saturation detection then continues in the second calculator 330 (starting at 309) of the saturation detector 251 and corresponding saturation detection method 201.
[0056] At this point, the contribution of the saturation detector 251 and the first calculator 320 of the saturation detection method 201 is completed. As can be seen, the first calculator 320 calculates the bit error (parameter flag BER ), two thresholds P1 and P2 applied to the detected peak value p, and an updated counter cnt for accurate determination of the saturation detection indication value "1" or non-saturation detection indication value "0" of the flag flag.
[0057] If the saturation detection flag flag is equal to 0 (see 309) in the second calculator 330 of the saturation detector 251 and corresponding saturation detection means 201, the saturation detection method 201 ends and no additional attenuation is required at the output 314 of the second stage of the two-stage multi-channel distortion limiter 250 (corresponding to 203 in FIG. 2).
[0058] On the other hand, if the saturation detection flag is 1 (see 309), the second calculator 330 of the saturation detector 251 and the corresponding saturation detection method 201 calculates, for example, the relation (9):
[0059]
number
[0060] Using the gain correction factor h c Calculate (see 310), where Ω is the limiter threshold defined above and p is the peak value defined above.
[0061] Gain correction factor h c If is lower than a certain, e.g., experimentally found, threshold Γ2, e.g., Γ2=0.3 (see 311), the second calculator 330 calculates, e.g.,
[0062]
number
[0063] Using the control gain g from equation (6), c Updated (see 312) where α is an additional correction factor, in this non-limiting example implementation α=3.0.
[0064] Otherwise, h c If ≧Γ2 (see 311), the second calculator 330 sets the saturation detection flag to 0 (see 313) and calculates the control gain g c Do not perform any updates.
[0065] The function of the threshold Γ2 is the gain correction factor h c The gain correction factor h is only used when c The function of the additional correction coefficient α is to update the control gain g c The purpose of this is to control the strength of the additional constraint on
[0066] Therefore, the saturation detector 251 and the second calculator 330 of the corresponding saturation detection method 201 determine the control gain g c Furthermore, the saturation detector 251 detects the control gain g cWhen the saturation detection flag is updated (see 312), the saturation detection flag is held at the value flag=1 at the output 314 and the parameter Γ1 in the relation (6) is set to 0. Thus, the relation (6) used in the peak level detector 151 in front of the two-stage multichannel distortion limiter 250 is changed to, for example, the relation (11)
[0067]
number
[0068] will be changed to.
[0069] In source code such as that used in the IVAS framework, the two-stage multi-channel distortion limiter 250 and corresponding distortion limiting method 200 could be implemented as follows. / *! r: apply_strong_limiting flag * / static int16_t detect_strong_saturations( const int16_t BER_detect, / * i : BER detection flag * / int16_t *strong_saturation_cnt, / * i / o: strong saturation counter * / const float max_val, / * i : maximum absolute value * / float *frame_gain / * i / o: Frame gain value * / ) { int16_t apply_strong_limiting; apply_strong_limiting = 0; if ( BER_detect ) { *strong_saturation_cnt = 50; apply_strong_limiting = 1; } else if (max_val > 3 * LIMITER_THRESHOLD && *strong_saturation_cnt > 0) { apply_strong_limiting = 1; } else if (max_val > 10 * LIMITER_THRESHOLD) { *strong_saturation_cnt += 20; *strong_saturation_cnt = min(*strong_saturation_cnt, 50); apply_strong_limiting = 1; } else { (*strong_saturation_cnt)--; *strong_saturation_cnt = max(*strong_saturation_cnt, 0); } if (apply_strong_limiting) { if (*frame_gain < 0.3f) { *frame_gain / = 3.0f; } else { apply_strong_limiting = 0; } } return apply_strong_limiting;
[0070] 3. Performance FIG. 4 is a diagram illustrating the effect of the distortion limiter 250 and the distortion limiting method 200 on the output sound signal synthesis in a non-limiting example when a bitstream corrupted by bit errors is received by an EVS sound signal decoder.
[0071] It is noted from Fig. 4 that when no distortion limiter is used, the output sound signal synthesis is highly distorted (top graph of Fig. 4). When a one-stage distortion limiter as illustrated in Fig. 1 is used (middle graph of Fig. 4), the number of distortions, i.e., energy overshoots, is reduced, and is further significantly reduced when a two-stage distortion limiter as illustrated in Fig. 2 is employed (bottom graph of Fig. 4).
[0072] For illustrative purposes, an example of clipping numbers for a 40 second long sound signal synthesis is shown below.
[0073] [Table 1]
[0074] 4. Implementation Variations This disclosure is presented in the context of a codec implemented in floating-point arithmetic. When implemented in fixed-point arithmetic with limited data type length, some logic described above may not work properly and needs to be tuned. As an example, instead of comparing the peak value p with thresholds P1 and P2 in the first part of the saturation detector 251 and the corresponding saturation detection method 201, a different logic can be introduced. As an example, a logic based on a counter of the number of clippings (output sound signal synthesis before the distortion limiter has sample values equal to the maximum or minimum value of the fixed-point data type resolution) and / or the number of zero crossings can also be considered.
[0075] 5. Hardware Implementation FIG. 5 is a simplified block diagram of an exemplary arrangement of hardware components forming the distortion limiter and distortion limiting method described above.
[0076] The distortion limiter may be implemented as part of a mobile terminal, as part of a portable media player, as an audio format converter or any similar device. The distortion limiter (identified in FIG. 5 as 500) comprises an input 502, an output 504, a processor 506, and a memory 508.
[0077] The input 502 is configured to receive an input sound signal synthesis in digital or analog form. The output 504 is configured to provide an output, distortion-limited sound signal synthesis. The input 502 and the output 504 may be implemented in a common module, for example a serial input / output device.
[0078] The processor 506 is operatively connected to the input 502, the output 504, and the memory 508. The processor 506 is implemented as one or more processors for executing code instructions that support the functions of the various components of the distortion limiter as illustrated in FIGS.
[0079] The memory 508 may include non-transitory memory for storing code instructions executable by the processor 506, in particular processor-readable memory that contains / stores non-transitory instructions that, when executed, cause the processor to implement the operations and components of the distortion limiting methods and distortion limiters described in this disclosure. The memory 508 may also include random access memory or buffers for storing intermediate processed data from various functions performed by the processor 506.
[0080] Those skilled in the art will appreciate that the description of the distortion limiter and distortion limiting methods is merely exemplary and is not intended to be limiting in any way. Other embodiments will be readily apparent to those skilled in the art having the benefit of this disclosure. Furthermore, the disclosed distortion limiter and distortion limiting methods can be customized to provide valuable solutions to existing needs and problems of encoding and decoding sound.
[0081] For the sake of clarity, not all of the routine features of an implementation of a distortion limiter and distortion limiting method are shown and described. Of course, it will be understood that in the development of any such actual implementation of a distortion limiter and distortion limiting method, numerous implementation-specific decisions may need to be made to achieve the developer's particular goals, such as compliance with application-related, system-related, and business-related constraints, and that these particular goals will vary from implementation to implementation and developer to developer. Moreover, it will be understood that the development effort may be complex and time-consuming, but is nevertheless a routine exercise in device design for those skilled in the art of acoustic processing having the benefit of the present disclosure.
[0082] According to the present disclosure, the components / processors / modules, processing operations, and / or data structures described herein may be implemented using various types of operating systems, computing platforms, network devices, computer programs, and / or general-purpose machines. In addition, those skilled in the art will recognize that less general-purpose devices, such as hard-wired devices, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), or the like, may also be used. When a method including a series of operations and sub-operations is implemented by a processor, computer, or machine, and the operations and sub-operations can be stored as a series of non-transitory code instructions readable by a processor, computer, or machine, they may be stored on a tangible and / or non-transitory medium.
[0083] The distortion limiters and distortion limiting methods as described herein may use software, firmware, hardware, or any combination of software, firmware, or hardware suitable for the purposes described herein.
[0084] In the distortion limiters and distortion limiting methods as described herein, the various operations and sub-operations may be performed in various orders, and some of the operations and sub-operations may be optional.
[0085] Although the present disclosure has been described herein above using non-limiting exemplary embodiments thereof, these embodiments can be modified at will within the scope of the appended claims without departing from the spirit and nature of the present disclosure.
[0086] References This disclosure refers to the following references, the entire contents of which are incorporated herein by reference: [1] 3GPP TS 26.445, v.16.1.0, "Codec for Enhanced Voice Services (EVS); Detailed Algorithmic Description", July 2020. [2] 3GPP SA4 contribution S4-170749 “New WID on EVS Codec Extension for Immersive Voice and Audio Services”, SA4 meeting #94, June 26-30, 2017, http: / / www.3gpp.org / ftp / tsg_sa / WG4_CODEC / TSGS4_94 / Docs / S4-170749.zip [3] "Information Technology - Programming Languages - C", International Standard ISO / IEC 9899:1999. [4] Luzheng Lu, "A digital realization of audio dynamic range control", ICSP '98. 1998 Fourth International Conference on Signal Processing (Cat. No.98TH8344), 1998, pp. 1424-1427, Volume 2, doi: 10.1109 / ICOSP.1998.770888.
[0087] The following embodiments (embodiment 1 to embodiment 32) are part of this specification related to the present invention.
[0088] Embodiment 1: A detector for saturation of an output sound signal synthesis from a sound signal decoder, comprising: (a) a first calculator of a saturation detection flag indicating detection of saturation of the output sound signal synthesis; and (b) a second calculator responsive to the saturation detection flag for determining whether additional attenuation should be applied to the output sound signal synthesis and for determining the degree of attenuation to be applied to the output sound signal synthesis.
[0089] Embodiment 2: The saturation detector of embodiment 1, wherein the output sound signal composition includes multiple channels, and the saturation detector is applied to all channels of the output sound signal composition.
[0090] Embodiment 3: The saturation detector according to embodiment 1 or 2, wherein the first calculator initializes the saturation detection flag at the beginning of the output sound signal synthesis processing frame.
[0091] Embodiment 4: The saturation detector according to any one of embodiments 1 to 3, wherein the first calculator updates a saturation detection counter that stores a probability that saturation exists in the current output sound signal synthesis processing frame.
[0092] Embodiment 5: A saturation detector as described in embodiment 4, wherein the sound signal decoder generates a parameter indicative of a bit error in a bit stream received by the sound signal decoder, and the first calculator updates a saturation detection counter to its maximum value and sets a saturation detection flag to a saturation indication value when the generated parameter indicates a bit error in the bit stream.
[0093] Embodiment 6: The saturation detector according to embodiment 4 or 5, wherein the first calculator sets the saturation detection flag to a saturation indication value when the detected sound signal composite amplitude value is greater than a given threshold and the saturation detection counter is greater than zero.
[0094] Embodiment 7: A saturation detector as described in any one of embodiments 4 to 6, wherein if the detected sound signal composite amplitude value is greater than a given threshold, the first calculator sets the saturation detection flag to a saturation indication value and updates the saturation detection counter to a minimum value between the maximum value of the saturation detection counter and the sum of the saturation detection counter and a constant.
[0095] Embodiment 8: A saturation detector as described in embodiment 4, wherein the first calculator sets the saturation detection flag to a saturation indication value when (a) the parameters generated by the sound signal decoder indicate a bit error in the bit stream received by the sound signal decoder, (b) the detected sound signal composite amplitude value is greater than a first given threshold and the saturation detection counter is greater than 0, or (c) the detected amplitude value is greater than a second given threshold.
[0096] Embodiment 9: The saturation detector of embodiment 8, wherein the first and second thresholds are related to a sound signal synthesis limiter threshold.
[0097] Embodiment 10: A saturation detector as described in embodiment 4, wherein the first calculator updates the saturation detection counter to a maximum value between 0 and the difference between the saturation detection counter and a constant when (a) the parameters generated by the sound signal decoder indicate that there are no bit errors in the bitstream received by the sound signal decoder, (b) the detected sound signal composite amplitude value is equal to or lower than a first given threshold and / or the saturation detection counter is equal to 0, and (c) the detected amplitude value is equal to or lower than a second given threshold.
[0098] Embodiment 11: A saturation detector as described in any one of embodiments 1 to 10, wherein the second calculator is responsive to the saturation detection flag to update and apply the control gain to the sound signal synthesis.
[0099] Embodiment 12: The saturation detector of embodiment 11, wherein the second calculator updates the control gain in response to the saturation detection flag being equal to the saturation indication value.
[0100] Embodiment 13: A saturation detector as described in embodiment 12, wherein the second calculator calculates a gain correction coefficient as a function of the detected sound signal synthesis amplitude value and the sound signal synthesis limiter threshold, and updates the control gain using the gain correction coefficient.
[0101] Embodiment 14: The saturation detector of embodiment 13, wherein the second calculator updates the control gain using another constant correction factor when the gain correction factor is below a certain threshold.
[0102] Embodiment 15: The saturation detector of embodiment 14, wherein the second calculator does not perform any update of the control gain when the gain correction factor is equal to or greater than a certain threshold.
[0103] Embodiment 16: A detector of saturation of an output sound signal synthesis from a sound signal decoder, comprising at least one processor and a memory coupled to the processor and storing non-transitory instructions which, when executed, cause the processor to implement (a) a first calculator of a saturation detection flag indicating detection of saturation of the output sound signal synthesis, and (b) a second calculator responsive to the saturation detection flag for determining whether additional attenuation should be applied to the output sound signal synthesis and for determining the degree of attenuation to be applied to the output sound signal synthesis.
[0104] Embodiment 17: A detector of saturation of an output sound signal synthesis from a sound signal decoder, comprising at least one processor and a memory coupled to the processor and storing non-transient instructions that, when executed, cause the processor to (a) calculate a saturation detection flag indicating detection of saturation of the output sound signal synthesis, and (b) in response to the saturation detection flag, determine whether attenuation should be applied to the output sound signal synthesis and determine the degree of attenuation to be applied to the output sound signal synthesis.
[0105] Embodiment 18: A method for detecting saturation of an output sound signal synthesis from a sound signal decoder, comprising: (a) calculating a saturation detection flag indicating detection of saturation of the output sound signal synthesis; and (b) in response to the saturation detection flag, determining whether additional attenuation should be applied to the output sound signal synthesis and determining the degree of attenuation to be applied to the output sound signal synthesis.
[0106] Embodiment 19: The saturation detection method of embodiment 18, wherein the output sound signal composition includes multiple channels and the saturation detection method is applied to all channels of the output sound signal composition.
[0107] Embodiment 20: The saturation detection method according to embodiment 18 or 19, wherein calculating the saturation detection flag includes initializing the saturation detection flag at the beginning of the output sound signal synthesis processing frame.
[0108] Embodiment 21: A saturation detection method described in any one of embodiments 18 to 20, wherein calculating a saturation detection flag includes updating a saturation detection counter that stores the probability that saturation exists within the current output sound signal synthesis processing frame.
[0109] Embodiment 22: A saturation detection method as described in embodiment 21, in which the sound signal decoder generates parameters indicating bit errors in a bit stream received by the sound signal decoder, and calculating the saturation detection flag includes updating a saturation detection counter to its maximum value when the generated parameters indicate bit errors in the bit stream and setting the saturation detection flag to a saturation indication value.
[0110] Embodiment 23: A saturation detection method as described in embodiment 21 or 22, wherein calculating the saturation detection flag includes setting the saturation detection flag to a saturation indication value when the detected sound signal composite amplitude value is greater than a given threshold and the saturation detection counter is greater than 0.
[0111] Embodiment 24: A saturation detection method described in any one of embodiments 21 to 23, wherein when the detected sound signal composite amplitude value is greater than a given threshold, calculating the saturation detection flag includes setting the saturation detection flag to a saturation indication value and updating the saturation detection counter to a minimum value between the maximum value of the saturation detection counter and the sum of the saturation detection counter and a constant.
[0112] Embodiment 25: A saturation detection method as described in embodiment 21, in which calculating the saturation detection flag includes setting the saturation detection flag to a saturation indication value when (a) parameters generated by the sound signal decoder indicate a bit error in the bitstream received by the sound signal decoder, (b) the detected sound signal composite amplitude value is greater than a first given threshold and the saturation detection counter is greater than 0, or (c) the detected amplitude value is greater than a second given threshold.
[0113] Embodiment 26: A saturation detection method as described in embodiment 25, wherein the first and second thresholds are related to a sound signal synthesis limiter threshold.
[0114] Embodiment 27: The saturation detection method of embodiment 21, wherein calculating the saturation detection flag includes updating the saturation detection counter to a maximum value between 0 and the difference between the saturation detection counter and a constant when (a) the parameters generated by the sound signal decoder indicate that there are no bit errors in the bitstream received by the sound signal decoder, (b) the detected sound signal composite amplitude value is equal to or lower than a first given threshold and / or the saturation detection counter is equal to 0, and (c) the detected amplitude value is equal to or lower than a second given threshold.
[0115] Embodiment 28: A saturation detection method described in any one of embodiments 18 to 27, wherein determining whether additional attenuation should be applied to the output sound signal synthesis and determining the degree of attenuation to be applied to the output sound signal synthesis includes updating a control gain for application to the sound signal synthesis in response to a saturation detection flag.
[0116] Embodiment 29: The saturation detection method of embodiment 28, wherein the control gain is updated in response to the saturation detection flag being equal to the saturation indication value.
[0117] Embodiment 30: A saturation detection method as described in embodiment 29, wherein updating the control gain includes calculating a gain correction coefficient as a function of the detected sound signal synthesis amplitude value and the sound signal synthesis limiter threshold, and updating the control gain using the gain correction coefficient.
[0118] Embodiment 31: A saturation detection method as described in embodiment 30, wherein updating the control gain includes updating the control gain using another constant correction factor when the gain correction factor is lower than a certain threshold.
[0119] Embodiment 32: A saturation detection method as described in embodiment 31, comprising not performing any control gain updates if the gain correction factor is equal to or greater than a particular threshold.
[0120] Embodiment 33: A detector for saturation of a sound signal, comprising: (a) a first calculator of a saturation detection flag indicating detection of saturation of the sound signal; and (b) a second calculator responsive to the saturation detection flag for determining whether additional attenuation should be applied to the sound signal and for determining the degree of attenuation to be applied to the sound signal.
[0121] Embodiment 34: The saturation detector of embodiment 33, wherein the sound signal includes multiple channels and the saturation detector is applied to all channels of the sound signal.
[0122] Embodiment 35: The saturation detector according to embodiment 33 or 34, wherein the first calculator initializes the saturation detection flag at the beginning of the sound signal processing frame.
[0123] Embodiment 36: A saturation detector as described in any one of embodiments 33 to 35, wherein the first calculator updates a saturation detection counter that stores a probability that saturation exists in the current sound signal processing frame.
[0124] Embodiment 37: A saturation detector as described in embodiment 36, in which the sound signal decoder generates a parameter indicative of a bit error in a bit stream received by the sound signal decoder, and the first calculator updates a saturation detection counter to its maximum value and sets a saturation detection flag to a saturation indication value when the generated parameter indicates a bit error in the bit stream.
[0125] Embodiment 38: A saturation detector as described in embodiment 36 or 37, wherein the first calculator sets the saturation detection flag to a saturation indication value when the detected sound signal amplitude value is greater than a given threshold and the saturation detection counter is greater than 0.
[0126] Embodiment 39: A saturation detector described in any one of embodiments 36 to 38, wherein if the detected sound signal amplitude value is greater than a given threshold, the first calculator sets the saturation detection flag to a saturation indication value and updates the saturation detection counter to a minimum value between the maximum value of the saturation detection counter and the sum of the saturation detection counter and a constant.
[0127] Embodiment 40: A saturation detector as described in embodiment 36, wherein the first calculator sets a saturation detection flag to a saturation indication value when (a) a parameter generated by the sound signal decoder indicates a bit error in a bit stream received by the sound signal decoder, (b) the detected sound signal amplitude value is greater than a first given threshold and the saturation detection counter is greater than 0, or (c) the detected amplitude value is greater than a second given threshold.
[0128] Embodiment 41: A saturation detector as described in embodiment 40, wherein the first and second thresholds are related to a sound signal limiter threshold.
[0129] Embodiment 42: A saturation detector as described in embodiment 36, wherein the first calculator updates the saturation detection counter to a maximum value between 0 and the difference between the saturation detection counter and a constant when (a) the parameters generated by the sound signal decoder indicate that there are no bit errors in the bitstream received by the sound signal decoder, (b) the detected sound signal amplitude value is equal to or lower than a first given threshold and / or the saturation detection counter is equal to 0, and (c) the detected amplitude value is equal to or lower than a second given threshold.
[0130] Embodiment 43: A saturation detector as described in any one of embodiments 33 to 42, wherein the second calculator is responsive to a saturation detection flag to update and apply a control gain to the sound signal.
[0131] Embodiment 44: The saturation detector of embodiment 43, wherein the second calculator updates the control gain in response to the saturation detection flag being equal to the saturation indication value.
[0132] Embodiment 45: A saturation detector as described in embodiment 44, wherein the second calculator calculates a gain correction factor as a function of the detected sound signal amplitude value and the sound signal limiter threshold, and updates the control gain using the gain correction factor.
[0133] Embodiment 46: The saturation detector of embodiment 45, wherein the second calculator updates the control gain using another constant correction factor when the gain correction factor is below a certain threshold.
[0134] Embodiment 47: The saturation detector of embodiment 46, wherein the second calculator does not perform any update of the control gain when the gain correction factor is equal to or greater than a certain threshold.
[0135] Embodiment 48: A detector of saturation of a sound signal comprising at least one processor and a memory coupled to the processor and storing non-transient instructions which, when executed, cause the processor to implement (a) a first calculator of a saturation detection flag indicating detection of saturation of the sound signal, and (b) a second calculator responsive to the saturation detection flag for determining whether additional attenuation should be applied to the sound signal and for determining the degree of attenuation to be applied to the sound signal.
[0136] Embodiment 49: A detector of saturation of a sound signal comprising at least one processor and a memory coupled to the processor and storing non-transient instructions that, when executed, cause the processor to (a) calculate a saturation detection flag indicating detection of saturation of the sound signal, and (b) in response to the saturation detection flag, determine whether attenuation should be applied to the sound signal and determine the degree of attenuation to be applied to the sound signal.
[0137] Embodiment 50: A method for detecting saturation of a sound signal, comprising: (a) calculating a saturation detection flag indicating detection of saturation of the sound signal; and (b) in response to the saturation detection flag, determining whether additional attenuation should be applied to the sound signal, and determining the degree of attenuation to be applied to the sound signal.
[0138] Embodiment 51: A saturation detection method as described in embodiment 50, wherein the sound signal composition includes multiple channels and the saturation detection method is applied to all channels of the sound signal.
[0139] Embodiment 52: A saturation detection method as described in embodiment 50 or 51, wherein calculating the saturation detection flag includes initializing the saturation detection flag at the beginning of the sound signal processing frame.
[0140] Embodiment 53: A saturation detection method described in any one of embodiments 50 to 52, wherein calculating a saturation detection flag includes updating a saturation detection counter that stores a probability that saturation exists within a current sound signal processing frame.
[0141] Embodiment 54: A saturation detection method as described in embodiment 53, in which the sound signal decoder generates parameters indicating bit errors in a bit stream received by the sound signal decoder, and calculating the saturation detection flag includes updating a saturation detection counter to its maximum value when the generated parameters indicate bit errors in the bit stream and setting the saturation detection flag to a saturation indication value.
[0142] Embodiment 55: A saturation detection method as described in embodiment 53 or 54, wherein calculating the saturation detection flag includes setting the saturation detection flag to a saturation indication value when the detected sound signal amplitude value is greater than a given threshold and the saturation detection counter is greater than 0.
[0143] Embodiment 56: A saturation detection method described in any one of embodiments 53 to 55, wherein when the detected sound signal amplitude value is greater than a given threshold, calculating the saturation detection flag includes setting the saturation detection flag to a saturation indication value and updating the saturation detection counter to a minimum value between the maximum value of the saturation detection counter and the sum of the saturation detection counter and a constant.
[0144] Embodiment 57: A saturation detection method as described in embodiment 53, in which calculating the saturation detection flag includes setting the saturation detection flag to a saturation indication value when (a) parameters generated by the sound signal decoder indicate a bit error in the bitstream received by the sound signal decoder, (b) the detected sound signal amplitude value is greater than a first given threshold and the saturation detection counter is greater than 0, or (c) the detected amplitude value is greater than a second given threshold.
[0145] Embodiment 58: A saturation detection method as described in embodiment 57, wherein the first and second thresholds are related to a sound signal limiter threshold.
[0146] Embodiment 59: A saturation detection method as described in embodiment 53, in which calculating the saturation detection flag includes updating the saturation detection counter to a maximum value between 0 and the difference between the saturation detection counter and a constant when (a) the parameters generated by the sound signal decoder indicate that there are no bit errors in the bitstream received by the sound signal decoder, (b) the detected sound signal amplitude value is equal to or lower than a first given threshold and / or the saturation detection counter is equal to 0, and (c) the detected amplitude value is equal to or lower than a second given threshold.
[0147] Embodiment 60: A saturation detection method described in any one of embodiments 50 to 59, wherein determining whether additional attenuation should be applied to the sound signal and determining the degree of attenuation to be applied to the sound signal includes updating a control gain to apply to the sound signal in response to a saturation detection flag.
[0148] Embodiment 61: The saturation detection method of embodiment 60, wherein the control gain is updated in response to the saturation detection flag being equal to the saturation indication value.
[0149] Embodiment 62: A saturation detection method as described in embodiment 61, wherein updating the control gain includes calculating a gain correction coefficient as a function of the detected sound signal amplitude value and the sound signal limiter threshold, and updating the control gain using the gain correction coefficient.
[0150] Embodiment 63: A saturation detection method as described in embodiment 62, wherein updating the control gain includes updating the control gain using another constant correction factor when the gain correction factor is lower than a certain threshold.
[0151] Embodiment 64: A saturation detection method as described in embodiment 63, comprising not performing any control gain updates if the gain correction factor is equal to or greater than a particular threshold. [Explanation of symbols]
[0152] 100 1-stage multi-channel distortion limiting method 101 Operation 102 Operation 103 "Gain Filtering" sub-operation 104 "Apply Gain" sub-operation 105 Operation 150 1-stage multi-channel distortion limiter 151 Level detector 152 Calculator 153 Gain Filter 154 Amplifier 155 Attenuator 200 Distortion Limiting Method 201 Saturation detection operation 202 Decoding parameters 203 Output 250 2-stage multi-channel distortion limiter 251 Saturation Detector 314 Output 320 The First Calculator 330 The second calculator 502 Input 504 Output 506 Processor 508 Memory
Claims
1. 1. A two-stage distortion limiter for limiting distortion in an audio signal, comprising: - a first step, a level detector for detecting an amplitude value of the sound signal and for calculating a control gain using the detected amplitude value; a first stage including an attenuator of the level of the sound signal using the control gain; - a second stage, a second stage including a saturation detector for detecting saturation of the sound signal and updating the control gain in response to detecting saturation; Equipped with a two-stage distortion limiter.
2. The two-stage distortion limiter of claim 1, wherein the sound signal is a synthesis of output sound signals from sound signal decoders.
3. 3. The two-stage distortion limiter according to claim 1, wherein the detected amplitude value of the sound signal is a peak value of the sound signal.
4. 4. A two-stage distortion limiter according to claim 1, wherein the sound signal includes multiple channels, and the two-stage distortion limiter is a two-stage multi-channel distortion limiter in which the first and second stages are applied to all channels of the sound signal.
5. 5. The two-stage distortion limiter of claim 1, wherein the level detector compares the detected amplitude value with a sound signal limiter threshold to calculate the control gain.
6. 6. The two-stage distortion limiter of claim 5, wherein the level detector sets the control gain to 1 when the detected amplitude value is equal to or lower than the limiter threshold.
7. 7. The two-stage distortion limiter of claim 5 or 6, wherein when the detected amplitude value is greater than the limiter threshold, the level detector selects the control gain as the greater of (a) a ratio between the detected amplitude value and the limiter threshold, and (b) a lowest gain limit.
8. 8. A two-stage distortion limiter according to any one of claims 1 to 7, wherein the first stage includes a calculator of attack / release time parameters that define shorter or longer attack / release times depending on the result of comparing the transient versus non-transient characteristics of the sound signal.
9. The sound signal is formed from sound signal samples, and the attenuator comprises: a gain filter that uses the attack / release time parameters and the control gain to obtain a sample-by-sample gain for the sound signal; an amplifier for applying the per-sample gain to the respective samples of the sound signal to obtain a distortion-limited sound signal.
10. 10. A two-stage distortion limiter according to any one of claims 1 to 9, wherein the saturation detector comprises a first calculator of a saturation detection flag indicative of detection of saturation of the sound signal.
11. 11. The two-stage distortion limiter of claim 10, wherein the first calculator updates a saturation detection counter that stores a probability that saturation is present in a current sound signal processing frame.
12. 12. The two-stage distortion limiter of claim 11, wherein the sound signal decoder generates a parameter indicating a bit error in a bit stream received by the sound signal decoder, and the first calculator updates the saturation detection counter to its maximum value and sets the saturation detection flag to a saturation indication value when the generated parameter indicates a bit error in the bit stream.
13. 12. The two-stage distortion limiter of claim 11, wherein the first calculator sets the saturation detection flag to a saturation indication value when (a) the parameters generated by the sound signal decoder indicate that there are no bit errors in the bit stream received by the sound signal decoder, and (b) the detected amplitude value is greater than a given threshold and the saturation detection counter is greater than 0.
14. 12. The two-stage distortion limiter of claim 11, wherein if (a) a parameter generated by a sound signal decoder indicates that there are no bit errors in the bit stream received by the sound signal decoder, (b) the detected amplitude value is not greater than a first given threshold and / or the saturation detection counter is not greater than 0, and (c) the detected amplitude value is greater than a second given threshold, the first calculator sets the saturation detection flag to a saturation indication value and updates the saturation detection counter to a minimum value between a maximum value of the saturation detection counter and a sum of the saturation detection counter and a constant.
15. 12. The two-stage distortion limiter of claim 11, wherein the first calculator sets the saturation detection flag to a saturation indication value if (a) a parameter generated by a sound signal decoder indicates a bit error in a bit stream received by the sound signal decoder, (b) the detected amplitude value is greater than a first given threshold and the saturation detection counter is greater than 0, or (c) the detected amplitude value is greater than a second given threshold.
16. 12. The two-stage distortion limiter of claim 11, wherein the first calculator updates the saturation detection counter to a maximum value between 0 and a difference between the saturation detection counter and a constant when: (a) the parameters generated by the sound signal decoder indicate that there are no bit errors in the bit stream received by the sound signal decoder; (b) the detected amplitude value is equal to or lower than a first given threshold and / or the saturation detection counter is equal to 0; and (c) the detected amplitude value is equal to or lower than a second given threshold.
17. 17. A two-stage distortion limiter according to any one of claims 10 to 16, wherein the saturation detector includes a second calculator responsive to the saturation detection flag being equal to a saturation indication value for updating the control gain.
18. 18. The two-stage distortion limiter of claim 17, wherein the second calculator calculates a gain correction factor as a function of the detected amplitude value and a sound signal limiter threshold, and updates the control gain using the gain correction factor.
19. 20. The two-stage distortion limiter of claim 18, wherein the second calculator updates the control gains using another constant correction factor when the gain correction factor is lower than a certain threshold, and does not perform any update of the control gains when the gain correction factor is equal to or greater than the certain threshold.
20. 1. A two-stage method for limiting distortion in a sound signal, comprising: - In the first stage, Detecting an amplitude value of the sound signal and calculating a control gain using the detected amplitude value; attenuating the level of the sound signal using the control gain; - In the second stage, detecting saturation of the sound signal and updating the control gain in response to detecting saturation; A two-step method including:
21. The two-stage distortion limiting method of claim 20, wherein the sound signal is an output sound signal synthesis from a sound signal decoder.
22. 21. The two-stage distortion limiting method of claim 20, wherein the detected amplitude value of the sound signal is a peak value of the sound signal.
23. 23. A two-stage distortion limiting method according to any one of claims 20 to 22, wherein the sound signal includes multiple channels, and the two-stage distortion limiting method is a two-stage multi-channel distortion limiting method in which the first and second stages are applied to all channels of the sound signal.
24. 24. The two-stage distortion limiting method of claim 20, wherein the step of detecting the sound signal amplitude value and calculating the control gain comprises the step of comparing the detected amplitude value with a sound signal limiter threshold to calculate the control gain.
25. 25. The two-stage distortion limiting method of claim 24, wherein the step of detecting the sound signal amplitude value and calculating the control gain includes the step of setting the control gain to 1 when the detected amplitude value is equal to or lower than the limiter threshold.
26. 26. The two-stage distortion limiting method of claim 24 or 25, wherein when the detected amplitude value is greater than the limiter threshold, the step of detecting the sound signal amplitude value and calculating the control gain includes the step of selecting the control gain as the greater of (a) the ratio between the detected amplitude value and the limiter threshold, and (b) a lowest gain limit.
27. 27. A two-stage distortion limiting method according to any one of claims 20 to 26, comprising, in the first stage, a step of calculating attack / release time parameters defining shorter or longer attack / release times depending on the result of comparing the transient versus non-transient characteristics of the sound signal.
28. The sound signal is formed from sound signal samples, and the step of attenuating the level of the sound signal comprises: performing gain filtering using the attack / release time parameters and the control gain to obtain a sample-by-sample gain for the sound signal; and applying the per-sample gain to each sample of the sound signal to obtain a distortion-limited sound signal.
29. 29. A two-stage distortion limiting method according to any one of claims 20 to 28, wherein the step of detecting saturation in the sound signal and updating the control gain includes the step of calculating a saturation detection flag indicating detection of saturation in the sound signal.
30. 30. The two-stage distortion limiting method of claim 29, wherein the step of calculating the saturation detection flag includes the step of updating a saturation detection counter that stores the probability that saturation is present in the current sound signal processing frame.
31. 31. The two-stage distortion limiting method of claim 30, wherein the sound signal decoder generates a parameter indicating a bit error in a bit stream received by the sound signal decoder, and the step of calculating the saturation detection flag includes the step of updating the saturation detection counter to its maximum value and setting the saturation detection flag to a saturation indication value when the generated parameter indicates a bit error in the bit stream.
32. 31. The two-stage distortion limiting method of claim 30, wherein the step of calculating the saturation detection flag includes the step of setting the saturation detection flag to a saturation indication value when (a) a parameter generated by a sound signal decoder indicates that there are no bit errors in the bit stream received by the sound signal decoder, and (b) the detected amplitude value is greater than a given threshold and the saturation detection counter is greater than 0.
33. 31. The two-stage distortion limiting method of claim 30, wherein if (a) parameters generated by a sound signal decoder indicate that there are no bit errors in the bit stream received by the sound signal decoder, (b) the detected amplitude value is not greater than a first given threshold and / or the saturation detection counter is not greater than 0, and (c) the detected amplitude value is greater than a second given threshold, the step of calculating the saturation detection flag includes the steps of setting the saturation detection flag to a saturation indication value and updating the saturation detection counter to a minimum value between a maximum value of the saturation detection counter and a sum of the saturation detection counter and a constant.
34. 31. The two-stage distortion limiting method of claim 30, wherein the step of calculating the saturation detection flag includes the step of setting the saturation detection flag to a saturation indication value if (a) a parameter generated by a sound signal decoder indicates a bit error in a bit stream received by the sound signal decoder, (b) the detected amplitude value is greater than a first given threshold and the saturation detection counter is greater than 0, or (c) the detected amplitude value is greater than a second given threshold.
35. 31. The two-stage distortion limiting method of claim 30, wherein the step of calculating the saturation detection flag includes the step of updating the saturation detection counter to a maximum value between 0 and a difference between the saturation detection counter and a constant when: (a) parameters generated by a sound signal decoder indicate that there are no bit errors in the bitstream received by the sound signal decoder; (b) the detected amplitude value is equal to or lower than a first given threshold and / or the saturation detection counter is equal to 0; and (c) the detected amplitude value is equal to or lower than a second given threshold.
36. 36. A two-stage distortion limiting method according to any one of claims 29 to 35, wherein the step of detecting saturation in the sound signal and updating the control gain includes a step of updating the control gain in response to the saturation detection flag being equal to a saturation indication value.
37. 37. The two-stage distortion limiting method of claim 36, wherein updating the control gain comprises calculating a gain correction factor as a function of the detected amplitude value and a sound signal limiter threshold, and updating the control gain using the gain correction factor.
38. 38. The two-stage distortion limiting method of claim 37, wherein updating the control gains includes updating the control gains using another constant correction factor if the gain correction factor is lower than a certain threshold, and wherein no control gain update is performed if the gain correction factor is equal to or greater than the certain threshold.