The present invention relates to the field of the communication technologies, and in particular, to a method and a device for clipping control.
In a practical digital signal processing system, a range of outputting a signal is always limited. For example, the largest level range of a 16-bit digital signal is [−32768, 32767]. When an output signal exceeds the range, the amplitude of the signal is limited, that is to say, clipping processing is performed. This highly effective and simple processing method is used in many digital signal processing systems. A clipping phenomenon occurs in voice communication and general audio processing. When a signal is clipped, a large amount of high-frequency harmonics are generated, thus damaging the continuity of a time domain of the signal. The signal discontinuity severely affects auditory experiences, and subjective quality is obviously deteriorated.
In order to improve the subjective quality deterioration caused by clipping, currently, common processing methods generally include cubic spline predication and AR prediction. However, at present, by using these methods, a clipped signal cannot be automatically detected and self-adaptive gain adjustment cannot be performed on the clipped signal, and therefore, essentially improving the subjective quality of the clipped signal is rather difficult. In addition, for clipping restoration methods such as the cubic spline predication and the AR predication, since a signal range may be larger than a range of a signal at an input end or output end during intermediate processing of a system, a range of a restored signal generated by a single clipped signal restoration method may exceed a range of an input or output signal, so that a clipped signal may still be generated when the system is outputting.
The embodiments of the present invention provide a method and a device for clipping control, so as to solve problems that an existing clipping restoration method is incapable of detecting a clipped signal automatically and that subjective quality of an output signal is poor.
A method for clipping control includes:
updating a clipping factor according to a maximum absolute value FrameLev in a current frame signal;
obtaining a clipping restoration filter according to the clipping factor; and
filtering the current frame signal according to the clipping restoration filter to obtain a filtered clipping restoration signal.
A device for clipping control includes:
a clipping factor updating unit, configured to update a clipping factor according to a maximum absolute value FrameLev in a current frame signal;
a clipping restoration filter obtaining unit, configured to obtain a clipping restoration filter according to the clipping factor; and
a filter unit, configured to filter the current frame signal according to the clipping restoration filter to obtain a filtered clipping restoration signal.
In the embodiments of the present invention, a clipping factor is updated through a maximum absolute value FrameLev in a current frame signal, a clipping restoration filter is obtained and the current frame signal is filtered according to the clipping restoration filter to obtain a filtered clipping restoration signal, so that whether a clipping phenomenon occurs may be automatically detected, and clipping restoration is performed, thus improving subjective quality of an output signal.
To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the accompanying drawings required for describing the embodiments or the prior art are introduced briefly in the following. Apparently, the accompanying drawings in the following description are only some embodiments of the present invention, and persons of ordinary skill in the art may also derive other drawings from the accompanying drawings without creative efforts.
The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments to be described are only a part rather than all of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons skilled in the art without creative efforts shall fall within the protection scope of the present invention.
As shown in
Step 101: Update a clipping factor according to a maximum absolute value FrameLev in a current frame signal.
Step 102: Obtain a clipping restoration filter according to the clipping factor.
Step 103: Filter the current frame signal according to the clipping restoration filter to obtain a filtered clipping restoration signal.
In this embodiment of the present invention, the clipping factor is updated according to the maximum absolute value FrameLev in the current frame signal, the clipping restoration filter is obtained, and the current frame signal is filtered according to the clipping restoration filter to obtain the filtered clipping restoration signal, so that whether a clipping phenomenon occurs may be automatically detected, and clipping restoration is performed, thus improving subjective quality of an output signal. The subjective quality is used for describing quality of a voice or audio signal.
Step 201: Search for a maximum absolute value FrameLev in a current frame signal. FrameLev=abs(sk(i)), i=0, 1, . . . , 159, where sk(i) is a current frame signal of an input signal.
Step 202: Determine a status of the current input signal according to the FrameLev in the current frame signal, input different statuses of the signal, and accordingly update a clipping factor C. A specific process is as follows.
A) If FrameLev>THR1, it is considered that the input signal is in a clipping status. At this time, the clipping factor C is rapidly increased, that is, Ck=Ck−1+β1.
B) If THR1>=FrameLev>THR2, it is considered that the input signal is not in the clipping status, but is quite close to the clipping status, that is, in an approximate clipping status. At this time, the clipping factor C is slowly decreased, that is, Ck=Ck−1−β2.
C) If THR2>=FrameLev>THR3, it is considered that the input signal is not in the clipping status, and the amplitude of the signal is not large. At this time, the clipping factor C is rapidly decreased, that is, Ck=Ck−1β2.
D) If THR3>=FrameLev, it is considered that the input signal is not in a clipping status, and the amplitude of the signal is quite small. The clipping factor C is kept unchanged, that is, Ck=Ck−1.
In the process of determination and update of the clipping factor, the clipping factor Ck of a current frame is adjusted within an interval [0, 1], that is,
where, THR1, THR2 and THR3 are respectively a first threshold, a second threshold and a third threshold, and are used for representing amplitude intervals of the signal, that is, −2x<=THR3<THR2<THR1<=2x, where x is the number of bits of the signal processing system. In this embodiment of the present invention, a 16-bit signal processing system is taken as an example, and −32768<=THR3<THR2<THR1<=32767. β1, β2, and β3 represent update speeds of the clipping factor C. 0≦β2≦β3<β1≦1, and Ck is the clipping factor of the current frame signal, and Ck−1 is a clipping factor of a previous frame signal. In this embodiment, preferentially, THR1=32766, THR2=32767*0.9, THR3=32767*0.1, and β1=0.1, β2=0.005, β3=0.01, C0=0.
Step 203: Update a clipping restoration filter according to the clipping factor of the current frame. The clipping restoration filter is an all-pass filter, and a state function of an N-order all-pass filter is,
a1=α1Ck, a2=α2Ck, . . . , aN=αNCk, |ai|<1.
In this embodiment, the clipping restoration filter adopts a 1-order all-pass filter, and the state function is,
where a filter parameter ηk is determined by the clipping factor, that is, ηk=λCk, |λ|<1. In this embodiment, preferentially, λ=0.5. Definitely, in another embodiment, λ=−0.5 is also preferred.
Step 204: Filter the current frame signal Sk{sk(0), sk(1), . . . , sk(159)} by using the clipping restoration filter to obtain a filtered clipping restoration signal S′k{sk′(0), sk′(1), . . . , sk′(159)}. A specific filtering process is as follows.
It is assumed that the current frame signal is represented as Sk(z) in a z domain, and the clipping restoration signal is represented as S′k(z) in the z domain.
Therefore, the filtering process in the z domain may be represented as:
accordingly, in a time domain, may be represented as:
s′k(i)−ηks′k(i−1)=−ηksk(i)+sk(i−1)
s′k(i)=−ηksk(i)+sk(i−1)+ηks′k(i−1)
Make yk=sk(i)+ηk×sk′(1) as an intermediate variable in the filtering process.
Therefore, the filtering process in the time domain may be represented as:
sk′(i)−ηk×sk(i)+yk−1.
yk=sk(i)+ηk×sk′(i)
Step 205: Since during intermediate processing of the system, a range of a signal may exceed a range of [−32768, 32767], when the signal has a quite large amplitude, clipping is still performed during final output of the system, so that an obtained final output signal still has a clipped signal, and subjective quality is not high. Therefore, after clipping restoration is performed on the signal, in this embodiment of the present invention, automatic gain control may also be performed on the clipping restoration signal, so that the signal can be normally output at an output end of the system. A specific process of the automatic gain control is as follows.
1) Calculate an automatic gain control factor.
The automatic gain control factor is determined by the clipping factor of the current frame, that is,
α is a gain update factor and is also determined by the clipping factor. Specifically, Ck represents a trend of the amplitude of the signal. If Ck is in a rapidly increasing phase and Ck<THR4, make α=0.5, which represents rapid transition to an expected gain. If Ck is in a rapidly increasing phase and THR4≦Ck, make α=0.5+0.49*(Ck−0.75)*4, which represents slow transition to the expected gain from rapid transition. In addition to the preceding two cases, α=0.99 represents slow transition to the expected gain. THR4 represents a clipping status interval of the clipping factor Ck, where in this embodiment, THR4=0.75.
2) Perform gain adjustment on the clipping restoration signal according to the automatic gain control factor. A specific adjustment process is as follows.
An automatic gain control factor gk−1 of a previous frame and an automatic gain control factor gk of the current frame are interpolated to obtain a gain control curve G{g(0), g(1), . . . g(159)} of the current frame signal. An interpolation process may be linear interpolation, that is,
where N is the number of sampling points in a frame signal (in this embodiment, N=160). And interpolation may also be performed through a Cosine window or other methods.
Perform the gain adjustment on the clipping restoration signal to obtain a final output signal S″k{s″(0), s″(1), . . . , s″(159)} after the gain adjustment. An adjustment process is s″(i)=s′(i)×g(i).
Step 205 is optional, which is further optimization processing performed based on the clipping restoration, and may further ensure that the clipping phenomenon is eliminated from the final output signal, so as to obtain a restored signal with better subjective quality.
With a clipping restoration method provided in this embodiment of the present invention, a clipped signal may be self-adaptively detected, and restoration is self-adaptively performed on the clipped signal. Furthermore, in this embodiment of the present invention, automatic gain control may also be performed on the signal to ensure that a clipping phenomenon is eliminated from a final output signal, so as to obtain a restored signal with better subjective quality.
The method includes:
Steps 401 to 403 are the same as steps 201 to 203.
Step 404: Determine an automatic gain control factor by a clipping factor of a current frame, that is,
where α is a gain update factor, and is also determined by the clipping factor. Specifically, Ck represents a trend of amplitude of a signal. If Ck is in a rapidly increasing phase and Ck<THR4, make α=0.5, which represents rapid transition to an expected gain. If Ck is in a rapidly increasing phase and THR4≦Ck, make α=0.5+0.49*(Ck−0.75)*4, which represents slow transition to the expected gain from rapid transition. In addition to the preceding two cases, α=0.99 represents slow transition to the expected gain. THR4 represents a clipping status interval of the clipping factor Ck, and in this embodiment, THR4=0.75.
Step 405: Perform clipping restoration on a current frame signal Sk{sk(0), sk(1), . . . , sk(159)} of an input signal by using a clipping restoration filter, and at the same time, perform energy gain adjustment to obtain an adjusted final output signal S″k{s″(0), s″(1), . . . , s″(159)}. A detailed process is as follows.
In the previous embodiment, a filtered clipping restoration signal S′k{sk′(0), sk′(1), . . . , sk′(159)} is obtained from the input signal Sk{sk(0), sk(1), . . . , sk(159)} through the clipping restoration filter, and automatic gain control is further performed on the clipping restoration signal to obtain S″k{s″(0), s″(1), . . . , s″(159)}. Specific implementation may be realized through two single cycles, that is, after obtaining 160 values of the clipping restoration signal, the automatic gain control is further performed to obtain 160 values of S″k{s″(0), s″(1), . . . , s″(159)}. A difference between the previous embodiment and this embodiment lies in that, energy adjustment and the clipping restoration are performed in the same step. The specific implementation may be realized through a double-cycle, that is, after sk′(i) is obtained, the automatic gain control is directly performed to obtain s″(i).
With a clipping restoration method provided in this embodiment of the present invention, a clipped signal may be self-adaptively detected, and restoration and automatic gain control may be self-adaptively performed on the clipped signal to ensure that a clipping phenomenon is eliminated from a final output signal, so as to obtain a restored signal with better subjective quality.
Corresponding to the clipping control method provided in this embodiment of the present invention, an embodiment of the present invention further provides a clipping control device. The steps in the preceding method embodiment may be correspondingly applied to a device embodiment.
a clipping factor updating unit 501, configured to update a clipping factor according to a maximum absolute value FrameLev in a current frame signal;
a clipping restoration filter obtaining unit 502, configured to obtain a clipping restoration filter according to the clipping factor; and
a filter unit 503, configured to filter the current frame signal according to the clipping restoration filter to obtain a filtered clipping restoration signal.
an automatic gain control factor calculation unit 601, configured to calculate an automatic gain control factor according to the clipping factor;
a gain adjustment unit 602, configured to perform gain adjustment on a clipping restoration signal according to the automatic gain control factor to obtain an output signal; and a regulating unit 603, configured to regulate the clipping factor of the current frame signal output by the clipping factor updating unit 501 within an interval [0, 1].
Furthermore, if FrameLev>THR1, the clipping factor updating unit 501 is specifically configured to rapidly increase the clipping factor C, that is, Ck=Ck−1+β1; or,
THR1>=FrameLev>THR2, the clipping factor updating unit 501 is specifically configured to slowly decrease the clipping factor C, that is, Ck=Ck−1−β2; or,
THR2>=FrameLev>THR3, the clipping factor updating unit 501 is specifically configured to rapidly decrease the clipping factor C, that is, Ck=Ck−1−β3; or,
THR3>=FrameLev, the clipping factor updating unit 501 is specifically configured to keep the clipping factor C unchanged, that is, Ck=Ck−1.
THR1, THR2 and THR3 are used for representing amplitude intervals of the signal, where −2x<=THR3<THR2<THR1<=2x, where x is the number of bits of a signal processing system. β1, β2, β3 are used for representing update speeds of the clipping factor C, 0≦β2≦β3≦β1≦1. Ck is the clipping factor of the current frame signal, and Ck−1 is a clipping factor of a previous frame signal.
When the clipping restoration filter is a 1-order all-pass filter, the clipping restoration filter obtaining unit 502 is specifically configured to obtain a state function of the 1-order all-pass filter:
where, ηk is a filter parameter, ηk=|λ|k, and Ck is the clipping factor of the current frame signal.
The filter unit 503 is specifically configured to filter the current frame signal according to the following expression to obtain a filtered clipping restoration signal:
sk′(i)=ηk×sk(i)+yk−1.
yk=sk(i)+ηk×sk′(i)
The automatic gain control factor calculation unit 601 is configured to calculate the automatic gain control factor according to the following expression:
where, gk is the automatic gain control factor of the current frame signal, gk−1 is a automatic gain control factor of the previous frame signal, Ck is the clipping factor of the current frame signal, and α is a gain update factor.
The gain adjustment unit 602 is specifically configured to, according to the automatic gain control factor gk−1 of the previous frame signal and the automatic gain control factor gk of the current frame signal, obtain a gain control curve G{g(i)} through interpolation, and perform gain adjustment on the clipping restoration signal to obtain an output signal: s″(i)=s′(i)×g(i).
The gain adjustment unit 602 is specifically configured to, according to the automatic gain control factor gk−1 of the previous frame signal and the automatic gain control factor gk of the current frame signal, obtain the gain control curve G{g(i)} through linear interpolation:
where N is the number of sampling points in a frame signal.
With the clipping control device provided in this embodiment of the present invention, a clipped signal may be self-adaptively detected through a maximum absolute value in a current frame signal, so that restoration is self-adaptively performed on the clipped signal. Furthermore, in this embodiment of the present invention, automatic gain control may also be performed on the signal to ensure that a clipping phenomenon is eliminated from a final output signal, so as to obtain a restored signal with better subjective quality.
Through the preceding description of the implementation manners, a person skilled in the art may clearly understand that the present invention may be accomplished through software plus a necessary hardware platform, and definitely, may also be accomplished all through hardware, however, in most cases, the former is an exemplary implementation manner. Based on this understanding, all or a part of the technical solutions of the present invention that make contribution to the background technology may be embodied in the form of a software product. The computer software product may be stored in a storage medium such as an ROM/RAM, a magnetic disk or an optical disk, and includes several instructions used to instruct computer equipment (may be a personal computer, a server, or network equipment) to perform the method described in each embodiment or in some parts of the embodiment of the present invention.
Although the present invention is described through the embodiments, a person skilled in the art may know that various variations and changes are made to the present invention without departing from the spirit of the present invention. The claims in the application document of the present invention shall include these variations and changes.
Number | Date | Country | Kind |
---|---|---|---|
2009 1 0108528 | Jun 2009 | CN | national |
This application is a continuation of International Application No. PCT/CN2010/074360, filed on Jun. 24, 2010, which claims priority to Chinese Patent Application No. 200910108528.X, filed on Jun. 25, 2009, both of which are hereby incorporated by reference in their entireties.
Number | Name | Date | Kind |
---|---|---|---|
7376197 | Berangi et al. | May 2008 | B2 |
20020128830 | Kanazawa et al. | Sep 2002 | A1 |
20020181610 | Sumasu et al. | Dec 2002 | A1 |
20040014436 | Lipka et al. | Jan 2004 | A1 |
20040165524 | Chen et al. | Aug 2004 | A1 |
20060034448 | Parry | Feb 2006 | A1 |
20070136050 | Tourwe | Jun 2007 | A1 |
20070164885 | Andersen | Jul 2007 | A1 |
20070183684 | Bhattacharjya | Aug 2007 | A1 |
20070188218 | Ueda | Aug 2007 | A1 |
20070201567 | Liu et al. | Aug 2007 | A1 |
20080089224 | Kim et al. | Apr 2008 | A1 |
20080137767 | Jaenecke | Jun 2008 | A1 |
20080247487 | Cai et al. | Oct 2008 | A1 |
20090034407 | Lindh | Feb 2009 | A1 |
20090083031 | Atlas et al. | Mar 2009 | A1 |
20090097547 | Ugur et al. | Apr 2009 | A1 |
20090262841 | Chalil | Oct 2009 | A1 |
20130238108 | Millington | Sep 2013 | A1 |
Number | Date | Country |
---|---|---|
1870616 | Nov 2006 | CN |
1972264 | May 2007 | CN |
101076008 | Nov 2007 | CN |
101136890 | Mar 2008 | CN |
101442348 | May 2009 | CN |
101605111 | Dec 2009 | CN |
11074862 | Mar 1999 | JP |
2002077097 | Mar 2002 | JP |
2002221988 | Aug 2002 | JP |
2003298549 | Oct 2003 | JP |
2005269550 | Sep 2005 | JP |
20070003545 | Jan 2007 | KR |
WO 2009010010 | Jan 2009 | WO |
WO 2010072127 | Jul 2010 | WO |
WO 2010149053 | Dec 2010 | WO |
Entry |
---|
Abel et al.; “Restoring a Clipped Signal”; CH2977-7/91/0000-1745; 1991 IEEE; (4 pgs.). |
Maher; “A Method for Extrapolation of Missing Digital Audio Data”; Oct. 7-10, 1993; (20 pgs.). |
Dahimene et al.; “A Simple Algorithm for the Restoration of Clipped Speech Signal”; Informatica 32 (2008) pp. 183-188; (6 pgs.). |
International Search Report of the International Searching Authority; dated (mailed) Oct. 23, 2008; related to Application No. PCT/CN2008/071670; (6 pgs.). |
Ali-Hemmati et al.; “Iterative cancellation of clipping noise in multilevel quadrature amplitude modulation multi-carrier CDMA system”; IET Commun., 2008, 2, (2), pp. 300-305; (6 pgs.). |
European Patent Office Communication related to the Application No. 10791559.7-2415; pursuant to Rule 62 EPC, the supplementary European search report (Art. 153(7) EPC) and the European search opinion; (9 pgs.) dated Feb. 22, 2012. |
Foreign Communication From a Counterpart Application, Japanese Application No. 2012516499, Japanese Office Action dated May 28, 2013, 2 pages. |
Foreign Communication From a Counterpart Application, Japanese Application No. 2012516499, English Translation of Japanese Office Action dated May 28, 2013, 1 page. |
International Search Report for International Application No. PCT/CN2010/074360, mailed Sep. 30, 2010 Huawei Technologies Co., Ltd. |
Written Opinion of the International Searching Authority (translation) dated (mailed) Sep. 30, 2010, issued in related Application No. PCT/CN2010/074360, filed Jun. 24, 2010, Huawei Technologies Co., Ltd. |
International Search Report for International Application No. PCT/CN2009/075709, mailed Mar. 25, 2010 Huawei Technologies Co., Ltd. |
Foreign Communication From A Counterpart Application, Korean Application No. 10-2011-7029856, English Translation of Korean Office Action dated Sep. 30, 2013, 2 pages. |
Foreign Communication From A Counterpart Application, Japanese Application No. 2012-516499, Determination of Allowance dated Mar. 18, 2014, 4 pages. |
Number | Date | Country | |
---|---|---|---|
20120095580 A1 | Apr 2012 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2010/074360 | Jun 2010 | US |
Child | 13335300 | US |